package formulaVisited;


/**
  A visitor to formulas.
  The visitor traverses the syntax tree of a formula,
  and calculates some result for each kind of formula.
  For kinds of formulas that have subformulas,
  the results for the subformulas are combined
  into the result for the formula.
  Each formula's result is returned from the visit() method.
*/
public interface Visitor {
  /**  Calculates the result for a Conjunction.  */
  public Object visit(Conjunction _f);
  /**  Calculates the result for a Disjunction.  */
  public Object visit(Disjunction _f);
  /**  Calculates the result for a LogicalConstant.  */
  public Object visit(LogicalConstant _f);
  /**  Calculates the result for a LogicalVariable.  */
  public Object visit(LogicalVariable _f);
  /**  Calculates the result for a Negation.  */
  public Object visit(Negation _f);
}

