java.lang.Object
edu.upc.fib.inlab.imp.kse.logics.logicschema.domain.Query
Direct Known Subclasses:
ConjunctiveQuery

public class Query extends Object
A Query is composed of a list of terms, and a body E.g.: (x,y) :- P(x, y), not(R(x)) Queries can be used to define DerivedPredicates. For instance, the derived predicate D, with arity 2, is defined by the queries: (x,y) :- P(x, y), not(R(x)) (x,y) :- P(x, y), not(S(x))
  • Method Details

    • getHeadTerms

      public ImmutableTermList getHeadTerms()
    • getBody

      public ImmutableLiteralsList getBody()
    • isConjunctiveQuery

      public boolean isConjunctiveQuery()
    • unfold

      public List<Query> unfold()
      Returns:
      a list of Queries obtained after recursively unfolding all the non-recursive derived positive literals
    • toString

      public String toString()
      Overrides:
      toString in class Object