Class ClauseModel


  • public final class ClauseModel
    extends java.lang.Object
    Represents a clause.

    A clause consists of a head and a body. Where a clause is not explicitly specified it defaults to having a body of true.

    Called ClauseModel to differentiate it from ClauseAction.

    • Field Detail

      • TRUE

        private static final Term TRUE
      • original

        private final Term original
      • consequent

        private final Term consequent
      • antecedent

        private final Term antecedent
    • Constructor Detail

      • ClauseModel

        private ClauseModel​(Term original,
                            Term consequent,
                            Term antecedent)
    • Method Detail

      • createClauseModel

        public static ClauseModel createClauseModel​(Term original)
      • getAntecedent

        public Term getAntecedent()
        Returns the body of the clause. i.e. the bit after the :-
      • getConsequent

        public Term getConsequent()
        Returns the head of the clause. i.e. the bit before the :-
      • getOriginal

        public Term getOriginal()
      • isFact

        public boolean isFact()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object