Forwards, Backwards, May, and Must

来源:互联网 发布:eviews软件下载 编辑:程序博客网 时间:2024/05/16 19:04
The four classical analyses that we have seen so far can be classified in various ways. They are all just instances of the general monotone framework, but their constraints have a particular structure.
A forwards analysis is one that for each program point computes information about the past behavior. Examples of this are available expressions and reaching definitions. They can be characterized by the right-hand sides of constraints only depending on predecessors of the CFG node.
A backwards analysis is one that for each program point computes information about the future behavior. Examples of this are liveness and very busy expressions. They can be characterized by the right-hand sides of constraints only depending on successors of the CFG node.
A may analysis is one that describes information that may possibly be true and, thus, computes an upper approximation. Examples of this are liveness and reaching definitions. They can be characterized by the right-hand sides of constraints using a union operator to combine information.
A must analysis is one that describes information that must definitely be
true and, thus, computes a lower approximation. Examples of this are available expressions and very busy expressions. They can be characterized by the righthand sides of constraints using an intersection operator to combine information.
Thus, our four examples show every possible combination, as illustrated by this diagram:
 Forwards Backwards
May Reaching De nitions Liveness
Must Available Expressions Very Busy Expressions
These classifications are mostly botanical in nature, but awareness of them may
provide inspiration for constructing new analyses.
原创粉丝点击