Interface ReactionRule<B extends Bigraph<? extends Signature<?>>>

Type Parameters:
B - type of the bigraph
All Known Implementing Classes:
AbstractReactionRule, AbstractReactionRule.ReactiveSystemBoundReactionRule, ConditionalParametricRuleDecorator, GroundReactionRule, ParametricReactionRule

public interface ReactionRule<B extends Bigraph<? extends Signature<?>>>
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 Type
    Method
    Description
    Return the instantiation map of the parametric reaction rule
    Return the reactum of the reaction rule
    Return the redex of the reaction rule
    Returns 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 names
    default boolean
    Checks whether the parametric redex is simple.
    boolean
    A flag that indicates whether the rule can be also executed in reverse.
  • 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, otherwise false
    • 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, otherwise false
    • 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, otherwise false
    • 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