previous up next
Go backward to Examples
Go up to Top
Go forward to Predicate Constants
RISC-Linz logo

Operational Interpretation

public final class Application implements Term
{
  private String name; private Term[] arguments;

  public Value eval() throws EvalException
  {
    Function function = Model.getFunction(name, arguments.length);
    if (function == null) throw new EvalException("unknown function");
    Value[] values = new Value[arguments.length];
    for (int i=0; i< values.length; i++)
      values[i] = arguments[i].eval();
    return function.apply(values);
  }  
}

Author: Wolfgang Schreiner
Last Modification: October 6, 1999

previous up next