|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttip.cfg.CFGAnalysisAdapter
tip.cfg.FlowAnalysis<EqualitySet<ALocalDecl>>
tip.cfg.dfa.LivenessAnalysis
public class LivenessAnalysis
LivenessAnalysis
implements the Liveness backwards-may
analysis. The implementation does not handle pointer expression. It uses
UnionSetLattice
containing ALocalDecl
elements as the
variables for the program points.
Constructor Summary | |
---|---|
LivenessAnalysis()
Creates a new LivenessAnalysis analysis. |
Method Summary | |
---|---|
boolean |
caseCAssignVarStmPoint(AAssignVarStm node,
CAssignVarStmPoint point)
Handle assignment statements. |
boolean |
caseCDeclStmPoint(ADeclStm node,
CDeclStmPoint point)
Handle declaration statements. |
boolean |
caseCIfThenElseStmPoint(AIfThenElseStm node,
CIfThenElseStmPoint point)
Handle if-then-else statements. |
boolean |
caseCIfThenStmPoint(AIfThenStm node,
CIfThenStmPoint point)
Handle if-then statements. |
boolean |
caseCOutputStmPoint(AOutputStm node,
COutputStmPoint point)
Handle output statements. |
boolean |
caseCReturnStmPoint(AReturnStm node,
CReturnStmPoint point)
Handle return statements. |
boolean |
caseCWhileStmPoint(AWhileStm node,
CWhileStmPoint point)
Handle while statements. |
String |
getVariableString(EqualitySet<ALocalDecl> variable)
Returns a textual representation of variable . |
Methods inherited from class tip.cfg.FlowAnalysis |
---|
defaultNode, end, getDependencySet, getLattice, getName, getVariable, getVariableStringForPoint, getVariableStringForPoint, setVariable, start |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LivenessAnalysis()
LivenessAnalysis
analysis.
Method Detail |
---|
public boolean caseCAssignVarStmPoint(AAssignVarStm node, CAssignVarStmPoint point)
caseCAssignVarStmPoint
in interface ICFGAnalysis
caseCAssignVarStmPoint
in class CFGAnalysisAdapter
node
- the current assignment statementpoint
- the current program point
true
if the variable for point
was changedpublic boolean caseCDeclStmPoint(ADeclStm node, CDeclStmPoint point)
caseCDeclStmPoint
in interface ICFGAnalysis
caseCDeclStmPoint
in class CFGAnalysisAdapter
node
- the current declaration statementpoint
- the current program point
true
if the variable for point
was changedpublic boolean caseCIfThenStmPoint(AIfThenStm node, CIfThenStmPoint point)
caseCIfThenStmPoint
in interface ICFGAnalysis
caseCIfThenStmPoint
in class CFGAnalysisAdapter
node
- the current if-then statementpoint
- the current program point
true
if the variable for point
was changedpublic boolean caseCIfThenElseStmPoint(AIfThenElseStm node, CIfThenElseStmPoint point)
caseCIfThenElseStmPoint
in interface ICFGAnalysis
caseCIfThenElseStmPoint
in class CFGAnalysisAdapter
node
- the current if-then-else statementpoint
- the current program point
true
if the variable for point
was changedpublic boolean caseCWhileStmPoint(AWhileStm node, CWhileStmPoint point)
caseCWhileStmPoint
in interface ICFGAnalysis
caseCWhileStmPoint
in class CFGAnalysisAdapter
node
- the current while statementpoint
- the current program point
true
if the variable for point
was changedpublic boolean caseCOutputStmPoint(AOutputStm node, COutputStmPoint point)
caseCOutputStmPoint
in interface ICFGAnalysis
caseCOutputStmPoint
in class CFGAnalysisAdapter
node
- the current output statementpoint
- the current program point
true
if the variable for point
was changedpublic boolean caseCReturnStmPoint(AReturnStm node, CReturnStmPoint point)
caseCReturnStmPoint
in interface ICFGAnalysis
caseCReturnStmPoint
in class CFGAnalysisAdapter
node
- the current return statementpoint
- the current program point
true
if the variable for point
was changedpublic String getVariableString(EqualitySet<ALocalDecl> variable)
variable
. NodeText
is
passed to EqualitySet.toString(Stringifier)
in order to let
EqualitySet
print each element as defined by NodeText
.
variable
- the variable for which a textual representation is returned
variable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |