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 interfaceICFGPCG.ICFGPCGEdgeDefines tags and attributes for ICFGPCG edgesstatic interfaceICFGPCG.ICFGPCGNodeDefines tags and attributes for ICFGPCG nodes
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringICFGPCGInstancesA 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 voiddelete(ICFGPCG icfgpcg)Deletes the ICFGPCG instance from the Atlas graphstatic voiddeleteAll()Purges all records of PCGs from the Atlas graphbooleanequals(java.lang.Object obj)ICFGPCG instances are equivalent if they have the same instance id (case-insensitive)com.ensoftcorp.atlas.core.db.graph.NodegetCapturedFunctions()Returns the functions that are captured in this ICFGPCGlonggetCreationTime()Gets the time (unix time) that the this ICFGPCG was createdcom.ensoftcorp.atlas.core.db.graph.NodegetEntryPointFunction()Returns the entry point function of this ICFGPCGcom.ensoftcorp.atlas.core.query.QgetEvents()Returns the set of events used to contruct the PCGcom.ensoftcorp.atlas.core.query.QgetExits()Returns the exits of the control flow graph specified to create the PCGjava.lang.StringgetGivenName()Returns the name assigned to this ICFGPCGcom.ensoftcorp.atlas.core.query.QgetICFG()Returns the original interprocedural control flow graphcom.ensoftcorp.atlas.core.query.QgetICFGPCG()Returns the interprocedural projected control graphstatic java.lang.StringgetICFGPCGInstanceID(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.StringgetICFGPCGInstanceID(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.StringgetInstanceID()Returns the instance ID of this ICFGPCG which can be used to load the ICFGPCG laterlonggetLastAccessTime()Gets the time (unix time) that the this ICFGPCG was last accessedcom.ensoftcorp.atlas.core.db.graph.NodegetMasterEntry()Returns the master entry of the PCG and CFGcom.ensoftcorp.atlas.core.db.graph.NodegetMasterExit()Returns the master exit of the PCG and CFGcom.ensoftcorp.atlas.core.query.QgetRoots()Returns the roots of the control flow graph specified to create the PCGinthashCode()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 ICFGPCGload(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 ICFGPCGload(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 graphvoidsetGivenName(java.lang.String givenName)Updates this ICFGPCG's given namevoidupdateLastAccessTime()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:
hashCodein 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:
equalsin 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:
-
-