Package com.ensoftcorp.open.pcg.common
Class ICFGPCG
- java.lang.Object
-
- com.ensoftcorp.open.pcg.common.ICFGPCG
-
public class ICFGPCG extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
ICFGPCG.ICFGPCGEdge
Defines tags and attributes for ICFGPCG edgesstatic interface
ICFGPCG.ICFGPCGNode
Defines tags and attributes for ICFGPCG nodes
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ICFGPCGInstances
A attribute used to serialize the ICFGPCG nodes and edges that identify a unique ICFGPCG instance serialized in the Atlas graph.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
delete(ICFGPCG icfgpcg)
Deletes the ICFGPCG instance from the Atlas graphstatic void
deleteAll()
Purges all records of PCGs from the Atlas graphboolean
equals(java.lang.Object obj)
ICFGPCG instances are equivalent if they have the same instance id (case-insensitive)com.ensoftcorp.atlas.core.db.graph.Node
getCapturedFunctions()
Returns the functions that are captured in this ICFGPCGlong
getCreationTime()
Gets the time (unix time) that the this ICFGPCG was createdcom.ensoftcorp.atlas.core.db.graph.Node
getEntryPointFunction()
Returns the entry point function of this ICFGPCGcom.ensoftcorp.atlas.core.query.Q
getEvents()
Returns the set of events used to contruct the PCGcom.ensoftcorp.atlas.core.query.Q
getExits()
Returns the exits of the control flow graph specified to create the PCGjava.lang.String
getGivenName()
Returns the name assigned to this ICFGPCGcom.ensoftcorp.atlas.core.query.Q
getICFG()
Returns the original interprocedural control flow graphcom.ensoftcorp.atlas.core.query.Q
getICFGPCG()
Returns the interprocedural projected control graphstatic java.lang.String
getICFGPCGInstanceID(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, com.ensoftcorp.atlas.core.db.set.AtlasSet<com.ensoftcorp.atlas.core.db.graph.Node> events)
Returns a hash of the sorted node/edge addresses used to construct the ICFGPCG, which can be used to identify a unique PCG instancestatic java.lang.String
getICFGPCGInstanceID(com.ensoftcorp.open.commons.algorithms.UniqueEntryExitInterproceduralControlFlowGraph uicfg, com.ensoftcorp.atlas.core.db.set.AtlasSet<com.ensoftcorp.atlas.core.db.graph.Node> events)
Returns a hash of the sorted node/edge addresses used to construct the PCG, which can be used to identify a unique PCG instance.java.lang.String
getInstanceID()
Returns the instance ID of this ICFGPCG which can be used to load the ICFGPCG laterlong
getLastAccessTime()
Gets the time (unix time) that the this ICFGPCG was last accessedcom.ensoftcorp.atlas.core.db.graph.Node
getMasterEntry()
Returns the master entry of the PCG and CFGcom.ensoftcorp.atlas.core.db.graph.Node
getMasterExit()
Returns the master exit of the PCG and CFGcom.ensoftcorp.atlas.core.query.Q
getRoots()
Returns the roots of the control flow graph specified to create the PCGint
hashCode()
ICFGPCG instances are equivalent if they have the same instance id (case-insensitive)static java.util.Set<ICFGPCG>
load(com.ensoftcorp.atlas.core.db.graph.Node masterEntry)
Loads a serialized ICFGPCG instance from the Atlas graph or null if the ICFGPCG instance does not existstatic ICFGPCG
load(com.ensoftcorp.atlas.core.db.graph.Node masterEntry, java.lang.String instanceID)
Loads a serialized ICFGPCG instance from the Atlas graph or null if the ICFGPCG instance does not existstatic ICFGPCG
load(com.ensoftcorp.open.commons.algorithms.UniqueEntryExitInterproceduralControlFlowGraph ucfg, com.ensoftcorp.atlas.core.db.set.AtlasSet<com.ensoftcorp.atlas.core.db.graph.Node> events)
Loads a serialized ICFGPCG instance from the Atlas graph or null if the ICFGPCG instance does not existstatic java.util.Set<ICFGPCG>
loadAll()
Loads all PCGs stored in the Atlas graphvoid
setGivenName(java.lang.String givenName)
Updates this ICFGPCG's given namevoid
updateLastAccessTime()
Updates the last access time to the current time
-
-
-
Field Detail
-
ICFGPCGInstances
public static final java.lang.String ICFGPCGInstances
A attribute used to serialize the ICFGPCG nodes and edges that identify a unique ICFGPCG instance serialized in the Atlas graph.- See Also:
- Constant Field Values
-
-
Method Detail
-
hashCode
public int hashCode()
ICFGPCG instances are equivalent if they have the same instance id (case-insensitive)- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
ICFGPCG instances are equivalent if they have the same instance id (case-insensitive)- Overrides:
equals
in classjava.lang.Object
-
getLastAccessTime
public long getLastAccessTime()
Gets the time (unix time) that the this ICFGPCG was last accessed- Returns:
-
updateLastAccessTime
public void updateLastAccessTime()
Updates the last access time to the current time
-
getCreationTime
public long getCreationTime()
Gets the time (unix time) that the this ICFGPCG was created- Returns:
-
setGivenName
public void setGivenName(java.lang.String givenName)
Updates this ICFGPCG's given name- Parameters:
givenName
-
-
getGivenName
public java.lang.String getGivenName()
Returns the name assigned to this ICFGPCG- Returns:
-
getCapturedFunctions
public com.ensoftcorp.atlas.core.db.graph.Node getCapturedFunctions()
Returns the functions that are captured in this ICFGPCG- Returns:
-
getEntryPointFunction
public com.ensoftcorp.atlas.core.db.graph.Node getEntryPointFunction()
Returns the entry point function of this ICFGPCG- Returns:
-
load
public static ICFGPCG load(com.ensoftcorp.open.commons.algorithms.UniqueEntryExitInterproceduralControlFlowGraph ucfg, com.ensoftcorp.atlas.core.db.set.AtlasSet<com.ensoftcorp.atlas.core.db.graph.Node> events)
Loads a serialized ICFGPCG instance from the Atlas graph or null if the ICFGPCG instance does not exist- Parameters:
instanceID
-- Returns:
-
load
public static ICFGPCG load(com.ensoftcorp.atlas.core.db.graph.Node masterEntry, java.lang.String instanceID)
Loads a serialized ICFGPCG instance from the Atlas graph or null if the ICFGPCG instance does not exist- Parameters:
instanceID
-- Returns:
-
load
public static java.util.Set<ICFGPCG> load(com.ensoftcorp.atlas.core.db.graph.Node masterEntry)
Loads a serialized ICFGPCG instance from the Atlas graph or null if the ICFGPCG instance does not exist- Parameters:
instanceID
-- Returns:
-
loadAll
public static java.util.Set<ICFGPCG> loadAll()
Loads all PCGs stored in the Atlas graph- Returns:
-
delete
public static void delete(ICFGPCG icfgpcg)
Deletes the ICFGPCG instance from the Atlas graph- Parameters:
instanceID
-
-
deleteAll
public static void deleteAll()
Purges all records of PCGs from the Atlas graph
-
getInstanceID
public java.lang.String getInstanceID()
Returns the instance ID of this ICFGPCG which can be used to load the ICFGPCG later- Returns:
-
getICFGPCG
public com.ensoftcorp.atlas.core.query.Q getICFGPCG()
Returns the interprocedural projected control graph- Returns:
-
getICFG
public com.ensoftcorp.atlas.core.query.Q getICFG()
Returns the original interprocedural control flow graph- Returns:
-
getMasterEntry
public com.ensoftcorp.atlas.core.db.graph.Node getMasterEntry()
Returns the master entry of the PCG and CFG- Returns:
-
getRoots
public com.ensoftcorp.atlas.core.query.Q getRoots()
Returns the roots of the control flow graph specified to create the PCG- Returns:
-
getExits
public com.ensoftcorp.atlas.core.query.Q getExits()
Returns the exits of the control flow graph specified to create the PCG- Returns:
-
getMasterExit
public com.ensoftcorp.atlas.core.db.graph.Node getMasterExit()
Returns the master exit of the PCG and CFG- Returns:
-
getEvents
public com.ensoftcorp.atlas.core.query.Q getEvents()
Returns the set of events used to contruct the PCG- Returns:
-
getICFGPCGInstanceID
public static java.lang.String getICFGPCGInstanceID(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, com.ensoftcorp.atlas.core.db.set.AtlasSet<com.ensoftcorp.atlas.core.db.graph.Node> events)
Returns a hash of the sorted node/edge addresses used to construct the ICFGPCG, which can be used to identify a unique PCG instance- Parameters:
icfgpcg
-- Returns:
-
getICFGPCGInstanceID
public static java.lang.String getICFGPCGInstanceID(com.ensoftcorp.open.commons.algorithms.UniqueEntryExitInterproceduralControlFlowGraph uicfg, com.ensoftcorp.atlas.core.db.set.AtlasSet<com.ensoftcorp.atlas.core.db.graph.Node> events)
Returns a hash of the sorted node/edge addresses used to construct the PCG, which can be used to identify a unique PCG instance. Equivalent to getICFGPCGInstanceID(uicfg.getICFG(), uicfg.getRoots(), uicfg.getExits(), events)- Parameters:
pcg
-- Returns:
-
-