(* temp.mli *)
(* 15-411 *)
(* by Roland Flury *)
(* @version $Id: temp.mli,v 1.2 2004/10/26 05:10:08 ajo Exp $ *)

exception TempError of string

(*
   Temps are temporary registers that can be used in a program. We will 
   assume that we have an infinite number of registers until we do the 
   register allocation which is responsible to shrink the number of 
   registers to the available ones. 
*)

(***********************************************************************)
(* Variables *)
(***********************************************************************)

(* Type of a temporary variable *)
type temp = int
	  
(* Returns a string representation of a temp *)
val temp2string : temp -> string

(* Return a temp for a new unnamed *)
val simpTemp : unit -> temp

(* Return a temp for a variable given the variables name *)
val namedTemp : string -> temp

(* Return the name of the temp used in the source-file or "#" if it is a 
 * compiler-temp *)
val nameOfTemp : temp -> string

(* Lists all variable-names of the function and their temp int-value *)
val listBindings : unit -> unit