Class ReactiveSystemPredicate<B extends Bigraph<? extends Signature<?>>>

java.lang.Object
org.bigraphs.framework.core.reactivesystem.ReactiveSystemPredicate<B>
All Implemented Interfaces:
Predicate<B>, HasLabel
Direct Known Subclasses:
AndPredicate, BigraphIsoPredicate, OrPredicate, SubBigraphMatchPredicate

public abstract class ReactiveSystemPredicate<B extends Bigraph<? extends Signature<?>>> extends Object implements Predicate<B>, HasLabel
Predicate interface for the reaction graph.

Allows to test if some conditions hold while executing a BRS. The predicates itself are bigraphs.

Internally a bigraph matcher instance for the concrete bigraph kind must be created.

Author:
Dominik Grzelak
  • Field Details

    • negate

      protected boolean negate
    • label

      protected String label
  • Constructor Details

    • ReactiveSystemPredicate

      public ReactiveSystemPredicate()
  • Method Details

    • getBigraph

      public abstract B getBigraph()
      Get the bigraph used in the predicate. If the predicate is a conditional predicate, the methid returns null.
      Returns:
      the underlying bigraph of the predicate, or null for conditional predicates.
    • test

      public abstract boolean test(B agent)
      This method is responsible to test the current state of a transition system of a BRS with the predicate at hand (which is provided by the concrete subclass).
      Specified by:
      test in interface Predicate<B extends Bigraph<? extends Signature<?>>>
      Parameters:
      agent - the current state of a transition system of a BRS to test the predicate against
      Returns:
      true if the predicate matches, otherwise false
    • isNegate

      public boolean isNegate()
    • setNegate

      public void setNegate(boolean negate)
    • getLabel

      public String getLabel()
      Specified by:
      getLabel in interface HasLabel
    • withLabel

      public <T extends ReactiveSystemPredicate<B>> T withLabel(String label)