BindingExpressionNode.java

package edu.udel.cis.vsl.tass.ast.impl.expression;

import edu.udel.cis.vsl.tass.ast.IF.declaration.BoundVariableDeclarationNodeIF;
import edu.udel.cis.vsl.tass.ast.IF.expression.BindingExpressionNodeIF;
import edu.udel.cis.vsl.tass.ast.IF.expression.PureExpressionNodeIF;
import edu.udel.cis.vsl.tass.ast.impl.expression.ExpressionNode;

/**
 * A quantified expression.
 * 
 * @author Timothy K. Zirkel (zirkel)
 * 
 */
public class BindingExpressionNode extends ExpressionNode implements
		BindingExpressionNodeIF {

	private Quantifier quantifier;
	private BoundVariableDeclarationNodeIF boundVariable;
	private PureExpressionNodeIF constraint;
	private PureExpressionNodeIF expression;

	public BindingExpressionNode(long id) {
		super(id);
	}
	
	/**
	 * A quantified expression. The parameter quantifer is the type of
	 * quantifier. The parameter boundVariable is the variable that is bound to
	 * the quantifier. The parameter constraint is an expression constraining
	 * the possible values of the bound variable. The parameter expression is
	 * the quantified expression.
	 */
	public BindingExpressionNode(long id, Quantifier quantifier,
			BoundVariableDeclarationNodeIF boundVariable,
			PureExpressionNodeIF constraint, PureExpressionNodeIF expression) {
		super(id);
		this.quantifier = quantifier;
		this.boundVariable = boundVariable;
		this.constraint = constraint;
		this.expression = expression;
	}

	@Override
	public Quantifier quantifier() {
		return quantifier;
	}

	@Override
	public BoundVariableDeclarationNodeIF boundVariable() {
		return boundVariable;
	}

	@Override
	public PureExpressionNodeIF constraint() {
		return constraint;
	}

	@Override
	public PureExpressionNodeIF expression() {
		return expression;
	}

	@Override
	public void setQuantifier(Quantifier quantifier) {
		this.quantifier = quantifier;
	}

	@Override
	public void setBoundVariable(BoundVariableDeclarationNodeIF boundVariable) {
		this.boundVariable = boundVariable;
	}

	@Override
	public void setConstraint(PureExpressionNodeIF constraint) {
		this.constraint = constraint;
	}

	@Override
	public void setExpression(PureExpressionNodeIF expression) {
		this.expression = expression;
	}

}