https://handwiki.org/wiki/index.php?title=Control_flow_analysis&feed=atom&action=historyControl flow analysis - Revision history2024-03-29T06:52:21ZRevision history for this page on the wikiMediaWiki 1.38.4https://handwiki.org/wiki/index.php?title=Control_flow_analysis&diff=3012391&oldid=prevSherlock: add2023-06-27T13:26:33Z<p>add</p>
<p><b>New page</b></p><div>{{Short description|Compiler technique}}<br />
In [[Computer science|computer science]], '''control-flow analysis''' ('''CFA''') is a static-code-analysis technique for determining the [[Control flow|control flow]] of a program. The control flow is expressed as a [[Control-flow graph|control-flow graph]] (CFG). For both functional programming languages and object-oriented programming languages, the term CFA, and elaborations such as ''k''-CFA, refer to specific algorithms that compute control flow.{{dubious|date=July 2014}}<br />
<br />
For many imperative programming languages, the control flow of a program is explicit in a program's source code.{{dubious|date=July 2014}} As a result, interprocedural control-flow analysis implicitly usually refers to a [[Finance:Static analysis|static analysis]] technique for determining the receiver(s) of function or method calls in computer programs written in a higher-order programming language.{{dubious|date=July 2014}} For example, in a programming language with [[Higher-order function|higher-order function]]s like [[Scheme (programming language)|Scheme]], the target of a function call may not be explicit: in the isolated expression<br />
<br />
<source lang="scheme"><br />
(lambda (f) (f x))<br />
</source><br />
<br />
it is unclear to which procedure <code>f</code> may refer. A control-flow analysis must consider where this expression could be invoked and what argument it may receive to determine the possible targets.<br />
<br />
Techniques such as [[Abstract interpretation|abstract interpretation]], constraint solving, and [[Type system|type system]]s may be used for control-flow analysis.<ref>{{cite book |author-first1=Flemming |author-last1=Nielson |author-first2=Hanne Riis |author-last2=Nielson |author-first3=Chris |author-last3=Hankin |title=Principles of Program Analysis |publisher=[[Company:Springer Science+Business Media|Springer Science+Business Media]] |date=2005}}</ref>{{page needed|date=July 2014}}<br />
<br />
==See also==<br />
* [[Control-flow diagram]] (CFD)<br />
* [[Data-flow analysis]]<br />
* Cartesian product algorithm<br />
* [[Pointer analysis]]<br />
<br />
==References==<br />
{{reflist}}<br />
<br />
==External links==<br />
*[https://web.archive.org/web/20140728203154/http://pages.cs.wisc.edu/~cs701-1/NOTES/3.CONTROL-FLOW-ANALYSIS.html for textbook intraprocedural CFA in imperative languages]<br />
*[http://janmidtgaard.dk/papers/Midtgaard-CSur-final.pdf CFA in functional programs (survey)]<br />
*[http://cgi.di.uoa.gr/~smaragd/kcfa-pldi10.pdf for the relationship between CFA analysis in functional languages and points-to analysis in imperative/OOP languages]<br />
<br />
[[Category:Control-flow analysis| ]]<br />
<br />
{{Sourceattribution|Control flow analysis}}</div>Sherlock