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.

17
Q

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

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
20
Q

Testing which has:

  • efficient test suite
  • potentially better coverage
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
Systematic testing application: ___
Korat
26
Korat used for
Manipulating linked data structures
27
Randoop used for testing
classes and libraries
28
Feedback directed random testing tool
Randoop
29
Korat pros
- strong when we can enumerate all possibilities | - small, easily specified procedures
30
Korat cons
- weak when enumeration is weak | ints, floats, strings
31
___ analysis is static analysis reasoning about flow of data in program
Dataflow
32
Impossible for analysis to achieve ___, ___, and ___
soundness, completeness, termination
33
Reaching definitions analysis goal
Determine which assignments might reach each program point
34
Very busy expressions analysis goal
Compute expressions that are very busy at exit from each program point
35
In very busy expressions analysis, very busy means
no matter the path, the expression is used before variables occurring within are redefined
36
Available expressions analysis goal
Determine, for each point, which expressions must already have been computed and not later modified on all paths to the point.
37
Live variables analysis goal
Determine, for each point, which variables could be live at points exit.
38
In live variable analysis, live means
There is a path to use of variable without redefinition.
39
___ testing is used to design new tests and evaluate quality of existing tests
Mutation