Package edu.uky.ai.logic
Class NegatedAtom
java.lang.Object
edu.uky.ai.logic.BooleanProposition
edu.uky.ai.logic.Negation
edu.uky.ai.logic.NegatedAtom
- All Implemented Interfaces:
Formula
,Literal
,Proposition
,Comparable<Formula>
- Author:
- Stephen G. Ware
-
Field Summary
FieldsFields inherited from class edu.uky.ai.logic.Negation
NEGATION_PREDICATE
Fields inherited from class edu.uky.ai.logic.BooleanProposition
arguments
Fields inherited from interface edu.uky.ai.logic.Proposition
FALSE, TRUE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
makeTrue
(MutableState state) Modifies the given state object to make this proposition true.negate()
Returns a proposition whose truth values are opposite of this proposition (i.e.substitute
(Substitution substitution) Returns a version of this formula such that any elements that appear in the given substitution are replaced.toCNF()
Converts this proposition to Conjunctive Normal Form (CNF).toDNF()
Converts this proposition to Disjunctive Normal Form (DNF).Methods inherited from class edu.uky.ai.logic.Negation
equals, hashCode, isTrue, simplify, toString, unify
Methods inherited from class edu.uky.ai.logic.BooleanProposition
argumentsEqual, isGround, negateArguments, substituteArguments, unifyArguments
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface edu.uky.ai.logic.Proposition
isTrue, simplify
-
Field Details
-
argument
The atom which this proposition negates
-
-
Constructor Details
-
NegatedAtom
Constructs a new negated atom with a given atom.- Parameters:
argument
- the atom to negate
-
-
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
- Overrides:
substitute
in classNegation
- Parameters:
substitution
- the substitution- Returns:
- a formula with replacements from the substitution
-
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
- Overrides:
makeTrue
in classNegation
- Parameters:
state
- the state to modify
-
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). -
toCNF
Description copied from interface:Proposition
Converts this proposition to Conjunctive Normal Form (CNF). There are three kinds of formulas that are considered to be in CNF:- A
Literal
by itself - A
Disjunction
of literals, called a clause - A
Conjunction
of clauses
- A
-
toDNF
Description copied from interface:Proposition
Converts this proposition to Disjunctive Normal Form (DNF). There are three kinds of formulas that are considered to be in DNF:- A
Literal
by itself - A
Conjunction
of literals, called a clause - A
Disjunction
of clauses
- A
-