Class ProcessGraphPredicates
java.lang.Object
de.aristaflow.adept2.model.processmodel.tools.ProcessGraphPredicates
Predicates for ADEPT2 graphs.
These are implementations of the methods described in Reic00. They make no use of "advanced" properties like branch IDs, split node IDs or corresponding block node IDs. Therefore they may be used to discover inconsistencies in the graph.
Since they anyways only use getPred/SuccByEdgeType, do not expect efficiency.
For an overview of the most predicates implemented here, cf. Reic00 page 333.
- Author:
- Kevin Goeser
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic int[]branchNodes(Template template, int nodeID1, int nodeID2) Returns the branch nodes of the given nodes as array of length 2.The direct predecessors of the given node following control edges only, as described in Reic00 page 333.c_pred_trans(Template template, int nodeID) Returns all direct and transitive predecessors, following control edges, cf.The direct successors of the given node following control edges only, as described in Reic00 page 333.c_succ_trans(Template template, int nodeID) Returns all direct and transitive predecessors, following control edges, cf.static intReturns the end loop node ID for a given start loop node ID.static intfindSplitNode(Template template, int nodeID) Finds the split node of the given node, cf.static booleanisBlockEnd(Template template, int nodeID) A block end node, as it is defined in Reic00.static booleanisBlockStart(Template template, int nodeID) A block start node, as it is defined in Reic00.static intFinds the join node of a given split node.Returns all nodes which are join nodes, as defined in Reic00 having an enter behaviour of ALL_OF_ALL or ONE_OF_ALL.Returns all nodes in the body of a loop block.The direct predecessors of the given node, as described in Reic00 page 333.pred_trans(Template template, int nodeID) Returns all direct and transitive predecessors, following control and sync edges, cf.static intFinds the split node of a given join node.splitNodes(Template template) Returns all nodes which are split nodes, as defined in Reic00 having an exit behaviour of ALL_OF_ALL or ONE_OF_ALL.The direct successors of the given node, as described in Reic00 page 333.succ_trans(Template template, int nodeID) Returns all direct and transitive successors, following control and sync edges, cf.
-
Field Details
-
logger
My logger.
-
-
Constructor Details
-
ProcessGraphPredicates
public ProcessGraphPredicates()
-
-
Method Details
-
c_succ_trans
Returns all direct and transitive predecessors, following control edges, cf. Reic00 page 333.This is c_succ*(n)
- Parameters:
template-nodeID-- Returns:
- All transitive successors following ET_CONTROL edges.
-
c_pred_trans
Returns all direct and transitive predecessors, following control edges, cf. Reic00 page 333.This is c_pred*(n)
- Parameters:
template-nodeID-- Returns:
- All transitive predecessors following ET_CONTROL edges.
-
succ_trans
Returns all direct and transitive successors, following control and sync edges, cf. Reic00 page 333.This is succ*(n)
- Parameters:
template-nodeID-- Returns:
- The set of all successors following control and sync edges.
-
pred_trans
Returns all direct and transitive predecessors, following control and sync edges, cf. Reic00 page 333.This is pred*(n)
- Parameters:
template-nodeID-- Returns:
- The set of all predecessors following control and sync edges.
-
c_succ
The direct successors of the given node following control edges only, as described in Reic00 page 333.- Parameters:
template-nodeID-- Returns:
- c_succ(n)
-
c_pred
The direct predecessors of the given node following control edges only, as described in Reic00 page 333.- Parameters:
template-nodeID-- Returns:
- c_pred(n)
-
succ
The direct successors of the given node, as described in Reic00 page 333.- Parameters:
template-nodeID-- Returns:
- succ(n)
-
pred
The direct predecessors of the given node, as described in Reic00 page 333.- Parameters:
template-nodeID-- Returns:
- pred(n)
-
split
Finds the split node of a given join node.- Parameters:
template-nodeID-- Returns:
- split(j)
-
join
Finds the join node of a given split node.- Parameters:
template-nodeID-- Returns:
- join(s)
-
findSplitNode
Finds the split node of the given node, cf.Template.getNodeSplitNodeID(int).- Parameters:
template-nodeID-- Returns:
- Finds the ID of the split node, cf.
Template.getNodeSplitNodeID(int).
-
isBlockEnd
A block end node, as it is defined in Reic00.- Parameters:
template-nodeID-- Returns:
- True, if the node is the end node of a block (the "right" one).
-
isBlockStart
A block start node, as it is defined in Reic00.- Parameters:
template-nodeID-- Returns:
- True, if the node is the start node of a block (the "left" one).
-
splitNodes
Returns all nodes which are split nodes, as defined in Reic00 having an exit behaviour of ALL_OF_ALL or ONE_OF_ALL.Cf. Reic00 page 75.
- Parameters:
template-- Returns:
- SplitNodes CFS: exit behaviour ALL_OF_ALL or ONE_OF_ALL
-
joinNodes
Returns all nodes which are join nodes, as defined in Reic00 having an enter behaviour of ALL_OF_ALL or ONE_OF_ALL.Cf. Reic00 page 75.
- Parameters:
template-- Returns:
- JoinNodes CFS: enter behaviour ALL_OF_ALL or ONE_OF_ALL.
-
branchNodes
Returns the branch nodes of the given nodes as array of length 2.Cf. Reic00 page 340.
- Parameters:
template-nodeID1-nodeID2-- Returns:
- The branch nodes of the given nodes, cf. Reic00 page 340.
-
loopBody
Returns all nodes in the body of a loop block.- Parameters:
template-startLoopID-- Returns:
- The body of a loop, given by the start loop ID
-
endloop
Returns the end loop node ID for a given start loop node ID.- Parameters:
template-startLoopID-- Returns:
- The ID of the end loop node, for the given start loop node.
-