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_PREDICATEFields inherited from class edu.uky.ai.logic.BooleanProposition
argumentsFields inherited from interface edu.uky.ai.logic.Proposition
FALSE, TRUE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidmakeTrue(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, unifyMethods inherited from class edu.uky.ai.logic.BooleanProposition
argumentsEqual, isGround, negateArguments, substituteArguments, unifyArgumentsMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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: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- Overrides:
substitutein classNegation- Parameters:
substitution- the substitution- Returns:
- a formula with replacements from the substitution
-
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- Overrides:
makeTruein classNegation- Parameters:
state- the state to modify
-
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). -
toCNF
Description copied from interface:PropositionConverts this proposition to Conjunctive Normal Form (CNF). There are three kinds of formulas that are considered to be in CNF:- A
Literalby itself - A
Disjunctionof literals, called a clause - A
Conjunctionof clauses
- A
-
toDNF
Description copied from interface:PropositionConverts this proposition to Disjunctive Normal Form (DNF). There are three kinds of formulas that are considered to be in DNF:- A
Literalby itself - A
Conjunctionof literals, called a clause - A
Disjunctionof clauses
- A
-