- Type Parameters:
B
- type of the bigraph
- All Superinterfaces:
HasLabel
,HasPriority
- All Known Implementing Classes:
AbstractReactionRule
,AbstractReactionRule.ReactiveSystemBoundReactionRule
,ConditionalParametricRuleDecorator
,GroundReactionRule
,ParametricReactionRule
public interface ReactionRule<B extends Bigraph<? extends Signature<?>>>
extends HasLabel, HasPriority
Common interface for reaction rules.
A reaction rule is a data structure containing the redex, reactum and an instantiation map.
- Author:
- Dominik Grzelak
-
Method Summary
Modifier and TypeMethodDescriptionReturn the instantiation map of the parametric reaction ruleReturn the reactum of the reaction rulegetRedex()
Return the redex of the reaction ruleReturns the tracking map if one was specified for the rule.default boolean
A rule is parametric if its redex contains sites.default boolean
Checks if a parametric reaction rule is well-defined subject to the constraints: Redex and Reactum are lean (=no idle edges) R has no idle roots R has no idle namesdefault boolean
Checks whether the parametric redex is simple.boolean
A flag that indicates whether the rule can be also executed in reverse.Methods inherited from interface org.bigraphs.framework.core.reactivesystem.HasLabel
getLabel, isDefined
Methods inherited from interface org.bigraphs.framework.core.reactivesystem.HasPriority
getPriority
-
Method Details
-
getRedex
B getRedex()Return the redex of the reaction rule- Returns:
- the redex of the reaction rule
-
getReactum
B getReactum()Return the reactum of the reaction rule- Returns:
- the reactum of the reaction rule
-
isRedexSimple
default boolean isRedexSimple()Checks whether the parametric redex is simple.- Returns:
true
if the redex of the reaction rule is simple, otherwisefalse
-
isProperParametricRule
default boolean isProperParametricRule()Checks if a parametric reaction rule is well-defined subject to the constraints:- Redex and Reactum are lean (=no idle edges)
- R has no idle roots
- R has no idle names
- Returns:
true
if the parametric reaction rule is well-defined, otherwisefalse
-
isParametricRule
default boolean isParametricRule()A rule is parametric if its redex contains sites.- Returns:
true
, if the rule is a parametric reaction rule.
-
isReversible
boolean isReversible()A flag that indicates whether the rule can be also executed in reverse. For a rule R -> R' it means that R' -> R can also be used.This flag is usually evaluated in a reactive system class.
- Returns:
true
, if the rule can also be used reversely, otherwisefalse
-
getInstantationMap
InstantiationMap getInstantationMap()Return the instantiation map of the parametric reaction rule- Returns:
- the instantiation map of the parametric reaction rule
-
getTrackingMap
TrackingMap getTrackingMap()Returns the tracking map if one was specified for the rule. A tracking map helps to trace node and link identities through reactions.- Returns:
- the tracking map of the rule
-