|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ICFG
ICFG
defines the interface for a control flow graph.
Method Summary | ||
---|---|---|
void |
add(IProgramPoint point)
Adds the IProgramPoint point to the set
of program points associated with this ICFG . |
|
void |
apply(Analysis analysis)
Applies analysis to all nodes associated with program points
in this control flow graph. |
|
|
apply(Question<Q> caller,
Q question)
Applies the Question caller and question to all nodes
associated with program points in this control flow graph. |
|
void |
clean()
Cleans the control flow graph by removing all predecessors and successors of the program points in the program point set of this control flow graph which are not in the program point set of this control flow graph. |
|
ICFG |
clone()
Returns a deep clone of the ICFG with respect to program points, i.e. program points are cloned but the associated AST nodes are not. |
|
boolean |
containsProgramPoint(IProgramPoint point)
Returns true if this ICFG contains the IProgramPoint point . |
|
IProgramPoint |
getEntry()
Returns the entry point of the control flow graph. |
|
IProgramPoint |
getExit()
Returns the exit point of the control flow graph. |
|
String |
getName()
Returns the name of the control flow graph |
|
|
getNodeDescendants(Class<T> classType)
Returns a collection of descendants to the nodes associated to the program points in this control flow graph. |
|
|
getNodeDescendants(Collection<T> collection,
NodeFilter<T> filter)
Adds children to the nodes associated to the program points in this control flow graph to collection . |
|
|
getNodeDescendants(NodeFilter<T> filter)
Returns a collection of descendants to the nodes associated to the program points in this control flow graph. |
|
Collection<IProgramPoint> |
getProgramPoints()
Returns the collection of program points in the control flow graph. |
|
void |
insertAfter(IProgramPoint point,
IProgramPoint newPoint)
Inserts newPoint in the control flow graph after point . |
|
void |
insertBefore(IProgramPoint point,
IProgramPoint newPoint)
Inserts newPoint in the control flow graph before point . |
|
void |
prefixCFG(ICFG cfg)
Prefixes cfg in this control flow graph. |
|
void |
remove(IProgramPoint point)
Removes the IProgramPoint point from the set
of program points associated with this ICFG . |
|
void |
removePoint(IProgramPoint point)
Removes point from this control flow graph, updating the
predecessors and successors of point to point to eachother. |
|
void |
replaceByCFG(IProgramPoint point,
ICFG cfg)
Replaces point with cfg in this control flow graph. |
|
void |
replacePoint(IProgramPoint oldPoint,
IProgramPoint newPoint)
Replaces oldPoint with newPoint in this control flow graph. |
|
void |
suffixCFG(ICFG cfg)
Suffixes cfg in this control flow graph. |
Method Detail |
---|
String getName()
void add(IProgramPoint point)
IProgramPoint
point
to the set
of program points associated with this ICFG
.
Predecessors and successors are not updated.
point
- the IProgramPoint
to be added to this ICFG
void remove(IProgramPoint point)
IProgramPoint
point
from the set
of program points associated with this ICFG
.
Predecessors and successors are not updated.
point
- the IProgramPoint
to be removed from this ICFG
Collection<IProgramPoint> getProgramPoints()
boolean containsProgramPoint(IProgramPoint point)
true
if this ICFG
contains the IProgramPoint
point
.
point
- the IProgramPoint
in question
true
if this ICFG
contains the IProgramPoint
point
IProgramPoint getEntry()
IProgramPoint getExit()
void replaceByCFG(IProgramPoint point, ICFG cfg)
point
with cfg
in this control flow graph.
That is, point
is removed from this control flow graph,
all predecessors of point
are set to have all successors
of the entry point in cfg
as their successor instead of
point
and all successors of point
are set to have
all predecessors of the exit point in cfg
as their predecessor
instead of point
. All program point in cfg
, except the
entry and exit points, are added to this control flow graph.
point
- the replaced pointcfg
- the replacing control flow graphvoid prefixCFG(ICFG cfg)
cfg
in this control flow graph. That is,
all successors of the entry point in cfg
are set to be
successors of the entry point in this control flow graph, and
all successors of the entry point in this control flow graph
are set as successors of the exit point in cfg
.
All program point in cfg
, except the
entry and exit points, are added to this control flow graph.
cfg
- the prefixed cfgvoid suffixCFG(ICFG cfg)
cfg
in this control flow graph. That is,
all predecessors of the exit point in cfg
are set to be
predecessors of the exit point in this control flow graph, and
all predecessors of the exit point in this control flow graph
are set as predecessors of the entry point in cfg
.
All program point in cfg
, except the
entry and exit points, are added to this control flow graph.
cfg
- the suffixed cfgvoid replacePoint(IProgramPoint oldPoint, IProgramPoint newPoint)
oldPoint
with newPoint
in this control flow graph.
Successors and predecessors are transferred from oldPoint
to
newPoint
. oldPoint
is removed from this control flow graph
newPoint
is added to this control flow graph.
oldPoint
- the replaced pointnewPoint
- the replacing pointvoid removePoint(IProgramPoint point)
point
from this control flow graph, updating the
predecessors and successors of point
to point to eachother.
point
- the removed pointvoid insertAfter(IProgramPoint point, IProgramPoint newPoint)
newPoint
in the control flow graph after point
.
That is, all successors of point
are set as successors of
newPoint
and newPoint
is set as the sole successor
of point
point
- the point in this control flow graph after which newPoint
is insertednewPoint
- the inserted pointvoid insertBefore(IProgramPoint point, IProgramPoint newPoint)
newPoint
in the control flow graph before point
.
That is, all predecessors of point
are set as predecessors of
newPoint
and newPoint
is set as the sole predecessor
of point
point
- the point in this control flow graph before which newPoint
is insertednewPoint
- the inserted pointvoid clean()
replaceByCFG(IProgramPoint,ICFG)
,
prefixCFG(ICFG)
, suffixCFG(ICFG)
,
replacePoint(IProgramPoint,IProgramPoint)
,
insertAfter(IProgramPoint,IProgramPoint)
, and
insertBefore(IProgramPoint,IProgramPoint)
.
<T extends Node> Collection<T> getNodeDescendants(Class<T> classType)
classType
are returned.
classType
- the supertype of returned descendants
<T extends Node> Collection<T> getNodeDescendants(NodeFilter<T> filter)
NodeFilter
filter
are returned.
filter
- the NodeFilter
used for filtering nodes
<T extends Node> void getNodeDescendants(Collection<T> collection, NodeFilter<T> filter)
collection
.
Only descendants that are accepted by the NodeFilter
filter
are returned.
collection
- the collection to which the descendants are addedfilter
- the NodeFilter
used for filtering nodesvoid apply(Analysis analysis)
analysis
to all nodes associated with program points
in this control flow graph.
analysis
- the Analysis
applied to the associated nodes<Q> void apply(Question<Q> caller, Q question)
Question
caller
and question
to all nodes
associated with program points in this control flow graph.
caller
- the Question
applied to the associated nodesquestion
- the provided questionICFG clone()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |