Class UniqueEntryExitInterproceduralControlFlowGraph
- java.lang.Object
-
- com.ensoftcorp.open.commons.algorithms.UniqueEntryExitInterproceduralControlFlowGraph
-
- All Implemented Interfaces:
UniqueEntryExitGraph
public class UniqueEntryExitInterproceduralControlFlowGraph extends java.lang.Object implements UniqueEntryExitGraph
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringUniqueEntryExitICFG_EdgeTag applied to the newly created edges between the master entry and the cfg roots and the cfg exits and the master exitstatic java.lang.StringUniqueEntryExitICFG_Master_EntryTag applied to the newly created master entry nodestatic java.lang.StringUniqueEntryExitICFG_Master_Entry_NameThe name attribute applied to the EventFlow_Master_Entry of the PCGstatic java.lang.StringUniqueEntryExitICFG_Master_ExitTag applied to the newly create master exit nodestatic java.lang.StringUniqueEntryExitICFG_Master_Exit_NameThe name attribute applied to the EventFlow_Master_Exit of the PCG
-
Constructor Summary
Constructors Constructor Description UniqueEntryExitInterproceduralControlFlowGraph(com.ensoftcorp.atlas.core.db.graph.Graph icfg)Constructs a new unique entry/exit interprocedural control flow graph.UniqueEntryExitInterproceduralControlFlowGraph(com.ensoftcorp.atlas.core.db.graph.Graph icfg, boolean addContains)Constructs a new unique entry/exit interprocedural control flow graph.UniqueEntryExitInterproceduralControlFlowGraph(com.ensoftcorp.atlas.core.db.graph.Graph icfg, com.ensoftcorp.atlas.core.db.set.AtlasSet<com.ensoftcorp.atlas.core.db.graph.Node> roots, boolean relaxNonEmptyRootsRequirement, com.ensoftcorp.atlas.core.db.set.AtlasSet<com.ensoftcorp.atlas.core.db.graph.Node> exits, boolean relaxNonEmptyExitsRequirement, boolean addContains)Constructs a new unique entry/exit interprocedural control flow graph with the specified entry and exit points.UniqueEntryExitInterproceduralControlFlowGraph(com.ensoftcorp.atlas.core.db.graph.Graph icfg, com.ensoftcorp.atlas.core.db.set.AtlasSet<com.ensoftcorp.atlas.core.db.graph.Node> roots, com.ensoftcorp.atlas.core.db.set.AtlasSet<com.ensoftcorp.atlas.core.db.graph.Node> exits)Constructs a new unique entry/exit interprocedural control flow graph with the specified entry and exit points.UniqueEntryExitInterproceduralControlFlowGraph(com.ensoftcorp.atlas.core.db.graph.Graph icfg, com.ensoftcorp.atlas.core.db.set.AtlasSet<com.ensoftcorp.atlas.core.db.graph.Node> roots, com.ensoftcorp.atlas.core.db.set.AtlasSet<com.ensoftcorp.atlas.core.db.graph.Node> exits, boolean addContains)Constructs a new unique entry/exit interprocedural control flow graph with the specified entry and exit points.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.ensoftcorp.atlas.core.db.set.AtlasSet<com.ensoftcorp.atlas.core.db.graph.Edge>edges()The set of edges in the graphcom.ensoftcorp.atlas.core.db.set.AtlasSet<com.ensoftcorp.atlas.core.db.graph.Node>getCapturedFunctions()com.ensoftcorp.atlas.core.db.graph.NodegetEntryFunction()com.ensoftcorp.atlas.core.db.graph.NodegetEntryNode()Returns the master entry nodecom.ensoftcorp.atlas.core.db.graph.NodegetExitNode()Returns the master exit nodecom.ensoftcorp.atlas.core.db.set.AtlasSet<com.ensoftcorp.atlas.core.db.graph.Node>getExits()com.ensoftcorp.atlas.core.db.graph.GraphgetGraph()com.ensoftcorp.atlas.core.db.graph.GraphgetICFG()com.ensoftcorp.atlas.core.db.set.AtlasSet<com.ensoftcorp.atlas.core.db.graph.Node>getPredecessors(com.ensoftcorp.atlas.core.db.graph.Node node)Gets the predecessors of a given nodecom.ensoftcorp.atlas.core.db.set.AtlasSet<com.ensoftcorp.atlas.core.db.graph.Node>getRoots()com.ensoftcorp.atlas.core.db.set.AtlasSet<com.ensoftcorp.atlas.core.db.graph.Node>getSuccessors(com.ensoftcorp.atlas.core.db.graph.Node node)Gets the successors of a given nodecom.ensoftcorp.atlas.core.db.set.AtlasSet<com.ensoftcorp.atlas.core.db.graph.Node>nodes()The set of nodes in the graph
-
-
-
Field Detail
-
UniqueEntryExitICFG_Master_Entry
public static final java.lang.String UniqueEntryExitICFG_Master_Entry
Tag applied to the newly created master entry node- See Also:
- Constant Field Values
-
UniqueEntryExitICFG_Master_Exit
public static final java.lang.String UniqueEntryExitICFG_Master_Exit
Tag applied to the newly create master exit node- See Also:
- Constant Field Values
-
UniqueEntryExitICFG_Master_Entry_Name
public static final java.lang.String UniqueEntryExitICFG_Master_Entry_Name
The name attribute applied to the EventFlow_Master_Entry of the PCG- See Also:
- Constant Field Values
-
UniqueEntryExitICFG_Master_Exit_Name
public static final java.lang.String UniqueEntryExitICFG_Master_Exit_Name
The name attribute applied to the EventFlow_Master_Exit of the PCG- See Also:
- Constant Field Values
-
UniqueEntryExitICFG_Edge
public static final java.lang.String UniqueEntryExitICFG_Edge
Tag applied to the newly created edges between the master entry and the cfg roots and the cfg exits and the master exit- See Also:
- Constant Field Values
-
-
Constructor Detail
-
UniqueEntryExitInterproceduralControlFlowGraph
public UniqueEntryExitInterproceduralControlFlowGraph(com.ensoftcorp.atlas.core.db.graph.Graph icfg)
Constructs a new unique entry/exit interprocedural control flow graph.- Parameters:
icfg- a control flow graph
-
UniqueEntryExitInterproceduralControlFlowGraph
public UniqueEntryExitInterproceduralControlFlowGraph(com.ensoftcorp.atlas.core.db.graph.Graph icfg, boolean addContains)Constructs a new unique entry/exit interprocedural control flow graph. Optionally, containment edges can be added for display purposes- Parameters:
icfg-addContains-
-
UniqueEntryExitInterproceduralControlFlowGraph
public UniqueEntryExitInterproceduralControlFlowGraph(com.ensoftcorp.atlas.core.db.graph.Graph icfg, com.ensoftcorp.atlas.core.db.set.AtlasSet<com.ensoftcorp.atlas.core.db.graph.Node> roots, com.ensoftcorp.atlas.core.db.set.AtlasSet<com.ensoftcorp.atlas.core.db.graph.Node> exits)Constructs a new unique entry/exit interprocedural control flow graph with the specified entry and exit points.- Parameters:
icfg- an interprocedural control flow graphroots-exits-
-
UniqueEntryExitInterproceduralControlFlowGraph
public UniqueEntryExitInterproceduralControlFlowGraph(com.ensoftcorp.atlas.core.db.graph.Graph icfg, com.ensoftcorp.atlas.core.db.set.AtlasSet<com.ensoftcorp.atlas.core.db.graph.Node> roots, com.ensoftcorp.atlas.core.db.set.AtlasSet<com.ensoftcorp.atlas.core.db.graph.Node> exits, boolean addContains)Constructs a new unique entry/exit interprocedural control flow graph with the specified entry and exit points.- Parameters:
icfg- a control flow graphroots-exits-addContains-
-
UniqueEntryExitInterproceduralControlFlowGraph
public UniqueEntryExitInterproceduralControlFlowGraph(com.ensoftcorp.atlas.core.db.graph.Graph icfg, com.ensoftcorp.atlas.core.db.set.AtlasSet<com.ensoftcorp.atlas.core.db.graph.Node> roots, boolean relaxNonEmptyRootsRequirement, com.ensoftcorp.atlas.core.db.set.AtlasSet<com.ensoftcorp.atlas.core.db.graph.Node> exits, boolean relaxNonEmptyExitsRequirement, boolean addContains)Constructs a new unique entry/exit interprocedural control flow graph with the specified entry and exit points.- Parameters:
icfg-roots-relaxNonEmptyRootsRequirement- Relaxes the requirement that roots must be a non-empty setexits-relaxNonEmptyExitsRequirement- Relaxes the requirement that exist must be a non-empty setaddContains-
-
-
Method Detail
-
getICFG
public com.ensoftcorp.atlas.core.db.graph.Graph getICFG()
-
getRoots
public com.ensoftcorp.atlas.core.db.set.AtlasSet<com.ensoftcorp.atlas.core.db.graph.Node> getRoots()
-
getExits
public com.ensoftcorp.atlas.core.db.set.AtlasSet<com.ensoftcorp.atlas.core.db.graph.Node> getExits()
-
getEntryFunction
public com.ensoftcorp.atlas.core.db.graph.Node getEntryFunction()
-
getCapturedFunctions
public com.ensoftcorp.atlas.core.db.set.AtlasSet<com.ensoftcorp.atlas.core.db.graph.Node> getCapturedFunctions()
-
getGraph
public com.ensoftcorp.atlas.core.db.graph.Graph getGraph()
-
getPredecessors
public com.ensoftcorp.atlas.core.db.set.AtlasSet<com.ensoftcorp.atlas.core.db.graph.Node> getPredecessors(com.ensoftcorp.atlas.core.db.graph.Node node)
Gets the predecessors of a given node- Specified by:
getPredecessorsin interfaceUniqueEntryExitGraph- Parameters:
node-- Returns:
- Predecessors of node
-
getSuccessors
public com.ensoftcorp.atlas.core.db.set.AtlasSet<com.ensoftcorp.atlas.core.db.graph.Node> getSuccessors(com.ensoftcorp.atlas.core.db.graph.Node node)
Gets the successors of a given node- Specified by:
getSuccessorsin interfaceUniqueEntryExitGraph- Parameters:
node-- Returns:
- Successors of node
-
getEntryNode
public com.ensoftcorp.atlas.core.db.graph.Node getEntryNode()
Description copied from interface:UniqueEntryExitGraphReturns the master entry node- Specified by:
getEntryNodein interfaceUniqueEntryExitGraph
-
getExitNode
public com.ensoftcorp.atlas.core.db.graph.Node getExitNode()
Description copied from interface:UniqueEntryExitGraphReturns the master exit node- Specified by:
getExitNodein interfaceUniqueEntryExitGraph
-
nodes
public com.ensoftcorp.atlas.core.db.set.AtlasSet<com.ensoftcorp.atlas.core.db.graph.Node> nodes()
Description copied from interface:UniqueEntryExitGraphThe set of nodes in the graph- Specified by:
nodesin interfaceUniqueEntryExitGraph- Returns:
-
edges
public com.ensoftcorp.atlas.core.db.set.AtlasSet<com.ensoftcorp.atlas.core.db.graph.Edge> edges()
Description copied from interface:UniqueEntryExitGraphThe set of edges in the graph- Specified by:
edgesin interfaceUniqueEntryExitGraph- Returns:
-
-