Package edu.uky.ai.logic
Class Predication
java.lang.Object
edu.uky.ai.logic.Predication
- All Implemented Interfaces:
Atom,Formula,Literal,Proposition,Comparable<Formula>
The atoms of predicate logic, which are composed of statements that express
relationships between things in the world (i.e.
Terms).- Author:
- Stephen G. Ware
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal StringThe relationship between the terms, (often a preposition)final ImmutableArray<Term>The terms between which the relationship holdsFields inherited from interface edu.uky.ai.logic.Proposition
FALSE, TRUE -
Constructor Summary
ConstructorsConstructorDescriptionPredication(String predicate, Term... terms) Constructs a new predication with the given predicate and terms.Predication(String predicate, ImmutableArray<Term> terms) Constructs a new predication with the given predicate and terms.Predication(String predicate, Iterable<Term> terms) Constructs a new predication with the given predicate and terms. -
Method Summary
Modifier and TypeMethodDescriptionbooleaninthashCode()booleanisGround()Checks whether this formula contains any variables.substitute(Substitution substitution) Returns a version of this formula such that any elements that appear in the given substitution are replaced.toString()Finds the bindings that would be necessary to make this formula the same as another formula (if any exist).
-
Field Details
-
predicate
The relationship between the terms, (often a preposition) -
terms
The terms between which the relationship holds
-
-
Constructor Details
-
Predication
Constructs a new predication with the given predicate and terms.- Parameters:
predicate- the relationship between the termsterms- the terms between which the relationship holds
-
Predication
Constructs a new predication with the given predicate and terms.- Parameters:
predicate- the relationship between the termsterms- the terms between which the relationship holds
-
Predication
Constructs a new predication with the given predicate and terms.- Parameters:
predicate- the relationship between the termsterms- the terms between which the relationship holds
-
-
Method Details
-
equals
-
hashCode
public int hashCode() -
toString
-
isGround
public boolean isGround()Description copied from interface:FormulaChecks whether this formula contains any variables. -
substitute
Description copied from interface:FormulaReturns a version of this formula such that any elements that appear in the given substitution are replaced.- Specified by:
substitutein interfaceAtom- Specified by:
substitutein interfaceFormula- Specified by:
substitutein interfaceLiteral- Specified by:
substitutein interfaceProposition- Parameters:
substitution- the substitution- Returns:
- a formula with replacements from the substitution
-
unify
Description copied from interface:FormulaFinds the bindings that would be necessary to make this formula the same as another formula (if any exist).
-