|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectforge.transform.AbstractTransformer.TransformVisitor
protected abstract static class AbstractTransformer.TransformVisitor
A TransformVisitor
Constructor Summary | |
---|---|
protected |
AbstractTransformer.TransformVisitor(AbstractTransformer transformer,
ForgeCFG source)
Constructs a TransformVisitor belonging to the given transformer, |
protected |
AbstractTransformer.TransformVisitor(AbstractTransformer transformer,
ForgeCFG source,
ForgeCFG.Impl target)
|
Method Summary | |
---|---|
CFGStmt |
apply(CFGStmt stmt)
|
protected AssignStmt |
copy(AssignStmt stmt)
|
protected BranchStmt |
copy(BranchStmt stmt)
|
protected CallStmt |
copy(CallStmt stmt)
|
protected CreateStmt |
copy(CreateStmt stmt)
|
protected SpecStmt |
copy(SpecStmt stmt)
|
protected void |
replace(CFGStmt source,
CFGStmt target)
Sets the result of applying the visitor to the given source. |
protected InstanceDomain |
replaceDom(InstanceDomain dom)
|
protected ForgeExpression |
replaceExpr(ForgeExpression expr)
Called during the copy methods on any expression that appears. |
protected java.util.List<ForgeExpression> |
replaceExprs(java.util.List<ForgeExpression> exprs)
|
protected ForgeVariable |
replaceVar(ForgeVariable var)
|
protected edu.mit.csail.sdg.util.collections.UniqueList<ForgeVariable> |
replaceVars(java.util.Collection<ForgeVariable> vars)
|
ForgeCFG |
source()
|
ForgeCFG.Impl |
target()
|
protected UpdateStmt |
transform(AssignStmt stmt)
Transforms the statement to a new statement or null, but must also call replace to set the result of an application to this statement. |
protected CFGStmt |
transform(BranchStmt stmt)
Transforms the statement to a new statement or null, but must also call replace to set the result of an application to this statement. |
protected CFGStmt |
transform(CallStmt stmt)
Transforms the statement to a new statement or null, but must also call replace to set the result of an application to this statement. |
protected UpdateStmt |
transform(CreateStmt stmt)
Transforms the statement to a new statement or null, but must also call replace to set the result of an application to this statement. |
protected CFGStmt |
transform(ExitStmt stmt)
Transforms the statement to a new statement or null, but must also call replace to set the result of an application to this statement. |
protected UpdateStmt |
transform(SpecStmt stmt)
Transforms the statement to a new statement or null, but must also call replace to set the result of an application to this statement. |
void |
visit(AssignStmt stmt)
Visits an AssignStmt in the CFG. |
void |
visit(BranchStmt stmt)
Visits a BranchStmt in the CFG. |
void |
visit(CallStmt stmt)
Visits a CallStmt in the CFG. |
void |
visit(CreateStmt stmt)
Visits a CreateStmt in the CFG. |
void |
visit(ExitStmt stmt)
Visits a ExitStmt in the CFG. |
void |
visit(SpecStmt stmt)
Visits a SpecStmt in the CFG. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected AbstractTransformer.TransformVisitor(AbstractTransformer transformer, ForgeCFG source)
protected AbstractTransformer.TransformVisitor(AbstractTransformer transformer, ForgeCFG source, ForgeCFG.Impl target)
Method Detail |
---|
public final ForgeCFG source()
public final ForgeCFG.Impl target()
public final CFGStmt apply(CFGStmt stmt)
protected final void replace(CFGStmt source, CFGStmt target)
protected UpdateStmt transform(AssignStmt stmt)
This implementation copies the stmt, replaces the stmt for the copy, applies the visitor to the next stmt, sets the next stmt of the copy to the result of that application, and returns the copy.
protected UpdateStmt transform(CreateStmt stmt)
This implementation copies the stmt, replaces the stmt for the copy, applies the visitor to the next stmt, sets the next stmt of the copy to the result of that application, and returns the copy.
protected UpdateStmt transform(SpecStmt stmt)
This implementation copies the stmt, replaces the stmt for the copy, applies the visitor to the next stmt, sets the next stmt of the copy to the result of that application, and returns the copy.
protected CFGStmt transform(CallStmt stmt)
This implementation copies the stmt, replaces the stmt for the copy, applies the visitor to the next stmt, sets the next stmt of the copy to the result of that application, and returns the copy.
protected CFGStmt transform(BranchStmt stmt)
This implementation copies the stmt, replaces the stmt for the copy, applies the visitor to the then stmt, sets the then branch of the copy to the result of that application, applies the visitor to the else stmt, sets the else branch to the result of that application.
protected CFGStmt transform(ExitStmt stmt)
This implementation replaces the stmt for the exit stmt of the target cfg and returns the target's exit.
protected ForgeExpression replaceExpr(ForgeExpression expr)
protected final AssignStmt copy(AssignStmt stmt)
protected final CallStmt copy(CallStmt stmt)
protected final CreateStmt copy(CreateStmt stmt)
protected final BranchStmt copy(BranchStmt stmt)
protected final SpecStmt copy(SpecStmt stmt)
protected final ForgeVariable replaceVar(ForgeVariable var)
protected final InstanceDomain replaceDom(InstanceDomain dom)
protected final java.util.List<ForgeExpression> replaceExprs(java.util.List<ForgeExpression> exprs)
protected final edu.mit.csail.sdg.util.collections.UniqueList<ForgeVariable> replaceVars(java.util.Collection<ForgeVariable> vars)
public final void visit(AssignStmt stmt)
CFGVisitor
visit
in interface CFGVisitor
public final void visit(BranchStmt stmt)
CFGVisitor
visit
in interface CFGVisitor
public final void visit(CallStmt stmt)
CFGVisitor
visit
in interface CFGVisitor
public final void visit(CreateStmt stmt)
CFGVisitor
visit
in interface CFGVisitor
public final void visit(ExitStmt stmt)
CFGVisitor
visit
in interface CFGVisitor
public final void visit(SpecStmt stmt)
CFGVisitor
visit
in interface CFGVisitor
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |