Intro Flashcards

1
Q

Dynamic analysis

A

Dynamic analysis is the class of run-time analyses. These analyses discover
information by running the program and observing its behavior.

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

Static analysis

A

Static analysis is the class of compile-time analyses. These analyses discover
information by inspecting the source code or binary code of the program.

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

Hybrid analysis

A

Hybrid analyses combine aspects of both dynamic and static analyses, by combining
runtime and compile-time information in interesting ways

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

iterative approximation.

A

A common static analysis method. The term iterative approximation implies that in general, the analysis might need to
visit the same program point multiple times. This is because of the presence of loops,
which can require the analysis to update facts that were previously inferred by the
analysis at the same program point. We will emphasize this aspect in the following
example.

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

Parts of static analysis

A

Program representation. In order to analyze a program, we
must be able to represent it precisely. Choices in program representation range
broadly with different levels of abstraction. Common representation choices include
control-flow graphs, Abstract Syntax Trees (ASTs), and bytecode

Abstract domain. Static analysis does not operate on actual
program values, so we must represent concrete states with an approximate, abstract
domain. In our example, we chose single constant values, in combination with ‘top’
and ‘bottom’ to comprise our abstract domain.
A transfer function specifies how to calculate the abstract state given a program
statement. For example, in our iterative analysis, given the statement “x=1”, the
transfer function would set x to 1 in our abstract state. The transfer functions also
specify how to combine information at control-flow merge points.

Fixed-point computation algorithm. Invokes
the transfer functions of individual program statements to analyze the program. The
algorithm computes a “fixed-point” meaning that it terminates when the abstract states
are no longer changing.
At each step, the analysis designer has many choices.

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

Sound analysis

A

Never accepts bad programs

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

Complete analysis

A

Never rejects good programs

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

Trivial analysis

A

rejects every program

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

False positive

A

a good program that rejected by an analysis

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

Precision and recall

A

are standard ways to measure accuracy of the systems that output binary (yes/no) classifications. Analysis either accepts or rejects a given program

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

Precision

A

measures the number of bad programs among all programs that analysis rejected. It measures the false positive rate of the analysis.

precision = # true positives/ # rejected

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

Recall

A

measures the number of bad programs that the analysis rejected among among all bad programs. It measures false negative rate of the analysis.

recall = # true positives/#bad

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

F-Measure or FI score

A

a standard measure of
accuracy that combines both precision and recall. It is computed by taking the
harmonic mean of precision and recall.

F-measure = 2/((1/precision) + (1/recall))

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

Who needs program analysis

A

Compilers
Software quality tools
IDEs(Integrated Development Environments)

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