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 LiteraltoCNF()Converts this proposition to Conjunctive Normal Form (CNF).default LiteraltoDNF()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: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 interfaceProposition- Parameters:
substitution- the substitution- Returns:
- a formula with replacements from the substitution
-
negate
Literal 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 interfaceProposition- Returns:
- a proposition with opposite truth values
-
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
- Specified by:
toCNFin interfaceProposition- Returns:
- an equivalent proposition in CNF
- 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
- Specified by:
toDNFin interfaceProposition- Returns:
- an equivalent proposition in DNF
- A
-