blog
Class ConstantInterp

java.lang.Object
  extended by blog.AbstractFunctionInterp
      extended by blog.ConstantInterp
All Implemented Interfaces:
FunctionInterp

public class ConstantInterp
extends AbstractFunctionInterp

Implementation of FunctionInterp for constants (zero-ary functions). In this case, the interpretation is specified by just a single value.


Constructor Summary
ConstantInterp(java.util.List params)
          Expects a single parameter, namely the function value.
 
Method Summary
 java.util.Set getInverseTuples(java.lang.Object v)
          Returns the set of argument tuples that yield the given value, if this set is finite and can be computed easily.
 java.lang.Object getValue(java.util.List args)
          Returns the value of this function on the given tuple of arguments.
 
Methods inherited from class blog.AbstractFunctionInterp
getInverseArgs
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConstantInterp

public ConstantInterp(java.util.List params)
Expects a single parameter, namely the function value.

Method Detail

getValue

public java.lang.Object getValue(java.util.List args)
Description copied from interface: FunctionInterp
Returns the value of this function on the given tuple of arguments. Implementations can assume that the arguments are of the expected types and are not Model.NULL.


getInverseTuples

public java.util.Set getInverseTuples(java.lang.Object v)
Description copied from class: AbstractFunctionInterp
Returns the set of argument tuples that yield the given value, if this set is finite and can be computed easily. Otherwise returns null.

This default implementation just returns null.

Specified by:
getInverseTuples in interface FunctionInterp
Overrides:
getInverseTuples in class AbstractFunctionInterp
Returns:
Set of List of objects