previous up next
Go backward to Example
Go up to Top
Go forward to Equality
RISC-Linz logo

Operational Interpretation

public final class Atomic implements Formula
  private String name; private Term[] arguments;

  public boolean eval() throws EvalException
    Predicate predicate = Model.getPredicate(name,arguments.length);
    if (predicate == null) throw new EvalException("unknown predicate");
    Value[] values = new Value[arguments.length];
    for (int i=0; i<values.length; i++)
      values[i] = arguments[i].eval();
    return predicate.apply(values);

Author: Wolfgang Schreiner
Last Modification: October 6, 1999

previous up next