|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object blog.ArgSpec blog.ExplicitSetSpec
public class ExplicitSetSpec
Represents an argument - set with explicit listing of its elements. The elements are assumed to be Terms.
Field Summary |
---|
Fields inherited from class blog.ArgSpec |
---|
location |
Constructor Summary | |
---|---|
ExplicitSetSpec(java.util.List terms)
Creates a new explicit set specification. |
Method Summary | |
---|---|
boolean |
checkTypesAndScope(Model model,
java.util.Map scope)
Returns true if, within the given scope, all the variables used in this ArgSpec are in scope and all type constraints are satisfied. |
boolean |
containsRandomSymbol()
Returns true if this ArgSpec contains any random function symbols or any type symbols (any type might have a number statement, and thus could be random). |
boolean |
equals(java.lang.Object o)
Two explicit set specifications are equal if they have the same list of terms (in the same order). |
java.lang.Object |
evaluate(EvalContext context)
Returns the value of this argument specification in the given context. |
java.util.List |
getElts()
|
java.util.Collection |
getSubExprs()
Returns the proper sub-expressions of this ArgSpec. |
ArgSpec |
getSubstResult(Substitution subst,
java.util.Set<LogicalVar> boundVars)
Returns the result of applying the substitution subst to this expression, excluding the logical
variables in boundVars . |
int |
hashCode()
|
java.lang.String |
toString()
Returns a string of the form {t1, ..., tK} where t1, ..., tK are the terms in this explicit set specification. |
Methods inherited from class blog.ArgSpec |
---|
compile, evaluate, evaluate, getFreeVars, getLocation, getSubstResult, getValueIfNonRandom, getVariable, isDetermined, isNumeric, setLocation |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ExplicitSetSpec(java.util.List terms)
terms
- List of Term objectsMethod Detail |
---|
public java.util.List getElts()
public java.lang.Object evaluate(EvalContext context)
ArgSpec
evaluate
in class ArgSpec
public boolean containsRandomSymbol()
ArgSpec
containsRandomSymbol
in class ArgSpec
public boolean checkTypesAndScope(Model model, java.util.Map scope)
ArgSpec
checkTypesAndScope
in class ArgSpec
scope
- a Map from variable names (Strings) to LogicalVar objectspublic java.util.Collection getSubExprs()
ArgSpec
This default implementation returns an empty collection.
getSubExprs
in class ArgSpec
public ArgSpec getSubstResult(Substitution subst, java.util.Set<LogicalVar> boundVars)
ArgSpec
subst
to this expression, excluding the logical
variables in boundVars
. This method is used for
recursive calls. The set boundVars
should contain
those variables that are bound in the syntax tree between this
sub-expression and the top-level expression to which the
substitution is being applied.
getSubstResult
in class ArgSpec
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |