|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectai.krr.fol.Interpretation
public class Interpretation
An Interpretation over a domain D in first-order logic is an assignment of:
Field Summary | |
---|---|
protected java.util.Map<Symbol,java.lang.Object> |
cMap
the Map from constants to elements in the domain |
protected java.util.Set<java.lang.Object> |
domain
the domain of this Interpretation |
protected java.util.Map<ai.krr.fol.Interpretation.Pattern,java.lang.Object> |
fMap
the Map from functions to elements in the domain |
protected java.util.Map<ai.krr.fol.Interpretation.Pattern,BooleanSymbol> |
pMap
the Map from constants to elements in the domain |
Constructor Summary | |
---|---|
Interpretation(java.util.Set<java.lang.Object> d)
This constructor creates a new, empty Interpretation for the given domain. |
Method Summary | |
---|---|
BooleanSymbol |
getTruthValue(NamedSymbol psy,
java.lang.Object[] args)
This function retrieves a previously assigned value for the given predicate and arguments from this Interpretation. |
java.lang.Object |
getValue(Symbol c)
This function retrieves a previously assigned value for the given Symbol from this Interpretation. |
java.lang.Object |
getValue(Symbol fsy,
java.lang.Object[] args)
This function retrieves a previously assigned value for the given function and arguments from this Interpretation. |
void |
setTruthValue(NamedSymbol psy,
java.lang.Object[] args,
BooleanSymbol val)
This function can be used assign the given truth value to the given predicate applied to the given arguments. |
void |
setValue(Symbol c,
java.lang.Object val)
This function can be used assign the given Object as the value under this Interpretation to the given Symbol. |
void |
setValue(Symbol fsy,
java.lang.Object[] args,
java.lang.Object val)
This function can be used assign the given Object as the value under this Interpretation to the given function applied to the given arguments. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.Set<java.lang.Object> domain
protected java.util.Map<Symbol,java.lang.Object> cMap
protected java.util.Map<ai.krr.fol.Interpretation.Pattern,java.lang.Object> fMap
protected java.util.Map<ai.krr.fol.Interpretation.Pattern,BooleanSymbol> pMap
Constructor Detail |
---|
public Interpretation(java.util.Set<java.lang.Object> d)
This constructor creates a new, empty Interpretation for the given
domain. Initially it contains no assignments. Such assignment must be
added using the functions setValue(Symbol, Object)
,
#setValue(FunctionTerm, Object)
and
#setValue(Atom, BooleanSymbol)
.
Method Detail |
---|
public void setValue(Symbol c, java.lang.Object val)
This function can be used assign the given Object as the value under this Interpretation to the given Symbol. If the Symbol had a previously assigned value in this Interpretation, this will be replaced. Neither of the given the given arguments must be null and the Object must be an element of the domain.
c
- the Symbol representing a constantval
- the NamedSymbol representing the value of the constantpublic void setValue(Symbol fsy, java.lang.Object[] args, java.lang.Object val)
This function can be used assign the given Object as the value under this Interpretation to the given function applied to the given arguments. If the function had a previously assigned value for these arguments in this Interpretation, this will be replaced. The given Object must be an element of the domain.
c
- the Symbol representing a constantval
- the NamedSymbol representing the value of the constantpublic void setTruthValue(NamedSymbol psy, java.lang.Object[] args, BooleanSymbol val)
This function can be used assign the given truth value to the given predicate applied to the given arguments. If the relation had a previously assigned truth value in this Interpretation, this will be replaced.
prop
- the NamedSymbol representing a propositional Atomval
- the BooleanSymbol representing the truth value of this
propositionpublic java.lang.Object getValue(Symbol c)
This function retrieves a previously assigned value for the given Symbol from this Interpretation. This function will return null if no assignment to the given Symbol was made. The given Symbol must not be null.
c
- the Symbol for which the value is sought
public java.lang.Object getValue(Symbol fsy, java.lang.Object[] args)
This function retrieves a previously assigned value for the given function and arguments from this Interpretation. This function will return null if no assignment to the given Symbol was made. The given Symbol must not be null.
c
- the Symbol for which the value is sought
public BooleanSymbol getTruthValue(NamedSymbol psy, java.lang.Object[] args)
This function retrieves a previously assigned value for the given predicate and arguments from this Interpretation. This function will return null if no assignment to the given Symbol was made. The given Symbol must not be null.
c
- the Symbol for which the value is sought
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |