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 boolean
Tests whether this proposition is true in the given state.default void
makeTrue
(MutableState state) Modifies the given state object to make this proposition true.default Literal
negate()
Returns a proposition whose truth values are opposite of this proposition (i.e.default Atom
simplify()
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:Formula
Returns a version of this formula such that any elements that appear in the given substitution are replaced.- 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
-
isTrue
Description copied from interface:Proposition
Tests whether this proposition is true in the given state.- Specified by:
isTrue
in 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:Proposition
Modifies the given state object to make this proposition true. Note that some propositions (such asDisjunction
s) 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:
makeTrue
in interfaceProposition
- Parameters:
state
- the state to modify
-
simplify
Description copied from interface:Proposition
Returns an equivalent proposition which may be simpler.- Specified by:
simplify
in interfaceProposition
- Returns:
- the simplified proposition
-
negate
Description copied from interface:Proposition
Returns 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:
negate
in interfaceLiteral
- Specified by:
negate
in interfaceProposition
- Returns:
- a proposition with opposite truth values
-