|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.cs.ai.kreator.logic.Literal
public abstract class Literal
This abstract class models a literal in first-order logic.
| Nested Class Summary | |
|---|---|
static class |
Literal.TruthValue
|
| Constructor Summary | |
|---|---|
Literal()
|
|
| Method Summary | |
|---|---|
abstract boolean |
equals(java.lang.Object obj)
compares if this literals is equal to the other literal. |
java.util.Set<java.util.Map<Variable,Term>> |
extendUnifier(java.util.Collection<? extends Literal> data,
java.util.Map<Variable,Term> unifier)
For the given unifier "u" thi method computes all extensions of "u" to a unifier "u2" such that "u2" transforms this literal into one given in data. |
abstract java.util.Map<Variable,Term> |
extendUnifier(Literal l,
java.util.Map<Variable,Term> unifier)
Extends the given unifier "u" to a unifier "u2" such that "u2" transforms this literal into the one given. |
java.util.Set<java.util.Map<Variable,Term>> |
extendUnifiers(java.util.Collection<? extends Literal> data,
java.util.Collection<java.util.Map<Variable,Term>> unifiers)
For any unifier "u" in "unifiers" this method computes all extensions of "u" to a unifier "u2" such that "u2" transforms this literal into one given in data. |
abstract GeneralizedAtom |
getAtom()
Returns the atom of this literal. |
abstract Literal |
getComplement()
Returns the complement (negation) of this literal. |
abstract java.util.Set<Constant> |
getConstants()
Returns the set of constants, that appear in this literal. |
abstract java.util.Set<Literal> |
getInstantiations(LanguageFactory language)
Computes all ground literals of this literal with the language, i.e. |
abstract java.util.List<Term> |
getParameters()
Returns the list of parameters of that literal. |
abstract GeneralizedPredicate |
getPredicate()
Returns the predicate of this literal. |
java.util.Map<Variable,Term> |
getUnifier(Literal l)
Computes the unifier that is needed in order to transform this literal into the given one or "null" if this is not possible. |
java.util.Set<java.util.Map<Variable,Term>> |
getUnifiers(java.util.Collection<? extends Literal> data)
Computes the set of all possible unifiers yielding a transformation from this literal into one given in data. |
abstract java.util.Set<Variable> |
getVariables()
Returns the set of variables, that appear in this literal. |
static boolean |
isConsistent(java.util.Collection<? extends Literal> data)
Checks whether the given set of literals is consistent, i.e. |
abstract Literal |
substitute(java.util.Map<? extends Variable,? extends Term> substitution)
This method substitutes in this literal each occurence of a variable that is a key in the given substitution map by its value in the same given substitution map. |
java.util.Set<Literal> |
substituteAll(java.util.Collection<java.util.Map<Variable,Term>> substitutions)
For any substitution "s" given this method applies "s" to this literal and returns the set of all substitutions. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface edu.cs.ai.kreator.logic.Latexable |
|---|
toLatex |
| Methods inherited from interface java.lang.Comparable |
|---|
compareTo |
| Constructor Detail |
|---|
public Literal()
| Method Detail |
|---|
public abstract java.util.Set<Variable> getVariables()
public abstract java.util.Set<Constant> getConstants()
public abstract java.util.List<Term> getParameters()
public abstract Literal substitute(java.util.Map<? extends Variable,? extends Term> substitution)
substitution - a map from variables to constants.
public java.util.Set<Literal> substituteAll(java.util.Collection<java.util.Map<Variable,Term>> substitutions)
substitutions - a set of substitutions.
public abstract java.util.Set<Literal> getInstantiations(LanguageFactory language)
language - a language.
public java.util.Map<Variable,Term> getUnifier(Literal l)
l - a literal.
public java.util.Set<java.util.Map<Variable,Term>> getUnifiers(java.util.Collection<? extends Literal> data)
data - a collection of literals.
public java.util.Set<java.util.Map<Variable,Term>> extendUnifiers(java.util.Collection<? extends Literal> data,
java.util.Collection<java.util.Map<Variable,Term>> unifiers)
data - a collection of literals.unifiers - a collection of (partiel) unifiers.
public java.util.Set<java.util.Map<Variable,Term>> extendUnifier(java.util.Collection<? extends Literal> data,
java.util.Map<Variable,Term> unifier)
data - a collection of literals.unifier - a (partial) unifier.
public static boolean isConsistent(java.util.Collection<? extends Literal> data)
data - a collection of literals
public abstract java.util.Map<Variable,Term> extendUnifier(Literal l,
java.util.Map<Variable,Term> unifier)
l - a literalunifier - a (partial) unifier.
public abstract Literal getComplement()
public abstract GeneralizedPredicate getPredicate()
public abstract GeneralizedAtom getAtom()
public abstract boolean equals(java.lang.Object obj)
equals in class java.lang.Objectlit -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||