/**
 * 
 */
package dspl.intermediate.instructions;

import dspl.intermediate.variable.Variable;

/**
 * This class is used to represent all of the instructions and the comparison necessary
 * for all of the branch and loop instructions that require some representation of the
 * condition that determines if they run or not.
 * 
 * @author varun
 *
 */
public class RelationInstruction extends Instruction{
	
	public InstructionSet statements;
	
	/**
	 * First argument to be compared
	 */
	public Variable arg1; 
	
	/**
	 * Second arguement to compared to arg1
	 */
	public Variable arg2; 
	
	/**
	 * the condition required for what we were given to be true
	 */
	public int condition = -1 ;
	
	public RelationInstruction(Variable arg1, Variable arg2, int condition) {
		this.arg1 = arg1;
		this.arg2 = arg2;
		this.condition = condition;
	}
	
	public boolean usesVariable(Variable foo) {
		throw new Error("Method usesVariable not yet implemented");
	}
	
	public int getInstType() {return -1;}

}
