java.lang.Object
org.bigraphs.framework.core.reactivesystem.AbstractTransitionSystem<B,BMatchResult<B>>
org.bigraphs.framework.core.reactivesystem.ReactionGraph<B>
- Type Parameters:
B- the type of the bigraph of the states and transition relations of the transition system
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ReactionGraphCollapsed,ReactionGraphExtended
public class ReactionGraph<B extends Bigraph<? extends Signature<?>>>
extends AbstractTransitionSystem<B,BMatchResult<B>>
implements Serializable
This data structure represents a "reaction graph", analogous to a labeled transition system.
It extends the abstract base class
AbstractTransitionSystem.
Its states are bigraphs, and its transition relations are reaction rules of the same bigraph class type.
A reaction graph is not to be confused with the notion of minimal LTSs in bigraphs. This reaction graph has no minimal context labels as transitions; it has reactions as labels.
The canonical string encoding of a bigraph is also stored here.
- Author:
- Dominik Grzelak
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classstatic classstatic classstatic classNested classes/interfaces inherited from class org.bigraphs.framework.core.reactivesystem.AbstractTransitionSystem
AbstractTransitionSystem.Transition -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.jgrapht.Graph<ReactionGraph.LabeledNode, ReactionGraph.LabeledEdge> Fields inherited from class org.bigraphs.framework.core.reactivesystem.AbstractTransitionSystem
aSup, canonicalNodeLabel, initialStateLabels, stateMap, transitionMap -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddEdge(B source, String sourceLbl, B target, String targetLbl, BMatchResult<B> reaction, String reactionLbl) addPredicateMatchToNode(ReactionGraph.LabeledNode node, ReactiveSystemPredicate<B> predicates) protected ReactionGraph.CollapsedLabeledNodecollapseNodes(String newLabel, ReactionGraph.LabeledNode... labeledNodes) protected ReactionGraph.LabeledNodecreateNode(String label) org.jgrapht.Graph<ReactionGraph.LabeledNode, ReactionGraph.LabeledEdge> getGraph()Get the data structure of the reaction graphGet an object containing some informative statistics of the reaction graphgetLabeledNodeByCanonicalForm(String canonicalForm) booleanisEmpty()voidreset()setCanonicalNodeLabel(boolean canonicalNodeLabel) Methods inherited from class org.bigraphs.framework.core.reactivesystem.AbstractTransitionSystem
addInitialStateLabels, addState, addTransition, containsBigraph, createSupplier, getInitialStateLabels, getLabelByState, getStateByLabel, getStateMap, getStates, getStatesWithoutFinalStates, getTransitionMap, getTransitionRelations, getTransitions, removeState
-
Field Details
-
graph
-
-
Constructor Details
-
ReactionGraph
public ReactionGraph()
-
-
Method Details
-
createNode
-
collapseNodes
protected ReactionGraph.CollapsedLabeledNode collapseNodes(String newLabel, ReactionGraph.LabeledNode... labeledNodes) -
addEdge
-
getLabeledNodeByCanonicalForm
-
setCanonicalNodeLabel
-
getPredicateMatches
-
reset
public void reset() -
addPredicateMatchToNode
public ReactionGraph<B> addPredicateMatchToNode(ReactionGraph.LabeledNode node, ReactiveSystemPredicate<B> predicates) -
getGraph
Get the data structure of the reaction graph- Returns:
- the reaction graph
-
getGraphStats
Get an object containing some informative statistics of the reaction graph- Returns:
- some statistics about the reaction graph object
-
isEmpty
public boolean isEmpty()
-