Live-variable analysis: Difference between revisions

Content deleted Content added
top: clean-up template; removed questionable paragraph
Line 1:
{{original research|date=September 2017}}
 
In [[compiler theory]], '''live variable analysis''' (or simply '''liveness analysis''') is a classic [[data-flow analysis]] performed by [[compiler]]s to calculate for each program point the [[Variable (programming)|variables]] that may be potentially read before their next write, that is, the variables that are ''live'' at the exit from each program point.
 
Stated simply: a variable is '''live''' if it holds a value that may be needed in the future.
 
<!-- Is this paragraph relevant? -->
Recently {{As of|2006|lc=on}}, various program analyses such as live variable analysis have been solved using [[Datalog]]. The Datalog specifications for such analyses are generally an order of magnitude shorter than their imperative counterparts (e.g. [[iterative analysis]]), and are at least as efficient.<ref>{{cite book | author=Whaley | title=Using Datalog with Binary Decision Diagrams for Program Analysis | year=2004 | url=http://people.csail.mit.edu/mcarbin/papers/aplas05.pdf}}</ref>
 
== Example ==