Package com.ensoftcorp.open.pcg.common
Class PCGFactory
- java.lang.Object
-
- com.ensoftcorp.open.pcg.common.PCGFactory
-
public class PCGFactory extends java.lang.Object
A class that implements the event flow graph transformations to transform a given CFG into PCG- Author:
- Ahmed Tamrawi, Ben Holland, Ganesh Ram Santhanam, Jon Mathews, Nikhil Ranade
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static PCG
create(com.ensoftcorp.atlas.core.query.Q events)
Construct the PCGs corresponding to the given events with the containing functions control flow graphstatic PCG
create(com.ensoftcorp.atlas.core.query.Q events, boolean labelBackEdges)
Construct the PCGs corresponding to the given events with the containing functions control flow graphstatic PCG
create(com.ensoftcorp.atlas.core.query.Q cfg, com.ensoftcorp.atlas.core.query.Q events)
Construct the PCGs corresponding to the given events and control flow graphstatic PCG
create(com.ensoftcorp.atlas.core.query.Q cfg, com.ensoftcorp.atlas.core.query.Q events, boolean labelBackEdges)
Construct the PCGs corresponding to the given events and control flow graphstatic PCG
create(com.ensoftcorp.atlas.core.query.Q cfg, com.ensoftcorp.atlas.core.query.Q cfRoots, com.ensoftcorp.atlas.core.query.Q cfExits, com.ensoftcorp.atlas.core.query.Q events)
Construct the PCG for the given CFG, selected CFG roots, and the events of interest.static PCG
create(com.ensoftcorp.atlas.core.query.Q cfg, com.ensoftcorp.atlas.core.query.Q cfRoots, com.ensoftcorp.atlas.core.query.Q cfExits, com.ensoftcorp.atlas.core.query.Q events, boolean labelBackEdges)
Construct the PCG for the given CFG, selected CFG roots, and the events of interest.static PCG
create(com.ensoftcorp.open.commons.algorithms.UniqueEntryExitControlFlowGraph ucfg, com.ensoftcorp.atlas.core.query.Q events)
Constructs a PCG for the given unique entry/exit control flow graph and a set of eventsstatic PCG
create(com.ensoftcorp.open.commons.algorithms.UniqueEntryExitControlFlowGraph ucfg, com.ensoftcorp.atlas.core.query.Q events, boolean labelBackEdges)
Constructs a PCG for the given unique entry/exit control flow graph and a set of events.static com.ensoftcorp.atlas.core.db.set.AtlasSet<com.ensoftcorp.atlas.core.db.graph.Node>
createNodesOnly(com.ensoftcorp.atlas.core.query.Q events)
Constructs the PCG corresponding to the given events within the containing control flow graph and returns only the nodes in the resulting PCG.static com.ensoftcorp.atlas.core.db.set.AtlasSet<com.ensoftcorp.atlas.core.db.graph.Node>
createNodesOnly(com.ensoftcorp.atlas.core.query.Q events, com.ensoftcorp.atlas.core.query.Q cfg)
Construct the PCGs corresponding to the given events and control flow graph and returns only the nodes in the resulting PCG.static com.ensoftcorp.atlas.core.db.set.AtlasSet<com.ensoftcorp.atlas.core.db.graph.Node>
createNodesOnly(com.ensoftcorp.atlas.core.query.Q cfg, com.ensoftcorp.atlas.core.query.Q cfRoots, com.ensoftcorp.atlas.core.query.Q cfExits, com.ensoftcorp.atlas.core.query.Q events)
Construct the PCG for the given CFG, selected CFG roots, and the events of interest.static com.ensoftcorp.atlas.core.db.set.AtlasSet<com.ensoftcorp.atlas.core.db.graph.Node>
createNodesOnly(com.ensoftcorp.open.commons.algorithms.UniqueEntryExitControlFlowGraph ucfg, com.ensoftcorp.atlas.core.query.Q events)
Constructs a PCG for the given unique entry/exit control flow graph and a set of events and returns only the nodes in the resulting PCG.
-
-
-
Method Detail
-
createNodesOnly
public static com.ensoftcorp.atlas.core.db.set.AtlasSet<com.ensoftcorp.atlas.core.db.graph.Node> createNodesOnly(com.ensoftcorp.atlas.core.query.Q events)
Constructs the PCG corresponding to the given events within the containing control flow graph and returns only the nodes in the resulting PCG. This result is much cheaper to compute than PCGFactory.create alternatives which include PCG edges.- Parameters:
events
-- Returns:
-
createNodesOnly
public static com.ensoftcorp.atlas.core.db.set.AtlasSet<com.ensoftcorp.atlas.core.db.graph.Node> createNodesOnly(com.ensoftcorp.atlas.core.query.Q events, com.ensoftcorp.atlas.core.query.Q cfg)
Construct the PCGs corresponding to the given events and control flow graph and returns only the nodes in the resulting PCG. This result is much cheaper to compute than PCGFactory.create alternatives which include PCG edges.- Parameters:
function
-events
-- Returns:
-
createNodesOnly
public static com.ensoftcorp.atlas.core.db.set.AtlasSet<com.ensoftcorp.atlas.core.db.graph.Node> createNodesOnly(com.ensoftcorp.atlas.core.query.Q cfg, com.ensoftcorp.atlas.core.query.Q cfRoots, com.ensoftcorp.atlas.core.query.Q cfExits, com.ensoftcorp.atlas.core.query.Q events)
Construct the PCG for the given CFG, selected CFG roots, and the events of interest. Note that roots, exits, and events must all be contained within the given cfg and returns only the nodes in the resulting PCG. This result is much cheaper to compute than PCGFactory.create alternatives which include PCG edges.- Parameters:
cfg
-function
-events
-- Returns:
-
createNodesOnly
public static com.ensoftcorp.atlas.core.db.set.AtlasSet<com.ensoftcorp.atlas.core.db.graph.Node> createNodesOnly(com.ensoftcorp.open.commons.algorithms.UniqueEntryExitControlFlowGraph ucfg, com.ensoftcorp.atlas.core.query.Q events)
Constructs a PCG for the given unique entry/exit control flow graph and a set of events and returns only the nodes in the resulting PCG. This result is much cheaper to compute than PCGFactory.create alternatives which include PCG edges.- Parameters:
ucfg
-events
-- Returns:
-
create
public static PCG create(com.ensoftcorp.atlas.core.query.Q events)
Construct the PCGs corresponding to the given events with the containing functions control flow graph- Parameters:
function
-events
-- Returns:
- PCG
-
create
public static PCG create(com.ensoftcorp.atlas.core.query.Q events, boolean labelBackEdges)
Construct the PCGs corresponding to the given events with the containing functions control flow graph- Parameters:
events
-labelBackEdges
-- Returns:
-
create
public static PCG create(com.ensoftcorp.atlas.core.query.Q cfg, com.ensoftcorp.atlas.core.query.Q events)
Construct the PCGs corresponding to the given events and control flow graph- Parameters:
function
-events
-- Returns:
- PCG
-
create
public static PCG create(com.ensoftcorp.atlas.core.query.Q cfg, com.ensoftcorp.atlas.core.query.Q events, boolean labelBackEdges)
Construct the PCGs corresponding to the given events and control flow graph- Parameters:
cfg
-events
-labelBackEdges
-- Returns:
-
create
public static PCG create(com.ensoftcorp.atlas.core.query.Q cfg, com.ensoftcorp.atlas.core.query.Q cfRoots, com.ensoftcorp.atlas.core.query.Q cfExits, com.ensoftcorp.atlas.core.query.Q events)
Construct the PCG for the given CFG, selected CFG roots, and the events of interest. Note that roots, exits, and events must all be contained within the given cfg.- Parameters:
cfg
-function
-events
-- Returns:
- PCG
-
create
public static PCG create(com.ensoftcorp.atlas.core.query.Q cfg, com.ensoftcorp.atlas.core.query.Q cfRoots, com.ensoftcorp.atlas.core.query.Q cfExits, com.ensoftcorp.atlas.core.query.Q events, boolean labelBackEdges)
Construct the PCG for the given CFG, selected CFG roots, and the events of interest. Note that roots, exits, and events must all be contained within the given cfg.- Parameters:
cfg
-cfRoots
-cfExits
-events
-- Returns:
-
create
public static PCG create(com.ensoftcorp.open.commons.algorithms.UniqueEntryExitControlFlowGraph ucfg, com.ensoftcorp.atlas.core.query.Q events)
Constructs a PCG for the given unique entry/exit control flow graph and a set of events- Parameters:
ucfg
-events
-- Returns:
-
create
public static PCG create(com.ensoftcorp.open.commons.algorithms.UniqueEntryExitControlFlowGraph ucfg, com.ensoftcorp.atlas.core.query.Q events, boolean labelBackEdges)
Constructs a PCG for the given unique entry/exit control flow graph and a set of events.- Parameters:
ucfg
-events
-labelBackEdges
-- Returns:
-
-