Class PrologReasoner.Rule

java.lang.Object
nl.uu.cs.aplib.agents.PrologReasoner.Rule
Enclosing class:
PrologReasoner

public static class PrologReasoner.Rule extends Object
A represenration of a Prolog-rule. A rule has the form of "h :- t1,t2..." where "h" and "tk" are terms. The term h is called the rule-head and "t1,t2..." is the rule-body. A rule is interpreted as: h follows from the conjunction of t1,t2...
  • Field Details

  • Constructor Details

    • Rule

      Rule(String head)
      Construct a rule with the specified head and empty body.
  • Method Details

    • impBy

      public PrologReasoner.Rule impBy(String term)
      Extend this rule h :- body by adding the given term to the body.
    • and

      public PrologReasoner.Rule and(String term)
      Extend this rule h :- body by adding the given term to the body.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toStruct

      alice.tuprolog.Struct toStruct()