public BooleanExp replace(String name, BooleanExp exp) { return new AndExp(operand1.replace(name, exp), operand2.replace(name, exp)); }
public BooleanExp copy() { return new AndExp(operand1.copy(), operand2.copy()); }
public boolean evaluate(Context context) { return operand1.evaluate(context) && operand2.evaluate(context); }
public BooleanExp replace(String name, BooleanExp exp) { if (this.name.equals(name)) return exp.copy(); else return copy(); }
public BooleanExp copy() { return new NotExp(exp.copy()); }
public BooleanExp replace(String name, BooleanExp exp) { return new NotExp(exp.replace(name, exp)); }
public boolean evaluate(Context context) { return !exp.evaluate(context); }