Package edu.uky.ai.logic
Interface Atom
- All Superinterfaces:
Comparable<Formula>,Formula,Literal,Proposition
- All Known Implementing Classes:
AtomicProposition,Predication
An atom is the smallest indivisible unit of a logical language that has a
truth value.
- Author:
- Stephen G. Ware
-
Field Summary
Fields inherited from interface edu.uky.ai.logic.Proposition
FALSE, TRUE -
Method Summary
Modifier and TypeMethodDescriptiondefault booleanTests whether this proposition is true in the given state.default voidmakeTrue(MutableState state) Modifies the given state object to make this proposition true.default Literalnegate()Returns a proposition whose truth values are opposite of this proposition (i.e.default Atomsimplify()Returns an equivalent proposition which may be simpler.substitute(Substitution substitution) Returns a version of this formula such that any elements that appear in the given substitution are replaced.
-
Method Details
-
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 interfaceFormula- Specified by:
substitutein interfaceLiteral- Specified by:
substitutein interfaceProposition- Parameters:
substitution- the substitution- Returns:
- a formula with replacements from the substitution
-
isTrue
Description copied from interface:PropositionTests whether this proposition is true in the given state.- Specified by:
isTruein interfaceProposition- Parameters:
state- the state in which to test this proposition- Returns:
- true if the proposition is true, false otherwise
-
makeTrue
Description copied from interface:PropositionModifies the given state object to make this proposition true. Note that some propositions (such asDisjunctions) are non-deterministic, meaning there are multiple ways to make them true, and thus the state that would result from this operation is not clearly defined.- Specified by:
makeTruein interfaceProposition- Parameters:
state- the state to modify
-
simplify
Description copied from interface:PropositionReturns an equivalent proposition which may be simpler.- Specified by:
simplifyin interfaceProposition- Returns:
- the simplified proposition
-
negate
Description copied from interface:PropositionReturns a proposition whose truth values are opposite of this proposition (i.e. true when this one is false, false when this one is true).- Specified by:
negatein interfaceLiteral- Specified by:
negatein interfaceProposition- Returns:
- a proposition with opposite truth values
-