previous up next
Go backward to Universal Quantification
Go up to Top
Go forward to Existential Quantification
RISC-Linz logo

Operational Interpretation

public final class ForAll implements Formula
{
  private String variable; private Term domain; private Formula formula;

  public boolean eval() throws EvalException
  {
    Iterator iterator = Model.iterator(domain);
    while (iterator.hasNext()) {
      Context.begin(variable, iterator.next());
      boolean result = formula.eval();
      Context.end();
      if (!result) return false; }
    return true;
  }
}

Author: Wolfgang Schreiner
Last Modification: October 6, 1999

previous up next