Class AbstractTransitionSystem<B,T>
java.lang.Object
org.bigraphs.framework.core.reactivesystem.AbstractTransitionSystem<B,T>
- Type Parameters:
B
- the bigraph type of the statesT
- the type for the data attached to the transition relations of typeAbstractTransitionSystem<B,
T>.Transition
- Direct Known Subclasses:
ReactionGraph
Abstract base class representing the minimal data structure for all concrete transition system implementations.
This class generalizes all possible variations of transition systems.
- Author:
- Dominik Grzelak
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclass
Inner class representing a transition relation. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddInitialStateLabels
(String... labels) void
void
addTransition
(B source, B target, String reactionLbl, T transitionRelationObject) boolean
containsBigraph
(String label) Check if a bigraph is present in the graph as a state.getLabelByState
(B state) This doesnt work with source/target states coming from Transition.getStateByLabel
(String stateLabel) Get the actual bigraph by querying the string label of a state.Get the actual redex of a rule by querying the string label of a transition.getTransitions
(B state) This methods returns all transitions from a state Thus, it gets all possible next states (represented asAbstractTransitionSystem<B,
) that can be reached from the given state.T>.Transition void
removeState
(B state)
-
Field Details
-
initialStateLabels
-
stateMap
-
transitionMap
-
canonicalNodeLabel
protected boolean canonicalNodeLabel -
aSup
-
-
Constructor Details
-
AbstractTransitionSystem
public AbstractTransitionSystem()
-
-
Method Details
-
createSupplier
-
addState
-
getInitialStateLabels
-
addInitialStateLabels
-
getTransitionMap
Get the actual redex of a rule by querying the string label of a transition.Note that the label could either be an arbitrary string (user-defined) or the canonical form of the bigraph (redex).
- Returns:
- a map where transition labels are mapped to bigraphs (redexes)
-
getTransitionRelations
-
getStateMap
Get the actual bigraph by querying the string label of a state.Note that the label could either be an arbitrary string (user-defined) or the canonical form of the bigraph.
- Returns:
- a map where state labels are mapped to bigraphs
-
getStates
-
getStatesWithoutFinalStates
-
containsBigraph
Check if a bigraph is present in the graph as a state. The bigraph is identified by its label.The label of a bigraph must be unique.
- Parameters:
label
- The unique label of a bigraph to find in the reaction graph.- Returns:
true
, if the bigraph is contained in the graph, otherwisefalse
-
getTransitions
This methods returns all transitions from a state Thus, it gets all possible next states (represented asAbstractTransitionSystem<B,
) that can be reached from the given state. That is, only out-going transition relations are considered.T>.Transition - Parameters:
state
- the state in question to get all successor states.- Returns:
- possible out-going transitions reachable from a given state
-
getLabelByState
This doesnt work with source/target states coming from Transition. Its better to compute the canonical string encoding directly to get the label.- Parameters:
state
-- Returns:
-
getStateByLabel
-
addTransition
-
removeState
-