Class RuleTransformer

java.lang.Object
org.bigraphs.grgen.converter.TransformerSupport
org.bigraphs.grgen.converter.RuleTransformer
All Implemented Interfaces:
BaseTransformer<org.bigraphs.framework.core.reactivesystem.ReactionRule<?>>
Direct Known Subclasses:
PureGroundRuleTransformer, PureParametrizedRuleTransformer

public abstract class RuleTransformer extends TransformerSupport implements BaseTransformer<org.bigraphs.framework.core.reactivesystem.ReactionRule<?>>
Author:
Dominik Grzelak
  • Field Details

    • trackingMap

      protected org.bigraphs.framework.core.reactivesystem.TrackingMap trackingMap
    • printNACPattern

      boolean printNACPattern
    • TEMPLATE_NAC_NO_SITE_PATTERN

      public final String TEMPLATE_NAC_NO_SITE_PATTERN
      A GrGen.NET pattern specifying a NAC (for atomic controls, or nodes in the rule not containing a site).
      See Also:
    • TEMPLATE_COPY_SITE_CONTENTS

      public final String TEMPLATE_COPY_SITE_CONTENTS
      A generic piece of GrGen.NET code used within a rule specification. It is used to handle the copies of graph substructures determined by the bigraphical sites of a rule.
      See Also:
  • Constructor Details

    • RuleTransformer

      public RuleTransformer()
  • Method Details

    • withMap

      public BaseTransformer<org.bigraphs.framework.core.reactivesystem.ReactionRule<?>> withMap(org.bigraphs.framework.core.reactivesystem.TrackingMap trackingMap)
      Supply a tracking map for the current rule instance.
      Parameters:
      trackingMap - a tracking map.
      Returns:
      this instance
    • isPrintNACPattern

      public boolean isPrintNACPattern()
    • printNACPattern

      public RuleTransformer printNACPattern(boolean printNACPattern)
      Determine, whether to generate also the GrGen.NET pattern (TEMPLATE_NAC_NO_SITE_PATTERN) for each rule. Useful, when multiple bigraphical rules have to be translated. Then, the pattern (TEMPLATE_NAC_NO_SITE_PATTERN) can be omitted for all rules but one.
      Parameters:
      printNACPattern - true or false, whether to output it or not.
      Returns:
      this instance
    • createMap

      public static org.bigraphs.framework.core.reactivesystem.TrackingMap createMap()
    • toString

      public abstract String toString(org.bigraphs.framework.core.reactivesystem.ReactionRule<?> element)
      Description copied from interface: BaseTransformer
      Redirects the result of an encoding to a string
      Specified by:
      toString in interface BaseTransformer<org.bigraphs.framework.core.reactivesystem.ReactionRule<?>>
      Parameters:
      element - the bigraph or signature being encoded
    • trackIdentityOf

      public String trackIdentityOf(String nodeId)