blog
Class SimpleInstEvalContext

java.lang.Object
  extended by blog.DefaultEvalContext
      extended by blog.ParentRecEvalContext
          extended by blog.SimpleInstEvalContext
All Implemented Interfaces:
EvalContext

public class SimpleInstEvalContext
extends ParentRecEvalContext

Evaluation context that instantiates random variables as needed, using some very simple rules. Number variables are set to zero. Random function application variables are set to the first guaranteed object of their return type, or Model.NULL if the return type has no guaranteed objects.


Field Summary
 
Fields inherited from class blog.ParentRecEvalContext
latestUninstParent, parents
 
Fields inherited from class blog.DefaultEvalContext
errorIfUndet, world
 
Constructor Summary
SimpleInstEvalContext(PartialWorld world)
          Creates a new SimpleInstEvalContext using the given world.
 
Method Summary
 java.lang.Object getValue(BasicVar var)
          Returns the value of the given basic random variable in this partial world, or null if the given variable is not instantiated.
 boolean isInstantiated(BasicVar var)
           
 
Methods inherited from class blog.ParentRecEvalContext
getLatestUninstParent, getParents, getPOPAppSatisfied
 
Methods inherited from class blog.DefaultEvalContext
assign, assignTuple, getAssignmentStr, getLogicalVarValue, getLogicalVarValues, getSatisfiers, handleMissingVar, objectExists, popEvaluee, printEvalTrace, pushEvaluee, unassign, unassignTuple, usesIdentifiers
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleInstEvalContext

public SimpleInstEvalContext(PartialWorld world)
Creates a new SimpleInstEvalContext using the given world.

Method Detail

isInstantiated

public boolean isInstantiated(BasicVar var)

getValue

public java.lang.Object getValue(BasicVar var)
Description copied from interface: EvalContext
Returns the value of the given basic random variable in this partial world, or null if the given variable is not instantiated.

Specified by:
getValue in interface EvalContext
Overrides:
getValue in class ParentRecEvalContext