package dfatool.expressions;

import dfatool.strategy.elements.Context;
import dfatool.values.BoolValue;
import dfatool.values.Value;

public class EqualExpression extends BinaryExpression{

	public EqualExpression(Expression lExp, Expression rExp) {
		// TODO Auto-generated constructor stub
		super(lExp, rExp);
	}

	@Override
	public Value evaluate(Context c) {
		return new BoolValue(getlExp().evaluate(c).equals(getrExp().evaluate(c)));
	}

	public String toConcreteSyntax(){
		return lExp.toConcreteSyntax()+" == "+rExp.toConcreteSyntax();
	}

}
