Control flow analysis
Encyclopedia
Control flow analysis is a static code analysis
Static code analysis
Static program analysis is the analysis of computer software that is performed without actually executing programs built from that software In most cases the analysis is performed on some version of the source code and in the other cases some form of the object code...

 technique for determining the control flow
Control flow
In computer science, control flow refers to the order in which the individual statements, instructions, or function calls of an imperative or a declarative program are executed or evaluated....

 of a program. The control flow is expressed as a control flow graph
Control flow graph
A control flow graph in computer science is a representation, using graph notation, of all paths that might be traversed through a program during its execution.- Overview :...

 (CFG).

For many languages, the control flow of a program is explicit in a program's source code. As a result, control-flow analysis implicitly usually refers to a static analysis
Static analysis
Static analysis, static projection, and static scoring are terms for simplified analysis wherein the effect of an immediate change to a system is calculated without respect to the longer term response of the system to that change...

 technique for determining the receiver(s) of function or method calls in computer programs written in a higher-order programming language. For both functional programming languages and object-oriented programming language
Object-oriented programming language
This is a list of object-oriented programming programming languages.-Languages with object-oriented features:*ABAP*Ada 95*AmigaE*BETA*Blue*Boo*C++*C#*COBOL*Cobra*ColdFusion*Common Lisp*COOL*CorbaScript*Clarion*CLU*Curl*D*Dylan*E*Eiffel...

s, the term CFA
CFA
-Science and technology:* Cfa is one of two symbols for the Humid subtropical climate under the Köppen climate classification system* cfa is the file extension for an Adobe Premiere Pro audio file...

 refers to an algorithm that computes control flow.

The term control flow analysis was introduced independently by Neil D. Jones and Olin Shivers.

In a programming language like Scheme, the target of a function call may not be explicit. For example in the isolated expression:

(lambda (f) (f x))

it is unclear to which procedure f may refer. To determine the possible targets, a control-flow analysis must consider where this expression could be invoked, and what argument it may receive.
Abstract interpretation
Abstract interpretation
In computer science, abstract interpretation is a theory of sound approximation of the semantics of computer programs, based on monotonic functions over ordered sets, especially lattices. It can be viewed as a partial execution of a computer program which gains information about its semantics In...

, constraint solving and type system
Type system
A type system associates a type with each computed value. By examining the flow of these values, a type system attempts to ensure or prove that no type errors can occur...

s may be used to compute control-flow analysis.
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK