Package edu.uky.ai.logic
Interface Literal
- All Superinterfaces:
Comparable<Formula>
,Formula
,Proposition
- All Known Subinterfaces:
Atom
- All Known Implementing Classes:
AtomicProposition
,NegatedAtom
,Predication
A literal is an
Atom
or a negated atom
.- Author:
- Stephen G. Ware
-
Field Summary
Fields inherited from interface edu.uky.ai.logic.Proposition
FALSE, TRUE
-
Method Summary
Modifier and TypeMethodDescriptionnegate()
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.default Literal
toCNF()
Converts this proposition to Conjunctive Normal Form (CNF).default Literal
toDNF()
Converts this proposition to Disjunctive Normal Form (DNF).Methods inherited from interface edu.uky.ai.logic.Proposition
isTrue, makeTrue, simplify
-
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 interfaceProposition
- Parameters:
substitution
- the substitution- Returns:
- a formula with replacements from the substitution
-
negate
Literal 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 interfaceProposition
- Returns:
- a proposition with opposite truth values
-
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
- Specified by:
toCNF
in interfaceProposition
- Returns:
- an equivalent proposition in CNF
- 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
- Specified by:
toDNF
in interfaceProposition
- Returns:
- an equivalent proposition in DNF
- A
-