src/Tools/isac/Frontend/states.sml
branchisac-update-Isa09-2
changeset 38031 460c24a6a6ba
parent 38007 d679c1f837a7
child 55432 1780e9905d80
     1.1 --- a/src/Tools/isac/Frontend/states.sml	Tue Sep 28 08:58:06 2010 +0200
     1.2 +++ b/src/Tools/isac/Frontend/states.sml	Tue Sep 28 09:06:56 2010 +0200
     1.3 @@ -183,7 +183,7 @@
     1.4  (*///7.10.03/// add states to a users active states
     1.5  fun get_calcID (uI:iterID) (p:(iterID * (calcID * state) list) list) = 
     1.6    case assoc (p, uI) of 
     1.7 -    NONE => raise error ("get_calcID: no iterID " ^ 
     1.8 +    NONE => error ("get_calcID: no iterID " ^ 
     1.9  			  (string_of_int uI))
    1.10    | SOME ps => (new_key ps 1):calcID;
    1.11  > get_calcID 1 (!states);  
    1.12 @@ -193,7 +193,7 @@
    1.13  fun get_iterID (cI:calcID) 
    1.14  	       (p:(calcID * (calcstate * (iterID * pos') list)) list) = 
    1.15    case assoc (p, cI) of
    1.16 -    NONE => raise error ("get_iterID: no iterID " ^ (string_of_int cI))
    1.17 +    NONE => error ("get_iterID: no iterID " ^ (string_of_int cI))
    1.18    | SOME (_, us) => (new_key us 1):iterID;
    1.19  (* get_iterID 3 (!states);
    1.20  val it = 2 : iterID*)
    1.21 @@ -204,7 +204,7 @@
    1.22  (*//////7.10.
    1.23  fun get_cal (uI:iterID) (pI:calcID) (p:(iterID * (calcID * state) list) list) =
    1.24    (the (assoc2 (p,(uI, pI)))) 
    1.25 -  handle _ => raise error ("get_state " ^ (string_of_int uI) ^
    1.26 +  handle _ => error ("get_state " ^ (string_of_int uI) ^
    1.27  			     " " ^ (string_of_int pI) ^ " not existent");
    1.28  > get_cal 3 1 (!states);
    1.29  val it = (((EmptyPtree,(#,#)),[]),([],[])) : state
    1.30 @@ -216,15 +216,15 @@
    1.31  *)
    1.32  fun get_calc  (cI:calcID) = 
    1.33      case assoc (!states, cI) of 
    1.34 -	NONE => raise error ("get_calc "^(string_of_int cI)^" not existent")
    1.35 +	NONE => error ("get_calc "^(string_of_int cI)^" not existent")
    1.36        | SOME (c, _) => c;
    1.37  fun get_pos (cI:calcID) (uI:iterID) = 
    1.38      case assoc (!states, cI) of 
    1.39 -	NONE => raise error ("get_pos: calc " ^ (string_of_int cI) 
    1.40 +	NONE => error ("get_pos: calc " ^ (string_of_int cI) 
    1.41  			     ^ " not existent")
    1.42        | SOME (_, us) => 
    1.43  	(case assoc (us, uI) of 
    1.44 -	    NONE => raise error ("get_pos: user " ^ (string_of_int uI) 
    1.45 +	    NONE => error ("get_pos: user " ^ (string_of_int uI) 
    1.46  				 ^ " not existent")
    1.47  	  | SOME p => p);
    1.48  
    1.49 @@ -271,27 +271,27 @@
    1.50  fun overwrite2 (ps, (((uI:iterID), (pI:calcID)), p)) = 
    1.51    let val new_ps = overwrite (the (assoc (ps, uI)), (pI, p))
    1.52    in (overwrite (ps, (uI, new_ps)))
    1.53 -    handle _ => raise error ("overwrite2 " ^ (string_of_int uI) ^
    1.54 +    handle _ => error ("overwrite2 " ^ (string_of_int uI) ^
    1.55  			      " " ^ (string_of_int pI) ^ " not existent")
    1.56    end;*)
    1.57  fun overwrite2 (ps, (((cI:calcID), (uI:iterID)), p)) =
    1.58      case assoc (ps, cI) of
    1.59  	NONE => 
    1.60 -	raise error ("overwrite2: calc " ^ (string_of_int uI) ^" not existent")
    1.61 +	error ("overwrite2: calc " ^ (string_of_int uI) ^" not existent")
    1.62        | SOME (cs, us) =>
    1.63  	overwrite (ps, (cI ,(cs, overwrite (us, (uI, p)))));
    1.64  
    1.65  fun upd_calc (cI:calcID) cs =
    1.66      case assoc (!states, cI) of 
    1.67 -	NONE => raise error ("upd_calc "^(string_of_int cI)^" not existent")
    1.68 +	NONE => error ("upd_calc "^(string_of_int cI)^" not existent")
    1.69        | SOME (_, us) => states:= overwrite (!states, (cI, (cs, us)));
    1.70  (*WN051210 testing before initac: only 1 taci in calcstate so far:
    1.71  fun upd_calc (cI:calcID) (cs as (_, tacis):calcstate) =
    1.72      (if length tacis > 1 
    1.73 -     then raise error ("upd_calc, |tacis|>1: "^tacis2str tacis) 
    1.74 +     then error ("upd_calc, |tacis|>1: "^tacis2str tacis) 
    1.75       else ();
    1.76      case assoc (!states, cI) of 
    1.77 -	NONE => raise error ("upd_calc "^(string_of_int cI)^" not existent")
    1.78 +	NONE => error ("upd_calc "^(string_of_int cI)^" not existent")
    1.79        | SOME (_, us) => states:= overwrite (!states, (cI, (cs, us)))
    1.80  			);*)
    1.81  
    1.82 @@ -304,7 +304,7 @@
    1.83  fun upd_tacis (cI:calcID) tacis =
    1.84      case assoc (!states, cI) of 
    1.85  	NONE => 
    1.86 -	raise error ("upd_tacis: calctree "^(string_of_int cI)^" not existent")
    1.87 +	error ("upd_tacis: calctree "^(string_of_int cI)^" not existent")
    1.88        | SOME ((ptp,_), us) => 
    1.89  	states:= overwrite (!states, (cI, ((ptp, tacis), us)));
    1.90  (*///7.10.
    1.91 @@ -314,7 +314,7 @@
    1.92  fun upd_ipos (cI:calcID) (uI:iterID) (ip:pos') =
    1.93      case assoc (!states, cI) of 
    1.94  	NONE => 
    1.95 -	raise error ("upd_ipos: calctree "^(string_of_int cI)^" not existent")
    1.96 +	error ("upd_ipos: calctree "^(string_of_int cI)^" not existent")
    1.97        | SOME (cs, us) => 
    1.98  	states:= overwrite2 (!states, ((cI, uI), ip));
    1.99  
   1.100 @@ -348,7 +348,7 @@
   1.101  fun add_user (cI:calcID) = 
   1.102      case assoc (!states, cI) of 
   1.103  	NONE => 
   1.104 -	raise error ("add_user: calctree "^(string_of_int cI)^" not existent")
   1.105 +	error ("add_user: calctree "^(string_of_int cI)^" not existent")
   1.106        | SOME (cs, us) => 
   1.107  	let val new_uI = new_key us 1
   1.108  	in states:= overwrite2 (!states, ((cI, new_uI), e_pos'));