/*
 * CSP Project
 * Authors:
 * 		Jay Bernardo
 * 		Matt Rancourt
 * 
 * File: Transition.java
 * 
 * Contains the Transition class. 
 * This class is simply abstract for the real transitions to extend.
 * 
 * NOTE: All transitions will MUTATE M and F. If this infromation
 *       should not be mutated, the caller must make copies of it
 *       
 *       In the case that a transition does not mutate M or F, it will
 *       be explicitly noted  
 */
abstract class Transition{
	TransitionAssignment M;
	CSP F;
	
	/**
	 * Basic constructor
	 * @param M - Assignment
	 * @param F - Formula
	 */
	public Transition(TransitionAssignment M, CSP F){
		this.M = M;
		this.F = F;
	}
	
	/**
	 * The main "worker" of any transition. This method must be implemented
	 * and will do the core processing of the transition
	 * 
	 * @return
	 * @throws InvalidVariableValueException
	 * @throws RelationNumberOutOfBoundsException
	 * @throws RankOutOfBoundsException
	 * @throws InvalidVariableNamesLengthException
	 * @throws VariablePositionOutOfBoundsException
	 */
	abstract public int doTransition() 
	throws 
		InvalidVariableValueException,
		RelationNumberOutOfBoundsException,
		RankOutOfBoundsException,
		InvalidVariableNamesLengthException,
		VariablePositionOutOfBoundsException;
}