Midterm Flashcards

Study

1
Q

___ analysis is one which accepts a buggy program.

A

unsound

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

___ analysis is one which rejects a correct program.

A

incomplete

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Useful for testing multi-threaded programs.

A

Cuzz

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Predicate assumed to hold before function executes

A

Pre-condition

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Predicate expected to hold after function executes

A

Post-condition

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Test which functions are called

A

function coverage

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Test which statements are executed

A

Statement coverage

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Test which branches are taken

A

Branch coverage

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Feed random inputs to a program

A

Fuzzing

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Random testing (fuzzing) pros

A

Easy to implement;
Provably good coverage given enough tests;
Can work on programs of any format;
Helps find security vulnerabilities

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Random testing (fuzzing) cons

A

Inefficient test suite;
Might uncover unimportant bugs;
Poor coverage

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Useful for systematic testing (linked data structures)

A

Korat

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Useful for feedback-directed random testing (classes; libraries)

A

Randoop

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Korat key idea

A

No pre-condition, no expansion

Never expands parts not examined by pre-condition

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Randoop key idea

A

Randomly create new test guided by feedback from previously created tests

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

___ analysis show what might be an invariant and what definitely isn’t.

A

Dynamic

17
Q

___ analysis show what definitely is an invariant and what definitely isn’t.

A

Static

18
Q

Static analysis sacrifices ___ but is ___

A

Completeness; Sound

19
Q

Testing that:

  • works on unmodifiable code
  • Doesn’t need code analysis
  • Can use any format
A

Black box

20
Q

Testing which has:

  • efficient test suite
  • potentially better coverage
A

White box

21
Q

Metric to quantify extent to which a programs code is tested by test suite

A

Code Coverage

22
Q

Mutation analysis key idea

A

test variations (mutants) of a program to reveal logical errors

23
Q

Why use fuzzing

A
  • observe whether program behaves correctly

- make sure program doesn’t crash

24
Q

Fuzzing: feed ___ to program

A

random inputs

25
Q

Systematic testing application: ___

A

Korat

26
Q

Korat used for

A

Manipulating linked data structures

27
Q

Randoop used for testing

A

classes and libraries

28
Q

Feedback directed random testing tool

A

Randoop

29
Q

Korat pros

A
  • strong when we can enumerate all possibilities

- small, easily specified procedures

30
Q

Korat cons

A
  • weak when enumeration is weak

ints, floats, strings

31
Q

___ analysis is static analysis reasoning about flow of data in program

A

Dataflow

32
Q

Impossible for analysis to achieve ___, ___, and ___

A

soundness, completeness, termination

33
Q

Reaching definitions analysis goal

A

Determine which assignments might reach each program point

34
Q

Very busy expressions analysis goal

A

Compute expressions that are very busy at exit from each program point

35
Q

In very busy expressions analysis, very busy means

A

no matter the path, the expression is used before variables occurring within are redefined

36
Q

Available expressions analysis goal

A

Determine, for each point, which expressions must already have been computed and not later modified on all paths to the point.

37
Q

Live variables analysis goal

A

Determine, for each point, which variables could be live at points exit.

38
Q

In live variable analysis, live means

A

There is a path to use of variable without redefinition.

39
Q

___ testing is used to design new tests and evaluate quality of existing tests

A

Mutation