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 TypeMethodDescriptionboolean
int
hashCode()
boolean
isGround()
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:Formula
Checks whether this formula contains any variables. -
substitute
Description copied from interface:Formula
Returns a version of this formula such that any elements that appear in the given substitution are replaced.- Specified by:
substitute
in interfaceAtom
- Specified by:
substitute
in interfaceFormula
- Specified by:
substitute
in interfaceLiteral
- Specified by:
substitute
in interfaceProposition
- Parameters:
substitution
- the substitution- Returns:
- a formula with replacements from the substitution
-
unify
Description copied from interface:Formula
Finds the bindings that would be necessary to make this formula the same as another formula (if any exist).
-