public class HerbrandInterpretation extends InterpretationSet<FOLAtom>
Constructor and Description |
---|
HerbrandInterpretation()
Creates a new empty Herbrand interpretation
|
HerbrandInterpretation(java.util.Collection<? extends FOLAtom> atoms)
Creates a new Herbrand interpretation with the given
set of atoms
|
Modifier and Type | Method and Description |
---|---|
HerbrandInterpretation |
exchange(java.util.Map<Term<?>,Term<?>> mapping)
For every mapping t1 -> t2, this method substitutes every
occurrence of "t1" by "t2" and vice versa and returns the new interpretation
|
HerbrandInterpretation |
exchange(Term<?> t1,
Term<?> t2)
Substitutes every occurrence of "t1" by "t2" and vice versa and returns the
new interpretation.
|
boolean |
isSyntacticallyEquivalent(HerbrandInterpretation other,
java.util.Collection<? extends java.util.Collection<? extends Constant>> equivalenceClasses)
Checks whether this interpretation is syntactically equivalent to the given
interpretation and the given equivalence classes, i.e.
|
boolean |
satisfies(BeliefBase beliefBase)
Checks whether this interpretation satisfies the given knowledge base.
|
boolean |
satisfies(Formula formula)
Checks whether this Herbrand interpretation satisfies
the given formula.
|
boolean |
satisfies(java.util.Set<FolFormula> formulas)
Checks whether this Herbrand interpretation satisfies each of
the formulas in the given set of first-order formulas.
|
java.lang.String |
toString() |
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
satisfies
public HerbrandInterpretation()
public HerbrandInterpretation(java.util.Collection<? extends FOLAtom> atoms)
atoms
- the set of true atoms in this Herbrand interpretation.public boolean satisfies(Formula formula) throws java.lang.IllegalArgumentException
formula
- a formula.java.lang.IllegalArgumentException
- if "f" is not closed.public boolean isSyntacticallyEquivalent(HerbrandInterpretation other, java.util.Collection<? extends java.util.Collection<? extends Constant>> equivalenceClasses)
other
- a Herbrand interpretation.equivalenceClasses
- a set of sets of constants.public boolean satisfies(java.util.Set<FolFormula> formulas) throws java.lang.IllegalArgumentException
formulas
- a set of first-order formulas.java.lang.IllegalArgumentException
- if at least one formula does not correspond
to the expected language.public boolean satisfies(BeliefBase beliefBase) throws java.lang.IllegalArgumentException
Interpretation
beliefBase
- a knowledge base.java.lang.IllegalArgumentException
- IllegalArgumentException if the knowledgebase does not correspond
to the expected language.public HerbrandInterpretation exchange(Term<?> t1, Term<?> t2)
t1
- a term.t2
- a term.public HerbrandInterpretation exchange(java.util.Map<Term<?>,Term<?>> mapping)
mapping
- a mapping of terms.public java.lang.String toString()
toString
in class InterpretationSet<FOLAtom>