java.lang.Object
tools.refinery.interpreter.matchers.psystem.queries.PDisjunction

public class PDisjunction extends Object
A disjunction is a set of bodies representing separate conditions. A PQuery has a single, canonical PDisjunction, that can be replaced using rewriter
  • Constructor Details

    • PDisjunction

      public PDisjunction(Set<PBody> bodies)
    • PDisjunction

      public PDisjunction(PQuery query, Set<PBody> bodies)
  • Method Details

    • getBodies

      public Set<PBody> getBodies()
      Returns an immutable set of bodies that consists of this disjunction
      Returns:
      the bodies
    • getQuery

      public PQuery getQuery()
      Returns the corresponding query specification. May be null if not set.
    • getDirectReferredQueries

      public Set<PQuery> getDirectReferredQueries()
      Returns all queries directly referred in the constraints. They are all required to evaluate this query
      Returns:
      a non-null, but possibly empty list of query definitions
    • getAllReferredQueries

      public Set<PQuery> getAllReferredQueries()
      Returns all queries required to evaluate this query (transitively).
      Returns:
      a non-null, but possibly empty list of query definitions
    • isRecursive

      public boolean isRecursive()
      Determines whether the query transitively refers to itself. Note that even if false is returned, the query may refer to another query that is recursive, but not mutually recursive with this query.
      Returns:
      true if the query transitively calls itself.
      Since:
      2.10
    • isMutable

      public boolean isMutable()
      Decides whether a disjunction is mutable. A disjunction is mutable if all its contained bodies are mutable.