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

Operational Interpretation

public final class Exists 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 true; }
    return false;
  }
}

Author: Wolfgang Schreiner
Last Modification: October 6, 1999

previous up next