Package edu.uky.ai.logic
Class AtomicProposition
java.lang.Object
edu.uky.ai.logic.AtomicProposition
- All Implemented Interfaces:
Atom,Formula,Literal,Proposition,Comparable<Formula>
An individual statement that has a truth value (the atoms of propositional
logic).
- Author:
- Stephen G. Ware
-
Field Summary
FieldsFields inherited from interface edu.uky.ai.logic.Proposition
FALSE, TRUE -
Constructor Summary
Constructors -
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
-
name
The proposition's name
-
-
Constructor Details
-
AtomicProposition
Constructs a new atom with the given name.- Parameters:
name- the atom's name
-
-
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).
-