# HG changeset patch # User Walther Neuper # Date 1285657616 -7200 # Node ID 460c24a6a6bae817fee511ad111af34f1c5cdbe5 # Parent 95d956108461beb3ccfa98706e4dbe712d156b36 tuned error and writeln # raise error --> error # writeln in atomtyp, atomty, atomt and xmlsrc diff -r 95d956108461 -r 460c24a6a6ba src/Tools/isac/Frontend/messages.sml --- a/src/Tools/isac/Frontend/messages.sml Tue Sep 28 08:58:06 2010 +0200 +++ b/src/Tools/isac/Frontend/messages.sml Tue Sep 28 09:06:56 2010 +0200 @@ -39,5 +39,5 @@ (*1000 general*) - | msg2str i l = raise error ("no message for No. "^ + | msg2str i l = error ("no message for No. "^ string_of_int i^" "^language2str l); diff -r 95d956108461 -r 460c24a6a6ba src/Tools/isac/Frontend/states.sml --- a/src/Tools/isac/Frontend/states.sml Tue Sep 28 08:58:06 2010 +0200 +++ b/src/Tools/isac/Frontend/states.sml Tue Sep 28 09:06:56 2010 +0200 @@ -183,7 +183,7 @@ (*///7.10.03/// add states to a users active states fun get_calcID (uI:iterID) (p:(iterID * (calcID * state) list) list) = case assoc (p, uI) of - NONE => raise error ("get_calcID: no iterID " ^ + NONE => error ("get_calcID: no iterID " ^ (string_of_int uI)) | SOME ps => (new_key ps 1):calcID; > get_calcID 1 (!states); @@ -193,7 +193,7 @@ fun get_iterID (cI:calcID) (p:(calcID * (calcstate * (iterID * pos') list)) list) = case assoc (p, cI) of - NONE => raise error ("get_iterID: no iterID " ^ (string_of_int cI)) + NONE => error ("get_iterID: no iterID " ^ (string_of_int cI)) | SOME (_, us) => (new_key us 1):iterID; (* get_iterID 3 (!states); val it = 2 : iterID*) @@ -204,7 +204,7 @@ (*//////7.10. fun get_cal (uI:iterID) (pI:calcID) (p:(iterID * (calcID * state) list) list) = (the (assoc2 (p,(uI, pI)))) - handle _ => raise error ("get_state " ^ (string_of_int uI) ^ + handle _ => error ("get_state " ^ (string_of_int uI) ^ " " ^ (string_of_int pI) ^ " not existent"); > get_cal 3 1 (!states); val it = (((EmptyPtree,(#,#)),[]),([],[])) : state @@ -216,15 +216,15 @@ *) fun get_calc (cI:calcID) = case assoc (!states, cI) of - NONE => raise error ("get_calc "^(string_of_int cI)^" not existent") + NONE => error ("get_calc "^(string_of_int cI)^" not existent") | SOME (c, _) => c; fun get_pos (cI:calcID) (uI:iterID) = case assoc (!states, cI) of - NONE => raise error ("get_pos: calc " ^ (string_of_int cI) + NONE => error ("get_pos: calc " ^ (string_of_int cI) ^ " not existent") | SOME (_, us) => (case assoc (us, uI) of - NONE => raise error ("get_pos: user " ^ (string_of_int uI) + NONE => error ("get_pos: user " ^ (string_of_int uI) ^ " not existent") | SOME p => p); @@ -271,27 +271,27 @@ fun overwrite2 (ps, (((uI:iterID), (pI:calcID)), p)) = let val new_ps = overwrite (the (assoc (ps, uI)), (pI, p)) in (overwrite (ps, (uI, new_ps))) - handle _ => raise error ("overwrite2 " ^ (string_of_int uI) ^ + handle _ => error ("overwrite2 " ^ (string_of_int uI) ^ " " ^ (string_of_int pI) ^ " not existent") end;*) fun overwrite2 (ps, (((cI:calcID), (uI:iterID)), p)) = case assoc (ps, cI) of NONE => - raise error ("overwrite2: calc " ^ (string_of_int uI) ^" not existent") + error ("overwrite2: calc " ^ (string_of_int uI) ^" not existent") | SOME (cs, us) => overwrite (ps, (cI ,(cs, overwrite (us, (uI, p))))); fun upd_calc (cI:calcID) cs = case assoc (!states, cI) of - NONE => raise error ("upd_calc "^(string_of_int cI)^" not existent") + NONE => error ("upd_calc "^(string_of_int cI)^" not existent") | SOME (_, us) => states:= overwrite (!states, (cI, (cs, us))); (*WN051210 testing before initac: only 1 taci in calcstate so far: fun upd_calc (cI:calcID) (cs as (_, tacis):calcstate) = (if length tacis > 1 - then raise error ("upd_calc, |tacis|>1: "^tacis2str tacis) + then error ("upd_calc, |tacis|>1: "^tacis2str tacis) else (); case assoc (!states, cI) of - NONE => raise error ("upd_calc "^(string_of_int cI)^" not existent") + NONE => error ("upd_calc "^(string_of_int cI)^" not existent") | SOME (_, us) => states:= overwrite (!states, (cI, (cs, us))) );*) @@ -304,7 +304,7 @@ fun upd_tacis (cI:calcID) tacis = case assoc (!states, cI) of NONE => - raise error ("upd_tacis: calctree "^(string_of_int cI)^" not existent") + error ("upd_tacis: calctree "^(string_of_int cI)^" not existent") | SOME ((ptp,_), us) => states:= overwrite (!states, (cI, ((ptp, tacis), us))); (*///7.10. @@ -314,7 +314,7 @@ fun upd_ipos (cI:calcID) (uI:iterID) (ip:pos') = case assoc (!states, cI) of NONE => - raise error ("upd_ipos: calctree "^(string_of_int cI)^" not existent") + error ("upd_ipos: calctree "^(string_of_int cI)^" not existent") | SOME (cs, us) => states:= overwrite2 (!states, ((cI, uI), ip)); @@ -348,7 +348,7 @@ fun add_user (cI:calcID) = case assoc (!states, cI) of NONE => - raise error ("add_user: calctree "^(string_of_int cI)^" not existent") + error ("add_user: calctree "^(string_of_int cI)^" not existent") | SOME (cs, us) => let val new_uI = new_key us 1 in states:= overwrite2 (!states, ((cI, new_uI), e_pos')); diff -r 95d956108461 -r 460c24a6a6ba src/Tools/isac/Interpret/appl.sml --- a/src/Tools/isac/Interpret/appl.sml Tue Sep 28 08:58:06 2010 +0200 +++ b/src/Tools/isac/Interpret/appl.sml Tue Sep 28 09:06:56 2010 +0200 @@ -13,7 +13,7 @@ (rew_ord',erls,ca) | rew_info (Rrls {erls,rew_ord=(rew_ord',_),calc=ca, ...}) = (rew_ord',erls, ca) - | rew_info rls = raise error ("rew_info called with '"^rls2str rls^"'"); + | rew_info rls = error ("rew_info called with '"^rls2str rls^"'"); (*FIXME.3.4.03:re-organize from_pblobj_or_detail_thm after rls' --> rls*) fun from_pblobj_or_detail_thm thm' p pt = @@ -107,7 +107,7 @@ in (bdv, pred) end | mk_set thy _ _ l _ = - raise error ("check_elementwise: no set "^ + error ("check_elementwise: no set "^ (Syntax.string_of_term (thy2ctxt thy) l)); (*> val consts = str2term "[x=#4]"; > val pred = str2term "Assumptions"; @@ -373,7 +373,7 @@ val (f,p) = case p_ of (*p 12.4.00 unnecessary*) Frm => (get_obj g_form pt p, p) | Res => ((fst o (get_obj g_result pt)) p, lev_on p) - | _ => raise error ("applicable_in: call by "^ + | _ => error ("applicable_in: call by "^ (pos'2str (p,p_))); in let val subst = subs2subst thy subs; @@ -400,7 +400,7 @@ val f = case p_ of Frm => get_obj g_form pt p | Res => (fst o (get_obj g_result pt)) p - | _ => raise error ("applicable_in Rewrite: call by "^ + | _ => error ("applicable_in Rewrite: call by "^ (pos'2str (p,p_))); in if msg = "OK" then @@ -429,7 +429,7 @@ val (f,p) = case p_ of (*p 12.4.00 unnecessary*) Frm => (get_obj g_form pt p, p) | Res => ((fst o (get_obj g_result pt)) p, lev_on p) - | _ => raise error ("applicable_in: call by "^ + | _ => error ("applicable_in: call by "^ (pos'2str (p,p_))); in case rewrite_ thy (assoc_rew_ord ro') erls (*put_asm*)false (assoc_thm' thy thm') f of @@ -448,7 +448,7 @@ val {rew_ord'=ro',...} = get_met (get_obj g_metID pt pp); val f = case p_ of Frm => get_obj g_form pt p | Res => (fst o (get_obj g_result pt)) p - | _ => raise error ("applicable_in: call by "^ + | _ => error ("applicable_in: call by "^ (pos'2str (p,p_))); in let val subst = subs2subst thy subs @@ -472,7 +472,7 @@ val (f,p) = case p_ of (*p 12.4.00 unnecessary*) Frm => (get_obj g_form pt p, p) | Res => ((fst o (get_obj g_result pt)) p, lev_on p) - | _ => raise error ("applicable_in: call by "^ + | _ => error ("applicable_in: call by "^ (pos'2str (p,p_))); in let val subst = subs2subst thy subs; @@ -493,7 +493,7 @@ val (f,p) = case p_ of (*p 12.4.00 unnecessary*) Frm => (get_obj g_form pt p, p) | Res => ((fst o (get_obj g_result pt)) p, lev_on p) - | _ => raise error ("applicable_in: call by "^ + | _ => error ("applicable_in: call by "^ (pos'2str (p,p_))); in case rewrite_set_ (assoc_thy thy') false (assoc_rls rls) f of SOME (f',asm) => @@ -511,7 +511,7 @@ val f = case p_ of Frm => get_obj g_form pt p | Res => (fst o (get_obj g_result pt)) p - | _ => raise error ("applicable_in: call by "^ + | _ => error ("applicable_in: call by "^ (pos'2str (p,p_))); in case rewrite_set_ (assoc_thy thy') false (assoc_rls rls) f of SOME (f',asm) => @@ -520,7 +520,7 @@ | applicable_in p pt (End_Ruleset) = - raise error ("applicable_in: not impl. for "^ + error ("applicable_in: not impl. for "^ (tac2str End_Ruleset)) (* val ((p,p_), pt, (m as Calculate op_)) = (p, pt, m); @@ -587,7 +587,7 @@ ------------------*) | applicable_in p pt (Apply_Assumption cts') = - (raise error ("applicable_in: not impl. for "^ + (error ("applicable_in: not impl. for "^ (tac2str (Apply_Assumption cts')))) (*'logical' applicability wrt. script in locate: Inconsistent?*) @@ -602,11 +602,11 @@ end | applicable_in p pt (Take_Inst ct') = - raise error ("applicable_in: not impl. for "^ + error ("applicable_in: not impl. for "^ (tac2str (Take_Inst ct'))) | applicable_in p pt (Group (con, ints)) = - raise error ("applicable_in: not impl. for "^ + error ("applicable_in: not impl. for "^ (tac2str (Group (con, ints)))) | applicable_in (p,p_) pt (m as Subproblem (domID, pblID)) = @@ -621,24 +621,24 @@ e_term, [], subpbl domID pblID)) | applicable_in p pt (End_Subproblem) = - raise error ("applicable_in: not impl. for "^ + error ("applicable_in: not impl. for "^ (tac2str (End_Subproblem))) | applicable_in p pt (CAScmd ct') = - raise error ("applicable_in: not impl. for "^ + error ("applicable_in: not impl. for "^ (tac2str (CAScmd ct'))) | applicable_in p pt (Split_And) = - raise error ("applicable_in: not impl. for "^ + error ("applicable_in: not impl. for "^ (tac2str (Split_And))) | applicable_in p pt (Conclude_And) = - raise error ("applicable_in: not impl. for "^ + error ("applicable_in: not impl. for "^ (tac2str (Conclude_And))) | applicable_in p pt (Split_Or) = - raise error ("applicable_in: not impl. for "^ + error ("applicable_in: not impl. for "^ (tac2str (Split_Or))) | applicable_in p pt (Conclude_Or) = - raise error ("applicable_in: not impl. for "^ + error ("applicable_in: not impl. for "^ (tac2str (Conclude_Or))) | applicable_in (p,p_) pt (Begin_Trans) = @@ -647,11 +647,11 @@ (*_____ implizit Take in gen*) Frm => (get_obj g_form pt p, (lev_on o lev_dn) p) | Res => ((fst o (get_obj g_result pt)) p, (lev_on o lev_dn o lev_on) p) - | _ => raise error ("applicable_in: call by "^ + | _ => error ("applicable_in: call by "^ (pos'2str (p,p_))); val thy' = get_obj g_domID pt (par_pblobj pt p); in (Appl (Begin_Trans' f)) - handle _ => raise error ("applicable_in: Begin_Trans finds \ + handle _ => error ("applicable_in: Begin_Trans finds \ \syntaxerror in '"^(term2str f)^"'") end (*TODO: check parent branches*) @@ -665,16 +665,16 @@ end | applicable_in p pt (Begin_Sequ) = - raise error ("applicable_in: not impl. for "^ + error ("applicable_in: not impl. for "^ (tac2str (Begin_Sequ))) | applicable_in p pt (End_Sequ) = - raise error ("applicable_in: not impl. for "^ + error ("applicable_in: not impl. for "^ (tac2str (End_Sequ))) | applicable_in p pt (Split_Intersect) = - raise error ("applicable_in: not impl. for "^ + error ("applicable_in: not impl. for "^ (tac2str (Split_Intersect))) | applicable_in p pt (End_Intersect) = - raise error ("applicable_in: not impl. for "^ + error ("applicable_in: not impl. for "^ (tac2str (End_Intersect))) (* val Appl (Check_elementwse'(t1,"Assumptions",t2)) = it; val (vvv,ppp) = vp; @@ -735,7 +735,7 @@ end | applicable_in p pt (Collect_Trues) = - raise error ("applicable_in: not impl. for "^ + error ("applicable_in: not impl. for "^ (tac2str (Collect_Trues))) | applicable_in p pt (Empty_Tac) = @@ -771,12 +771,12 @@ | applicable_in p pt End_Proof' = Appl End_Proof'' | applicable_in _ _ m = - raise error ("applicable_in called for "^(tac2str m)); + error ("applicable_in called for "^(tac2str m)); (*WN060614 unused*) fun tac2tac_ pt p m = case applicable_in p pt m of Appl (m') => m' - | Notappl _ => raise error ("tac2mstp': fails with"^ + | Notappl _ => error ("tac2mstp': fails with"^ (tac2str m)); diff -r 95d956108461 -r 460c24a6a6ba src/Tools/isac/Interpret/calchead.sml --- a/src/Tools/isac/Interpret/calchead.sml Tue Sep 28 08:58:06 2010 +0200 +++ b/src/Tools/isac/Interpret/calchead.sml Tue Sep 28 09:06:56 2010 +0200 @@ -249,7 +249,7 @@ (*FIXXXME.WN020430 intermediate hack for fun ass_up*) fun f_mout thy (Form' (FormKF (_,_,_,_,f))) = (term_of o the o (parse thy)) f - | f_mout thy _ = raise error "f_mout: not called with formula"; + | f_mout thy _ = error "f_mout: not called with formula"; (*.is the calchead complete ?.*) @@ -434,7 +434,7 @@ (* 30.1.00 --- fun ct_in (Syn (c)) = c | ct_in (Typ (c)) = c - | ct_in _ = raise error "ct_in called for Cor .. Sup"; + | ct_in _ = error "ct_in called for Cor .. Sup"; --- *) (*#############################################################*) @@ -560,7 +560,7 @@ case find_first (test_subset (hd icl)) vors of (* val SOME ori = find_first (test_subset (hd icl)) vors; *) - NONE => raise error "nxt_add: EX itm. not(dat(itm)<=dat(ori))" + NONE => error "nxt_add: EX itm. not(dat(itm)<=dat(ori))" | SOME ori => SOME (geti_ct thy ori (hd icl)) end end; @@ -571,12 +571,12 @@ | mk_delete thy "#Find" itm_ = Del_Find (itm_out thy itm_) | mk_delete thy "#Relate" itm_ = Del_Relation(itm_out thy itm_) | mk_delete thy str _ = - raise error ("mk_delete: called with field '"^str^"'"); + error ("mk_delete: called with field '"^str^"'"); fun mk_additem "#Given" ct = Add_Given ct | mk_additem "#Find" ct = Add_Find ct | mk_additem "#Relate"ct = Add_Relation ct | mk_additem str _ = - raise error ("mk_additem: called with field '"^str^"'"); + error ("mk_additem: called with field '"^str^"'"); @@ -686,10 +686,10 @@ fun update_itm (cl,d,ts) ((id,vt,_,sl,Cor (_,_)):itm) = (id,vt,cl,sl,Cor (d,ts)):itm | update_itm (cl,d,ts) (id,vt,_,sl,Syn (_)) = - raise error ("update_itm "^((Syntax.string_of_term (thy2ctxt thy)) (comp_dts thy (d,ts)))^ + error ("update_itm "^((Syntax.string_of_term (thy2ctxt thy)) (comp_dts thy (d,ts)))^ " not not for Syn (s:cterm')") | update_itm (cl,d,ts) (id,vt,_,sl,Typ (_)) = - raise error ("update_itm "^((Syntax.string_of_term (thy2ctxt thy)) (comp_dts thy (d,ts)))^ + error ("update_itm "^((Syntax.string_of_term (thy2ctxt thy)) (comp_dts thy (d,ts)))^ " not not for Typ (s:cterm')") | update_itm (cl,d,ts) (id,vt,_,sl,Fal (_,_)) = (id,vt,cl,sl,Fal (d,ts)) @@ -721,8 +721,8 @@ (Cor _) => (if fd = "#undef" then (id,vt,complete,fd,Sup(d,ts')) else (id,vt,complete,fd,Cor((d,ts'),(pid, pval)))):itm - | (Syn c) => raise error ("ori_2itm wants to overwrite "^c) - | (Typ c) => raise error ("ori_2itm wants to overwrite "^c) + | (Syn c) => error ("ori_2itm wants to overwrite "^c) + | (Typ c) => error ("ori_2itm wants to overwrite "^c) | (Inc _) => if complete then (id,vt,true ,fd, Cor ((d,ts'),(pid, pval))) else (id,vt,false,fd, Inc ((d,ts'),(pid, pval))) @@ -790,7 +790,7 @@ -fun maxl [] = raise error "maxl of []" +fun maxl [] = error "maxl of []" | maxl (y::ys) = let fun mx x [] = x | mx x (y::ys) = if x < (y:int) then mx y ys else mx x ys @@ -973,7 +973,7 @@ fun matc thy ([]:pat list) _ (oris:preori list) = oris | matc thy pbt [] _ = (tracing (dashs 70); - raise error ("actual arg(s) missing for '"^pats2str pbt + error ("actual arg(s) missing for '"^pats2str pbt ^"' i.e. should be 'copy-named' by '*_._'")) | matc thy ((p as (s,(d,t)))::pbt) (a::ags) oris = (* val (thy, ((p as (s,(d,t)))::pbt), (a::ags), oris) = @@ -1019,7 +1019,7 @@ in ([1], field, dsc, [mk_free (type_of t) cy_ext]):preori end else ([1], field, dsc, [t]) ) - handle _ => raise error ("cpy_nam: for "^(term2str t)); + handle _ => error ("cpy_nam: for "^(term2str t)); (*.match the actual arguments of a SubProblem with a model-pattern and create an ori list (in root-pbl created from formalization). @@ -1063,7 +1063,7 @@ fun overwrite_ppc thy itm ppc = let fun repl ppc' (_,_,_,_,itm_) [] = - raise error ("overwrite_ppc: " ^ (itm_2str_ (thy2ctxt thy) itm_) ^ + error ("overwrite_ppc: " ^ (itm_2str_ (thy2ctxt thy) itm_) ^ " not found") | repl ppc' itm (p::ppc) = if (#1 itm) = (#1 (p:itm)) then ppc' @ [itm] @ ppc @@ -1106,7 +1106,7 @@ fun header p_ pI mI = case p_ of Pbl => Problem (if pI = e_pblID then [] else pI) | Met => Method mI - | pos => raise error ("header called with "^ pos_2str pos); + | pos => error ("header called with "^ pos_2str pos); @@ -1395,7 +1395,7 @@ (* itms2itemppc thy [](*mpc*) pre *) | specify m' _ _ _ = - raise error ("specify: not impl. for "^tac_2str m'); + error ("specify: not impl. for "^tac_2str m'); (* val (sel, Add_Given ct, ptp as (pt,(p,Pbl))) = ("#Given", tac, ptp); val (sel, Add_Find ct, ptp as (pt,(p,Pbl))) = ("#Find", tac, ptp); @@ -1466,7 +1466,7 @@ *) fun ori2Coritm pbt ((i,v,f,d,ts):ori) = (i,v,true,f, Cor ((d,ts),(((snd o snd o the o (find_first (eq1 d))) pbt) - handle _ => raise error ("ori2Coritm: dsc "^ + handle _ => error ("ori2Coritm: dsc "^ term2str d^ "in ori, but not in pbt") ,ts))):itm; @@ -1645,7 +1645,7 @@ (pt, pos)) end | nxt_specif m' _ = - raise error ("nxt_specif: not impl. for "^tac2str m'); + error ("nxt_specif: not impl. for "^tac2str m'); (*.get the values from oris; handle the term list w.r.t. penv.*) @@ -1732,7 +1732,7 @@ (let val gf = (head_of given) $ formal; val _ = cterm_of thy gf in gf end) - handle _ => raise error ("calchead.tag_form: " ^ + handle _ => error ("calchead.tag_form: " ^ Syntax.string_of_term (thy2ctxt thy) given ^ " .. " ^ Syntax.string_of_term (thy2ctxt thy) formal ^ @@ -1857,7 +1857,7 @@ | _ => (snd3 o hd o fst3) (nxt_specif Model_Problem ptp)) (*all stored in tac_ itms ^^^^^^^^^^*) | nxt_model_pbl tac_ _ = - raise error ("nxt_model_pbl: called by tac= "^tac_2str tac_); + error ("nxt_model_pbl: called by tac= "^tac_2str tac_); (* run subp_rooteq.sml '' until nxt=("Subproblem",Subproblem ("SqRoot.thy",["univariate","equation"])) > val (_, (Subproblem'((_,pblID,metID),_,_,_,_),_,_,_,_,_)) = @@ -1901,7 +1901,7 @@ in (pt, (p,Met):pos') end ; (*| complete_mod (pt, pos as (p, Met):pos') = - raise error ("###complete_mod: only impl.for Pbl, called with "^ + error ("###complete_mod: only impl.for Pbl, called with "^ pos'2str pos);*) (*.complete _EMPTY_ calc-head for autocalc (sub-)pbl from oris(+met from fmz); @@ -1926,19 +1926,19 @@ fun is_complete_mod (pt, pos as (p, Pbl): pos') = if (is_pblobj o (get_obj I pt)) p then (is_complete_mod_ o (get_obj g_pbl pt)) p - else raise error ("is_complete_mod: called by PrfObj at "^pos'2str pos) + else error ("is_complete_mod: called by PrfObj at "^pos'2str pos) | is_complete_mod (pt, pos as (p, Met)) = if (is_pblobj o (get_obj I pt)) p then (is_complete_mod_ o (get_obj g_met pt)) p - else raise error ("is_complete_mod: called by PrfObj at "^pos'2str pos) + else error ("is_complete_mod: called by PrfObj at "^pos'2str pos) | is_complete_mod (_, pos) = - raise error ("is_complete_mod called by "^pos'2str pos^ + error ("is_complete_mod called by "^pos'2str pos^ " (should be Pbl or Met)"); (*.have (thy, pbl, met) _all_ been specified explicitly ?.*) fun is_complete_spec (pt, pos as (p,_): pos') = if (not o is_pblobj o (get_obj I pt)) p - then raise error ("is_complete_spec: called by PrfObj at "^pos'2str pos) + then error ("is_complete_spec: called by PrfObj at "^pos'2str pos) else let val (dI,pI,mI) = get_obj g_spec pt p in dI<>e_domID andalso pI<>e_pblID andalso mI<>e_metID end; (*.complete empty items in specification from origin (pbl, met ev.refined); diff -r 95d956108461 -r 460c24a6a6ba src/Tools/isac/Interpret/ctree.sml --- a/src/Tools/isac/Interpret/ctree.sml Tue Sep 28 08:58:06 2010 +0200 +++ b/src/Tools/isac/Interpret/ctree.sml Tue Sep 28 09:06:56 2010 +0200 @@ -303,7 +303,7 @@ fun new_val v (ScrState (env, loc_, topt, _, safe, bool)) = (ScrState (env, loc_, topt, v, safe, bool)) - | new_val _ _ = raise error "new_val: only for ScrState"; + | new_val _ _ = error "new_val: only for ScrState"; datatype con = land | lor; @@ -500,7 +500,7 @@ fun rls_of (Rewrite_Set_Inst (_, rls)) = rls | rls_of (Rewrite_Set rls) = rls - | rls_of tac = raise error ("rls_of: called with tac '"^tac2IDstr tac^"'"); + | rls_of tac = error ("rls_of: called with tac '"^tac2IDstr tac^"'"); fun thm_of_rew (Rewrite_Inst (subs,(thmID,_))) = (thmID, SOME ((subs2subst (assoc_thy "Isac.thy") subs):subst)) @@ -522,7 +522,7 @@ | rule2tac subst (Rls_ rls) = Rewrite_Set_Inst (subst2subs subst, (id_rls rls)) | rule2tac _ rule = - raise error ("rule2tac: called with '" ^ rule2str rule ^ "'"); + error ("rule2tac: called with '" ^ rule2str rule ^ "'"); type fmz_ = cterm' list; @@ -834,7 +834,7 @@ (*4.4.00*) fun lev_up_ ((p,Res):pos') = (lev_up p,Res):pos' - | lev_up_ p' = raise error ("lev_up_: called for "^(pos'2str p')); + | lev_up_ p' = error ("lev_up_: called for "^(pos'2str p')); fun lev_dn_ ((p,_):pos') = (lev_dn p,Res):pos' fun ind ((p,_):pos') = length p; (*WN050108 deprecated in favour of lev_of*) fun lev_of ((p,_):pos') = length p; @@ -1478,17 +1478,17 @@ fun get_somespec ((dI,pI,mI):spec) ((dI',pI',mI'):spec) = let val domID = if dI = e_domID then if dI' = e_domID - then raise error"pt_extract: no domID in probl,origin" + then error"pt_extract: no domID in probl,origin" else dI' else dI val pblID = if pI = e_pblID then if pI' = e_pblID - then raise error"pt_extract: no pblID in probl,origin" + then error"pt_extract: no pblID in probl,origin" else pI' else pI val metID = if mI = e_metID then if pI' = e_metID - then raise error"pt_extract: no metID in probl,origin" + then error"pt_extract: no metID in probl,origin" else mI' else mI in (domID, pblID, metID):spec end; @@ -1735,12 +1735,12 @@ | lev_on' pt (p, Res) = if get_obj g_res pt p = get_obj g_form pt (lev_on p)(*TransitiveB*) then if existpt' (lev_on p, Res) pt then (lev_on p, Res) - else raise error ("lev_on': (p, Res) -> (p, Res) not existent, \ + else error ("lev_on': (p, Res) -> (p, Res) not existent, \ \p = "^ints2str' (lev_on p)) else (lev_on p, Frm) | lev_on' pt (p, _) = if existpt' (p, Res) pt then (p, Res) - else raise error ("lev_on': (p, Frm) -> (p, Res) not existent, \ + else error ("lev_on': (p, Frm) -> (p, Res) not existent, \ \p = "^ints2str' p); fun exist_lev_on' pt p = (lev_on' pt p; true) handle _ => false; @@ -2150,5 +2150,5 @@ (*.get the theory explicitly specified for the rootpbl; thus use this function _after_ finishing specification.*) fun rootthy (Nd (PblObj {spec=(thyID, _, _),...}, _)) = assoc_thy thyID - | rootthy _ = raise error "rootthy"; + | rootthy _ = error "rootthy"; diff -r 95d956108461 -r 460c24a6a6ba src/Tools/isac/Interpret/generate.sml --- a/src/Tools/isac/Interpret/generate.sml Tue Sep 28 08:58:06 2010 +0200 +++ b/src/Tools/isac/Interpret/generate.sml Tue Sep 28 09:06:56 2010 +0200 @@ -12,14 +12,14 @@ (* val Rrls {scr=sc as Rfuns {init_state=ii,...},...} = assoc_rls rls; *) | Rls {scr=EmptyScr,...} => - raise error ("interSteps>..>init_istate: \""^rls^"\" has EmptyScr." + error ("interSteps>..>init_istate: \""^rls^"\" has EmptyScr." ^"use prep_rls for storing rule-sets !") | Rls {scr=Script s,...} => (* val Rls {scr=Script s,...} = assoc_rls rls; *) (ScrState ([(one_scr_arg s, t)], [], NONE, e_term, Sundef, true)) | Seq {scr=EmptyScr,...} => - raise error ("interSteps>..>init_istate: \""^rls^"\" has EmptyScr." + error ("interSteps>..>init_istate: \""^rls^"\" has EmptyScr." ^"use prep_rls for storing rule-sets !") | Seq {srls=srls,scr=Script s,...} => (ScrState ([(one_scr_arg s, t)], [], NONE, e_term, Sundef, true))) @@ -29,13 +29,13 @@ let val (_, v)::_ = subs2subst (assoc_thy "Isac.thy") subs in case assoc_rls rls of Rls {scr=EmptyScr,...} => - raise error ("interSteps>..>init_istate: \""^rls^"\" has EmptyScr." + error ("interSteps>..>init_istate: \""^rls^"\" has EmptyScr." ^"use prep_rls for storing rule-sets !") | Rls {scr=Script s,...} => let val (a1, a2) = two_scr_arg s in (ScrState ([(a1, v), (a2, t)],[], NONE, e_term, Sundef,true)) end | Seq {scr=EmptyScr,...} => - raise error ("interSteps>..>init_istate: \""^rls^"\" has EmptyScr." + error ("interSteps>..>init_istate: \""^rls^"\" has EmptyScr." ^"use prep_rls for storing rule-sets !") (* val Seq {scr=Script s,...} = assoc_rls rls; *) @@ -53,14 +53,14 @@ (* val Rrls {scr=sc as Rfuns {init_state=ii,...},...} = assoc_rls rls; *) | Rls {scr=EmptyScr,...} => - raise error ("interSteps>..>init_istate: \""^rls^"\" has EmptyScr." + error ("interSteps>..>init_istate: \""^rls^"\" has EmptyScr." ^"use prep_rls for storing rule-sets !") | Rls {scr=Script s,...} => (* val Rls {scr=Script s,...} = assoc_rls rls; *) (ScrState ([(one_scr_arg s, t)], [], NONE, e_term, Sundef, true)) | Seq {scr=EmptyScr,...} => - raise error ("interSteps>..>init_istate: \""^rls^"\" has EmptyScr." + error ("interSteps>..>init_istate: \""^rls^"\" has EmptyScr." ^"use prep_rls for storing rule-sets !") | Seq {srls=srls,scr=Script s,...} => (ScrState ([(one_scr_arg s, t)], [], NONE, e_term, Sundef, true))) @@ -71,14 +71,14 @@ (*...we suppose the substitution of only _one_ bound variable*) in case assoc_rls rls of Rls {scr=EmptyScr,...} => - raise error ("interSteps>..>init_istate: \""^rls^"\" has EmptyScr." + error ("interSteps>..>init_istate: \""^rls^"\" has EmptyScr." ^"use prep_rls for storing rule-sets !") | Rls {scr=Script s,...} => let val (form, bdv) = two_scr_arg s in (ScrState ([(form, t), (bdv, v)],[], NONE, e_term, Sundef,true)) end | Seq {scr=EmptyScr,...} => - raise error ("interSteps>..>init_istate: \""^rls^"\" has EmptyScr." + error ("interSteps>..>init_istate: \""^rls^"\" has EmptyScr." ^"use prep_rls for storing rule-sets !") (* val Seq {scr=Script s,...} = assoc_rls rls; *) @@ -482,14 +482,14 @@ in ((p,Pbl), c, Form' (FormKF (~1,EdUndef,(length p), Nundef, f)), pt) end | generate1 thy m' _ _ _ = - raise error ("generate1: not impl.for "^(tac_2str m')) + error ("generate1: not impl.for "^(tac_2str m')) ; fun generate_hard thy m' (p,p_) pt = let val p = case p_ of Frm => p | Res => lev_on p - | _ => raise error ("generate_hard: call by "^(pos'2str (p,p_))); + | _ => error ("generate_hard: call by "^(pos'2str (p,p_))); in generate1 thy m' e_istate (p,p_) pt end; @@ -539,7 +539,7 @@ fun res_from_taci (_, Rewrite'(_,_,_,_,_,_,(res, asm)), _) = (res, asm) | res_from_taci (_, Rewrite_Set'(_,_,_,_,(res, asm)), _) = (res, asm) | res_from_taci (_, tac_, _) = - raise error ("res_from_taci: called with" ^ tac_2str tac_); + error ("res_from_taci: called with" ^ tac_2str tac_); (*.embed the tacis created by a '_deriv'ation; sys.form <> input.form tacis are in order, thus are reverted for generate.*) diff -r 95d956108461 -r 460c24a6a6ba src/Tools/isac/Interpret/inform.sml --- a/src/Tools/isac/Interpret/inform.sml Tue Sep 28 08:58:06 2010 +0200 +++ b/src/Tools/isac/Interpret/inform.sml Tue Sep 28 09:06:56 2010 +0200 @@ -252,7 +252,7 @@ (*this ^ should raise the exn on unability of re-parsing dts*) in itm end handle _ => ((i,v,false,f, Syn (term2str t)):itm)) | parsitm dI (itm as (i,v,_,f, Par _)) = - raise error ("parsitm (" ^ itm2str_ (thy2ctxt dI) itm^ + error ("parsitm (" ^ itm2str_ (thy2ctxt dI) itm^ "): Par should be internal"); (*separate a list to a pair of elements that do NOT satisfy the predicate, @@ -294,7 +294,7 @@ ("",itm) => itm (* val (msg,xx) = is_notyet_input thy ppc all ori' pbt; *) - | (msg,_) => raise error ("appl_add': "^msg)) + | (msg,_) => error ("appl_add': "^msg)) (* val (msg,(_,_,_,d,ts),all) = is_known thy sel oris (term_of ct); *) | (msg,(i,v,_,d,ts),_) => @@ -392,7 +392,7 @@ fun par2fstr ((_,_,_,f, Par s):itm) = (f, s) - | par2fstr itm = raise error ("par2fstr: called with " ^ + | par2fstr itm = error ("par2fstr: called with " ^ itm2str_ (thy2ctxt' "Isac") itm); fun itms2fstr ((_,_,_,f, Cor ((d,ts),_)):itm) = (f, comp_dts'' (d,ts)) | itms2fstr (_,_,_,f, Syn str) = (f, str) @@ -401,7 +401,7 @@ | itms2fstr (_,_,_,f, Sup (d,ts)) = (f, comp_dts'' (d,ts)) | itms2fstr (_,_,_,f, Mis (d,t)) = (f, term2str (d $ t)) | itms2fstr (itm as (_,_,_,f, Par _)) = - raise error ("parsitm ("^itm2str_ (thy2ctxt' "Isac") itm ^ + error ("parsitm ("^itm2str_ (thy2ctxt' "Isac") itm ^ "): Par should be internal"); fun imodel2fstr iitems = @@ -479,7 +479,7 @@ Met, hdf', mits, pre, spec):ocalhd) end end end | input_icalhd pt ((p,_), hdf, imodel, _(*Met*), spec as (dI,pI,mI)) = - raise error "input_icalhd Met not impl."; + error "input_icalhd Met not impl."; (***. handle an input formula .***) @@ -562,13 +562,13 @@ if equal f1 i1 then if equal f2 i2 then dropwhile' equal (f2::fs) (i2::is) else (rev (f1::f2::fs), i1::i2::is) - else raise error "dropwhile': did not start with equal elements" + else error "dropwhile': did not start with equal elements" | dropwhile' equal (f::fs) [i] = if equal f i then (rev (f::fs), [i]) - else raise error "dropwhile': did not start with equal elements" + else error "dropwhile': did not start with equal elements" | dropwhile' equal [f] (i::is) = if equal f i then ([f], i::is) - else raise error "dropwhile': did not start with equal elements"; + else error "dropwhile': did not start with equal elements"; (* fun equal a b = a=b; val foder = [0,1,2,3,4,5]; val ifoder = [11,12,3,4,5]; diff -r 95d956108461 -r 460c24a6a6ba src/Tools/isac/Interpret/mathengine.sml --- a/src/Tools/isac/Interpret/mathengine.sml Tue Sep 28 08:58:06 2010 +0200 +++ b/src/Tools/isac/Interpret/mathengine.sml Tue Sep 28 09:06:56 2010 +0200 @@ -140,7 +140,7 @@ (*----------------------------------------------------from solve.sml*) | nxt_solv (Detail_Set'(thy', rls, t)) (pt, p) = let (*val rls = the (assoc(!ruleset',rls')) - handle _ => raise error ("solve: '"^rls'^"' not known");*) + handle _ => error ("solve: '"^rls'^"' not known");*) val thy = assoc_thy thy'; val (srls, sc, is) = case rls of @@ -154,7 +154,7 @@ val nx = (tac_2tac o fst3) (next_tac (thy',srls) (pt,p) sc is); val aopt = applicable_in p pt nx; in case aopt of - Notappl s => raise error ("solve Detail_Set: "^s) + Notappl s => error ("solve Detail_Set: "^s) (* val Appl m = aopt; *) | Appl m => solve ("discardFIXME",m) p pt end @@ -473,16 +473,16 @@ | ("unsafe-ok", (_, _, ptp)) => ptp | ("not-applicable",_) => (pt, p) | ("end-of-calculation", (_, _, ptp)) => ptp - | ("failure",_) => raise error "sys-error"; + | ("failure",_) => error "sys-error"; val (_, ts) = (* val (eee, (ts, _, (pt'',_))) = step p ((pt, e_pos'),[]); *) (case step p ((pt, e_pos'),[]) of ("ok", (ts as (tac,_,_)::_, _, _)) => ("",ts) | ("helpless",_) => ("helpless: cannot propose tac", []) - | ("no-fmz-spec",_) => raise error "no-fmz-spec" + | ("no-fmz-spec",_) => error "no-fmz-spec" | ("end-of-calculation", (ts, _, _)) => ("",ts)) - handle _ => raise error "sys-error"; + handle _ => error "sys-error"; val tac = case ts of tacis as (_::_) => (* val tacis as (_::_) = ts; *) diff -r 95d956108461 -r 460c24a6a6ba src/Tools/isac/Interpret/mstools.sml --- a/src/Tools/isac/Interpret/mstools.sml Tue Sep 28 08:58:06 2010 +0200 +++ b/src/Tools/isac/Interpret/mstools.sml Tue Sep 28 09:06:56 2010 +0200 @@ -210,7 +210,7 @@ (theory "Isac") (*comp_dts:FIXXME stay with term for efficiency !!*) (d $ (comp_ts (d, ts))) - handle _ => raise error ("comp_dts: "^(term2str d)^ + handle _ => error ("comp_dts: "^(term2str d)^ " $ "^(term2str (hd ts))));*) fun comp_dts thy (d,[]) = (if is_reall_dsc d then (d $ e_listReal) @@ -218,7 +218,7 @@ else d) | comp_dts thy (d,ts) = (d $ (comp_ts (d, ts))) - handle _ => raise error ("comp_dts: "^(term2str d)^ + handle _ => error ("comp_dts: "^(term2str d)^ " $ "^(term2str (hd ts))); (*25.8.03*) fun comp_dts' (d,[]) = @@ -226,7 +226,7 @@ else if is_booll_dsc d then (d $ e_listBool) else d | comp_dts' (d,ts) = (d $ (comp_ts (d, ts))) - handle _ => raise error ("comp_dts': "^(term2str d)^ + handle _ => error ("comp_dts': "^(term2str d)^ " $ "^(term2str (hd ts))); (*val t = str2term "maximum A"; > val (d,ts) = split_dts thy t; comp_dts thy (d,ts); @@ -288,7 +288,7 @@ else if is_booll_dsc d then term2str (d $ e_listBool) else term2str d | comp_dts'' (d,ts) = term2str (d $ (comp_ts (d, ts))) - handle _ => raise error ("comp_dts'': "^(term2str d)^ + handle _ => error ("comp_dts'': "^(term2str d)^ " $ "^(term2str (hd ts))); @@ -387,7 +387,7 @@ (*. 14.9.01: not used after putting penv-values into itm_ make the result of split_* a value of problem-environment .*) -fun mkval dsc [] = raise error "mkval called with []" +fun mkval dsc [] = error "mkval called with []" | mkval dsc [t] = t | mkval dsc ts = list2isalist ((type_of o hd) ts) ts; (*WN.12.12.03*) @@ -398,7 +398,7 @@ (*. get the constant value from a penv .*) fun getval (id, values) = case values of - [] => raise error ("penv_value: no values in '"^ + [] => error ("penv_value: no values in '"^ (Syntax.string_of_term (thy2ctxt' "Tools") id)) | [v] => (id, v) | (v1::v2::_) => (case v1 of @@ -523,7 +523,7 @@ fun cnt itms v = (v,(length o (filter (curry op= v)) o flat o (map #2)) (itms:itm list)); fun vts_cnt vts itms = map (cnt itms) vts; -fun max2 [] = raise error "max2 of []" +fun max2 [] = error "max2 of []" | max2 (y::ys) = let fun mx (a,x) [] = (a,x) | mx (a,x) ((b,y)::ys) = @@ -594,7 +594,7 @@ then [v] (*eg. [r=Arbfix]*) else (case v of (*eg. eps=#0*) (Const ("op =",_) $ l $ r) => [r,l] - | _ => raise error ("pbl_ids Tools.nam: no equality " + | _ => error ("pbl_ids Tools.nam: no equality " ^(Syntax.string_of_term ctxt v))) | pbl_ids ctxt (Const(_,Type("fun",[_,Type("Tools.una",_)]))) v = [v] | pbl_ids ctxt (Const(_,Type("fun",[_,Type("Tools.unl",_)]))) v = [v] @@ -602,7 +602,7 @@ | pbl_ids ctxt (Const(_,Type("fun",[_,Type("Tools.toreal",_)]))) v = [v] | pbl_ids ctxt (Const(_,Type("fun",[_,Type("Tools.toreall",_)])))v = [v] | pbl_ids ctxt (Const(_,Type("fun",[_,Type("Tools.unknown",_)])))v = [v] - | pbl_ids ctxt _ v = raise error ("pbl_ids: not implemented for " + | pbl_ids ctxt _ v = error ("pbl_ids: not implemented for " ^(Syntax.string_of_term ctxt v)); (* val t as t1 $ t2 = str2term "antiDerivativeName M_b"; @@ -637,10 +637,10 @@ (*28.8.01: .nam and .una impl. properly, others copied .. TODO*) fun pbl_ids' (Const(_,Type("fun",[_,Type("Tools.nam",_)]))) vs = (case vs of - [] => raise error ("pbl_ids' Tools.nam called with []") + [] => error ("pbl_ids' Tools.nam called with []") | [t] => (case t of (*eg. eps=#0*) (Const ("op =",_) $ l $ r) => [r,l] - | _ => raise error ("pbl_ids' Tools.nam: no equality " + | _ => error ("pbl_ids' Tools.nam: no equality " ^(Syntax.string_of_term (thy2ctxt' "Isac")t))) | vs' => vs (*14.9.01: ???TODO *)) | pbl_ids' (Const(_,Type("fun",[_,Type("Tools.una",_)]))) vs = vs @@ -650,7 +650,7 @@ | pbl_ids' (Const(_,Type("fun",[_,Type("Tools.toreall",_)])))vs = vs | pbl_ids' (Const(_,Type("fun",[_,Type("Tools.unknown",_)])))vs = vs | pbl_ids' _ vs = - raise error ("pbl_ids': not implemented for " + error ("pbl_ids': not implemented for " ^(terms2str vs)); (*9.5.03 penv postponed: pbl_ids'*) fun pbl_ids' thy d vs = [comp_ts (d, vs)]; diff -r 95d956108461 -r 460c24a6a6ba src/Tools/isac/Interpret/ptyps.sml --- a/src/Tools/isac/Interpret/ptyps.sml Tue Sep 28 08:58:06 2010 +0200 +++ b/src/Tools/isac/Interpret/ptyps.sml Tue Sep 28 09:06:56 2010 +0200 @@ -59,7 +59,7 @@ | "#Find" => #Find (ppc:'a ppc) | "#With" => #With (ppc:'a ppc) | "#Relate" => #Relate (ppc:'a ppc) - | _ => raise error ("sel_ppc tried to select by '"^sel^"'"); + | _ => error ("sel_ppc tried to select by '"^sel^"'"); fun repl_sel_ppc sel ({Given=gi,Where=wh,Find=fi,With=wi,Relate=re}:'a ppc) x = @@ -69,7 +69,7 @@ | "#Find" => {Given=gi,Where=wh,Find= x,With=wi,Relate=re} | "#With" => {Given=gi,Where=wh,Find=fi,With= x,Relate=re} | "#Relate" => {Given=gi,Where=wh,Find=fi,With=wi,Relate= x} - | _ => raise error ("repl_sel_ppc tried to select by '"^sel^"'"); + | _ => error ("repl_sel_ppc tried to select by '"^sel^"'"); fun add_sel_ppc thy sel ({Given=gi,Where=wh,Find=fi,With=wi,Relate=re}:'a ppc) x = @@ -79,7 +79,7 @@ | "#Find" => {Given=gi,Where=wh,Find=fi@[x],With=wi,Relate=re} | "#Relate"=> {Given=gi,Where=wh,Find=fi,With=wi,Relate=re@[x]} | "#undef" => {Given=gi@[x],Where=wh,Find=fi,With=wi,Relate=re}(*ori2itmSup*) - | _ => raise error ("add_sel_ppc tried to select by '"^sel^"'"); + | _ => error ("add_sel_ppc tried to select by '"^sel^"'"); fun add_where ({Given=gi,Find=fi,With=wi,Relate=re,...}:'a ppc) wh = ({Given=gi,Where=wh,Find=fi,With=wi,Relate=re}:'a ppc); @@ -98,7 +98,7 @@ then (hd, args) else (e_term, [t]) (*??? 9.01 just copied*) end) - handle _ => raise error ("split_dsc: called with "^ + handle _ => error ("split_dsc: called with "^ (Syntax.string_of_term (thy2ctxt' "Isac") t)); (* > val t1 = (term_of o the o (parse thy)) "errorBound err_"; @@ -120,7 +120,7 @@ fun split_dsc' t = (let val dsc $ var = t in var end) - handle _ => raise error ("split_dsc': called with "^term2str t); + handle _ => error ("split_dsc': called with "^term2str t); (*9.3.00*) (* split a term into description and (id | structured variable) @@ -128,7 +128,7 @@ fun split_did t = (let val (hd,[arg]) = strip_comb t in (hd,arg) end) - handle _ => raise error ("split_did: doesn't match (hd,[arg]) for t = " + handle _ => error ("split_did: doesn't match (hd,[arg]) for t = " ^(Syntax.string_of_term (thy2ctxt' "Script") t)); @@ -198,7 +198,7 @@ else if d mem (get_dsc_in dscs "#Relate") then ("#Relate",d,ts) else ("#undef",d,ts); -(* 28.1.00 raise error ("add_field: '"^ +(* 28.1.00 error ("add_field: '"^ (Syntax.string_of_term (thy2ctxt' "Isac") d)^ "' not in ppc-description "); *) ------9.3. *) @@ -210,7 +210,7 @@ in case filter (eq d) pbt of [(fi,(dsc,_))] => (fi,d,ts) | [] => ("#undef",d,ts) (*may come with met.ppc*) - | _ => raise error ("add_field: "^ + | _ => error ("add_field: "^ (Syntax.string_of_term (thy2ctxt' "Isac") d)^ " more than once in pbt") end; @@ -225,10 +225,10 @@ case filter (eq d) mpc of [(fi,(dsc,_))] => [(i,v,fi,d,ts)] | [] => [] (*25.2.02: dsc in ori, but not in met -> superfluous*) - (*raise error ("add_field': "^ + (*error ("add_field': "^ (Syntax.string_of_term (thy2ctxt' "Isac") d)^ " not in met"*) - | _ => raise error ("add_field': "^ + | _ => error ("add_field': "^ (Syntax.string_of_term (thy2ctxt' "Isac") d)^ " more than once in met"); in (flat ((map (repl mpc)) ori)):ori list end; @@ -236,7 +236,7 @@ (*.mark an element with the position within a plateau; a plateau with length 1 is marked with 0 .*) -fun mark eq [] = raise error "mark []" +fun mark eq [] = error "mark []" | mark eq xs = let fun mar xx eq [x] n = xx @ [(if n=1 then 0 else n,x)] @@ -272,12 +272,12 @@ val it = [1,2,4] : int list *) -fun max [] = raise error "max of []" +fun max [] = error "max of []" | max (y::ys) = let fun mx x [] = x | mx x (y::ys) = if x < y then mx y ys else mx x ys; in mx y ys end; -fun gen_max _ [] = raise error "gen_max of []" +fun gen_max _ [] = error "gen_max of []" | gen_max ord (y::ys) = let fun mx x [] = x | mx x (y::ys) = if ord (x, y) then mx y ys else mx x ys; @@ -301,7 +301,7 @@ fun replace_0 vm [0] = intsto vm | replace_0 vm vs = vs; -fun add_id [] = raise error "add_id []" +fun add_id [] = error "add_id []" | add_id xs = let fun add n [] = [] | add n (x::xs) = (n,x) :: add (n+1) xs; @@ -338,7 +338,7 @@ val ctopts = map (parse thy) fmz val _= (*FIXME.WN060916 improve error report*) if null (filter is_none ctopts) then () - else raise error ("prep_ori: SYNTAX ERROR in " ^ strs2str' fmz) + else error ("prep_ori: SYNTAX ERROR in " ^ strs2str' fmz) val dts = map ((split_dts thy) o term_of o the) ctopts val ori = map (add_field thy pbt) dts; (* val ori = map (flat3 o (pair "#undef")) dts; *) @@ -662,17 +662,17 @@ val fi = filter (eq "#Find") dsc_dats; val fi = (case fi of - [] => [](*28.8.01: ["tool"] ...// raise error + [] => [](*28.8.01: ["tool"] ...// error ("prep_pbt: no '#Find' in "^(strs2str pblID))*) (* val ((_,fi')::[]) = fi; *) | ((_,fi')::[]) => ((map (split_did o term_of o the o (parse thy)) fi') - handle _ => raise error + handle _ => error ("prep_pbt: syntax error in '#Find' of "^ (strs2str pblID))) | _ => - (raise error ("prep_pbt: more than one '#Find' in "^ + (error ("prep_pbt: more than one '#Find' in "^ (strs2str pblID)))); val fi = map (pair "#Find") fi; @@ -681,11 +681,11 @@ [] => [] | ((_,re')::[]) => ((map (split_did o term_of o the o (parse thy)) re') - handle _ => raise error + handle _ => error ("prep_pbt: syntax error in '#Relate' of "^ (strs2str pblID))) | _ => - (raise error ("prep_pbt: more than one '#Relate' in "^ + (error ("prep_pbt: more than one '#Relate' in "^ (strs2str pblID)))); val re = map (pair "#Relate") re; @@ -694,11 +694,11 @@ [] => [] | ((_,wh')::[]) => ((map (parse_patt thy) wh') - handle _ => raise error + handle _ => error ("prep_pbt: syntax error in '#Where' of "^ (strs2str pblID))) | _ => - (raise error ("prep_pbt: more than one '#Where' in "^ + (error ("prep_pbt: more than one '#Where' in "^ (strs2str pblID)))); in ({guh=guh,mathauthors=maa,init=init, thy=thy,cas= case ca of NONE => NONE @@ -732,25 +732,25 @@ [] => [] | ((_,gi')::[]) => ((map (split_did o term_of o the o (parse thy)) gi') - handle _ => raise error + handle _ => error ("prep_pbt: syntax error in '#Given' of "^ (strs2str metID))) | _ => - (raise error ("prep_pbt: more than one '#Given' in "^ + (error ("prep_pbt: more than one '#Given' in "^ (strs2str metID)))); val gi = map (pair "#Given") gi; val fi = filter (eq "#Find") ppc; val fi = (case fi of - [] => [](*28.8.01: ["tool"] ...// raise error + [] => [](*28.8.01: ["tool"] ...// error ("prep_pbt: no '#Find' in "^(strs2str metID))*) | ((_,fi')::[]) => ((map (split_did o term_of o the o (parse thy)) fi') - handle _ => raise error + handle _ => error ("prep_pbt: syntax error in '#Find' of "^ (strs2str metID))) | _ => - (raise error ("prep_pbt: more than one '#Find' in "^ + (error ("prep_pbt: more than one '#Find' in "^ (strs2str metID)))); val fi = map (pair "#Find") fi; @@ -759,11 +759,11 @@ [] => [] | ((_,re')::[]) => ((map (split_did o term_of o the o (parse thy)) re') - handle _ => raise error + handle _ => error ("prep_pbt: syntax error in '#Relate' of "^ (strs2str metID))) | _ => - (raise error ("prep_pbt: more than one '#Relate' in "^ + (error ("prep_pbt: more than one '#Relate' in "^ (strs2str metID)))); val re = map (pair "#Relate") re; @@ -772,11 +772,11 @@ [] => [] | ((_,wh')::[]) => ((map (parse_patt thy) wh') - handle _ => raise error + handle _ => error ("prep_pbt: syntax error in '#Where' of "^ (strs2str metID))) | _ => - (raise error ("prep_pbt: more than one '#Where' in "^ + (error ("prep_pbt: more than one '#Where' in "^ (strs2str metID)))); val sc = (((inst_abs thy) o term_of o the o (parse thy)) scr) in ({guh=guh,mathauthors=maa,init=init, @@ -907,7 +907,7 @@ (case find_first (eq1 d) pbt of (* val SOME (_,(_,id)) = find_first (eq1 d) pbt; *) - SOME (_,(_,id)) => raise error "chk_: ((i,vats,b,f,Cor ((d,vs),\ + SOME (_,(_,id)) => error "chk_: ((i,vats,b,f,Cor ((d,vs),\ \(id, pbl_ids' d vs))):itm)" | NONE => (i,vats,false,f,Sup (d,[vs]))); @@ -1200,7 +1200,7 @@ (*. apply a fun to a ptyps node; copied from get_py .*) fun app_ptyp f (d:pblID) _ [] = - raise error ("app_ptyp not found: "^(strs2str d)) + error ("app_ptyp not found: "^(strs2str d)) | app_ptyp f d (k::[]) ((p as Ptyp (k',[py],_))::pys) = if k=k' then f p else app_ptyp f d ([k]:pblRD) pys @@ -1247,15 +1247,15 @@ EXCEPT theory hierarchy ... compare 'fun keref2xml'.*) fun pblID2guh (pblID:pblID) = (((#guh o get_pbt) pblID) - handle _ => raise error ("pblID2guh: not for '"^strs2str' pblID ^ "'")); + handle _ => error ("pblID2guh: not for '"^strs2str' pblID ^ "'")); fun metID2guh (metID:metID) = (((#guh o get_met) metID) - handle _ => raise error ("metID2guh: no 'Met_' for '"^ + handle _ => error ("metID2guh: no 'Met_' for '"^ strs2str' metID ^ "'")); fun kestoreID2guh Pbl_ (kestoreID:kestoreID) = pblID2guh kestoreID | kestoreID2guh Met_ (kestoreID:kestoreID) = metID2guh kestoreID | kestoreID2guh ketype kestoreID = - raise error ("kestoreID2guh: '" ^ ketype2str ketype ^ "' not for '" ^ + error ("kestoreID2guh: '" ^ ketype2str ketype ^ "' not for '" ^ strs2str' kestoreID ^ "'"); fun show_pblguhs () = diff -r 95d956108461 -r 460c24a6a6ba src/Tools/isac/Interpret/rewtools.sml --- a/src/Tools/isac/Interpret/rewtools.sml Tue Sep 28 08:58:06 2010 +0200 +++ b/src/Tools/isac/Interpret/rewtools.sml Tue Sep 28 09:06:56 2010 +0200 @@ -109,7 +109,7 @@ (case goal of NONE => rts | SOME g => - raise error ("make_deriv: no derivation for "^(term2str t))) + error ("make_deriv: no derivation for "^(term2str t))) | rew_once lim rts t Appl [] = (*(case rs of Rls _ =>*) rew_once lim rts t Noap rs (*| Seq _ => rts) FIXXXXXME 14.3.03*) @@ -147,7 +147,7 @@ val r' = Thm (thmid, tm) in rew_once (lim-1) (rts@[(t,r',(t',a'))]) t' Appl rrs' end) - handle _ => raise error "derive_norm, Calc: no rewrite" + handle _ => error "derive_norm, Calc: no rewrite" end (* TODO.WN080222: see rewrite__set_ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@ -163,7 +163,7 @@ rewrite__ thy (i+1) bdv ((snd o #rew_ord o rep_rls) rls) ((#erls o rep_rls) rls) put_asm thm' ct; val _ = if pairopt <> NONE then () - else raise error("rewrite_set_, rewrite_ \""^ + else error("rewrite_set_, rewrite_ \""^ (string_of_thmI thm')^"\" "^(term2str ct)^" = NONE") val _ = if ! trace_rewrite andalso i < ! depth then tracing((idt"="(i+1))^" cal1. to: "^ @@ -229,7 +229,7 @@ fun sym_Thm (Thm (thmID, thm)) = Thm (sym_thmID thmID, sym_thm thm) | sym_Thm (Rls_ rls) = Rls_ (*WN060825?!?*) (sym_rls rls) - | sym_Thm r = raise error ("sym_Thm: not for "^(rule2str r)); + | sym_Thm r = error ("sym_Thm: not for "^(rule2str r)); (* val th = Thm ("real_one_collect",num_str @{thm real_one_collect}); sym_Thm th; @@ -255,7 +255,7 @@ | eq_Thm (Thm (id1,_), _) = false | eq_Thm (Rls_ r1, Rls_ r2) = id_rls r1 = id_rls r2 | eq_Thm (Rls_ r1, _) = false - | eq_Thm (r1, r2) = raise error ("eq_Thm: called with '"^ + | eq_Thm (r1, r2) = error ("eq_Thm: called with '"^ (rule2str r1)^"' '"^(rule2str r2)^"'"); fun distinct_Thm r = gen_distinct eq_Thm r; @@ -271,8 +271,8 @@ "Isabelle" => "thy_isab_" ^ str ^ "-part" : guh | "IsacScripts" => "thy_scri_" ^ str ^ "-part" | "IsacKnowledge" => "thy_isac_" ^ str ^ "-part" - | str => raise error ("thy2guh: called with '"^str^"'")) - | part2guh theID = raise error ("part2guh called with theID = " + | str => error ("thy2guh: called with '"^str^"'")) + | part2guh theID = error ("part2guh called with theID = " ^ theID2str theID); fun part2filename str = part2guh str ^ ".xml" : filename; @@ -282,15 +282,15 @@ "Isabelle" => "thy_isab_" ^ thyID : guh | "IsacScripts" => "thy_scri_" ^ thyID | "IsacKnowledge" => "thy_isac_" ^ thyID - | str => raise error ("thy2guh: called with '"^str^"'")) - | thy2guh theID = raise error ("thy2guh called with '"^strs2str' theID^"'"); + | str => error ("thy2guh: called with '"^str^"'")) + | thy2guh theID = error ("thy2guh called with '"^strs2str' theID^"'"); fun thy2filename thy' = thy2guh thy' ^ ".xml" : filename; fun thypart2guh ([part, thyID, thypart]:theID) = case part of "Isabelle" => "thy_isab_" ^ thyID ^ "-" ^ thypart : guh | "IsacScripts" => "thy_scri_" ^ thyID ^ "-" ^ thypart | "IsacKnowledge" => "thy_isac_" ^ thyID ^ "-" ^ thypart - | str => raise error ("thypart2guh: called with '"^str^"'"); + | str => error ("thypart2guh: called with '"^str^"'"); fun thypart2filename thy' = thypart2guh thy' ^ ".xml" : filename; (*.convert the data got via contextToThy to a globally unique handle @@ -303,7 +303,7 @@ "thy_isac_" ^ theory'2thyID thyID ^ "-thm-" ^ strip_thy thmID | "IsacScripts" => "thy_scri_" ^ theory'2thyID thyID ^ "-thm-" ^ strip_thy thmID - | str => raise error ("thm2guh called with isa = '"^isa^ + | str => error ("thm2guh called with isa = '"^isa^ "' for thm = "^thmID^"'"); fun thm2filename (isa_thyID: string * thyID) thmID = (thm2guh isa_thyID thmID) ^ ".xml" : filename; @@ -316,7 +316,7 @@ "thy_isac_" ^ theory'2thyID thyID ^ "-rls-" ^ rls' | "IsacScripts" => "thy_scri_" ^ theory'2thyID thyID ^ "-rls-" ^ rls' - | str => raise error ("rls2guh called with isa = '"^isa^ + | str => error ("rls2guh called with isa = '"^isa^ "' for rls = '"^rls'^"'"); fun rls2filename (isa, thyID) rls' = rls2guh (isa, thyID) rls' ^ ".xml" : filename; @@ -329,7 +329,7 @@ "thy_isac_" ^ theory'2thyID thyID ^ "-cal-" ^ calID | "IsacScripts" => "thy_scri_" ^ theory'2thyID thyID ^ "-cal-" ^ calID - | str => raise error ("cal2guh called with isa = '"^isa^ + | str => error ("cal2guh called with isa = '"^isa^ "' for cal = '"^calID^"'"); fun cal2filename (isa, thyID:thyID) calID = cal2guh (isa, thyID:thyID) calID ^ ".xml" : filename; @@ -342,7 +342,7 @@ "thy_isac_" ^ theory'2thyID thyID ^ "-ord-" ^ rew_ord' | "IsacScripts" => "thy_scri_" ^ theory'2thyID thyID ^ "-ord-" ^ rew_ord' - | str => raise error ("ord2guh called with isa = '"^isa^ + | str => error ("ord2guh called with isa = '"^isa^ "' for ord = '"^rew_ord'^"'"); fun ord2filename (isa, thyID:thyID) (rew_ord':rew_ord') = ord2guh (isa, thyID:thyID) (rew_ord':rew_ord') ^ ".xml" : filename; @@ -421,7 +421,7 @@ | NONE => (case assoc (!isab_thm_thy (*see Isac.ML*), str) of SOME (thyID,_) => ("Isabelle", thyID) | NONE => - raise error ("thy_containing_thm: theorem '"^str^ + error ("thy_containing_thm: theorem '"^str^ "' not in !theory' above thy '"^thy'^"'")) end; @@ -450,7 +450,7 @@ (rev (!ruleset')) in case assoc (startsearch, rls') of SOME (thy', _) => ("IsacKnowledge", thyID2theory' thy') - | _ => raise error ("thy_containing_rls : rls '"^rls'^ + | _ => error ("thy_containing_rls : rls '"^rls'^ "' not in !rulset' above thy '"^thy'^"'") end; (* val (thy', termop) = (thyID, termop); @@ -466,7 +466,7 @@ (#1 : calc -> string)) (rev (!calclist')) in case assoc (startsearch, strip_thy termop) of SOME (th_termop, _) => ("IsacKnowledge", strip_thy th_termop) - | _ => raise error ("thy_containing_rls : rls '"^termop^ + | _ => error ("thy_containing_rls : rls '"^termop^ "' not in !calclist' above thy '"^thy'^"'") end end; @@ -741,7 +741,7 @@ (*.not only for thydata, but also for thy's etc.*) fun theID2guh (theID:theID) = case length theID of - 0 => raise error ("theID2guh: called with theID = "^strs2str' theID) + 0 => error ("theID2guh: called with theID = "^strs2str' theID) | 1 => part2guh theID | 2 => thy2guh theID | 3 => thypart2guh theID @@ -752,10 +752,10 @@ | "Calculations" => cal2guh (isa, thyID) elemID | "Orders" => ord2guh (isa, thyID) elemID | "Theorems" => thy2guh [isa, thyID] - | str => raise error ("theID2guh: called with theID = "^ + | str => error ("theID2guh: called with theID = "^ strs2str' theID) end - | n => raise error ("theID2guh called with theID = "^strs2str' theID); + | n => error ("theID2guh called with theID = "^strs2str' theID); (*.filenames not only for thydata, but also for thy's etc.*) fun theID2filename (theID:theID) = theID2guh theID ^ ".xml" : filename; @@ -764,14 +764,14 @@ val part = implode (take_fromto 1 4 guh') val isa = implode (take_fromto 5 9 guh') in if not (member op = ["exp_", "thy_", "pbl_", "met_"] part) - then raise error ("guh '"^guh^"' does not begin with \ + then error ("guh '"^guh^"' does not begin with \ \exp_ | thy_ | pbl_ | met_") else let val chap = case isa of "isab_" => "Isabelle" | "scri_" => "IsacScripts" | "isac_" => "IsacKnowledge" | _ => - raise error ("guh2theID: '"^guh^ + error ("guh2theID: '"^guh^ "' does not have isab_ | scri_ | \ \isac_ at position 5..9") val rest = takerest (9, guh') @@ -793,7 +793,7 @@ | "-cal-" => "Operations" | "-ord-" => "Orders" | str => - raise error ("guh2theID: '"^guh^"' has '"^sect^ + error ("guh2theID: '"^guh^"' has '"^sect^ "' instead -thm- | -rls- | \ \-cal- | -ord-") in [chap, implode thyID, sect', implode @@ -815,14 +815,14 @@ in case sect of "Theorems" => Rewrite (xstr, "") | "Rulesets" => Rewrite_Set xstr - | str => raise error ("guh2rewtac: not impl. for '"^xstr^"'") + | str => error ("guh2rewtac: not impl. for '"^xstr^"'") end | guh2rewtac (guh:guh) subs = let val [isa, thy, sect, xstr] = guh2theID guh in case sect of "Theorems" => Rewrite_Inst (subs, (xstr, "")) | "Rulesets" => Rewrite_Set_Inst (subs, xstr) - | str => raise error ("guh2rewtac: not impl. for '"^xstr^"'") + | str => error ("guh2rewtac: not impl. for '"^xstr^"'") end; (*> guh2rewtac "thy_isac_Test-thm-constant_mult_square" []; val it = Rewrite ("constant_mult_square", "") : tac diff -r 95d956108461 -r 460c24a6a6ba src/Tools/isac/Interpret/script.sml --- a/src/Tools/isac/Interpret/script.sml Tue Sep 28 08:58:06 2010 +0200 +++ b/src/Tools/isac/Interpret/script.sml Tue Sep 28 09:06:56 2010 +0200 @@ -58,9 +58,9 @@ val e_step = (Empty_Tac_, EmptyMout, EmptyPtree, e_pos',[]:pos' list):step; fun rule2thm' (Thm (id, thm)) = (id, string_of_thmI thm):thm' - | rule2thm' r = raise error ("rule2thm': not defined for "^(rule2str r)); + | rule2thm' r = error ("rule2thm': not defined for "^(rule2str r)); fun rule2rls' (Rls_ rls) = id_rls rls - | rule2rls' r = raise error ("rule2rls': not defined for "^(rule2str r)); + | rule2rls' r = error ("rule2rls': not defined for "^(rule2str r)); (*.makes a (rule,term) list to a Step (m, mout, pt', p', cid) for solve; complicated with current t in rrlsstate.*) @@ -110,7 +110,7 @@ | go (D::p) (Abs(s,ty,t0)) = go (p:loc_) t0 | go (L::p) (t1 $ t2) = go p t1 | go (R::p) (t1 $ t2) = go p t2 - | go l _ = raise error ("go: no "^(loc_2str l)); + | go l _ = error ("go: no "^(loc_2str l)); (* > val t = (term_of o the o (parse thy)) "a+b"; val it = Const (#,#) $ Free (#,#) $ Free ("b","RealDef.real") : term @@ -217,10 +217,10 @@ *) fun init_form thy (Script sc) env = (case get_stac thy sc of - NONE => NONE (*raise error ("init_form: no 1st stac in "^ + NONE => NONE (*error ("init_form: no 1st stac in "^ (Syntax.string_of_term (thy2ctxt thy) sc))*) | SOME stac => SOME (subst_atomic env stac)) - | init_form _ _ _ = raise error "init_form: no match"; + | init_form _ _ _ = error "init_form: no match"; (* use"ME/script.sml"; use"script.sml"; @@ -238,7 +238,7 @@ | itr_arg _ (Const ("Script.Or'_to'_List",_) $ _) = e_term | itr_arg _ (Const ("Script.Tac",_) $ _) = e_term | itr_arg _ (Const ("Script.SubProblem",_) $ _ $ _) = e_term - | itr_arg thy t = raise error + | itr_arg thy t = error ("itr_arg not impl. for "^ (Syntax.string_of_term (thy2ctxt (assoc_thy thy)) t)); (* val t = (term_of o the o (parse thy))"Rewrite rroot_square_inv False e_"; @@ -294,7 +294,7 @@ (*.from penv in itm_ make args for script depending on type of description.*) (*6.5.03 TODO: push penv into script -- and drop mk_arg here || drop penv 9.5.03 penv postponed: penv = env for script at the moment, (*mk_arg*)*) -fun mk_arg thy d [] = raise error ("mk_arg: no data for "^ +fun mk_arg thy d [] = error ("mk_arg: no data for "^ (Syntax.string_of_term (thy2ctxt thy) d)) | mk_arg thy d [t] = (case dsc_valT d of @@ -302,10 +302,10 @@ | "nam" => [case t of r as (Const ("op =",_) $ _ $ _) => r - | _ => raise error + | _ => error ("mk_arg: dsc-typ 'nam' applied to non-equality "^ (Syntax.string_of_term (thy2ctxt thy) t))] - | s => raise error ("mk_arg: not impl. for "^s)) + | s => error ("mk_arg: not impl. for "^s)) | mk_arg thy d (t::ts) = (mk_arg thy d [t]) @ (mk_arg thy d ts); (* @@ -332,7 +332,7 @@ fun itm2arg itms (_,(d,_)) = case find_first (test_dsc d) itms of NONE => - raise error ("itms2args: '"^term2str d^"' not in itms") + error ("itms2args: '"^term2str d^"' not in itms") (*| SOME (_,_,_,_,itm_) => mk_arg thy (d_in itm_) (ts_in itm_); penv postponed; presently penv holds already env for script*) | SOME (_,_,_,_,itm_) => penvval_in itm_ @@ -354,7 +354,7 @@ fun oris2fmz_vals oris = let fun ori2fmz_vals ((_,_,_,dsc,ts):ori) = ((term2str o comp_dts') (dsc, ts), last_elem ts) - handle _ => raise error ("ori2fmz_env called with "^terms2str ts) + handle _ => error ("ori2fmz_env called with "^terms2str ts) in (split_list o (map ori2fmz_vals)) oris end; (*detour necessary, because generate1 delivers a string-result*) @@ -469,7 +469,7 @@ Subproblem' ((dI, pI, mI), pors, hdl, fmz_, f)) end - | stac2tac_ pt thy t = raise error + | stac2tac_ pt thy t = error ("stac2tac_ TODO: no match for "^ (Syntax.string_of_term (thy2ctxt thy) t)); (* @@ -536,7 +536,7 @@ else (mk_and o (map fst)) (get_assumptions_ pt (p,Res)) in (bdv, pred) end | rep_set thy _ _ set = - raise error ("check_elementwise: no set "^ (*from script*) + error ("check_elementwise: no set "^ (*from script*) (Syntax.string_of_term (thy2ctxt thy) set)); (*> val set = (term_of o the o (parse thy)) "{(x::real). Assumptions}"; > val p = []; @@ -794,7 +794,7 @@ | tac_2tac Empty_Tac_ = Empty_Tac | tac_2tac m = - raise error ("tac_2tac: not impl. for "^(tac_2str m)); + error ("tac_2tac: not impl. for "^(tac_2str m)); @@ -952,7 +952,7 @@ | rep_tac_ (Take' (t')) = (Erule, (e_term, t')) | rep_tac_ (Substitute' (subst,t,t')) = (Erule, (t, t')) | rep_tac_ (Or_to_List' (t, t')) = (Erule, (t, t')) - | rep_tac_ m = raise error ("rep_tac_: not impl.for "^ + | rep_tac_ m = error ("rep_tac_: not impl.for "^ (tac_2str m)); (*"N.3.6.03------ @@ -1118,7 +1118,7 @@ assy (y, AssGen) ((E, (l@[L,R]), SOME a,v,S,b),ss) e2 | ay => ay) | ay =>(ay)) - | NasApp _ => raise error ("assy: FIXXXME ///must not return NasApp///") + | NasApp _ => error ("assy: FIXXXME ///must not return NasApp///") | ay => (ay)) | assy ya ((E,l,a,v,S,b),ss) (Const ("Script.Or",_) $e1 $ e2) = @@ -1154,7 +1154,7 @@ | (a', STac stac) => let (*val _=tracing("### assy, stac = "^term2str stac);*) val p' = case p_ of Frm => p | Res => lev_on p - | _ => raise error ("assy: call by "^ + | _ => error ("assy: call by "^ (pos'2str (p,p_))); in case assod pt d m stac of Ass (m,v') => @@ -1307,7 +1307,7 @@ astep_up y ((E, (drop_last l), a,v,S,b),ss) | ass_up y iss t = - raise error ("ass_up not impl for t= "^(term2str t)) + error ("ass_up not impl for t= "^(term2str t)) (* 9.6.03 val (ys as (_,_,Script sc,_), ss) = ((thy',srls,scr,d), [(m,EmptyMout,pt,p,[])]:step list); @@ -1448,7 +1448,7 @@ else Steps (ScrState is, ss)) | NasApp _ (*[((E,l,a,v,S,bb),(m',f',pt',p',c'))] => - raise error ("locate_gen: should not have got NasApp, ets =")*) + error ("locate_gen: should not have got NasApp, ets =")*) => NotLocatable | NasNap (_,_) => if l=[] then NotLocatable @@ -1468,7 +1468,7 @@ NotLocatable)) end | locate_gen _ m _ (sc,_) is = - raise error ("locate_gen: wrong arguments,\n tac= "^(tac_2str m)^ + error ("locate_gen: wrong arguments,\n tac= "^(tac_2str m)^ ",\n scr= "^(scr2str sc)^",\n istate= "^(istate2str is)); @@ -1800,7 +1800,7 @@ | Skip (v,E) => nstep_up thy ptp scr E up Skip_ a v end | nxt_up (thy,_) ptp scr E l ay t a v = - raise error ("nxt_up not impl for "^ + error ("nxt_up not impl for "^ (Syntax.string_of_term (thy2ctxt (assoc_thy thy)) t)) (* val (thy, ptp, (Script sc), E, l, ay, a, v)= @@ -1871,7 +1871,7 @@ | Appy (m', scrst as (_,_,_,v,_,_)) => (m', ScrState scrst, (v, Sundef))) (*next stac*) - | next_tac _ _ _ is = raise error ("next_tac: not impl for "^ + | next_tac _ _ _ is = error ("next_tac: not impl for "^ (istate2str is)); @@ -1888,7 +1888,7 @@ and (formal) args in met*) fun relate_args env [] [] = env | relate_args env _ [] = - raise error ("ERROR in creating the environment for '" + error ("ERROR in creating the environment for '" ^id_of_scr sc^"' from \nthe items of the guard of " ^metID2str metID^",\n\ \formal arg(s), from the script,\ @@ -1901,7 +1901,7 @@ | relate_args env (a::aa) (f::ff) = if type_of a = type_of f then relate_args (env @ [(a, f)]) aa ff else - raise error ("ERROR in creating the environment for '" + error ("ERROR in creating the environment for '" ^id_of_scr sc^"' from \nthe items of the guard of " ^metID2str metID^",\n\ \different types of formal arg, from the script,\ @@ -1923,7 +1923,7 @@ fun from_pblobj_or_detail' thy' (p,p_) pt = if member op = [Pbl,Met] p_ then case get_obj g_env pt p of - NONE => raise error "from_pblobj_or_detail': no istate" + NONE => error "from_pblobj_or_detail': no istate" | SOME is => let val metID = get_obj g_metID pt p val {srls,...} = get_met metID diff -r 95d956108461 -r 460c24a6a6ba src/Tools/isac/Interpret/solve.sml --- a/src/Tools/isac/Interpret/solve.sml Tue Sep 28 08:58:06 2010 +0200 +++ b/src/Tools/isac/Interpret/solve.sml Tue Sep 28 09:06:56 2010 +0200 @@ -109,7 +109,7 @@ *} fun op_intern op_ = case assoc (ops, op_) of - SOME op' => op' | NONE => raise error ("op_intern: no op= "^op_); + SOME op' => op' | NONE => error ("op_intern: no op= "^op_); -----------------------*) diff -r 95d956108461 -r 460c24a6a6ba src/Tools/isac/Knowledge/Atools.thy --- a/src/Tools/isac/Knowledge/Atools.thy Tue Sep 28 08:58:06 2010 +0200 +++ b/src/Tools/isac/Knowledge/Atools.thy Tue Sep 28 09:06:56 2010 +0200 @@ -504,7 +504,7 @@ as the fst argument; this is, because Isabelles filter takes more than 1 sec.*) fun same_funid f1 (Const ("op =", _) $ (f2 $ _) $ _) = f1 = f2 - | same_funid f1 t = raise error ("same_funid called with t = (" + | same_funid f1 t = error ("same_funid called with t = (" ^term2str f1^") ("^term2str t^")"); (*("filter_sameFunId" ,("Atools.filter'_sameFunId", eval_filter_sameFunId "Atools.filter'_sameFunId"))*) diff -r 95d956108461 -r 460c24a6a6ba src/Tools/isac/Knowledge/Delete.thy --- a/src/Tools/isac/Knowledge/Delete.thy Tue Sep 28 08:58:06 2010 +0200 +++ b/src/Tools/isac/Knowledge/Delete.thy Tue Sep 28 09:06:56 2010 +0200 @@ -32,7 +32,7 @@ | calc "Atools.pow" ((a, b), _) ((c, d), _) = (*FIXXXME float + prec.*) ((power a c, 0), (0, 0)) | calc op_ ((a, b), (p11, p12)) ((c, d), (p21, p22)) = - raise error ("calc: not impl. for Float (("^ + error ("calc: not impl. for Float (("^ (string_of_int a )^","^(string_of_int b )^"), ("^ (string_of_int p11)^","^(string_of_int p12)^")) "^op_^" (("^ (string_of_int c )^","^(string_of_int d )^"), ("^ diff -r 95d956108461 -r 460c24a6a6ba src/Tools/isac/Knowledge/Diff.thy --- a/src/Tools/isac/Knowledge/Diff.thy Tue Sep 28 08:58:06 2010 +0200 +++ b/src/Tools/isac/Knowledge/Diff.thy Tue Sep 28 09:06:56 2010 +0200 @@ -100,7 +100,7 @@ fun primed (Const (id, T)) = Const (id ^ "'", T) | primed (Free (id, T)) = Free (id ^ "'", T) - | primed t = raise error ("primed called with arg = '"^ term2str t ^"'"); + | primed t = error ("primed called with arg = '"^ term2str t ^"'"); (*("primed", ("Diff.primed", eval_primed "#primed"))*) fun eval_primed _ _ (p as (Const ("Diff.primed",_) $ t)) _ = @@ -408,7 +408,7 @@ ((term_of o the o (parse thy)) "derivative", [(term_of o the o (parse thy)) "f_f'"]) ] - | argl2dtss _ = raise error "Diff.ML: wrong argument for argl2dtss"; + | argl2dtss _ = error "Diff.ML: wrong argument for argl2dtss"; castab := overwritel (!castab, [((term_of o the o (parse thy)) "Diff", @@ -426,7 +426,7 @@ ((term_of o the o (parse thy)) "derivativeEq", [(term_of o the o (parse thy)) "f_f'::bool"]) ] - | argl2dtss _ = raise error "Diff.ML: wrong argument for argl2dtss"; + | argl2dtss _ = error "Diff.ML: wrong argument for argl2dtss"; castab := overwritel (!castab, [((term_of o the o (parse thy)) "Differentiate", diff -r 95d956108461 -r 460c24a6a6ba src/Tools/isac/Knowledge/Equation.thy --- a/src/Tools/isac/Knowledge/Equation.thy Tue Sep 28 08:58:06 2010 +0200 +++ b/src/Tools/isac/Knowledge/Equation.thy Tue Sep 28 09:06:56 2010 +0200 @@ -73,7 +73,7 @@ ((term_of o the o (parse thy)) "solutions", [(term_of o the o (parse thy)) "L"]) ] - | argl2dtss _ = raise error "Equation.ML: wrong argument for argl2dtss"; + | argl2dtss _ = error "Equation.ML: wrong argument for argl2dtss"; castab := overwritel (!castab, diff -r 95d956108461 -r 460c24a6a6ba src/Tools/isac/Knowledge/Poly.thy --- a/src/Tools/isac/Knowledge/Poly.thy Tue Sep 28 08:58:06 2010 +0200 +++ b/src/Tools/isac/Knowledge/Poly.thy Tue Sep 28 09:06:56 2010 +0200 @@ -175,7 +175,7 @@ (* is_polyrat_in becomes true, if no bdv is in the denominator of a fraction*) fun is_polyrat_in t v = let fun coeff_in c v = member op = (vars c) v; - fun finddivide (_ $ _ $ _ $ _) v = raise error("is_polyrat_in:") + fun finddivide (_ $ _ $ _ $ _) v = error("is_polyrat_in:") (* at the moment there is no term like this, but ....*) | finddivide (t as (Const ("Rings.inverse_class.divide",_) $ _ $ b)) v = not(coeff_in b v) @@ -1141,7 +1141,7 @@ | get_basStr (Free (str, _)) = str | get_basStr t = "|||"; (* gross gewichtet; für Brüch ect. *) (*| get_basStr t = - raise error("get_basStr: called with t= "^(term2str t));*) + error("get_basStr: called with t= "^(term2str t));*) (* liefert Hochzahl (String) einer Variablen bzw Gewichtstring (zum Sortieren) *) fun get_potStr (Const ("Atools.pow",_) $ Free _ $ Free (str, _)) = str @@ -1149,7 +1149,7 @@ | get_potStr (Free (str, _)) = "---" (* keine Hochzahl --> kleinst gewichtet *) | get_potStr t = "||||||"; (* gross gewichtet; für Brüch ect. *) (*| get_potStr t = - raise error("get_potStr: called with t= "^(term2str t));*) + error("get_potStr: called with t= "^(term2str t));*) (* Umgekehrte string_ord *) val string_ord_rev = rev_order o string_ord; @@ -1208,7 +1208,7 @@ | (Const ("Atools.pow", _) $ Free (str_b, _) $ _ ) => counter (n + 1000, xs) (*FIXME.MG?!*) | (Free (str, _)) => counter (n + 1, xs) - (*| _ => raise error("monom_degree: called with factor: "^(term2str x)))*) + (*| _ => error("monom_degree: called with factor: "^(term2str x)))*) | _ => counter (n + 10000, xs)) (*FIXME.MG?! ... Brüche ect.*) in fun monom_degree l = counter (0, l) @@ -1240,7 +1240,7 @@ fun tl_str str = substring (str, 1, (size str) - 1); (* liefert nummerischen Koeffizienten eines Monoms oder NONE *) -fun get_koeff_of_mon [] = raise error("get_koeff_of_mon: called with l = []") +fun get_koeff_of_mon [] = error("get_koeff_of_mon: called with l = []") | get_koeff_of_mon (l as x::xs) = if is_nums x then SOME x else NONE; diff -r 95d956108461 -r 460c24a6a6ba src/Tools/isac/Knowledge/PolyEq.thy --- a/src/Tools/isac/Knowledge/PolyEq.thy Tue Sep 28 08:58:06 2010 +0200 +++ b/src/Tools/isac/Knowledge/PolyEq.thy Tue Sep 28 09:06:56 2010 +0200 @@ -1316,12 +1316,12 @@ (case x of (*WN*) (Free (xstr,_)) => (if xstr = var then 1000*(the (int_of_str pot)) else 3) - | _ => raise error ("size_of_term' called with subst = "^ + | _ => error ("size_of_term' called with subst = "^ (term2str x))) | size_of_term' x (Free (subst,_)) = (case x of (Free (xstr,_)) => (if xstr = subst then 1000 else 1) - | _ => raise error ("size_of_term' called with subst = "^ + | _ => error ("size_of_term' called with subst = "^ (term2str x))) | size_of_term' x (Abs (_,_,body)) = 1 + size_of_term' x body | size_of_term' x (f$t) = size_of_term' x f + size_of_term' x t @@ -1369,7 +1369,7 @@ in case subst of (_,x)::_ => (term_ord' x pr thy tu = LESS) - | _ => raise error ("ord_make_polynomial_in called with subst = "^ + | _ => error ("ord_make_polynomial_in called with subst = "^ (subst2str subst)) end; end;(*local*) diff -r 95d956108461 -r 460c24a6a6ba src/Tools/isac/Knowledge/RatEq.thy --- a/src/Tools/isac/Knowledge/RatEq.thy Tue Sep 28 08:58:06 2010 +0200 +++ b/src/Tools/isac/Knowledge/RatEq.thy Tue Sep 28 09:06:56 2010 +0200 @@ -50,7 +50,7 @@ fun is_rateqation_in t v = let fun coeff_in c v = member op = (vars c) v; - fun finddivide (_ $ _ $ _ $ _) v = raise error("is_rateqation_in:") + fun finddivide (_ $ _ $ _ $ _) v = error("is_rateqation_in:") (* at the moment there is no term like this, but ....*) | finddivide (t as (Const ("Rings.inverse_class.divide",_) $ _ $ b)) v = coeff_in b v | finddivide (_ $ t1 $ t2) v = (finddivide t1 v) diff -r 95d956108461 -r 460c24a6a6ba src/Tools/isac/Knowledge/Rational-WN.sml --- a/src/Tools/isac/Knowledge/Rational-WN.sml Tue Sep 28 08:58:06 2010 +0200 +++ b/src/Tools/isac/Knowledge/Rational-WN.sml Tue Sep 28 09:06:56 2010 +0200 @@ -35,8 +35,8 @@ | ato (f$t') n = ato f n^ato t' (n+1) in "\n-------------"^ato t 0^"\n" end; fun free2int (t as Free (s, _)) = (((the o int_of_str) s) - handle _ => raise error ("free2int: "^term2str t)) - | free2int t = raise error ("free2int: "^term2str t); + handle _ => error ("free2int: "^term2str t)) + | free2int t = error ("free2int: "^term2str t); (*diese ^^^ funktionen kommen nach src/Isa99/termC.sml -------------*) @@ -56,12 +56,12 @@ fun mono (Const ("RatArith.pow",_) $ t1 $ t2) v g = if t1 = v then ((replicate ((free2int t2) - g) 0) @ [1]) : poly - else raise error ("term2poly.1 "^term2str t1) + else error ("term2poly.1 "^term2str t1) | mono (t as Const ("op *",_) $ t1 $ (Const ("RatArith.pow",_) $ t2 $ t3)) v g = if t2 = v then (replicate ((free2int t3) - g) 0) @ [free2int t1] - else raise error ("term2poly.2 "^term2str t) - | mono t _ _ = raise error ("term2poly.3 "^term2str t); + else error ("term2poly.2 "^term2str t) + | mono t _ _ = error ("term2poly.3 "^term2str t); fun poly (Const ("Groups.plus_class.plus",_) $ t1 $ t2) v g = let val l = mono t1 v g @@ -185,7 +185,7 @@ "***************************************************************************"; fun rewrite_set_' thy rls put_asm ruless ct = case ruless of - Rrls _ => raise error "rewrite_set_' not for Rrls" + Rrls _ => error "rewrite_set_' not for Rrls" | Rls _ => let datatype switch = Appl | Noap; @@ -208,7 +208,7 @@ rewrite_ thy ((snd o #rew_ord o rep_rls) ruless) rls put_asm thm' ct; val _ = if pairopt <> NONE then () - else raise error("rewrite_set_, rewrite_ \""^ + else error("rewrite_set_, rewrite_ \""^ (string_of_thmI thm')^"\" \""^ (Syntax.string_of_term (thy2ctxt thy) ct)^"\" = NONE") in rew_once ruls asm ((fst o the) pairopt) Appl(rul::thms) end); @@ -221,7 +221,7 @@ *) fun rewrite_set_' thy rls put_asm ruless ct = case ruless of - Rrls _ => raise error "rewrite_set_' not for Rrls" + Rrls _ => error "rewrite_set_' not for Rrls" | Rls _ => let datatype switch = Appl | Noap; @@ -244,7 +244,7 @@ rewrite_ thy ((snd o #rew_ord o rep_rls) ruless) rls put_asm thm' ct; val _ = if pairopt <> NONE then () - else raise error("rewrite_set_, rewrite_ \""^ + else error("rewrite_set_, rewrite_ \""^ (string_of_thmI thm')^"\" \""^ (Syntax.string_of_term (thy2ctxt thy) ct)^"\" = NONE") in rew_once ruls asm ((fst o the) pairopt) Appl(rul::thms) end); diff -r 95d956108461 -r 460c24a6a6ba src/Tools/isac/Knowledge/Rational.thy --- a/src/Tools/isac/Knowledge/Rational.thy Tue Sep 28 08:58:06 2010 +0200 +++ b/src/Tools/isac/Knowledge/Rational.thy Tue Sep 28 09:06:56 2010 +0200 @@ -257,7 +257,7 @@ (* FIXME: Division von x^9+x^5+1 durch x-1000 funktioniert nicht, integer zu klein *) fun uv_mod_pdiv (p1:uv_poly) ([]:uv_poly) = - raise error ("RATIONALS_UV_MOD_PDIV_EXCEPTION: division by zero") + error ("RATIONALS_UV_MOD_PDIV_EXCEPTION: division by zero") | uv_mod_pdiv p1 [x] = let val xs= Unsynchronized.ref []; @@ -267,7 +267,7 @@ xs:=(uv_mod_rem_poly(p1,x)); while length(!xs)>0 andalso hd(!xs)=0 do xs:=tl(!xs) ) - else raise error ("RATIONALS_UV_MOD_PDIV_EXCEPTION: division by zero"); + else error ("RATIONALS_UV_MOD_PDIV_EXCEPTION: division by zero"); ([]:uv_poly,!xs:uv_poly) end | uv_mod_pdiv p1 p2 = @@ -283,7 +283,7 @@ in ( if (!m)=0 orelse p2=[0] - then raise error ("RATIONALS_UV_MOD_PDIV_EXCEPTION: Division by zero") + then error ("RATIONALS_UV_MOD_PDIV_EXCEPTION: Division by zero") else ( if (!m)length(M2l) then raise error ("RATIONALS_MV_MONOM_GREATER_EXCEPTION: Order error") + if length(M1l)<>length(M2l) then error ("RATIONALS_MV_MONOM_GREATER_EXCEPTION: Order error") else if (mv_mg_hlp((map op- (M1l~~M2l)))<>GREATER) then false else true ) else if order=GGO_ then ( - if length(M1l)<>length(M2l) then raise error ("RATIONALS_MV_MONOM_GREATER_EXCEPTION: Order error") + if length(M1l)<>length(M2l) then error ("RATIONALS_MV_MONOM_GREATER_EXCEPTION: Order error") else if mv_addlist(M1l)=mv_addlist(M2l) then if (mv_mg_hlp((map op- (M1l~~M2l)))<>GREATER) then false else true else if mv_addlist(M1l)>mv_addlist(M2l) then true else false ) - else raise error ("RATIONALS_MV_MONOM_GREATER_EXCEPTION: Wrong Order"); + else error ("RATIONALS_MV_MONOM_GREATER_EXCEPTION: Wrong Order"); (*. tests if the monomial X is greater as the monomial Y and returns a order value (GREATER,EQUAL,LESS) .*) (*. 2 orders are implemented LEX_/GGO_ (lexigraphical/greatest degree order) .*) @@ -710,7 +710,7 @@ if order=LEX_ then ( if length(x)<>length(y) then - raise error ("RATIONALS_MV_GEQ_EXCEPTION: Order error") + error ("RATIONALS_MV_GEQ_EXCEPTION: Order error") else ( temp:=mv_mg_hlp((map op- (x~~y))); @@ -726,18 +726,18 @@ if order=GGO_ then ( if length(x)<>length(y) then - raise error ("RATIONALS_MV_GEQ_EXCEPTION: Order error") + error ("RATIONALS_MV_GEQ_EXCEPTION: Order error") else if mv_addlist(x)=mv_addlist(y) then (mv_mg_hlp((map op- (x~~y)))) else if mv_addlist(x)>mv_addlist(y) then GREATER else LESS ) - else raise error ("RATIONALS_MV_GEQ_EXCEPTION: Wrong Order") + else error ("RATIONALS_MV_GEQ_EXCEPTION: Wrong Order") end; (*. cuts the first variable from a polynomial .*) fun mv_cut([]:mv_poly)=[]:mv_poly - | mv_cut((x,[])::list) = raise error ("RATIONALS_MV_CUT_EXCEPTION: Invalid list ") + | mv_cut((x,[])::list) = error ("RATIONALS_MV_CUT_EXCEPTION: Invalid list ") | mv_cut((x,y::ys)::list)=(x,ys)::mv_cut(list); (*. leading power product .*) @@ -775,7 +775,7 @@ lc:=hd(mv_cut([hd(!p1o)]))::(!lc); p1o:=tl(!p1o) ); - if !lc=[] then raise error ("RATIONALS_MV_LC_EXCEPTION: lc is empty") else (); + if !lc=[] then error ("RATIONALS_MV_LC_EXCEPTION: lc is empty") else (); mv_rev_to(!lc) ) end; @@ -848,14 +848,14 @@ (*. division of monomials .*) fun mv_mdiv((0,[]):mv_monom,_:mv_monom)=(0,[]):mv_monom - | mv_mdiv(_,(0,[]))= raise error ("RATIONALS_MV_MDIV_EXCEPTION Division by 0 ") + | mv_mdiv(_,(0,[]))= error ("RATIONALS_MV_MDIV_EXCEPTION Division by 0 ") | mv_mdiv(p1:mv_monom,p2:mv_monom)= let val c= Unsynchronized.ref (#1(p2)); val pp= Unsynchronized.ref []; in ( - if !c=0 then raise error("MV_MDIV_EXCEPTION Dividing by zero") + if !c=0 then error("MV_MDIV_EXCEPTION Dividing by zero") else c:=(#1(p1) div #1(p2)); if #1(p2)<>0 then ( @@ -863,7 +863,7 @@ if mv_is_negativ(!pp) then (0,!pp) else (!c,!pp) ) - else raise error("MV_MDIV_EXCEPTION Dividing by empty Polynom") + else error("MV_MDIV_EXCEPTION Dividing by empty Polynom") ) end; @@ -875,7 +875,7 @@ (*. division of two multivariate polynomials .*) fun mv_division([]:mv_poly,g:mv_poly,order)=([]:mv_poly,[]:mv_poly) - | mv_division(f,[],order)= raise error ("RATIONALS_MV_DIVISION_EXCEPTION Division by zero") + | mv_division(f,[],order)= error ("RATIONALS_MV_DIVISION_EXCEPTION Division by zero") | mv_division(f,g,order)= let val r= Unsynchronized.ref []; @@ -887,7 +887,7 @@ in r := rev(sort (mv_geq order) (mv_shorten(f,order))); g':= rev(sort (mv_geq order) (mv_shorten(g,order))); - if #1(hd(!g'))=0 then raise error("RATIONALS_MV_DIVISION_EXCEPTION: Dividing by zero") else (); + if #1(hd(!g'))=0 then error("RATIONALS_MV_DIVISION_EXCEPTION: Dividing by zero") else (); if (mv_monom_greater (hd(!g'),hd(!r),order)) then ([(0,mv_null2(#2(hd(f))))],(!r)) else ( @@ -895,7 +895,7 @@ while (if (!exit)=0 then not(mv_monom_greater (hd(!g'),hd(!r),order)) else false) do ( if (#1(mv_lm(!g',order)))<>0 then m:=mv_mdiv(mv_lm(!r,order),mv_lm(!g',order)) - else raise error ("RATIONALS_MV_DIVISION_EXCEPTION: Dividing by zero"); + else error ("RATIONALS_MV_DIVISION_EXCEPTION: Dividing by zero"); if #1(!m)<>0 then ( q:=(!m)::(!q); @@ -920,8 +920,8 @@ (*. multivariate case .*) (*. decides if x is a factor of y .*) -fun mv_divides([]:mv_poly,[]:mv_poly)= raise error("RATIONALS_MV_DIVIDES_EXCEPTION: division by zero") - | mv_divides(x,[]) = raise error("RATIONALS_MV_DIVIDES_EXCEPTION: division by zero") +fun mv_divides([]:mv_poly,[]:mv_poly)= error("RATIONALS_MV_DIVIDES_EXCEPTION: division by zero") + | mv_divides(x,[]) = error("RATIONALS_MV_DIVIDES_EXCEPTION: division by zero") | mv_divides(x:mv_poly,y:mv_poly) = #2(mv_division(y,x,LEX_))=[]; (*. gets the maximum of a and b .*) @@ -964,7 +964,7 @@ val help= Unsynchronized.ref ((c1,e1)::others); val list= Unsynchronized.ref []; in - if length(e1)>1 then raise error ("RATIONALS_TO_LIST_EXCEPTION: not univariate") + if length(e1)>1 then error ("RATIONALS_TO_LIST_EXCEPTION: not univariate") else if length(e1)=0 then [c1] else ( @@ -1176,7 +1176,7 @@ cont:=mv_content(p1); pp:=(#1(mv_division(p1,!cont,LEX_))); if !pp=[] - then raise error("RATIONALS_MV_PP_EXCEPTION: Invalid Content ") + then error("RATIONALS_MV_PP_EXCEPTION: Invalid Content ") else (!pp) end @@ -1426,7 +1426,7 @@ ); SOME [(1,rev(!vl))] handle _ => NONE ) - else raise error ("RATIONALS_TERM2COEF_EXCEPTION 1: Invalid term") + else error ("RATIONALS_TERM2COEF_EXCEPTION 1: Invalid term") ) end | term2coef' (Const ("Groups.plus_class.plus",_) $ t1 $ t2) v :mv_poly option= @@ -1437,7 +1437,7 @@ ( SOME ((the(term2coef' t1 v)) @ mv_skalar_mul((the(term2coef' t2 v)),1)) handle _ => NONE ) - | term2coef' (term) v = raise error ("RATIONALS_TERM2COEF_EXCEPTION 2: Invalid term"); + | term2coef' (term) v = error ("RATIONALS_TERM2COEF_EXCEPTION 2: Invalid term"); (*. checks if all coefficients of a polynomial are positiv (except the first) .*) fun check_coeff t = (* erste Koeffizient kann <0 sein !!! *) @@ -1541,7 +1541,7 @@ ); SOME [(1,rev(!vl))] handle _ => NONE ) - else raise error ("RATIONALS_TERM2POLY_EXCEPTION 1: Invalid term") + else error ("RATIONALS_TERM2POLY_EXCEPTION 1: Invalid term") ) end | term2poly' (Const ("Groups.plus_class.plus",_) $ t1 $ t2) v :mv_poly option = @@ -1552,7 +1552,7 @@ ( SOME ((the(term2poly' t1 v)) @ mv_skalar_mul((the(term2poly' t2 v)),~1)) handle _ => NONE ) - | term2poly' (term) v = raise error ("RATIONALS_TERM2POLY_EXCEPTION 2: Invalid term"); + | term2poly' (term) v = error ("RATIONALS_TERM2POLY_EXCEPTION 2: Invalid term"); (*. translates an Isabelle term into internal representation. term2poly @@ -1564,7 +1564,7 @@ .*) fun term2poly (t:term) v = if is_polynomial t then term2poly' t v - else raise error ("term2poly: invalid = "^(term2str t)); + else error ("term2poly: invalid = "^(term2str t)); (*. same as term2poly with automatic detection of the variables .*) fun term2polyx t = term2poly t (((map free2str) o vars) t); @@ -1572,7 +1572,7 @@ (*. checks if the term is in expanded polynomial form and converts it into the internal representation .*) fun expanded2poly (t:term) v = (*if is_expanded t then*) term2poly' t v - (*else raise error ("RATIONALS_EXPANDED2POLY_EXCEPTION: Invalid Polynomial")*); + (*else error ("RATIONALS_EXPANDED2POLY_EXCEPTION: Invalid Polynomial")*); (*. same as expanded2poly with automatic detection of the variables .*) fun expanded2polyx t = expanded2poly t (((map free2str) o vars) t); @@ -1804,7 +1804,7 @@ ) ) end -| step_cancel _ = raise error ("RATIONALS_STEP_CANCEL_EXCEPTION: Invalid fraction"); +| step_cancel _ = error ("RATIONALS_STEP_CANCEL_EXCEPTION: Invalid fraction"); (*. same as step_cancel, this time for expanded forms (input+output) .*) @@ -1869,7 +1869,7 @@ ) ) end -| step_cancel_expanded _ = raise error ("RATIONALS_STEP_CANCEL_EXCEPTION: Invalid fraction"); +| step_cancel_expanded _ = error ("RATIONALS_STEP_CANCEL_EXCEPTION: Invalid fraction"); (*. calculates the greatest common divisor of numerator and denominator and divides each through it .*) fun direct_cancel (t as Const ("Rings.inverse_class.divide",_) $ p1 $ p2) = @@ -1954,7 +1954,7 @@ ) ) end - | direct_cancel _ = raise error ("RATIONALS_DIRECT_CANCEL_EXCEPTION: Invalid fraction"); + | direct_cancel _ = error ("RATIONALS_DIRECT_CANCEL_EXCEPTION: Invalid fraction"); (*. same es direct_cancel, this time for expanded forms (input+output).*) fun direct_cancel_expanded (t as Const ("Rings.inverse_class.divide",_) $ p1 $ p2) = @@ -2039,7 +2039,7 @@ ) ) end - | direct_cancel_expanded _ = raise error ("RATIONALS_DIRECT_CANCEL_EXCEPTION: Invalid fraction"); + | direct_cancel_expanded _ = error ("RATIONALS_DIRECT_CANCEL_EXCEPTION: Invalid fraction"); (*. adds two fractions .*) @@ -2086,7 +2086,7 @@ ) ) end - | add_fract (_,_) = raise error ("RATIONALS_ADD_FRACTION_EXCEPTION: Invalid add_fraction call"); + | add_fract (_,_) = error ("RATIONALS_ADD_FRACTION_EXCEPTION: Invalid add_fraction call"); (*. adds two expanded fractions .*) fun add_fract_exp ((Const("Rings.inverse_class.divide",_) $ t11 $ t12),(Const("Rings.inverse_class.divide",_) $ t21 $ t22)) = @@ -2120,7 +2120,7 @@ ) ) end - | add_fract_exp (_,_) = raise error ("RATIONALS_ADD_FRACTION_EXP_EXCEPTION: Invalid add_fraction call"); + | add_fract_exp (_,_) = error ("RATIONALS_ADD_FRACTION_EXP_EXCEPTION: Invalid add_fraction call"); (*. adds a list of terms .*) fun add_list_of_fractions []= (Free("0",HOLogic.realT),[]) @@ -2576,7 +2576,7 @@ if last=[(1,mv_null2(vars))] then make_term(factor_list,vars) else make_term(last::factor_list,vars) ) - else raise error ("RATIONALS_FACTORIZE_DEN_EXCEPTION: Invalid factor by division") + else error ("RATIONALS_FACTORIZE_DEN_EXCEPTION: Invalid factor by division") end; (*. makes a term out of the elements of the list (expanded polynomial representation) .*) @@ -2601,14 +2601,14 @@ if last=[(1,mv_null2(vars))] then make_exp(factor_list,vars) else make_exp(last::factor_list,vars) ) - else raise error ("RATIONALS_FACTORIZE_DEN_EXP_EXCEPTION: Invalid factor by division") + else error ("RATIONALS_FACTORIZE_DEN_EXP_EXCEPTION: Invalid factor by division") end; (*. calculates the common denominator of all elements of the list and multiplies .*) (*. the nominators and denominators with the correct factor .*) (*. (polynomial representation) .*) fun step_add_list_of_fractions []=(Free("0",HOLogic.realT),[]:term list) - | step_add_list_of_fractions [x]= raise error ("RATIONALS_STEP_ADD_LIST_OF_FRACTIONS_EXCEPTION: Nothing to add") + | step_add_list_of_fractions [x]= error ("RATIONALS_STEP_ADD_LIST_OF_FRACTIONS_EXCEPTION: Nothing to add") | step_add_list_of_fractions (xs) = let val den_list=termlist2denominators (xs); (* list of denominators *) @@ -2622,7 +2622,7 @@ (*. the nominators and denominators with the correct factor .*) (*. (expanded polynomial representation) .*) fun step_add_list_of_fractions_exp [] = (Free("0",HOLogic.realT),[]:term list) - | step_add_list_of_fractions_exp [x] = raise error ("RATIONALS_STEP_ADD_LIST_OF_FRACTIONS_EXP_EXCEPTION: Nothing to add") + | step_add_list_of_fractions_exp [x] = error ("RATIONALS_STEP_ADD_LIST_OF_FRACTIONS_EXP_EXCEPTION: Nothing to add") | step_add_list_of_fractions_exp (xs)= let val den_list=termlist2denominators_exp (xs); (* list of denominators *) @@ -2688,8 +2688,8 @@ ] | term2list (Const("Groups.plus_class.plus",_) $ t1 $ t2) = term2list(t1) @ term2list(t2) | term2list (Const("Groups.minus_class.minus",_) $ t1 $ t2) = - raise error ("RATIONALS_TERM2LIST_EXCEPTION: - not implemented yet") - | term2list _ = raise error ("RATIONALS_TERM2LIST_EXCEPTION: invalid term"); + error ("RATIONALS_TERM2LIST_EXCEPTION: - not implemented yet") + | term2list _ = error ("RATIONALS_TERM2LIST_EXCEPTION: invalid term"); (*.factors out the gcd of nominator and denominator: a/b = (a' * gcd)/(b' * gcd), a,b,gcd are poly[2].*) @@ -2732,7 +2732,7 @@ (let val ts = term2list t in if 1 < length ts then SOME (add_list_of_fractions ts) - else NONE (*raise error ("RATIONALS_ADD_EXCEPTION: nothing to add")*) + else NONE (*error ("RATIONALS_ADD_EXCEPTION: nothing to add")*) end) handle _ => NONE ); (*.same as add_fraction_p_ but with normalform [3].*) @@ -2740,12 +2740,12 @@ fun add_fraction_ (thy:theory) t = if length(term2list(t))>1 then SOME (add_list_of_fractions_exp(term2list(t))) handle _ => NONE - else (*raise error ("RATIONALS_ADD_FRACTION_EXCEPTION: nothing to add")*) + else (*error ("RATIONALS_ADD_FRACTION_EXCEPTION: nothing to add")*) NONE; fun add_fraction_ (thy:theory) t = (if 1 < length (term2list t) then SOME (add_list_of_fractions_exp (term2list t)) - else (*raise error ("RATIONALS_ADD_FRACTION_EXCEPTION: nothing to add")*) + else (*error ("RATIONALS_ADD_FRACTION_EXCEPTION: nothing to add")*) NONE) handle _ => NONE; (*SOME (step_add_list_of_fractions2_exp(term2list(t))); *) @@ -2947,7 +2947,7 @@ []) end else (tracing("### locate_rule: "^(id_of_thm r)^" not mem rrls");[]) | locate_rule _ _ _ _ _ _ = - raise error ("locate_rule: doesnt match rev-sets in istate"); + error ("locate_rule: doesnt match rev-sets in istate"); (*.next_rule = fn : rule list -> term -> rule option for a given term return the next rules to be done for cancelling. @@ -2975,7 +2975,7 @@ | _ => NONE end | next_rule _ _ _ _ _ = - raise error ("next_rule: doesnt match rev-sets in istate"); + error ("next_rule: doesnt match rev-sets in istate"); (*.val attach_form = f : rule list -> term -> term -> (rule * (term * term list)) list @@ -3054,7 +3054,7 @@ []) end else (tracing("### locate_rule: "^(id_of_thm r)^" not mem rrls");[]) | locate_rule _ _ _ _ _ _ = - raise error ("locate_rule: doesnt match rev-sets in istate"); + error ("locate_rule: doesnt match rev-sets in istate"); fun next_rule thy eval_rls ro [rs] t = let val der = make_deriv thy eval_rls rs ro NONE t; @@ -3065,7 +3065,7 @@ | _ => NONE end | next_rule _ _ _ _ _ = - raise error ("next_rule: doesnt match rev-sets in istate"); + error ("next_rule: doesnt match rev-sets in istate"); fun attach_form (_:rule list list) (_:term) (_:term) = (*still missing*) []:(rule * (term * term list)) list; @@ -3171,7 +3171,7 @@ []) end else (tracing("### locate_rule: "^(id_of_thm r)^" not mem rrls");[]) | locate_rule _ _ _ _ _ _ = - raise error ("locate_rule: doesnt match rev-sets in istate"); + error ("locate_rule: doesnt match rev-sets in istate"); (*.next_rule = fn : rule list -> term -> rule option for a given term return the next rules to be done for cancelling. @@ -3199,7 +3199,7 @@ | _ => NONE end | next_rule _ _ _ _ _ = - raise error ("next_rule: doesnt match rev-sets in istate"); + error ("next_rule: doesnt match rev-sets in istate"); (*.val attach_form = f : rule list -> term -> term -> (rule * (term * term list)) list @@ -3315,7 +3315,7 @@ []) end else (tracing("### locate_rule: "^(id_of_thm r)^" not mem rrls");[]) | locate_rule _ _ _ _ _ _ = - raise error ("locate_rule: doesnt match rev-sets in istate"); + error ("locate_rule: doesnt match rev-sets in istate"); (*.next_rule = fn : rule list -> term -> rule option for a given term return the next rules to be done for cancelling. @@ -3343,7 +3343,7 @@ | _ => NONE end | next_rule _ _ _ _ _ = - raise error ("next_rule: doesnt match rev-sets in istate"); + error ("next_rule: doesnt match rev-sets in istate"); (*.val attach_form = f : rule list -> term -> term -> (rule * (term * term list)) list diff -r 95d956108461 -r 460c24a6a6ba src/Tools/isac/Knowledge/RootEq.thy --- a/src/Tools/isac/Knowledge/RootEq.thy Tue Sep 28 08:58:06 2010 +0200 +++ b/src/Tools/isac/Knowledge/RootEq.thy Tue Sep 28 09:06:56 2010 +0200 @@ -125,7 +125,7 @@ fun is_rootTerm_in t v = let fun coeff_in c v = member op = (vars c) v; - fun findroot (_ $ _ $ _ $ _) v = raise error("is_rootTerm_in:") + fun findroot (_ $ _ $ _ $ _) v = error("is_rootTerm_in:") (* at the moment there is no term like this, but ....*) | findroot (t as (Const ("Root.nroot",_) $ _ $ t3)) v = coeff_in t3 v | findroot (_ $ t2 $ t3) v = (findroot t2 v) orelse (findroot t3 v) @@ -139,7 +139,7 @@ fun is_sqrtTerm_in t v = let fun coeff_in c v = member op = (vars c) v; - fun findsqrt (_ $ _ $ _ $ _) v = raise error("is_sqrteqation_in:") + fun findsqrt (_ $ _ $ _ $ _) v = error("is_sqrteqation_in:") (* at the moment there is no term like this, but ....*) | findsqrt (_ $ t1 $ t2) v = (findsqrt t1 v) orelse (findsqrt t2 v) | findsqrt (t as (Const ("NthRoot.sqrt",_) $ a)) v = coeff_in a v @@ -154,7 +154,7 @@ fun is_normSqrtTerm_in t v = let fun coeff_in c v = member op = (vars c) v; - fun isnorm (_ $ _ $ _ $ _) v = raise error("is_normSqrtTerm_in:") + fun isnorm (_ $ _ $ _ $ _) v = error("is_normSqrtTerm_in:") (* at the moment there is no term like this, but ....*) | isnorm (Const ("Groups.plus_class.plus",_) $ _ $ t2) v = is_sqrtTerm_in t2 v | isnorm (Const ("op *",_) $ _ $ t2) v = is_sqrtTerm_in t2 v diff -r 95d956108461 -r 460c24a6a6ba src/Tools/isac/Knowledge/RootRatEq.thy --- a/src/Tools/isac/Knowledge/RootRatEq.thy Tue Sep 28 08:58:06 2010 +0200 +++ b/src/Tools/isac/Knowledge/RootRatEq.thy Tue Sep 28 09:06:56 2010 +0200 @@ -48,7 +48,7 @@ | rootadd (t as (Const ("Groups.minus_class.minus",_) $ t2 $ t3)) v = (is_rootTerm_in t2 v) orelse (is_rootTerm_in t3 v) | rootadd _ _ = false; - fun findrootrat (_ $ _ $ _ $ _) v = raise error("is_rootRatAddTerm_in:") + fun findrootrat (_ $ _ $ _ $ _) v = error("is_rootRatAddTerm_in:") (* at the moment there is no term like this, but ....*) | findrootrat (t as (Const ("Rings.inverse_class.divide",_) $ _ $ t3)) v = if (is_rootTerm_in t3 v) then rootadd t3 v else false diff -r 95d956108461 -r 460c24a6a6ba src/Tools/isac/Knowledge/Simplify.thy --- a/src/Tools/isac/Knowledge/Simplify.thy Tue Sep 28 08:58:06 2010 +0200 +++ b/src/Tools/isac/Knowledge/Simplify.thy Tue Sep 28 09:06:56 2010 +0200 @@ -73,7 +73,7 @@ ((term_of o the o (parse thy)) "normalform", [(term_of o the o (parse thy)) "N"]) ] - | argl2dtss _ = raise error "Simplify.ML: wrong argument for argl2dtss"; + | argl2dtss _ = error "Simplify.ML: wrong argument for argl2dtss"; castab := overwritel (!castab, diff -r 95d956108461 -r 460c24a6a6ba src/Tools/isac/Knowledge/Test.thy --- a/src/Tools/isac/Knowledge/Test.thy Tue Sep 28 08:58:06 2010 +0200 +++ b/src/Tools/isac/Knowledge/Test.thy Tue Sep 28 09:06:56 2010 +0200 @@ -173,7 +173,7 @@ (*does a term contain a root ?*) fun eval_root_free (thmid:string) _ (t as (Const(op0,t0) $ arg)) thy = if strip_thy op0 <> "is'_root'_free" - then raise error ("eval_root_free: wrong "^op0) + then error ("eval_root_free: wrong "^op0) else if const_in (strip_thy op0) arg then SOME (mk_thmid thmid "" ((Syntax.string_of_term (thy2ctxt thy)) arg) "", diff -r 95d956108461 -r 460c24a6a6ba src/Tools/isac/ProgLang/Tools.thy --- a/src/Tools/isac/ProgLang/Tools.thy Tue Sep 28 08:58:06 2010 +0200 +++ b/src/Tools/isac/ProgLang/Tools.thy Tue Sep 28 09:06:56 2010 +0200 @@ -67,7 +67,7 @@ Const ("op |",_) $ _ $ _ => get (ls @ [o1]) o2 | _ => ls @ [o1, o2] in (((list2isalist bool) o (get [])) ors) - handle _ => raise error ("or2list: no ORs= "^(term2str ors)) end + handle _ => error ("or2list: no ORs= "^(term2str ors)) end ); (*>val t = HOLogic.true_const; > val t' = or2list t; diff -r 95d956108461 -r 460c24a6a6ba src/Tools/isac/ProgLang/rewrite.sml --- a/src/Tools/isac/ProgLang/rewrite.sml Tue Sep 28 08:58:06 2010 +0200 +++ b/src/Tools/isac/ProgLang/rewrite.sml Tue Sep 28 09:06:56 2010 +0200 @@ -95,7 +95,7 @@ in chk [] asms end (* rewrite with a rule set, which must not be the empty Erls *) and rewrite__set_ _ _ __ Erls t = - raise error("rewrite__set_ called with 'Erls' for '"^term2str t^"'") + error("rewrite__set_ called with 'Erls' for '"^term2str t^"'") (* rewrite with a 'reverse rule set' based on ML code *) | rewrite__set_ thy i _ _ (rrls as Rrls _) t = let val _= if ! trace_rewrite andalso i < ! depth @@ -141,7 +141,7 @@ rewrite__ thy (i+1) bdv ((snd o #rew_ord o rep_rls) rls) ((#erls o rep_rls) rls) put_asm thm' ct; val _ = if pairopt <> NONE then () - else raise error("rewrite_set_, rewrite_ \""^ + else error("rewrite_set_, rewrite_ \""^ (string_of_thmI thm')^"\" "^(term2str ct)^" = NONE") val _ = if ! trace_rewrite andalso i < ! depth then tracing((idt"="(i+1))^" calc. to: "^ @@ -161,7 +161,7 @@ rewrite__ thy (i+1) bdv ((snd o #rew_ord o rep_rls) rls) ((#erls o rep_rls) rls) put_asm thm' ct; val _ = if pairopt <> NONE then () - else raise error("rewrite_set_, rewrite_ \""^ + else error("rewrite_set_, rewrite_ \""^ (string_of_thmI thm')^"\" "^(term2str ct)^" = NONE") val _ = if ! trace_rewrite andalso i < ! depth then tracing((idt"="(i+1))^" cal1. to: "^ @@ -333,7 +333,7 @@ fun get_rls_scr rs' = ((#scr o rep_rls o #2 o the o assoc') (!ruleset',rs')) - handle _ => raise error ("get_rls_scr: no script for "^rs'); + handle _ => error ("get_rls_scr: no script for "^rs'); (*make_thm added to Pure/thm.ML*) @@ -415,7 +415,7 @@ then mk_thm thy ct' else (num_str o (PureThy.get_thm thy)) thmid ) handle _ => - raise error ("assoc_thm': '"^thmid^"' not in '"^ + error ("assoc_thm': '"^thmid^"' not in '"^ (theory2domID thy)^"' (and parents)"); (*> assoc_thm' Isac.thy ("sym_#mult_2_3","6 = 2 * 3"); val it = "6 = 2 * 3" : thm diff -r 95d956108461 -r 460c24a6a6ba src/Tools/isac/ProgLang/scrtools.sml --- a/src/Tools/isac/ProgLang/scrtools.sml Tue Sep 28 08:58:06 2010 +0200 +++ b/src/Tools/isac/ProgLang/scrtools.sml Tue Sep 28 09:06:56 2010 +0200 @@ -145,9 +145,9 @@ (**.construct scr-env from scr(created automatically) and Rewrite_Set.**) fun one_scr_arg (Const _ $ arg $ _) = arg - | one_scr_arg t = raise error ("one_scr_arg: called by "^(term2str t)); + | one_scr_arg t = error ("one_scr_arg: called by "^(term2str t)); fun two_scr_arg (Const _ $ a1 $ a2 $ _) = (a1, a2) - | two_scr_arg t = raise error ("two_scr_arg: called by "^(term2str t)); + | two_scr_arg t = error ("two_scr_arg: called by "^(term2str t)); (**.generate calc from a script.**) @@ -167,7 +167,7 @@ datatype stacexpr = STac of term | Expr of term fun rep_stacexpr (STac t ) = t | rep_stacexpr (Expr t) = - raise error ("rep_stacexpr called with t= "^(term2str t)); + error ("rep_stacexpr called with t= "^(term2str t)); type env = (term * term) list; @@ -300,7 +300,7 @@ | is_calc _ = false; fun op_of_calc (Const ("Script.Calculate",_) $ Free (op_,_)) = op_ | op_of_calc (Const ("Script.Calculate",_) $ Free (op_,_) $ _) = op_ - | op_of_calc t = raise error ("op_of_calc called with"^term2str t); + | op_of_calc t = error ("op_of_calc called with"^term2str t); (* val Script sc = (#scr o rep_rls) Test_simplify; val stacs = stacpbls sc; @@ -440,7 +440,7 @@ | contain_bdv (Rls_ rls ::rs) = contain_bdv (get_rules rls) orelse contain_bdv rs | contain_bdv (r::_) = - raise error ("contain_bdv called with ["^(id_rule r)^",...]"); + error ("contain_bdv called with ["^(id_rule r)^",...]"); fun rules2scr_Rls calc rules = (*WN100816 t_ -> t_t like "Script Stepwise..*) if contain_bdv rules @@ -461,7 +461,7 @@ # generate a script for stepwise execution of the rls # filter the operators for Calc out of the script !!!use this function in ruleset' := !!! .*) -fun prep_rls Erls = raise error "prep_rls not impl. for Erls" +fun prep_rls Erls = error "prep_rls not impl. for Erls" | prep_rls (Rls {id,preconds,rew_ord,erls,srls,calc,rules,...}) = let val sc = (rules2scr_Rls (!calclist') rules) in Rls {id=id,preconds=preconds,rew_ord=rew_ord,erls=erls, @@ -482,7 +482,7 @@ rules=rules, scr = Script sc} end | prep_rls (Rrls {id,...}) = - raise error ("prep_rls not required for Rrls \""^id^"\""); + error ("prep_rls not required for Rrls \""^id^"\""); (* val Script sc = (#scr o rep_rls o prep_rls) isolate_root; (tracing o term2str) sc; diff -r 95d956108461 -r 460c24a6a6ba src/Tools/isac/ProgLang/termC.sml --- a/src/Tools/isac/ProgLang/termC.sml Tue Sep 28 08:58:06 2010 +0200 +++ b/src/Tools/isac/ProgLang/termC.sml Tue Sep 28 09:06:56 2010 +0200 @@ -34,8 +34,7 @@ and atol n [] = ("\n*** "^indent n^"]") | atol n (T::Ts) = (ato n T ^ atol n Ts) -(*in print (ato 0 t ^ "\n") end; TODO TUM10*) -in tracing (ato 0 t) end; +in writeln (ato 0 t ^ "\n") end; (* > val T = (type_of o term_of o the o (parse thy)) "a::[real,int] => nat"; > atomtyp T; @@ -86,7 +85,7 @@ | ato (Abs (a, _, body)) n = "\n*** " ^ indent n ^ "Abs(" ^ a ^ ", _" ^ ato body (n+1) | ato (f $ t) n = (ato f n ^ ato t (n + 1)) - in tracing ("\n*** -------------" ^ ato t 0 ^ "\n***") end; + in writeln ("\n*** -------------" ^ ato t 0 ^ "\n***") end; fun term_detail2str t = let fun ato (Const (a, T)) n = @@ -103,14 +102,14 @@ ^ ato body (n + 1) | ato (f $ t) n = ato f n ^ ato t (n + 1) in "\n*** " ^ ato t 0 ^ "\n***" end; -fun atomty t = (tracing o term_detail2str) t; (*WN100907 broken*) +fun atomty t = (writeln o term_detail2str) t; (*WN100907 broken*) fun term_str thy (Const(s,_)) = s | term_str thy (Free(s,_)) = s | term_str thy (Var((s,i),_)) = s^(string_of_int i) | term_str thy (Bound i) = "B."^(string_of_int i) | term_str thy (Abs(s,_,_)) = s - | term_str thy t = raise error("term_str not for "^term2str t); + | term_str thy t = error("term_str not for "^term2str t); (*.contains the fst argument the second argument (a leave! of term).*) fun contains_term (Abs(_,_,body)) t = contains_term body t @@ -172,11 +171,11 @@ (*fun int_of_Free (Free (intstr, _)) = (case BasisLibrary.Int.fromString intstr of SOME i => i - | NONE => raise error ("int_of_Free ( "^ intstr ^", _)")) - | int_of_Free t = raise error ("int_of_Free ( "^ term2str t ^" )");*) + | NONE => error ("int_of_Free ( "^ intstr ^", _)")) + | int_of_Free t = error ("int_of_Free ( "^ term2str t ^" )");*) fun int_of_Free (Free (intstr, _)) = (Thy_Output.integer intstr - handle _ => raise error ("int_of_Free ( "^ intstr ^", _)")) - | int_of_Free t = raise error ("int_of_Free ( "^ term2str t ^" )"); + handle _ => error ("int_of_Free ( "^ intstr ^", _)")) + | int_of_Free t = error ("int_of_Free ( "^ term2str t ^" )"); fun vars t = let @@ -225,10 +224,10 @@ | is_bdv_ _ = false; fun free2str (Free (s,_)) = s - | free2str t = raise error ("free2str not for "^ term2str t); + | free2str t = error ("free2str not for "^ term2str t); fun free2int (t as Free (s, _)) = ((str2int s) - handle _ => raise error ("free2int: "^term_detail2str t)) - | free2int t = raise error ("free2int: "^term_detail2str t); + handle _ => error ("free2int: "^term_detail2str t)) + | free2int t = error ("free2int: "^term_detail2str t); (*27.8.01: unused*) fun var2free (t as Const(s,T)) = t @@ -263,7 +262,7 @@ fun isapair2pair (Const ("Pair",_) $ a $ b) = (a,b) | isapair2pair t = - raise error ("isapair2pair called with "^term2str t); + error ("isapair2pair called with "^term2str t); val listType = Type ("List.list",[Type ("bool",[])]); fun isalist2list ls = @@ -271,7 +270,7 @@ fun get es (Const("List.list.Cons",_) $ t $ ls) = get (t::es) ls | get es (Const("List.list.Nil",_)) = es | get _ t = - raise error ("isalist2list applied to NON-list '"^term2str t^"'") + error ("isalist2list applied to NON-list '"^term2str t^"'") in (rev o (get [])) ls end; (* > val il = str2term "[a=b,c=d,e=f]"; @@ -477,7 +476,7 @@ fun power b 0 = 1 | power b n = if n>0 then b*(power b (n-1)) - else raise error ("power "^(str_of_int b)^" "^(str_of_int n)); + else error ("power "^(str_of_int b)^" "^(str_of_int n)); (* > power 2 3; val it = 8 : int @@ -536,7 +535,7 @@ fun dest_type (Type(T,[])) = T | dest_type T = (atomtyp T; - raise error ("... dest_type: not impl. for this type")); + error ("... dest_type: not impl. for this type")); fun term_of_num ntyp n = Free (str_of_int n, ntyp); @@ -562,8 +561,8 @@ fun num_of_term (t as Free (s,_)) = (case int_of_str s of SOME s' => s' - | NONE => raise error ("num_of_term not for "^ term2str t)) - | num_of_term t = raise error ("num_of_term not for "^term2str t); + | NONE => error ("num_of_term not for "^ term2str t)) + | num_of_term t = error ("num_of_term not for "^term2str t); fun mk_factroot op_(*=thy.sqrt*) T fact root = Const ("op *", [T, T] ---> T) $ (term_of_num T fact) $ @@ -612,11 +611,11 @@ | calc "op *" (n1, n2) = n1*n2 | calc "Rings.inverse_class.divide"(n1, n2) = n1 div n2 | calc "Atools.pow"(n1, n2) = power n1 n2 - | calc op_ _ = raise error ("calc: operator = "^op_^" not defined");-----*) + | calc op_ _ = error ("calc: operator = "^op_^" not defined");-----*) fun calc_equ "op <" (n1, n2) = n1 < n2 | calc_equ "op <=" (n1, n2) = n1 <= n2 | calc_equ op_ _ = - raise error ("calc_equ: operator = "^op_^" not defined"); + error ("calc_equ: operator = "^op_^" not defined"); fun sqrt (n:int) = if n < 0 then 0 (*FIXME ~~~*) else (trunc o Math.sqrt o Real.fromInt) n; @@ -625,7 +624,7 @@ fun dest_binop_typ (Type("fun",[range,Type("fun",[arg2,arg1])])) = (arg1,arg2,range) - | dest_binop_typ _ = raise error "dest_binop_typ: not binary"; + | dest_binop_typ _ = error "dest_binop_typ: not binary"; (* ----- > val t = (term_of o the o (parse thy)) "#3^#4"; > val hT = type_of (head_of t); diff -r 95d956108461 -r 460c24a6a6ba src/Tools/isac/calcelems.sml --- a/src/Tools/isac/calcelems.sml Tue Sep 28 08:58:06 2010 +0200 +++ b/src/Tools/isac/calcelems.sml Tue Sep 28 09:06:56 2010 +0200 @@ -144,9 +144,9 @@ val e_rule = Thm ("refl", ProofContext.get_thm (thy2ctxt' "Complex_Main") "refl" ); fun id_of_thm (Thm (id, _)) = id - | id_of_thm _ = raise error "id_of_thm"; + | id_of_thm _ = error "id_of_thm"; fun thm_of_thm (Thm (_, thm)) = thm - | thm_of_thm _ = raise error "thm_of_thm"; + | thm_of_thm _ = error "thm_of_thm"; fun rep_thm_G' (Thm (thmid, thm)) = (thmid, thm); fun eq_thmI ((thmid1 : thmID, _ : thm), (thmid2 : thmID, _ : thm)) = (strip_thy thmid1) = (strip_thy thmid2); @@ -307,7 +307,7 @@ (*theID eg. is ["IsacKnowledge", "Test", "Rulesets", "ac_plus_times"]*) fun theID2thyID (theID:theID) = if length theID >= 3 then (last_elem o (drop_last_n 2)) theID : thyID - else raise error ("theID2thyID called with "^ theID2str theID); + else error ("theID2thyID called with "^ theID2str theID); (*the key into the hierarchy ob problems*) type pblID = string list; (* domID::...*) @@ -451,9 +451,9 @@ (*asm_thm=asm_thm,*)rules=rules,scr=scr} | rep_rls Erls = rep_rls e_rls | rep_rls (Rrls {id,...}) = rep_rls e_rls - (*raise error("rep_rls doesn't take apart reverse-rewrite-rule-sets: "^id)*); + (*error("rep_rls doesn't take apart reverse-rewrite-rule-sets: "^id)*); (*| rep_rls (Seq {id,...}) = - raise error("rep_rls doesn't take apart reverse-rewrite-rule-sets: "^id); + error("rep_rls doesn't take apart reverse-rewrite-rule-sets: "^id); --1.7.03*) fun rep_rrls (Rrls {id,(*asm_thm,*) calc, erls, prepat, rew_ord, @@ -464,9 +464,9 @@ rew_ord=rew_ord, attach_form=attach_form, init_state=init_state, locate_rule=locate_rule, next_rule=next_rule, normal_form=normal_form} | rep_rrls (Rls {id,...}) = - raise error ("rep_rrls doesn't take apart (normal) rule-sets: "^id) + error ("rep_rrls doesn't take apart (normal) rule-sets: "^id) | rep_rrls (Seq {id,...}) = - raise error ("rep_rrls doesn't take apart (normal) rule-sets: "^id); + error ("rep_rrls doesn't take apart (normal) rule-sets: "^id); fun append_rls id (Rls {id=_,preconds=pc,rew_ord=ro,erls=er,srls=sr,calc=ca, rules =rs,scr=sc}) r = @@ -477,7 +477,7 @@ (Seq{id=id,preconds=pc,rew_ord=ro,erls=er,srls=sr,calc=ca, rules = rs @ r,scr=sc}:rls) | append_rls id (Rrls _) _ = - raise error ("append_rls: not for reverse-rewrite-rule-set "^id); + error ("append_rls: not for reverse-rewrite-rule-set "^id); (*. are _atomic_ rules equal ?.*) (*WN080102 compare eqrule ?!?*) @@ -516,7 +516,7 @@ rules = gen_union eq_rule rule2str (rs1, (#rules o rep_rls) r2), scr=sc1}:rls) | merge_rls _ _ _ = - raise error "merge_rls: not for reverse-rewrite-rule-sets\ + error "merge_rls: not for reverse-rewrite-rule-sets\ \and not for mixed Rls -- Seq"; fun remove_rls id (Rls {id=_,preconds=pc,rew_ord=ro,erls=er,srls=sr,calc=ca, (*asm_thm=at,*)rules =rs,scr=sc}) r = @@ -528,7 +528,7 @@ (Seq{id=id,preconds=pc,rew_ord=ro,erls=er,srls=sr,calc=ca, (*asm_thm=at,*)rules = gen_rems eq_rule (rs, r), scr=sc}:rls) - | remove_rls id (Rrls _) _ = raise error + | remove_rls id (Rrls _) _ = error ("remove_rls: not for reverse-rewrite-rule-set "^id); (*!!!> gen_rems (op=) ([1,2,3,4], [3,4,5]); @@ -540,29 +540,29 @@ SOME _ => true | NONE => false;*) fun memrls r (Rls {rules,...}) = gen_mem eqrule (r, rules) | memrls r (Seq {rules,...}) = gen_mem eqrule (r, rules) - | memrls r _ = raise error ("memrls: incomplete impl. r= "^(rule2str r)); + | memrls r _ = error ("memrls: incomplete impl. r= "^(rule2str r)); fun rls_get_thm rls (id: xstring) = case find_first (curry eq_rule e_rule) ((#rules o rep_rls) rls) of SOME thm => SOME thm | NONE => NONE; -fun assoc' ([], key) = raise error ("ME_Isa: '"^key^"' not known") +fun assoc' ([], key) = error ("ME_Isa: '"^key^"' not known") | assoc' ((keyi, xi) :: pairs, key) = if key = keyi then SOME xi else assoc' (pairs, key); (*100818 fun assoc_thy (thy:theory') = ((the o assoc')(!theory',thy)) - handle _ => raise error ("ME_Isa: thy '"^thy^"' not in system");*) + handle _ => error ("ME_Isa: thy '"^thy^"' not in system");*) fun assoc_thy (thy:theory') = (*FIXME100818 abolish*) (theory ((implode o (curry takelast 4) o explode) thy)) - handle _ => raise error ("ME_Isa: thy '" ^ thy ^ "' not in system"); + handle _ => error ("ME_Isa: thy '" ^ thy ^ "' not in system"); (*.associate an rls-identifier with an rls; related to 'fun assoc_rls'; these are NOT compatible to "fun assoc_thm'" in that they do NOT handle overlays by re-using an identifier in different thys.*) fun assoc_rls (rls:rls') = ((#2 o the o assoc')(!ruleset',rls)) - handle _ => raise error ("ME_Isa: '"^rls^"' not in system"); + handle _ => error ("ME_Isa: '"^rls^"' not in system"); (*fun assoc_rls (rls:rls') = ((the o assoc')(!ruleset',rls)) - handle _ => raise error ("ME_Isa: '"^rls^"' not in system");*) + handle _ => error ("ME_Isa: '"^rls^"' not in system");*) (*.overwrite an element in an association list and pair it with a thyID in order to create the thy_hierarchy; @@ -579,20 +579,20 @@ in overwritel (al, bl') end; fun assoc_rew_ord ro = ((the o assoc') (!rew_ord',ro)) - handle _ => raise error ("ME_Isa: rew_ord '"^ro^"' not in system"); + handle _ => error ("ME_Isa: rew_ord '"^ro^"' not in system"); (*get the string for stac from rule*) -fun assoc_calc ([], key) = raise error ("assoc_calc: '"^ key ^"' not found") +fun assoc_calc ([], key) = error ("assoc_calc: '"^ key ^"' not found") | assoc_calc ((calc, (keyi, xi)) :: pairs, key) = if key = keyi then calc else assoc_calc (pairs, key); (*only used for !calclist'...*) -fun assoc1 ([], key) = raise error ("assoc1 (for met.calc=): '"^ key +fun assoc1 ([], key) = error ("assoc1 (for met.calc=): '"^ key ^"' not found") | assoc1 ((all as (keyi, _)) :: pairs, key) = if key = keyi then all else assoc1 (pairs, key); (*TODO.WN080102 clarify usage of type cal and type calc..*) fun calID2calcID (calID : calID) = - let fun ass [] = raise error ("calID2calcID: "^calID^"not in calclist'") + let fun ass [] = error ("calID2calcID: "^calID^"not in calclist'") | ass ((calci, (cali, eval_fn))::ids) = if calID = cali then calci else ass ids diff -r 95d956108461 -r 460c24a6a6ba src/Tools/isac/library.sml --- a/src/Tools/isac/library.sml Tue Sep 28 08:58:06 2010 +0200 +++ b/src/Tools/isac/library.sml Tue Sep 28 09:06:56 2010 +0200 @@ -33,7 +33,7 @@ if n > 0 then drop (n - 1, xs) else x :: xs; (*exn LIST has disappeared in 2009 ... replaced by error...*) -fun last_elem [] = raise error "last_elem" (*FIXME.2009*) +fun last_elem [] = error "last_elem" (*FIXME.2009*) | last_elem [x] = x | last_elem (_ :: xs) = last_elem xs; @@ -100,7 +100,7 @@ fun cons2 (f,g) x = (f x, g x); (*PL softwareparadigmen*) -fun nth _ [] = raise error "nth _ []" +fun nth _ [] = error "nth _ []" | nth 1 (x::_) = x | nth n (_::xs) = nth (n-1) xs; (*WN050106 quick for test: doesn't check for exns*) @@ -268,15 +268,15 @@ fun intsto1 0 = [] | intsto1 n = (intsto1 (n-1)) @ [n] in -fun intsto n = if n < 0 then (raise error "intsto < 0") else intsto1 n +fun intsto n = if n < 0 then (error "intsto < 0") else intsto1 n end; type 'a stack = 'a list; fun top ((x::xs):'a stack) = x - | top _ = raise error "top called for empty list"; + | top _ = error "top called for empty list"; fun pop ((x::xs):'a stack) = xs:'a stack - | pop _ = raise error "pop called for empty list"; + | pop _ = error "pop called for empty list"; fun push x (xs:'a stack) = x::xs:'a stack; @@ -295,7 +295,7 @@ (*.take elements from b to e including both.*) fun take_fromto from to l = - if from > to then raise error ("take_fromto from="^string_of_int from^ + if from > to then error ("take_fromto from="^string_of_int from^ " > to="^string_of_int to) else drop (from - 1, take (to, l)); (*> take_fromto 3 5 [1,2,3,4,5,6,7]; diff -r 95d956108461 -r 460c24a6a6ba src/Tools/isac/xmlsrc/datatypes.sml --- a/src/Tools/isac/xmlsrc/datatypes.sml Tue Sep 28 08:58:06 2010 +0200 +++ b/src/Tools/isac/xmlsrc/datatypes.sml Tue Sep 28 09:06:56 2010 +0200 @@ -80,8 +80,8 @@ autx (j + i) auts ^ indt j ^ "\n" : xml end; -(* tracing(authors2xml 2 "MATHAUTHORS" []); - tracing(authors2xml 2 "MATHAUTHORS" +(* writeln(authors2xml 2 "MATHAUTHORS" []); + writeln(authors2xml 2 "MATHAUTHORS" ["isac-team 2001", "Richard Lang 2003"]); *) @@ -92,7 +92,7 @@ in (indt j) ^ "\n" ^ (id2x (j + indentation) ids) ^ (indt j) ^ "\n" end; -(* tracing(id2xml 8 ["linear","univariate","equation"]); +(* writeln(id2xml 8 ["linear","univariate","equation"]); linear univariate @@ -106,7 +106,7 @@ in (indt j) ^ "\n" ^ (int2x (j + i) ids) ^ (indt j) ^ "\n" end; -(* tracing(ints2xml 3 [1,2,3]); +(* writeln(ints2xml 3 [1,2,3]); *) @@ -122,18 +122,18 @@ ints2xml (j+i) pos ^ pos_2xml (j+i) pos_ ^ indt (j) ^ "\n"; -(* tracing(pos'2xml 3 ("POSITION", ([1,2,3], Pbl))); +(* writeln(pos'2xml 3 ("POSITION", ([1,2,3], Pbl))); *) fun formula2xml j term = (*TODO.WN050211: use for _all_ *) indt j ^ "\n"^ term2xml j term ^"\n"^ indt j ^ "\n" : xml; -(* tracing(formula2xml 6 (str2term "1+1=2")); +(* writeln(formula2xml 6 (str2term "1+1=2")); *) fun formulae2xml j [] = ("":xml) | formulae2xml j (r::rs) = formula2xml j r ^ formulae2xml j rs; -(* tracing(formulae2xml 6 [str2term "1+1=2", str2term "1+1+1=3"]); +(* writeln(formulae2xml 6 [str2term "1+1=2", str2term "1+1+1=3"]); *) (*WN0502 @see ME/ctree: type asms: illdesigned, thus not used*) @@ -144,11 +144,11 @@ term2xml (j+i) term ^"\n"^ indt (j+i) ^ "\n"^ indt j ^ "\n" : xml; -(* tracing(posform2xml 6 (([1,2],Frm), str2term "1+1=2")); +(* writeln(posform2xml 6 (([1,2],Frm), str2term "1+1=2")); *) fun posforms2xml j [] = ("":xml) | posforms2xml j (r::rs) = posform2xml j r ^ posforms2xml j rs; -(* tracing(posforms2xml 6 [(([1],Res), str2term "1+1=2"),(([2],Res), str2term "1+1+1=3")]); +(* writeln(posforms2xml 6 [(([1],Res), str2term "1+1=2"),(([2],Res), str2term "1+1+1=3")]); *) fun calcref2xml j (thyID:thyID, (scrop, (rewop, _)):calc) = @@ -172,7 +172,7 @@ (*.for creating a href for a rule within an rls's rule list; the guh points to the thy of definition of the rule, NOT of use in rls.*) fun rule2xml j (thyID:thyID) Erule = - raise error "rule2xml called with 'Erule'" + error "rule2xml called with 'Erule'" (* val (j, thyID, Thm (thmID, thm)) = (j+i, thyID, nth 1 rules); val (j, thyID, Thm (thmID, thm)) = (j, thyID,r); *) @@ -217,7 +217,7 @@ in filt end; (*FIXME.WN040831 model2xml <--?--> pattern2xml*) -(*WN.25.8.03: pattern2xml different output with TextIO | tracing !!! +(*WN.25.8.03: pattern2xml different output with TextIO | writeln !!! the version below is for TextIO: terms2xml makes \n !*) (* val (j, p, where_) = (i, ppc, where_); *) @@ -244,7 +244,7 @@ | res => (indt j) ^ "\n" ^ terms2xml' j res ^ (indt j) ^ "\n"); (* -tracing(pattern2xml 3 ((#ppc o get_pbt) +writeln(pattern2xml 3 ((#ppc o get_pbt) ["squareroot","univariate","equation","test"]) []); *) @@ -318,7 +318,7 @@ (indt (j+i)) ^ "\n")^ indt j ^"\n"):xml end; -(* tracing(model2xml 3 itms []); +(* writeln(model2xml 3 itms []); *) fun spec2xml j ((dI,pI,mI):spec) = @@ -344,7 +344,7 @@ | _ => "Und")^" \n"^ spec2xml (j+i) spec ^ indt j ^"\n"):xml; -(* tracing (modspec2xml 2 e_ocalhd); +(* writeln (modspec2xml 2 e_ocalhd); *) fun pos'calchead2xml j (p:pos', (b, p_, head, gfr, pre, spec): ocalhd) = (indt j ^"\n"):xml; (* val subs = [(str2term "bdv", str2term "x")]; val subs = ["(bdv, x)"]; - tracing(subs2xml 0 subs); + writeln(subs2xml 0 subs); *) fun subst2xml j (subst:subst) = (indt j ^"\n"^ foldl op^ ("", map (sub2xml (j+i)) subst) ^ indt j ^"\n"):xml; (* val subst = [(str2term "bdv", str2term "x")]; - tracing(subst2xml 0 subst); + writeln(subst2xml 0 subst); *) (* val (j, str) = ((j+i), form); @@ -568,7 +568,7 @@ (indt j ^"\n"^ thm'2xml (j+i) thm'^ indt j ^"\n"):xml -(* tracing (tac2xml 2 (Rewrite ("all_left", +(* writeln (tac2xml 2 (Rewrite ("all_left", "~ ?b =!= 0 ==> (?a = ?b) = (?a - ?b = 0)"))); val (j, (Rewrite_Inst (subs, thm'))) = (i, tac); *) @@ -577,7 +577,7 @@ subs2xml (j+i) subs^ thm'2xml (j+i) thm'^ indt j ^"\n"):xml -(* tracing (tac2xml 2 (Rewrite_Inst +(* writeln (tac2xml 2 (Rewrite_Inst (["(bdv,x)"], ("all_left", "~ ?b =!= 0 ==> (?a = ?b) = (?a - ?b = 0)")))); @@ -609,7 +609,7 @@ id2xml (j+i) pI^ indt j ^"\n"):xml - | tac2xml j tac = raise error ("tac2xml: not impl. for "^tac2str tac); + | tac2xml j tac = error ("tac2xml: not impl. for "^tac2str tac); fun tacs2xml j [] = "":xml | tacs2xml j (t::ts) = tac2xml j t ^ tacs2xml j ts; @@ -698,10 +698,10 @@ (* val (ContThmInst{thyID, thm, bdvs, thminst, applto, applat, reword, asms, lhs, rhs, result, resasms, asmrls}) = (context_thy (pt,pos) tac); -tracing (contthy2xml 2 (context_thy (pt,pos) tac)); +writeln (contthy2xml 2 (context_thy (pt,pos) tac)); *) fun contthy2xml j EContThy = - raise error "contthy2xml called with EContThy" + error "contthy2xml called with EContThy" | contthy2xml j (ContThm {thyID, thm, applto, applat, reword, asms,lhs, rhs, result, resasms, asmrls}) = indt j ^ " " ^ thm ^ " \n" ^ diff -r 95d956108461 -r 460c24a6a6ba src/Tools/isac/xmlsrc/interface-xml.sml --- a/src/Tools/isac/xmlsrc/interface-xml.sml Tue Sep 28 08:58:06 2010 +0200 +++ b/src/Tools/isac/xmlsrc/interface-xml.sml Tue Sep 28 09:06:56 2010 +0200 @@ -25,14 +25,14 @@ (** add and delete users ----------------------------------------------- FIXXME.8.03 addUser: clear code, because only CalcTrees distinguished**) fun adduserOK2xml (cI:calcID) (uI:iterID) = - tracing ("@@@@@begin@@@@@\n "^string_of_int uI^" \n" ^ + writeln ("@@@@@begin@@@@@\n "^string_of_int uI^" \n" ^ "\n" ^ " "^string_of_int cI^" \n" ^ " "^string_of_int uI^" \n" ^ "\n" ^ "@@@@@end@@@@@"); fun deluserOK2xml (cI:calcID) (uI:iterID) = - tracing ("@@@@@begin@@@@@\n "^string_of_int uI^" \n" ^ + writeln ("@@@@@begin@@@@@\n "^string_of_int uI^" \n" ^ "\n" ^ " "^string_of_int cI^" \n" ^ " "^string_of_int uI^" \n" ^ @@ -41,27 +41,27 @@ (*---------------------------------------------------------------------*) fun calctreeOK2xml (*uI:iterID*) (cI:calcID) = - tracing ("@@@@@begin@@@@@\n "^string_of_int cI^" \n" ^ + writeln ("@@@@@begin@@@@@\n "^string_of_int cI^" \n" ^ "\n" ^ " "^string_of_int cI^" \n" ^ "\n" ^ "@@@@@end@@@@@"); fun deconstructcalctreeOK2xml (*uI:userID*) (cI:calcID) = - tracing ("@@@@@begin@@@@@\n "^string_of_int cI^" \n" ^ + writeln ("@@@@@begin@@@@@\n "^string_of_int cI^" \n" ^ "\n" ^ " "^string_of_int cI^" \n" ^ "\n" ^ "@@@@@end@@@@@"); fun iteratorOK2xml (cI:calcID) (p:pos')= - tracing ("@@@@@begin@@@@@\n "^string_of_int cI^" \n" ^ + writeln ("@@@@@begin@@@@@\n "^string_of_int cI^" \n" ^ "\n" ^ " "^string_of_int cI^" \n" ^ pos'2xml i ("POSITION", p) ^ "\n" ^ "@@@@@end@@@@@"); fun iteratorERROR2xml (cI:calcID) = - tracing ("@@@@@begin@@@@@\n "^string_of_int cI^" \n" ^ + writeln ("@@@@@begin@@@@@\n "^string_of_int cI^" \n" ^ "\n" ^ " "^string_of_int cI^" \n" ^ " pos does not exist \n" ^ @@ -69,14 +69,14 @@ "@@@@@end@@@@@"); fun sysERROR2xml (cI:calcID) "" = - tracing ("@@@@@begin@@@@@\n "^string_of_int cI^" \n" ^ + writeln ("@@@@@begin@@@@@\n "^string_of_int cI^" \n" ^ "\n" ^ " "^string_of_int cI^" \n" ^ " in kernel \n" ^ "\n" ^ "@@@@@end@@@@@") | sysERROR2xml (cI:calcID) str = - tracing ("@@@@@begin@@@@@\n "^string_of_int cI^" \n" ^ + writeln ("@@@@@begin@@@@@\n "^string_of_int cI^" \n" ^ "\n" ^ " "^string_of_int cI^" \n" ^ " "^str^" \n" ^ @@ -84,7 +84,7 @@ "@@@@@end@@@@@"); fun refformulaOK2xml (cI:calcID) p (Form t) = - tracing ("@@@@@begin@@@@@\n "^string_of_int cI^" \n" ^ + writeln ("@@@@@begin@@@@@\n "^string_of_int cI^" \n" ^ "\n" ^ " "^string_of_int cI^" \n" ^ " \n"^ @@ -96,7 +96,7 @@ "\n" ^ "@@@@@end@@@@@") | refformulaOK2xml (cI:calcID) p (ModSpec modspec) = - tracing ("@@@@@begin@@@@@\n "^string_of_int cI^" \n" ^ + writeln ("@@@@@begin@@@@@\n "^string_of_int cI^" \n" ^ "\n" ^ " "^string_of_int cI^" \n" ^ pos'calchead2xml i (p, modspec)^ @@ -104,7 +104,7 @@ "@@@@@end@@@@@"); fun refformulaERROR2xml (cI:calcID) = (*FIXME.WN.29.8.03 unused*) - tracing ("@@@@@begin@@@@@\n "^string_of_int cI^" \n" ^ + writeln ("@@@@@begin@@@@@\n "^string_of_int cI^" \n" ^ "\n" ^ " object is not a formula \n" ^ "\n" ^ @@ -113,14 +113,14 @@ (* val (cI, tac) = (cI, ta); *) fun gettacticOK2xml (cI:calcID) tac = - tracing ("@@@@@begin@@@@@\n "^string_of_int cI^" \n" ^ + writeln ("@@@@@begin@@@@@\n "^string_of_int cI^" \n" ^ "\n" ^ " "^string_of_int cI^" \n"^ tac2xml i tac^ "\n" ^ "@@@@@end@@@@@"); fun gettacticERROR2xml (cI:calcID) str = - tracing ("@@@@@begin@@@@@\n "^string_of_int cI^" \n" ^ + writeln ("@@@@@begin@@@@@\n "^string_of_int cI^" \n" ^ "\n" ^ " "^string_of_int cI^" \n" ^ " "^str^" \n" ^ @@ -128,7 +128,7 @@ "@@@@@end@@@@@"); fun applicabletacticsOK cI tacs = - tracing ("@@@@@begin@@@@@\n "^string_of_int cI^" \n" ^ + writeln ("@@@@@begin@@@@@\n "^string_of_int cI^" \n" ^ "\n" ^ " "^string_of_int cI^" \n" ^ " \n"^ @@ -138,7 +138,7 @@ "@@@@@end@@@@@"); fun getasmsOK2xml (cI:calcID) terms = - tracing ("@@@@@begin@@@@@\n "^string_of_int cI^" \n" ^ + writeln ("@@@@@begin@@@@@\n "^string_of_int cI^" \n" ^ "\n" ^ " "^string_of_int cI^" \n" ^ " \n"^ @@ -151,7 +151,7 @@ (*WN0502 @see ME/ctree: type asms: illdesigned, thus not used*) fun getaccuasmsOK2xml cI asms = - tracing ("@@@@@begin@@@@@\n "^string_of_int cI^" \n" ^ + writeln ("@@@@@begin@@@@@\n "^string_of_int cI^" \n" ^ "\n" ^ " "^string_of_int cI^" \n" ^ " \n"^ @@ -165,7 +165,7 @@ *) fun getintervalOK (cI:calcID) fs = - tracing ("@@@@@begin@@@@@\n "^string_of_int cI^" \n" ^ + writeln ("@@@@@begin@@@@@\n "^string_of_int cI^" \n" ^ "\n" ^ " "^string_of_int cI^" \n" ^ " \n"^ @@ -176,7 +176,7 @@ fun matchpbl2xml (cI:calcID) (model_ok, pI, hdl, pbl, pre) = - tracing ("@@@@@begin@@@@@\n "^string_of_int cI^" \n" ^ + writeln ("@@@@@begin@@@@@\n "^string_of_int cI^" \n" ^ "\n" ^ " " ^ pblID2guh pI ^ " \n" ^ " " ^ (if model_ok @@ -190,7 +190,7 @@ "@@@@@end@@@@@"); fun matchmet2xml (cI:calcID) (model_ok, pI, scr, pbl, pre) = - tracing ("@@@@@begin@@@@@\n "^string_of_int cI^" \n" ^ + writeln ("@@@@@begin@@@@@\n "^string_of_int cI^" \n" ^ "\n" ^ " " ^ metID2guh pI ^ " \n" ^ " " ^ (if model_ok @@ -203,7 +203,7 @@ fun tryrefineOK2xml (cI:calcID) (ModSpec modspec) = - tracing ("@@@@@begin@@@@@\n "^string_of_int cI^" \n" ^ + writeln ("@@@@@begin@@@@@\n "^string_of_int cI^" \n" ^ "\n" ^ " "^string_of_int cI^" \n" ^ modspec2xml i modspec ^ @@ -211,7 +211,7 @@ "@@@@@end@@@@@"); fun appendformulaOK2xml (cI:calcID) (old:pos') (del:pos') (new:pos') = - tracing ("@@@@@begin@@@@@\n "^string_of_int cI^" \n" ^ + writeln ("@@@@@begin@@@@@\n "^string_of_int cI^" \n" ^ "\n" ^ " "^string_of_int cI^" \n" ^ " \n" ^ @@ -224,12 +224,12 @@ (* appendformulaOK2xml 1 ([2],Frm) ([3],Pbl) ([4],Res); *) fun appendformulaERROR2xml (cI:calcID) msg = - tracing ("@@@@@begin@@@@@\n "^string_of_int cI^" \n" ^ + writeln ("@@@@@begin@@@@@\n "^string_of_int cI^" \n" ^ " "^ msg ^" \n" ^ "@@@@@end@@@@@"); fun replaceformulaOK2xml (cI:calcID) (old:pos') (del:pos') (new:pos') = - tracing ("@@@@@begin@@@@@\n "^string_of_int cI^" \n" ^ + writeln ("@@@@@begin@@@@@\n "^string_of_int cI^" \n" ^ "\n" ^ " "^string_of_int cI^" \n" ^ " \n" ^ @@ -240,12 +240,12 @@ "\n" ^ "@@@@@end@@@@@"); fun replaceformulaERROR2xml (cI:calcID) msg = - tracing ("@@@@@begin@@@@@\n "^string_of_int cI^" \n" ^ + writeln ("@@@@@begin@@@@@\n "^string_of_int cI^" \n" ^ " "^ msg ^" \n" ^ "@@@@@end@@@@@"); fun message2xml (cI:calcID) e = - tracing ("@@@@@begin@@@@@\n "^string_of_int cI^" \n" ^ + writeln ("@@@@@begin@@@@@\n "^string_of_int cI^" \n" ^ "\n" ^ " "^string_of_int cI^" \n" ^ " "^e^" \n" ^ @@ -253,7 +253,7 @@ "@@@@@end@@@@@"); fun setnexttactic2xml (*uI:iterID*) (cI:calcID) e = - tracing ("@@@@@begin@@@@@\n "^string_of_int cI^" \n" ^ + writeln ("@@@@@begin@@@@@\n "^string_of_int cI^" \n" ^ "\n" ^ " "^string_of_int cI^" \n" ^ " "^e^" \n" ^ @@ -261,7 +261,7 @@ "@@@@@end@@@@@"); fun fetchproposedtacticOK2xml (*uI:userID*) (cI:calcID) tac = - tracing ("@@@@@begin@@@@@\n "^string_of_int cI^" \n" ^ + writeln ("@@@@@begin@@@@@\n "^string_of_int cI^" \n" ^ "\n" ^ " "^string_of_int cI^" \n"^ tac2xml i tac^ @@ -271,7 +271,7 @@ (* fetchproposedtactic2xml 11 22 (Rewrite ("rmult_commute","?m *?n =?n *?m")); *) fun fetchproposedtacticERROR2xml (*uI:userID*) (cI:calcID) e = - tracing ("@@@@@begin@@@@@\n "^string_of_int cI^" \n" ^ + writeln ("@@@@@begin@@@@@\n "^string_of_int cI^" \n" ^ "\n" ^ " "^string_of_int cI^" \n" ^ " "^ e ^" \n" ^ @@ -283,7 +283,7 @@ GENERATED: the pos' of the new active formula .*) fun autocalculateOK2xml (cI:calcID) (old:pos') (del:pos') (new:pos') = - tracing ("@@@@@begin@@@@@\n "^string_of_int cI^" \n" ^ + writeln ("@@@@@begin@@@@@\n "^string_of_int cI^" \n" ^ "\n" ^ " "^string_of_int cI^" \n" ^ " \n" ^ @@ -296,12 +296,12 @@ (* autocalculate2xml 11 22 (Rewrite ("rmult_commute","?m *?n =?n *?m")); *) fun autocalculateERROR2xml (cI:calcID) e = - tracing ("@@@@@begin@@@@@\n "^string_of_int cI^" \n" ^ + writeln ("@@@@@begin@@@@@\n "^string_of_int cI^" \n" ^ " "^ e ^" \n" ^ "@@@@@end@@@@@"); fun interStepsOK (cI:calcID) (*pos'forms*) (old:pos') (del:pos') (new:pos') = - tracing ("@@@@@begin@@@@@\n "^string_of_int cI^" \n" ^ + writeln ("@@@@@begin@@@@@\n "^string_of_int cI^" \n" ^ "\n" ^ " "^string_of_int cI^" \n" ^ " \n" ^ @@ -312,12 +312,12 @@ "\n" ^ "@@@@@end@@@@@"); fun interStepsERROR (cI:calcID) e = - tracing ("@@@@@begin@@@@@\n "^string_of_int cI^" \n" ^ + writeln ("@@@@@begin@@@@@\n "^string_of_int cI^" \n" ^ " "^ e ^" \n" ^ "@@@@@end@@@@@"); fun modifycalcheadOK2xml (cI:calcID) (chd as (complete,p_,_,_,_,_):ocalhd) = - tracing ("@@@@@begin@@@@@\n "^string_of_int cI^" \n" ^ + writeln ("@@@@@begin@@@@@\n "^string_of_int cI^" \n" ^ "\n" ^ " "^string_of_int cI^" \n" ^ " "^(if complete then "complete" @@ -329,7 +329,7 @@ (* val (cI, contthy) = (cI, (context_thy (pt,pos) tac)); *) fun contextthyOK2xml cI contthy = - tracing ("@@@@@begin@@@@@\n "^string_of_int cI^" \n" ^ + writeln ("@@@@@begin@@@@@\n "^string_of_int cI^" \n" ^ "\n" ^ " "^string_of_int cI^" \n" ^ contthy2xml i contthy ^ @@ -338,5 +338,5 @@ (* fun contextthyNO2xml guh = - tracing (datatypes.contextthyNO2xml 0 guh); + writeln (datatypes.contextthyNO2xml 0 guh); *) diff -r 95d956108461 -r 460c24a6a6ba src/Tools/isac/xmlsrc/mathml.sml --- a/src/Tools/isac/xmlsrc/mathml.sml Tue Sep 28 08:58:06 2010 +0200 +++ b/src/Tools/isac/xmlsrc/mathml.sml Tue Sep 28 09:06:56 2010 +0200 @@ -28,7 +28,7 @@ fun strs2xml strs = foldl (op ^) ("", strs); -(* tracing (strs2xml [" xxx \n"," yyy \n"]); +(* writeln (strs2xml [" xxx \n"," yyy \n"]); xxx yyy *) @@ -41,7 +41,7 @@ indt (j+2*i) ^ " " ^ (decode o term2str) t ^ " \n" ^ indt (j+i) ^ ""; (*val t = str2term "equality e_"; - tracing (term2xml 8 t); + writeln (term2xml 8 t); equality e_ *) @@ -49,7 +49,7 @@ (*version for TextIO*) fun terms2xml j [] = "" | terms2xml j (t::ts) = term2xml j t ^ terms2xml j ts; -(*version for tracing: extra \n*) +(*version for writeln: extra \n*) fun terms2xml' j [] = "" | terms2xml' j [t] = term2xml j t | terms2xml' j (t::ts) = term2xml j t ^"\n"^ terms2xml' j ts; @@ -62,11 +62,11 @@ (*version for TextIO*) fun cterms2xml j [] = "" | cterms2xml j (t::ts) = cterm2xml j t ^ cterms2xml j ts; -(*version for tracing: extra \n*) +(*version for writeln: extra \n*) fun cterms2xml' j [] = "" | cterms2xml' j (t::ts) = cterm2xml j t ^"\n"^ cterms2xml j ts; -(* tracing(cterms2xml 5 ["cterm1", "cterm2"]); +(* writeln(cterms2xml 5 ["cterm1", "cterm2"]); cterm1 diff -r 95d956108461 -r 460c24a6a6ba src/Tools/isac/xmlsrc/pbl-met-hierarchy.sml --- a/src/Tools/isac/xmlsrc/pbl-met-hierarchy.sml Tue Sep 28 08:58:06 2010 +0200 +++ b/src/Tools/isac/xmlsrc/pbl-met-hierarchy.sml Tue Sep 28 09:06:56 2010 +0200 @@ -11,13 +11,13 @@ in (TextIO.output (file, str); TextIO.flushOut file; TextIO.closeOut file) end; -fun pos2filename [] = raise error "pos2filename called with []" +fun pos2filename [] = error "pos2filename called with []" | pos2filename [i] = "_" ^ string_of_int i ^ ".xml" | pos2filename (i::is) = "_" ^ string_of_int i ^ pos2filename is; (* pos2filename [1,22,3]; val it = "_1_22_3.xml" : string *) -fun id2filename [] = raise error "id2filename called with []" +fun id2filename [] = error "id2filename called with []" | id2filename [s] = s ^ ".xml" | id2filename (s::ss) = s ^ "_" ^ id2filename ss; (* id2filename ["linear","univariate","equation"]; @@ -77,7 +77,7 @@ and nds _ _ [] = "" | nds i p (n::ns) = (nd i p n) ^ (nds i (lev_on p) ns); in nds j [0] h : xml end; -(* (tracing o hierarchy_pbl) (!ptyps); +(* (writeln o hierarchy_pbl) (!ptyps); *) fun pbl_hierarchy2file (path:path) = @@ -192,7 +192,7 @@ (* val pblID = ["linear","univariate","equation"]; val pblID = ["degree_4","polynomial","univariate","equation"]; -tracing (pbl2xml pblID (get_pbt pblID)); +writeln (pbl2xml pblID (get_pbt pblID)); *) (*replace by 'fun calc2xml' as developed for thy in 0607*) @@ -270,7 +270,7 @@ authors2xml i "COURSEDESIGNS" ["isac team 2006"] ^ "" : xml; -(* tracing (met2xml ["Test", "solve_linear"] +(* writeln (met2xml ["Test", "solve_linear"] (get_met ["Test", "solve_linear"])); *) @@ -278,14 +278,14 @@ (*.write the files using an int-key (pos') as filename.*) fun pbl2file (path:path) (pos:pos) (id:metID) (pbl as {guh,...}) = - (tracing ("### pbl2file: id = " ^ strs2str id); + (writeln ("### pbl2file: id = " ^ strs2str id); ((str2file (path ^ pos2filename pos)) o (pbl2xml id)) pbl ); (*.write the files using the guh as filename.*) (* *) fun pbl2file (path:path) (pos:pos) (id:metID) (pbl as {guh,...}) = - (tracing ("### pbl2file: id = " ^ strs2str id ^ ", pos = " ^ pos2str pos); + (writeln ("### pbl2file: id = " ^ strs2str id ^ ", pos = " ^ pos2str pos); ((str2file (path ^ guh2filename guh)) o (pbl2xml id)) pbl ); @@ -293,12 +293,12 @@ (*.write the files using an int-key (pos') as filename.*) fun met2file (path:path) (pos:pos) (id:metID) met = - (tracing ("### met2file: id = " ^ strs2str id); + (writeln ("### met2file: id = " ^ strs2str id); ((str2file (path ^ "met" ^ pos2filename pos)) o (met2xml id)) met); (*.write the files using the guh as filename.*) fun met2file (path:path) (pos:pos) (id:metID) (met as {guh,...}) = - (tracing ("### met2file: id = " ^ strs2str id); + (writeln ("### met2file: id = " ^ strs2str id); ((str2file (path ^ guh2filename guh)) o (met2xml id)) met); diff -r 95d956108461 -r 460c24a6a6ba src/Tools/isac/xmlsrc/thy-hierarchy.sml --- a/src/Tools/isac/xmlsrc/thy-hierarchy.sml Tue Sep 28 08:58:06 2010 +0200 +++ b/src/Tools/isac/xmlsrc/thy-hierarchy.sml Tue Sep 28 09:06:56 2010 +0200 @@ -103,7 +103,7 @@ : (theID * thydata) list end; -fun show_thes () = (tracing o format_pblIDl o (scan [])) (!thehier); +fun show_thes () = (writeln o format_pblIDl o (scan [])) (!thehier); @@ -132,7 +132,7 @@ until insertion into the hierarchy of theory elements 'th' is possible (the hierarchy requires the parentnode to exist for insertion).*) fun cut_theID th ([]:theID) = - raise error "could not insert into thy-hierarchy" + error "could not insert into thy-hierarchy" | cut_theID th theID = if can_insert theID th then theID else cut_theID th (drop_last theID); @@ -164,7 +164,7 @@ | the_hier th ((theID, thydata)::ths) = if can_insert theID th then let val th' = if exist_the theID th - then (tracing ("*** insert: preserved "^strs2str theID); + then (writeln ("*** insert: preserved "^strs2str theID); th) else insrt theID thydata theID th in the_hier th' ths end @@ -261,11 +261,11 @@ authors2xml i "COURSEDESIGNS" coursedesign ^ "\n" | thydata2xml (theID, _) = - raise error ("thydata2xml: not implemented for "^ strs2str' theID); + error ("thydata2xml: not implemented for "^ strs2str' theID); (*.analoguous to 'fun met2file'.*) fun thydata2file (xmldata:path) (pos:pos) (theID:theID) thydata = - (tracing ("### thes2file: id = " ^ strs2str theID); + (writeln ("### thes2file: id = " ^ strs2str theID); str2file (xmldata ^ theID2filename theID) (thydata2xml (theID:theID, thydata))); diff -r 95d956108461 -r 460c24a6a6ba test/Tools/isac/Frontend/interface.sml --- a/test/Tools/isac/Frontend/interface.sml Tue Sep 28 08:58:06 2010 +0200 +++ b/test/Tools/isac/Frontend/interface.sml Tue Sep 28 09:06:56 2010 +0200 @@ -60,10 +60,10 @@ "--------- encode ^ -> ^^^ ---------------------------------------"; "--------- encode ^ -> ^^^ ---------------------------------------"; if encode "a^2+b^2=c^2" = "a^^^2+b^^^2=c^^^2" then () -else raise error "interface.sml: diff.behav. in encode ^ -> ^^^ "; +else error "interface.sml: diff.behav. in encode ^ -> ^^^ "; if (decode o encode) "a^2+b^2=c^2" = "a^2+b^2=c^2" then () -else raise error "interface.sml: diff.behav. in de/encode ^ <-> ^^^ "; +else error "interface.sml: diff.behav. in de/encode ^ <-> ^^^ "; ==================================================================*) "exported from struct --------------------------------------------"; @@ -167,7 +167,7 @@ val (Form f, tac, asms) = pt_extract (pt, ip); (*exception just above means: 'ModSpec' has been returned: error anyway*) if term2str f = "[x = 1]" then () else - raise error "FE-Kernel-interface.sml: diff.behav. in solve_linear as rootpbl"; + error "FE-Kernel-interface.sml: diff.behav. in solve_linear as rootpbl"; @@ -188,10 +188,10 @@ moveActiveDown 1; moveActiveDown 1; if get_pos 1 1 = ([2], Res) then () else - raise error "FE-interface.sml: diff.behav. in a inspect 1 with Iterator 2"; + error "FE-interface.sml: diff.behav. in a inspect 1 with Iterator 2"; moveActiveDown 1; refFormula 1 ([], Res); if get_pos 1 1 = ([], Res) then () else - raise error "FE-interface.sml: diff.behav. in b inspect 1 with Iterator 2"; + error "FE-interface.sml: diff.behav. in b inspect 1 with Iterator 2"; moveActiveCalcHead 1; refFormula 1 ([],Pbl); @@ -317,7 +317,7 @@ val (Form f, tac, asms) = pt_extract (pt, ip); (*exception just above means: 'ModSpec' has been returned: error anyway*) if term2str f = "[x = 1]" then () else - raise error "FE-interface.sml: diff.behav. in miniscript with mini-subpb"; + error "FE-interface.sml: diff.behav. in miniscript with mini-subpb"; DEconstrCalcTree 1; @@ -372,7 +372,7 @@ val p = get_pos 1 1; val (Form f, tac, asms) = pt_extract (pt, p); if term2str f = "[x = 1]" andalso p = ([], Res) then () else - raise error "FE-interface.sml: diff.behav. in miniscript with mini-subpb"; + error "FE-interface.sml: diff.behav. in miniscript with mini-subpb"; DEconstrCalcTree 1; @@ -397,7 +397,7 @@ val p = get_pos 1 1; val (Form f, tac, asms) = pt_extract (pt, p); if term2str f = "[x = 1]" andalso p = ([], Res) then () else - raise error "FE-interface.sml: diff.behav. in solve_linear/rt AUTOCALCULATE "; + error "FE-interface.sml: diff.behav. in solve_linear/rt AUTOCALCULATE "; "--------- solve_linear as rootpbl AUTOCALC CompleteHead/Calc ----"; @@ -420,7 +420,7 @@ autoCalculate 1 CompleteCalc; val ((pt,p),_) = get_calc 1; if p=([], Res) then () else - raise error "FE-interface.sml: diff.behav. in solve_linear AUTOC Head/Calc "; + error "FE-interface.sml: diff.behav. in solve_linear AUTOC Head/Calc "; "--------- miniscript with mini-subpbl AUTOCALCULATE CompleteCalc-"; @@ -452,7 +452,7 @@ val p = get_pos 1 1; val (Form f, tac, asms) = pt_extract (pt, p); if term2str f = "[x = 1]" andalso p = ([], Res) then () else - raise error "FE-interface.sml: diff.behav. in mini-subpbl AUTOCALCULATE 6"; + error "FE-interface.sml: diff.behav. in mini-subpbl AUTOCALCULATE 6"; "--------- miniscript with mini-subpbl AUTO CompleteCalcHead------"; @@ -495,7 +495,7 @@ if get_obj g_spec pt [] = ("e_domID", ["linear", "univariate","equation","test"], ["Test","solve_linear"]) then () - else raise error "FE-interface.sml: diff.behav. in setProblem, setMethod"; + else error "FE-interface.sml: diff.behav. in setProblem, setMethod"; autoCalculate 1 CompleteCalcHead; refFormula 1 (get_pos 1 1); @@ -508,7 +508,7 @@ val p = get_pos 1 1; val (Form f, tac, asms) = pt_extract (pt, p); if term2str f = "[x = 1]" andalso p = ([], Res) then () else - raise error "FE-interface.sml: diff.behav. in mini-subpbl AUTOCALCULATE 6"; + error "FE-interface.sml: diff.behav. in mini-subpbl AUTOCALCULATE 6"; "--------- setContext..Thy ---------------------------------------"; @@ -558,7 +558,7 @@ writeln str; if str = ". ----- pblobj -----\n1. x + 1 = 2\n2. x + 1 + -1 * 2 = 0\n" then () else - raise error "FE-interface.sml: diff.behav. in mini-subpbl CompleteToSubpbl-1"; + error "FE-interface.sml: diff.behav. in mini-subpbl CompleteToSubpbl-1"; autoCalculate 1 (Step 1); (*proceeds only, of NOT 1 step before subplb*) autoCalculate 1 CompleteToSubpbl; @@ -570,7 +570,7 @@ val p = get_pos 1 1; val (Form f, tac, asms) = pt_extract (pt, p); if term2str f = "[x = 1]" andalso p = ([], Res) then () else - raise error "FE-interface.sml: diff.behav. in mini-subpbl CompleteToSubpbl 1"; + error "FE-interface.sml: diff.behav. in mini-subpbl CompleteToSubpbl 1"; @@ -777,7 +777,7 @@ val p = get_pos 1 1; val (Form f, tac, asms) = pt_extract (pt, p); if term2str f = "[x = -1, x = -3]" andalso p = ([], Res) then () else - raise error "FE-interface.sml: diff.behav. in tryMatchProblem, tryRefine"; + error "FE-interface.sml: diff.behav. in tryMatchProblem, tryRefine"; (*------------^^^-inserted-----------------------------------------------*) (*WN050904 the fetchProposedTactic's below may not have worked like that @@ -800,7 +800,7 @@ val p = get_pos 1 1; val (Form f, tac, asms) = pt_extract (pt, p); if term2str f = "[x = -1, x = -3]" andalso p = ([], Res) then () else - raise error "FE-interface.sml: diff.behav. in tryMatchProblem, tryRefine"; + error "FE-interface.sml: diff.behav. in tryMatchProblem, tryRefine"; "--------- modifyCalcHead, resetCalcHead, modelProblem ------------"; @@ -939,7 +939,7 @@ val p = get_pos 1 1; val (Form f, tac, asms) = pt_extract (pt, p); if term2str f = "[x = 1]" andalso p = ([], Res) then () else - raise error "FE-interface.sml: diff.behav. in from pbl-hierarchy"; + error "FE-interface.sml: diff.behav. in from pbl-hierarchy"; @@ -957,7 +957,7 @@ val p = get_pos 1 1; val (Form f, tac, asms) = pt_extract (pt, p); if term2str f = "[x = 1]" andalso p = ([], Res) then () else - raise error "FE-interface.sml: diff.behav. in algebra system"; + error "FE-interface.sml: diff.behav. in algebra system"; @@ -1098,7 +1098,7 @@ val p = get_pos 1 1; val (Form f, tac, asms) = pt_extract (pt, p); if term2str f = "[x = 1]" andalso p = ([], Res) then () else - raise error "FE-interface.sml: diff.behav. in combinations of steps"; + error "FE-interface.sml: diff.behav. in combinations of steps"; "--------- appendFormula label{SOLVE:MANUAL:FORMULA:enter} right--"; @@ -1124,7 +1124,7 @@ val p = get_pos 1 1; val (Form f, tac, asms) = pt_extract (pt, p); if term2str f = "-1 + x = 0" andalso p = ([2], Res) then () else - raise error "FE-interface.sml: diff.behav. in FORMULA:enter} right"; + error "FE-interface.sml: diff.behav. in FORMULA:enter} right"; "--------- appendFormula label{SOLVE:MANUAL:FORMULA:enter} other--"; "--------- appendFormula label{SOLVE:MANUAL:FORMULA:enter} other--"; @@ -1149,7 +1149,7 @@ val p = get_pos 1 1; val (Form f, tac, asms) = pt_extract (pt, p); if term2str f = "x - 1 = 0" andalso p = ([2], Res) then () else - raise error "FE-interface.sml: diff.behav. in FORMULA:enter} other"; + error "FE-interface.sml: diff.behav. in FORMULA:enter} other"; "--------- appendFormula label{SOLVE:MANUAL:FORMULA:enter} oth 2--"; "--------- appendFormula label{SOLVE:MANUAL:FORMULA:enter} oth 2--"; @@ -1175,7 +1175,7 @@ val p = get_pos 1 1; val (Form f, tac, asms) = pt_extract (pt, p); if term2str f = "x = 1" andalso p = ([3,2], Res) then () else - raise error "FE-interface.sml: diff.behav. in FORMULA:enter} oth 2"; + error "FE-interface.sml: diff.behav. in FORMULA:enter} oth 2"; "--------- appendFormula label{SOLVE:MANUAL:FORMULA:enter} NOTok--"; @@ -1199,7 +1199,7 @@ val p = get_pos 1 1; val (Form f, tac, asms) = pt_extract (pt, p); if term2str f = "x + 1 + -1 * 2 = 0" andalso p = ([1], Res) then () else - raise error "FE-interface.sml: diff.behav. in FORMULA:enter} NOTok"; + error "FE-interface.sml: diff.behav. in FORMULA:enter} NOTok"; "--------- replaceFormula {SOLVE:MANUAL:FORMULA:replace} right----"; @@ -1222,11 +1222,11 @@ val p = get_pos 1 1; val (Form f, tac, asms) = pt_extract (pt, p); if term2str f = "-1 + x = 0" andalso p = ([2], Res) then () else - raise error "FE-interface.sml: diff.behav. in FORMULA:replace} right 1"; + error "FE-interface.sml: diff.behav. in FORMULA:replace} right 1"; if map fst (get_interval ([2],Res) ([],Res) 9999 pt) = [([2], Res), ([3], Pbl), ([3, 1], Frm), ([3, 1], Res), ([3, 2], Res), ([3], Res), ([4], Res), ([], Res)] then () (*nothing deleted!*) else - raise error "FE-interface.sml: diff.behav. in FORMULA:replace} right 2"; + error "FE-interface.sml: diff.behav. in FORMULA:replace} right 2"; (*WN050211 replaceFormula didn't work on second ctree: thus now tested...*) CalcTree @@ -1245,11 +1245,11 @@ val p = get_pos 2 1; val (Form f, tac, asms) = pt_extract (pt, p); if term2str f = "-1 + x = 0" andalso p = ([2], Res) then () else - raise error "FE-interface.sml: diff.behav. in FORMULA:replace} right 1"; + error "FE-interface.sml: diff.behav. in FORMULA:replace} right 1"; if map fst (get_interval ([2],Res) ([],Res) 9999 pt) = [([2], Res), ([3], Pbl), ([3, 1], Frm), ([3, 1], Res), ([3, 2], Res), ([3], Res), ([4], Res), ([], Res)] then () (*nothing deleted!*) else - raise error "FE-interface.sml: diff.behav. in FORMULA:replace} right 2b"; + error "FE-interface.sml: diff.behav. in FORMULA:replace} right 2b"; "--------- replaceFormula {SOLVE:MANUAL:FORMULA:replace} other----"; "--------- replaceFormula {SOLVE:MANUAL:FORMULA:replace} other----"; @@ -1274,7 +1274,7 @@ val p = get_pos 1 1; val (Form f, tac, asms) = pt_extract (pt, p); if term2str f = "x - 1 = 0" andalso p = ([2], Res) then () else - raise error "FE-interface.sml: diff.behav. in FORMULA:replace} other 1"; + error "FE-interface.sml: diff.behav. in FORMULA:replace} other 1"; (* for getting the list in whole length ... print_depth 99;map fst (get_interval ([1],Res) ([],Res) 9999 pt);print_depth 3; *) @@ -1284,7 +1284,7 @@ ([2, 8], Res), ([2, 9], Res), ([2], Res) (*WN060727 {cutlevup->test_trans} removed: , ([], Res)(*dropped, if test_trans doesnt stop at PblNd*)*)] then () else - raise error "FE-interface.sml: diff.behav. in FORMULA:replace} other 2"; + error "FE-interface.sml: diff.behav. in FORMULA:replace} other 2"; @@ -1314,12 +1314,12 @@ [([1], Res), ([2], Res), ([3], Pbl), ([3, 1], Frm), ([3, 1], Res), ([3, 2, 1], Frm), ([3, 2, 1], Res), ([3, 2, 2], Res), ([3,2],Res)] then () else - raise error "FE-interface.sml: diff.behav. in FORMULA:replace} oth2 1"; + error "FE-interface.sml: diff.behav. in FORMULA:replace} oth2 1"; val p = get_pos 1 1; val (Form f, tac, asms) = pt_extract (pt, p); if term2str f = "x = 1" andalso p = ([3,2], Res) then () else - raise error "FE-interface.sml: diff.behav. in FORMULA:replace} oth2 2"; + error "FE-interface.sml: diff.behav. in FORMULA:replace} oth2 2"; @@ -1344,6 +1344,6 @@ val p = get_pos 1 1; val (Form f, tac, asms) = pt_extract (pt, p); if term2str f = "-1 + x = 0" andalso p = ([2], Res) then () else - raise error "FE-interface.sml: diff.behav. in FORMULA:replace} NOTok"; + error "FE-interface.sml: diff.behav. in FORMULA:replace} NOTok"; diff -r 95d956108461 -r 460c24a6a6ba test/Tools/isac/Interpret/calchead.sml --- a/test/Tools/isac/Interpret/calchead.sml Tue Sep 28 08:58:06 2010 +0200 +++ b/test/Tools/isac/Interpret/calchead.sml Tue Sep 28 09:06:56 2010 +0200 @@ -45,13 +45,13 @@ [([], Pbl), ([1], Frm),([1], Res), ([2], Res), ([3], Pbl), ([3, 1], Frm), ([3, 1], Res), ([3, 2, 1], Frm), ([3, 2, 1], Res), ([3, 2, 2], Res), ([3, 2], Res)] then () else -raise error "calchead.sml: diff.behav. get_interval after replace} other 2 a"; +error "calchead.sml: diff.behav. get_interval after replace} other 2 a"; print_depth 99;map fst (get_interval ([3, 2, 1], Res) ([],Res) 9999 pt); print_depth 3; if map fst (get_interval ([3, 2, 1], Res) ([],Res) 9999 pt) = [([3, 2, 1], Res), ([3, 2, 2], Res), ([3, 2], Res)] then () else -raise error "modspec.sml: diff.behav. get_interval after replace} other 2 b"; +error "modspec.sml: diff.behav. get_interval after replace} other 2 b"; @@ -98,7 +98,7 @@ {Find=[Incompl "maximum",Incompl "valuesFor [a]"], Given=[Correct "fixedValues [r = Arbfix]"], Relate=[Incompl "relations []"], Where=[],With=[]}) -then raise error "test-maximum.sml: model stepwise - different behaviour" +then error "test-maximum.sml: model stepwise - different behaviour" else (); (*different with show_types !!!*) 6.5.03---*) @@ -119,14 +119,14 @@ {Find=[Incompl "maximum",Incompl "valuesFor"], Given=[Correct "fixedValues [r = Arbfix]"], Relate=[Incompl "relations []"], Where=[],With=[]}) -then raise error "diffappl.sml: Specify_Problem different behaviour" +then error "diffappl.sml: Specify_Problem different behaviour" else (); (* WN.3.9.03 (#391) Model_Specify did init_pbl newly if ppc<>(Problem ["maximum_of","function"], {Find=[Missing "maximum m_",Missing "valuesFor vs_"], Given=[Correct "fixedValues [r = Arbfix]"], Relate=[Missing "relations rs_"],Where=[],With=[]}) -then raise error "diffappl.sml: Specify_Problem different behaviour" +then error "diffappl.sml: Specify_Problem different behaviour" else ();*) val nxt = tac2tac_ pt p(Specify_Method ["DiffApp","max_by_calculus"]); @@ -138,7 +138,7 @@ Given=[Correct "fixedValues [r = Arbfix]",Missing "boundVariable v_v", Missing "interval itv_",Missing "errorBound err_"], Relate=[Incompl "relations []"],Where=[],With=[]}) -then raise error "diffappl.sml: Specify_Method different behaviour" +then error "diffappl.sml: Specify_Method different behaviour" else (); (* WN.3.9.03 (#391) Model_Specify did init_pbl newly if ppc<>(Method ["DiffApp","max_by_calculus"], @@ -146,7 +146,7 @@ Given=[Correct "fixedValues [r = Arbfix]",Missing "boundVariable v_v", Missing "interval itv_",Missing "errorBound err_"], Relate=[Missing "relations rs_"],Where=[],With=[]}) -then raise error "diffappl.sml: Specify_Method different behaviour" +then error "diffappl.sml: Specify_Method different behaviour" else ();*) @@ -204,7 +204,7 @@ if nxt<>(Add_Relation "relations [(a / 2) ^^^ 2 + (b / 2) ^^^ 2 = r ^^^ 2]") -then raise error "test specify, fmz <> []: nxt <> Add_Relation (a/2)^2.." else (); (*different with show_types !!!*) +then error "test specify, fmz <> []: nxt <> Add_Relation (a/2)^2.." else (); (*different with show_types !!!*) val nxt = tac2tac_ pt p nxt; val(p,_,Form'(PpcKF(_,_,_,_,ppc)),nxt,_,pt) = specify nxt p [] pt; @@ -238,7 +238,7 @@ val(p,_,Form'(PpcKF(_,_,_,_,ppc)),nxt,_,pt) = specify nxt p [] pt; (*val nxt = Apply_Method ("DiffApp.thy","max_by_calculus") *) if nxt<>(Apply_Method ["DiffApp","max_by_calculus"]) -then raise error "test specify, fmz <> []: nxt <> Apply_Method max_by_calculus" else (); +then error "test specify, fmz <> []: nxt <> Apply_Method max_by_calculus" else (); "--------- maximum example with 'specify', fmz = [] --------------"; @@ -286,7 +286,7 @@ (*30.8.01 ... funktioniert nicht mehr nach Einfuehrung env .... if nxt<>(Add_Relation "relations []") -then raise error "test specify, fmz <> []: nxt <> Add_Relation.." +then error "test specify, fmz <> []: nxt <> Add_Relation.." else (); (*different with show_types !!!*) *) @@ -316,7 +316,7 @@ (*val nxt = Apply_Method ("DiffApp","max_by_calculus") *) (*30.8.01 ... funktioniert nicht mehr nach Einfuehrung env .... if nxt<>(Apply_Method ("DiffApp.thy","max_by_calculus")) -then raise error "test specify, fmz <> []: nxt <> Add_Relation.." +then error "test specify, fmz <> []: nxt <> Add_Relation.." else (); *) @@ -352,7 +352,7 @@ [ _ $ Free ("c", _) $ _, _ $ Free ("c_2", _) $ _]), (3, [1], "#Find", Const ("EqSystem.solution", _), [Free ("ss'''", _)])] =>() - | _ => raise error "calchead.sml match_ags 2 args Nok ----------------"; + | _ => error "calchead.sml match_ags 2 args Nok ----------------"; "-b------------------------------------------------------"; @@ -379,7 +379,7 @@ (3, [1], "#Find", Const ("EqSystem.solution", _), [Free ("ss'''", _)])] (* type of Find: [Free ("ss'''", "bool List.list")]*) =>() - | _ => raise error "calchead.sml match_ags copy-named dropped --------"; + | _ => error "calchead.sml match_ags copy-named dropped --------"; "-c---ERROR case: stac is missing #Given equalities e_s--"; @@ -425,7 +425,7 @@ case ((match_ags (theory "EqSystem") pats ags) handle ERROR _ => []) of (*why not TYPE ?WN100920*) [] => match_ags_msg pI stac ags - | _ => raise error "calchead.sml match_ags 1st arg missing --------"; + | _ => error "calchead.sml match_ags 1st arg missing --------"; "-d------------------------------------------------------"; @@ -516,24 +516,24 @@ (2, [1], "#Given", Const ("Descript.solveFor", _), [Free ("x", _)]), (3, [1], "#Find", Const ("Descript.solutions", _), [Free ("x_i", _)])] => () - | _ => raise error "calchead.sml match_ags [univariate,equation,test]--"; + | _ => error "calchead.sml match_ags [univariate,equation,test]--"; "--------- regression test fun is_copy_named ------------"; "--------- regression test fun is_copy_named ------------"; "--------- regression test fun is_copy_named ------------"; val trm = (1, (2, @{term "v'i'"})); -if is_copy_named trm then () else raise error "regr. is_copy_named 1"; +if is_copy_named trm then () else error "regr. is_copy_named 1"; val trm = (1, (2, @{term "e_e"})); -if is_copy_named trm then raise error "regr. is_copy_named 2" else (); +if is_copy_named trm then error "regr. is_copy_named 2" else (); val trm = (1, (2, @{term "L'''"})); -if is_copy_named trm then () else raise error "regr. is_copy_named 3"; +if is_copy_named trm then () else error "regr. is_copy_named 3"; (* out-comment 'structure CalcHead'... val trm = (1, (2, @{term "v'i'"})); -if is_copy_named_generating trm then () else raise error "regr. is_copy_named"; +if is_copy_named_generating trm then () else error "regr. is_copy_named"; val trm = (1, (2, @{term "L'''"})); -if is_copy_named_generating trm then raise error "regr. is_copy_named" else (); +if is_copy_named_generating trm then error "regr. is_copy_named" else (); *) "--------- regr.test fun cpy_nam ------------------------"; @@ -551,7 +551,7 @@ case cpy_nam pbt oris (hd cy) of ([1], "#Find", Const ("Descript.solutions", _), [Free ("x_i", _)]) => () - | _ => raise error "calchead.sml regr.test cpy_nam-1-"; + | _ => error "calchead.sml regr.test cpy_nam-1-"; (*new data: cpy_nam without changing the name*) @{term "equalities"}; type_of @{term "[x_1+1=2,x_2=0]"}; @@ -568,4 +568,4 @@ case cpy_nam pbt oris (hd cy) of ([1], "#Find", Const ("EqSystem.solution", _), [Free ("ss'''", _)]) => () - | _ => raise error "calchead.sml regr.test cpy_nam-2-"; + | _ => error "calchead.sml regr.test cpy_nam-2-"; diff -r 95d956108461 -r 460c24a6a6ba test/Tools/isac/Interpret/ctree.sml --- a/test/Tools/isac/Interpret/ctree.sml Tue Sep 28 08:58:06 2010 +0200 +++ b/test/Tools/isac/Interpret/ctree.sml Tue Sep 28 09:06:56 2010 +0200 @@ -116,7 +116,7 @@ val (p,_,f,nxt,_,pt) = me nxt p [1] pt(*.append_result: pos =[]*); val Form' (FormKF (~1,EdUndef,0,Nundef,res)) = f; if (snd nxt)=End_Proof' andalso res="[x = 1]" then () -else raise error "new behaviour in test: miniscript with mini-subpbl"; +else error "new behaviour in test: miniscript with mini-subpbl"; show_pt pt; @@ -136,7 +136,7 @@ ([3], Res), ([4], Res), ([], Res)] -then () else raise error "ctree.sml: diff:behav. in get_allpos' 1"; +then () else error "ctree.sml: diff:behav. in get_allpos' 1"; if get_allpos's ([], 1) (children pt) = [([1], Frm), @@ -148,7 +148,7 @@ ([3, 2], Res), ([3], Res), ([4], Res)] -then () else raise error "ctree.sml: diff:behav. in get_allpos' 2"; +then () else error "ctree.sml: diff:behav. in get_allpos' 2"; if get_allpos's ([], 2) (takerest (1, children pt)) = [([2], Res), @@ -158,7 +158,7 @@ ([3, 2], Res), ([3], Res), ([4], Res)] -then () else raise error "ctree.sml: diff:behav. in get_allpos' 3"; +then () else error "ctree.sml: diff:behav. in get_allpos' 3"; if get_allpos's ([], 3) (takerest (2, children pt)) = [([3], Frm), @@ -167,13 +167,13 @@ ([3, 2], Res), ([3], Res), ([4], Res)] -then () else raise error "ctree.sml: diff:behav. in get_allpos' 4"; +then () else error "ctree.sml: diff:behav. in get_allpos' 4"; if get_allpos's ([3], 1) (children (nth 3 (children pt))) = [([3, 1], Frm), ([3, 1], Res), ([3, 2], Res)] -then () else raise error "ctree.sml: diff:behav. in get_allpos' 5"; +then () else error "ctree.sml: diff:behav. in get_allpos' 5"; if get_allpos' ([3], 1) (nth 3 (children pt)) = [([3], Frm), @@ -181,7 +181,7 @@ ([3, 1], Res), ([3, 2], Res), ([3], Res)] -then () else raise error "ctree.sml: diff:behav. in get_allpos' 6"; +then () else error "ctree.sml: diff:behav. in get_allpos' 6"; (**##############################################################(**) @@ -200,23 +200,23 @@ ([3, 2], Res), ([3], Res), ([4], Res)] -then () else raise error "ctree.sml: diff:behav. in cut_level 1a"; +then () else error "ctree.sml: diff:behav. in cut_level 1a"; val (res,asm) = get_obj g_result pt' [2]; if res = e_term andalso asm = [] then () else -raise error "ctree.sml: diff:behav. in cut_level 1aa" WN050219*); +error "ctree.sml: diff:behav. in cut_level 1aa" WN050219*); if not (existpt [2] pt') then () else -raise error "ctree.sml: diff:behav. in cut_level 1aa2" (*WN050220*); +error "ctree.sml: diff:behav. in cut_level 1aa2" (*WN050220*); val (res,asm) = get_obj g_result pt' []; if term2str res = "[x = 1]" (*WN050219 e_term in cut_tree!!!*) then () else -raise error "ctree.sml: diff:behav. in cut_level 1ab"; +error "ctree.sml: diff:behav. in cut_level 1ab"; if map fst (get_interval ([],Frm) ([],Res) 9999 pt') = [([], Frm), ([1], Frm), ([1], Res), ([2], Res),(*, e_term in cut_tree!!!*) ([], Res)] then () else -raise error "ctree.sml: diff:behav. in cut_level 1b"; +error "ctree.sml: diff:behav. in cut_level 1b"; val (pt',cuts) = cut_level [] [] pt ([2],Res); @@ -226,22 +226,22 @@ ([3, 2], Res), ([3], Res), ([4], Res)] -then () else raise error "ctree.sml: diff:behav. in cut_level 2a"; +then () else error "ctree.sml: diff:behav. in cut_level 2a"; if pr_ptree pr_short pt' = ". ----- pblobj -----\n1. x + 1 = 2\n2. x + 1 + -1 * 2 = 0\n" -then () else raise error "ctree.sml: diff:behav. in cut_level 2b"; +then () else error "ctree.sml: diff:behav. in cut_level 2b"; val (pt',cuts) = cut_level [] [3] pt ([3,1],Frm); if cuts = [([3, 1], Res), ([3, 2], Res)] -then () else raise error "ctree.sml: diff:behav. in cut_level 3a"; +then () else error "ctree.sml: diff:behav. in cut_level 3a"; if pr_ptree pr_short pt' = ". ----- pblobj -----\n1. x + 1 = 2\n2. x + 1 + -1 * 2 = 0\n3. ----- pblobj -----\n3.1. -1 + x = 0\n4. [x = 1]\n" -then () else raise error "ctree.sml: diff:behav. in cut_level 3b"; +then () else error "ctree.sml: diff:behav. in cut_level 3b"; val (pt',cuts) = cut_level [] [3] pt ([3,1],Res); if cuts = [([3, 2], Res)] -then () else raise error "ctree.sml: diff:behav. in cut_level 4a"; +then () else error "ctree.sml: diff:behav. in cut_level 4a"; if pr_ptree pr_short pt' = ". ----- pblobj -----\n1. x + 1 = 2\n2. x + 1 + -1 * 2 = 0\n3. ----- pblobj -----\n3.1. -1 + x = 0\n4. [x = 1]\n" -then () else raise error "ctree.sml: diff:behav. in cut_level 4b"; +then () else error "ctree.sml: diff:behav. in cut_level 4b"; "-------------- cut_tree (from ptree above)-----------------------"; @@ -256,25 +256,25 @@ ([3], Res), ([4], Res), ([], Res)] -then () else raise error "ctree.sml: diff:behav. in cut_tree 1a"; +then () else error "ctree.sml: diff:behav. in cut_tree 1a"; val (res,asm) = get_obj g_result pt' [2]; if res = e_term (*WN050219 done by cut_level*) then () else -raise error "ctree.sml: diff:behav. in cut_tree 1aa"; +error "ctree.sml: diff:behav. in cut_tree 1aa"; val form = get_obj g_form pt' [2]; if term2str form = "x + 1 + -1 * 2 = 0" (*remained !!!*) then () else -raise error "ctree.sml: diff:behav. in cut_tree 1ab"; +error "ctree.sml: diff:behav. in cut_tree 1ab"; val (res,asm) = get_obj g_result pt' []; if res = e_term (*WN050219 done by cut_tree*) then () else -raise error "ctree.sml: diff:behav. in cut_tree 1ac"; +error "ctree.sml: diff:behav. in cut_tree 1ac"; if map fst (get_interval ([],Frm) ([],Res) 9999 pt') = [([], Frm), ([1], Frm), ([1], Res)] then () else -raise error "ctree.sml: diff:behav. in cut_tree 1ad"; +error "ctree.sml: diff:behav. in cut_tree 1ad"; val (pt', cuts) = cut_tree pt ([2],Res); if cuts = [([3], Frm), @@ -284,7 +284,7 @@ ([3], Res), ([4], Res), ([], Res)] -then () else raise error "ctree.sml: diff:behav. in cut_tree 2"; +then () else error "ctree.sml: diff:behav. in cut_tree 2"; val (pt', cuts) = cut_tree pt ([3,1],Frm); if cuts = [([3, 1], Res), @@ -292,14 +292,14 @@ ([3], Res), ([4], Res), ([], Res)] -then () else raise error "ctree.sml: diff:behav. in cut_tree 3"; +then () else error "ctree.sml: diff:behav. in cut_tree 3"; val (pt', cuts) = cut_tree pt ([3,1],Res); if cuts = [([3, 2], Res), ([3], Res), ([4], Res), ([], Res)] -then () else raise error "ctree.sml: diff:behav. in cut_tree 4"; +then () else error "ctree.sml: diff:behav. in cut_tree 4"; "=====new ptree 1a miniscript with mini-subpbl ==================="; @@ -327,11 +327,11 @@ val (pt',cuts) = cut_level [] [3] pt ([1],Frm);(*([1],Frm) is stored*) if cuts = [](*([1],Res) is not yet stored (Nd.ostate=Incomplete)*) -then () else raise error "ctree.sml: diff:behav. in cut_tree 4a"; +then () else error "ctree.sml: diff:behav. in cut_tree 4a"; val (pt', cuts) = cut_tree pt ([1],Frm); if cuts = [] -then () else raise error "ctree.sml: diff:behav. in cut_tree 4a"; +then () else error "ctree.sml: diff:behav. in cut_tree 4a"; (*WN050219 val pos as ([p],_) = ([1],Frm); @@ -371,14 +371,14 @@ ([3, 2], Res), ([3], Res), ([4], Res)] - then () else raise error "ctree.sml: diff:behav. in cut_tree 3rd level 1"; + then () else error "ctree.sml: diff:behav. in cut_tree 3rd level 1"; val (pt', cuts) = cut_tree pt ([3,2,1],Res); if cuts = [([3, 2, 2], Res), ([3, 2], Res), ([3], Res), ([4], Res)] - then () else raise error "ctree.sml: diff:behav. in cut_tree 3rd level 2"; + then () else error "ctree.sml: diff:behav. in cut_tree 3rd level 2"; "-------------- cappend (from ptree above)------------------------"; @@ -391,11 +391,11 @@ ([3], Res), ([4], Res), ([], Res)] -then () else raise error "ctree.sml: diff:behav. in cappend_form"; +then () else error "ctree.sml: diff:behav. in cappend_form"; if term2str (get_obj g_form pt' [3,2,1]) = "newnew" andalso get_obj g_tac pt' [3,2,1] = Empty_Tac andalso term2str (fst (get_obj g_result pt' [3,2,1])) = "??.empty" - then () else raise error "ctree.sml: diff:behav. in cappend 1"; + then () else error "ctree.sml: diff:behav. in cappend 1"; val (pt',cuts) = cappend_atomic pt [3,2,1] e_istate (str2term "newform") (Tac "test") (str2term "newresult",[]) Complete; @@ -405,7 +405,7 @@ ([3], Res), ([4], Res), ([], Res)] -then () else raise error "ctree.sml: diff:behav. in cappend_atomic"; +then () else error "ctree.sml: diff:behav. in cappend_atomic"; @@ -441,9 +441,9 @@ val form = get_obj g_form pt (fst p); val (res,_) = get_obj g_result pt (fst p); if term2str form = "x + 1 = 2" andalso res = e_term then () else -raise error "ctree.sml, diff.behav. cappend minisubpbl ([1],Frm)"; +error "ctree.sml, diff.behav. cappend minisubpbl ([1],Frm)"; if not (existpt ((lev_on o fst) p) pt) then () else -raise error "ctree.sml, diff.behav. cappend minisubpbl ([1],Frm) nxt"; +error "ctree.sml, diff.behav. cappend minisubpbl ([1],Frm) nxt"; (*val (p,_,f,nxt,_,pt) = me nxt p [1] pt(**)cappend_atomic: pos =[1]*); val p = ([1], Res); @@ -453,9 +453,9 @@ val form = get_obj g_form pt (fst p); val (res,_) = get_obj g_result pt (fst p); if term2str form = "x + 1 = 2" andalso term2str res = "x + 1 + -1 * 2 = 0" -then () else raise error "ctree.sml, diff.behav. cappend minisubpbl ([1],Res)"; +then () else error "ctree.sml, diff.behav. cappend minisubpbl ([1],Res)"; if not (existpt ((lev_on o fst) p) pt) then () else -raise error "ctree.sml, diff.behav. cappend minisubpbl ([1],Res) nxt"; +error "ctree.sml, diff.behav. cappend minisubpbl ([1],Res) nxt"; (*val (p,_,f,nxt,_,pt) = me nxt p [1] pt(**)cappend_atomic: pos =[2]*); val p = ([2], Res); @@ -465,18 +465,18 @@ val form = get_obj g_form pt (fst p); val (res,_) = get_obj g_result pt (fst p); if term2str form = "x + 1 + -1 * 2 = 0" andalso term2str res = "-1 + x = 0" -then () else raise error "ctree.sml, diff.behav. cappend minisubpbl ([2],Res)"; +then () else error "ctree.sml, diff.behav. cappend minisubpbl ([2],Res)"; if not (existpt ((lev_on o fst) p) pt) then () else -raise error "ctree.sml, diff.behav. cappend minisubpbl ([2],Res) nxt"; +error "ctree.sml, diff.behav. cappend minisubpbl ([2],Res) nxt"; (*val (p,_,f,nxt,_,pt) = me nxt p [1] pt;(**)cappend_problem: pos =[3]*) val p = ([3], Pbl); val (pt,cuts) = cappend_problem pt (fst p) e_istate e_fmz ([],e_spec,e_term); if is_pblobj (get_obj I pt (fst p)) then () else -raise error "ctree.sml, diff.behav. cappend minisubpbl ([3],Pbl)"; +error "ctree.sml, diff.behav. cappend minisubpbl ([3],Pbl)"; if not (existpt ((lev_on o fst) p) pt) then () else -raise error "ctree.sml, diff.behav. cappend minisubpbl ([3],Pbl) nxt"; +error "ctree.sml, diff.behav. cappend minisubpbl ([3],Pbl) nxt"; (* ...complete calchead skipped...*) @@ -486,9 +486,9 @@ val form = get_obj g_form pt (fst p); val (res,_) = get_obj g_result pt (fst p); if term2str form = "-1 + x = 0" andalso res = e_term then () else -raise error "ctree.sml, diff.behav. cappend minisubpbl ([3,1],Frm)"; +error "ctree.sml, diff.behav. cappend minisubpbl ([3,1],Frm)"; if not (existpt ((lev_on o fst) p) pt) then () else -raise error "ctree.sml, diff.behav. cappend minisubpbl ([3,1],Frm) nxt"; +error "ctree.sml, diff.behav. cappend minisubpbl ([3,1],Frm) nxt"; (*val (p,_,f,nxt,_,pt) = me nxt p [1] pt;(**)cappend_atomic: pos =[3,1]*) val p = ([3, 1], Res); @@ -498,9 +498,9 @@ val form = get_obj g_form pt (fst p); val (res,_) = get_obj g_result pt (fst p); if term2str form = "-1 + x = 0" andalso term2str res = "x = 0 + -1 * -1" then() -else raise error "ctree.sml, diff.behav. cappend minisubpbl ([3,1],Res)"; +else error "ctree.sml, diff.behav. cappend minisubpbl ([3,1],Res)"; if not (existpt ((lev_on o fst) p) pt) then () else -raise error "ctree.sml, diff.behav. cappend minisubpbl ([3,1],Res) nxt"; +error "ctree.sml, diff.behav. cappend minisubpbl ([3,1],Res) nxt"; (*val (p,_,f,nxt,_,pt) = me nxt p [1] pt(**)cappend_form: pos =[3,1]*); (*val (p,_,f,nxt,_,pt) = me nxt p [1] pt(**)cappend_atomic: pos =[3,1]*); @@ -545,7 +545,7 @@ (* val p = (move_dn [] pt p) handle e => print_exn_G e; Exception PTREE end of calculation*) -if p=([],Res) then () else raise error "ctree.sml: diff:behav. in move_dn"; +if p=([],Res) then () else error "ctree.sml: diff:behav. in move_dn"; "-------------- move_dn: Frm -> Res ------------------------------"; @@ -565,7 +565,7 @@ moveActiveRoot 1; moveActiveDown 1; if get_pos 1 1 = ([1], Frm) then () - else raise error "ctree.sml: diff.behav. in move_dn: Frm -> Res (1)"; + else error "ctree.sml: diff.behav. in move_dn: Frm -> Res (1)"; moveActiveDown 1; (* pos does not exist *) autoCalculate 1 (Step 1); @@ -573,7 +573,7 @@ moveActiveDown 1; (* pos does not exist *) if get_pos 1 1 = ([1], Res) then () - else raise error "ctree.sml: diff.behav. in move_dn: Frm -> Res (1)"; + else error "ctree.sml: diff.behav. in move_dn: Frm -> Res (1)"; moveActiveDown 1; (* pos does not exist *) @@ -592,7 +592,7 @@ val p = move_up [] pt p; (*-> ([],Pbl)*) (*val p = (move_up [] pt p) handle e => print_exn_G e; Exception PTREE begin of calculation*) -if p=([],Pbl) then () else raise error "ctree.sml: diff.behav. in move_up"; +if p=([],Pbl) then () else error "ctree.sml: diff.behav. in move_up"; "------ move into detail -----------------------------------------"; @@ -627,7 +627,7 @@ val p = move_dn [] pt p; (*([2, 5], Res)*); val p = move_dn [] pt p; (*([2, 6], Res)*); if p = ([2, 6], Res) then() - else raise error "ctree.sml: diff.behav. in move into detail"; + else error "ctree.sml: diff.behav. in move into detail"; "=====new ptree 3a ==============================================="; "=====new ptree 3a ==============================================="; @@ -800,29 +800,29 @@ writeln(pr_ptree pr_short pt); case get_trace pt [1,3] [4,1,1] of [[1,3],[1,4],[2],[3],[4],[4,1],[4,1,1]] => () - | _ => raise error "diff.behav.in ctree.sml: get_interval lev 1a"; + | _ => error "diff.behav.in ctree.sml: get_interval lev 1a"; case get_trace pt [2] [4,3,2] of [[2],[3],[4],[4,1],[4,1,1],[4,2],[4,3],[4,3,1],[4,3,2]] => () - | _ => raise error "diff.behav.in ctree.sml: get_interval lev 1b"; + | _ => error "diff.behav.in ctree.sml: get_interval lev 1b"; case get_trace pt [1,4] [4,3,1] of [[1,4],[2],[3],[4],[4,1],[4,1,1],[4,2],[4,3],[4,3,1]] => () - | _ => raise error "diff.behav.in ctree.sml: get_interval lev 1c"; + | _ => error "diff.behav.in ctree.sml: get_interval lev 1c"; case get_trace pt [4,2] [5] of (*[([4,2],_),([4,3],_),([4,4],_),([4,4,1],_),([4,4,2],_),([4,4,3],_), ([4,4,4],_),([4,4,5],_),([5],_)] => () ..with pt_form*) [[4,2],[4,3],[4,3,1],[4,3,2],[4,3,3],[4,3,4],[4,3,5],[5]]=>() - | _ => raise error "diff.behav.in ctree.sml: get_interval lev 1d"; + | _ => error "diff.behav.in ctree.sml: get_interval lev 1d"; case get_trace pt [] [4,4,2] of [[1],[1,1],[1,2],[1,3],[1,4],[2],[3],[4],[4,1],[4,1,1],[4,2], [4,3],[4,3,1],[4,3,2]] => () - | _ => raise error "diff.behav.in ctree.sml: get_interval lev 1e"; + | _ => error "diff.behav.in ctree.sml: get_interval lev 1e"; case get_trace pt [] [] of [[1],[1,1],[1,2],[1,3],[1,4],[2],[3],[4],[4,1],[4,1,1],[4,2], [4,3],[4,3,1],[4,3,2],[4,3,3],[4,3,4],[4,3,5],[5]] => () - | _ => raise error "diff.behav.in ctree.sml: get_interval lev 1f"; + | _ => error "diff.behav.in ctree.sml: get_interval lev 1f"; case get_trace pt [4,3] [4,3] of [[4,3],[4,3,1],[4,3,2],[4,3,3],[4,3,4],[4,3,5]] => () - | _ => raise error "diff.behav.in ctree.sml: get_interval lev 1g"; + | _ => error "diff.behav.in ctree.sml: get_interval lev 1g"; "--- level 2: get pos' from start b to end p ---------------------"; "--- level 2: get pos' from start b to end p ---------------------"; @@ -834,11 +834,11 @@ (* case get_trace pt ([1,4],Res) ([4,4,1],Frm) of [[2],[3],[4],[4,1],[4,2],[4,2,1],[4,3],[4,4],[4,4,1]] => () - | _ => raise error "diff.behav.in ctree.sml: get_interval lev 1b"; + | _ => error "diff.behav.in ctree.sml: get_interval lev 1b"; case get_trace pt ([],Pbl) ([],Res) of [[1],[1,1],[1,2],[1,3],[1,4],[2],[3],[4],[4,1],[4,2],[4,2,1],[4,3], [4,4],[4,4,1],[4,4,2],[4,4,3],[4,4,4],[4,4,5],[5]] => () - | _ => raise error "diff.behav.in ctree.sml: get_interval lev 1e"; + | _ => error "diff.behav.in ctree.sml: get_interval lev 1e"; *) (******************************************************************) @@ -870,7 +870,7 @@ ("PolyEq.thy", ["normalize", "polynomial", "univariate", "equation"]), ["9 * x + -6 * x ^^^ 2 + x ^^^ 3 ~= 0"]) => () - | _ => raise error "diff.behav.in ctree.sml: pt_extract asm<>[]"; + | _ => error "diff.behav.in ctree.sml: pt_extract asm<>[]"; (*WN060717 unintentionally changed some rls/ord while completing knowl. for thes2file... @@ -880,7 +880,7 @@ ("PolyEq.thy", ["normalize", "polynomial", "univariate", "equation"]), ["9 * x + (x ^^^ 3 + -6 * x ^^^ 2) ~= 0"]) => () - | _ => raise error "diff.behav.in ctree.sml: pt_extract asm<>[]"; + | _ => error "diff.behav.in ctree.sml: pt_extract asm<>[]"; .... but it became even better*) @@ -908,62 +908,62 @@ ("solve (x + 1 = 2, x)", Apply_Method ["Test", "squ-equ-test-subpbl1"], []) => () - | _ => raise error "diff.behav.in ctree.sml: pt_extract ([], Pbl)"; + | _ => error "diff.behav.in ctree.sml: pt_extract ([], Pbl)"; val (Form form, SOME tac, asm) = pt_extract (pt, ([1], Frm)); case (term2str form, tac, terms2strs asm) of ("x + 1 = 2", Rewrite_Set "norm_equation", []) => () - | _ => raise error "diff.behav.in ctree.sml: pt_extract ([1], Frm)"; + | _ => error "diff.behav.in ctree.sml: pt_extract ([1], Frm)"; val (Form form, SOME tac, asm) = pt_extract (pt, ([1], Res)); case (term2str form, tac, terms2strs asm) of ("x + 1 + -1 * 2 = 0", Rewrite_Set "Test_simplify", []) => () - | _ => raise error "diff.behav.in ctree.sml: pt_extract ([1], Res)"; + | _ => error "diff.behav.in ctree.sml: pt_extract ([1], Res)"; val (Form form, SOME tac, asm) = pt_extract (pt, ([2], Res)); case (term2str form, tac, terms2strs asm) of ("-1 + x = 0", Subproblem ("Test.thy", ["linear", "univariate", "equation", "test"]), []) => () - | _ => raise error "diff.behav.in ctree.sml: pt_extract ([2], Res)"; + | _ => error "diff.behav.in ctree.sml: pt_extract ([2], Res)"; val (ModSpec (_,_,form,_,_,_), SOME tac, asm) = pt_extract (pt, ([3], Pbl)); case (term2str form, tac, terms2strs asm) of ("solve (-1 + x = 0, x)", Apply_Method ["Test", "solve_linear"], []) => () - | _ => raise error "diff.behav.in ctree.sml: pt_extract ([3], Pbl)"; + | _ => error "diff.behav.in ctree.sml: pt_extract ([3], Pbl)"; val (Form form, SOME tac, asm) = pt_extract (pt, ([3,1], Frm)); case (term2str form, tac, terms2strs asm) of ("-1 + x = 0", Rewrite_Set_Inst (["(bdv, x)"], "isolate_bdv"), []) => () - | _ => raise error "diff.behav.in ctree.sml: pt_extract ([3,1], Frm)"; + | _ => error "diff.behav.in ctree.sml: pt_extract ([3,1], Frm)"; val (Form form, SOME tac, asm) = pt_extract (pt, ([3,1], Res)); case (term2str form, tac, terms2strs asm) of ("x = 0 + -1 * -1", Rewrite_Set "Test_simplify", []) => () - | _ => raise error "diff.behav.in ctree.sml: pt_extract ([3,1], Res)"; + | _ => error "diff.behav.in ctree.sml: pt_extract ([3,1], Res)"; val (Form form, SOME tac, asm) = pt_extract (pt, ([3,2], Res)); case (term2str form, tac, terms2strs asm) of ("x = 1", Check_Postcond ["linear", "univariate", "equation", "test"], []) => () - | _ => raise error "diff.behav.in ctree.sml: pt_extract ([3,2], Res)"; + | _ => error "diff.behav.in ctree.sml: pt_extract ([3,2], Res)"; val (Form form, SOME tac, asm) = pt_extract (pt, ([3], Res)); case (term2str form, tac, terms2strs asm) of ("[x = 1]", Check_elementwise "Assumptions", []) => () - | _ => raise error "diff.behav.in ctree.sml: pt_extract ([3], Res)"; + | _ => error "diff.behav.in ctree.sml: pt_extract ([3], Res)"; val (Form form, SOME tac, asm) = pt_extract (pt, ([4], Res)); case (term2str form, tac, terms2strs asm) of ("[x = 1]", Check_Postcond ["sqroot-test", "univariate", "equation", "test"], []) => () - | _ => raise error "diff.behav.in ctree.sml: pt_extract ([4], Res)"; + | _ => error "diff.behav.in ctree.sml: pt_extract ([4], Res)"; val (Form form, tac, asm) = pt_extract (pt, ([], Res)); case (term2str form, tac, terms2strs asm) of ("[x = 1]", NONE, []) => () - | _ => raise error "diff.behav.in ctree.sml: pt_extract ([], Res)"; + | _ => error "diff.behav.in ctree.sml: pt_extract ([], Res)"; "=====new ptree 6 minisubpbl intersteps =========================="; "=====new ptree 6 minisubpbl intersteps =========================="; @@ -1003,13 +1003,13 @@ ([3], Res), ([4], Res), ([], Res)] then () else -raise error "ctree.sml diff.behav. get_allp new []"; +error "ctree.sml diff.behav. get_allp new []"; print_depth 99; val cuts2 = get_allps [] [1] (children pt); print_depth 3; if cuts = cuts2 @ [([], Res)] then () else -raise error "ctree.sml diff.behav. get_allps new []"; +error "ctree.sml diff.behav. get_allps new []"; "---(3) on S(606)..S(608)--------"; "--- nd [2] with 6 children---------------------------------"; @@ -1018,11 +1018,11 @@ [([2, 1], Frm), ([2, 1], Res), ([2, 2], Res), ([2, 3], Res), ([2, 4], Res), ([2, 5], Res), ([2, 6], Res), ([2], Res)] then () else -raise error "ctree.sml diff.behav. get_allp new [2]"; +error "ctree.sml diff.behav. get_allp new [2]"; val cuts2 = get_allps [] [2,1] (children (get_nd pt [2])); if cuts = cuts2 @ [([2], Res)] then () else -raise error "ctree.sml diff.behav. get_allps new [2]"; +error "ctree.sml diff.behav. get_allps new [2]"; "---(4) on S(606)..S(608)--------"; @@ -1034,33 +1034,33 @@ ([3, 2, 1], Frm), ([3, 2, 1], Res), ([3, 2, 2], Res), ([3, 2], Res), ([3], Res)] then () else -raise error "ctree.sml diff.behav. get_allp new [3]"; +error "ctree.sml diff.behav. get_allp new [3]"; val cuts2 = get_allps [] [3,1] (children (get_nd pt [3])); if cuts = cuts2 @ [([3], Res)] then () else -raise error "ctree.sml diff.behav. get_allps new [3]"; +error "ctree.sml diff.behav. get_allps new [3]"; "--- nd [3,2] with 2 children--------------------------------"; val cuts = get_allp [] ([3,2], ([],Frm)) (get_nd pt [3,2]); if cuts = [([3, 2, 1], Frm), ([3, 2, 1], Res), ([3, 2, 2], Res), ([3, 2], Res)] then () else -raise error "ctree.sml diff.behav. get_allp new [3,2]"; +error "ctree.sml diff.behav. get_allp new [3,2]"; val cuts2 = get_allps [] [3,2,1] (children (get_nd pt [3,2])); if cuts = cuts2 @ [([3, 2], Res)] then () else -raise error "ctree.sml diff.behav. get_allps new [3,2]"; +error "ctree.sml diff.behav. get_allps new [3,2]"; "---(5a) on S(606)..S(608)--------"; "--- nd [3,2,1] with 0 children------------------------------"; val cuts = get_allp [] ([3,2,1], ([],Frm)) (get_nd pt [3,2,1]); if cuts = [] then () else -raise error "ctree.sml diff.behav. get_allp new [3,2,1]"; +error "ctree.sml diff.behav. get_allp new [3,2,1]"; val cuts2 = get_allps [] [3,2,1,1] (children (get_nd pt [3,2,1])); if cuts = cuts2 @ [] then () else -raise error "ctree.sml diff.behav. get_allps new [3,2,1]"; +error "ctree.sml diff.behav. get_allps new [3,2,1]"; (**#################################################################**) @@ -1070,10 +1070,10 @@ show_pt pt; val b = get_obj g_branch pt []; if b = TransitiveB then () else -raise error ("ctree.sml diff.behav. in [] branch="^branch2str b); +error ("ctree.sml diff.behav. in [] branch="^branch2str b); val b = get_obj g_branch pt [3]; if b = TransitiveB then () else -raise error ("ctree.sml diff.behav. in [3] branch="^branch2str b); +error ("ctree.sml diff.behav. in [3] branch="^branch2str b); "---(2) on S(606)..S(608)--------"; val (pt', cuts) = cut_tree pt ([1],Res); @@ -1085,7 +1085,7 @@ ([3, 1], Frm), ([3, 1], Res), ([3, 2, 1], Frm), ([3, 2, 1], Res), ([3, 2, 2], Res), ([3, 2], Res), ([3], Res), ([4], Res), (*WN060727 after replacing cutlevup by test_trans:*)([], Res)] then () else -raise error "ctree.sml: diff.behav. cut_tree ([1],Res)"; +error "ctree.sml: diff.behav. cut_tree ([1],Res)"; "---(3) on S(606)..S(608)--------"; @@ -1105,7 +1105,7 @@ ([3], Res), ([4], Res), (*WN060727 added after replacing cutlevup by test_trans:*)([],Res)] then () -else raise error "ctree.sml: diff.behav. cut_tree ([2],Res)"; +else error "ctree.sml: diff.behav. cut_tree ([2],Res)"; "---(4) on S(606)..S(608)--------"; val (pt', cuts) = cut_tree pt ([3],Pbl); @@ -1119,7 +1119,7 @@ ([3], Res), ([4], Res), (*WN060727 added after replacing cutlevup by test_trans:*)([], Res)] -then () else raise error "ctree.sml: diff.behav. cut_tree ([3],Pbl)"; +then () else error "ctree.sml: diff.behav. cut_tree ([3],Pbl)"; "---(5a) on S(606)..S(608) cut_tree --------"; val (pt', cuts) = cut_tree pt ([3,2,1],Res); @@ -1129,7 +1129,7 @@ if cuts = [([3, 2, 2], Res), ([3, 2], Res), (*WN060727 added after replacing cutlevup by test_trans:*) ([3], Res), ([4], Res),([],Res)] then () -else raise error "ctree.sml: diff.behav. cut_tree ([3,2,1],Res)"; +else error "ctree.sml: diff.behav. cut_tree ([3,2,1],Res)"; show_pt pt'; @@ -1149,14 +1149,14 @@ ([3, 1], Frm), ([3, 1], Res), ([3, 2, 1], Frm), ([3, 2, 1], Res), ([3, 2, 2], Res), ([3, 2], Res), ([3], Res), ([4], Res), (*WN060727 added after replacing cutlevup by test_trans:*) ([], Res)] then () -else raise error "ctree.sml: diff:behav. in complete pt:append_atomic[1] cuts"; +else error "ctree.sml: diff:behav. in complete pt:append_atomic[1] cuts"; val afterins = get_allp [] ([], ([],Frm)) pt'; print_depth 99; afterins; print_depth 3; if afterins = [([1], Frm), ([1], Res) (*, WN060727 removed after replacing cutlevup by test_trans:([], Res)*)] then() -else raise error "ctree.sml: diff:behav. in complete pt: append_atomic[1] afterins"; +else error "ctree.sml: diff:behav. in complete pt: append_atomic[1] afterins"; show_pt pt'; "---(3) on S(606)..S(608)--------"; @@ -1171,7 +1171,7 @@ ([3, 1], Frm),([3, 1], Res), ([3, 2, 1], Frm), ([3, 2, 1], Res), ([3, 2, 2], Res), ([3, 2], Res), ([3], Res), ([4], Res), (*WN060727 added after replacing cutlevup by test_trans:*) ([], Res)] then () -else raise error "ctree.sml: diff:behav.in complete pt: append_atomic[2] cuts"; +else error "ctree.sml: diff:behav.in complete pt: append_atomic[2] cuts"; val afterins = get_allp [] ([], ([],Frm)) pt'; print_depth 99; afterins; @@ -1179,7 +1179,7 @@ if afterins = [([1], Frm), ([1], Res), ([2], Frm), ([2], Res) (*, WN060727 removed after replacing cutlevup by test_trans:([], Res)*)] then () else -raise error "ctree.sml: diff:behav. in complete pt: append_atomic[2] afterins"; +error "ctree.sml: diff:behav. in complete pt: append_atomic[2] afterins"; show_pt pt'; (* val p = move_dn [] pt' ([],Pbl) (*-> ([1],Frm)*); @@ -1204,7 +1204,7 @@ ([3, 2], Res), ([3], Res), ([4], Res), (*WN060727 added after replacing cutlevup by test_trans*)([], Res)] then ()else -raise error "ctree.sml: diff:behav. in ccomplete pt: append_problem[3] cuts"; +error "ctree.sml: diff:behav. in ccomplete pt: append_problem[3] cuts"; val afterins = get_allp [] ([], ([],Frm)) pt'; print_depth 99; afterins; @@ -1213,7 +1213,7 @@ [([1], Frm), ([1], Res),([2, 1], Frm), ([2, 1], Res), ([2, 2], Res), ([2, 3], Res), ([2, 4], Res), ([2, 5], Res), ([2, 6], Res), ([2], Res), ([3], Pbl)] then () else -raise error "ctree.sml: diff:behav.in complete pt: append_problem[3] afterins"; +error "ctree.sml: diff:behav.in complete pt: append_problem[3] afterins"; (* use"systest/ctree.sml"; use"ctree.sml"; *) @@ -1227,7 +1227,7 @@ if cuts = [([3, 2, 1], Frm), ([3, 2, 1], Res), ([3, 2, 2], Res), ([3, 2], Res), (*WN060727 added*)([3], Res), ([4], Res), ([], Res)] then () else -raise error "ctree.sml: diff:behav. in complete pt: append_atomic[3,1] cuts"; +error "ctree.sml: diff:behav. in complete pt: append_atomic[3,1] cuts"; val afterins = get_allp [] ([], ([],Frm)) pt'; print_depth 99; afterins; @@ -1242,7 +1242,7 @@ ([3], Res)(*cutlevup=false*), ([4], Res), ([], Res)(*cutlevup=false*)] then () else -raise error "ctree.sml: diff:behav. in complete pt: append_atomic[3,1] insrtd"; +error "ctree.sml: diff:behav. in complete pt: append_atomic[3,1] insrtd"; *) if afterins = [([1], Frm), ([1], Res), ([2, 1], Frm), ([2, 1], Res), ([2, 2], Res), @@ -1250,10 +1250,10 @@ ([2], Res), ([3], Pbl), ([3, 1], Frm), ([3, 1], Res)] then () else -raise error "ctree.sml: diff:behav. in complete pt: append_atomic[3,1] insrtd"; +error "ctree.sml: diff:behav. in complete pt: append_atomic[3,1] insrtd"; if term2str (get_obj g_form pt' [3,1]) = "Inform [3, 1]" then () else -raise error "ctree.sml: diff:behav. in complete pt: append_atomic[3,1] Inform"; +error "ctree.sml: diff:behav. in complete pt: append_atomic[3,1] Inform"; "---(6) on S(606)..S(608)--------"; val (pt', cuts) = cappend_atomic pt [3,2] e_istate (str2term "Inform[3,2]") @@ -1264,7 +1264,7 @@ if cuts = [(*just after is: cutlevup=false in [3]*) (*WN060727 after test_trans instead cutlevup added:*) ([3], Res), ([4], Res), ([], Res)] then () else -raise error "ctree.sml: diff:behav. in complete pt: append_atomic[3,2] cuts"; +error "ctree.sml: diff:behav. in complete pt: append_atomic[3,2] cuts"; val afterins = get_allp [] ([], ([],Frm)) pt'; print_depth 99; afterins; @@ -1278,7 +1278,7 @@ ([3, 1], Frm), ([3, 1], Res), ([3, 2], Frm), ([3, 2], Res), ([3], Res), ([4], Res), ([], Res)] then () else -raise error "ctree.sml: diff:behav. in complete pt: append_atomic[3,2] insrtd"; +error "ctree.sml: diff:behav. in complete pt: append_atomic[3,2] insrtd"; *) if afterins = [([1], Frm), ([1], Res), ([2, 1], Frm), ([2, 1], Res), ([2, 2], Res), @@ -1287,10 +1287,10 @@ ([3], Pbl), ([3, 1], Frm), ([3, 1], Res), ([3, 2], Frm), ([3, 2], Res)] then () else -raise error "ctree.sml: diff:behav. in complete pt: append_atomic[3,2] insrtd"; +error "ctree.sml: diff:behav. in complete pt: append_atomic[3,2] insrtd"; if term2str (get_obj g_form pt' [3,2]) = "Inform [3, 2]" then () else -raise error "ctree.sml: diff:behav. in complete pt: append_atomic[3,2] Inform"; +error "ctree.sml: diff:behav. in complete pt: append_atomic[3,2] Inform"; "---(6++) on S(606)..S(608)--------"; (**) @@ -1302,7 +1302,7 @@ if cuts = [([3, 2, 2], Res), ([3, 2], Res), (*WN060727 {cutlevup->test_trans} added:*)([3], Res), ([4], Res), ([], Res)] then () else -raise error "ctree.sml: diff:behav. in complete pt: append_atomic[3,2,1] cuts"; +error "ctree.sml: diff:behav. in complete pt: append_atomic[3,2,1] cuts"; val afterins = get_allp [] ([], ([],Frm)) pt'; print_depth 99; afterins; @@ -1314,9 +1314,9 @@ ([3], Pbl), ([3, 1], Frm), ([3, 1], Res), ([3, 2, 1], Frm), ([3, 2, 1], Res)] then () else -raise error "ctree.sml: diff:behav. in complete pt: append_atom[3,2,1] insrtd"; +error "ctree.sml: diff:behav. in complete pt: append_atom[3,2,1] insrtd"; if term2str (get_obj g_form pt' [3,2,1]) = "Inform [3, 2, 1]" then () else -raise error "ctree.sml: diff:behav. complete pt: append_atomic[3,2,1] Inform"; +error "ctree.sml: diff:behav. complete pt: append_atomic[3,2,1] Inform"; (* show_pt pt'; show_pt pt; diff -r 95d956108461 -r 460c24a6a6ba test/Tools/isac/Interpret/inform.sml --- a/test/Tools/isac/Interpret/inform.sml Tue Sep 28 08:58:06 2010 +0200 +++ b/test/Tools/isac/Interpret/inform.sml Tue Sep 28 09:06:56 2010 +0200 @@ -64,7 +64,7 @@ val str = pr_ptree pr_short pt; writeln str; if str = ". ----- pblobj -----\n1. x + 1 = 2\n2. x + 1 + -1 * 2 = 0\n2.1. x + 1 + -1 * 2 = 0\n2.2. -1 * 2 + (x + 1) = 0\n2.3. -1 * 2 + (1 + x) = 0\n2.4. 1 + (-1 * 2 + x) = 0\n2.5. 1 + (-2 + x) = 0\n2.6. 1 + (-2 * 1 + x) = 0\n" then () - else raise error "inform.sml: diff.behav.appendFormula: on Res + equ 1"; + else error "inform.sml: diff.behav.appendFormula: on Res + equ 1"; moveDown 1 ([ ],Pbl); refFormula 1 ([1],Frm); (*x + 1 = 2*) moveDown 1 ([1],Frm); refFormula 1 ([1],Res); (*x + 1 + -1 * 2 = 0*) @@ -79,16 +79,16 @@ moveDown 1 ([2,5],Res); refFormula 1 ([2,6],Res); val ((pt,_),_) = get_calc 1; if "-2 * 1 + (1 + x) = 0" = term2str (fst (get_obj g_result pt [2,6])) then() - else raise error "inform.sml: diff.behav.appendFormula: on Res + equ 2"; + else error "inform.sml: diff.behav.appendFormula: on Res + equ 2"; fetchProposedTactic 1; (*takes Iterator 1 _1_*) val (_,(tac,_,_)::_) = get_calc 1; if tac = Rewrite_Set "Test_simplify" then () - else raise error "inform.sml: diff.behav.appendFormula: on Res + equ 3"; + else error "inform.sml: diff.behav.appendFormula: on Res + equ 3"; autoCalculate 1 CompleteCalc; val ((pt,_),_) = get_calc 1; if "[x = 1]" = term2str (fst (get_obj g_result pt [])) then () - else raise error "inform.sml: diff.behav.appendFormula: on Res + equ 4"; + else error "inform.sml: diff.behav.appendFormula: on Res + equ 4"; (* autoCalculate 1 CompleteCalc; val ((pt,p),_) = get_calc 1; (writeln o istates2str) (get_obj g_loc pt [ ]); @@ -144,16 +144,16 @@ moveDown 1 ([1,5],Res); refFormula 1 ([1,6],Res); val ((pt,_),_) = get_calc 1; if "2 + -1 + x = 2" = term2str (fst (get_obj g_result pt [1,6])) then() - else raise error "inform.sml: diff.behav.appendFormula: on Frm + equ 1"; + else error "inform.sml: diff.behav.appendFormula: on Frm + equ 1"; fetchProposedTactic 1; (*takes Iterator 1 _1_*) val (_,(tac,_,_)::_) = get_calc 1; if tac = Rewrite_Set "norm_equation" then () - else raise error "inform.sml: diff.behav.appendFormula: on Frm + equ 2"; + else error "inform.sml: diff.behav.appendFormula: on Frm + equ 2"; autoCalculate 1 CompleteCalc; val ((pt,_),_) = get_calc 1; if "[x = 1]" = term2str (fst (get_obj g_result pt [])) then () - else raise error "inform.sml: diff.behav.appendFormula: on Frm + equ 3"; + else error "inform.sml: diff.behav.appendFormula: on Frm + equ 3"; "--------- appendFormula: on Res + NO deriv ----------------------"; @@ -175,16 +175,16 @@ writeln str; if str = ". ----- pblobj -----\n1. x + 1 = 2\n" andalso p = ([1], Res) then () - else raise error "inform.sml: diff.behav.appendFormula: Res + NOder 1"; + else error "inform.sml: diff.behav.appendFormula: Res + NOder 1"; fetchProposedTactic 1; val (_,(tac,_,_)::_) = get_calc 1; if tac = Rewrite_Set "Test_simplify" then () - else raise error "inform.sml: diff.behav.appendFormula: Res + NOder 2"; + else error "inform.sml: diff.behav.appendFormula: Res + NOder 2"; autoCalculate 1 CompleteCalc; val ((pt,_),_) = get_calc 1; if "[x = 1]" = term2str (fst (get_obj g_result pt [])) then () - else raise error "inform.sml: diff.behav.appendFormula: on Frm + equ 3"; + else error "inform.sml: diff.behav.appendFormula: on Frm + equ 3"; "--------- appendFormula: on Res + late deriv --------------------"; @@ -206,16 +206,16 @@ writeln str; if str = ". ----- pblobj -----\n1. x + 1 = 2\n2. x + 1 + -1 * 2 = 0\n3. ----- pblobj -----\n3.1. -1 + x = 0\n3.2. x = 0 + -1 * -1\n3.2.1. x = 0 + -1 * -1\n3.2.2. x = 0 + 1\n" andalso p = ([3,2], Res) then () (*finds 1 step too early: ([3,2], Res) "x = 1" also by script !!!*) - else raise error "inform.sml: diff.behav.appendFormula: Res + late d 1"; + else error "inform.sml: diff.behav.appendFormula: Res + late d 1"; fetchProposedTactic 1; val (_,(tac,_,_)::_) = get_calc 1; if tac = Check_Postcond ["linear", "univariate", "equation", "test"] then () - else raise error "inform.sml: diff.behav.appendFormula: Res + late d 2"; + else error "inform.sml: diff.behav.appendFormula: Res + late d 2"; autoCalculate 1 CompleteCalc; val ((pt,_),_) = get_calc 1; if "[x = 1]" = term2str (fst (get_obj g_result pt [])) then () - else raise error "inform.sml: diff.behav.appendFormula: Res + late d 3"; + else error "inform.sml: diff.behav.appendFormula: Res + late d 3"; "--------- appendFormula: on Res + late deriv [x = 3 + -2]---///--"; @@ -235,12 +235,12 @@ val str = pr_ptree pr_short pt; writeln str; if str=". ----- pblobj -----\n1. x + 1 = 2\n2. x + 1 + -1 * 2 = 0\n3. ----- pblobj -----\n3.1. -1 + x = 0\n3.2. x = 0 + -1 * -1\n4. [x = 1]\n4.1. [x = 1]\n4.2. [x = -2 + 3]\n4.3. [x = 3 + -2]\n" then () - else raise error "inform.sml: diff.behav.appendFormula: Res + latEE 1"; + else error "inform.sml: diff.behav.appendFormula: Res + latEE 1"; autoCalculate 1 CompleteCalc; val ((pt,p),_) = get_calc 1; if "[x = 3 + -2 * 1]" = term2str (fst (get_obj g_result pt [])) then () (* ~~~~~~~~~~ simplify as last step in any script ?!*) - else raise error "inform.sml: diff.behav.appendFormula: Res + latEE 2"; + else error "inform.sml: diff.behav.appendFormula: Res + latEE 2"; @@ -263,11 +263,11 @@ val str = pr_ptree pr_short pt; writeln str; if str=". ----- pblobj -----\n1. x + 1 = 2\n2. x + 1 + -1 * 2 = 0\n2.1. x + 1 + -1 * 2 = 0\n2.2. -1 * 2 + (x + 1) = 0\n2.3. -1 * 2 + (1 + x) = 0\n2.4. 1 + (-1 * 2 + x) = 0\n2.5. 1 + (-2 + x) = 0\n2.6. 1 + (-2 * 1 + x) = 0\n" then() - else raise error "inform.sml: diff.behav.replaceFormula: on Res += 1"; + else error "inform.sml: diff.behav.replaceFormula: on Res += 1"; autoCalculate 1 CompleteCalc; val ((pt,pos as(p,_)),_) = get_calc 1; if pos=([],Res)andalso"[x = 1]"=(term2str o fst)(get_obj g_result pt p)then() - else raise error "inform.sml: diff.behav.replaceFormula: on Res + = 2"; + else error "inform.sml: diff.behav.replaceFormula: on Res + = 2"; "--------- replaceFormula: on Res + = 1st Nd ---------------------"; @@ -288,11 +288,11 @@ val str = pr_ptree pr_short pt; writeln str; if str=". ----- pblobj -----\n1. x + 1 = 2\n1.1. x + 1 = 2\n1.2. 1 + x = 2\n1.3. 1 + x = -2 + 4\n1.4. x + 1 = -2 + 4\n" then () - else raise error "inform.sml: diff.behav.replaceFormula: on Res 1 + = 1"; + else error "inform.sml: diff.behav.replaceFormula: on Res 1 + = 1"; autoCalculate 1 CompleteCalc; val ((pt,pos as(p,_)),_) = get_calc 1; if pos=([],Res)andalso"[x = 1]"=(term2str o fst)(get_obj g_result pt p)then() - else raise error "inform.sml: diff.behav.replaceFormula: on Res + = 2"; + else error "inform.sml: diff.behav.replaceFormula: on Res + = 2"; "--------- replaceFormula: on Frm + = 1st Nd ---------------------"; @@ -312,11 +312,11 @@ val str = pr_ptree pr_short pt; writeln str; if str=". ----- pblobj -----\n1. x + 1 = 2\n1.1. x + 1 = 2\n1.2. 1 + x = 2\n1.3. 1 + x = -2 + 4\n1.4. x + 1 = -2 + 4\n" then () - else raise error "inform.sml: diff.behav.replaceFormula: on Frm 1 + = 1"; + else error "inform.sml: diff.behav.replaceFormula: on Frm 1 + = 1"; autoCalculate 1 CompleteCalc; val ((pt,pos as(p,_)),_) = get_calc 1; if pos=([],Res)andalso"[x = 1]"=(term2str o fst)(get_obj g_result pt p)then() - else raise error "inform.sml: diff.behav.replaceFormula: on Frm 1 + = 2"; + else error "inform.sml: diff.behav.replaceFormula: on Frm 1 + = 2"; "--------- replaceFormula: cut calculation -----------------------"; @@ -331,14 +331,14 @@ autoCalculate 1 CompleteCalc; moveActiveRoot 1; moveActiveDown 1; if get_pos 1 1 = ([1], Frm) then () - else raise error "inform.sml: diff.behav. cut calculation 1"; + else error "inform.sml: diff.behav. cut calculation 1"; replaceFormula 1 "x + 1 = 4 + -2"; refFormula 1 (get_pos 1 1); val ((pt,p),_) = get_calc 1; val str = pr_ptree pr_short pt; writeln str; if p = ([1], Res) then () - else raise error "inform.sml: diff.behav. cut calculation 2"; + else error "inform.sml: diff.behav. cut calculation 2"; @@ -385,7 +385,7 @@ (*the empty CalcHead is checked w.r.t the model and re-established as such*) val (b,pt,ocalhd) = input_icalhd pt (p,"", empty_model, Pbl, e_spec); val pbl = get_obj g_pbl pt (fst p); (writeln o (itms2str_ ctxt)) pbl; - if ocalhd2str ocalhd = "(Pbl, ??.empty, [\n(0 ,[] ,false ,#Given ,Inc fixedValues [] ,(??.empty, [])),\n(0 ,[] ,false ,#Find ,Inc maximum ,(??.empty, [])),\n(0 ,[] ,false ,#Find ,Inc valuesFor ,(??.empty, [])),\n(0 ,[] ,false ,#Relate ,Inc relations [] ,(??.empty, []))], [], \n(\"e_domID\", [\"e_pblID\"], [\"e_metID\"]) )" then () else raise error "informtest.sml: diff.behav. max 1"; + if ocalhd2str ocalhd = "(Pbl, ??.empty, [\n(0 ,[] ,false ,#Given ,Inc fixedValues [] ,(??.empty, [])),\n(0 ,[] ,false ,#Find ,Inc maximum ,(??.empty, [])),\n(0 ,[] ,false ,#Find ,Inc valuesFor ,(??.empty, [])),\n(0 ,[] ,false ,#Relate ,Inc relations [] ,(??.empty, []))], [], \n(\"e_domID\", [\"e_pblID\"], [\"e_metID\"]) )" then () else error "informtest.sml: diff.behav. max 1"; (*there is one input to the model (could be more)*) val (b,pt,ocalhd) = @@ -394,7 +394,7 @@ Relate ["relations"]], Pbl, e_spec); val pbl = get_obj g_pbl pt (fst p); (writeln o (itms2str_ ctxt)) pbl; if ocalhd2str ocalhd = "(Pbl, ??.empty, [\n(1 ,[1,2,3] ,true ,#Given ,Cor fixedValues [r = Arbfix] ,(fix_, [[r = Arbfix]])),\n(0 ,[] ,false ,#Find ,Inc maximum ,(??.empty, [])),\n(0 ,[] ,false ,#Find ,Inc valuesFor ,(??.empty, [])),\n(0 ,[] ,false ,#Relate ,Inc relations [] ,(??.empty, []))], [], \n(\"e_domID\", [\"e_pblID\"], [\"e_metID\"]) )" then () - else raise error "informtest.sml: diff.behav. max 2"; + else error "informtest.sml: diff.behav. max 2"; (*this input is complete in variant 3, but the ME doesn't recognize FIXXXXME val (b,pt''''',ocalhd) = @@ -435,7 +435,7 @@ val str = pr_ptree pr_short pt; writeln str; if str = ". ----- pblobj -----\n1. x + 1 = 2\n" then () - else raise error "inform.sml: diff.behav.appendFormula: syntax error"; + else error "inform.sml: diff.behav.appendFormula: syntax error"; "--------- CAS-command on ([],Pbl) -------------------------------"; @@ -449,7 +449,7 @@ val nxt = ("Apply_Method",Apply_Method ["Test","squ-equ-test-subpbl1"]); val (p,_,f,nxt,_,pt) = me nxt p [] pt; if p = ([1], Frm) andalso f2str f = "x + 1 = 2" then () -else raise error "inform.sml: diff.behav. CAScmd ([],Pbl)"; +else error "inform.sml: diff.behav. CAScmd ([],Pbl)"; "--------- CAS-command on ([],Pbl) FE-interface ------------------"; @@ -464,7 +464,7 @@ val ((pt,p),_) = get_calc 1; show_pt pt; if p = ([], Res) then () -else raise error "inform.sml: diff.behav. CAScmd ([],Pbl) FE-interface"; +else error "inform.sml: diff.behav. CAScmd ([],Pbl) FE-interface"; "--------- inform [rational,simplification] ----------------------"; @@ -484,20 +484,20 @@ appendFormula 1 "(4 * y + -3 * x) / (x * y) + -1"; val ((pt,p),_) = get_calc 1; if p = ([4], Res) andalso (length o children o (get_nd pt)) (fst p) = 2 then () -else raise error ("inform.sml: [rational,simplification] 1"); +else error ("inform.sml: [rational,simplification] 1"); "--- input the next formula that would be presented by mat-engine"; (*autoCalculate 1 (Step 1);*) appendFormula 1 "(4 * y + -3 * x + -1 * (x * y)) / (x * y)"; val ((pt,p),_) = get_calc 1; if p = ([5], Res) andalso (length o children o (get_nd pt)) (fst p) = 0 then () -else raise error ("inform.sml: [rational,simplification] 2"); +else error ("inform.sml: [rational,simplification] 2"); "--- input the exact final result";(*TODO: Exception- LIST "last_elem" raised*) appendFormula 1 "(-3 * x + 4 * y + -1 * x * y) / (x * y)"; val ((pt,p),_) = get_calc 1; if p = ([6], Res) andalso (length o children o (get_nd pt)) (fst p) = 2 then () -else raise error ("inform.sml: [rational,simplification] 3"); +else error ("inform.sml: [rational,simplification] 3"); show_pt pt; "--------- Take as 1st tac, start with (CAS input) ---------"; @@ -565,7 +565,7 @@ val Form res = (#1 o pt_extract) (pt, ([],Res)); show_pt pt; if p = ([], Res) andalso term2str res = "1 + 2 * x" then () -else raise error "diff.sml behav.changed for Diff (x^2 + x + 1, x)"; +else error "diff.sml behav.changed for Diff (x^2 + x + 1, x)"; "--------- Take as 1st tac, start from exp -----------------------"; @@ -609,7 +609,7 @@ val ((pt,p),_) = get_calc 1; val Form res = (#1 o pt_extract) (pt, p); if term2str res = "d_d x (x ^^^ 2 + x + 1)" then () -else raise error "diff.sml Diff (x^2 + x + 1, x) from exp"; +else error "diff.sml Diff (x^2 + x + 1, x) from exp"; "--------- init_form, start with (CAS input) ---------------"; diff -r 95d956108461 -r 460c24a6a6ba test/Tools/isac/Interpret/mathengine.sml --- a/test/Tools/isac/Interpret/mathengine.sml Tue Sep 28 08:58:06 2010 +0200 +++ b/test/Tools/isac/Interpret/mathengine.sml Tue Sep 28 09:06:56 2010 +0200 @@ -36,20 +36,20 @@ val pp = par_pblobj pt p; val keID = guh2kestoreID guh; case context_pbl keID pt pp of (true,["univariate", "equation"],_,_,_)=>() -| _ => raise error "mathengine.sml: context_pbl .. pbl_equ_univ checked"; +| _ => error "mathengine.sml: context_pbl .. pbl_equ_univ checked"; case get_obj g_spec pt p of (_, ["e_pblID"], _) => () -| _ => raise error "mathengine.sml: context_pbl .. pbl still empty"; +| _ => error "mathengine.sml: context_pbl .. pbl still empty"; setContext 1 pos guh; val ((pt,_),_) = get_calc 1; case get_obj g_spec pt p of (_, ["univariate", "equation"], _) => () -| _ => raise error "mathengine.sml: context_pbl .. pbl set"; +| _ => error "mathengine.sml: context_pbl .. pbl set"; setContext 1 pos "met_eq_lin"; val ((pt,_),_) = get_calc 1; case get_obj g_spec pt p of (_, _, ["LinEq", "solve_lineq_equation"]) => () -| _ => raise error "mathengine.sml: context_pbl .. pbl set"; +| _ => error "mathengine.sml: context_pbl .. pbl set"; "----------- tryrefine -------------------------------------------"; diff -r 95d956108461 -r 460c24a6a6ba test/Tools/isac/Interpret/me.sml --- a/test/Tools/isac/Interpret/me.sml Tue Sep 28 08:58:06 2010 +0200 +++ b/test/Tools/isac/Interpret/me.sml Tue Sep 28 09:06:56 2010 +0200 @@ -106,7 +106,7 @@ ([4], Res), ([5], Res), ([], Res)] => () - | _ => raise error "diff.behav.in ctree.sml: get_interval lev 1f"; + | _ => error "diff.behav.in ctree.sml: get_interval lev 1f"; case map fst (get_interval ([],Frm) ([],Res) 1 pt) of [([], Frm), ([1], Frm), @@ -117,11 +117,11 @@ ([4], Res), ([5], Res), ([], Res)] => () - | _ => raise error "diff.behav.in ctree.sml: get_interval lev 1f"; + | _ => error "diff.behav.in ctree.sml: get_interval lev 1f"; case map fst (get_interval ([],Frm) ([],Res) 0 pt) of [([], Frm), ([], Res)] => () - | _ => raise error "diff.behav.in ctree.sml: get_interval lev 1f"; + | _ => error "diff.behav.in ctree.sml: get_interval lev 1f"; case map fst (get_interval ([1,3],Res) ([4,1,1],Frm) 99999 pt) of [([1, 3], Res), @@ -132,7 +132,7 @@ ([4], Pbl), ([4, 1], Frm), ([4, 1, 1], Frm)] => () - | _ => raise error "diff.behav.in ctree.sml: get_interval lev 1a"; + | _ => error "diff.behav.in ctree.sml: get_interval lev 1a"; (*this pos' is not generated bu move_dn:......vvv: goes to end of calc*) case map fst (get_interval ([2],Res) ([4,3,2],Frm) 99999 pt) of @@ -155,7 +155,7 @@ ([4], Res), (*this is beyond 'to'*) ([5], Res), (*this is beyond 'to'*) ([], Res)] => () (*this is beyond 'to'*) - | _ => raise error "diff.behav.in ctree.sml: get_interval lev 1b"; + | _ => error "diff.behav.in ctree.sml: get_interval lev 1b"; case map fst (get_interval ([1,4],Res) ([4,3,1],Frm) 99999 pt) of [([1, 4], Res), ([1], Res), @@ -169,7 +169,7 @@ ([4, 2], Res), ([4, 3], Pbl), ([4, 3, 1], Frm)] => () - | _ => raise error "diff.behav.in ctree.sml: get_interval lev 1c"; + | _ => error "diff.behav.in ctree.sml: get_interval lev 1c"; case map fst (get_interval ([4,2],Res) ([5],Res) 99999 pt) of [([4, 2], Res), ([4, 3], Pbl), @@ -182,7 +182,7 @@ ([4, 3], Res), ([4], Res), ([5], Res)]=>() - | _ => raise error "diff.behav.in ctree.sml: get_interval lev 1d"; + | _ => error "diff.behav.in ctree.sml: get_interval lev 1d"; case map fst (get_interval ([],Frm) ([4,3,2],Res) 99999 pt) of [([], Frm), ([1], Frm), @@ -204,7 +204,7 @@ ([4, 3, 1], Frm), ([4, 3, 1], Res), ([4, 3, 2], Res)] => () - | _ => raise error "diff.behav.in ctree.sml: get_interval lev 1e"; + | _ => error "diff.behav.in ctree.sml: get_interval lev 1e"; case map fst (get_interval ([4,3],Frm) ([4,3],Res) 99999 pt) of [([4, 3], Frm), ([4, 3, 1], Frm), @@ -214,7 +214,7 @@ ([4, 3, 4], Res), ([4, 3, 5], Res), ([4, 3], Res)] => () - | _ => raise error "diff.behav.in ctree.sml: get_interval lev 1g"; + | _ => error "diff.behav.in ctree.sml: get_interval lev 1g"; @@ -351,7 +351,7 @@ (1 ,[1] ,true ,#Given ,Cor equality (1 + -1 * 2 + x = 0) ,(e_, [1 + -1 * 2 + x = 0]))]*) val (pt,p) = complete_mod (pt, p); if itms2str_ ctxt (get_obj g_pbl pt (fst p)) = "[\n(1 ,[1] ,true ,#Given ,Cor equality (1 + -1 * 2 + x = 0) ,(e_, [1 + -1 * 2 + x = 0])),\n(2 ,[1] ,true ,#Given ,Cor solveFor x ,(v_, [x])),\n(3 ,[1] ,true ,#Find ,Cor solutions L ,(v_i_, [L]))]" then () - else raise error "completetest.sml: new behav. in complete_mod 1"; + else error "completetest.sml: new behav. in complete_mod 1"; writeln (itms2str_ ctxt (get_obj g_pbl pt (fst p))); (*[ (1 ,[1] ,true ,#Given ,Cor equality (1 + -1 * 2 + x = 0) ,(e_, [1 + -1 * 2 + x = 0])), @@ -359,7 +359,7 @@ (3 ,[1] ,true ,#Find ,Cor solutions L ,(solutions, [L]))]*) val mits = get_obj g_met pt (fst p); if itms2str_ ctxt mits = "[\n(1 ,[1] ,true ,#Given ,Cor equality (1 + -1 * 2 + x = 0) ,(e_, [1 + -1 * 2 + x = 0])),\n(2 ,[1] ,true ,#Given ,Cor solveFor x ,(v_, [x])),\n(3 ,[1] ,true ,#Find ,Cor solutions L ,(v_i_, [L]))]" - then () else raise error "completetest.sml: new behav. in complete_mod 2"; + then () else error "completetest.sml: new behav. in complete_mod 2"; writeln (itms2str_ ctxt mits); (*[ (1 ,[1] ,true ,#Given ,Cor equality (1 + -1 * 2 + x = 0) ,(e_, [1 + -1 * 2 + x = 0])), @@ -468,7 +468,7 @@ 0 <= x & x <= 2 * r}])), (11 ,[1,2,3] ,true ,#undef ,Cor errorBound (eps = 0) ,(errorBound, [eps = 0]))]*) if itms2str_ ctxt mits = "[\n(1 ,[1,2,3] ,true ,#Given ,Cor fixedValues [r = Arbfix] ,(fix_, [[r = Arbfix]])),\n(2 ,[1,2,3] ,true ,#Find ,Cor maximum A ,(m_, [A])),\n(3 ,[1,2,3] ,true ,#Find ,Cor valuesFor [a, b] ,(vs_, [[a, b]])),\n(4 ,[1,2] ,true ,#Relate ,Cor relations [A = a * b, (a / 2) ^^^ 2 + (b / 2) ^^^ 2 = r ^^^ 2] ,(rs_, [[A = a * b, (a / 2) ^^^ 2 + (b / 2) ^^^ 2 = r ^^^ 2]])),\n(6 ,[1] ,true ,#undef ,Cor boundVariable a ,(v_, [a])),\n(9 ,[1,2] ,true ,#undef ,Cor interval {x. 0 <= x & x <= 2 * r} ,(itv_, [{x. 0 <= x & x <= 2 * r}])),\n(11 ,[1,2,3] ,true ,#undef ,Cor errorBound (eps = 0) ,(err_, [eps = 0]))]" then () - else raise error "completetest.sml: new behav. in complete_metitms 1"; + else error "completetest.sml: new behav. in complete_metitms 1"; "--------- maximum-example: complete_mod -------------------------"; @@ -503,7 +503,7 @@ val (pt,p) = complete_mod (pt,p); val pits = get_obj g_pbl pt (fst p); if itms2str_ ctxt pits = "[\n(1 ,[1,2,3] ,true ,#Given ,Cor fixedValues [r = Arbfix] ,(fix_, [[r = Arbfix]])),\n(2 ,[1,2,3] ,true ,#Find ,Cor maximum A ,(m_, [A])),\n(3 ,[1,2,3] ,true ,#Find ,Cor valuesFor [a, b] ,(vs_, [[a],[b]])),\n(4 ,[1,2] ,true ,#Relate ,Cor relations [A = a * b, (a / 2) ^^^ 2 + (b / 2) ^^^ 2 = r ^^^ 2] ,(rs_, [[A = a * b],[(a / 2) ^^^ 2 + (b / 2) ^^^ 2 = r ^^^ 2]]))]" - then () else raise error "completetest.sml: new behav. in complete_mod 3"; + then () else error "completetest.sml: new behav. in complete_mod 3"; writeln (itms2str_ ctxt pits); (*[ (1 ,[1,2,3] ,true,#Given,Cor fixedValues [r = Arbfix] ,(fix_, [[r = Arbfix]])), @@ -513,7 +513,7 @@ 2 = r ^^^ 2] ,(relations, [[A = a * b],[(a / 2) ^^^ 2 + (b / 2) ^^^ 2 = r ^^^ 2]]))]*) val mits = get_obj g_met pt (fst p); if itms2str_ ctxt mits = "[\n(1 ,[1,2,3] ,true ,#Given ,Cor fixedValues [r = Arbfix] ,(fix_, [[r = Arbfix]])),\n(2 ,[1,2,3] ,true ,#Find ,Cor maximum A ,(m_, [A])),\n(3 ,[1,2,3] ,true ,#Find ,Cor valuesFor [a, b] ,(vs_, [[a],[b]])),\n(4 ,[1,2] ,true ,#Relate ,Cor relations [A = a * b, (a / 2) ^^^ 2 + (b / 2) ^^^ 2 = r ^^^ 2] ,(rs_, [[A = a * b],[(a / 2) ^^^ 2 + (b / 2) ^^^ 2 = r ^^^ 2]])),\n(6 ,[1] ,true ,#undef ,Cor boundVariable a ,(v_, [a])),\n(9 ,[1,2] ,true ,#undef ,Cor interval {x. 0 <= x & x <= 2 * r} ,(itv_, [{x. 0 <= x & x <= 2 * r}])),\n(11 ,[1,2,3] ,true ,#undef ,Cor errorBound (eps = 0) ,(err_, [eps = 0]))]" - then () else raise error "completetest.sml: new behav. in complete_mod 3"; + then () else error "completetest.sml: new behav. in complete_mod 3"; writeln (itms2str_ ctxt mits); (*[ (1 ,[1,2,3] ,true ,#Given ,Cor fixedValues [r = Arbfix] ,(fix_, [[r = Arbfix]])), diff -r 95d956108461 -r 460c24a6a6ba test/Tools/isac/Interpret/ptyps.sml --- a/test/Tools/isac/Interpret/ptyps.sml Tue Sep 28 08:58:06 2010 +0200 +++ b/test/Tools/isac/Interpret/ptyps.sml Tue Sep 28 09:06:56 2010 +0200 @@ -145,7 +145,7 @@ (*case 4: refined to children (without child)*) val opt = refine_ori ori4 ["pbla"]; if opt = SOME ["pbla2y","pbla2","pbla"] then () -else raise error "new behaviour in refine.sml case 4"; +else error "new behaviour in refine.sml case 4"; (*case 5: start refinement somewhere in ptyps*) refine_ori ori4 ["pbla2","pbla"]; @@ -419,7 +419,7 @@ val (p,_,f,nxt,_,pt) = me nxt p c pt; val Form' (FormKF (~1,EdUndef,_,Nundef,res)) = f; if (snd nxt)=End_Proof' andalso res="[x = 2]" then () -else raise error "new behaviour in test:refine.sml:miniscript with mini-subpb"; +else error "new behaviour in test:refine.sml:miniscript with mini-subpb"; "----------- fun coll_guhs ---------------------------------------"; diff -r 95d956108461 -r 460c24a6a6ba test/Tools/isac/Interpret/rewtools.sml --- a/test/Tools/isac/Interpret/rewtools.sml Tue Sep 28 08:58:06 2010 +0200 +++ b/test/Tools/isac/Interpret/rewtools.sml Tue Sep 28 09:06:56 2010 +0200 @@ -102,7 +102,7 @@ "----------- fun thy_containing_thm ------------------------------"; val (str, (thy', thy)) = ("real_diff_minus",("Root.thy", Root.thy)); if thy_contains_thm str ("XXX",thy) then () -else raise error "rewtools.sml: NOT thy_contains_thm \ +else error "rewtools.sml: NOT thy_contains_thm \ \(real_diff_minus,(Root.thy,."; (rev (!theory')); dropuntil (curry op= thy'); @@ -111,15 +111,15 @@ (#1:theory' * theory -> theory')) (rev (!theory')); if thy_containing_thm thy' str = ("IsacKnowledge", "Root.thy") then () -else raise error "rewtools.sml: NOT thy_containin_thm \ +else error "rewtools.sml: NOT thy_containin_thm \ \(real_diff_minus,(Root.thy,."; "----- search the same theorem somewhere further below in the list"; if thy_contains_thm str ("XXX",Poly.thy) then () -else raise error "rewtools.sml: NOT thy_contains_thm \ +else error "rewtools.sml: NOT thy_contains_thm \ \(real_diff_minus,(Poly.thy,."; if thy_containing_thm "LinEq.thy" str = ("IsacKnowledge", "Poly.thy") then () -else raise error "rewtools.sml: NOT thy_containing_thm \ +else error "rewtools.sml: NOT thy_containing_thm \ \(real_diff_minus,(Poly.thy,."; "----- second test -------------------------------"; @@ -132,7 +132,7 @@ length (!theory'); length startsearch; if thy_containing_thm thy' str = ("IsacKnowledge", "Test.thy") then () -else raise error "rewtools.sml: diff.behav. in \ +else error "rewtools.sml: diff.behav. in \ \thy_containing_thm Test radd_commute"; @@ -144,7 +144,7 @@ (#1:theory' * theory -> theory')) (rev (!theory')); if length (!theory') <> length dropthys then () -else raise error "rewtools.sml: diff.behav. in thy_containing_rls 1"; +else error "rewtools.sml: diff.behav. in thy_containing_rls 1"; val dropthy's = map (get_thy o (#1 : (theory' * theory) -> theory')) dropthys; print_depth 99; dropthy's; print_depth 3; @@ -161,16 +161,16 @@ (rev (!ruleset')); print_depth 99; map (#1 o #2) startsearch; print_depth 3; if length (!ruleset') <> length startsearch then () -else raise error "rewtools.sml: diff.behav. in thy_containing_rls 2"; +else error "rewtools.sml: diff.behav. in thy_containing_rls 2"; val rls' = "norm_Poly"; case assoc (startsearch, rls') of SOME (thy', _) => thyID2theory' thy' - | _ => raise error ("thy_containing_rls : rls '"^str^ + | _ => error ("thy_containing_rls : rls '"^str^ "' not in !rulset' und thy '"^thy'^"'"); if thy_containing_rls thy' rls' = ("IsacKnowledge", "Poly.thy") then () -else raise error "rewtools.sml: diff.behav. in thy_containing_rls 3"; +else error "rewtools.sml: diff.behav. in thy_containing_rls 3"; "----------- fun thy_containing_cal ------------------------------"; @@ -207,7 +207,7 @@ interSteps 1 ([1,1],Res); val ((pt,p),_) = get_calc 1; show_pt pt; if existpt' ([1,1,1], Frm) pt then () -else raise error "integrate.sml: interSteps on Rewrite_Set_Inst 1"; +else error "integrate.sml: interSteps on Rewrite_Set_Inst 1"; initContext 1 Thy_ ([1,1,1], Frm); --------------------TODO.new_c: cvs before 071227, 11:50*) @@ -241,7 +241,7 @@ val ContThm {thm,result,...} = context_thy (pt,p) tac; if thm = "thy_isac_Test-thm-radd_left_commute" andalso term2str result = "-2 + (1 + x) = 0" then () -else raise error"rewtools.sml initContext..Th_ thy_Test-thm-radd_left_commute"; +else error"rewtools.sml initContext..Th_ thy_Test-thm-radd_left_commute"; val p = ([3,1,1], Frm); val tac = Rewrite_Inst (["(bdv, x)"],("risolate_bdv_add","")); @@ -251,7 +251,7 @@ val ContThmInst {thm,result,...} = context_thy (pt,p) tac; if thm = "thy_isac_Test-thm-risolate_bdv_add" andalso term2str result = "x = 0 + -1 * -1" then () -else raise error "rewtools.sml initContext..Th_ thy_Test-thm-risolate_bdv_add"; +else error "rewtools.sml initContext..Th_ thy_Test-thm-risolate_bdv_add"; initContext 1 Thy_ ([2,5], Res); (*Res->Res, Calculate "plus" -2 + (1 + x) = 0 -> -1 + x = 0 @@ -270,7 +270,7 @@ val ContRls {rls,result,...} = context_thy (pt,p) tac; if rls = "thy_isac_Test-rls-Test_simplify" andalso term2str result = "-1 + x = 0" then () -else raise error "rewtools.sml initContext..Th_ thy_Test-thm-risolate_bdv_add"; +else error "rewtools.sml initContext..Th_ thy_Test-thm-risolate_bdv_add"; val p = ([3,1], Frm); val tac = Rewrite_Set_Inst (["(bdv, x)"],"isolate_bdv"); @@ -280,7 +280,7 @@ val ContRlsInst {rls,result,...} = context_thy (pt,p) tac; if rls = "thy_isac_Test-rls-isolate_bdv" andalso term2str result = "x = 0 + -1 * -1" then () -else raise error "rewtools.sml initContext..Th_ thy_Test-thm-risolate_bdv_add"; +else error "rewtools.sml initContext..Th_ thy_Test-thm-risolate_bdv_add"; @@ -297,7 +297,7 @@ val ContThm {thm,result,...} = context_thy (pt,p) tac; if thm = "thy_isac_Test-thm-radd_left_commute" andalso term2str result = "-2 + (1 + x) = 0" then () -else raise error "rewtools.sml checkContext.._ thy_Test-thm-radd_left_commute"; +else error "rewtools.sml checkContext.._ thy_Test-thm-radd_left_commute"; val p = ([3,1,1], Frm); val tac = Rewrite_Inst (["(bdv,x)"],("risolate_bdv_add","")); @@ -307,7 +307,7 @@ val ContThmInst {thm,result,...} = context_thy (pt,p) tac; if thm = "thy_isac_Test-thm-risolate_bdv_add" andalso term2str result = "x = 0 + -1 * -1" then () -else raise error "rewtools.sml checkContext..T_ thy_Test-thm-risolate_bdv_add"; +else error "rewtools.sml checkContext..T_ thy_Test-thm-risolate_bdv_add"; val p = ([2,5], Res); val tac = Calculate "plus"; @@ -332,7 +332,7 @@ val ContRls {rls,result,...} = context_thy (pt,p) tac; if rls = "thy_isac_Test-rls-Test_simplify" andalso term2str result = "-1 + x = 0" then () -else raise error "rewtools.sml checkContext..Thy_ thy_Test-rls-Test_simplify"; +else error "rewtools.sml checkContext..Thy_ thy_Test-rls-Test_simplify"; val p = ([3,1], Frm); val tac = Rewrite_Set_Inst (["(bdv, x)"],"isolate_bdv"); @@ -340,7 +340,7 @@ val ContRlsInst {rls,result,...} = context_thy (pt,p) tac; if rls = "thy_isac_Test-rls-isolate_bdv" andalso term2str result = "x = 0 + -1 * -1" then () -else raise error "rewtools.sml checkContext..Thy_ thy_Test-thm-isolate_bdv"; +else error "rewtools.sml checkContext..Thy_ thy_Test-thm-isolate_bdv"; "----------- checkContext..Thy_ on last formula ------------------"; @@ -387,7 +387,7 @@ val xstr = takerest (5, rest'); if guh2theID guh = ["IsacScripts", "ListG", "Theorems", "zip_Nil"] then () -else raise error "rewtools.sml: guh2theID thy_scri_ListG-thm-zip_Nil changed"; +else error "rewtools.sml: guh2theID thy_scri_ListG-thm-zip_Nil changed"; "----------- debugging on Tests/solve_linear_as_rootpbl ----------"; @@ -405,13 +405,13 @@ autoCalculate 1 (Step 1); val (ptp as (pt,p), tacis) = get_calc 1; show_pt pt; if is_curr_endof_calc pt ([1],Frm) then () -else raise error "rewtools.sml is_curr_endof_calc ([1],Frm)"; +else error "rewtools.sml is_curr_endof_calc ([1],Frm)"; autoCalculate 1 (Step 1); val (ptp as (pt,p), tacis) = get_calc 1; show_pt pt; if not (is_curr_endof_calc pt ([1],Frm)) then () -else raise error "rewtools.sml is_curr_endof_calc ([1],Frm) not"; +else error "rewtools.sml is_curr_endof_calc ([1],Frm) not"; if is_curr_endof_calc pt ([1],Res) then () -else raise error "rewtools.sml is_curr_endof_calc ([1],Res)"; +else error "rewtools.sml is_curr_endof_calc ([1],Res)"; initContext 1 Thy_ ([1],Res); @@ -473,7 +473,7 @@ "----- thus we repair the [.] in string_of_thmI..."; val thm = ((num_str o (get_thm thy)) (implode id)) RS sym; if string_of_thmI thm = "(?b1 = ?a1) = (- ?b1 = - ?a1)" then () -else raise error ("rewtools.sml: string_of_thmI " ^ string_of_thm thm ^ +else error ("rewtools.sml: string_of_thmI " ^ string_of_thm thm ^ " = " ^ string_of_thmI thm); @@ -496,7 +496,7 @@ val ((pt,(p,p_)), _) = get_calc 1; show_pt pt; if get_obj g_tac pt p = Rewrite ("sym_real_minus_eq_cancel", "(?b1 = ?a1) = (- ?b1 = - ?a1)") then () -else raise error "rewtools.sml: string_of_thmI ?!?"; +else error "rewtools.sml: string_of_thmI ?!?"; getTactic 1 ([1],Frm); @@ -514,7 +514,7 @@ [Rewrite ("radd_commute", "?m + ?n = ?n + ?m"), Rewrite ("radd_assoc", "?m + ?n + ?k = ?m + (?n + ?k)"), Calculate "plus"] then () -else raise error "rewtools.sml filter_appl_rews a + z + 2*a + 3*z + 5 + 6"; +else error "rewtools.sml filter_appl_rews a + z + 2*a + 3*z + 5 + 6"; "----------- fun is_contained_in ---------------------------------"; @@ -522,12 +522,12 @@ "----------- fun is_contained_in ---------------------------------"; val r1 = Thm ("real_diff_minus",num_str @{thm real_diff_minus}); if contains_rule r1 Test_simplify then () -else raise error "rewtools.sml contains_rule Thm"; +else error "rewtools.sml contains_rule Thm"; val r1 = Calc ("Groups.plus_class.plus", eval_binop "#add_"); if contains_rule r1 Test_simplify then () -else raise error "rewtools.sml contains_rule Calc"; +else error "rewtools.sml contains_rule Calc"; val r1 = Calc ("Groups.minus_class.minus", eval_binop "#add_"); if not (contains_rule r1 Test_simplify) then () -else raise error "rewtools.sml contains_rule Calc"; +else error "rewtools.sml contains_rule Calc"; diff -r 95d956108461 -r 460c24a6a6ba test/Tools/isac/Interpret/script.sml --- a/test/Tools/isac/Interpret/script.sml Tue Sep 28 08:58:06 2010 +0200 +++ b/test/Tools/isac/Interpret/script.sml Tue Sep 28 09:06:56 2010 +0200 @@ -75,7 +75,7 @@ atomty sc'; val {scr=Script sc,...} = get_met ["IntegrierenUndKonstanteBestimmen"]; (*--------------------------------------------------------------------- -if sc = sc' then () else raise error"script.sml, doesnt find Substitute #1"; +if sc = sc' then () else error"script.sml, doesnt find Substitute #1"; ---------------------------------------------------------------------*) val fmz = ["Traegerlaenge L", @@ -97,7 +97,7 @@ val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; case nxt of (_, Apply_Method ["IntegrierenUndKonstanteBestimmen"]) => () - | _ => raise error "script.sml, doesnt find Substitute #2"; + | _ => error "script.sml, doesnt find Substitute #2"; val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f; (* *** generate1: not impl.for Substitute' !!!!!!!!!!(*#1#*)!!!!!!!!!!!*) (* val nxt = ("Check_Postcond",.. !!!!!!!!!!!!!!!!!!!(*#2#*)!!!!!!!!!!!*) @@ -109,7 +109,7 @@ val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f; (*---------------------------------------------------------------------*) case nxt of (_, End_Proof') => () - | _ => raise error "script.sml, doesnt find Substitute #3"; + | _ => error "script.sml, doesnt find Substitute #3"; (*---------------------------------------------------------------------*) (*the reason, that next_tac didnt find the 2nd Substitute, was that the Take inbetween was missing, and thus the 2nd Substitute was applied @@ -151,7 +151,7 @@ val {scr=Script sc,...} = get_met ["IntegrierenUndKonstanteBestimmen"]; (*--------------------------------------------------------------------- -if sc = sc' then () else raise error"script.sml, doesnt find Substitute #1"; +if sc = sc' then () else error"script.sml, doesnt find Substitute #1"; ---------------------------------------------------------------------*) val fmz = ["Traegerlaenge L", "Streckenlast (- q_0 * x^^^2 / 2 + x * c + c_2)", @@ -172,7 +172,7 @@ val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; case nxt of (_, Apply_Method ["IntegrierenUndKonstanteBestimmen"]) => () - | _ => raise error "script.sml, doesnt find Substitute #2"; + | _ => error "script.sml, doesnt find Substitute #2"; trace_rewrite:=true; val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f(*------------------------*); trace_rewrite:=false; @@ -195,7 +195,7 @@ val e1__ = str2term"nth_ 1 [M_b 0 = 0, M_b L = 0]"; val e1__ = eval_listexpr_ Biegelinie.thy srls e1__; term2str e1__; if term2str e1__ = "M_b 0 = 0" then () else -raise error"script.sml diff.beh. eval_listexpr_ nth_ 1 [..."; +error"script.sml diff.beh. eval_listexpr_ nth_ 1 [..."; (*TODO.WN050913 ??? doesnt eval_listexpr_ go into subterms ???... val x1__ = str2term"argument_in (lhs (M_b 0 = 0))"; @@ -235,7 +235,7 @@ [Rewrite ("radd_commute", "?m + ?n = ?n + ?m"), Rewrite ("radd_assoc", "?m + ?n + ?k = ?m + (?n + ?k)"), Calculate "times"] then () -else raise error "script.sml fun sel_appl_atomic_tacs diff.behav."; +else error "script.sml fun sel_appl_atomic_tacs diff.behav."; trace_script := true; trace_script := false; diff -r 95d956108461 -r 460c24a6a6ba test/Tools/isac/Interpret/solve.sml --- a/test/Tools/isac/Interpret/solve.sml Tue Sep 28 08:58:06 2010 +0200 +++ b/test/Tools/isac/Interpret/solve.sml Tue Sep 28 09:06:56 2010 +0200 @@ -52,7 +52,7 @@ (*with "Script SimplifyScript (t_::real) = ----------------- \ ((Rewrite_Set norm_Rational False) t_)" case pt of Nd (PblObj _, [Nd _]) => ((*met only applies norm_Rational*)) - | _ => raise error "solve.sml: interSteps on norm_Rational 1"; + | _ => error "solve.sml: interSteps on norm_Rational 1"; interSteps 1 ([1], Res); getFormulaeFromTo 1 ([1], Frm) ([1,12], Res) 99999 false; interSteps 1 ([1,3], Res); @@ -68,7 +68,7 @@ --------------------------------------------------------------------*) case pt of Nd (PblObj _, [Nd _, Nd _, Nd _, Nd _, Nd _, Nd _]) => () - | _ => raise error "solve.sml: interSteps on norm_Rational 1"; + | _ => error "solve.sml: interSteps on norm_Rational 1"; (*these have been done now by the script ^^^ immediately... interSteps 1 ([1], Res); getFormulaeFromTo 1 ([1], Frm) ([1,12], Res) 99999 false; @@ -84,7 +84,7 @@ case (term2str form, tac, terms2strs asm) of ("1 / 2", Check_Postcond ["rational", "simplification"], ["-36 * x + 4 * x ^^^ 3 ~= 0"]) => () - | _ => raise error "solve.sml: interSteps on norm_Rational 2"; + | _ => error "solve.sml: interSteps on norm_Rational 2"; @@ -161,7 +161,7 @@ val (p,_,f,nxt,_,pt) = me nxt p [] pt; (*"(3 + -1 * x) / (3 + x)"*) if nxt = ("End_Proof'",End_Proof') then () -else raise error "details.sml, changed behaviour in: without detail"; +else error "details.sml, changed behaviour in: without detail"; val str = pr_ptree pr_short pt; writeln str; @@ -218,7 +218,7 @@ val (p,_,f,nxt,_,pt) = me nxt p [] pt; if f = Form' (FormKF (~1,EdUndef,0,Nundef,"(3 - x) / (3 + x)")) andalso nxt = ("End_Proof'",End_Proof') then () -else raise error "new behaviour in details.sml, \ +else error "new behaviour in details.sml, \ \cancel, rev-rew (cancel) afterwards"; FIXXXXXME.040216 #####################################################*) @@ -273,7 +273,7 @@ val (p,_,f,nxt,_,pt) = me nxt p [] pt; (*"(3 + -1 * x) / (3 + x)"*) if nxt = ("End_Proof'",End_Proof') then () -else raise error "details.sml, changed behaviour in: cancel_p, without detail"; +else error "details.sml, changed behaviour in: cancel_p, without detail"; "-------------- cancel_p, detail rev-rew (cancel) afterwards ----------"; "-------------- cancel_p, detail rev-rew (cancel) afterwards ----------"; @@ -328,7 +328,7 @@ val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt; if nxt = ("End_Detail",End_Detail) then () - else raise error "details.sml: new behav. in Detail make_polynomial"; + else error "details.sml: new behav. in Detail make_polynomial"; ----------------------------------------------------------------------*) (*--------------- @@ -346,7 +346,7 @@ val (p,_,f,nxt,_,pt) = me nxt p [] pt; if f = Form' (FormKF (~1,EdUndef,0,Nundef,"(3 + x) / (3 - x)")) andalso nxt = ("End_Proof'",End_Proof') then () -else raise error "new behaviour in details.sml, cancel_p afterwards"; +else error "new behaviour in details.sml, cancel_p afterwards"; ----------------*) @@ -401,8 +401,8 @@ val ("donesteps",_(*,ss*), lastpos) = detailstep pt ip; (*case ss of [(_,_,t1),(_,_,t2),(_,_,t3),(_,_,t4),(_,_,t5),(_,_,t6)] => (writeln o terms2str) [t1,t2,t3,t4,t5,t6] - | _ => raise error "details.sml: diff.behav. in detail miniscript";*) if lastpos = ([4], Res) then () - else raise error "details.sml: diff.behav. in interSteps'donesteps' 1"; + | _ => error "details.sml: diff.behav. in detail miniscript";*) if lastpos = ([4], Res) then () + else error "details.sml: diff.behav. in interSteps'donesteps' 1"; moveActiveDown 1; moveActiveDown 1; @@ -414,8 +414,8 @@ val ("donesteps",_(*,ss*), lastpos) = detailstep pt ip; (*case ss of [(_,_,t1),(_,_,t2),(_,_,t3)] => (writeln o terms2str) [t1,t2,t3] - | _ => raise error "details.sml: diff.behav. in detail miniscript";*) if lastpos = ([3, 2], Res) then () - else raise error "details.sml: diff.behav. in interSteps'donesteps' 1"; + | _ => error "details.sml: diff.behav. in detail miniscript";*) if lastpos = ([3, 2], Res) then () + else error "details.sml: diff.behav. in interSteps'donesteps' 1"; (* val [(_,(((pt,_),_),[(_,ip)]))] = !states; @@ -446,7 +446,7 @@ interSteps 1 ([2],Res); val [(_,(((pt,_),_),[(_,(p,_))]))] = !states; if length (children (get_nd pt p)) = 6 then () - else raise error "details.sml: diff.behav. in interSteps'detailrls' 1"; + else error "details.sml: diff.behav. in interSteps'detailrls' 1"; moveActiveDown 1; moveActiveDown 1; refFormula 1 (get_pos 1 1); (* 3,1 Frm, -1 + x = 0 *); @@ -454,7 +454,7 @@ interSteps 1 ([3,1],Frm) (* first formula on level has NO detail x = 0 + -1 * -1 *) @@ -471,7 +471,7 @@ interSteps 1 ([3,2],Res); val [(_,(((pt,_),_),[(_,(p,_))]))] = !states; if length (children (get_nd pt p)) = 2 then () - else raise error "details.sml: diff.behav. in interSteps'detailrls' 3"; + else error "details.sml: diff.behav. in interSteps'detailrls' 3"; val ((pt,p),_) = get_calc 1; show_pt pt; @@ -498,7 +498,7 @@ val ((pt,p),_) = get_calc 1; show_pt pt; val (_,_,lastpos) =detailstep pt p; if p = ([2], Res) andalso lastpos = ([2, 9], Res) then () -else raise error "solve.sml: diff.beh. after appendFormula x - 1 = 0"; +else error "solve.sml: diff.beh. after appendFormula x - 1 = 0"; "------ Detail_Set -----------------------------------------------"; diff -r 95d956108461 -r 460c24a6a6ba test/Tools/isac/Knowledge/algein.sml --- a/test/Tools/isac/Knowledge/algein.sml Tue Sep 28 08:58:06 2010 +0200 +++ b/test/Tools/isac/Knowledge/algein.sml Tue Sep 28 09:06:56 2010 +0200 @@ -88,14 +88,14 @@ val (p,_,f,nxt,_,pt) = me nxt p c pt(*Rewrite_Set "norm_Rational"*);f2str f; val (p,_,f,nxt,_,pt) = me nxt p c pt(**); if f2str f = "L = 32 + senkrecht + unten" then () -else raise error "algein.sml diff.behav. in erstSymbolisch 1"; +else error "algein.sml diff.behav. in erstSymbolisch 1"; val (p,_,f,nxt,_,pt) = me nxt p c pt;val(p,_,f,nxt,_,pt)=me nxt p c pt;f2str f; val (p,_,f,nxt,_,pt) = me nxt p c pt;val(p,_,f,nxt,_,pt)=me nxt p c pt;f2str f; val (p,_,f,nxt,_,pt) = me nxt p c pt;val(p,_,f,nxt,_,pt)=me nxt p c pt;f2str f; val (p,_,f,nxt,_,pt) = me nxt p c pt;val(p,_,f,nxt,_,pt)=me nxt p c pt;f2str f; val (p,_,f,nxt,_,pt) = me nxt p c pt; if f2str f = "L = 104" andalso nxt = ("End_Proof'", End_Proof') then () -else raise error "algein.sml diff.behav. in erstSymbolisch 99"; +else error "algein.sml diff.behav. in erstSymbolisch 99"; "----------- auto 'Berechnung' 'erstSymbolisch' ------------------"; @@ -115,7 +115,7 @@ autoCalculate 1 CompleteCalc; val ((pt,p),_) = get_calc 1; show_pt pt; if p = ([], Res) andalso term2str (get_obj g_res pt (fst p)) = "L = 104" then() -else raise error "algein.sml: 'Berechnung' 'erstSymbolisch' changed"; +else error "algein.sml: 'Berechnung' 'erstSymbolisch' changed"; (* show_pt pt; diff -r 95d956108461 -r 460c24a6a6ba test/Tools/isac/Knowledge/atools.sml --- a/test/Tools/isac/Knowledge/atools.sml Tue Sep 28 08:58:06 2010 +0200 +++ b/test/Tools/isac/Knowledge/atools.sml Tue Sep 28 09:06:56 2010 +0200 @@ -26,12 +26,12 @@ fun str2term str = (term_of o the o (parse thy )) str; fun term2s t = Syntax.string_of_term (thy2ctxt thy) t; val t = str2term "x"; -if occurs_in t t then "OK" else raise error "atools.sml: occurs_in x x -> f"; +if occurs_in t t then "OK" else error "atools.sml: occurs_in x x -> f"; val t = str2term "x occurs_in x"; val SOME (str, t') = eval_occurs_in 0 "Atools.occurs'_in" t 0; if (term2s t') = "x occurs_in x = True" then () -else raise error "atools.sml: x occurs_in x = True ???"; +else error "atools.sml: x occurs_in x = True ???"; "------- some_occur_in"; some_occur_in [str2term"c",str2term"c_2"] (str2term"a + b + c"); @@ -40,14 +40,14 @@ val SOME (str,t') = eval_some_occur_in 0 "Atools.some'_occur'_in" t 0; if term2str t' = "some_of [c, c_2, c_3, c_4] occur_in -1 * q_0 * L ^^^ 2 / 2 + L * c + c_2 =\nTrue" then () -else raise error "atools.sml: some_occur_in true"; +else error "atools.sml: some_occur_in true"; val t = str2term "some_of [c_3, c_4] occur_in \ \-1 * q_0 * L ^^^ 2 / 2 + L * c + c_2"; val SOME (str,t') = eval_some_occur_in 0 "Atools.some'_occur'_in" t 0; if term2str t' = "some_of [c_3, c_4] occur_in -1 * q_0 * L ^^^ 2 / 2 + L * c + c_2 = False" then () -else raise error "atools.sml: some_occur_in false"; +else error "atools.sml: some_occur_in false"; "----------- argument_of -----------------------------------------"; @@ -56,7 +56,7 @@ val t = str2term "argument_in (M_b x)"; val SOME (str, t') = eval_argument_in 0 "Atools.argument'_in" t 0; if term2s t' = "(argument_in M_b x) = x" then () -else raise error "atools.sml:(argument_in M_b x) = x ???"; +else error "atools.sml:(argument_in M_b x) = x ???"; "----------- sameFunId -------------------------------------------"; "----------- sameFunId -------------------------------------------"; @@ -91,7 +91,7 @@ \[M_b x = c + L*x, y' x = c + L*x, y x = c + L*x]"; val SOME (str, es) = eval_filter_sameFunId "" "Atools.filter'_sameFunId" p ""; if term2str es = "(filter_sameFunId y' L [M_b x = c + L * x, y' x = c + L * x,\n y x = c + L * x]) =\n[y' x = c + L * x]" then () -else raise error "atools.slm diff.behav. in filter_sameFunId"; +else error "atools.slm diff.behav. in filter_sameFunId"; "----------- boollist2sum ----------------------------------------"; @@ -114,7 +114,7 @@ val SOME (str, pred) = eval_boollist2sum "" "Atools.boollist2sum" t ""; if term2str pred = "boollist2sum\n [b1 = k - 2 * q, b2 = k - 2 * q, b3 = k - 2 * q, b4 = k - 2 * q] =\nb1 + b2 + b3 + b4" then () -else raise error "atools.sml diff.behav. in eval_boollist2sum"; +else error "atools.sml diff.behav. in eval_boollist2sum"; trace_rewrite:=true; val srls_ = append_rls "srls_..Berechnung-erstSymbolisch" e_rls @@ -122,7 +122,7 @@ val t = str2term "boollist2sum [b1 = k - 2*q, b2 = k - 2*q, b3 = k - 2*q, b4 = k - 2*q]"; case rewrite_set_ thy false srls_ t of SOME _ => () -| _ => raise error "atools.sml diff.rewrite boollist2sum"; +| _ => error "atools.sml diff.rewrite boollist2sum"; trace_rewrite:=false; diff -r 95d956108461 -r 460c24a6a6ba test/Tools/isac/Knowledge/biegelinie.sml --- a/test/Tools/isac/Knowledge/biegelinie.sml Tue Sep 28 08:58:06 2010 +0200 +++ b/test/Tools/isac/Knowledge/biegelinie.sml Tue Sep 28 09:06:56 2010 +0200 @@ -37,16 +37,16 @@ val t = rewrit Belastung_Querkraft (str2term "- q_ x = - q_0"); term2s t; if term2s t = "Q' x = - q_0" then () -else raise error "/biegelinie.sml: Belastung_Querkraft"; +else error "/biegelinie.sml: Belastung_Querkraft"; val t = rewrit Querkraft_Moment (str2term "Q x = - q_0 * x + c"); term2s t; if term2s t = "M_b' x = - q_0 * x + c" then () -else raise error "/biegelinie.sml: Querkraft_Moment"; +else error "/biegelinie.sml: Querkraft_Moment"; val t = rewrit Moment_Neigung (str2term "M_b x = -q_0 * x^^^2/2 + q_0/2 *L*x"); term2s t; if term2s t = "- EI * y'' x = - q_0 * x ^^^ 2 / 2 + q_0 / 2 * L * x" then () -else raise error "biegelinie.sml: Moment_Neigung"; +else error "biegelinie.sml: Moment_Neigung"; "----------- Script [IntegrierenUndKonstanteBestimmen] -----------"; @@ -160,13 +160,13 @@ rewrite_set_ thy false srls (str2term"(nth_::[real,bool list]=>bool) 1 " $ rm_); if term2str e1__ = "M_b 0 = 0" then () -else raise error "biegelinie.sml simplify nth_ 1 rm_"; +else error "biegelinie.sml simplify nth_ 1 rm_"; val SOME (x1__,_) = rewrite_set_ thy false srls (str2term"argument_in (lhs (M_b 0 = 0))"); if term2str x1__ = "0" then () -else raise error "biegelinie.sml simplify argument_in (lhs (M_b 0 = 0)"; +else error "biegelinie.sml simplify argument_in (lhs (M_b 0 = 0)"; trace_rewrite:=true; trace_rewrite:=false; @@ -195,69 +195,69 @@ (*if itms2str_ ctxt pits = ... all 5 model-items*) val mits = get_obj g_met pt (fst p); writeln (itms2str_ ctxt mits); if itms2str_ ctxt mits = "[]" then () -else raise error "biegelinie.sml: Bsp 7.27 #2"; +else error "biegelinie.sml: Bsp 7.27 #2"; val (p,_,f,nxt,_,pt) = me nxt p c pt; case nxt of (_,Add_Given "FunktionsVariable x") => () - | _ => raise error "biegelinie.sml: Bsp 7.27 #4a"; + | _ => error "biegelinie.sml: Bsp 7.27 #4a"; val (p,_,f,nxt,_,pt) = me nxt p c pt; val mits = get_obj g_met pt (fst p);writeln (itms2str_ ctxt mits); (*if itms2str_ ctxt mits = ... all 6 guard-items*) case nxt of (_, Apply_Method ["IntegrierenUndKonstanteBestimmen"]) => () - | _ => raise error "biegelinie.sml: Bsp 7.27 #4b"; + | _ => error "biegelinie.sml: Bsp 7.27 #4b"; val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f; case pt of Nd (PblObj _, [Nd _]) => ((*Apply_Method + Take*)) - | _ => raise error "biegelinie.sml: Bsp 7.27 #4c"; + | _ => error "biegelinie.sml: Bsp 7.27 #4c"; val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f; val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f; case nxt of (_,Subproblem ("Biegelinie", ["named", "integrate", "function"])) => () - | _ => raise error "biegelinie.sml: Bsp 7.27 #4c"; + | _ => error "biegelinie.sml: Bsp 7.27 #4c"; val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt; case nxt of (_, Apply_Method ["diff", "integration", "named"]) => () - | _ => raise error "biegelinie.sml: Bsp 7.27 #5"; + | _ => error "biegelinie.sml: Bsp 7.27 #5"; val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f; val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f; val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f; case nxt of ("Check_Postcond", Check_Postcond ["named", "integrate", "function"]) => () - | _ => raise error "biegelinie.sml: Bsp 7.27 #5a"; + | _ => error "biegelinie.sml: Bsp 7.27 #5a"; val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f; val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f; case nxt of (_, Subproblem ("Biegelinie", ["named", "integrate", "function"]))=>() - | _ => raise error "biegelinie.sml: Bsp 7.27 #5b"; + | _ => error "biegelinie.sml: Bsp 7.27 #5b"; val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt; case nxt of (_, Apply_Method ["diff", "integration","named"]) => () - | _ => raise error "biegelinie.sml: Bsp 7.27 #6"; + | _ => error "biegelinie.sml: Bsp 7.27 #6"; val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f; val (p,_,f,nxt,_,pt) = me nxt p c pt(*nxt = Check_Postcond ["named", "int..*); f2str f; val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f; case nxt of (_, Substitute ["x = 0"]) => () - | _ => raise error "biegelinie.sml: Bsp 7.27 #7"; + | _ => error "biegelinie.sml: Bsp 7.27 #7"; val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f; val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f; if f2str f = "0 = c_2 + c * 0 + -1 * q_0 / 2 * 0 ^^^ 2" then () -else raise error "biegelinie.sml: Bsp 7.27 #8"; +else error "biegelinie.sml: Bsp 7.27 #8"; val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f; val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f; val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f; if f2str f = "0 = c_2 + c * L + -1 * q_0 / 2 * L ^^^ 2" then () -else raise error "biegelinie.sml: Bsp 7.27 #9"; +else error "biegelinie.sml: Bsp 7.27 #9"; (*val nxt = (+, Subproblem ("Biegelinie", ["normalize", ..lin..sys]))*) val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt; @@ -266,7 +266,7 @@ val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; case nxt of (_, Apply_Method ["EqSystem", "normalize", "2x2"]) => () - | _ => raise error "biegelinie.sml: Bsp 7.27 #10"; + | _ => error "biegelinie.sml: Bsp 7.27 #10"; val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f; val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f; @@ -279,7 +279,7 @@ val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt; case nxt of (_, Apply_Method["EqSystem", "top_down_substitution", "2x2"]) => () - | _ => raise error "biegelinie.sml: Bsp 7.27 #11"; + | _ => error "biegelinie.sml: Bsp 7.27 #11"; val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f; val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f; val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f; @@ -290,7 +290,7 @@ val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f; val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f; case nxt of (_, Check_Postcond ["normalize", "2x2", "linear", "system"]) => () - | _ => raise error "biegelinie.sml: Bsp 7.27 #12"; + | _ => error "biegelinie.sml: Bsp 7.27 #12"; val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f; val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f; @@ -300,46 +300,46 @@ val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f; case nxt of (_, Subproblem ("Biegelinie", ["named", "integrate", "function"]))=>() - | _ => raise error "biegelinie.sml: Bsp 7.27 #13"; + | _ => error "biegelinie.sml: Bsp 7.27 #13"; val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt; case nxt of (_, Apply_Method ["diff", "integration", "named"]) => () - | _ => raise error "biegelinie.sml: Bsp 7.27 #14"; + | _ => error "biegelinie.sml: Bsp 7.27 #14"; val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f; val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f; val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f; case nxt of (_, Check_Postcond ["named", "integrate", "function"]) => () - | _ => raise error "biegelinie.sml: Bsp 7.27 #15"; + | _ => error "biegelinie.sml: Bsp 7.27 #15"; val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f; if f2str f = "y' x = c + 1 / (-1 * EI) * (L * q_0 / 4 * x ^^^ 2 + -1 * q_0 / 6 * x ^^^ 3)" -then () else raise error "biegelinie.sml: Bsp 7.27 #16 f"; +then () else error "biegelinie.sml: Bsp 7.27 #16 f"; case nxt of (_, Subproblem ("Biegelinie", ["named", "integrate", "function"]))=>() - | _ => raise error "biegelinie.sml: Bsp 7.27 #16"; + | _ => error "biegelinie.sml: Bsp 7.27 #16"; val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt; case nxt of (_, Apply_Method ["diff", "integration", "named"]) => () - | _ => raise error "biegelinie.sml: Bsp 7.27 #17"; + | _ => error "biegelinie.sml: Bsp 7.27 #17"; val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f; val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f; if f2str f = "y x =\nc_2 + c * x +\n\ \1 / (-1 * EI) * (L * q_0 / 12 * x ^^^ 3 + -1 * q_0 / 24 * x ^^^ 4)" -then () else raise error "biegelinie.sml: Bsp 7.27 #18 f"; +then () else error "biegelinie.sml: Bsp 7.27 #18 f"; case nxt of (_, Check_Postcond ["named", "integrate", "function"]) => () - | _ => raise error "biegelinie.sml: Bsp 7.27 #18"; + | _ => error "biegelinie.sml: Bsp 7.27 #18"; val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f; val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f; @@ -350,32 +350,32 @@ case nxt of (_, Subproblem ("Biegelinie", ["normalize", "2x2", "linear", "system"])) => () - | _ => raise error "biegelinie.sml: Bsp 7.27 #19"; + | _ => error "biegelinie.sml: Bsp 7.27 #19"; val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; case nxt of (_, Apply_Method ["EqSystem", "normalize", "2x2"]) => () - | _ => raise error "biegelinie.sml: Bsp 7.27 #20"; + | _ => error "biegelinie.sml: Bsp 7.27 #20"; val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f; val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f; val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f; val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f; val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f; if f2str f = "[c_2 = 0, L * c + c_2 = -1 * q_0 * L ^^^ 4 / (-24 * EI)]" then () -else raise error "biegelinie.sml: Bsp 7.27 #21 f"; +else error "biegelinie.sml: Bsp 7.27 #21 f"; case nxt of (_, Subproblem ("Biegelinie", ["triangular", "2x2", "linear", "system"])) =>() - | _ => raise error "biegelinie.sml: Bsp 7.27 #21"; + | _ => error "biegelinie.sml: Bsp 7.27 #21"; val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; case nxt of (_, Apply_Method["EqSystem", "top_down_substitution", "2x2"]) => () - | _ => raise error "biegelinie.sml: Bsp 7.27 #22"; + | _ => error "biegelinie.sml: Bsp 7.27 #22"; val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f; val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f; val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f; @@ -386,7 +386,7 @@ val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f; val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f; case nxt of (_, Check_Postcond ["normalize", "2x2", "linear", "system"]) => () - | _ => raise error "biegelinie.sml: Bsp 7.27 #23"; + | _ => error "biegelinie.sml: Bsp 7.27 #23"; val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f; val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f; @@ -397,9 +397,9 @@ "y x =\n-1 * q_0 * L ^^^ 4 / (-24 * EI * L) * x +\n\ \(2 * L * q_0 / (-1 * 24 * EI) * x ^^^ 3 +\n\ \ -1 * q_0 / (-1 * 24 * EI) * x ^^^ 4)" then () -else raise error "biegelinie.sml: Bsp 7.27 #24 f"; +else error "biegelinie.sml: Bsp 7.27 #24 f"; case nxt of ("End_Proof'", End_Proof') => () - | _ => raise error "biegelinie.sml: Bsp 7.27 #24"; + | _ => error "biegelinie.sml: Bsp 7.27 #24"; (* use"../smltest/IsacKnowledge/biegelinie.sml"; *) @@ -469,14 +469,14 @@ autoCalculate 1 (Step 1) (*->GENERATED ([1], Frm)*); val ((pt,_),_) = get_calc 1; case pt of Nd (PblObj _, [Nd _]) => ((*Apply_Method + Take*)) - | _ => raise error "biegelinie.sml: Bsp 7.27 autoCalculate#4c"; + | _ => error "biegelinie.sml: Bsp 7.27 autoCalculate#4c"; autoCalculate 1 CompleteCalc; val ((pt,p),_) = get_calc 1; if p = ([], Res) andalso length (children pt) = 23 andalso term2str (get_obj g_res pt (fst p)) = "y x =\n-1 * q_0 * L ^^^ 4 / (-24 * EI * L) * x +\n(2 * L * q_0 / (-1 * 24 * EI) * x ^^^ 3 +\n -1 * q_0 / (-1 * 24 * EI) * x ^^^ 4)" -then () else raise error "biegelinie.sml: 1st biegelin.7.27 changed"; +then () else error "biegelinie.sml: 1st biegelin.7.27 changed"; val (unc, del, gen) = (([],Pbl), ([],Pbl), ([],Res)); getFormulaeFromTo 1 unc gen 1 (*only level 1*) false; @@ -509,13 +509,13 @@ val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt; if nxt = ("Apply_Method", Apply_Method ["Biegelinien", "ausBelastung"]) -then () else raise error "biegelinie.sml met2 b"; +then () else error "biegelinie.sml met2 b"; val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f = "q_ x = q_0"; val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f = "- q_ x = - q_0"; val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f = "Q' x = - q_0"; case nxt of (_, Subproblem (_, ["named", "integrate", "function"])) => () -| _ => raise error "biegelinie.sml met2 c"; +| _ => error "biegelinie.sml met2 c"; val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt; @@ -527,7 +527,7 @@ val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f = "Q x = c + -1 * q_0 * x"; val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f = "M_b' x = c + -1 * q_0 * x"; case nxt of (_,Subproblem (_, ["named", "integrate", "function"])) => () -| _ => raise error "biegelinie.sml met2 d"; +| _ => error "biegelinie.sml met2 d"; val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt; @@ -568,7 +568,7 @@ val (p,_,f,nxt,_,pt) = me nxt p c pt; if nxt = ("End_Proof'", End_Proof') andalso f2str f = "[Q x = c + -1 * q_0 * x, M_b x = c_2 + c * x + -1 * q_0 / 2 * x ^^^ 2,\n y' x =\n c_3 + 1 / (-1 * EI) * (c_2 * x + c / 2 * x ^^^ 2 + -1 * q_0 / 6 * x ^^^ 3),\n y x =\n c_4 + c_3 * x +\n 1 / (-1 * EI) *\n (c_2 / 2 * x ^^^ 2 + c / 6 * x ^^^ 3 + -1 * q_0 / 24 * x ^^^ 4)]" then () -else raise error "biegelinie.sml met2 e"; +else error "biegelinie.sml met2 e"; @@ -639,7 +639,7 @@ (* f2str f = "0 = c_2 + L * c + -1 * q_0 / 2 * L ^^^ 2" CHANGE NOT considered, already on leave*) f2str f = "0 = (2 * c_2 + 2 * L * c + -1 * L ^^^ 2 * q_0) / 2" -then () else raise error "biegelinie.sml: SubProblem (_,[setzeRandbed"; +then () else error "biegelinie.sml: SubProblem (_,[setzeRandbed"; "----------- method [Biegelinien,setzeRandbedingungenEin] + exec -"; @@ -724,7 +724,7 @@ val screxp1 = subst_atomic [(rb_, rb)] screxp1_; term2str screxp1; val SOME (b1,_) = rewrite_set_ Isac.thy false srls2 screxp1; term2str b1; if term2str b1 = "Take (y 0 = 0)" then () -else raise error "biegelinie.sml: rew. Bieglie2 --1"; +else error "biegelinie.sml: rew. Bieglie2 --1"; val b1 = str2term "(y 0 = 0)"; "--- script expression 2"; @@ -733,7 +733,7 @@ val screxp2 = subst_atomic [(b1_,b1),(funs_,funs)] screxp2_; term2str screxp2; val SOME (fs,_) = rewrite_set_ Isac.thy false srls2 screxp2; term2str fs; if term2str fs = "[y x =\n c_4 + c_3 * x +\n 1 / (-1 * EI) *\n (c_2 / 2 * x ^^^ 2 + c / 6 * x ^^^ 3 + -1 * q_0 / 24 * x ^^^ 4)]" then () -else raise error "biegelinie.sml: rew. Bieglie2 --2"; +else error "biegelinie.sml: rew. Bieglie2 --2"; "--- script expression 3"; val screxp3_ = str2term "SubProblem (Biegelinie_,[makeFunctionTo,equation],\ @@ -744,7 +744,7 @@ writeln (term2str screxp3); val SOME (equ,_) = rewrite_set_ Isac.thy false srls2 screxp3; if term2str equ = "SubProblem\n (Biegelinie_, [makeFunctionTo, equation], [Equation, fromFunction])\n [BOOL\n (y x =\n c_4 + c_3 * x +\n 1 / (-1 * EI) *\n (c_2 / 2 * x ^^^ 2 + c / 6 * x ^^^ 3 + -1 * q_0 / 24 * x ^^^ 4)),\n BOOL (y 0 = 0)]" then () -else raise error "biegelinie.sml: rew. Bieglie2 --3"; +else error "biegelinie.sml: rew. Bieglie2 --3"; writeln (term2str equ); (*SubProblem (Biegelinie_, [makeFunctionTo, equation], [Equation, fromFunction]) @@ -776,13 +776,13 @@ "--- before 1.subpbl [Equation, fromFunction]"; val (p,_,f,nxt,_,pt) = me nxt p c pt; case nxt of (_, Apply_Method ["Biegelinien", "setzeRandbedingungenEin"])=>() -| _ => raise error "biegelinie.sml: met setzeRandbed*Ein aa"; +| _ => error "biegelinie.sml: met setzeRandbed*Ein aa"; "----- Randbedingung y 0 = 0 in SUBpbl with met [Equation, fromFunction]"; val (p,_,f,nxt,_,pt) = me nxt p c pt; if (#1 o (get_obj g_fmz pt)) (fst p) = ["functionEq\n (y x =\n c_4 + c_3 * x +\n 1 / (-1 * EI) *\n (c_2 / 2 * x ^^^ 2 + c / 6 * x ^^^ 3 + -1 * q_0 / 24 * x ^^^ 4))", "substitution (y 0 = 0)", "equality equ___"] then () -else raise error "biegelinie.sml met setzeRandbed*Ein bb"; +else error "biegelinie.sml met setzeRandbed*Ein bb"; (writeln o istate2str) (get_istate pt p); "--- after 1.subpbl [Equation, fromFunction]"; @@ -791,46 +791,46 @@ val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt; case nxt of (_, Apply_Method["Equation", "fromFunction"]) => () -| _ => raise error "biegelinie.sml met2 ff"; +| _ => error "biegelinie.sml met2 ff"; val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f = "y x =\nc_4 + c_3 * x +\n1 / (-1 * EI) *\n(c_2 / 2 * x ^^^ 2 + c / 6 * x ^^^ 3 + -1 * q_0 / 24 * x ^^^ 4)"; val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; case nxt of (_, Check_Postcond ["makeFunctionTo", "equation"]) => () -| _ => raise error "biegelinie.sml met2 gg"; +| _ => error "biegelinie.sml met2 gg"; "--- before 2.subpbl [Equation, fromFunction]"; val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f = "0 = c_4 + 0 / (-1 * EI)" ; case nxt of (_,Subproblem (_, ["makeFunctionTo", "equation"])) => () -| _ => raise error "biegelinie.sml met2 hh"; +| _ => error "biegelinie.sml met2 hh"; "--- after 1st arrival at 2.subpbl [Equation, fromFunction]"; val (p,_,f,nxt,_,pt) = me nxt p c pt; if (#1 o (get_obj g_fmz pt)) (fst p) = ["functionEq\n (y x =\n c_4 + c_3 * x +\n 1 / (-1 * EI) *\n (c_2 / 2 * x ^^^ 2 + c / 6 * x ^^^ 3 + -1 * q_0 / 24 * x ^^^ 4))", "substitution (y L = 0)", "equality equ___"] then () -else raise error "biegelinie.sml metsetzeRandbed*Ein bb "; +else error "biegelinie.sml metsetzeRandbed*Ein bb "; val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; case nxt of (_, Apply_Method["Equation", "fromFunction"]) => () -| _ => raise error "biegelinie.sml met2 ii"; +| _ => error "biegelinie.sml met2 ii"; val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f = "y x =\nc_4 + c_3 * x +\n1 / (-1 * EI) *\n(c_2 / 2 * x ^^^ 2 + c / 6 * x ^^^ 3 + -1 * q_0 / 24 * x ^^^ 4)"; val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f = "y L =\nc_4 + c_3 * L +\n1 / (-1 * EI) *\n(c_2 / 2 * L ^^^ 2 + c / 6 * L ^^^ 3 + -1 * q_0 / 24 * L ^^^ 4)"; val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f = "0 =\nc_4 + c_3 * L +\n1 / (-1 * EI) *\n(c_2 / 2 * L ^^^ 2 + c / 6 * L ^^^ 3 + -1 * q_0 / 24 * L ^^^ 4)"; val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f = "0 =\nc_4 + L * c_3 +\n(12 * L ^^^ 2 * c_2 + 4 * L ^^^ 3 * c + -1 * L ^^^ 4 * q_0) / (-24 * EI)" ; val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f = "0 =\nc_4 + L * c_3 +\n(12 * L ^^^ 2 * c_2 + 4 * L ^^^ 3 * c + -1 * L ^^^ 4 * q_0) / (-24 * EI)"; case nxt of (_,Subproblem (_, ["makeFunctionTo", "equation"])) => () -| _ => raise error "biegelinie.sml met2 jj"; +| _ => error "biegelinie.sml met2 jj"; val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt; case nxt of (_, Apply_Method ["Equation", "fromFunction"])=>() -| _ => raise error "biegelinie.sml met2 kk"; +| _ => error "biegelinie.sml met2 kk"; val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f = "M_b x = c_2 + c * x + -1 * q_0 / 2 * x ^^^ 2"(*true*); val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f = "0 = c_2 + c * 0 + -1 * q_0 / 2 * 0 ^^^ 2"; @@ -838,14 +838,14 @@ val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f = "0 = c_2"; val (p,_,f,nxt,_,pt) = me nxt p c pt; case nxt of (_,Subproblem (_, ["makeFunctionTo", "equation"])) => () -| _ => raise error "biegelinie.sml met2 ll"; +| _ => error "biegelinie.sml met2 ll"; val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; case nxt of (_, Apply_Method ["Equation", "fromFunction"])=>() -| _ => raise error "biegelinie.sml met2 mm"; +| _ => error "biegelinie.sml met2 mm"; val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f = "M_b x = c_2 + c * x + -1 * q_0 / 2 * x ^^^ 2"; val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f = "M_b L = c_2 + c * L + -1 * q_0 / 2 * L ^^^ 2"; @@ -853,12 +853,12 @@ val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f = "0 = (2 * c_2 + 2 * L * c + -1 * L ^^^ 2 * q_0) / 2"; val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f = "0 = (2 * c_2 + 2 * L * c + -1 * L ^^^ 2 * q_0) / 2"; case nxt of (_, Check_Postcond ["setzeRandbedingungen", "Biegelinien"]) => () -| _ => raise error "biegelinie.sml met2 nn"; +| _ => error "biegelinie.sml met2 nn"; val (p,_,f,nxt,_,pt) = me nxt p c pt; if nxt = ("End_Proof'", End_Proof') andalso f2str f = (* "[0 = c_4,\n 0 =\n c_4 + L * c_3 +\n (12 * L ^^^ 2 * c_2 + 4 * L ^^^ 3 * c + -1 * L ^^^ 4 * q_0) / (-24 * EI),\n 0 = c_2, 0 = (2 * c_2 + 2 * L * c + -1 * L ^^^ 2 * q_0) / 2]" *) "[0 = c_4,\n 0 =\n c_4 + L * c_3 +\n (12 * L ^^^ 2 * c_2 + 4 * L ^^^ 3 * c + -1 * L ^^^ 4 * q_0) /\n (-1 * EI * 24),\n 0 = c_2, 0 = (2 * c_2 + 2 * L * c + -1 * L ^^^ 2 * q_0) / 2]" -then () else raise error "biegelinie.sml met2 oo"; +then () else error "biegelinie.sml met2 oo"; (* val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f; @@ -964,7 +964,7 @@ val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt; if nxt = ("Apply_Method", Apply_Method ["IntegrierenUndKonstanteBestimmen2"]) -then () else raise error "biegelinie.sml met2 a"; +then () else error "biegelinie.sml met2 a"; (*** actual arg(s) missing for '["(#Find, (Funktionen, funs_))"]' i.e. should be 'copy-named' by '*_._' ... THIS MEANS: @@ -996,7 +996,7 @@ val ((pt,p),_) = get_calc 1; show_pt pt; if p = ([], Res) andalso term2str (get_obj g_res pt (fst p)) = "y x =\n-6 * q_0 * L ^^^ 2 / (-24 * EI) * x ^^^ 2 +\n4 * L * q_0 / (-24 * EI) * x ^^^ 3 +\n-1 * q_0 / (-24 * EI) * x ^^^ 4" then () -else raise error "biegelinie.sml: diff.behav.7.70 with autoCalculate"; +else error "biegelinie.sml: diff.behav.7.70 with autoCalculate"; val is = get_istate pt ([],Res); writeln (istate2str is); val t = str2term " last \ diff -r 95d956108461 -r 460c24a6a6ba test/Tools/isac/Knowledge/diff.sml --- a/test/Tools/isac/Knowledge/diff.sml Tue Sep 28 08:58:06 2010 +0200 +++ b/test/Tools/isac/Knowledge/diff.sml Tue Sep 28 09:06:56 2010 +0200 @@ -108,7 +108,7 @@ (*got: false instead true; ~~~~~~~~~~~ replaced by 'is_atom'*) val SOME (ctt,_) = (rewrite_inst thy' "tless_true" "erls" false [("bdv","s")] thm ct); -if ctt = "0" then () else raise error "diff.sml: thm 'diff_const' diff.behav."; +if ctt = "0" then () else error "diff.sml: thm 'diff_const' diff.behav."; trace_rewrite := false; "----- for 'd_d s a' we had 'a is_const' --> False --------^^^-----"; @@ -171,11 +171,11 @@ val (ct,_) = the (rewrite_inst thy' "tless_true" "erls" true [("bdv","x::real")] thm ct); if ct = "2 * x ^^^ (2 - 1) + 3 * 1 + 0" then () -else raise error "diff.sml diff.behav. in rewrite 1"; +else error "diff.sml diff.behav. in rewrite 1"; "--- 7 ---"; val rls = ("Test_simplify"); val (ct,_) = the (rewrite_set thy' false rls ct); -if ct="3 + 2 * x" then () else raise error "new behaviour in test-example"; +if ct="3 + 2 * x" then () else error "new behaviour in test-example"; val ct = "2 * x ^^^ (2 - 1) + 3 * 1 + 0"; val (ct,_) = the (rewrite_set thy' true rls ct); @@ -249,7 +249,7 @@ (*val nxt = ("Rewrite_Inst",Rewrite_Inst (["(bdv,x)"],("diff_var","")));*) val (p,_,f,nxt,_,pt) = me nxt p c pt; if f2str f = "2 * x ^^^ (2 - 1) + 3 * 1 + 0" then () -else raise error "diff.sml: diff.behav. in d_d x ^^^ 2 + 3 * x + 4"; +else error "diff.sml: diff.behav. in d_d x ^^^ 2 + 3 * x + 4"; "--- 7 ---"; (*------------------------------11.3.03-------------------- trace_rewrite:=true; @@ -291,8 +291,8 @@ (*val nxt = ("End_Proof'",End_Proof');*) val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f; if nxt = ("End_Proof'",End_Proof') andalso f2str f = "3 + 2 * x" then () -else raise error "diff.sml: new.behav. in me (*+ tacs input*)"; -(*if f = EmptyMout then () else raise error "new behaviour in + tacs input"; +else error "diff.sml: new.behav. in me (*+ tacs input*)"; +(*if f = EmptyMout then () else error "new behaviour in + tacs input"; meNEW extracts Form once more*) @@ -464,7 +464,7 @@ val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; if nxt = ("End_Proof'",End_Proof') then () -else raise error "new behaviour in tests/differentiate, 1.5.02 me from script"; +else error "new behaviour in tests/differentiate, 1.5.02 me from script"; "----------- primed id -------------------------------------------"; "----------- primed id -------------------------------------------"; @@ -483,7 +483,7 @@ val SOME (f'_,_) = rewrite_set_ Isac.thy false srls_diff screxp1; if term2str f'_= "Take (A' = d_d s (s * (a - s)))" then () -else raise error "diff.sml: diff.behav. in 'primed'"; +else error "diff.sml: diff.behav. in 'primed'"; atomty f'_; val str = "Script DiffEqScr (f_f::bool) (v_v::real) = \ @@ -525,15 +525,15 @@ val t = str2term "2/x^^^2"; val SOME (t,_) = rewrite_set_inst_ thy false subs rls t; term2str t; -if term2str t = "2 * x ^^^ -2" then () else raise error "diff.sml 1/x"; +if term2str t = "2 * x ^^^ -2" then () else error "diff.sml 1/x"; val t = str2term "sqrt (x^^^3)"; val SOME (t,_) = rewrite_set_inst_ thy false subs rls t; term2str t; -if term2str t = "x ^^^ (3 / 2)" then () else raise error "diff.sml x^1/2"; +if term2str t = "x ^^^ (3 / 2)" then () else error "diff.sml x^1/2"; val t = str2term "2 / sqrt x^^^3"; val SOME (t,_) = rewrite_set_inst_ thy false subs rls t; term2str t; -if term2str t = "2 * x ^^^ (-3 / 2)" then () else raise error"diff.sml x^-1/2"; +if term2str t = "2 * x ^^^ (-3 / 2)" then () else error"diff.sml x^-1/2"; (* trace_rewrite := true; trace_rewrite := false; *) @@ -541,16 +541,16 @@ val t = str2term "2 * x ^^^ -2"; val SOME (t,_) = rewrite_set_inst_ thy false subs rls t; term2str t; -if term2str t = "2 / x ^^^ 2" then () else raise error "diff.sml sym 1/x"; +if term2str t = "2 / x ^^^ 2" then () else error "diff.sml sym 1/x"; val t = str2term "x ^^^ (3 / 2)"; val SOME (t,_) = rewrite_set_inst_ thy false subs rls t; term2str t; -if term2str t = "sqrt (x ^^^ 3)" then () else raise error"diff.sml sym x^1/x"; +if term2str t = "sqrt (x ^^^ 3)" then () else error"diff.sml sym x^1/x"; val t = str2term "2 * x ^^^ (-3 / 2)"; val SOME (t,_) = rewrite_set_inst_ thy false subs rls t; term2str t; -if term2str t ="2 / sqrt (x ^^^ 3)"then()else raise error"diff.sml sym x^-1/x"; +if term2str t ="2 / sqrt (x ^^^ 3)"then()else error"diff.sml sym x^-1/x"; (* trace_rewrite:=true; @@ -576,7 +576,7 @@ val ((pt,p),_) = get_calc 1; show_pt pt; if p = ([], Res) andalso term2str (get_obj g_res pt (fst p)) = "1 + 2 * x + -1 / x ^^^ 2 + -4 / x ^^^ 3" then () -else raise error "diff.sml: differentiate_on_R 2/x^2 changed"; +else error "diff.sml: differentiate_on_R 2/x^2 changed"; "-----------------------------------------------------------------"; states:=[]; @@ -598,7 +598,7 @@ if p = ([], Res) andalso term2str (get_obj g_res pt (fst p)) = "8 * x ^^^ 7" then () -else raise error "diff.sml: differentiate_on_R (x^3 * x^5) changed"; +else error "diff.sml: differentiate_on_R (x^3 * x^5) changed"; "----------- autoCalculate diff after_simplification -------------"; @@ -621,7 +621,7 @@ *) val ((pt,p),_) = get_calc 1; show_pt pt; if p = ([], Res) andalso term2str (get_obj g_res pt (fst p)) = "8 * x ^^^ 7" -then () else raise error "biegelinie.sml: 1st biegelin.7.27 changed"; +then () else error "biegelinie.sml: 1st biegelin.7.27 changed"; "-----------------------------------------------------------------"; states:=[]; @@ -635,7 +635,7 @@ autoCalculate 1 CompleteCalc; val ((pt,p),_) = get_calc 1; show_pt pt; if p = ([], Res) andalso term2str (get_obj g_res pt (fst p)) = "15 * x ^^^ 14" -then () else raise error "biegelinie.sml: 1st biegelin.7.27 changed"; +then () else error "biegelinie.sml: 1st biegelin.7.27 changed"; @@ -689,4 +689,4 @@ appendFormula 1 "2*x + d_d x x + d_d x 1"; val ((pt,p),_) = get_calc 1; show_pt pt; if existpt' ([3], Res) pt then () -else raise error "diff.sml: inform d_d x (x^2 + x + 1) doesnt work"; +else error "diff.sml: inform d_d x (x^2 + x + 1) doesnt work"; diff -r 95d956108461 -r 460c24a6a6ba test/Tools/isac/Knowledge/diffapp.sml --- a/test/Tools/isac/Knowledge/diffapp.sml Tue Sep 28 08:58:06 2010 +0200 +++ b/test/Tools/isac/Knowledge/diffapp.sml Tue Sep 28 09:06:56 2010 +0200 @@ -280,7 +280,7 @@ val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; case nxt of (_, Specify_Method ["DiffApp","max_by_calculus"]) => () - | _ => raise error "diffapp.sml: max-exp me, nxt = Specify_Method"; + | _ => error "diffapp.sml: max-exp me, nxt = Specify_Method"; val oris = fst3 (get_obj g_origin pt (fst p)); writeln(oris2str oris); val pits = get_obj g_pbl pt (fst p); writeln(itms2str_ ctxt pits); @@ -291,7 +291,7 @@ val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; case nxt of (_,Apply_Method ["DiffApp","max_by_calculus"] ) => () - | _ => raise error "diffapp.sml: max-exp me, nxt = Apply_Method"; + | _ => error "diffapp.sml: max-exp me, nxt = Apply_Method"; val (p,_,f,nxt,_,pt) = me nxt p c pt; (*since 0508 Apply_Method does the 1st step, if NONE init_form ------------- @@ -302,7 +302,7 @@ (*val nxt = ("Model_Problem",Model_Problem ["by_explicit","make","function"])*) ----------------------------------------------------------------------------*) case nxt of (_, Model_Problem(*["by_explicit", "make", "function"]*)) => () - | _ => raise error "diffapp.sml: max-exp me, nxt = Model_Problem"; + | _ => error "diffapp.sml: max-exp me, nxt = Model_Problem"; val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; @@ -318,7 +318,7 @@ val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; case nxt of (_, Apply_Method ["DiffApp", "make_fun_by_explicit"]) => () - | _ => raise error "diffapp.sml: max-exp Apply_Method ([1], Met) "; + | _ => error "diffapp.sml: max-exp Apply_Method ([1], Met) "; (*----since WN050901 (ie. corr. mathengine#nxt_specify_ ..nxt_spec Pbl->p_ we get at ... @@ -429,12 +429,12 @@ writeln (itms2str_ ctxt mits); (* if itms2str_ ctxt mits = "[\n(1 ,[1] ,true ,#Given ,Cor functionEq (hd r_s) ,(t_, [hd r_s])),\n(2 ,[1] ,true ,#Given ,Cor boundVariable v_v ,(v_, [v_])),\n(3 ,[1] ,true ,#Given ,Cor interval itv_ ,(itv_, [itv_])),\n(4 ,[1] ,true ,#Find ,Cor maxArgument v__0 ,(v_0, [v__0]))]" then () - else raise error "diffapp.sml: diff.behav. in autoCalc .. scripts for max 1"; + else error "diffapp.sml: diff.behav. in autoCalc .. scripts for max 1"; *) (*FIXME: the environments contain identifers, and NOT values ?!?!?*) (* WN051209 while extending 'fun step' for initac, this became better ... if itms2str_ ctxt mits = "[\n(1 ,[1,2,3] ,true ,#Given ,Cor fixedValues [r = Arbfix] ,(f_ix, [[r = Arbfix]])),\n(2 ,[1,2,3] ,true ,#Find ,Cor maximum A ,(m_, [A])),\n(3 ,[1,2,3] ,true ,#Find ,Cor valuesFor [a, b] ,(v_s, [[a],[b]])),\n(4 ,[1,2] ,true ,#Relate ,Cor relations [A = a * b, (a / 2) ^^^ 2 + (b / 2) ^^^ 2 = r ^^^ 2] ,(r_s, [[A = a * b],[(a / 2) ^^^ 2 + (b / 2) ^^^ 2 = r ^^^ 2]])),\n(6 ,[1] ,true ,#undef ,Cor boundVariable a ,(v_, [a])),\n(9 ,[1,2] ,true ,#undef ,Cor interval {x. 0 <= x & x <= 2 * r} ,(itv_, [{x. 0 <= x & x <= 2 * r}])),\n(11 ,[1,2,3] ,true ,#undef ,Cor errorBound (eps = 0) ,(err_, [eps = 0]))]" then () - else raise error "diffapp.sml: diff.behav. in autoCalc .. scripts for max 1"; + else error "diffapp.sml: diff.behav. in autoCalc .. scripts for max 1"; *) @@ -478,7 +478,7 @@ "(hd o filterVar A) [A = a * b, (a / 2) ^^^ 2 + (b / 2) ^^^ 2 = r ^^^ 2]"; val SOME (s',_) = rewrite_set_ thy false list_rls s; val s'' = term2str s'; -if s''="A = a * b" then () else raise error "new behaviour with list_rls 1.1."; +if s''="A = a * b" then () else error "new behaviour with list_rls 1.1."; val env = env @ [(str2term "e_::bool",str2term "A = a * b")]; (*--- 2.line: condition alone ---*) @@ -488,7 +488,7 @@ "1 < length_ [A = a * b, (a / 2) ^^^ 2 + (b / 2) ^^^ 2 = r ^^^ 2]"; val SOME (s',_) = rewrite_set_ thy false list_rls s; val s'' = term2str s'; -if s''="True" then () else raise error "new behaviour with list_rls 1.2."; +if s''="True" then () else error "new behaviour with list_rls 1.2."; (*--- 2.line in script ---*) val t = str2term @@ -509,7 +509,7 @@ "SubProblem (Reals_, [make, function], [no_met])\n\ \ [REAL A, REAL b,\n\ \ BOOL_LIST [A = a * b, (a / 2) ^^^ 2 + (b / 2) ^^^ 2 = r ^^^ 2]]" then () -else raise error "new behaviour with list_rls 1.3."; +else error "new behaviour with list_rls 1.3."; val env = env @ [(str2term "t_::bool", str2term "A = (2*sqrt(r^^^2-(b/2)^^^2)) * b")]; @@ -544,7 +544,7 @@ "(hd o filterVar b) [A = a * b, (a / 2) ^^^ 2 + (b / 2) ^^^ 2 = r ^^^ 2]"; val SOME (t',_) = rewrite_set_ thy false list_rls t; val s' = term2str t'; -if s' = "A = a * b" then () else raise error "new behaviour with list_rls 2.1"; +if s' = "A = a * b" then () else error "new behaviour with list_rls 2.1"; val env = env @ [(str2term "h_::bool", str2term s')]; (*--- 2.line in script ---*) @@ -559,7 +559,7 @@ val SOME (t',_) = rewrite_set_ thy false list_rls t; val s' = term2str t'; if s' = "(a / 2) ^^^ 2 + (b / 2) ^^^ 2 = r ^^^ 2" then () -else raise error "new behaviour with list_rls 2.2"; +else error "new behaviour with list_rls 2.2"; val env = env @ [(str2term "e_1::bool", str2term s')]; (*--- 3.line in script ---*) @@ -569,7 +569,7 @@ val t = str2term "dropWhile (ident A) (Vars (A = a * b))"; val SOME (t',_) = rewrite_set_ thy false list_rls t; val s' = term2str t'; -if s' = "[a, b]" then () else raise error "new behaviour with list_rls 2.3"; +if s' = "[a, b]" then () else error "new behaviour with list_rls 2.3"; val env = env @ [(str2term "vs_::real list", str2term s')]; (*--- 4.line in script ---*) @@ -579,7 +579,7 @@ val t = str2term "hd (dropWhile (ident b) [a, b])"; val SOME (t',_) = rewrite_set_ thy false list_rls t; val s' = term2str t'; -if s' = "a" then () else raise error "new behaviour with list_rls 2.4."; +if s' = "a" then () else error "new behaviour with list_rls 2.4."; val env = env @ [(str2term "v_1::real", str2term s')]; (*--- 5.line in script ---*) @@ -603,7 +603,7 @@ val SOME (t',_) = rewrite_set_ thy false list_rls t; val s' = term2str t'; if s' = "Substitute [a = 2 * sqrt (r ^^^ 2 - (b / 2) ^^^ 2)] (A = a * b)" -then () else raise error "new behaviour with list_rls 2.6."; +then () else error "new behaviour with list_rls 2.6."; "---------------------- 2.5.03: Make_fun_by_new_variable -----------------"; @@ -642,7 +642,7 @@ val SOME (t',_) = rewrite_set_ thy false list_rls t; trace_rewrite:=false; val s' = term2str t'; -if s' = "A = a * b" then() else raise error "new behaviour with list_rls 3.1."; +if s' = "A = a * b" then() else error "new behaviour with list_rls 3.1."; val env = env @ [(str2term "h_::bool", str2term s')]; (*--- 2.line in script ---*) @@ -655,7 +655,7 @@ val SOME (t',_) = rewrite_set_ thy false list_rls t; val s' = term2str t'; if s' = "[a / 2 = r * sin alpha, b / 2 = r * cos alpha]" -then () else raise error "new behaviour with list_rls 3.2."; +then () else error "new behaviour with list_rls 3.2."; val env = env @ [(str2term "es_::bool list", str2term s')]; (*--- 3.line in script ---*) @@ -665,7 +665,7 @@ val t = str2term "dropWhile (ident A) (Vars (A = a * b))"; val SOME (t',_) = rewrite_set_ thy false list_rls t; val s' = term2str t'; -if s' = "[a, b]" then () else raise error "new behaviour with list_rls 3.3."; +if s' = "[a, b]" then () else error "new behaviour with list_rls 3.3."; val env = env @ [(str2term "vs_::real list", str2term s')]; (*--- 4.line in script ---*) @@ -675,7 +675,7 @@ val t = str2term "nth_ 1 [a, b]"; val SOME (t',_) = rewrite_set_ thy false list_rls t; val s' = term2str t'; -if s' = "a" then () else raise error "new behaviour with list_rls 3.4."; +if s' = "a" then () else error "new behaviour with list_rls 3.4."; val env = env @ [(str2term "v_1", str2term s')]; (*--- 5.line in script ---*) @@ -685,7 +685,7 @@ val t = str2term "nth_ 2 [a, b]"; val SOME (t',_) = rewrite_set_ thy false list_rls t; val s' = term2str t'; -if s' = "b" then () else raise error "new behaviour with list_rls 3.5."; +if s' = "b" then () else error "new behaviour with list_rls 3.5."; val env = env @ [(str2term "v_2", str2term s')]; (*--- 6.line in script ---*) @@ -697,7 +697,7 @@ val SOME (t',_) = rewrite_set_ thy false list_rls t; val s' = term2str t'; if s' = "a / 2 = r * sin alpha" then () -else raise error "new behaviour with list_rls 3.6."; +else error "new behaviour with list_rls 3.6."; val e_1 = str2term "e_1::bool"; val env = env @ [(e_1, str2term s')]; @@ -710,7 +710,7 @@ val SOME (t',_) = rewrite_set_ thy false list_rls t; val s' = term2str t'; if s' = "b / 2 = r * cos alpha" then () -else raise error "new behaviour with list_rls 3.7."; +else error "new behaviour with list_rls 3.7."; val env = env @ [(str2term "e_2::bool", str2term s')]; (*--- 8.line in script ---*) @@ -744,7 +744,7 @@ val s'' = term2str s'; if s'' = "Substitute [a = 2 * r * sin alpha, b = 2 * r * cos alpha] (A = a * b)" -then () else raise error "new behaviour with list_rls 3.10."; +then () else error "new behaviour with list_rls 3.10."; diff -r 95d956108461 -r 460c24a6a6ba test/Tools/isac/Knowledge/eqsystem.sml --- a/test/Tools/isac/Knowledge/eqsystem.sml Tue Sep 28 08:58:06 2010 +0200 +++ b/test/Tools/isac/Knowledge/eqsystem.sml Tue Sep 28 09:06:56 2010 +0200 @@ -39,37 +39,37 @@ val t = str2term"0 = -1 * q_0 * L ^^^ 2 / 2 + L * c + c_2"; if occur_exactly_in [str2term"c", str2term"c_2"] all t -then () else raise error "eqsystem.sml occur_exactly_in 1"; +then () else error "eqsystem.sml occur_exactly_in 1"; if not (occur_exactly_in [str2term"c", str2term"c_2", str2term"c_3"] all t) -then () else raise error "eqsystem.sml occur_exactly_in 2"; +then () else error "eqsystem.sml occur_exactly_in 2"; if not (occur_exactly_in [str2term"c_2"] all t) -then () else raise error "eqsystem.sml occur_exactly_in 3"; +then () else error "eqsystem.sml occur_exactly_in 3"; val t = str2term"[c,c_2] from_ [c,c_2,c_3] occur_exactly_in \ \-1 * q_0 * L ^^^ 2 / 2 + L * c + c_2"; val SOME (str, t') = eval_occur_exactly_in 0 "EqSystem.occur'_exactly'_in" t 0; if str = "[c, c_2] from_ [c, c_2,\n c_3] occur_exactly_in -1 * q_0 * L ^^^ 2 / 2 + L * c + c_2 = True" then () -else raise error "eval_occur_exactly_in [c, c_2]"; +else error "eval_occur_exactly_in [c, c_2]"; val t = str2term"[c,c_2,c_3] from_ [c,c_2,c_3] occur_exactly_in \ \-1 * q_0 * L ^^^ 2 / 2 + L * c + c_2"; val SOME (str, t') = eval_occur_exactly_in 0 "EqSystem.occur'_exactly'_in" t 0; if str = "[c, c_2,\n c_3] from_ [c, c_2,\n c_3] occur_exactly_in -1 * q_0 * L ^^^ 2 / 2 + L * c + c_2 = False" then () -else raise error "eval_occur_exactly_in [c, c_2, c_3]"; +else error "eval_occur_exactly_in [c, c_2, c_3]"; val t = str2term"[c_2] from_ [c,c_2,c_3] occur_exactly_in \ \-1 * q_0 * L ^^^ 2 / 2 + L * c + c_2"; val SOME (str, t') = eval_occur_exactly_in 0 "EqSystem.occur'_exactly'_in" t 0; if str = "[c_2] from_ [c, c_2,\n c_3] occur_exactly_in -1 * q_0 * L ^^^ 2 / 2 + L * c + c_2 = False" then () -else raise error "eval_occur_exactly_in [c, c_2, c_3]"; +else error "eval_occur_exactly_in [c, c_2, c_3]"; val t = str2term"[] from_ [c,c_2,c_3] occur_exactly_in 0"; val SOME (str, t') = eval_occur_exactly_in 0 "EqSystem.occur'_exactly'_in" t 0; if str = "[] from_ [c, c_2, c_3] occur_exactly_in 0 = True" then () -else raise error "eval_occur_exactly_in [c, c_2, c_3]"; +else error "eval_occur_exactly_in [c, c_2, c_3]"; val t = str2term @@ -77,7 +77,7 @@ val SOME (str, t') = eval_occur_exactly_in 0 "EqSystem.occur'_exactly'_in" t 0; if str = "[] from_ [c, c_2, c_3, c_4] occur_exactly_in \ \-1 * (q_0 * L ^^^ 2) / 2 = True" then () -else raise error "eval_occur_exactly_in [c, c_2, c_3, c_4]"; +else error "eval_occur_exactly_in [c, c_2, c_3, c_4]"; "----------- problems --------------------------------------------"; @@ -93,7 +93,7 @@ ]; val SOME (t',_) = rewrite_set_ thy false testrls t; if term2str t' = "True" then () -else raise error "eqsystem.sml: length_ [x+y=1,y=2] = 2"; +else error "eqsystem.sml: length_ [x+y=1,y=2] = 2"; val SOME t = parse EqSystem.thy "solution L"; atomty (term_of t); @@ -118,7 +118,7 @@ "#eval_occur_exactly_in_") ]) t; if t = HOLogic.true_const then () -else raise error "eqsystem.sml ..occur_exactly_in (nth_ 1 [c_4.."; +else error "eqsystem.sml ..occur_exactly_in (nth_ 1 [c_4.."; "----------- rewrite-order ord_simplify_System -------------------"; @@ -128,28 +128,28 @@ "--- add_commute ---"; if ord_simplify_System false thy [] (str2term"-1 * q_0 * (x ^^^ 2 / 2)", str2term"c * x") then () -else raise error "integrate.sml, (-1 * q_0 * (x ^^^ 2 / 2)) < (c * x) not#1"; +else error "integrate.sml, (-1 * q_0 * (x ^^^ 2 / 2)) < (c * x) not#1"; if ord_simplify_System false thy [] (str2term"-1 * q_0 * (x ^^^ 2 / 2)", str2term"c_2") then () -else raise error "integrate.sml, (-1 * q_0 * (x ^^^ 2 / 2)) < (c_2) not#2"; +else error "integrate.sml, (-1 * q_0 * (x ^^^ 2 / 2)) < (c_2) not#2"; if ord_simplify_System false thy [] (str2term"c * x", str2term"c_2") then () -else raise error "integrate.sml, (c * x) < (c_2) not#3"; +else error "integrate.sml, (c * x) < (c_2) not#3"; "--- mult_commute ---"; if ord_simplify_System false thy [] (str2term"x * c", str2term"c * x") then () -else raise error "integrate.sml, (x * c) < (c * x) not#4"; +else error "integrate.sml, (x * c) < (c * x) not#4"; if ord_simplify_System false thy [] (str2term"-1 * q_0 * (x ^^^ 2 / 2) * c", str2term"-1 * q_0 * c * (x ^^^ 2 / 2)") -then () else raise error "integrate.sml, (. * .) < (. * .) not#5"; +then () else error "integrate.sml, (. * .) < (. * .) not#5"; if ord_simplify_System false thy [] (str2term"-1 * q_0 * (x ^^^ 2 / 2) * c", str2term"c * -1 * q_0 * (x ^^^ 2 / 2)") -then () else raise error "integrate.sml, (. * .) < (. * .) not#6"; +then () else error "integrate.sml, (. * .) < (. * .) not#6"; "----------- rewrite in [EqSystem,normalize,2x2] -----------------"; @@ -161,19 +161,19 @@ (str2term"bdv_2",str2term"c_2")]; val SOME(t,_)= rewrite_set_inst_ thy true bdvs simplify_System_parenthesized t; if term2str t = "[0 = -1 * q_0 * L ^^^ 2 / 2 + (L * c + c_2), 0 = c_2]" -then () else raise error "eqsystem.sml rewrite in 2x2 simplify_System_par.1"; +then () else error "eqsystem.sml rewrite in 2x2 simplify_System_par.1"; val SOME (t,_) = rewrite_set_inst_ thy true bdvs isolate_bdvs t; if term2str t = "[L * c + c_2 = 0 + -1 * (-1 * q_0 * L ^^^ 2 / 2), c_2 = 0]" -then () else raise error "eqsystem.sml rewrite in 2x2 isolate_bdvs"; +then () else error "eqsystem.sml rewrite in 2x2 isolate_bdvs"; val SOME(t,_)= rewrite_set_inst_ thy true bdvs simplify_System t; if term2str t = "[L * c + c_2 = q_0 * L ^^^ 2 / 2, c_2 = 0]" -then () else raise error "eqsystem.sml rewrite in 2x2 simplify_System_par.2"; +then () else error "eqsystem.sml rewrite in 2x2 simplify_System_par.2"; val SOME (t,_) = rewrite_set_ thy true order_system t; if term2str t = "[c_2 = 0, L * c + c_2 = q_0 * L ^^^ 2 / 2]" -then () else raise error "eqsystem.sml rewrite in 2x2 simplify_System_par.3"; +then () else error "eqsystem.sml rewrite in 2x2 simplify_System_par.3"; "----------- rewrite example from 2nd [EqSystem,normalize,2x2] ---"; @@ -187,23 +187,23 @@ \ -1 * q_0 / 24 * L ^^^ 4)]"; val SOME (t,_) = rewrite_set_ thy true norm_Rational t; if term2str t="[0 = c_2, 0 = c_2 + L * c + L ^^^ 4 * q_0 / (EI * 24)]" -then () else raise error "eqsystem.sml rewrite in 2x2 simplify_System_par.0b"; +then () else error "eqsystem.sml rewrite in 2x2 simplify_System_par.0b"; val SOME(t,_)= rewrite_set_inst_ thy true bdvs simplify_System_parenthesized t; if term2str t = "[0 = c_2, 0 = q_0 * L ^^^ 4 / (24 * EI) + (L * c + c_2)]" -then () else raise error "eqsystem.sml rewrite in 2x2 simplify_System_par.1b"; +then () else error "eqsystem.sml rewrite in 2x2 simplify_System_par.1b"; val SOME (t,_) = rewrite_set_inst_ thy true bdvs isolate_bdvs t; if term2str t = "[c_2 = 0, L * c + c_2 = 0 + -1 * (q_0 * L ^^^ 4 / (24 * EI))]" -then () else raise error "eqsystem.sml rewrite in 2x2 isolate_bdvs b"; +then () else error "eqsystem.sml rewrite in 2x2 isolate_bdvs b"; val SOME(t,_)= rewrite_set_inst_ thy true bdvs simplify_System t; if term2str t = "[c_2 = 0, L * c + c_2 = -1 * q_0 * L ^^^ 4 / (24 * EI)]" -then () else raise error "eqsystem.sml rewrite in 2x2 simplify_System.2b"; +then () else error "eqsystem.sml rewrite in 2x2 simplify_System.2b"; val xxx = rewrite_set_ thy true order_system t; if is_none xxx -then () else raise error "eqsystem.sml rewrite in 2x2 simplify_System.3b"; +then () else error "eqsystem.sml rewrite in 2x2 simplify_System.3b"; "----------- rewrite in [EqSystem,top_down_substitution,2x2] -----"; @@ -215,27 +215,27 @@ (str2term"bdv_2",str2term"c_2")]; val SOME (e2__,_) = rewrite_terms_ thy dummy_ord Erls [e1__] e2__; if term2str e2__ = "L * c + 77 = q_0 * L ^^^ 2 / 2" then () -else raise error "eqsystem.sml top_down_substitution,2x2] subst"; +else error "eqsystem.sml top_down_substitution,2x2] subst"; val SOME (e2__,_) = rewrite_set_inst_ thy true bdvs simplify_System_parenthesized e2__; if term2str e2__ = "77 + L * c = q_0 * L ^^^ 2 / 2" then () -else raise error "eqsystem.sml top_down_substitution,2x2] simpl_par"; +else error "eqsystem.sml top_down_substitution,2x2] simpl_par"; val SOME (e2__,_) = rewrite_set_inst_ thy true bdvs isolate_bdvs e2__; if term2str e2__ = "c = (q_0 * L ^^^ 2 / 2 + -1 * 77) / L" then () -else raise error "eqsystem.sml top_down_substitution,2x2] isolate"; +else error "eqsystem.sml top_down_substitution,2x2] isolate"; val t = str2term "[c_2 = 77, c = (q_0 * L ^^^ 2 / 2 + -1 * 77) / L]"; val SOME (t,_) = rewrite_set_ thy true order_system t; if term2str t = "[c = (q_0 * L ^^^ 2 / 2 + -1 * 77) / L, c_2 = 77]" then () -else raise error "eqsystem.sml top_down_substitution,2x2] order_system"; +else error "eqsystem.sml top_down_substitution,2x2] order_system"; if not (ord_simplify_System false thy [] (str2term"[c_2 = 77, c = (q_0 * L ^^^ 2 / 2 + -1 * 77) / L]", str2term"[c = (q_0 * L ^^^ 2 / 2 + -1 * 77) / L, c_2 = 77]")) -then () else raise error "eqsystem.sml, order_result rew_ord"; +then () else error "eqsystem.sml, order_result rew_ord"; trace_rewrite:=true; trace_rewrite:=false; @@ -257,27 +257,27 @@ rewrite_set_inst_ thy true bdvs simplify_System_parenthesized t; if term2str t = "[0 = c_4, 0 = -1 * q_0 * L ^^^ 2 / 2 + (L * c_3 + c_4),\n\ \ c + (c_2 + (c_3 + c_4)) = 0, c_2 + (c_3 + c_4) = 0]" -then () else raise error "eqsystem.sml rewrite in 4x4 simplify_System_paren"; +then () else error "eqsystem.sml rewrite in 4x4 simplify_System_paren"; val SOME (t,_) = rewrite_set_inst_ thy true bdvs isolate_bdvs t; if term2str t = "[c_4 = 0, \ \L * c_3 + c_4 = 0 + -1 * (-1 * q_0 * L ^^^ 2 / 2),\n \ \c + (c_2 + (c_3 + c_4)) = 0, c_2 + (c_3 + c_4) = 0]" -then () else raise error "eqsystem.sml rewrite in 4x4 isolate_bdvs"; +then () else error "eqsystem.sml rewrite in 4x4 isolate_bdvs"; val SOME(t,_)= rewrite_set_inst_ thy true bdvs simplify_System_parenthesized t; if term2str t = "[c_4 = 0,\ \ L * c_3 + c_4 = q_0 * L ^^^ 2 / 2,\ \ c + (c_2 + (c_3 + c_4)) = 0,\n\ \ c_2 + (c_3 + c_4) = 0]" -then () else raise error "eqsystem.sml rewrite in 4x4 simplify_System_p..2"; +then () else error "eqsystem.sml rewrite in 4x4 simplify_System_p..2"; val SOME (t,_) = rewrite_set_ thy true order_system t; if term2str t = "[c_4 = 0,\ \ L * c_3 + c_4 = q_0 * L ^^^ 2 / 2,\ \ c_2 + (c_3 + c_4) = 0,\n\ \ c + (c_2 + (c_3 + c_4)) = 0]" -then () else raise error "eqsystem.sml rewrite in 4x4 order_system"; +then () else error "eqsystem.sml rewrite in 4x4 order_system"; "----------- script [EqSystem,normalize,2x2] ---------------------"; @@ -678,7 +678,7 @@ Correct "solveForVars [c, c_2]"], Where = [], Relate = []})] => () - | _ => raise error "eqsystem.sml refine ['normalize','2x2'...]"; + | _ => error "eqsystem.sml refine ['normalize','2x2'...]"; val fmz = ["equalities [c_2 = 0, L * c + c_2 = q_0 * L ^^^ 2 / 2]", @@ -699,7 +699,7 @@ Correct "[c, c_2] from_ [c, c_2] occur_exactly_in nth_ 2\n [c_2 = 0, L * c + c_2 = q_0 * L ^^^ 2 / 2]"], Relate = []})] => () - | _ => raise error "eqsystem.sml refine ['triangular','2x2'...]"; + | _ => error "eqsystem.sml refine ['triangular','2x2'...]"; (*WN051014---------------------------------------------------------------- @@ -747,7 +747,7 @@ Matches (["4x4", "linear", "system"], _), NoMatch (["triangular", "4x4", "linear", "system"], _), Matches (["normalize", "4x4", "linear", "system"], _)] => () - | _ => raise error "eqsystem.sml: refine relaxed triangular sys NoMatch"; + | _ => error "eqsystem.sml: refine relaxed triangular sys NoMatch"; (*WN060914 does NOT match, because 3rd and 4th equ are not ordered*) val fmz = ["equalities [L * q_0 = c, \ @@ -760,7 +760,7 @@ *) case matches of [Matches (["triangular", "4x4", "linear", "system"], _)] => () - | _ => raise error "eqsystem.sml: refine relaxed triangular sys Matches"; + | _ => error "eqsystem.sml: refine relaxed triangular sys Matches"; val matches = refine fmz ["linear","system"]; @@ -874,7 +874,7 @@ val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; case nxt of ("Specify_Method",_) => () - | _ => raise error "eqsystem.sml [EqSystem,normalize,2x2] specify"; + | _ => error "eqsystem.sml [EqSystem,normalize,2x2] specify"; val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;f2str f; @@ -884,7 +884,7 @@ val (p,_,f,nxt,_,pt) = me nxt p c pt;f2str f; case nxt of (_, Subproblem ("Biegelinie", ["triangular", "2x2", "linear",_])) => () - | _ => raise error "eqsystem.sml me [EqSystem,normalize,2x2] SubProblem"; + | _ => error "eqsystem.sml me [EqSystem,normalize,2x2] SubProblem"; val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt; @@ -892,7 +892,7 @@ val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt; case nxt of (_, Specify_Method ["EqSystem", "top_down_substitution", "2x2"]) => () - | _ => raise error "eqsystem.sml me [EqSys...2x2] top_down_substitution"; + | _ => error "eqsystem.sml me [EqSys...2x2] top_down_substitution"; val (p,_,f,nxt,_,pt) = me nxt p c pt; val PblObj {probl,...} = get_obj I pt [5]; @@ -912,14 +912,14 @@ val (p,_,f,nxt,_,pt) = me nxt p c pt;f2str f; case nxt of (_, Check_Postcond ["triangular", "2x2", "linear", "system"]) => () - | _ => raise error "eqsystem.sml me Subpbl .[EqSys...2x2] finished"; + | _ => error "eqsystem.sml me Subpbl .[EqSys...2x2] finished"; val (p,_,f,nxt,_,pt) = me nxt p c pt;f2str f; val (p,_,f,nxt,_,pt) = me nxt p c pt;f2str f; if f2str f = "[c = L * q_0 / 2, c_2 = 0]" then () -else raise error "eqsystem.sml me [EqSys...2x2] finished f2str f"; +else error "eqsystem.sml me [EqSys...2x2] finished f2str f"; case nxt of (_, End_Proof') => () - | _ => raise error "eqsystem.sml me [EqSys...2x2] finished End_Proof'"; + | _ => error "eqsystem.sml me [EqSys...2x2] finished End_Proof'"; "----------- me [linear,system] ..normalize..top_down_sub..-------"; @@ -941,7 +941,7 @@ val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; case nxt of (_,Specify_Method ["EqSystem", "normalize", "2x2"]) => () - | _ => raise error "eqsystem.sml [linear,system] specify b"; + | _ => error "eqsystem.sml [linear,system] specify b"; val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;f2str f; val (p,_,f,nxt,_,pt) = me nxt p c pt;f2str f; @@ -950,10 +950,10 @@ val (p,_,f,nxt,_,pt) = me nxt p c pt;f2str f; if f2str f = "[c_2 = 0, L * c + c_2 = -1 * q_0 * L ^^^ 4 / (24 * EI)]" -then () else raise error "eqsystem.sml me simpl. before SubProblem b"; +then () else error "eqsystem.sml me simpl. before SubProblem b"; case nxt of (_, Subproblem ("Biegelinie", ["triangular", "2x2", "linear",_])) => () - | _ => raise error "eqsystem.sml me [linear,system] SubProblem b"; + | _ => error "eqsystem.sml me [linear,system] SubProblem b"; val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt; @@ -961,7 +961,7 @@ val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt; case nxt of (_, Specify_Method ["EqSystem", "top_down_substitution", "2x2"]) => () - | _ => raise error "eqsystem.sml me [EqSys...2x2] top_down_substitution b"; + | _ => error "eqsystem.sml me [EqSys...2x2] top_down_substitution b"; val (p,_,f,nxt,_,pt) = me nxt p c pt; val PblObj {probl,...} = get_obj I pt [5]; @@ -981,15 +981,15 @@ val (p,_,f,nxt,_,pt) = me nxt p c pt;f2str f; case nxt of (_, Check_Postcond ["triangular", "2x2", "linear", "system"]) => () - | _ => raise error "eqsystem.sml me Subpbl .[EqSys...2x2] finished b"; + | _ => error "eqsystem.sml me Subpbl .[EqSys...2x2] finished b"; val (p,_,f,nxt,_,pt) = me nxt p c pt;f2str f; val (p,_,f,nxt,_,pt) = me nxt p c pt;f2str f; if f2str f = "[c = -1 * q_0 * L ^^^ 4 / (24 * EI * L), c_2 = 0]" -then () else raise error "eqsystem.sml me [EqSys...2x2] finished f2str f b"; +then () else error "eqsystem.sml me [EqSys...2x2] finished f2str f b"; case nxt of (_, End_Proof') => () - | _ => raise error "eqsystem.sml me [EqSys...2x2] finished End_Proof'" b; + | _ => error "eqsystem.sml me [EqSys...2x2] finished End_Proof'" b; "----------- all systems from Biegelinie -------------------------"; @@ -1114,7 +1114,7 @@ term2str t ="[c = L * q_0, L * c + c_2 = q_0 * L ^^^ 2 / 2, c_4 = 0, c_3 = 0]"; val SOME (t,_) = rewrite_set_ thy false order_system t; if term2str t ="[c = L * q_0, L * c + c_2 = q_0 * L ^^^ 2 / 2, c_3 = 0, c_4 = 0]" then () -else raise error "eqsystem.sml: exp 7.70 normalize 4x4 by rewrite changed"; +else error "eqsystem.sml: exp 7.70 normalize 4x4 by rewrite changed"; "----- 7.70 with met normalize: "; @@ -1133,7 +1133,7 @@ val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt; case nxt of (_,Apply_Method ["EqSystem", "normalize", "4x4"]) => () - | _ => raise error "eqsystem.sml [EqSystem,normalize,4x4] specify"; + | _ => error "eqsystem.sml [EqSystem,normalize,4x4] specify"; val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f; "bbbbbbbbbbbbbbbbbbbbbbbbbbbbb outcommented vvvvvvvvvvvvvvvvvvvvvv"; (*vvvWN080102 Exception- Match raised @@ -1148,7 +1148,7 @@ val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f; val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f; if f2str f ="[c = L * q_0, L * c + c_2 = q_0 * L ^^^ 2 / 2, c_3 = 0, c_4 = 0]" -then () else raise error "eqsystem.sml: exp 7.70 normalize 4x4 by met changed"; +then () else error "eqsystem.sml: exp 7.70 normalize 4x4 by met changed"; --------------------------------------------------------------------------*) "----- 7.70 with met top_down_: "; @@ -1311,7 +1311,7 @@ val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt; case nxt of (_,Apply_Method ["EqSystem", "top_down_substitution", "4x4"]) => () - | _ => raise error "eqsystem.sml [EqSystem,top_down_,4x4] specify"; + | _ => error "eqsystem.sml [EqSystem,top_down_,4x4] specify"; val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f; val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f; val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f; @@ -1320,7 +1320,7 @@ val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f; if nxt = ("End_Proof'", End_Proof') andalso f2str f = "[c = L * q_0, c_2 = -1 * L ^^^ 2 * q_0 / 2, c_3 = 0, c_4 = 0]" -then () else raise error "eqsystem.sml: 7.70 with met top_down_: me"; +then () else error "eqsystem.sml: 7.70 with met top_down_: me"; "------- Bsp 7.71"; diff -r 95d956108461 -r 460c24a6a6ba test/Tools/isac/Knowledge/equation.sml --- a/test/Tools/isac/Knowledge/equation.sml Tue Sep 28 08:58:06 2010 +0200 +++ b/test/Tools/isac/Knowledge/equation.sml Tue Sep 28 09:06:56 2010 +0200 @@ -30,4 +30,4 @@ val Form res = (#1 o pt_extract) (pt, ([],Res)); show_pt pt; if p = ([], Res) andalso term2str res = "[x = 1]" then () -else raise error "equation.sml behav.changed for CAS solve (x+1=2, x))"; +else error "equation.sml behav.changed for CAS solve (x+1=2, x))"; diff -r 95d956108461 -r 460c24a6a6ba test/Tools/isac/Knowledge/inssort.sml --- a/test/Tools/isac/Knowledge/inssort.sml Tue Sep 28 08:58:06 2010 +0200 +++ b/test/Tools/isac/Knowledge/inssort.sml Tue Sep 28 09:06:56 2010 +0200 @@ -12,7 +12,7 @@ val rls = "ins_sort"; val (ct,_) = the (rewrite_set thy' "eval_rls" false rls ct); if ct="[1, 2, 3, 4]" then "sort [1,4,3,2] OK" -else raise error "sort [1,4,3,2] didn't work"; +else error "sort [1,4,3,2] didn't work"; "---------------- sort [1,3,2] by rewrite stepwise ----------------"; @@ -83,7 +83,7 @@ val (ct,_) = the (rewrite thy' "tless_true" "eval_rls" false thm ct); (*val ct = "[#1, #2, #3]"*) if ct="[1, 2, 3]" then "sort [1,3,2] OK" -else raise error "sort [1,3,2] didn't work"; +else error "sort [1,3,2] didn't work"; "---------------- sort [1,3,2] from script ----------------"; diff -r 95d956108461 -r 460c24a6a6ba test/Tools/isac/Knowledge/integrate.sml --- a/test/Tools/isac/Knowledge/integrate.sml Tue Sep 28 08:58:06 2010 +0200 +++ b/test/Tools/isac/Knowledge/integrate.sml Tue Sep 28 09:06:56 2010 +0200 @@ -46,7 +46,7 @@ val t = str2term "ff x is_f_x"; case t of Const ("Integrate.is'_f'_x", _) $ _ => () - | _ => raise error "integrate.sml: parsing: ff x is_f_x"; + | _ => error "integrate.sml: parsing: ff x is_f_x"; "----------- integrate by rewriting ---------------------"; @@ -99,50 +99,50 @@ "----------- test add_new_c, is_f_x ---------------------"; val term = str2term "x^^^2*c + c_2"; val cc = new_c term; -if term2str cc = "c_3" then () else raise error "integrate.sml: new_c ???"; +if term2str cc = "c_3" then () else error "integrate.sml: new_c ???"; val SOME (id,t') = eval_add_new_c "" "Integrate.add'_new'_c" term thy; if term2str t' = "x ^^^ 2 * c + c_2 = x ^^^ 2 * c + c_2 + c_3" then () -else raise error "intergrate.sml: diff. eval_add_new_c"; +else error "intergrate.sml: diff. eval_add_new_c"; val cc = ("Integrate.add'_new'_c", eval_add_new_c "add_new_c_"); val SOME (thmstr, thm) = get_calculation1_ thy cc term; val SOME (t',_) = rewrite_set_ thy true add_new_c term; if term2str t' = "x ^^^ 2 * c + c_2 + c_3" then () -else raise error "intergrate.sml: diff. rewrite_set add_new_c 1"; +else error "intergrate.sml: diff. rewrite_set add_new_c 1"; val term = str2term "ff x = x^^^2*c + c_2"; val SOME (t',_) = rewrite_set_ thy true add_new_c term; if term2str t' = "ff x = x ^^^ 2 * c + c_2 + c_3" then () -else raise error "intergrate.sml: diff. rewrite_set add_new_c 2"; +else error "intergrate.sml: diff. rewrite_set add_new_c 2"; (*WN080222 replace call_new_c with add_new_c---------------------- val term = str2term "new_c (c * x^^^2 + c_2)"; val SOME (_,t') = eval_new_c 0 0 term 0; if term2s t' = "new_c c * x ^^^ 2 + c_2 = c_3" then () -else raise error "integrate.sml: eval_new_c ???"; +else error "integrate.sml: eval_new_c ???"; val t = str2term "matches (?u + new_c ?v) (x ^^^ 2 / 2)"; val SOME (_,t') = eval_matches "" "Tools.matches" t thy; term2s t'; if term2s t' = "matches (?u + new_c ?v) (x ^^^ 2 / 2) = False" then () -else raise error "integrate.sml: matches new_c = False"; +else error "integrate.sml: matches new_c = False"; val t = str2term "matches (?u + new_c ?v) (x ^^^ 2 / 2 + new_c x ^^^ 2 / 2)"; val SOME (_,t') = eval_matches "" "Tools.matches" t thy; term2s t'; if term2s t'="matches (?u + new_c ?v) (x ^^^ 2 / 2 + new_c x ^^^ 2 / 2) = True" -then () else raise error "integrate.sml: matches new_c = True"; +then () else error "integrate.sml: matches new_c = True"; val t = str2term "ff x is_f_x"; val SOME (_,t') = eval_is_f_x "" "" t thy; term2s t'; if term2s t' = "(ff x is_f_x) = True" then () -else raise error "integrate.sml: eval_is_f_x --> true"; +else error "integrate.sml: eval_is_f_x --> true"; val t = str2term "q_0/2 * L * x is_f_x"; val SOME (_,t') = eval_is_f_x "" "" t thy; term2s t'; if term2s t' = "(q_0 / 2 * L * x is_f_x) = False" then () -else raise error "integrate.sml: eval_is_f_x --> false"; +else error "integrate.sml: eval_is_f_x --> false"; val conditions_in_integration = Rls {id="conditions_in_integration", @@ -183,20 +183,20 @@ "----- stepwise from the rulesets in simplify_Integral and below-----"; val rls = norm_Rational_noadd_fractions; case rewrite_set_inst_ thy true subs rls t of - SOME _ => raise error "integrate.sml simplify by ruleset norm_Rational_.#2" + SOME _ => error "integrate.sml simplify by ruleset norm_Rational_.#2" | NONE => (); "===== test 2"; val rls = order_add_mult_in; val SOME (t,[]) = rewrite_set_ thy true rls t; if term2str t = "1 / EI * (L * (q_0 * x) / 2 + -1 * (q_0 * x ^^^ 2) / 2)" then() -else raise error "integrate.sml simplify by ruleset order_add_mult_in #2"; +else error "integrate.sml simplify by ruleset order_add_mult_in #2"; "===== test 3"; val rls = discard_parentheses; val SOME (t,[]) = rewrite_set_ thy true rls t; if term2str t = "1 / EI * (L * q_0 * x / 2 + -1 * q_0 * x ^^^ 2 / 2)" then () -else raise error "integrate.sml simplify by ruleset discard_parenth.. #3"; +else error "integrate.sml simplify by ruleset discard_parenth.. #3"; "===== test 4"; val rls = @@ -223,14 +223,14 @@ val SOME (t, []) = rewrite_set_inst_ thy true subs rls t; if term2str t = "1 / EI * (L * q_0 / 2 * x + -1 * q_0 / 2 * x ^^^ 2)" then () -else raise error "integrate.sml simplify by ruleset separate_bdv.. #4"; +else error "integrate.sml simplify by ruleset separate_bdv.. #4"; "===== test 5"; val t = str2term "1/EI * (L * q_0 * x / 2 + -1 * q_0 * x^^^2 / 2)"; val rls = simplify_Integral; val SOME (t,[]) = rewrite_set_inst_ thy true subs rls t; if term2str t = "1 / EI * (L * q_0 / 2 * x + -1 * q_0 / 2 * x ^^^ 2)" then () -else raise error "integrate.sml, simplify_Integral #99"; +else error "integrate.sml, simplify_Integral #99"; "........... 2nd integral ........................................"; @@ -247,7 +247,7 @@ "Integral 1 / EI * (L * q_0 / 4 * x ^^^ 2 + -1 * q_0 / 6 * x ^^^ 3) D x" GOON: still 2*3 TODO... "Integral 1 / EI * (L * q_0 / 4 * x ^^^ 2 + -1 * q_0 / (2 * 3) * x ^^^ 3) D x" -then () else raise error "integrate.sml, simplify_Integral #198"; +then () else error "integrate.sml, simplify_Integral #198"; trace_rewrite := true; @@ -263,7 +263,7 @@ val SOME (t,[]) = rewrite_set_ thy true rls t; if term2str t = "1 / EI * (L * q_0 / 4 * (x ^^^ 3 / 3) + -1 * q_0 / 6 * (x ^^^ 4 / 4))" -then () else raise error "integrate.sml, simplify_Integral #199"; +then () else error "integrate.sml, simplify_Integral #199"; @@ -286,45 +286,45 @@ val str = rewrit_sinst subs rls "Integral x D x"; val str = rewrit_sinst subs rls "Integral c * x ^^^ 2 + c_2 D x"; if str = "c * (x ^^^ 3 / 3) + c_2 * x" -then () else raise error "integrate.sml: diff.behav. in integration_rules"; +then () else error "integrate.sml: diff.behav. in integration_rules"; val rls = "add_new_c"; val str = rewrit_sinst subs rls "c * (x ^^^ 3 / 3) + c_2 * x"; if str = "c * (x ^^^ 3 / 3) + c_2 * x + c_3" then () -else raise error "integrate.sml: diff.behav. in add_new_c simpl."; +else error "integrate.sml: diff.behav. in add_new_c simpl."; val str = rewrit_sinst subs rls "F x = x ^^^ 3 / 3 + x"; if str = "F x = x ^^^ 3 / 3 + x + c"(*not "F x + c =..."*) then () -else raise error "integrate.sml: diff.behav. in add_new_c equation"; +else error "integrate.sml: diff.behav. in add_new_c equation"; val rls = "simplify_Integral"; (*~~~~~~~~~~~~~~~~~~~~~~~~~~~*) val str = "ff x = c * x + -1 * q_0 * (x ^^^ 2 / 2) + c_2"; val str = rewrit_sinst subs rls str; if str = "ff x = c_2 + c * x + -1 * q_0 / 2 * x ^^^ 2" -then () else raise error "integrate.sml: diff.behav. in simplify_I #1"; +then () else error "integrate.sml: diff.behav. in simplify_I #1"; val rls = "integration"; (*~~~~~~~~~~~~~~~~~~~~~~~~~~~*) val str = rewrit_sinst subs rls "Integral c * x ^^^ 2 + c_2 D x"; if str = "c_3 + c_2 * x + c / 3 * x ^^^ 3" -then () else raise error "integrate.sml: diff.behav. in integration #1"; +then () else error "integrate.sml: diff.behav. in integration #1"; val str = rewrit_sinst subs rls "Integral 3*x^^^2 + 2*x + 1 D x"; if str = "c + x + x ^^^ 2 + x ^^^ 3" then () -else raise error "integrate.sml: diff.behav. in integration #2"; +else error "integrate.sml: diff.behav. in integration #2"; val str = rewrit_sinst subs rls "Integral 1 / EI * (L * q_0 / 2 * x + -1 * q_0 / 2 * x ^^^ 2) D x"; if str = "c + 1 / EI * (L * q_0 / 4 * x ^^^ 2 + -1 * q_0 / 6 * x ^^^ 3)" -then () else raise error "integrate.sml: diff.behav. in integration #3"; +then () else error "integrate.sml: diff.behav. in integration #3"; val str = "Integral "^str^" D x"; val str = rewrit_sinst subs rls str; if str = "c_2 + c * x + 1 / EI * (L * q_0 / 12 * x ^^^ 3 + -1 * q_0 / 24 * x ^^^ 4)" -then () else raise error "integrate.sml: diff.behav. in integration #4"; +then () else error "integrate.sml: diff.behav. in integration #4"; "----------- rewrite 3rd integration in 7.27 ------------"; @@ -337,11 +337,11 @@ val SOME(t,_)= rewrite_set_inst_ thy true bdv simplify_Integral t; if term2str t = "Integral 1 / EI * (L * q_0 / 2 * x + -1 * q_0 / 2 * x ^^^ 2) D x" then () -else raise error "integrate.sml 3rd integration in 7.27, simplify_Integral"; +else error "integrate.sml 3rd integration in 7.27, simplify_Integral"; val SOME(t,_)= rewrite_set_inst_ thy true bdv integration t; if term2str t = "c + 1 / EI * (L * q_0 / 4 * x ^^^ 2 + -1 * q_0 / 6 * x ^^^ 3)" -then () else raise error "integrate.sml 3rd integration in 7.27, integration"; +then () else error "integrate.sml 3rd integration in 7.27, integration"; "----------- check probem type --------------------------"; @@ -357,7 +357,7 @@ val t2 = (term_of o hd o tl) chkmodel; val t3 = (term_of o hd o tl o tl) chkmodel; case t3 of Const ("Integrate.antiDerivative", _) $ _ => () - | _ => raise error "integrate.sml: Integrate.antiDerivative ???"; + | _ => error "integrate.sml: Integrate.antiDerivative ???"; val model = {Given =["functionTerm f_f", "integrateBy v_v"], Where =[], @@ -369,7 +369,7 @@ val t2 = (term_of o hd o tl) chkmodel; val t3 = (term_of o hd o tl o tl) chkmodel; case t3 of Const ("Integrate.antiDerivativeName", _) $ _ => () - | _ => raise error "integrate.sml: Integrate.antiDerivativeName"; + | _ => error "integrate.sml: Integrate.antiDerivativeName"; "----- compare 'Find's from problem, script, formalization -------"; val {ppc,...} = get_pbt ["named","integrate","function"]; @@ -377,18 +377,18 @@ F1_ as Free ("F_", F1_type))) = last_elem ppc; val {scr = Script sc,... } = get_met ["diff","integration","named"]; val [_,_, F2_] = formal_args sc; -if F1_ = F2_ then () else raise error "integrate.sml: unequal find's"; +if F1_ = F2_ then () else error "integrate.sml: unequal find's"; val ((dsc as Const ("Integrate.antiDerivativeName", _)) $ Free ("ff", F3_type)) = str2term "antiDerivativeName ff"; -if is_dsc dsc then () else raise error "integrate.sml: no description"; +if is_dsc dsc then () else error "integrate.sml: no description"; if F1_type = F3_type then () -else raise error "integrate.sml: unequal types in find's"; +else error "integrate.sml: unequal types in find's"; show_ptyps(); val pbl = get_pbt ["integrate","function"]; case #cas pbl of SOME (Const ("Integrate.Integrate",_) $ _) => () - | _ => raise error "integrate.sml: Integrate.Integrate ???"; + | _ => error "integrate.sml: Integrate.Integrate ???"; "----------- check Scripts ------------------------------"; @@ -432,7 +432,7 @@ val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f; val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f; if f2str f = "c + x + 1 / 3 * x ^^^ 3" then () -else raise error "integrate.sml: method [diff,integration]"; +else error "integrate.sml: method [diff,integration]"; "----------- me method [diff,integration,named] ---------"; @@ -457,7 +457,7 @@ val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f; if f2str f = "F x = c + x + 1 / 3 * x ^^^ 3" then() -else raise error "integrate.sml: method [diff,integration,named]"; +else error "integrate.sml: method [diff,integration,named]"; "----------- me met [diff,integration,named] Biegelinie.Q"; @@ -484,7 +484,7 @@ val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f; if f2str f = "Q x = c + -1 * q_0 * x" then() -else raise error "integrate.sml: method [diff,integration,named] .Q"; +else error "integrate.sml: method [diff,integration,named] .Q"; "----------- interSteps [diff,integration] --------------"; @@ -503,7 +503,7 @@ interSteps 1 ([1],Res); val ((pt,p),_) = get_calc 1; show_pt pt; if existpt' ([1,3], Res) pt then () -else raise error "integrate.sml: interSteps on Rewrite_Set_Inst 1"; +else error "integrate.sml: interSteps on Rewrite_Set_Inst 1"; "----------- method analog to rls 'integration' ---------"; @@ -551,7 +551,7 @@ autoCalculate 1 CompleteCalc; val ((pt,p),_) = get_calc 1; show_pt pt; if existpt' ([3], Res) pt then () -else raise error "integrate.sml: test-script doesnt work"; +else error "integrate.sml: test-script doesnt work"; "----------- Ambiguous input: Integral ?u + ?v D ?bdv = ."; @@ -587,7 +587,7 @@ *) if existpt' ([1,1,5], Res) pt then () -else raise error "integrate.sml: interSteps on Rewrite_Set_Inst 2"; +else error "integrate.sml: interSteps on Rewrite_Set_Inst 2"; "----------- CAS input ----------------------------------"; @@ -595,7 +595,7 @@ "----------- CAS input ----------------------------------"; val t = str2term "Integrate (x^^^2 + x + 1, x)"; case t of Const ("Integrate.Integrate", _) $ _ => () - | _ => raise error "diff.sml behav.changed for Integrate (..., x)"; + | _ => error "diff.sml behav.changed for Integrate (..., x)"; atomty t; states:=[]; @@ -609,7 +609,7 @@ show_pt pt; (* WN070703 does not work like Diff due to error in next-pos if p = ([], Res) andalso term2str res = "5 * a" then () -else raise error "diff.sml behav.changed for Integrate (x^2 + x + 1, x)"; +else error "diff.sml behav.changed for Integrate (x^2 + x + 1, x)"; *) ===== inhibit exn ============================================================*) diff -r 95d956108461 -r 460c24a6a6ba test/Tools/isac/Knowledge/logexp.sml --- a/test/Tools/isac/Knowledge/logexp.sml Tue Sep 28 08:58:06 2010 +0200 +++ b/test/Tools/isac/Knowledge/logexp.sml Tue Sep 28 09:06:56 2010 +0200 @@ -48,7 +48,7 @@ val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; case nxt of ("Apply_Method",_) => () - | _ => raise error "logexp.sml setup innsbruck"; + | _ => error "logexp.sml setup innsbruck"; val (p,_,f,nxt,_,pt) = me nxt p c pt;f2str f; diff -r 95d956108461 -r 460c24a6a6ba test/Tools/isac/Knowledge/poly.sml --- a/test/Tools/isac/Knowledge/poly.sml Tue Sep 28 08:58:06 2010 +0200 +++ b/test/Tools/isac/Knowledge/poly.sml Tue Sep 28 09:06:56 2010 +0200 @@ -32,7 +32,7 @@ "-------- check is'_polyexp is_polyexp ------------------"; "-------- check is'_polyexp is_polyexp ------------------"; if is_polyexp @{term "x / x"} -then raise error "poly.sml: check is'_polyexp is_polyexp" else (); +then error "poly.sml: check is'_polyexp is_polyexp" else (); (*===== inhibit exn ?=========================================================== @@ -128,7 +128,7 @@ if (term2str t) = "17 + 15 * x ^^^ 2 + -48 * x ^^^ 4 + 3 * x ^^^ 5 + 6 * x ^^^ 7 + -8 * x ^^^ 9" then () -else raise error "poly.sml: diff.behav. in make_polynomial 1"; +else error "poly.sml: diff.behav. in make_polynomial 1"; (*SPB Schalk I p.63 No.275b*) val t = str2term @@ -139,7 +139,7 @@ "3 * x ^^^ 4 + -2 * x ^^^ 3 * y + -5 * x ^^^ 2 * y ^^^ 2 + \ \4 * x * y ^^^ 3 +\n-2 * y ^^^ 4" then () -else raise error "poly.sml: diff.behav. in make_polynomial 2"; +else error "poly.sml: diff.behav. in make_polynomial 2"; (*SPB Schalk I p.63 No.279b*) val t = str2term @@ -150,7 +150,7 @@ if (term2str t) = "a * b * c * d + -1 * a * b * c * x + -1 * a * b * d * x + a * b * x ^^^ 2 +\n-1 * a * c * d * x +\na * c * x ^^^ 2 +\na * d * x ^^^ 2 +\n-1 * a * x ^^^ 3 +\n-1 * b * c * d * x +\nb * c * x ^^^ 2 +\nb * d * x ^^^ 2 +\n-1 * b * x ^^^ 3 +\nc * d * x ^^^ 2 +\n-1 * c * x ^^^ 3 +\n-1 * d * x ^^^ 3 +\nx ^^^ 4" then () -else raise error "poly.sml: diff.behav. in make_polynomial 3"; +else error "poly.sml: diff.behav. in make_polynomial 3"; (*SPB Schalk I p.63 No.291*) val t = str2term @@ -160,7 +160,7 @@ if (term2str t) = "50 + -770 * x + 4520 * x ^^^ 2 + -16320 * x ^^^ 3 + -26880 * x ^^^ 4" then () -else raise error "poly.sml: diff.behav. in make_polynomial 4"; +else error "poly.sml: diff.behav. in make_polynomial 4"; (*SPB Schalk I p.64 No.295c*) val t = str2term @@ -171,7 +171,7 @@ "169 * a ^^^ 8 * b ^^^ 18 * c ^^^ 2 + -312 * a ^^^ 7 * b ^^^ 15 * c ^^^ 10\ \ +\n144 * a ^^^ 6 * b ^^^ 12 * c ^^^ 18" then () -else raise error "poly.sml: diff.behav. in make_polynomial 5"; +else error "poly.sml: diff.behav. in make_polynomial 5"; (*SPB Schalk I p.64 No.299a*) val t = str2term @@ -181,7 +181,7 @@ if (term2str t) = "x ^^^ 2 + -1 * y ^^^ 2" then () -else raise error "poly.sml: diff.behav. in make_polynomial 6"; +else error "poly.sml: diff.behav. in make_polynomial 6"; (*SPB Schalk I p.64 No.300c*) val t = str2term @@ -191,14 +191,14 @@ if (term2str t) = "-1 + 9 * x ^^^ 4 * y ^^^ 2" then () -else raise error "poly.sml: diff.behav. in make_polynomial 7"; +else error "poly.sml: diff.behav. in make_polynomial 7"; (*SPB Schalk I p.64 No.302*) val t = str2term "(13*x^^^2 + 5)*(13*x^^^2 - 5) - (5*x^^^2 + 3)*(5*x^^^2 - 3) - (12*x^^^2 + 4)*(12*x^^^2 - 4)"; val SOME (t,_) = rewrite_set_ thy false make_polynomial t; term2str t; if term2str t = "0" then () -else raise error "poly.sml: diff.behav. in make_polynomial 8"; +else error "poly.sml: diff.behav. in make_polynomial 8"; (* Bei Berechnung sollte 3 mal real_plus_minus_binom1_p aus expand_poly verwendet werden *) @@ -206,7 +206,7 @@ val t = str2term "((x^^^2 + 1)*(x^^^2 - 1))^^^2"; val SOME (t,_) = rewrite_set_ thy false make_polynomial t; term2str t; if (term2str t) = "1 + 2 * x ^^^ 4 + 2 * -2 * x ^^^ 4 + x ^^^ 8" then () -else raise error "poly.sml: diff.behav. in make_polynomial: not confluent \ +else error "poly.sml: diff.behav. in make_polynomial: not confluent \ \2 * x ^^^ 4 + 2 * -2 * x ^^^ 4 = -2 * x ^^^ 4 works again"; @@ -215,38 +215,38 @@ val t = str2term "1 + 2 * x ^^^ 4 + 2 * -2 * x ^^^ 4 + x ^^^ 8"; val SOME (t,_) = rewrite_set_ thy false make_polynomial t; term2str t; if (term2str t) = "1 + -2 * x ^^^ 4 + x ^^^ 8" then () -else raise error "poly.sml: diff.behav. in make_polynomial 9b"; +else error "poly.sml: diff.behav. in make_polynomial 9b"; (*SPB Schalk I p.64 No.296a*) val t = str2term "(x - a)^^^3"; val SOME (t,_) = rewrite_set_ thy false make_polynomial t; term2str t; if (term2str t) = "-1 * a ^^^ 3 + 3 * a ^^^ 2 * x + -3 * a * x ^^^ 2 + x ^^^ 3" -then () else raise error "poly.sml: diff.behav. in make_polynomial 10"; +then () else error "poly.sml: diff.behav. in make_polynomial 10"; (*SPB Schalk I p.64 No.296c*) val t = str2term "(-3*x - 4*y)^^^3"; val SOME (t,_) = rewrite_set_ thy false make_polynomial t; term2str t; if (term2str t) = "-27 * x ^^^ 3 + -108 * x ^^^ 2 * y + -144 * x * y ^^^ 2 + -64 * y ^^^ 3" -then () else raise error "poly.sml: diff.behav. in make_polynomial 11"; +then () else error "poly.sml: diff.behav. in make_polynomial 11"; (*SPB Schalk I p.62 No.242c*) val t = str2term "x^^^(-4)*(x^^^(-4)*y^^^(-2))^^^(-1)*y^^^(-2)"; val SOME (t,_) = rewrite_set_ thy false make_polynomial t; term2str t; if (term2str t) = "1" then () -else raise error "poly.sml: diff.behav. in make_polynomial 12"; +else error "poly.sml: diff.behav. in make_polynomial 12"; (*SPB Schalk I p.60 No.209a*) val t = str2term "a^^^(7-x) * a^^^x"; val SOME (t,_) = rewrite_set_ thy false make_polynomial t; term2str t; if term2str t = "a ^^^ 7" then () -else raise error "poly.sml: diff.behav. in make_polynomial 13"; +else error "poly.sml: diff.behav. in make_polynomial 13"; (*SPB Schalk I p.60 No.209d*) val t = str2term "d^^^x * d^^^(x+1) * d^^^(2 - 2*x)"; val SOME (t,_) = rewrite_set_ thy false make_polynomial t; term2str t; if term2str t = "d ^^^ 3" then () -else raise error "poly.sml: diff.behav. in make_polynomial 14"; +else error "poly.sml: diff.behav. in make_polynomial 14"; (*---------------------------------------------------------------------*) @@ -257,7 +257,7 @@ val t = str2term "(a + 2*b)*(a^^^2 + 4*b^^^2)*(a - 2*b) - (a - 6*b)*(a^^^2 + 36*b^^^2)*(a + 6*b)"; val SOME (t,_) = rewrite_set_ thy false make_polynomial t; term2str t; if term2str t = "1280 * b ^^^ 4" then () -else raise error "poly.sml: diff.behav. in make_polynomial 14b"; +else error "poly.sml: diff.behav. in make_polynomial 14b"; (* Richtig - aber Binomische Formel wurde nicht verwendet! *) @@ -268,62 +268,62 @@ val t = str2term "a^^^2*a^^^(-2)"; val SOME (t,_) = rewrite_set_ thy false make_polynomial t; term2str t; if term2str t = "1" then () -else raise error "poly.sml: diff.behav. in make_polynomial 15"; +else error "poly.sml: diff.behav. in make_polynomial 15"; (*SPO*) val t = str2term "a + a + a"; val SOME (t,_) = rewrite_set_ thy false make_polynomial t; term2str t; if term2str t = "3 * a" then () -else raise error "poly.sml: diff.behav. in make_polynomial 16"; +else error "poly.sml: diff.behav. in make_polynomial 16"; (*SPO*) val t = str2term "a + b + b + b"; val SOME (t,_) = rewrite_set_ thy false make_polynomial t; term2str t; if term2str t = "a + 3 * b" then () -else raise error "poly.sml: diff.behav. in make_polynomial 17"; +else error "poly.sml: diff.behav. in make_polynomial 17"; (*SPO*) val t = str2term "a^^^2*b*b^^^(-1)"; val SOME (t,_) = rewrite_set_ thy false make_polynomial t; term2str t; if term2str t = "a ^^^ 2" then () -else raise error "poly.sml: diff.behav. in make_polynomial 18"; +else error "poly.sml: diff.behav. in make_polynomial 18"; (*SPO*) val t = str2term "a^^^2*a^^^(-2)"; val SOME (t,_) = rewrite_set_ thy false make_polynomial t; term2str t; if (term2str t) = "1" then () -else raise error "poly.sml: diff.behav. in make_polynomial 19"; +else error "poly.sml: diff.behav. in make_polynomial 19"; (*SPO*) val t = str2term "b + a - b"; val SOME (t,_) = rewrite_set_ thy false make_polynomial t; term2str t; if (term2str t) = "a" then () -else raise error "poly.sml: diff.behav. in make_polynomial 20"; +else error "poly.sml: diff.behav. in make_polynomial 20"; (*SPO*) val t = str2term "b * a * a"; val SOME (t,_) = rewrite_set_ thy false make_polynomial t; term2str t; if term2str t = "a ^^^ 2 * b" then () -else raise error "poly.sml: diff.behav. in make_polynomial 21"; +else error "poly.sml: diff.behav. in make_polynomial 21"; (*SPO*) val t = str2term "(a^^^2)^^^3"; val SOME (t,_) = rewrite_set_ thy false make_polynomial t; term2str t; if term2str t = "a ^^^ 6" then () -else raise error "poly.sml: diff.behav. in make_polynomial 22"; +else error "poly.sml: diff.behav. in make_polynomial 22"; (*SPO*) val t = str2term "x^^^2 * y^^^2 + x * x^^^2 * y"; val SOME (t,_) = rewrite_set_ thy false make_polynomial t; term2str t; if term2str t = "x ^^^ 3 * y + x ^^^ 2 * y ^^^ 2" then () -else raise error "poly.sml: diff.behav. in make_polynomial 23"; +else error "poly.sml: diff.behav. in make_polynomial 23"; (*SPO*) val t = (term_of o the o (parse thy)) "a^^^2 * (-a)^^^2"; val SOME (t,_) = rewrite_set_ thy false make_polynomial t; term2str t; if (term2str t) = "a ^^^ 4" then () -else raise error "poly.sml: diff.behav. in make_polynomial 24"; +else error "poly.sml: diff.behav. in make_polynomial 24"; (*SPO*) val t = str2term "a * b * b^^^(-1) + a"; val SOME (t,_) = rewrite_set_ thy false make_polynomial t; term2str t; if (term2str t) = "2 * a" then () -else raise error "poly.sml: diff.behav. in make_polynomial 25"; +else error "poly.sml: diff.behav. in make_polynomial 25"; (*SPO*) val t = str2term "a*c*b^^^(2*n) + 3*a + 5*b^^^(2*n)*c*b"; val SOME (t,_) = rewrite_set_ thy false make_polynomial t; term2str t; if (term2str t) = "3 * a + 5 * b ^^^ (1 + 2 * n) * c + a * b ^^^ (2 * n) * c" -then () else raise error "poly.sml: diff.behav. in make_polynomial 26"; +then () else error "poly.sml: diff.behav. in make_polynomial 26"; (*MG.27.6.03 -------------vvv-: Verschachtelte Terme -----------*) @@ -332,12 +332,12 @@ val SOME (t,_) = rewrite_set_ thy false make_polynomial t; term2str t; if term2str t = "(1 + x + a * x * y) ^^^ (1 + x + a * x * y)" - then () else raise error "poly.sml: diff.behav. in make_polynomial 27";(*SPO*) + then () else error "poly.sml: diff.behav. in make_polynomial 27";(*SPO*) val t = str2term "(1 + x*(y*z)*zz)^^^(1 + x*(y*z)*zz)"; val SOME (t,_) = rewrite_set_ thy false make_polynomial t; term2str t; if term2str t = "(1 + x * y * z * zz) ^^^ (1 + x * y * z * zz)" - then () else raise error "poly.sml: diff.behav. in make_polynomial 28"; + then () else error "poly.sml: diff.behav. in make_polynomial 28"; "-------- Script 'simplification for_polynomials' ----------------"; "-------- Script 'simplification for_polynomials' ----------------"; @@ -358,7 +358,7 @@ (*0*) case refine fmz ["polynomial","simplification"]of [Matches (["polynomial", "simplification"], _)] => () - | _ => raise error "poly.sml diff.behav. in check pbl, refine"; + | _ => error "poly.sml diff.behav. in check pbl, refine"; (*...if there is an error, then ...*) (*1*) @@ -385,7 +385,7 @@ val SOME (t',_) = rewrite_set_ thy false prls t; trace_rewrite:=false; if t' = HOLogic.true_const then () -else raise error "poly.sml: diff.behav. in check pbl 'polynomial.."; +else error "poly.sml: diff.behav. in check pbl 'polynomial.."; (*... if this works, but (*1*) does still NOT work, check types:*) (*4*) @@ -421,7 +421,7 @@ val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f; if f2str f = "17 + 15 * x ^^^ 2 + -48 * x ^^^ 4 + 3 * x ^^^ 5 + 6 * x ^^^ 7 + -8 * x ^^^ 9" -then () else raise error "poly.sml diff.behav. in me Schalk I p.63 No.267b"; +then () else error "poly.sml diff.behav. in me Schalk I p.63 No.267b"; "-------- interSteps for Schalk 299a -----------------------------"; @@ -440,12 +440,12 @@ interSteps 1 ([1],Res)(* syserror in detailstep *); val ((pt,p),_) = get_calc 1; show_pt pt; if existpt' ([1,1], Frm) pt then () -else raise error "poly.sml: interSteps doesnt work again 1"; +else error "poly.sml: interSteps doesnt work again 1"; interSteps 1 ([1,1],Res)(* syserror in detailstep *); val ((pt,p),_) = get_calc 1; show_pt pt; if existpt' ([1,1,1], Frm) pt then () -else raise error "poly.sml: interSteps doesnt work again 2"; +else error "poly.sml: interSteps doesnt work again 2"; "-------- norm_Poly NOT COMPLETE ---------------------------------"; @@ -464,7 +464,7 @@ val t2 = str2term "3 * a + 3 * b + 2 * b"; if ord_make_polynomial true Poly.thy [] (t1, t2) then () -else raise error "poly.sml: diff.behav. in ord_make_polynomial"; +else error "poly.sml: diff.behav. in ord_make_polynomial"; (*WN071202: ^^^ why then is there no rewriting ...*) val term = str2term "2*b + (3*a + 3*b)"; diff -r 95d956108461 -r 460c24a6a6ba test/Tools/isac/Knowledge/polyeq.sml --- a/test/Tools/isac/Knowledge/polyeq.sml Tue Sep 28 08:58:06 2010 +0200 +++ b/test/Tools/isac/Knowledge/polyeq.sml Tue Sep 28 09:06:56 2010 +0200 @@ -41,60 +41,60 @@ val t1 = (term_of o the o (parse thy)) "lhs (-8 - 2*x + x^^^2 = 0)"; val SOME (t,_) = rewrite_set_ PolyEq.thy false PolyEq_prls t1; if ((term2str t) = "-8 - 2 * x + x ^^^ 2") then () - else raise error "polyeq.sml: diff.behav. in lhs"; + else error "polyeq.sml: diff.behav. in lhs"; val t2 = (term_of o the o (parse thy)) "(-8 - 2*x + x^^^2) is_expanded_in x"; val SOME (t,_) = rewrite_set_ PolyEq.thy false PolyEq_prls t2; if (term2str t) = "True" then () - else raise error "polyeq.sml: diff.behav. 1 in is_expended_in"; + else error "polyeq.sml: diff.behav. 1 in is_expended_in"; val t0 = (term_of o the o (parse thy)) "(sqrt(x)) is_poly_in x"; val SOME (t,_) = rewrite_set_ PolyEq.thy false PolyEq_prls t0; if (term2str t) = "False" then () - else raise error "polyeq.sml: diff.behav. 2 in is_poly_in"; + else error "polyeq.sml: diff.behav. 2 in is_poly_in"; val t3 = (term_of o the o (parse thy)) "(-8 + (-1)*2*x + x^^^2) is_poly_in x"; val SOME (t,_) = rewrite_set_ PolyEq.thy false PolyEq_prls t3; if (term2str t) = "True" then () - else raise error "polyeq.sml: diff.behav. 3 in is_poly_in"; + else error "polyeq.sml: diff.behav. 3 in is_poly_in"; val t4 = (term_of o the o (parse thy)) "(lhs (-8 + (-1)*2*x + x^^^2 = 0)) is_expanded_in x"; val SOME (t,_) = rewrite_set_ PolyEq.thy false PolyEq_prls t4; if (term2str t) = "True" then () - else raise error "polyeq.sml: diff.behav. 4 in is_expended_in"; + else error "polyeq.sml: diff.behav. 4 in is_expended_in"; val t6 = (term_of o the o (parse thy)) "(lhs (-8 - 2*x + x^^^2 = 0)) is_expanded_in x"; val SOME (t,_) = rewrite_set_ PolyEq.thy false PolyEq_prls t6; if (term2str t) = "True" then () - else raise error "polyeq.sml: diff.behav. 5 in is_expended_in"; + else error "polyeq.sml: diff.behav. 5 in is_expended_in"; val t3 = (term_of o the o (parse thy))"((-8 - 2*x + x^^^2) has_degree_in x) = 2"; val SOME (t,_) = rewrite_set_ PolyEq.thy false PolyEq_prls t3; if (term2str t) = "True" then () - else raise error "polyeq.sml: diff.behav. in has_degree_in_in"; + else error "polyeq.sml: diff.behav. in has_degree_in_in"; val t3 = (term_of o the o (parse thy)) "((sqrt(x)) has_degree_in x) = 2"; val SOME (t,_) = rewrite_set_ PolyEq.thy false PolyEq_prls t3; if (term2str t) = "False" then () - else raise error "polyeq.sml: diff.behav. 6 in has_degree_in_in"; + else error "polyeq.sml: diff.behav. 6 in has_degree_in_in"; val t4 = (term_of o the o (parse thy)) "((-8 - 2*x + x^^^2) has_degree_in x) = 1"; val SOME (t,_) = rewrite_set_ PolyEq.thy false PolyEq_prls t4; if (term2str t) = "False" then () - else raise error "polyeq.sml: diff.behav. 7 in has_degree_in_in"; + else error "polyeq.sml: diff.behav. 7 in has_degree_in_in"; val t5 = (term_of o the o (parse thy)) "((-8 - 2*x + x^^^2) has_degree_in x) = 2"; val SOME (t,_) = rewrite_set_ PolyEq.thy false PolyEq_prls t5; if (term2str t) = "True" then () - else raise error "polyeq.sml: diff.behav. 8 in has_degree_in_in"; + else error "polyeq.sml: diff.behav. 8 in has_degree_in_in"; "----------- test matching problems --------------------------0---"; @@ -138,7 +138,7 @@ val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; case f of Form' (FormKF (~1,EdUndef,0,Nundef,"[]")) => () - | _ => raise error "polyeq.sml: diff.behav. in 1 = 0 -> []"; + | _ => error "polyeq.sml: diff.behav. in 1 = 0 -> []"; "----- d0_true ------"; (*EP-7*) @@ -156,7 +156,7 @@ val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; case f of Form' (FormKF (~1,EdUndef,0,Nundef,"UniversalList")) => () - | _ => raise error "polyeq.sml: diff.behav. in 0 = 0 -> UniversalList"; + | _ => error "polyeq.sml: diff.behav. in 0 = 0 -> UniversalList"; "-------------------- test thm's degree_2 ------------------------------------------"; "-------------------- test thm's degree_2 ------------------------------------------"; @@ -189,7 +189,7 @@ ([5],Res) "[x = 2, x = -1]" Check_Postcond*) val (p,_,f,nxt,_,pt) = me nxt p c pt; case f of Form' (FormKF (~1,EdUndef,0,Nundef,"[x = 2, x = -1]")) => () - | _ => raise error "polyeq.sml: diff.behav. in -2 + (-1)*x + x^2 = 0 -> [x = 2, x = -1]"; + | _ => error "polyeq.sml: diff.behav. in -2 + (-1)*x + x^2 = 0 -> [x = 2, x = -1]"; "----- d2_pqformula1_neg ------"; (*EP-8*) @@ -213,7 +213,7 @@ val (p,_,f,nxt,_,pt) = me nxt p c pt; val asm = get_assumptions_ pt p; if f = Form' (FormKF (~1,EdUndef,0,Nundef,"[]")) andalso asm = [] then () -else raise error "polyeq.sml: diff.behav. in 2 +(-1)*x + x^^^2 = 0"; +else error "polyeq.sml: diff.behav. in 2 +(-1)*x + x^^^2 = 0"; "----- d2_pqformula2 ------"; val fmz = ["equality (-2 +(-1)*x + 1*x^^^2 = 0)", "solveFor x","solutions L"]; @@ -232,7 +232,7 @@ val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; case f of Form' (FormKF (~1,EdUndef,0,Nundef,"[x = 2, x = -1]")) => () - | _ => raise error "polyeq.sml: diff.behav. in -2 + (-1)*x + x^2 = 0 -> [x = 2, x = -1]"; + | _ => error "polyeq.sml: diff.behav. in -2 + (-1)*x + x^2 = 0 -> [x = 2, x = -1]"; "----- d2_pqformula2_neg ------"; @@ -273,7 +273,7 @@ val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; case f of Form' (FormKF (~1,EdUndef,0,Nundef,"[x = 1, x = -2]")) => () - | _ => raise error "polyeq.sml: diff.behav. in -2 + x + x^2 = 0-> [x = 1, x = -2]"; + | _ => error "polyeq.sml: diff.behav. in -2 + x + x^2 = 0-> [x = 1, x = -2]"; "----- d2_pqformula3_neg ------"; val fmz = ["equality ( 2 + x + x^^^2 = 0)", "solveFor x","solutions L"]; @@ -312,7 +312,7 @@ val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; case f of Form' (FormKF (~1,EdUndef,0,Nundef,"[x = 1, x = -2]")) => () - | _ => raise error "polyeq.sml: diff.behav. in -2 + x + 1*x^^^2 = 0 -> [x = 1, x = -2]"; + | _ => error "polyeq.sml: diff.behav. in -2 + x + 1*x^^^2 = 0 -> [x = 1, x = -2]"; "----- d2_pqformula4_neg ------"; val fmz = ["equality ( 2 + x + 1*x^^^2 = 0)", "solveFor x","solutions L"]; @@ -349,7 +349,7 @@ val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; case f of Form' (FormKF (~1,EdUndef,0,Nundef,"[x = 0, x = -1]")) => () - | _ => raise error "polyeq.sml: diff.behav. in 1*x + x^2 = 0 -> [x = 0, x = -1]"; + | _ => error "polyeq.sml: diff.behav. in 1*x + x^2 = 0 -> [x = 0, x = -1]"; "----- d2_pqformula6 ------"; val fmz = ["equality (1*x + 1*x^^^2 = 0)", "solveFor x","solutions L"]; @@ -368,7 +368,7 @@ val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; case f of Form' (FormKF (~1,EdUndef,0,Nundef,"[x = 0, x = -1]")) => () - | _ => raise error "polyeq.sml: diff.behav. in 1*x + 1*x^2 = 0 -> [x = 0, x = -1]"; + | _ => error "polyeq.sml: diff.behav. in 1*x + 1*x^2 = 0 -> [x = 0, x = -1]"; "----- d2_pqformula7 ------"; (*EP-10*) @@ -388,7 +388,7 @@ val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; case f of Form' (FormKF (~1,EdUndef,0,Nundef,"[x = 0, x = -1]")) => () - | _ => raise error "polyeq.sml: diff.behav. in x + x^2 = 0 -> [x = 0, x = -1]"; + | _ => error "polyeq.sml: diff.behav. in x + x^2 = 0 -> [x = 0, x = -1]"; "----- d2_pqformula8 ------"; val fmz = ["equality ( x + 1*x^^^2 = 0)", "solveFor x","solutions L"]; @@ -408,7 +408,7 @@ val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; case f of Form' (FormKF (~1,EdUndef,0,Nundef,"[x = 0, x = -1]")) => () - | _ => raise error "polyeq.sml: diff.behav. in x + 1*x^2 = 0 -> [x = 0, x = -1]"; + | _ => error "polyeq.sml: diff.behav. in x + 1*x^2 = 0 -> [x = 0, x = -1]"; "----- d2_pqformula9 ------"; val fmz = ["equality (-4 + x^^^2 = 0)", "solveFor x","solutions L"]; @@ -427,7 +427,7 @@ val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; case f of Form' (FormKF (~1,EdUndef,0,Nundef,"[x = 2, x = -2]")) => () - | _ => raise error "polyeq.sml: diff.behav. in -4 + x^2 = 0 -> [x = 2, x = -2]"; + | _ => error "polyeq.sml: diff.behav. in -4 + x^2 = 0 -> [x = 2, x = -2]"; "----- d2_pqformula10_neg ------"; @@ -467,7 +467,7 @@ val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; case f of Form' (FormKF (~1,EdUndef,0,Nundef,"[x = 2, x = -2]")) => () - | _ => raise error "polyeq.sml: diff.behav. in -4 + 1*x^2 = 0 -> [x = 2, x = -2]"; + | _ => error "polyeq.sml: diff.behav. in -4 + 1*x^2 = 0 -> [x = 2, x = -2]"; "----- d2_pqformula9_neg ------"; val fmz = ["equality (4 + 1*x^^^2 = 0)", "solveFor x","solutions L"]; @@ -508,7 +508,7 @@ val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; case f of Form' (FormKF (~1,EdUndef,0,Nundef,"[x = 1, x = -1 / 2]")) => () - | _ => raise error "polyeq.sml: diff.behav. in -1 + (-1)*x + 2*x^2 = 0 -> [x = 1, x = -1/2]"; + | _ => error "polyeq.sml: diff.behav. in -1 + (-1)*x + 2*x^2 = 0 -> [x = 1, x = -1/2]"; val fmz = ["equality ( 1 +(-1)*x + 2*x^^^2 = 0)", "solveFor x","solutions L"]; val (dI',pI',mI') = ("PolyEq",["abcFormula","degree_2","polynomial","univariate","equation"], @@ -545,7 +545,7 @@ val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; case f of Form' (FormKF (~1,EdUndef,0,Nundef,"[x = 1 / 2, x = -1]")) => () - | _ => raise error "polyeq.sml: diff.behav. in -1 + x + 2*x^2 = 0 -> [x = 1/2, x = -1]"; + | _ => error "polyeq.sml: diff.behav. in -1 + x + 2*x^2 = 0 -> [x = 1/2, x = -1]"; val fmz = ["equality ( 1 + x + 2*x^^^2 = 0)", "solveFor x","solutions L"]; val (dI',pI',mI') = ("PolyEq",["abcFormula","degree_2","polynomial","univariate","equation"], @@ -582,7 +582,7 @@ val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; case f of Form' (FormKF (~1,EdUndef,0,Nundef,"[x = 1, x = -2]")) => () - | _ => raise error "polyeq.sml: diff.behav. in -2 + 1*x + x^2 = 0 -> [x = 1, x = -2]"; + | _ => error "polyeq.sml: diff.behav. in -2 + 1*x + x^2 = 0 -> [x = 1, x = -2]"; val fmz = ["equality ( 2 + 1*x + x^^^2 = 0)", "solveFor x","solutions L"]; val (dI',pI',mI') = ("PolyEq",["abcFormula","degree_2","polynomial","univariate","equation"], @@ -620,7 +620,7 @@ val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; case f of Form' (FormKF (~1,EdUndef,0,Nundef,"[x = 1, x = -2]")) => () - | _ => raise error "polyeq.sml: diff.behav. in -2 + x + x^2 = 0 -> [x = 1, x = -2]"; + | _ => error "polyeq.sml: diff.behav. in -2 + x + x^2 = 0 -> [x = 1, x = -2]"; val fmz = ["equality ( 2 + x + x^^^2 = 0)", "solveFor x","solutions L"]; val (dI',pI',mI') = ("PolyEq",["abcFormula","degree_2","polynomial","univariate","equation"], @@ -658,7 +658,7 @@ val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; case f of Form' (FormKF (~1,EdUndef,0,Nundef,"[x = 2, x = -2]")) => () - | _ => raise error "polyeq.sml: diff.behav. in -8 + 2*x^2 = 0 -> [x = 2, x = -2]"; + | _ => error "polyeq.sml: diff.behav. in -8 + 2*x^2 = 0 -> [x = 2, x = -2]"; val fmz = ["equality ( 8+ 2*x^^^2 = 0)", "solveFor x","solutions L"]; val (dI',pI',mI') = ("PolyEq",["abcFormula","degree_2","polynomial","univariate","equation"], @@ -694,7 +694,7 @@ val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; case f of Form' (FormKF (~1,EdUndef,0,Nundef,"[x = 2, x = -2]")) => () - | _ => raise error "polyeq.sml: diff.behav. in -4 + x^2 = 0 -> [x = 2, x = -2]"; + | _ => error "polyeq.sml: diff.behav. in -4 + x^2 = 0 -> [x = 2, x = -2]"; val fmz = ["equality ( 4+ x^^^2 = 0)", "solveFor x","solutions L"]; @@ -731,7 +731,7 @@ val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; case f of Form' (FormKF (~1,EdUndef,_,Nundef,"[x = 0, x = -1]")) => () - | _ => raise error "polyeq.sml: diff.behav. in x + x^2 = 0 -> [x = 0, x = -1]"; + | _ => error "polyeq.sml: diff.behav. in x + x^2 = 0 -> [x = 0, x = -1]"; val fmz = ["equality (1*x + x^^^2 = 0)", "solveFor x","solutions L"]; val (dI',pI',mI') = ("PolyEq",["abcFormula","degree_2","polynomial","univariate","equation"], @@ -749,7 +749,7 @@ val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; case f of Form' (FormKF (~1,EdUndef,0,Nundef,"[x = 0, x = -1]")) => () - | _ => raise error "polyeq.sml: diff.behav. in x + x^2 = 0 -> [x = 0, x = -1]"; + | _ => error "polyeq.sml: diff.behav. in x + x^2 = 0 -> [x = 0, x = -1]"; (*EP-16*) val fmz = ["equality (x + 2*x^^^2 = 0)", "solveFor x","solutions L"]; @@ -768,7 +768,7 @@ val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; case f of Form' (FormKF (~1,EdUndef,0,Nundef,"[x = 0, x = -1 / 2]")) => () - | _ => raise error "polyeq.sml: diff.behav. in x + x^2 = 0 -> [x = 0, x = -1 / 2]"; + | _ => error "polyeq.sml: diff.behav. in x + x^2 = 0 -> [x = 0, x = -1 / 2]"; (*EP-//*) val fmz = ["equality (x + x^^^2 = 0)", "solveFor x","solutions L"]; @@ -787,7 +787,7 @@ val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; case f of Form' (FormKF (~1,EdUndef,0,Nundef,"[x = 0, x = -1]")) => () - | _ => raise error "polyeq.sml: diff.behav. in x + x^2 = 0 -> [x = 0, x = -1]"; + | _ => error "polyeq.sml: diff.behav. in x + x^2 = 0 -> [x = 0, x = -1]"; "----------- (-8 - 2*x + x^^^2 = 0), (*Schalk 2, S.67 Nr.31.b----"; "----------- (-8 - 2*x + x^^^2 = 0), (*Schalk 2, S.67 Nr.31.b----"; @@ -835,10 +835,10 @@ val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f; (* FIXXXME case f of Form' (FormKF (~1,EdUndef,0,Nundef,"[x = -2, x = 4]")) => () TODO - | _ => raise error "polyeq.sml: diff.behav. in [x = -2, x = 4]"; + | _ => error "polyeq.sml: diff.behav. in [x = -2, x = 4]"; *) if f2str f = "[x = -1 * -1 + -1 * sqrt (1 ^^^ 2 - -8),\n x = -1 * -1 + -1 * (-1 * sqrt (1 ^^^ 2 - -8))]" then () -else raise error "polyeq.sml corrected?behav. in [x = -2, x = 4]"; +else error "polyeq.sml corrected?behav. in [x = -2, x = 4]"; "-------------------- (3 - 10*x + 3*x^^^2 = 0), ----------------------"; @@ -849,7 +849,7 @@ val SOME (t,_) = rewrite_set_ PolyEq.thy false PolyEq_erls t1; val t' = term2str t; (*if t'= "True" then () - else raise error "polyeq.sml: diff.behav. in 'rewrite_set_.. PolyEq_erls";*) + else error "polyeq.sml: diff.behav. in 'rewrite_set_.. PolyEq_erls";*) (* *) val fmz = ["equality (3 - 10*x + 3*x^^^2 = 0)", "solveFor x","solutions L"]; @@ -904,7 +904,7 @@ val (p,_,f,nxt,_,pt) = me nxt p c pt; (* FIXXXXME n1., case f of Form' (FormKF (~1,EdUndef,0,Nundef,"[x = 2, x = -4]")) => () TODO - | _ => raise error "polyeq.sml: diff.behav. in [x = 2, x = -4]"; + | _ => error "polyeq.sml: diff.behav. in [x = 2, x = -4]"; *) "----------- (a*b - (a+b)*x + x^^^2 = 0), (*Schalk 2,S.68Nr.44.a*)"; @@ -946,7 +946,7 @@ (~1,EdUndef,0,Nundef, "[x = (a + b) / 2 + -1 * sqrt ((a + b) ^^^ 2 / 2 ^^^ 2 - a * b),\n x = (a + b) / 2 + sqrt ((a + b) ^^^ 2 / 2 ^^^ 2 - a * b)]")) => () - | _ => raise error "polyeq.sml: diff.behav. in a*b - (a+b)*x + x^^^2 = 0"; + | _ => error "polyeq.sml: diff.behav. in a*b - (a+b)*x + x^^^2 = 0"; this will be simplified [x = a, x = b] to by Factor.ML*) @@ -978,7 +978,7 @@ val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f; (*WN.2.5.03 TODO "[x = sqrt (0 - -64), x = -1 * sqrt (0 - -64)]" case f of Form' (FormKF (~1,EdUndef,0,Nundef,"[x = 8, x = -8]")) => () - | _ => raise error "polyeq.sml: diff.behav. in [x = 8, x = -8]"; + | _ => error "polyeq.sml: diff.behav. in [x = 8, x = -8]"; *) "----------- (-147 + 3*x^^^2 = 0), (*Schalk 2, S.66 Nr.1.b------*)"; @@ -1004,10 +1004,10 @@ val (p,_,f,nxt,_,pt) = me nxt p c pt; (*WN.2.5.03 TODO "[x = sqrt (0 - -49), x = -1 * sqrt (0 - -49)]" case f of Form' (FormKF (~1,EdUndef,0,Nundef,"[x = 7, x = -7]")) => () - | _ => raise error "polyeq.sml: diff.behav. in [x = 7, x = -7]"; + | _ => error "polyeq.sml: diff.behav. in [x = 7, x = -7]"; *) if f2str f = "[x = sqrt (0 - -49), x = -1 * sqrt (0 - -49)]" then () -else raise error "polyeq.sml CORRECTED?behav. in [x = 7, x = -7]"; +else error "polyeq.sml CORRECTED?behav. in [x = 7, x = -7]"; "----------- (3*x - 1 - (5*x - (2 - 4*x)) = -11),(*Schalk Is86Bsp5"; @@ -1052,7 +1052,7 @@ val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; case f of Form' (FormKF (~1,EdUndef,0,Nundef,"[x = 2]")) => () - | _ => raise error "polyeq.sml: diff.behav. in [x = 2]"; + | _ => error "polyeq.sml: diff.behav. in [x = 2]"; "----------- ((x+1)*(x+2) - (3*x - 2)^^^2=.. Schalk II s.68 Bsp 37"; @@ -1097,7 +1097,7 @@ val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; case f of Form' (FormKF (~1,EdUndef,0,Nundef,"[x = 2 / 15, x = 1]")) => () - | _ => raise error "polyeq.sml: diff.behav. in [x = 2 / 15, x = 1]"; + | _ => error "polyeq.sml: diff.behav. in [x = 2 / 15, x = 1]"; " -4 + x^^^2 =0 "; @@ -1121,7 +1121,7 @@ val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; case f of Form' (FormKF (~1,EdUndef,0,Nundef,"[x = 2, x = -2]")) => () - | _ => raise error "polyeq.sml: diff.behav. in [x = 2, x = -2]"; + | _ => error "polyeq.sml: diff.behav. in [x = 2, x = -2]"; "----------------- polyeq.sml end ------------------"; diff -r 95d956108461 -r 460c24a6a6ba test/Tools/isac/Knowledge/polyminus.sml --- a/test/Tools/isac/Knowledge/polyminus.sml Tue Sep 28 08:58:06 2010 +0200 +++ b/test/Tools/isac/Knowledge/polyminus.sml Tue Sep 28 09:06:56 2010 +0200 @@ -36,31 +36,31 @@ ist_monom (str2term "12"); case eval_ist_monom 0 0 (str2term "12 ist_monom") 0 of SOME ("12 ist_monom = True", _) => () - | _ => raise error "polyminus.sml: 12 ist_monom = True"; + | _ => error "polyminus.sml: 12 ist_monom = True"; case eval_ist_monom 0 0 (str2term "a ist_monom") 0 of SOME ("a ist_monom = True", _) => () - | _ => raise error "polyminus.sml: a ist_monom = True"; + | _ => error "polyminus.sml: a ist_monom = True"; case eval_ist_monom 0 0 (str2term "(3*a) ist_monom") 0 of SOME ("3 * a ist_monom = True", _) => () - | _ => raise error "polyminus.sml: 3 * a ist_monom = True"; + | _ => error "polyminus.sml: 3 * a ist_monom = True"; case eval_ist_monom 0 0 (str2term "(a^^^2) ist_monom") 0 of SOME ("a ^^^ 2 ist_monom = True", _) => () - | _ => raise error "polyminus.sml: a^^^2 ist_monom = True"; + | _ => error "polyminus.sml: a^^^2 ist_monom = True"; case eval_ist_monom 0 0 (str2term "(3*a^^^2) ist_monom") 0 of SOME ("3 * a ^^^ 2 ist_monom = True", _) => () - | _ => raise error "polyminus.sml: 3*a^^^2 ist_monom = True"; + | _ => error "polyminus.sml: 3*a^^^2 ist_monom = True"; case eval_ist_monom 0 0 (str2term "(a*b) ist_monom") 0 of SOME ("a * b ist_monom = True", _) => () - | _ => raise error "polyminus.sml: a*b ist_monom = True"; + | _ => error "polyminus.sml: a*b ist_monom = True"; case eval_ist_monom 0 0 (str2term "(3*a*b) ist_monom") 0 of SOME ("3 * a * b ist_monom = True", _) => () - | _ => raise error "polyminus.sml: 3*a*b ist_monom = True"; + | _ => error "polyminus.sml: 3*a*b ist_monom = True"; "----------- watch order_add_mult -------------------------------"; @@ -72,7 +72,7 @@ val t = str2term "((a + d) + c) + b"; val SOME (t,_) = rewrite_set_ thy false order_add_mult t; term2str t; if term2str t = "a + (b + (c + d))" then () -else raise error "polyminus.sml 1 watch order_add_mult"; +else error "polyminus.sml 1 watch order_add_mult"; trace_rewrite:=false; "----- the same stepwise..."; @@ -88,7 +88,7 @@ val SOME (t,_) = rewrite_ thy od e_rls true add_left_commute t;term2str t; "a + (b + (c + d))"; if term2str t = "a + (b + (c + d))" then () -else raise error "polyminus.sml 2 watch order_add_mult"; +else error "polyminus.sml 2 watch order_add_mult"; "----- if parentheses are right, left_commute is (almost) sufficient..."; val t = str2term "a + (d + (c + b))"; @@ -105,7 +105,7 @@ val t = str2term "((5*a + 4*d) + 3*c) + 2*b"; val SOME (t,_) = rewrite_set_ thy false order_add_mult t; term2str t; if term2str t = "2 * b + (3 * c + (4 * d + 5 * a))" then () -else raise error "polyminus.sml: order_add_mult changed"; +else error "polyminus.sml: order_add_mult changed"; "----- here we see rew_sub going into subterm with ord.rew...."; val od = ord_make_polynomial false Poly.thy; @@ -130,31 +130,31 @@ (* case eval_kleiner 0 0 (str2term "123 kleiner 32") 0 of SOME ("12 kleiner 9 = False", _) => () - | _ => raise error "polyminus.sml: 12 kleiner 9 = False"; + | _ => error "polyminus.sml: 12 kleiner 9 = False"; *) case eval_kleiner 0 0 (str2term "a kleiner b") 0 of SOME ("a kleiner b = True", _) => () - | _ => raise error "polyminus.sml: a kleiner b = True"; + | _ => error "polyminus.sml: a kleiner b = True"; case eval_kleiner 0 0 (str2term "(10*g) kleiner f") 0 of SOME ("10 * g kleiner f = False", _) => () - | _ => raise error "polyminus.sml: 10 * g kleiner f = False"; + | _ => error "polyminus.sml: 10 * g kleiner f = False"; case eval_kleiner 0 0 (str2term "(a^^^2) kleiner b") 0 of SOME ("a ^^^ 2 kleiner b = True", _) => () - | _ => raise error "polyminus.sml: a ^^^ 2 kleiner b = True"; + | _ => error "polyminus.sml: a ^^^ 2 kleiner b = True"; case eval_kleiner 0 0 (str2term "(3*a^^^2) kleiner b") 0 of SOME ("3 * a ^^^ 2 kleiner b = True", _) => () - | _ => raise error "polyminus.sml: 3 * a ^^^ 2 kleiner b = True"; + | _ => error "polyminus.sml: 3 * a ^^^ 2 kleiner b = True"; case eval_kleiner 0 0 (str2term "(a*b) kleiner c") 0 of SOME ("a * b kleiner c = True", _) => () - | _ => raise error "polyminus.sml: a * b kleiner b = True"; + | _ => error "polyminus.sml: a * b kleiner b = True"; case eval_kleiner 0 0 (str2term "(3*a*b) kleiner c") 0 of SOME ("3 * a * b kleiner c = True", _) => () - | _ => raise error "polyminus.sml: 3 * a * b kleiner b = True"; + | _ => error "polyminus.sml: 3 * a * b kleiner b = True"; @@ -165,7 +165,7 @@ val t = str2term "b + a"; val SOME (t,_) = rewrite_ thy od erls false tausche_plus t; term2str t; if term2str t = "a + b" then () -else raise error "polyminus.sml: ordne_alphabetisch1 b + a"; +else error "polyminus.sml: ordne_alphabetisch1 b + a"; val erls = Atools_erls; val t = str2term "2*a + 3*a"; @@ -177,41 +177,41 @@ val t = str2term "b + a"; val SOME (t,_) = rewrite_set_ thy false ordne_alphabetisch t; term2str t; if term2str t = "a + b" then () -else raise error "polyminus.sml: ordne_alphabetisch a + b"; +else error "polyminus.sml: ordne_alphabetisch a + b"; val t = str2term "2*b + a"; val SOME (t,_) = rewrite_set_ thy false ordne_alphabetisch t; term2str t; if term2str t = "a + 2 * b" then () -else raise error "polyminus.sml: ordne_alphabetisch a + 2 * b"; +else error "polyminus.sml: ordne_alphabetisch a + 2 * b"; val t = str2term "a + c + b"; val SOME (t,_) = rewrite_set_ thy false ordne_alphabetisch t; term2str t; if term2str t = "a + b + c" then () -else raise error "polyminus.sml: ordne_alphabetisch a + b + c"; +else error "polyminus.sml: ordne_alphabetisch a + b + c"; "----- rewrite goes into subterms"; val t = str2term "a + c + b + d"; val SOME (t,_) = rewrite_ thy od erls false tausche_plus_plus t; term2str t; if term2str t = "a + b + c + d" then () -else raise error "polyminus.sml: ordne_alphabetisch1 a + b + c + d"; +else error "polyminus.sml: ordne_alphabetisch1 a + b + c + d"; val t = str2term "a + c + d + b"; val SOME (t,_) = rewrite_set_ thy false ordne_alphabetisch t; term2str t; if term2str t = "a + b + c + d" then () -else raise error "polyminus.sml: ordne_alphabetisch2 a + b + c + d"; +else error "polyminus.sml: ordne_alphabetisch2 a + b + c + d"; "----- here we see rew_sub going into subterm with cond.rew...."; val t = str2term "b + a + c + d"; val SOME (t,_) = rewrite_ thy od erls false tausche_plus t; term2str t; if term2str t = "a + b + c + d" then () -else raise error "polyminus.sml: ordne_alphabetisch3 a + b + c + d"; +else error "polyminus.sml: ordne_alphabetisch3 a + b + c + d"; "----- compile rls for the most complicated terms"; val t = str2term "5*e + 6*f - 8*g - 9 - 7*e - 4*f + 10*g + 12"; "5 * e + 6 * f - 8 * g - 9 - 7 * e - 4 * f + 10 * g + 12"; val SOME (t,_) = rewrite_set_ thy false ordne_alphabetisch t; if term2str t = "- 9 + 12 + 5 * e - 7 * e + 6 * f - 4 * f - 8 * g + 10 * g" -then () else raise error "polyminus.sml: ordne_alphabetisch finished"; +then () else error "polyminus.sml: ordne_alphabetisch finished"; "----------- build fasse_zusammen --------------------------------"; @@ -220,7 +220,7 @@ val t = str2term "- 9 + 12 + 5 * e - 7 * e + 6 * f - 4 * f - 8 * g + 10 * g"; val SOME (t,_) = rewrite_set_ thy false fasse_zusammen t; if term2str t = "3 + -2 * e + 2 * f + 2 * g" then () -else raise error "polyminus.sml: fasse_zusammen finished"; +else error "polyminus.sml: fasse_zusammen finished"; "----------- build verschoenere ----------------------------------"; "----------- build verschoenere ----------------------------------"; @@ -228,7 +228,7 @@ val t = str2term "3 + -2 * e + 2 * f + 2 * g"; val SOME (t,_) = rewrite_set_ thy false verschoenere t; if term2str t = "3 - 2 * e + 2 * f + 2 * g" then () -else raise error "polyminus.sml: verschoenere 3 + -2 * e ..."; +else error "polyminus.sml: verschoenere 3 + -2 * e ..."; trace_rewrite:=true; trace_rewrite:=false; @@ -259,7 +259,7 @@ val ((pt,p),_) = get_calc 1; show_pt pt; if p = ([], Res) andalso term2str (get_obj g_res pt (fst p)) = "3 - 2 * e + 2 * f + 2 * g" -then () else raise error "polyminus.sml: Vereinfache (3 - 2 * e + 2 * f..."; +then () else error "polyminus.sml: Vereinfache (3 - 2 * e + 2 * f..."; "----------- 140 d ---"; states:=[]; @@ -272,7 +272,7 @@ val ((pt,p),_) = get_calc 1; show_pt pt; if p = ([], Res) andalso term2str (get_obj g_res pt (fst p)) = "3 + 3 * r + 6 * s - 8 * t" -then () else raise error "polyminus.sml: Vereinfache 140 d)"; +then () else error "polyminus.sml: Vereinfache 140 d)"; "----------- 139 c ---"; @@ -286,7 +286,7 @@ val ((pt,p),_) = get_calc 1; show_pt pt; if p = ([], Res) andalso term2str (get_obj g_res pt (fst p)) = "- (3 * f)" -then () else raise error "polyminus.sml: Vereinfache 139 c)"; +then () else error "polyminus.sml: Vereinfache 139 c)"; "----------- 139 b ---"; states:=[]; @@ -299,7 +299,7 @@ val ((pt,p),_) = get_calc 1; show_pt pt; if p = ([], Res) andalso term2str (get_obj g_res pt (fst p)) = "-3 * u - v" -then () else raise error "polyminus.sml: Vereinfache 139 b)"; +then () else error "polyminus.sml: Vereinfache 139 b)"; "----------- 138 a ---"; states:=[]; @@ -312,7 +312,7 @@ val ((pt,p),_) = get_calc 1; show_pt pt; if p = ([], Res) andalso term2str (get_obj g_res pt (fst p)) = "-4 * u + 2 * v" -then () else raise error "polyminus.sml: Vereinfache 138 a)"; +then () else error "polyminus.sml: Vereinfache 138 a)"; "----------- met probe fuer_polynom ------------------------------"; @@ -349,7 +349,7 @@ although analogies work in interface.sml: FIXME.WN081114 in "Pruefe"*) val ((pt,p),_) = get_calc 1; if p = ([], Res) andalso term2str (get_obj g_res pt (fst p)) = "11 = 11" -then () else raise error "polyminus.sml: Probe 11 = 11"; +then () else error "polyminus.sml: Probe 11 = 11"; show_pt pt; @@ -366,7 +366,7 @@ val ((pt,p),_) = get_calc 1; if p = ([], Res) andalso term2str (get_obj g_res pt (fst p)) = "1 + 14 * u" -then () else raise error "polyminus.sml: Vereinfache (2*u - 5 - (3 - ..."; +then () else error "polyminus.sml: Vereinfache (2*u - 5 - (3 - ..."; show_pt pt; "----- probe p.34 -----"; @@ -380,7 +380,7 @@ autoCalculate 1 CompleteCalc; val ((pt,p),_) = get_calc 1; if p = ([], Res) andalso term2str (get_obj g_res pt (fst p)) = "29 = 29" -then () else raise error "polyminus.sml: Probe 29 = 29"; +then () else error "polyminus.sml: Probe 29 = 29"; show_pt pt; @@ -456,7 +456,7 @@ autoCalculate 1 CompleteCalc; val ((pt,p),_) = get_calc 1; show_pt pt; if p = ([], Res) andalso term2str (get_obj g_res pt (fst p)) = "2 * g + h" -then () else raise error "polyminus.sml: addiere_vor_minus"; +then () else error "polyminus.sml: addiere_vor_minus"; states:=[]; @@ -468,7 +468,7 @@ autoCalculate 1 CompleteCalc; val ((pt,p),_) = get_calc 1; show_pt pt; if p = ([], Res) andalso term2str (get_obj g_res pt (fst p)) = "f + 2 * g" -then () else raise error "polyminus.sml: tausche_vor_plus"; +then () else error "polyminus.sml: tausche_vor_plus"; "----------- pbl binom polynom vereinfachen p.39 -----------------"; @@ -520,7 +520,7 @@ (* if p = ([], Res) andalso term2str (get_obj g_res pt (fst p)) = "1 + 14 * u" -then () else raise error "polyminus.sml: Vereinfache (2*u - 5 - (3 - ..."; +then () else error "polyminus.sml: Vereinfache (2*u - 5 - (3 - ..."; *) @@ -555,7 +555,7 @@ case ma of SOME ("matchsub (?a * (?b - ?c)) (8 * (a - q) + \ \a - 2 * q + 3 * (a - 2 * q)) = True", _) => () - | _ => raise error "polyminus.sml matchsub (?a * (?b - ?c)...A"; + | _ => error "polyminus.sml matchsub (?a * (?b - ?c)...A"; "--- does the respective prls rewrite ?"; val prls = append_rls "prls_pbl_vereinf_poly" e_rls @@ -583,7 +583,7 @@ val SOME (t', _) = rewrite_set_ thy false prls t; trace_rewrite := false; if term2str t' = "False" then () -else raise error "polyminus.sml Not (matchsub (?a * (?b + ?c)) (8 ..."; +else error "polyminus.sml Not (matchsub (?a * (?b + ?c)) (8 ..."; diff -r 95d956108461 -r 460c24a6a6ba test/Tools/isac/Knowledge/rateq.sml --- a/test/Tools/isac/Knowledge/rateq.sml Tue Sep 28 08:58:06 2010 +0200 +++ b/test/Tools/isac/Knowledge/rateq.sml Tue Sep 28 09:06:56 2010 +0200 @@ -14,30 +14,30 @@ val t = (term_of o the o (parse RatEq.thy)) "(1/b+1/x=1) is_ratequation_in x"; val SOME(t_, _) = rewrite_set_ RatEq.thy false RatEq_prls t; val result = term2str t_; -if result <> "True" then raise error "rateq.sml: new behaviour 1:" else (); +if result <> "True" then error "rateq.sml: new behaviour 1:" else (); val t = (term_of o the o (parse RatEq.thy)) "(sqrt(x)=1) is_ratequation_in x"; val SOME(t_, _) = rewrite_set_ RatEq.thy false RatEq_prls t; val result = term2str t_; -if result <> "False" then raise error "rateq.sml: new behaviour 2:" else (); +if result <> "False" then error "rateq.sml: new behaviour 2:" else (); val t = (term_of o the o (parse RatEq.thy)) "(x=-1) is_ratequation_in x"; val SOME(t_,_) = rewrite_set_ RatEq.thy false RatEq_prls t; val result = term2str t_; -if result <> "False" then raise error "rateq.sml: new behaviour 3:" else (); +if result <> "False" then error "rateq.sml: new behaviour 3:" else (); val t = (term_of o the o (parse RatEq.thy)) "(3 + x^^^2 + 1/(x^^^2+3)=1) is_ratequation_in x"; val SOME(t_,_) = rewrite_set_ RatEq.thy false RatEq_prls t; val result = term2str t_; -if result <> "True" then raise error "rateq.sml: new behaviour 4:" else (); +if result <> "True" then error "rateq.sml: new behaviour 4:" else (); val result = match_pbl ["equality (x=1)","solveFor x","solutions L"] (get_pbt ["rational","univariate","equation"]); -case result of NoMatch' _ => () | _ => raise error "rateq.sml: new behaviour: 5"; +case result of NoMatch' _ => () | _ => error "rateq.sml: new behaviour: 5"; val result = match_pbl ["equality (3 + x^^^2 + 1/(x^^^2+3)=1)","solveFor x","solutions L"] (get_pbt ["rational","univariate","equation"]); -case result of Matches' _ => () | _ => raise error "rateq.sml: new behaviour: 6"; +case result of Matches' _ => () | _ => error "rateq.sml: new behaviour: 6"; (*---------rateq---- 23.8.02 ---------------------*) @@ -90,7 +90,7 @@ (* "x = 1 / 5" *) val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; if mout2str(f) = "Form' FormKF (~1,EdUndef,0,Nundef,([x = 1 / 5])" then () -else raise error "rateq.sml: new behaviour: [x = 1 / 5]"; +else error "rateq.sml: new behaviour: [x = 1 / 5]"; @@ -140,6 +140,6 @@ val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; (* "x = -2, x = 10" *) if mout2str(f) = "Form' FormKF (~1,EdUndef,0,Nundef,([x = -2, x = 10])" then() -else raise error "rateq.sml: new behaviour: [x = -2, x = 10]"; +else error "rateq.sml: new behaviour: [x = -2, x = 10]"; "----------- rateq.sml end--------"; diff -r 95d956108461 -r 460c24a6a6ba test/Tools/isac/Knowledge/rational-old.sml --- a/test/Tools/isac/Knowledge/rational-old.sml Tue Sep 28 08:58:06 2010 +0200 +++ b/test/Tools/isac/Knowledge/rational-old.sml Tue Sep 28 09:06:56 2010 +0200 @@ -12,50 +12,50 @@ print("\n\n***** divide tests *****\n"); val mv_pquot1 = (#1(mv_division([(1,[1,1,1]),(1,[1,1,0]),(1,[1,0,1]),(1,[0,0,0])],[(1,[1,1,0]),(1,[0,0,0])],LEX_))); (* result: [(1,[0,0,1]),(1,[0,0,0])] *) -if mv_pquot1=[(1,[0,0,1]),(1,[0,0,0])] then () else raise error ("Test failed"); +if mv_pquot1=[(1,[0,0,1]),(1,[0,0,0])] then () else error ("Test failed"); val mv_prest1 = (#2(mv_division([(1,[1,1,1]),(1,[1,1,0]),(1,[1,0,1]),(1,[0,0,0])],[(1,[1,1,0]),(1,[0,0,0])],LEX_))); (* result: [(1,[1,0,1]),(~1,[0,0,1])] *) -if mv_prest1=[(1,[1,0,1]),(~1,[0,0,1])] then () else raise error ("Test failed"); +if mv_prest1=[(1,[1,0,1]),(~1,[0,0,1])] then () else error ("Test failed"); val mv_pquot2 = (#1(mv_division([(4,[2]),(8,[1]),(16,[0])],[(1,[1]),(1,[0])],LEX_))); (* result: [(4,[1]),(4,[0])] *) -if mv_pquot2=[(4,[1]),(4,[0])] then () else raise error ("Test failed"); +if mv_pquot2=[(4,[1]),(4,[0])] then () else error ("Test failed"); val mv_prest2 = (#2(mv_division([(4,[2]),(8,[1]),(16,[0])],[(1,[1]),(1,[0])],LEX_))); (* result: [(12,[0]] *) -if mv_prest2=[(12,[0])] then () else raise error ("Test failed"); +if mv_prest2=[(12,[0])] then () else error ("Test failed"); val mv_pquot3 = (#1(mv_division([(4,[2]),(~4,[0])],[(2,[1]),(2,[0])],LEX_))); (* [(2,[1]),(~2,[0])] *) -if mv_pquot3=[(2,[1]),(~2,[0])] then () else raise error ("Test failed"); +if mv_pquot3=[(2,[1]),(~2,[0])] then () else error ("Test failed"); val mv_prest3 = (#2(mv_division([(1,[2]),(~1,[0])],[(2,[1]),(2,[0])],LEX_))); (* [(1,[2]),(~1,[0])] *) -if mv_prest3=[(1,[2]),(~1,[0])] then () else raise error ("Test failed"); +if mv_prest3=[(1,[2]),(~1,[0])] then () else error ("Test failed"); val mv_pquot4 = (#1(mv_division([(3,[1,1,1]),(4,[1,0,1]),(3,[0,0,1])],[(2,[1,0,0]),(4,[0,0,1])],LEX_))); (* [(1,[0,1,1])] *) -if mv_pquot4=[(1,[0,1,1])] then () else raise error ("Test failed"); +if mv_pquot4=[(1,[0,1,1])] then () else error ("Test failed"); val mv_prest4 = (#2(mv_division([(3,[1,1,1]),(4,[1,0,1]),(3,[0,0,1])],[(2,[1,0,0]),(4,[0,0,1])],GGO_))); (* [(1,[1,1,1]),(~4,[0,1,2]),(4,[1,0,1]),(3,[0,0,1])] *) -if mv_prest4 =[(1,[1,1,1]),(~4,[0,1,2]),(4,[1,0,1]),(3,[0,0,1])] then () else raise error ("Test failed"); +if mv_prest4 =[(1,[1,1,1]),(~4,[0,1,2]),(4,[1,0,1]),(3,[0,0,1])] then () else error ("Test failed"); val mv_pquot5 = (#1(mv_division([(3,[1,1,1]),(4,[1,0,1]),(3,[0,0,1]),(6,[2,1,3]),(4,[0,4,1]),(1,[2,2,1])],[(1,[0,0,1])],LEX_))); (* [(1,[2,2,0]),(6,[2,1,2]),(3,[1,1,0]),(4,[1,0,0]),(4,[0,4,0]),(3,[0,0,0])]*) -if mv_pquot5=[(1,[2,2,0]),(6,[2,1,2]),(3,[1,1,0]),(4,[1,0,0]),(4,[0,4,0]),(3,[0,0,0])] then () else raise error ("Test failed"); +if mv_pquot5=[(1,[2,2,0]),(6,[2,1,2]),(3,[1,1,0]),(4,[1,0,0]),(4,[0,4,0]),(3,[0,0,0])] then () else error ("Test failed"); val mv_prest5 = (#2(mv_division([(3,[1,1,1]),(4,[1,0,1]),(3,[0,0,1]),(6,[2,1,3]),(4,[0,4,1]),(1,[2,2,1])],[(1,[0,0,1])],LEX_))); (* [] *) -if mv_prest5=[] then () else raise error ("Test failed"); +if mv_prest5=[] then () else error ("Test failed"); (* (x^2 + 2(a+1)x + (a^2+2a+1)) / (x+a+1) = x+a+1 *) val mv_pquot6 = (#1(mv_division([(1,[2,0,0]),(2,[1,1,0]),(2,[1,0,0]),(1,[0,2,0]),(2,[0,1,0]),(1,[0,0,0])],[(1,[1,0,0]),(1,[0,1,0]),(1,[0,0,0])],LEX_))); -if mv_pquot6=[(1,[1,0,0]),(1,[0,1,0]),(1,[0,0,0])] then () else raise error ("Test failed"); +if mv_pquot6=[(1,[1,0,0]),(1,[0,1,0]),(1,[0,0,0])] then () else error ("Test failed"); val mv_prest6 = (#2(mv_division([(1,[2,0,0]),(2,[1,1,0]),(2,[1,0,0]),(1,[0,2,0]),(2,[0,1,0]),(1,[0,0,0])],[(1,[1,0,0]),(1,[0,1,0]),(1,[0,0,0])],LEX_))); -if mv_prest6=[] then () else raise error ("Test failed"); +if mv_prest6=[] then () else error ("Test failed"); (* Exception tests *) (* mv_division ([(1,[0,0,0])],[(0,[1,2,3])],LEX_); *) @@ -63,115 +63,115 @@ print("\n\n***** MV_CONTENT-TESTS *****\n"); val mv_cont1=mv_content([(1,[2,1]),(1,[2,0]),(1,[1,1]),(1,[1,0]),(1,[0,1]),(1,[0,0])]); (* [(1,[0,1]),(1,[0,0])] *) -if mv_cont1=[(1,[0,1]),(1,[0,0])] then () else raise error ("Test failed"); +if mv_cont1=[(1,[0,1]),(1,[0,0])] then () else error ("Test failed"); val mv_pp1=mv_pp([(1,[1,1]),(1,[1,0]),(1,[0,1]),(1,[0,0])]); (*[(1,[1,0]),(1,[0,0])]*) -if mv_pp1=[(1,[1,0]),(1,[0,0])] then () else raise error ("Test failed"); +if mv_pp1=[(1,[1,0]),(1,[0,0])] then () else error ("Test failed"); val mv_cont2=mv_content([(2,[1]),(4,[0])]); (* [(2,[0])] *) -if mv_cont2=[(2,[0])] then () else raise error ("Test failed"); +if mv_cont2=[(2,[0])] then () else error ("Test failed"); val mv_pp2=mv_pp([(2,[1]),(4,[0])]); (* [(1,[1]),(2,[0])] *) -if mv_pp2=[(1,[1]),(2,[0])] then () else raise error ("Test failed"); +if mv_pp2=[(1,[1]),(2,[0])] then () else error ("Test failed"); val mv_cont3=mv_content[(8,[2,1,1]),(12,[1,0,2]),(10,[2,2,0]),(16,[1,1,1])]; (* [(2,[0,0,0])] *) -if mv_cont3=[(2,[0,0,0])] then () else raise error ("Test failed"); +if mv_cont3=[(2,[0,0,0])] then () else error ("Test failed"); val mv_pp3=mv_pp[(8,[2,1,1]),(12,[1,0,2]),(10,[2,2,0]),(16,[1,1,1])]; (* [(5,[2,2,0]),(4,[2,1,1]),(8,[1,1,1]),(6,[1,0,2])] *) -if mv_pp3=[(5,[2,2,0]),(4,[2,1,1]),(8,[1,1,1]),(6,[1,0,2])] then () else raise error ("Test failed"); +if mv_pp3=[(5,[2,2,0]),(4,[2,1,1]),(8,[1,1,1]),(6,[1,0,2])] then () else error ("Test failed"); val mv_cont4=mv_content[(2,[2,1,0]),(3,[1,0,1]),(2,[1,1,0]),(3,[0,0,1])]; (* [(1,[0,0,0])] *) -if mv_cont4=[(1,[0,0,0])] then () else raise error ("Test failed"); +if mv_cont4=[(1,[0,0,0])] then () else error ("Test failed"); val mv_pp4=mv_pp [(2,[2,1,0]),(3,[1,0,1]),(2,[1,1,0]),(3,[0,0,1])]; (* [(2,[2,1,0]),(2,[1,1,0]),(3,[1,0,1]),(3,[0,0,1])] *) -if mv_pp4=[(2,[2,1,0]),(2,[1,1,0]),(3,[1,0,1]),(3,[0,0,1])] then () else raise error ("Test failed"); +if mv_pp4=[(2,[2,1,0]),(2,[1,1,0]),(3,[1,0,1]),(3,[0,0,1])] then () else error ("Test failed"); val con1=mv_content([(9,[2,0]),(15,[1,1]),(12,[1,0]),(6,[0,2]),(12,[0,1])]); (* [(3,[0,0])] *) -if con1=[(3,[0,0])] then () else raise error ("Test failed"); +if con1=[(3,[0,0])] then () else error ("Test failed"); val pp1=mv_pp([(9,[2,0]),(15,[1,1]),(12,[1,0]),(6,[0,2]),(12,[0,1])]); (* [(3,[2,0]),(5,[1,1]),(4,[1,0]),(2,[0,2]),(4,[0,1])] *) -if pp1=[(3,[2,0]),(5,[1,1]),(4,[1,0]),(2,[0,2]),(4,[0,1])] then () else raise error ("Test failed"); +if pp1=[(3,[2,0]),(5,[1,1]),(4,[1,0]),(2,[0,2]),(4,[0,1])] then () else error ("Test failed"); val con2=mv_content([(1,[2,0]),(1,[1,1]),(1,[1,0]),(1,[0,2]),(1,[0,1])]); (* [(1,[0,0])] *) -if con2=[(1,[0,0])] then () else raise error ("Test failed"); +if con2=[(1,[0,0])] then () else error ("Test failed"); val pp2 =mv_pp([(1,[2,0]),(1,[1,1]),(1,[1,0]),(1,[0,2]),(1,[0,1])]); (* [(1,[2,0]),(1,[1,1]),(1,[1,0]),(1,[0,2]),(1,[0,1])] *) -if pp2=[(1,[2,0]),(1,[1,1]),(1,[1,0]),(1,[0,2]),(1,[0,1])] then () else raise error ("Test failed"); +if pp2=[(1,[2,0]),(1,[1,1]),(1,[1,0]),(1,[0,2]),(1,[0,1])] then () else error ("Test failed"); val cont1 = mv_content [(1,[2,1,0]),(2,[2,1,0])]; (* [(3,[0,1,0])] *) -if cont1=[(3,[0,1,0])] then () else raise error ("Test failed"); +if cont1=[(3,[0,1,0])] then () else error ("Test failed"); val pp1 = mv_pp [(1,[2,1,0]),(2,[2,1,0])]; (* [(1,[2,0,0])] *) -if pp1=[(1,[2,0,0])] then () else raise error ("Test failed"); +if pp1=[(1,[2,0,0])] then () else error ("Test failed"); val cont2 = mv_content [(4,[1,2,0]),(2,[2,1,0])]; (* [(2,[0,1,0])] *) -if cont2=[(2,[0,1,0])] then () else raise error ("Test failed"); +if cont2=[(2,[0,1,0])] then () else error ("Test failed"); val pp2 = mv_pp [(4,[1,2,0]),(2,[2,1,0])]; (* [(1,[2,0,0]),(2,[1,1,0])] *) -if pp2=[(1,[2,0,0]),(2,[1,1,0])] then () else raise error ("Test failed"); +if pp2=[(1,[2,0,0]),(2,[1,1,0])] then () else error ("Test failed"); print("\n\n\n\n********************************************************\n\n"); val cont3=mv_content [(65,[3,2,2]),(52,[3,2,1]),(26,[3,1,2]),(~95,[2,2,3]),(~76,[2,2,2]),(35,[2,2,1]),(28,[2,2,0]),(~38,[2,1,3]),(14,[2,1,1])]; -(*if cont3=[(1,[0,1,0])] then () else raise error ("Test failed"); *) +(*if cont3=[(1,[0,1,0])] then () else error ("Test failed"); *) val pp3=mv_pp [(65,[3,2,2]),(52,[3,2,1]),(26,[3,1,2]),(~95,[2,2,3]),(~76,[2,2,2]),(35,[2,2,1]),(28,[2,2,0]),(~38,[2,1,3]),(14,[2,1,1])]; print("\n\n***** gcd-tests *****\n"); val ggt1 = gcd_poly [(4,[2,2]),(8,[1,1]),(4,[0,0])] [(2,[1,1]),(2,[0,0])]; (* [(2,[1,1]),(2,[0,0])] *) -if ggt1=[(2,[1,1]),(2,[0,0])] then () else raise error ("Test failed"); +if ggt1=[(2,[1,1]),(2,[0,0])] then () else error ("Test failed"); val ggt2 = gcd_poly [(8,[2,1,1]),(12,[1,0,2]),(10,[2,2,0]),(15,[1,1,1])] [(2,[2,1,0]),(3,[1,0,1]),(2,[1,1,0]),(3,[0,0,1])]; (* [(2,[1,1,0]),(3,[0,0,1])] *) -if ggt2=[(2,[1,1,0]),(3,[0,0,1])] then () else raise error ("Test failed"); +if ggt2=[(2,[1,1,0]),(3,[0,0,1])] then () else error ("Test failed"); val ggt3 = gcd_poly [(1,[2,0,0]),(~2,[1,0,1]),(1,[0,0,2])] [(1,[1,0,0]),(~1,[0,0,1])]; (* [(1,[1,0,0]),(~1,[0,0,1])] *) -if ggt3=[(1,[1,0,0]),(~1,[0,0,1])] then () else raise error ("Test failed"); +if ggt3=[(1,[1,0,0]),(~1,[0,0,1])] then () else error ("Test failed"); val ggt4 = gcd_poly [(1,[2,1,0]),(2,[2,1,0])] [(5,[1,0,0])]; (* [(1,[1,0,0])] *) -if ggt4=[(1,[1,0,0])] then () else raise error ("Test failed"); +if ggt4=[(1,[1,0,0])] then () else error ("Test failed"); val ggt5 = gcd_poly [(4,[2,0,0]),(~8,[1,0,1]),(4,[0,0,2])] [(1,[2,0,0]),(~1,[0,0,2])]; (* [(1,[1,0,0]),(~1,[0,0,1])] *) -if ggt5=[(1,[1,0,0]),(~1,[0,0,1])] then () else raise error ("Test failed"); +if ggt5=[(1,[1,0,0]),(~1,[0,0,1])] then () else error ("Test failed"); val ggt6 = gcd_poly [(10,[2,1,1]),(14,[1,1,0]),(3,[1,0,1]),(20,[1,2,1])] [(5,[1,1,1]),(7,[2,1,1])]; (* [(1,[0,0,0])] *) -if ggt6=[(1,[1,0,0])] then () else raise error ("Test failed"); +if ggt6=[(1,[1,0,0])] then () else error ("Test failed"); val ggt7 = gcd_poly [(~169,[4,3,3]),(273,[4,2,2]),(247,[3,3,4]),(~91,[3,3,2]),(78,[3,3,1]),(~399,[3,2,3]),(147,[3,2,1]),(~114,[2,3,2]),(42,[2,3,0])] [(65,[3,2,2]),(52,[3,2,1]),(26,[3,1,2]),(~95,[2,2,3]),(~76,[2,2,2]),(35,[2,2,1]),(28,[2,2,0]),(~38,[2,1,3]),(14,[2,1,1])]; (* [(13,[3,1,1]),(~19,[2,1,2]),(7,[2,1,0])] *) -if ggt7=[(13,[3,1,1]),(~19,[2,1,2]),(7,[2,1,0])] then () else raise error ("Test failed"); +if ggt7=[(13,[3,1,1]),(~19,[2,1,2]),(7,[2,1,0])] then () else error ("Test failed"); print("\n\n***** kgv-tests *****\n"); val kgv1=lcm_poly [(10,[])] [(15,[])]; (* [(30,[])] *) -if kgv1=[(30,[])] then () else raise error ("Test failed"); +if kgv1=[(30,[])] then () else error ("Test failed"); val kgv2=lcm_poly [(1,[2,0,0]),(~2,[1,0,1]),(1,[0,0,2])] [(1,[1,0,0]),(~1,[0,0,1])]; (* [(1,[2,0,0]),(~2,[1,0,1]),(1,[0,0,2])] *) -if kgv2=[(1,[2,0,0]),(~2,[1,0,1]),(1,[0,0,2])] then () else raise error ("Test failed"); +if kgv2=[(1,[2,0,0]),(~2,[1,0,1]),(1,[0,0,2])] then () else error ("Test failed"); val kgv3=lcm_poly [(4,[2,0,0]),(~8,[1,0,1]),(4,[0,0,2])] [(1,[2,0,0]),(~1,[0,0,2])]; (* [(4,[3,0,0]),(~4,[2,0,1]),(~4,[1,0,2]),(4,[0,0,3])] *) -if kgv3=[(4,[3,0,0]),(~4,[2,0,1]),(~4,[1,0,2]),(4,[0,0,3])] then () else raise error ("Test failed"); +if kgv3=[(4,[3,0,0]),(~4,[2,0,1]),(~4,[1,0,2]),(4,[0,0,3])] then () else error ("Test failed"); (* print("***** TERM2POLY-TESTS *****\n"); @@ -211,11 +211,11 @@ val term1 = (term_of o the o (parse thy)) "(10 * a^^^2 * b * c + 14 * a * b + 3 * a * c + 20 * a * b^^^2 * c) /// a"; val div1 = step_cancel term1; -(*if div1 = (term_of o the o (parse thy)) "((10 * a * b * c + 14 * b + 3 * c + 20 * b^^^2 * c) * a) /// (1 * a)" then () else raise raise error ("Test failed");*) +(*if div1 = (term_of o the o (parse thy)) "((10 * a * b * c + 14 * b + 3 * c + 20 * b^^^2 * c) * a) /// (1 * a)" then () else raise error ("Test failed");*) val term2 = (term_of o the o (parse thy)) "(10 * a^^^2 * b * c + 14 * a * b + 3 * a * c + 20 * a * b^^^2 * c) /// (5 * a * b * c + 7 * a^^^2 * b * c) "; val div2 = step_cancel term2; -(*if div2 = ([(10,[1,1,1]),(20,[0,2,1]),(14,[0,1,0]),(3,[0,0,1])],[(1,[1,0,0])],[(7,[1,1,1]),(5,[0,1,1])]) then () else raise raise error ("Test failed");*) +(*if div2 = ([(10,[1,1,1]),(20,[0,2,1]),(14,[0,1,0]),(3,[0,0,1])],[(1,[1,0,0])],[(7,[1,1,1]),(5,[0,1,1])]) then () else raise error ("Test failed");*) val term3 = (term_of o the o (parse thy)) "(10 * a^^^2 * b * c) /// (1 * x * y * z) "; @@ -229,7 +229,7 @@ val t1=mv_mul(mul1,mul2,LEX_); val t2=mv_mul(mul3,mul2,LEX_); val div3=step_cancel t1 t2; -if div3=([(5,[0,1,1]),(4,[0,1,0]),(2,[0,0,1])],[(13,[3,1,1]),(~19,[2,1,2]),(7,[2,1,0])],[(~13,[1,2,2]),(21,[1,1,1]),(6,[0,2,0])]) then () else raise error ("Test failed");*) +if div3=([(5,[0,1,1]),(4,[0,1,0]),(2,[0,0,1])],[(13,[3,1,1]),(~19,[2,1,2]),(7,[2,1,0])],[(~13,[1,2,2]),(21,[1,1,1]),(6,[0,2,0])]) then () else error ("Test failed");*) print("\n\n***** all tests successfull ;-) ******\n\n"); @@ -247,7 +247,7 @@ val t' = "(1 + 1 * a ^^^ 1)///(-2 + 2 * a ^^^ 2)"; val (t',asm') = the (rewrite_set thy' "eval_rls" false rls' t'); (*if t' = "1 /// (-2 + 2 * a)" then () -else raise error "tests/rationals.sml(1): new behaviour";*) +else error "tests/rationals.sml(1): new behaviour";*) val thy' = "Rational"; @@ -311,7 +311,7 @@ val e188a = the (rewrite_set thy' "rational_erls" false rls' e188a'); val SOME (t,_) = rewrite_set thy' "rational_erls" false mp "(8*((-1) + x))/(9*((-1) + x))"; if t="((-8) + 8 * x) / ((-9) + 9 * x)"then() -else raise error "rationals.sml: e188a new behaviour"; +else error "rationals.sml: e188a new behaviour"; print("b)\n"); val e188b'="(5 * x + -15) / (6 * x + -18 )"; val e188b = the (rewrite_set thy' "rational_erls" false rls' e188b'); @@ -320,7 +320,7 @@ val e188c = the (rewrite_set thy' "rational_erls" false rls' e188c'); val SOME (t,_) = rewrite_set thy' "rational_erls" false mp "((-1)*(b + (-1) * a))/(1*(b + (-1) * a))"; if t="(a + -1 * b) / (b + -1 * a)"then() -else raise error "rationals.sml: e188c new behaviour"; +else error "rationals.sml: e188c new behaviour"; print("\n\nexample 190:\n"); print("c)\n"); @@ -329,7 +329,7 @@ val SOME (t,_) = rewrite_set thy' "rational_erls" false mp "((1 + 9 * a ^^^ 2)*(1 + 3 * a))/((3 * a + 9 * a ^^^ 2)*(1 + 3 * a))"; if t="(1 + (3 * a + (27 * a ^^^ 3 + 9 * a ^^^ 2))) /\n(3 * a + (18 * a ^^^ 2 + 27 * a ^^^ 3))"then() (*TERMORDER ~~~~~~~ ~~~~~~~*) -else raise error "rationals.sml: e190c new behaviour"; +else error "rationals.sml: e190c new behaviour"; print("\n\nexample 191:\n"); print("a)\n"); @@ -337,13 +337,13 @@ val e191a = the (rewrite_set thy' "rational_erls" false rls' e191a'); val SOME (t,_) = rewrite_set thy' "rational_erls" false mp "((x + (-1) * y)*(x + y))/((1)*(x + y))"; if t="(x ^^^ 2 + -1 * y ^^^ 2) / (x + y)"then() -else raise error "rationals.sml: e191a new behaviour"; +else error "rationals.sml: e191a new behaviour"; print("c)\n"); val e191c'="( 9 * x^^^2 + -30 * x + 25 ) / ( 9 * x^^^2 + -25 )"; val e191c = the (rewrite_set thy' "rational_erls" false rls' e191c'); val SOME (t,_) = rewrite_set thy' "rational_erls" false mp "(((-5) + 3 * x)*((-5) + 3 * x))/((5 + 3 * x)*((-5) + 3 * x))"; if t="(25 + ((-30) * x + 9 * x ^^^ 2)) / ((-25) + 9 * x ^^^ 2)"then() -else raise error "rationals.sml: 'e191c' new behaviour"; +else error "rationals.sml: 'e191c' new behaviour"; print("\n\nexample 192:\n"); print("b)\n"); @@ -352,7 +352,7 @@ val SOME (t,_) = rewrite_set thy' "rational_erls" false mp "((x ^^^ 2)*(7 * x + (-1) * y))/((y ^^^ 2)*(7 * x + (-1) * y))"; if t="(7 * x ^^^ 3 + -1 * (y * x ^^^ 2)) / (-1 * y ^^^ 3 + 7 * (x * y ^^^ 2))"then() (*TERMORDER ~~~~~*) -else raise error "rationals.sml: 'e192b' new behaviour"; +else error "rationals.sml: 'e192b' new behaviour"; print("\n\nexample 193:\n"); print("a)\n"); @@ -595,7 +595,7 @@ val est1'="(7) / (-14) + (-2) / (4)"; val est1 = the (rewrite_set thy' "rational_erls" false rls' est1'); if est1 = ("(-1) / 1",[]) then () -else raise error "new behaviour in rationals.sml: est1'"; +else error "new behaviour in rationals.sml: est1'"; -------------------------------------------------------------------------*) @@ -669,7 +669,7 @@ val (r,(t,asm))::_ = loc revsets t r; val ss = term2str t; if ss = "(3 - x) / (3 + x)" then () - else raise error "rational.sml: new behav. in rev-set cancel"; + else error "rational.sml: new behav. in rev-set cancel"; terms2str asm; diff -r 95d956108461 -r 460c24a6a6ba test/Tools/isac/Knowledge/rational.sml --- a/test/Tools/isac/Knowledge/rational.sml Tue Sep 28 08:58:06 2010 +0200 +++ b/test/Tools/isac/Knowledge/rational.sml Tue Sep 28 09:06:56 2010 +0200 @@ -68,120 +68,120 @@ print("\n\n***** divide tests *****\n"); val mv_pquot1 = (#1(mv_division([(1,[1,1,1]),(1,[1,1,0]),(1,[1,0,1]),(1,[0,0,0])],[(1,[1,1,0]),(1,[0,0,0])],LEX_))); (* result: [(1,[0,0,1]),(1,[0,0,0])] *) -if mv_pquot1=[(1,[0,0,1]),(1,[0,0,0])] then () else raise error ("rational.sml: example failed"); +if mv_pquot1=[(1,[0,0,1]),(1,[0,0,0])] then () else error ("rational.sml: example failed"); val mv_prest1 = (#2(mv_division([(1,[1,1,1]),(1,[1,1,0]),(1,[1,0,1]),(1,[0,0,0])],[(1,[1,1,0]),(1,[0,0,0])],LEX_))); (* result: [(1,[1,0,1]),(~1,[0,0,1])] *) -if mv_prest1=[(1,[1,0,1]),(~1,[0,0,1])] then () else raise error ("rational.sml: example failed"); +if mv_prest1=[(1,[1,0,1]),(~1,[0,0,1])] then () else error ("rational.sml: example failed"); val mv_pquot2 = (#1(mv_division([(4,[2]),(8,[1]),(16,[0])],[(1,[1]),(1,[0])],LEX_))); (* result: [(4,[1]),(4,[0])] *) -if mv_pquot2=[(4,[1]),(4,[0])] then () else raise error ("rational.sml: example failed"); +if mv_pquot2=[(4,[1]),(4,[0])] then () else error ("rational.sml: example failed"); val mv_prest2 = (#2(mv_division([(4,[2]),(8,[1]),(16,[0])],[(1,[1]),(1,[0])],LEX_))); (* result: [(12,[0]] *) -if mv_prest2=[(12,[0])] then () else raise error ("rational.sml: example failed"); +if mv_prest2=[(12,[0])] then () else error ("rational.sml: example failed"); val mv_pquot3 = (#1(mv_division([(4,[2]),(~4,[0])],[(2,[1]),(2,[0])],LEX_))); (* [(2,[1]),(~2,[0])] *) -if mv_pquot3=[(2,[1]),(~2,[0])] then () else raise error ("rational.sml: example failed"); +if mv_pquot3=[(2,[1]),(~2,[0])] then () else error ("rational.sml: example failed"); val mv_prest3 = (#2(mv_division([(1,[2]),(~1,[0])],[(2,[1]),(2,[0])],LEX_))); (* [(1,[2]),(~1,[0])] *) -if mv_prest3=[(1,[2]),(~1,[0])] then () else raise error ("rational.sml: example failed"); +if mv_prest3=[(1,[2]),(~1,[0])] then () else error ("rational.sml: example failed"); val mv_pquot4 = (#1(mv_division([(3,[1,1,1]),(4,[1,0,1]),(3,[0,0,1])],[(2,[1,0,0]),(4,[0,0,1])],LEX_))); (* [(1,[0,1,1])] *) -if mv_pquot4=[(1,[0,1,1])] then () else raise error ("rational.sml: example failed"); +if mv_pquot4=[(1,[0,1,1])] then () else error ("rational.sml: example failed"); val mv_prest4 = (#2(mv_division([(3,[1,1,1]),(4,[1,0,1]),(3,[0,0,1])],[(2,[1,0,0]),(4,[0,0,1])],GGO_))); (* [(1,[1,1,1]),(~4,[0,1,2]),(4,[1,0,1]),(3,[0,0,1])] *) -if mv_prest4 =[(1,[1,1,1]),(~4,[0,1,2]),(4,[1,0,1]),(3,[0,0,1])] then () else raise error ("rational.sml: example failed"); +if mv_prest4 =[(1,[1,1,1]),(~4,[0,1,2]),(4,[1,0,1]),(3,[0,0,1])] then () else error ("rational.sml: example failed"); val mv_pquot5 = (#1(mv_division([(3,[1,1,1]),(4,[1,0,1]),(3,[0,0,1]),(6,[2,1,3]),(4,[0,4,1]),(1,[2,2,1])],[(1,[0,0,1])],LEX_))); (* [(1,[2,2,0]),(6,[2,1,2]),(3,[1,1,0]),(4,[1,0,0]),(4,[0,4,0]),(3,[0,0,0])]*) -if mv_pquot5=[(1,[2,2,0]),(6,[2,1,2]),(3,[1,1,0]),(4,[1,0,0]),(4,[0,4,0]),(3,[0,0,0])] then () else raise error ("rational.sml: example failed"); +if mv_pquot5=[(1,[2,2,0]),(6,[2,1,2]),(3,[1,1,0]),(4,[1,0,0]),(4,[0,4,0]),(3,[0,0,0])] then () else error ("rational.sml: example failed"); val mv_prest5 = (#2(mv_division([(3,[1,1,1]),(4,[1,0,1]),(3,[0,0,1]),(6,[2,1,3]),(4,[0,4,1]),(1,[2,2,1])],[(1,[0,0,1])],LEX_))); (* [] *) -if mv_prest5=[] then () else raise error ("rational.sml: example failed"); +if mv_prest5=[] then () else error ("rational.sml: example failed"); (* (x^2 + 2(a+1)x + (a^2+2a+1)) / (x+a+1) = x+a+1 *) val mv_pquot6 = (#1(mv_division([(1,[2,0,0]),(2,[1,1,0]),(2,[1,0,0]),(1,[0,2,0]),(2,[0,1,0]),(1,[0,0,0])],[(1,[1,0,0]),(1,[0,1,0]),(1,[0,0,0])],LEX_))); -if mv_pquot6=[(1,[1,0,0]),(1,[0,1,0]),(1,[0,0,0])] then () else raise error ("rational.sml: example failed"); +if mv_pquot6=[(1,[1,0,0]),(1,[0,1,0]),(1,[0,0,0])] then () else error ("rational.sml: example failed"); val mv_prest6 = (#2(mv_division([(1,[2,0,0]),(2,[1,1,0]),(2,[1,0,0]),(1,[0,2,0]),(2,[0,1,0]),(1,[0,0,0])],[(1,[1,0,0]),(1,[0,1,0]),(1,[0,0,0])],LEX_))); -if mv_prest6=[] then () else raise error ("rational.sml: example failed"); +if mv_prest6=[] then () else error ("rational.sml: example failed"); print("\n\n***** MV_CONTENT-TESTS *****\n"); val mv_cont1=mv_content([(1,[2,1]),(1,[2,0]),(1,[1,1]),(1,[1,0]),(1,[0,1]),(1,[0,0])]); (* [(1,[0,1]),(1,[0,0])] *) -if mv_cont1=[(1,[0,1]),(1,[0,0])] then () else raise error ("rational.sml: example failed"); +if mv_cont1=[(1,[0,1]),(1,[0,0])] then () else error ("rational.sml: example failed"); val mv_pp1=mv_pp([(1,[1,1]),(1,[1,0]),(1,[0,1]),(1,[0,0])]); (*[(1,[1,0]),(1,[0,0])]*) -if mv_pp1=[(1,[1,0]),(1,[0,0])] then () else raise error ("rational.sml: example failed"); +if mv_pp1=[(1,[1,0]),(1,[0,0])] then () else error ("rational.sml: example failed"); val mv_cont2=mv_content([(2,[1]),(4,[0])]); (* [(2,[0])] *) -if mv_cont2=[(2,[0])] then () else raise error ("rational.sml: example failed"); +if mv_cont2=[(2,[0])] then () else error ("rational.sml: example failed"); val mv_pp2=mv_pp([(2,[1]),(4,[0])]); (* [(1,[1]),(2,[0])] *) -if mv_pp2=[(1,[1]),(2,[0])] then () else raise error ("rational.sml: example failed"); +if mv_pp2=[(1,[1]),(2,[0])] then () else error ("rational.sml: example failed"); val mv_cont3=mv_content[(8,[2,1,1]),(12,[1,0,2]),(10,[2,2,0]),(16,[1,1,1])]; (* [(2,[0,0,0])] *) -if mv_cont3=[(2,[0,0,0])] then () else raise error ("rational.sml: example failed"); +if mv_cont3=[(2,[0,0,0])] then () else error ("rational.sml: example failed"); val mv_pp3=mv_pp[(8,[2,1,1]),(12,[1,0,2]),(10,[2,2,0]),(16,[1,1,1])]; (* [(5,[2,2,0]),(4,[2,1,1]),(8,[1,1,1]),(6,[1,0,2])] *) -if mv_pp3=[(5,[2,2,0]),(4,[2,1,1]),(8,[1,1,1]),(6,[1,0,2])] then () else raise error ("rational.sml: example failed"); +if mv_pp3=[(5,[2,2,0]),(4,[2,1,1]),(8,[1,1,1]),(6,[1,0,2])] then () else error ("rational.sml: example failed"); val mv_cont4=mv_content[(2,[2,1,0]),(3,[1,0,1]),(2,[1,1,0]),(3,[0,0,1])]; (* [(1,[0,0,0])] *) -if mv_cont4=[(1,[0,0,0])] then () else raise error ("rational.sml: example failed"); +if mv_cont4=[(1,[0,0,0])] then () else error ("rational.sml: example failed"); val mv_pp4=mv_pp [(2,[2,1,0]),(3,[1,0,1]),(2,[1,1,0]),(3,[0,0,1])]; (* [(2,[2,1,0]),(2,[1,1,0]),(3,[1,0,1]),(3,[0,0,1])] *) -if mv_pp4=[(2,[2,1,0]),(2,[1,1,0]),(3,[1,0,1]),(3,[0,0,1])] then () else raise error ("rational.sml: example failed"); +if mv_pp4=[(2,[2,1,0]),(2,[1,1,0]),(3,[1,0,1]),(3,[0,0,1])] then () else error ("rational.sml: example failed"); val con1=mv_content([(9,[2,0]),(15,[1,1]),(12,[1,0]),(6,[0,2]),(12,[0,1])]); (* [(3,[0,0])] *) -if con1=[(3,[0,0])] then () else raise error ("rational.sml: example failed"); +if con1=[(3,[0,0])] then () else error ("rational.sml: example failed"); val pp1=mv_pp([(9,[2,0]),(15,[1,1]),(12,[1,0]),(6,[0,2]),(12,[0,1])]); (* [(3,[2,0]),(5,[1,1]),(4,[1,0]),(2,[0,2]),(4,[0,1])] *) -if pp1=[(3,[2,0]),(5,[1,1]),(4,[1,0]),(2,[0,2]),(4,[0,1])] then () else raise error ("rational.sml: example failed"); +if pp1=[(3,[2,0]),(5,[1,1]),(4,[1,0]),(2,[0,2]),(4,[0,1])] then () else error ("rational.sml: example failed"); val con2=mv_content([(1,[2,0]),(1,[1,1]),(1,[1,0]),(1,[0,2]),(1,[0,1])]); (* [(1,[0,0])] *) -if con2=[(1,[0,0])] then () else raise error ("rational.sml: example failed"); +if con2=[(1,[0,0])] then () else error ("rational.sml: example failed"); val pp2 =mv_pp([(1,[2,0]),(1,[1,1]),(1,[1,0]),(1,[0,2]),(1,[0,1])]); (* [(1,[2,0]),(1,[1,1]),(1,[1,0]),(1,[0,2]),(1,[0,1])] *) -if pp2=[(1,[2,0]),(1,[1,1]),(1,[1,0]),(1,[0,2]),(1,[0,1])] then () else raise error ("rational.sml: example failed"); +if pp2=[(1,[2,0]),(1,[1,1]),(1,[1,0]),(1,[0,2]),(1,[0,1])] then () else error ("rational.sml: example failed"); val cont1 = mv_content [(1,[2,1,0]),(2,[2,1,0])]; (* [(3,[0,1,0])] *) -if cont1=[(3,[0,1,0])] then () else raise error ("rational.sml: example failed"); +if cont1=[(3,[0,1,0])] then () else error ("rational.sml: example failed"); val pp1 = mv_pp [(1,[2,1,0]),(2,[2,1,0])]; (* [(1,[2,0,0])] *) -if pp1=[(1,[2,0,0])] then () else raise error ("rational.sml: example failed"); +if pp1=[(1,[2,0,0])] then () else error ("rational.sml: example failed"); val cont2 = mv_content [(4,[1,2,0]),(2,[2,1,0])]; (* [(2,[0,1,0])] *) -if cont2=[(2,[0,1,0])] then () else raise error ("rational.sml: example failed"); +if cont2=[(2,[0,1,0])] then () else error ("rational.sml: example failed"); val pp2 = mv_pp [(4,[1,2,0]),(2,[2,1,0])]; (* [(1,[2,0,0]),(2,[1,1,0])] *) -if pp2=[(1,[2,0,0]),(2,[1,1,0])] then () else raise error ("rational.sml: example failed"); +if pp2=[(1,[2,0,0]),(2,[1,1,0])] then () else error ("rational.sml: example failed"); print("\n\n\n\n********************************************************\n\n"); val cont3=mv_content [(65,[3,2,2]),(52,[3,2,1]),(26,[3,1,2]),(~95,[2,2,3]),(~76,[2,2,2]),(35,[2,2,1]),(28,[2,2,0]),(~38,[2,1,3]),(14,[2,1,1])]; -if cont3=[(5,[0,2,1]),(4,[0,2,0]),(2,[0,1,1])] then () else raise error ("rational.sml: example failed"); +if cont3=[(5,[0,2,1]),(4,[0,2,0]),(2,[0,1,1])] then () else error ("rational.sml: example failed"); val pp3=mv_pp [(65,[3,2,2]),(52,[3,2,1]),(26,[3,1,2]),(~95,[2,2,3]),(~76,[2,2,2]),(35,[2,2,1]),(28,[2,2,0]),(~38,[2,1,3]),(14,[2,1,1])]; @@ -213,60 +213,60 @@ print("\n\n***** mv_gcd-tests *****\n"); val ggt1 = mv_gcd [(4,[2,2]),(8,[1,1]),(4,[0,0])] [(2,[1,1]),(2,[0,0])]; (* [(2,[1,1]),(2,[0,0])] *) -if ggt1=[(2,[1,1]),(2,[0,0])] then () else raise error ("rational.sml: example failed"); +if ggt1=[(2,[1,1]),(2,[0,0])] then () else error ("rational.sml: example failed"); val ggt2 = mv_gcd [(8,[2,1,1]),(12,[1,0,2]),(10,[2,2,0]),(15,[1,1,1])] [(2,[2,1,0]),(3,[1,0,1]),(2,[1,1,0]),(3,[0,0,1])]; (* [(2,[1,1,0]),(3,[0,0,1])] *) -if ggt2=[(2,[1,1,0]),(3,[0,0,1])] then () else raise error ("rational.sml: example failed"); +if ggt2=[(2,[1,1,0]),(3,[0,0,1])] then () else error ("rational.sml: example failed"); val ggt3 = mv_gcd [(1,[2,0]),(~2,[1,1]),(1,[0,2])] [(1,[1,0]),(~1,[0,1])]; (* [(1,[1,0]),(~1,[0,1])] *) -if ggt3=[(1,[1,0]),(~1,[0,1])] then () else raise error ("rational.sml: example failed"); +if ggt3=[(1,[1,0]),(~1,[0,1])] then () else error ("rational.sml: example failed"); val ggt4 = mv_gcd [(1,[2,1,0]),(2,[2,1,0])] [(5,[1,0,0])]; (* [(1,[1,0,0])] *) -if ggt4=[(1,[1,0,0])] then () else raise error ("rational.sml: example failed"); +if ggt4=[(1,[1,0,0])] then () else error ("rational.sml: example failed"); val ggt5 = mv_gcd [(4,[2,0]),(~8,[1,1]),(4,[0,2])] [(1,[2,0]),(~1,[0,2])]; (* [(1,[1,0]),(~1,[0,1])] *) -if ggt5=[(1,[1,0]),(~1,[0,1])] then () else raise error ("rational.sml: example failed"); +if ggt5=[(1,[1,0]),(~1,[0,1])] then () else error ("rational.sml: example failed"); val ggt6 = mv_gcd [(10,[2,1,1]),(14,[1,1,0]),(3,[1,0,1]),(20,[1,2,1])] [(5,[1,1,1]),(7,[2,1,1])]; (* [(1,[0,0,0])] *) -if ggt6=[(1,[1,0,0])] then () else raise error ("rational.sml: example failed"); +if ggt6=[(1,[1,0,0])] then () else error ("rational.sml: example failed"); print("\n\n***** kgv-tests *****\n"); val kgv1=mv_lcm [(10,[])] [(15,[])]; (* [(30,[])] *) -if kgv1=[(30,[])] then () else raise error ("rational.sml: example failed"); +if kgv1=[(30,[])] then () else error ("rational.sml: example failed"); val kgv2=mv_lcm [(1,[2,0]),(~2,[1,1]),(1,[0,2])] [(1,[1,0]),(~1,[0,1])]; (* [(1,[2,0]),(~2,[1,1]),(1,[0,2])] *) -if kgv2=[(1,[2,0]),(~2,[1,1]),(1,[0,2])] then () else raise error ("rational.sml: example failed"); +if kgv2=[(1,[2,0]),(~2,[1,1]),(1,[0,2])] then () else error ("rational.sml: example failed"); val kgv3=mv_lcm [(4,[2,0]),(~8,[1,1]),(4,[0,2])] [(1,[2,0]),(~1,[0,2])]; (* [(4,[3,0]),(~4,[2,1]),(~4,[1,2]),(4,[0,3])] *) -if kgv3=[(4,[3,0]),(~4,[2,1]),(~4,[1,2]),(4,[0,3])] then () else raise error ("rational.sml: example failed"); +if kgv3=[(4,[3,0]),(~4,[2,1]),(~4,[1,2]),(4,[0,3])] then () else error ("rational.sml: example failed"); (*!!!-------- print("\n\n***** STEP_CANCEL_TESTS: *****\n"); val term2 = (term_of o the o (parse thy)) " (9 * a^^^2 * b) / (6 * a * c)"; val div2 = term2str (step_cancel term2); -if div2 = "3 * (a * b) * (3 * a) / (2 * c * (3 * a))" then () else raise error ("rational.sml: example failed"); +if div2 = "3 * (a * b) * (3 * a) / (2 * c * (3 * a))" then () else error ("rational.sml: example failed"); val term1 = (term_of o the o (parse thy)) "(10 * a^^^2 * b * c + 14 * a * b + 3 * a * c + 20 * a * b^^^2 * c) / a"; val div1 = term2str(step_cancel term1); -if div1 = "(3 * c + 14 * b + 20 * (b ^^^ 2 * c) + 10 * (a * (b * c))) * a / (1 * a)" then () else raise error ("rational.sml: example failed"); +if div1 = "(3 * c + 14 * b + 20 * (b ^^^ 2 * c) + 10 * (a * (b * c))) * a / (1 * a)" then () else error ("rational.sml: example failed"); val term3 = (term_of o the o (parse thy)) "(10 * a^^^2 * b * c) / (1 * x * y * z) "; val div3 = term2str(step_cancel term3); -if div3="10 * a ^^^ 2 * b * c / (1 * x * y * z)" then () else raise error ("rational.sml: example failed"); +if div3="10 * a ^^^ 2 * b * c / (1 * x * y * z)" then () else error ("rational.sml: example failed"); --------------------------------------------------------------------------!!!*) @@ -430,16 +430,16 @@ val SOME (t'',_) = add_fraction_ thy t; if term2str t' = "(-1 * y ^^^ 2 + x ^^^ 2) / ((-1 * y + x) * (-1 * y + x))\ \ +\n1 * (-1 * y + x) / ((-1 * y + x) * (-1 * y + x))" then () -else raise error "rational.sml lex-ord 1"; +else error "rational.sml lex-ord 1"; if term2str t'' = "(-1 - y - x) / (y - x)" then () -else raise error "rational.sml lex-ord 2"; +else error "rational.sml lex-ord 2"; (*WN.16.10.02 WN070905 lexicographische Ordnung erhalten ! SK.ord*) val t = str2term "(x^^^2 - y^^^2)/(x^^^2 - 2*x*y + y^^^2)"; val SOME (t',_) = norm_expanded_rat_ thy t; if term2str t' = "(x + y) / (x - y)" then () -else raise error "rational.sml term2poly: invalid x ^^^ 2 - y ^^^ 2 1"; +else error "rational.sml term2poly: invalid x ^^^ 2 - y ^^^ 2 1"; (*val SOME (t'',_) = norm_rational_ thy t; *** RATIONALS_TERM2POLY_EXCEPTION: Invalid Polynomial WN.16.10.02 ?! + WN060831???SK4 @@ -449,7 +449,7 @@ val t = str2term "(9 - x^^^2)/(9 - 6*x + x^^^2) + (1)/(3 + x)"; val SOME (t',_) = norm_expanded_rat_ thy t; if term2str t' = "(12 + 5 * x + x ^^^ 2) / (9 - x ^^^ 2)" then () -else raise error "rational.sml (9 - x^^^2)/(9 - 6*x + x^^^2) +..."; +else error "rational.sml (9 - x^^^2)/(9 - 6*x + x^^^2) +..."; (*val SOME (t'',_) = norm_rational_ thy t; *** RATIONALS_TERM2POLY_EXCEPTION: Invalid Polynomial WN.16.10.02 ?! WN070906 *** term2poly: invalid = 9 - x ^^^ 2 SK.term2poly*) @@ -510,7 +510,7 @@ is_expanded (parse_rat "8 * x + -8"); (* e188a = ("8 / 9",["not ((-1) + x = 0)"]) then () 13.3.03*) if e188a = ("8 / 9",["-1 + x ~= 0"]) then () -else raise error "rational.sml: e188a new behaviour"; +else error "rational.sml: e188a new behaviour"; val SOME (t,_) = rewrite_set thy' false mp "(8*((-1) + x))/(9*((-1) + x))"; print("b)\n"); @@ -525,7 +525,7 @@ val SOME (t,_) = rewrite_set thy' false mp "((-1)*(b + (-1) * a))/(1*(b + (-1) * a))"; if t= "(a + -1 * b) / (-1 * a + b)" then() -else raise error "rational.sml: e188c new behaviour"; +else error "rational.sml: e188c new behaviour"; print("\n\nexample 190:\n"); print("c)\n"); @@ -533,7 +533,7 @@ val e190c = the (rewrite_set thy' false "cancel" e190c'); val SOME (t,_) = rewrite_set thy' false mp "((1 + 9 * a ^^^ 2)*(1 + 3 * a))/((3 * a + 9 * a ^^^ 2)*(1 + 3 * a))"; if t = "(1 + 3 * a + 9 * a ^^^ 2 + 27 * a ^^^ 3) /\n(3 * a + 18 * a ^^^ 2 + 27 * a ^^^ 3)" then () -else raise error "rational.sml: e190c new behaviour"; +else error "rational.sml: e190c new behaviour"; print("\n\nexample 191:\n"); print("a)\n"); @@ -547,7 +547,7 @@ val SOME (t,_) = rewrite_set thy' false mp "((x + (-1) * y)*(x + y))/((1)*(x + y))"; (* t="(x ^^^ 2 + -1 * y ^^^ 2) / (x + y)" then() WN.13.3.03*) if t="(x ^^^ 2 + -1 * y ^^^ 2) / (x + y)" then() -else raise error "rational.sml: e191a new behaviour"; +else error "rational.sml: e191a new behaviour"; print("c)\n"); val e191c'="( 9 * x^^^2 + -30 * x + 25 ) / ( 9 * x^^^2 + -25 )"; @@ -562,7 +562,7 @@ val SOME (t,_) = rewrite_set thy' false mp "(((-5) + 3 * x)*((-5) + 3 * x))/((5 + 3 * x)*((-5) + 3 * x))"; (* t="(25 + ((-30) * x + 9 * x ^^^ 2)) / ((-25) + 9 * x ^^^ 2)"then() 13.3.03*) if t= "(25 + -30 * x + 9 * x ^^^ 2) / (-25 + 9 * x ^^^ 2)" then() -else raise error "rational.sml: 'e191c' new behaviour"; +else error "rational.sml: 'e191c' new behaviour"; print("\n\nexample 192:\n"); @@ -574,11 +574,11 @@ val SOME (t',_) = rewrite_set thy' false mp "((x ^^^ 2)*(7 * x + (-1) * y))/((y ^^^ 2)*(7 * x + (-1) * y))"; if t' = "(7 * x ^^^ 3 + -1 * x ^^^ 2 * y) / (7 * x * y ^^^ 2 + -1 * y ^^^ 3)" (*"(-1 * y * x ^^^ 2 + 7 * x ^^^ 3) / (-1 * y ^^^ 3 + 7 * x * y ^^^ 2)"WN050929*) -then () else raise error "rational.sml: 'e192b' new behaviour"; +then () else error "rational.sml: 'e192b' new behaviour"; (*^^^ works with MG's simplifier vvv*) val t =str2term"((x ^^^ 2)*(7 * x + (-1) * y))/((y ^^^ 2)*(7 * x + (-1) * y))"; val SOME (t',_) = rewrite_set_ Isac.thy false make_polynomial t; -if term2str t' = "(7 * x ^^^ 3 + -1 * x ^^^ 2 * y) / (7 * x * y ^^^ 2 + -1 * y ^^^ 3)" then () else raise error "rational.sml: 'e192b'MG new behaviour"; +if term2str t' = "(7 * x ^^^ 3 + -1 * x ^^^ 2 * y) / (7 * x * y ^^^ 2 + -1 * y ^^^ 3)" then () else error "rational.sml: 'e192b'MG new behaviour"; print("\n\nexample 193:\n"); @@ -600,7 +600,7 @@ val SOME (t,_) = rewrite_set thy' false "cancel" wn01; (* t = "((-5) + 3 * x) / 1" then () WN.13.3.03*) if t = "(-5 + 3 * x) / 1" then () -else raise error "rational.sml: new behav. in cancel wn01"; +else error "rational.sml: new behav. in cancel wn01"; "-------- common_nominator_p ---------------------------- --------"; @@ -838,7 +838,7 @@ val est1'="(7) / (-14) + (-2) / (4)"; val est1 = the (rewrite_set thy' false "common_nominator_p" est1'); if est1 = ("-1 / 1",[]) then () -else raise error "new behaviour in rational.sml: est1'"; +else error "new behaviour in rational.sml: est1'"; val t = (term_of o the o (parse thy)) "(9 - x ^^^ 2) / (9 - 6 * x + x ^^^ 2)"; @@ -909,7 +909,7 @@ val (r,(t,asm))::_ = loc revsets t r; val ss = term2str t; if ss = "(3 - x) / (3 + x)" then () - else raise error "rational.sml: new behav. in rev-set cancel"; + else error "rational.sml: new behav. in rev-set cancel"; terms2str asm; @@ -963,18 +963,18 @@ "-------- norm_Rational ------------------------------------------"; val t = str2term "(3*x+5)/18 - x/2 - -(3*x - 2)/9 = 0"; val SOME (t',_) = rewrite_set_ thy false norm_Rational t; term2str t'; -if term2str t' = "1 / 18 = 0" then () else raise error "rational.sml 1"; +if term2str t' = "1 / 18 = 0" then () else error "rational.sml 1"; val t = str2term "(17*x - 51)/9 - (-(13*x - 3)/6) + 11 - (9*x - 7)/4 = 0"; val SOME (t',_) = rewrite_set_ thy false norm_Rational t; term2str t'; if term2str t' = "(237 + 65 * x) / 36 = 0" then () -else raise error "rational.sml 2"; +else error "rational.sml 2"; val t = str2term "(1/2 + (5*x)/2)^^^2 - ((13*x)/2 - 5/2)^^^2 - (6*x)^^^2 + 29"; val SOME (t',_) = rewrite_set_ thy false norm_Rational t; term2str t'; (*before 040209:if term2str t' = "(23 + (35 * x + -72 * x ^^^ 2)) / 1"then()*) if term2str t' = "23 + 35 * x + -72 * x ^^^ 2" then () -else raise error "rational.sml 3"; +else error "rational.sml 3"; (*trace_rewrite:=true;*) val t = str2term "Not (6*x is_atom)"; val SOME (t',_) = rewrite_set_ thy false powers_erls t; term2str t'; @@ -990,37 +990,37 @@ val t = str2term "-1 * (-2 * (5 / 2 * (13 * x / 2)))"; val SOME (t',_) = rewrite_set_ thy false norm_Rational t; term2str t'; -if term2str t' = "65 * x / 2" then () else raise error "rational.sml 4"; +if term2str t' = "65 * x / 2" then () else error "rational.sml 4"; val t = str2term "1 - ((13*x)/2 - 5/2)^^^2"; val SOME (t',_) = rewrite_set_ thy false norm_Rational t; term2str t'; (*bef.040209: if term2str t' = "(-21 + (130 * x + -169 * x ^^^ 2)) / 4"then()*) if term2str t' = "(-21 + 130 * x + -169 * x ^^^ 2) / 4" then () -else raise error "rational.sml 5"; +else error "rational.sml 5"; (*SRAM Schalk I, p.92 Nr. 609a*) val t = str2term "2*(3 - x/5)/3 - 4*(1 - x/3) - x/3 - 2*(x/2 - 1/4)/27 +5/54"; val SOME (t',_) = rewrite_set_ thy false norm_Rational t; term2str t'; if term2str t' = "(-255 + 112 * x) / 135" then () -else raise error "rational.sml 6"; +else error "rational.sml 6"; (*SRAM Schalk I, p.92 Nr. 610c*) val t = str2term "((x- 1)/(x+1) + 1) / ((x- 1)/(x+1) - (x+1)/(x- 1)) - 2"; val SOME (t',_) = rewrite_set_ thy false norm_Rational t; term2str t'; -if term2str t' = "(-3 + -1 * x) / 2" then () else raise error "rational.sml 7"; +if term2str t' = "(-3 + -1 * x) / 2" then () else error "rational.sml 7"; (*SRAM Schalk I, p.92 Nr. 476a*) val t = str2term "(x^^^2/(1 - x^^^2) + 1)/(x/(1 - x) + 1) *\ \ (1 + x)";(*. a/b : c/d translated to a/b * d/c .*) val SOME (t',_) = rewrite_set_ thy false norm_Rational t; term2str t'; -(*if term2str t' = "1 / 1" then () else raise error "rational.sml 8";3.6.03*) -if term2str t' = "1" then () else raise error "rational.sml 8"; +(*if term2str t' = "1 / 1" then () else error "rational.sml 8";3.6.03*) +if term2str t' = "1" then () else error "rational.sml 8"; (*............................vvv---TODO: sollte gehen mit poly_order *) (*Schalk I, p.92 Nr. 472a*) val t = str2term "((8*x^^^2 - 32*y^^^2)/(2*x + 4*y))/((4*x - 8*y)/(x + y))"; val SOME (t',_) = rewrite_set_ thy false norm_Rational t; term2str t'; -if term2str t' = "x + y" then () else raise error "rational.sml p.92 Nr. 472a"; +if term2str t' = "x + y" then () else error "rational.sml p.92 Nr. 472a"; (*Schalk I, p.70 Nr. 480b; a/b : c/d translated to a/b * d/c*) val t = str2term "((12*x*y/(9*x^^^2 - y^^^2))/\ @@ -1067,14 +1067,14 @@ val SOME (t,_) = rewrite_set_ thy false norm_Rational(*_mg*) t; term2str t; if (term2str t) = "19 / 21" then () -else raise error "rational.sml.sml: diff.behav. in norm_Rational_mg 1"; +else error "rational.sml.sml: diff.behav. in norm_Rational_mg 1"; (*SRA Schalk I, p.40 Nr. 166a *) val t = str2term "((5/4)/(4+22/7) + 37/20)*(110/3 - 110/9 * 23/11)"; val SOME (t,_) = rewrite_set_ thy false norm_Rational(*_mg*) t; term2str t; if (term2str t) = "45 / 2" then () -else raise error "rational.sml.sml: diff.behav. in norm_Rational_mg 2"; +else error "rational.sml.sml: diff.behav. in norm_Rational_mg 2"; "-------- cancellation -------------------------------------------"; @@ -1089,7 +1089,7 @@ if (term2str t) = "(1 + 9 * a ^^^ 2) / (3 * a + 9 * a ^^^ 2)" then () -else raise error "rational.sml.sml: diff.behav. in norm_Rational_mg 3"; +else error "rational.sml.sml: diff.behav. in norm_Rational_mg 3"; (* e192b Stefan K.*) val t = str2term @@ -1099,7 +1099,7 @@ if (term2str t) = "x ^^^ 2 / y ^^^ 2" then () -else raise error "rational.sml.sml: diff.behav. in norm_Rational_mg 4"; +else error "rational.sml.sml: diff.behav. in norm_Rational_mg 4"; (*SRC Schalk I, p.66 Nr. 379c *) val t = str2term @@ -1109,7 +1109,7 @@ if (term2str t) = "-1" then () -else raise error "rational.sml.sml: diff.behav. in norm_Rational_mg 5"; +else error "rational.sml.sml: diff.behav. in norm_Rational_mg 5"; (*SRC Schalk I, p.66 Nr. 380b *) val t = str2term @@ -1119,7 +1119,7 @@ if (term2str t) = "(27 + 12 * x) / (28 + 8 * x)" then () -else raise error "rational.sml.sml: diff.behav. in norm_Rational_mg 6"; +else error "rational.sml.sml: diff.behav. in norm_Rational_mg 6"; (*Schalk I, p.60 Nr. 215c *) (* Falsches Ergebnis: rechnet lange und cancel_p kann nicht weiter krzen!!!*) @@ -1130,7 +1130,7 @@ if (term2str t) = "(a ^^^ 4 * x + -1 * a ^^^ 4 * y + 4 * a ^^^ 3 * b * x + -4 * a ^^^ 3 * b * y + 6 * a ^^^ 2 * b ^^^ 2 * x + -6 * a ^^^ 2 * b ^^^ 2 * y + 4 * a * b ^^^ 3 * x + -4 * a * b ^^^ 3 * y + b ^^^ 4 * x + -1 * b ^^^ 4 * y) /(a ^^^ 2 * x ^^^ 3 + -3 * a ^^^ 2 * x ^^^ 2 * y + 3 * a ^^^ 2 * x * y ^^^ 2 + -1 * a ^^^ 2 * y ^^^ 3 + 2 * a * b * x ^^^ 3 + -6 * a * b * x ^^^ 2 * y + 6 * a * b * x * y ^^^ 2 + -2 * a * b * y ^^^ 3 + b ^^^ 2 * x ^^^ 3 + -3 * b ^^^ 2 * x ^^^ 2 * y + 3 * b ^^^ 2 * x * y ^^^ 2 + -1 * b ^^^ 2 * y ^^^ 3)" then () -else raise error "rational.sml.sml: diff.behav. in norm_Rational_mg 7"; +else error "rational.sml.sml: diff.behav. in norm_Rational_mg 7"; *) (*val t = str2term "(a ^^^ 4 * x + -1 * a ^^^ 4 * y + 4 * a ^^^ 3 * b * x + -4 * a ^^^ 3 * b * y + 6 * a ^^^ 2 * b ^^^ 2 * x + -6 * a ^^^ 2 * b ^^^ 2 * y + 4 * a * b ^^^ 3 * x + -4 * a * b ^^^ 3 * y + b ^^^ 4 * x + -1 * b ^^^ 4 * y) /(a ^^^ 2 * x ^^^ 3 + -3 * a ^^^ 2 * x ^^^ 2 * y + 3 * a ^^^ 2 * x * y ^^^ 2 + -1 * a ^^^ 2 * y ^^^ 3 + 2 * a * b * x ^^^ 3 + -6 * a * b * x ^^^ 2 * y + 6 * a * b * x * y ^^^ 2 + -2 * a * b * y ^^^ 3 + b ^^^ 2 * x ^^^ 3 + -3 * b ^^^ 2 * x ^^^ 2 * y + 3 * b ^^^ 2 * x * y ^^^ 2 + -1 * b ^^^ 2 * y ^^^ 3)" @@ -1147,7 +1147,7 @@ term2str t; if (term2str t) = "(a + b) / (4 * a + -4 * b)" -then () else raise error "rational.sml.sml: diff.behav. in norm_Rational_mg 8"; +then () else error "rational.sml.sml: diff.behav. in norm_Rational_mg 8"; *) (*SRC Schalk I, p.66 Nr. 381b *) @@ -1158,7 +1158,7 @@ if (term2str t) = "-1 / (5 + -2 * x)" then () -else raise error "rational.sml.sml: diff.behav. in norm_Rational_mg 9"; +else error "rational.sml.sml: diff.behav. in norm_Rational_mg 9"; (*SRC Schalk I, p.66 Nr. 381c *) val t = str2term @@ -1168,7 +1168,7 @@ if (term2str t) = "(1 + 9 * a ^^^ 2) / (3 * a + 9 * a ^^^ 2)" then () -else raise error "rational.sml.sml: diff.behav. in norm_Rational_mg 10"; +else error "rational.sml.sml: diff.behav. in norm_Rational_mg 10"; (*SRC Schalk I, p.66 Nr. 383a *) val t = str2term @@ -1178,7 +1178,7 @@ if (term2str t) = "5 * a / (a + -1 * b)" then () -else raise error "rational.sml.sml: diff.behav. in norm_Rational_mg 11"; +else error "rational.sml.sml: diff.behav. in norm_Rational_mg 11"; "-------- common denominator -------------------------------------"; "-------- common denominator -------------------------------------"; @@ -1192,7 +1192,7 @@ if (term2str t) = "(-3 * x + 4 * y + -1 * x * y) / (x * y)" then () -else raise error "rational.sml.sml: diff.behav. in norm_Rational_mg 12"; +else error "rational.sml.sml: diff.behav. in norm_Rational_mg 12"; (*SRA Schalk I, p.67 Nr. 407b *) val t = str2term @@ -1202,7 +1202,7 @@ if (term2str t) = "4 / c" then () -else raise error "rational.sml.sml: diff.behav. in norm_Rational_mg 13"; +else error "rational.sml.sml: diff.behav. in norm_Rational_mg 13"; (*SRA Schalk I, p.67 Nr. 410b *) val t = str2term @@ -1212,7 +1212,7 @@ if (term2str t) = "(5 + 3 * x) / (6 + 11 * x + 6 * x ^^^ 2 + x ^^^ 3)" then () -else raise error "rational.sml.sml: diff.behav. in norm_Rational_mg 14"; +else error "rational.sml.sml: diff.behav. in norm_Rational_mg 14"; (*SRA Schalk I, p.67 Nr. 413b *) val t = str2term @@ -1222,7 +1222,7 @@ if (term2str t) = "6 * x / (1 + -1 * x ^^^ 2)" then () -else raise error "rational.sml.sml: diff.behav. in norm_Rational_mg 15"; +else error "rational.sml.sml: diff.behav. in norm_Rational_mg 15"; (*SRA Schalk I, p.68 Nr. 414a *) val t = str2term @@ -1232,7 +1232,7 @@ if (term2str t) = "(-2 + -5 * x + 2 * x ^^^ 2) / (2 + -3 * x + x ^^^ 2)" then () -else raise error "rational.sml.sml: diff.behav. in norm_Rational_mg 16"; +else error "rational.sml.sml: diff.behav. in norm_Rational_mg 16"; (*SRA Schalk I, p.68 Nr. 423a *) val t = str2term @@ -1242,7 +1242,7 @@ if (term2str t) = "1" then () -else raise error "rational.sml.sml: diff.behav. in norm_Rational_mg 17"; +else error "rational.sml.sml: diff.behav. in norm_Rational_mg 17"; (*SRA Schalk I, p.68 Nr. 428b *) val t = str2term @@ -1252,7 +1252,7 @@ if (term2str t) = "4 / (a ^^^ 4 + -2 * a ^^^ 2 * b ^^^ 2 + b ^^^ 4)" then () -else raise error "rational.sml.sml: diff.behav. in norm_Rational_mg 18"; +else error "rational.sml.sml: diff.behav. in norm_Rational_mg 18"; (*SRA Schalk I, p.68 Nr. 430b *) val t = str2term @@ -1262,7 +1262,7 @@ if (term2str t) = "a + 3 * b" then () -else raise error "rational.sml.sml: diff.behav. in norm_Rational_mg 19"; +else error "rational.sml.sml: diff.behav. in norm_Rational_mg 19"; (*SRA Schalk I, p.68 Nr. 432 *) @@ -1273,7 +1273,7 @@ if (term2str t) = "0" then () -else raise error "rational.sml.sml: diff.behav. in norm_Rational_mg 20"; +else error "rational.sml.sml: diff.behav. in norm_Rational_mg 20"; (*Eigenes*) val t = str2term @@ -1283,7 +1283,7 @@ if (term2str t) = "(3 * y + b * x) / (b * y)" then () -else raise error "rational.sml.sml: diff.behav. in norm_Rational_mg 21"; +else error "rational.sml.sml: diff.behav. in norm_Rational_mg 21"; "-------- multiply and cancel ------------------------------------"; @@ -1298,7 +1298,7 @@ if (term2str t) = "(5 * x + -5 * y) / (18 * x + 18 * y)" then () -else raise error "rational.sml.sml: diff.behav. in norm_Rational_mg 22"; +else error "rational.sml.sml: diff.behav. in norm_Rational_mg 22"; (*SRM.test Schalk I, p.68 Nr. 436b *) (*WN060420???MG3 crashes with method 'simplify' in @@ -1309,26 +1309,26 @@ if (term2str t) = "5 * a / (a + -1 * b)" then () -else raise error "rational.sml.sml: diff.behav. in norm_Rational_mg 23"; +else error "rational.sml.sml: diff.behav. in norm_Rational_mg 23"; (*Schalk I, p.68 Nr. 437a *) val t = str2term "(3*a - 4*b)/(4*c+3*e) * (3*a+4*b)/(9*a^^^2 - 16*b^^^2)"; val SOME (t,_) = rewrite_set_ thy false norm_Rational(*_mg*) t; if (term2str t) = "1 / (4 * c + 3 * e)" then () -else raise error "rational.sml.sml: diff.behav. in norm_Rational_mg 24"; +else error "rational.sml.sml: diff.behav. in norm_Rational_mg 24"; "----- S.K. corrected non-termination 060904"; val t = str2term "(3*a - 4*b) * (3*a+4*b)/((4*c+3*e)*(9*a^^^2 - 16*b^^^2))"; val SOME (t',_) = rewrite_set_ thy false make_polynomial t; if term2str t' = "(9 * a ^^^ 2 + -16 * b ^^^ 2) /\n(36 * a ^^^ 2 * c + 27 * a ^^^ 2 * e + -64 * b ^^^ 2 * c +\n -48 * b ^^^ 2 * e)" then () -else raise error "rational.sml.sml: S.K.8..corrected 060904-6"; +else error "rational.sml.sml: S.K.8..corrected 060904-6"; "----- S.K. corrected non-termination of cancel_p_"; val t'' = str2term "(9 * a ^^^ 2 + -16 * b ^^^ 2) /\ \(36 * a^^^2 * c + (27 * a^^^2 * e + (-64 * b^^^2 * c + -48 * b^^^2 * e)))"; val SOME (t',_) = rewrite_set_ thy false cancel_p t''; if term2str t' = "1 / (4 * c + 3 * e)" then () -else raise error "rational.sml.sml: diff.behav. in cancel_p S.K.8"; +else error "rational.sml.sml: diff.behav. in cancel_p S.K.8"; (**) @@ -1354,7 +1354,7 @@ if (term2str t) = "x ^^^ 2" then () -else raise error "rational.sml.sml: diff.behav. in norm_Rational_mg 24"; +else error "rational.sml.sml: diff.behav. in norm_Rational_mg 24"; (*SRM Schalk I, p.68 Nr. 439b *) val t = str2term @@ -1364,7 +1364,7 @@ if (term2str t) = "(x + -4 * x ^^^ 3) / 2" then () -else raise error "rational.sml.sml: diff.behav. in norm_Rational_mg 25"; +else error "rational.sml.sml: diff.behav. in norm_Rational_mg 25"; (*SRM Schalk I, p.68 Nr. 440a *) val t = str2term @@ -1374,20 +1374,20 @@ if (term2str t) = "(-3 + x) / (2 + x)" then () -else raise error "rational.sml.sml: diff.behav. in norm_Rational_mg 26"; +else error "rational.sml.sml: diff.behav. in norm_Rational_mg 26"; "----- Schalk I, p.68 Nr. 440b SK11 works since 0707xx"; val t = str2term "(a^^^3 - 9*a)/(a^^^3*b - a*b^^^3)*(a^^^2*b+a*b^^^2)/(a+3)"; val SOME (t,_) = rewrite_set_ thy false norm_Rational t; if term2str t = "(-3 * a + a ^^^ 2) / (a + -1 * b)" then () -else raise error "rational.sml.sml: diff.behav. in norm_Rational 27"; +else error "rational.sml.sml: diff.behav. in norm_Rational 27"; "----- SK12 works since 0707xx"; val t = str2term "(a^^^3 - 9*a)*(a^^^2*b+a*b^^^2)/((a^^^3*b - a*b^^^3)*(a+3))"; val SOME (t',_) = rewrite_set_ thy false norm_Rational t; term2str t'; if term2str t' = "(-3 * a + a ^^^ 2) / (a + -1 * b)" then () -else raise error "rational.sml.sml: diff.behav. in norm_Rational 28"; +else error "rational.sml.sml: diff.behav. in norm_Rational 28"; "-------- common denominator and multiplication ------------------"; @@ -1406,7 +1406,7 @@ if (term2str t) = "(36 * b ^^^ 3 + 3 * a ^^^ 2 * b ^^^ 2 + 16 * a ^^^ 4 * b) / (9 * a ^^^ 4)" then () -else raise error "rational.sml.sml: diff.behav. in norm_Rational_mg 28"; +else error "rational.sml.sml: diff.behav. in norm_Rational_mg 28"; (*SRAM Schalk I, p.69 Nr. 442b *) val t = str2term "(15*a^^^2/x^^^3 - 5*b^^^4/x^^^2 + 25*c^^^2/x)*(x^^^3/(5*a*b^^^3*c^^^3)) + 1/c^^^3 * (b*x/a - 3*a/b^^^3)"; @@ -1415,7 +1415,7 @@ if (term2str t) = "5 * x ^^^ 2 / (a * b ^^^ 3 * c)" then () -else raise error "rational.sml.sml: diff.behav. in norm_Rational_mg 29"; +else error "rational.sml.sml: diff.behav. in norm_Rational_mg 29"; (*SRAM Schalk I, p.69 Nr. 443b *) val t = str2term "(a/2 + b/3)*(b/3 - a/2)"; @@ -1424,7 +1424,7 @@ if (term2str t) = "(-9 * a ^^^ 2 + 4 * b ^^^ 2) / 36" then () -else raise error "rational.sml.sml: diff.behav. in norm_Rational_mg 30"; +else error "rational.sml.sml: diff.behav. in norm_Rational_mg 30"; (*SRAM Schalk I, p.69 Nr. 445b *) val t = str2term "(a^^^2/9 + 2*a/(3*b) + 4/b^^^2)*(a/3 - 2/b) + 8/b^^^3"; @@ -1433,7 +1433,7 @@ if (term2str t) = "a ^^^ 3 / 27" then () -else raise error "rational.sml.sml: diff.behav. in norm_Rational_mg 31"; +else error "rational.sml.sml: diff.behav. in norm_Rational_mg 31"; (*SRAM Schalk I, p.69 Nr. 446b *) val t = str2term "(x/(5*x + 4*y) - y/(5*x - 4*y) + 1)*(25*x^^^2 - 16*y^^^2)"; @@ -1442,7 +1442,7 @@ if (term2str t) = "30 * x ^^^ 2 + -9 * x * y + -20 * y ^^^ 2" then () -else raise error "rational.sml.sml: diff.behav. in norm_Rational_mg 32"; +else error "rational.sml.sml: diff.behav. in norm_Rational_mg 32"; (*SRAM Schalk I, p.69 Nr. 449a *)(*Achtung: rechnet ca 8 Sekunden*) val t = str2term @@ -1452,7 +1452,7 @@ if (term2str t) = "(-81 * x ^^^ 4 + 16 * x ^^^ 8 * y ^^^ 4) / (81 * y ^^^ 8)" then () -else raise error "rational.sml.sml: diff.behav. in norm_Rational_mg 33"; +else error "rational.sml.sml: diff.behav. in norm_Rational_mg 33"; (*SRAM Schalk I, p.69 Nr. 450a *) val t = str2term @@ -1462,7 +1462,7 @@ if (term2str t) = "(52 * x ^^^ 2 + 16 * y ^^^ 2) / (9 * y ^^^ 2)" then () -else raise error "rational.sml.sml: diff.behav. in norm_Rational_mg 34"; +else error "rational.sml.sml: diff.behav. in norm_Rational_mg 34"; "-------- double fractions ---------------------------------------"; "-------- double fractions ---------------------------------------"; @@ -1476,7 +1476,7 @@ if (term2str t) = "(-4 + 4 * x + -1 * x ^^^ 2) / (4 * a ^^^ 2)" then () -else raise error "rational.sml.sml: diff.behav. in norm_Rational_mg 35"; +else error "rational.sml.sml: diff.behav. in norm_Rational_mg 35"; (*SRD Schalk I, p.69 Nr. 455a *) val t = str2term @@ -1485,26 +1485,26 @@ term2str t; if (term2str t) = "(1 + a ^^^ 2) / (1 + 2 * a + a ^^^ 2)" then () -else raise error "rational.sml.sml: diff.behav. in norm_Rational_mg 36"; +else error "rational.sml.sml: diff.behav. in norm_Rational_mg 36"; "----- Schalk I, p.69 Nr. 455b"; val t = str2term "(x^^^2 - 4)/(y^^^2 - 9)/((2+x)/(3 - y))"; val SOME (t,_) = rewrite_set_ thy false norm_Rational(*_mg*) t; if term2str t = "(2 + -1 * x) / (3 + y)" then () -else raise error "rational.sml.sml: diff.behav. in norm_Rational_mg 37"; +else error "rational.sml.sml: diff.behav. in norm_Rational_mg 37"; "----- SK060904-1a non-termination of cancel_p_ ?: worked before 0707xx"; val t = str2term "(x^^^2 - 4)*(3 - y)/((y^^^2 - 9)*(2+x))"; val SOME (t,_) = rewrite_set_ thy false norm_Rational t; if term2str t = "(2 + -1 * x) / (3 + y)" then () -else raise error "rational.sml.sml: diff.behav. in norm_Rational_mg 37b"; +else error "rational.sml.sml: diff.behav. in norm_Rational_mg 37b"; "----- ?: worked before 0707xx"; val t = str2term "(3 + -1 * y) / (-9 + y ^^^ 2)"; val SOME (t,_) = rewrite_set_ thy false norm_Rational t; if term2str t = "-1 / (3 + y)" then () -else raise error "rational.sml: -1 / (3 + y) norm_Rational"; +else error "rational.sml: -1 / (3 + y) norm_Rational"; (*SRD Schalk I, p.69 Nr. 456b *) val t = str2term @@ -1512,7 +1512,7 @@ val SOME (t,_) = rewrite_set_ thy false norm_Rational(*_mg*) t; term2str t; if (term2str t) = "b / (1 + 2 * b + b ^^^ 2)" then () -else raise error "rational.sml.sml: diff.behav. in norm_Rational_mg 38"; +else error "rational.sml.sml: diff.behav. in norm_Rational_mg 38"; (*SRD Schalk I, p.69 Nr. 457b *) val t = str2term @@ -1522,20 +1522,20 @@ if (term2str t) = "8 * a ^^^ 2 + -6 * a * b + -12 * a ^^^ 2 * b + 9 * a * b ^^^ 2" then () -else raise error "rational.sml.sml: diff.behav. in norm_Rational_mg 39"; +else error "rational.sml.sml: diff.behav. in norm_Rational_mg 39"; "----- Schalk I, p.69 Nr. 458b works since 0707"; val t = str2term "(2*a^^^2*x - a^^^2)/(a*x - b*x) / (b^^^2*(2*x - 1)/(x*(a - b)))"; val SOME (t,_) = rewrite_set_ thy false norm_Rational t; if term2str t = "a ^^^ 2 / b ^^^ 2" then () -else raise error "rational.sml.sml: diff.behav. in norm_Rational_mg 39b"; +else error "rational.sml.sml: diff.behav. in norm_Rational_mg 39b"; (*SRD Schalk I, p.69 Nr. 459b *) val t = str2term "(a^^^2 - b^^^2)/(a*b) / (4*(a+b)^^^2/a)"; val SOME (t,_) = rewrite_set_ thy false norm_Rational t; if term2str t = "(a + -1 * b) / (4 * a * b + 4 * b ^^^ 2)" then () -else raise error "rational.sml.sml: diff.behav. in norm_Rational_mg 41"; +else error "rational.sml.sml: diff.behav. in norm_Rational_mg 41"; (*Schalk I, p.69 Nr. 460b nonterm.SK @@ -1544,7 +1544,7 @@ val SOME (t,_) = rewrite_set_ thy false norm_Rational(*_mg*) t; if term2str t = then () -else raise error "rational.sml.sml: diff.behav. in norm_Rational_mg 42"; +else error "rational.sml.sml: diff.behav. in norm_Rational_mg 42"; val t = str2term "9*(x^^^2 - 8*x+16)*(16*y - 16)/(4*(y^^^2 - 2*y+1)*(3*x - 12))"; @@ -1563,7 +1563,7 @@ if (term2str t) = "x + y" then () -else raise error "rational.sml.sml: diff.behav. in norm_Rational_mg 43"; +else error "rational.sml.sml: diff.behav. in norm_Rational_mg 43"; (*----------------------------------------------------------------------*) @@ -1578,7 +1578,7 @@ if (term2str t) = "1 / 2" then () -else raise error "rational.sml.sml: diff.behav. in norm_Rational_mg 44"; +else error "rational.sml.sml: diff.behav. in norm_Rational_mg 44"; (*SRD Schalk I, p.69 Nr. 464b *) val t = str2term @@ -1588,7 +1588,7 @@ if (term2str t) = "(3 + -1 * a) / (1 + -1 * a)" then () -else raise error "rational.sml.sml: diff.behav. in norm_Rational_mg 45"; +else error "rational.sml.sml: diff.behav. in norm_Rational_mg 45"; (*SRD Schalk I, p.69 Nr. 465b *) val t = str2term @@ -1598,7 +1598,7 @@ if (term2str t) = "(4 * x + 6 * y + -9 * z) / (4 * x)" then () -else raise error "rational.sml.sml: diff.behav. in norm_Rational_mg 46"; +else error "rational.sml.sml: diff.behav. in norm_Rational_mg 46"; (*SRD Schalk I, p.69 Nr. 466b *) val t = str2term @@ -1608,7 +1608,7 @@ if (term2str t) = "(25 + -10 * x + x ^^^ 2) / 18" then () -else raise error "rational.sml.sml: diff.behav. in norm_Rational_mg 47"; +else error "rational.sml.sml: diff.behav. in norm_Rational_mg 47"; (*SRD Schalk I, p.70 Nr. 469 *) val t = str2term @@ -1618,7 +1618,7 @@ if (term2str t) = "3 * b ^^^ 3 / (2 * a + -2 * b)" then () -else raise error "rational.sml.sml: diff.behav. in norm_Rational_mg 48"; +else error "rational.sml.sml: diff.behav. in norm_Rational_mg 48"; (*----------------------------------------------------------------------*) (*---------------------- Mehrfache Dppelbrueche ------------------------*) @@ -1630,7 +1630,7 @@ "((a^^^2 - b^^^2)/(2*a*b)+2*a*b/(a^^^2 - b^^^2))/((a^^^2+b^^^2)/(2*a*b)+1) / ((a^^^2+b^^^2)^^^2/(a+b)^^^2)"; val SOME (t,_) = rewrite_set_ thy false norm_Rational t; if term2str t = "1 / (a ^^^ 2 + -1 * b ^^^ 2)" then () -else raise error "rational.sml.sml: diff.behav. in norm_Rational_mg 49"; +else error "rational.sml.sml: diff.behav. in norm_Rational_mg 49"; "----- Schalk I, p.70 Nr. 477a"; (* MG Achtung: terme explodieren; Bsp zu komplex; @@ -1653,11 +1653,11 @@ if term2str t' = "(2 * a ^^^ 3 + 2 * a ^^^ 2 * b) / (a ^^^ 2 * b + b ^^^ 3)" then () -else raise error "rational.sml.sml: diff.behav. in norm_Rational_mg 51"; +else error "rational.sml.sml: diff.behav. in norm_Rational_mg 51"; (* TODO.new_c:WN050820 STOP_REW_SUB introduced gave ... if term2str t' = "(a ^^^ 4 + -1 * a ^^^ 2 * b ^^^ 2) /\n(a * b * (b + (a * (a + -1 * b) + -1 * b * (a + -1 * b)) / (2 * a)) *\n (a + -1 * b))" then () -else raise error "rational.sml: works again"; +else error "rational.sml: works again"; re-outcommented with TODO.new_c: cvs before 071227, 11:50*) @@ -1671,7 +1671,7 @@ if (term2str t) = then () -else raise error "rational.sml.sml: diff.behav. in norm_Rational_mg 52"; +else error "rational.sml.sml: diff.behav. in norm_Rational_mg 52"; (*MG Berechne Zwischenergebnisse: WN060831 nonterm.SK00*) val t = str2term @@ -1751,7 +1751,7 @@ val t = str2term " (1 + x^^^5) / (y + x) + x^^^3 / x "; val SOME (t,_) = rewrite_set_ thy false common_nominator_p t; if term2str t = "(1 + x ^^^ 3 + x ^^^ 5 + y * x ^^^ 2) / (x + y)" then() -else raise error ""; +else error ""; (*--------------------------------------------------------------------*) (* cancel_p liefert nicht immer Polynomnormalform (2): WN060831???SK3b @@ -1793,19 +1793,19 @@ val t = str2term "(a^^^2 + -1)/(a+1)"; val SOME (t',_) = rewrite_set_ thy false cancel_p t; if term2str t' = "(-1 + a) / 1" then () -else raise error "rational.sml MG tests 3d"; +else error "rational.sml MG tests 3d"; "----- NOT TERMINATING ?: worked before 0707xx"; val t = str2term "(a^^^2 - 1)*(b + 1) / ((b^^^2 - 1)*(a+1))"; val SOME (t'',_) = rewrite_set_ thy false norm_Rational t; if term2str t'' = "(1 + -1 * a) / (1 + -1 * b)" then () -else raise error "rational.sml MG tests 3e"; +else error "rational.sml MG tests 3e"; "----- corrected SK060905"; val t = str2term "(4*x^^^2 - 20*x + 25)/(2*x - 5)^^^3"; val SOME (t',_) = rewrite_set_ thy false norm_Rational(*_mg*) t; if term2str t' = "-1 / (5 + -2 * x)" then () -else raise error "rational.sml corrected SK060905"; +else error "rational.sml corrected SK060905"; "--------------------------------------------------------------------"; @@ -1820,7 +1820,7 @@ if (term2str t) = "5 * x ^^^ 2 / (b ^^^ 3 * c)" then () -else raise error "rational.sml.sml: diff.behav. in norm_Rational_mg 53"; +else error "rational.sml.sml: diff.behav. in norm_Rational_mg 53"; "-------- me Schalk I No.186 -------------------------------------"; "-------- me Schalk I No.186 -------------------------------------"; @@ -1845,7 +1845,7 @@ val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f;(*++ for explicit script*) case (f2str f, nxt) of ("14", ("End_Proof'", _)) => () - | _ => raise error "rational.sml diff.behav. in me Schalk I No.186"; + | _ => error "rational.sml diff.behav. in me Schalk I No.186"; "-------- interSteps ..Simp_Rat_Double_No-1.xml ------------------"; @@ -1889,7 +1889,7 @@ val newnds = children (get_nd pt [2,1]) (*see "fun detailrls"*); (*if length newnds = 12 then () WN060905*) if length newnds = 13 then () -else raise error "rational.sml: interSteps cancel_p rev_rew_p"; +else error "rational.sml: interSteps cancel_p rev_rew_p"; val p = ([2,1,9],Res); getTactic 1 p; @@ -1897,7 +1897,7 @@ (*case tac of SOME (Rewrite ("sym_real_plus_binom_times1", _)) => () WN060905*) case tac of SOME (Rewrite ("sym_real_add_mult_distrib2", _)) => () -| _ => raise error "rational.sml: getTactic, sym_real_plus_binom_times1"; +| _ => error "rational.sml: getTactic, sym_real_plus_binom_times1"; "-------- investigate rulesets for cancel_p ----------------------"; @@ -1998,14 +1998,14 @@ val t = str2term "(x^^^2 - 4)*(3 - y) / ((y^^^2 - 9)*(2+x))"; val SOME (t',_) = rewrite_set_ thy false norm_Rational t; if term2str t' = "(2 + -1 * x) / (3 + y)" then () -else raise error "rational.sml SK060904-1a worked since 0707xx"; +else error "rational.sml SK060904-1a worked since 0707xx"; "----- SK060904-1b non-termination of cancel_p_ ... worked before 0707xx"; val t = str2term "(9 * a ^^^ 2 + -16 * b ^^^ 2) /\ \(36 * a^^^2 * c + (27 * a^^^2 * e + (-64 * b^^^2 * c + -48 * b^^^2 * e)))"; val SOME (t',_) = cancel_p_ thy t; if term2str t' = "1 / (4 * c + 3 * e)" then () -else raise error "rational.sml SK060904-1b"; +else error "rational.sml SK060904-1b"; "----- SK060904-2a non-termination of add_fraction_p_"; @@ -2027,14 +2027,14 @@ "-------- how to stepwise construct Scripts ----------------------"; "-------- how to stepwise construct Scripts ----------------------"; "-------- how to stepwise construct Scripts ----------------------"; -lse raise error "rational.sml SK060904-1a worked since 0707xx"; +lse error "rational.sml SK060904-1a worked since 0707xx"; "----- SK060904-1b non-termination of cancel_p_ ... worked before 0707xx"; val t = str2term "(9 * a ^^^ 2 + -16 * b ^^^ 2) /\ \(36 * a^^^2 * c + (27 * a^^^2 * e + (-64 * b^^^2 * c + -48 * b^^^2 * e)))"; val SOME (t',_) = cancel_p_ thy t; if term2str t' = "1 / (4 * c + 3 * e)" then () -else raise error "rational.sml SK060904-1b"; +else error "rational.sml SK060904-1b"; "----- SK060904-2a non-termination of add_fraction_p_"; @@ -2056,14 +2056,14 @@ "-------- how to stepwise construct Scripts ----------------------"; "-------- how to stepwise construct Scripts ----------------------"; "-------- how to stepwise construct Scripts ----------------------"; -lse raise error "rational.sml SK060904-1a worked since 0707xx"; +lse error "rational.sml SK060904-1a worked since 0707xx"; "----- SK060904-1b non-termination of cancel_p_ ... worked before 0707xx"; val t = str2term "(9 * a ^^^ 2 + -16 * b ^^^ 2) /\ \(36 * a^^^2 * c + (27 * a^^^2 * e + (-64 * b^^^2 * c + -48 * b^^^2 * e)))"; val SOME (t',_) = cancel_p_ thy t; if term2str t' = "1 / (4 * c + 3 * e)" then () -else raise error "rational.sml SK060904-1b"; +else error "rational.sml SK060904-1b"; "----- SK060904-2a non-termination of add_fraction_p_"; diff -r 95d956108461 -r 460c24a6a6ba test/Tools/isac/Knowledge/rlang.sml --- a/test/Tools/isac/Knowledge/rlang.sml Tue Sep 28 08:58:06 2010 +0200 +++ b/test/Tools/isac/Knowledge/rlang.sml Tue Sep 28 09:06:56 2010 +0200 @@ -79,7 +79,7 @@ val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val (p,_,f,nxt,_,pt) = me nxt p [1] pt; case f of Form' (FormKF (~1,EdUndef,0,Nundef,"[x = 2]")) => () - | _ => raise error "rlang.sml: diff.behav. in Schalk I s.86 Bsp 5 [x = 2]"; + | _ => error "rlang.sml: diff.behav. in Schalk I s.86 Bsp 5 [x = 2]"; (*----------------- Schalk I s.86 Bsp 19 ------------------------*) "Schalk I s.86 Bsp 19 (x - 5)*(10 - x) = (3 - x)*(2 + x) + 2*(x + 20)"; @@ -109,7 +109,7 @@ val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; case f of Form' (FormKF (~1,EdUndef,0,Nundef,"[x = 8]")) => () - | _ => raise error "rlang.sml: diff.behav. in Schalk I s.86 Bsp 19 [x = 8]"; + | _ => error "rlang.sml: diff.behav. in Schalk I s.86 Bsp 19 [x = 8]"; (*----------------- Schalk I s.86 Bsp 23 ------------------------*) "Schalk I s.86 Bsp 19 ((2*x+5)^^^2+(3*x+4)^^^2=(13*x+2)*(x+1)+2*(15+14*x))"; @@ -139,7 +139,7 @@ val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; case f of Form' (FormKF (~1,EdUndef,0,Nundef,"[x = -9]")) => () - | _ => raise error "rlang.sml: diff.behav. in Schalk I s.86 Bsp 23 [x = -9]"; + | _ => error "rlang.sml: diff.behav. in Schalk I s.86 Bsp 23 [x = -9]"; (*----------------- Schalk I s.86 Bsp 25 ------------------------*) "Schalk I s.86 Bsp 25 ((2*x+1)^^^3+(x+1)^^^3=(2*x+1)^^^2*2*x+(x+2)^^^3+x^^^2)"; @@ -169,7 +169,7 @@ val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; case f of Form' (FormKF (~1,EdUndef,0,Nundef,"[x = -6 / 5]")) => () - | _ => raise error "rlang.sml: diff.behav. in Schalk I s.86 Bsp 25 [x = -6 / 5]"; + | _ => error "rlang.sml: diff.behav. in Schalk I s.86 Bsp 25 [x = -6 / 5]"; (*----------------- Schalk I s.86 Bsp 28b ------------------------*) "Schalk I s.86 Bsp 28b ((3*x+5)/18 - x/2 = -((3*x - 2)/9))"; @@ -197,7 +197,7 @@ val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val (p,_,f,nxt,_,pt) = me nxt p [1] pt; f2str f; case f of Form' (FormKF (~1,EdUndef,0,Nundef,"[]")) => () - | _ => raise error "rlang.sml: diff.behav. in Schalk I s.86 Bsp 28b []"; + | _ => error "rlang.sml: diff.behav. in Schalk I s.86 Bsp 28b []"; (*WN---v *) val bdv= (term_of o the o (parse thy)) "bdv"; @@ -205,12 +205,12 @@ val t = (term_of o the o (parse thy)) "3 * x / 5"; val SOME (t',_) = rewrite_set_inst_ PolyEq.thy true [(bdv, v)] make_ratpoly_in t; -if term2str t' = "3 / 5 * x" then () else raise error "rlang.sml: 1"; +if term2str t' = "3 / 5 * x" then () else error "rlang.sml: 1"; val t = str2term "(3*x+5)/18 - x/2 - -(3*x - 2)/9 = 0"; val subst = [(str2term "bdv", str2term "x")]; val SOME (t',_) = rewrite_set_inst_ thy false subst make_ratpoly_in t; -if term2str t' = "1 / 18 = 0" then () else raise error "rlang.sml: 2"; +if term2str t' = "1 / 18 = 0" then () else error "rlang.sml: 2"; (*WN---^ *) (*----------------- Schalk I s.87 Bsp 36b ------------------------*) @@ -240,7 +240,7 @@ val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; case f of Form' (FormKF (~1,EdUndef,0,Nundef,"[x = -237 / 65]")) => () - | _ => raise error "rlang.sml: diff.behav. in Schalk I s.86 Bsp 36b [x = -237 / 65]"; + | _ => error "rlang.sml: diff.behav. in Schalk I s.86 Bsp 36b [x = -237 / 65]"; (*WN---v *) @@ -249,7 +249,7 @@ val SOME (t',_) = rewrite_set_inst_ thy false subst make_ratpoly_in t; term2str t'; if term2str t' = "79 / 12 + 65 / 36 * x = 0" then () -else raise error "rlang.sml: 3"; +else error "rlang.sml: 3"; (*WN---^ *) @@ -279,7 +279,7 @@ val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val (p,_,f,nxt,_,pt) = me nxt p [1] pt; if f = Form' (FormKF (~1, EdUndef, 0, Nundef, "296 + -3900 * x = 0")) then () -else raise error "rlang.sml: diff.behav. in Schalk I s.87 Bsp 38b"; +else error "rlang.sml: diff.behav. in Schalk I s.87 Bsp 38b"; val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; @@ -291,7 +291,7 @@ val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val (p,_,f,nxt,_,pt) = me nxt p [1] pt; case f of Form' (FormKF (~1,EdUndef,0,Nundef,"[x = 74 / 975]")) => () - | _ => raise error "rlang.sml: diff.behav. in Schalk I s.86 Bsp 38b [x = 74 / 975]"; + | _ => error "rlang.sml: diff.behav. in Schalk I s.86 Bsp 38b [x = 74 / 975]"; (*----------------- Schalk I s.87 Bsp 40b ------------------------*) "Schalk I s.87 Bsp 40b ((x+3)/(2*x - 4)=3)"; @@ -321,7 +321,7 @@ (*val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val (p,_,f,nxt,_,pt) = me nxt p [1] pt;*) if f = Form' (FormKF (~1, EdUndef, 0, Nundef, "15 + -5 * x = 0")) then () -else raise error "rlang.sml: diff.behav. in Schalk I s.87 Bsp 40b"; +else error "rlang.sml: diff.behav. in Schalk I s.87 Bsp 40b"; val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; @@ -332,7 +332,7 @@ val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; case f of Form' (FormKF (~1,EdUndef,0,Nundef,"[x = 3]")) => () - | _ => raise error "rlang.sml: diff.behav. in Schalk I s.87 Bsp 40b [x = 3]"; + | _ => error "rlang.sml: diff.behav. in Schalk I s.87 Bsp 40b [x = 3]"; (*----------------- Schalk I s.87 Bsp 44a ------------------------*) @@ -365,20 +365,20 @@ val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; case f of Form' (FormKF (~1,EdUndef,0,Nundef,"[x = 1]")) => () - | _ => raise error "rlang.sml: diff.behav. in Schalk I s.87 Bsp 44a [x = 1]"; + | _ => error "rlang.sml: diff.behav. in Schalk I s.87 Bsp 44a [x = 1]"; (*WN---v *) val t = str2term "(1/2 + (5*x)/2)^^^2 - ((13*x)/2 - 5/2)^^^2 - (6*x)^^^2 + 29"; val subst = [(str2term "bdv", str2term "x")]; val SOME (t',_) = rewrite_set_inst_ thy false subst make_ratpoly_in t; if term2str t' = "23 + 35 * x + -72 * x ^^^ 2" then () -else raise error "rlang.sml: 4"; +else error "rlang.sml: 4"; val t = str2term "(1/2 + (5*x)/2)^^^2 - ((13*x)/2 - 5/2)^^^2 + (6*x)^^^2 - 29"; val subst = [(str2term "bdv", str2term "x")]; val SOME (t',_) = rewrite_set_inst_ thy false subst make_ratpoly_in t; if term2str t' = "-35 + 35 * x" then () -else raise error "rlang.sml: 4.1"; +else error "rlang.sml: 4.1"; (*WN---^ *) (*----------------- Schalk I s.87 Bsp 52a ------------------------*) @@ -404,7 +404,7 @@ val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; if f = Form' (FormKF (~1, EdUndef, 0, Nundef, "16 + 12 * x = 0")) then () -else raise error "rlang.sml: diff.behav. in Schalk I s.87 Bsp 52a"; +else error "rlang.sml: diff.behav. in Schalk I s.87 Bsp 52a"; (*Subproblem["degree_1", "polynomial", "univariate", "equation"]*) val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; @@ -416,7 +416,7 @@ val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; case f of Form' (FormKF (~1,EdUndef,0,Nundef,"[x = -4 / 3]")) => () - | _ => raise error "rlang.sml: diff.behav. in Schalk I s.87 Bsp 52a [x = -4 / 3]"; + | _ => error "rlang.sml: diff.behav. in Schalk I s.87 Bsp 52a [x = -4 / 3]"; (*----------------- Schalk I s.87 Bsp 55b ------------------------*) "Schalk I s.87 Bsp 55b (x/(x^^^2 - 6*x+9) - 1/(x^^^2 - 3*x) =1/x)"; @@ -447,7 +447,7 @@ (*val (p,_,f,nxt,_,pt) = me nxt p [1] pt; 040209 MGs norm_Rational*) (* val nxt = Subproblem ("PolyEq",["polynomial","univariate","equation"])*) if f= Form' (FormKF (~1, EdUndef, 0, Nundef, "-6 * x + 5 * x ^^^ 2 = 0"))then() -else raise error "rlang.sml: diff.behav. in Schalk I s.87 Bsp 55b"; +else error "rlang.sml: diff.behav. in Schalk I s.87 Bsp 55b"; val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; (*nxt=Model_Problem["bdv_only","degree_2","polynomial","univariate","equation*) val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; @@ -477,11 +477,11 @@ val nxt = ("Check_elementwise",Check_elementwise "Assumptions")*) val [(aaa,ppp)] = get_assumptions_ pt p; if term2str aaa = "9 * x + -6 * x ^^^ 2 + x ^^^ 3 ~= 0" then () -else raise error "rlang.sml: diff.behav. in I s.87 Bsp 55b [x = 6 / 5], asms"; +else error "rlang.sml: diff.behav. in I s.87 Bsp 55b [x = 6 / 5], asms"; (*WN060717 unintentionally changed some rls/ord while completing knowl. for thes2file... if term2str aaa = "9 * x + (x ^^^ 3 + -6 * x ^^^ 2) ~= 0" then () -else raise error "rlang.sml: diff.behav. in I s.87 Bsp 55b [x = 6 / 5], asms"; +else error "rlang.sml: diff.behav. in I s.87 Bsp 55b [x = 6 / 5], asms"; .... but it became even better*) (*22.10.03: @@ -502,7 +502,7 @@ val nxt =Check_Postcond ["rational","univariate","equation"]) *) val (p,_,f,nxt,_,pt) = me nxt p [1] pt; case f of Form' (FormKF (~1,EdUndef,0,Nundef,"[x = 6 / 5]")) => () - | _ => raise error "rlang.sml: diff.behav. in Schalk I s.87 Bsp 55b [x = 6 / 5]"; + | _ => error "rlang.sml: diff.behav. in Schalk I s.87 Bsp 55b [x = 6 / 5]"; (*----------------- Schalk I s.88 Bsp 64c ------------------------*) "Schalk I s.88 Bsp 64c (((x - 1)/(x+1)+1)/((x - 1)/(x+1) - (x+1)/(x - 1))=2)"; @@ -530,7 +530,7 @@ val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val (p,_,f,nxt,_,pt) = me nxt p [1] pt; f2str f; if f = Form' (FormKF (~1, EdUndef, 0, Nundef, "-3 + -1 * x = 0")) then () -else raise error "rlangsml: diff.behav. in Schalk I s.88 Bsp 64c"; +else error "rlangsml: diff.behav. in Schalk I s.88 Bsp 64c"; val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; @@ -542,7 +542,7 @@ val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val (p,_,f,nxt,_,pt) = me nxt p [1] pt; case f of Form' (FormKF (_,_,0,_,"[x = -3]")) => () - | _ => raise error "rlang.sml: diff.behav. in Schalk I s.88 Bsp 64c [x = -3]"; + | _ => error "rlang.sml: diff.behav. in Schalk I s.88 Bsp 64c [x = -3]"; (*----------------- Schalk I s.88 Bsp 79a (2) ------------------------*) "Schalk I s.88 Bsp 79a (2) (m1*v1+m2*v2=0)"; @@ -571,7 +571,7 @@ val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; case f of Form' (FormKF (~1,EdUndef,0,Nundef,"[m1 = -1 * m2 * v2 / v1]")) => () - | _ => raise error "rlang.sml: diff.behav. in Schalk I s.88 Bsp 79a (2) [m1 = -1 * m2 * v2 / v1]"; + | _ => error "rlang.sml: diff.behav. in Schalk I s.88 Bsp 79a (2) [m1 = -1 * m2 * v2 / v1]"; (*----------------- Schalk I s.89 Bsp 90a(1) ------------------------*) "Schalk I s.89 Bsp 90a (1) (f=((w+u)/(w+v))*v0)"; @@ -613,7 +613,7 @@ 0, Nundef, "f * w + -1 * u * v0 + -1 * v0 * w + f * v = 0")) then () -else raise error "rlang.sml: diff.behav. in Schalk I s.89 Bsp 90a"; +else error "rlang.sml: diff.behav. in Schalk I s.89 Bsp 90a"; val (p,_,f,nxt,_,pt) = me nxt p [1] pt; (*val nxt = Model_Problem ["degree_1","polynomial","univariate","equation"])*) val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; @@ -646,10 +646,10 @@ val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; case f of Form' (FormKF (~1,EdUndef,0,Nundef, "[v = (u * v0 + v0 * w + -1 * f * w) / f]")) => () - | _ => raise error "rlang.sml: diff.behav. in Schalk I s.89 Bsp 90a (1) [v=...]"; + | _ => error "rlang.sml: diff.behav. in Schalk I s.89 Bsp 90a (1) [v=...]"; if get_assumptions_ pt p = [(str2term"(u * v0 + v0 * w + -1 * f * w) / f + w ~= 0",[])] then () -else raise error "rlang.sml: diff.behav. in I s.89 Bsp 90a (1) [v=...] asm"; +else error "rlang.sml: diff.behav. in I s.89 Bsp 90a (1) [v=...] asm"; (*----------------- Schalk I s.89 Bsp 90a(2) ------------------------*) @@ -682,7 +682,7 @@ 0, Nundef, "f * v + -1 * u * v0 + (f + -1 * v0) * w = 0")) then () -else raise error "rlang.sml: diff.behav. in Schalk I s.89 Bsp 90a (2)"; +else error "rlang.sml: diff.behav. in Schalk I s.89 Bsp 90a (2)"; val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; @@ -693,12 +693,12 @@ val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; case f of Form' (FormKF (~1,EdUndef,0,Nundef,"[w = (u * v0 + -1 * f * v) / (f + -1 * v0)]")) => () - | _ => raise error "rlang.sml: diff.behav. in Schalk I Bsp 90a(2)"; + | _ => error "rlang.sml: diff.behav. in Schalk I Bsp 90a(2)"; if get_assumptions_ pt p = [(str2term"v + (u * v0 + -1 * f * v) / (f + -1 * v0) ~= 0",[]), (str2term"f + -1 * v0 ~= 0",[])] then writeln "asm should be simplified ???" -else raise error "rlang.sml: diff.behav. in Schalk I Bsp 90a(2) asm"; +else error "rlang.sml: diff.behav. in Schalk I Bsp 90a(2) asm"; (*----------------- Schalk I s.89 Bsp 98a(1) ------------------------*) "Schalk I s.89 Bsp 98a (1) (1/R=1/R1+1/R2)"; @@ -727,7 +727,7 @@ if f = Form' (FormKF (~1, EdUndef, 0, Nundef, "-1 * R * R2 + (R2 + -1 * R) * R1 = 0"))then() -else raise error "rlang.sml: diff.behav. in Schalk I s.89 Bsp 98a (1)"; +else error "rlang.sml: diff.behav. in Schalk I s.89 Bsp 98a (1)"; val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; @@ -738,12 +738,12 @@ val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; case f of Form' (FormKF (~1,EdUndef,0,Nundef,"[R1 = R * R2 / (R2 + -1 * R)]")) => () - | _ => raise error "rlang.sml: diff.behav. in 98a(1) [R1 = ...]"; + | _ => error "rlang.sml: diff.behav. in 98a(1) [R1 = ...]"; if get_assumptions_ pt p = [(str2term"R * R2 * R2 ~= (R2 + -1 * R) * 0",[]), (str2term"R2 + -1 * R ~= 0",[]), (str2term"R2 + -1 * R ~= 0",[])] then writeln "asm should be simplified" -else raise error "rlang.sml: diff.behav. in 98a(1) asm"; +else error "rlang.sml: diff.behav. in 98a(1) asm"; (*----------------- Schalk I s.89 Bsp 104a(1) ------------------------*) "Schalk I s.89 Bsp 104a (1) (y^^^2=2*p*x)"; @@ -772,10 +772,10 @@ val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val (p,_,f,nxt,_,pt) = me nxt p [1] pt; case f of Form' (FormKF (_,_,0,_,"[p = y ^^^ 2 / (2 * x)]")) => () - | _ => raise error "rlang.sml: diff.behav. in Schalk I s.89 Bsp 104a (1) [p = y^2/(2*x)]"; + | _ => error "rlang.sml: diff.behav. in Schalk I s.89 Bsp 104a (1) [p = y^2/(2*x)]"; if get_assumptions_ pt p = [(str2term"-2 * x ~= 0",[])] then writeln"should be x ~= 0\nshould be x ~= 0\nshould be x ~= 0\n" -else raise error "rlang.sml: diff.behav. in I s.89 Bsp 104a(1) asm"; +else error "rlang.sml: diff.behav. in I s.89 Bsp 104a(1) asm"; (*----------------- Schalk I s.89 Bsp 104a(2) ------------------------*) @@ -806,9 +806,9 @@ val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val (p,_,f,nxt,_,pt) = me nxt p [1] pt; case f of Form' (FormKF (_,_,0,_,"[y = sqrt (2 * p * x), y = -1 * sqrt (2 * p * x)]")) => () -| _ => raise error "rlang.sml: diff.behav. Schalk I s.89 Bsp 104a(2) [x = ]"; +| _ => error "rlang.sml: diff.behav. Schalk I s.89 Bsp 104a(2) [x = ]"; if get_assumptions_ pt p = [(str2term"0 <= -1 * (-2 * p * x)",[]),(str2term"0 <= -1 * (-2 * p * x)",[])] then writeln "asm should be simplified\nshould be simplified" -else raise error "rlang.sml: diff.behav. in I s.89 Bsp 104a(2) asm"; +else error "rlang.sml: diff.behav. in I s.89 Bsp 104a(2) asm"; (*----------------- Schalk I s.90 Bsp 118a (1) ------------------------*) @@ -852,14 +852,14 @@ val (p,_,f,nxt,_,pt) = me nxt p [1] pt;f2str f;get_asm (fst p, fst p) pt; val (p,_,f,nxt,_,pt) = me nxt p [1] pt;f2str f;get_asm (fst p, fst p) pt; case f of Form' (FormKF (~1,EdUndef,0,Nundef,"[x = sqrt ((a ^^^ 2 * b ^^^ 2 + -1 * a ^^^ 2 * y ^^^ 2) / b ^^^ 2),\n x = -1 * sqrt ((a ^^^ 2 * b ^^^ 2 + -1 * a ^^^ 2 * y ^^^ 2) / b ^^^ 2)]")) => writeln"should be simplified MG" -| _ => raise error "rlang.sml: diff.behav. in Schalk I s.89 Bsp 118a(2) [x = ]"; +| _ => error "rlang.sml: diff.behav. in Schalk I s.89 Bsp 118a(2) [x = ]"; val asms = get_assumptions_ pt p; if asms = [(str2term"0 * b ^^^ 2 <= -1 * (a ^^^ 2 * y ^^^ 2 + -1 * a ^^^ 2 * b ^^^ 2)", []), (str2term"b ^^^ 2 ~= 0", []), (str2term"0 * b ^^^ 2 <= -1 * (a ^^^ 2 * y ^^^ 2 + -1 * a ^^^ 2 * b ^^^ 2)", []), (str2term"b ^^^ 2 ~= 0", []) ] then writeln"should be simplified MG" -else raise error "rlang.sml: diff.behav. in Schalk I s.89 Bsp 118a(2) asms"; +else error "rlang.sml: diff.behav. in Schalk I s.89 Bsp 118a(2) asms"; (*----------------- Schalk I s.102 Bsp 268(1) ------------------------*) "Schalk I s.102 Bsp 268(1) (A = (1/2)*(x1*(y2-y3)+x2*(y3 - y1)+x3*(y1 - y2)))"; @@ -889,9 +889,9 @@ val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val (p,_,f,nxt,_,pt) = me nxt p [1] pt; case f of Form' (FormKF (~1,EdUndef,0,Nundef,"[x2 =\n (-2 * A + x1 * y2 + x3 * y1 + -1 * x1 * y3 + -1 * x3 * y2) /\n (y1 + -1 * y3)]")) => () -| _ => raise error "rlang.sml: diff.behav. Schalk I s.102 Bsp 268(1) [x2=...]"; +| _ => error "rlang.sml: diff.behav. Schalk I s.102 Bsp 268(1) [x2=...]"; if get_assumptions_ pt p = [(str2term"y1 / 2 + -1 * y3 / 2 ~= 0",[])] then () -else raise error "rlang.sml: diff.behav. in I s.102 Bsp 268(1) asm"; +else error "rlang.sml: diff.behav. in I s.102 Bsp 268(1) asm"; (*-------------------- Schalk II ----------------------------*) (*-------------------- Schalk II ----------------------------*) @@ -926,7 +926,7 @@ val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val (p,_,f,nxt,_,pt) = me nxt p [1] pt; f2str f; if f = Form' (FormKF (~1, EdUndef, 0, Nundef, "-2 + x = 0")) then () -else raise error "rlang.sml: diff.behav. in Schalk II s.56 Bsp 67b"; +else error "rlang.sml: diff.behav. in Schalk II s.56 Bsp 67b"; val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; @@ -937,7 +937,7 @@ val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; case f of Form' (FormKF (~1,EdUndef,0,Nundef,"[x = 2]")) => () - | _ => raise error "rlang.sml: diff.behav. in Schalk II s.56 Bsp 67b [x=2]"; + | _ => error "rlang.sml: diff.behav. in Schalk II s.56 Bsp 67b [x=2]"; (*----------------- Schalk II s.56 Bsp 68a ------------------------*) "Schalk II s.56 Bsp 68a (5*sqrt(x) - 1 = 7*sqrt(x) - 5)"; @@ -983,7 +983,7 @@ if f = Form' (FormKF (~1, EdUndef, 0, Nundef, "256 + -2368 * x + 576 * x ^^^ 2 = 0"))then() -else raise error "rlang.sml: diff.behav. in Schalk II s.56 Bsp 68a"; +else error "rlang.sml: diff.behav. in Schalk II s.56 Bsp 68a"; val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; get_assumptions_ pt p; (* val nxt = ("Model_Problem", Model_Problem @@ -1001,7 +1001,7 @@ val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; if f = Form' (FormKF (~1,EdUndef,0,Nundef,"[x = 4, x = 1 / 9]")) then writeln "only [x = 4] !\nonly [x = 4] !\nonly [x = 4] !\n" -else raise error "rlang.sml: diff.behav. in II 68a"; +else error "rlang.sml: diff.behav. in II 68a"; val asms = get_assumptions_ pt p; if asms2str asms = "[(0 <= (25 * (1 / 9) + -1 * (16 + 49 * (1 / 9))) * -56, []),\ @@ -1019,7 +1019,7 @@ (str2term"9 ~= 0", []), (str2term"0 <= (25 * (1 / 9) + -1 * (16 + 49 * (1 / 9))) * -56", [])]*) then "should get True * False!!!" -else raise error "rlang.sml: diff.behav. in II 68a asms"; +else error "rlang.sml: diff.behav. in II 68a asms"; (*----------------- Schalk II s.56 Bsp 73b ------------------------*) "Schalk II s.56 Bsp 73b (sqrt(x+1)+sqrt(4*x+4)=sqrt(9*x+9))"; @@ -1056,7 +1056,7 @@ val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val (p,_,f,nxt,_,pt) = me nxt p [1] pt; if f = Form' (FormKF (~1, EdUndef, 0, Nundef, "0 = 0")) then () -else raise error "rlang.sml: diff.behav. in Schalk II s.56 Bsp 73b"; +else error "rlang.sml: diff.behav. in Schalk II s.56 Bsp 73b"; val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; @@ -1069,7 +1069,7 @@ val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val asm = get_assumptions_ pt p; if asm=[] andalso f = Form' (FormKF (~1,EdUndef,0,Nundef,"UniversalList")) andalso nxt = ("End_Proof'",End_Proof') then () -else raise error "rlang.sml: diff.behav. in UniversalList 2"; +else error "rlang.sml: diff.behav. in UniversalList 2"; (*----------------- Schalk II s.56 Bsp 74a ------------------------*) "Schalk II s.56 Bsp 74a (sqrt(4*x+1) - sqrt(x+3) = sqrt(x - 2))"; @@ -1107,7 +1107,7 @@ val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val (p,_,f,nxt,_,pt) = me nxt p [1] pt; if f = Form' (FormKF (~1, EdUndef, 0, Nundef, "-24 + 4 * x = 0")) then () -else raise error "rlang.sml: diff.behav. in Schalk II s.56 Bsp 74a"; +else error "rlang.sml: diff.behav. in Schalk II s.56 Bsp 74a"; (*-> ubproblem ("PolyEq", ["degree_1", ...]*) val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; @@ -1120,7 +1120,7 @@ val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val (p,_,f,nxt,_,pt) = me nxt p [1] pt; case f of Form' (FormKF (~1,EdUndef,0,Nundef,"[x = 6]")) => () - | _ => raise error "rlang.sml: diff.behav. in Schalk II s.56 Bsp 74a [x = 6]"; + | _ => error "rlang.sml: diff.behav. in Schalk II s.56 Bsp 74a [x = 6]"; (*----------------- Schalk II s.56 Bsp 77b ------------------------*) @@ -1167,7 +1167,7 @@ val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; (*val (p,_,f,nxt,_,pt) = me nxt p [1] pt; since MGs norm_Rational*) if f = Form'(FormKF (~1, EdUndef, 0, Nundef, "451584 + -112896 * x = 0"))then() -else raise error "rlang.sml: diff.behav. in Schalk II s.56 Bsp 77b"; +else error "rlang.sml: diff.behav. in Schalk II s.56 Bsp 77b"; val (p,_,f,nxt,_,pt) = me nxt p [1] pt; (* val nxt = ("Model_Problem", Model_Problem ["degree_1","polynomial","univariate","equation"])*) @@ -1181,7 +1181,7 @@ val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; case f of Form' (FormKF (~1,EdUndef,0,Nundef,"[]")) => () - | _ => raise error "rlang.sml: diff.behav. in Schalk II s.56 Bsp 77b []"; + | _ => error "rlang.sml: diff.behav. in Schalk II s.56 Bsp 77b []"; (*added 040209 at introducing MGs norm_Rational ?!*) val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; @@ -1214,7 +1214,7 @@ val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; case f of Form' (FormKF (_,_,0,_,"[x = 5, x = -5]")) => () - | _ => raise error "rlang.sml: diff.behav. in Schalk II s.66 Bsp 4 []"; + | _ => error "rlang.sml: diff.behav. in Schalk II s.66 Bsp 4 []"; (*----------------- Schalk II s.66 Bsp 8a ------------------------*) @@ -1242,7 +1242,7 @@ val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val (p,_,f,nxt,_,pt) = me nxt p [1] pt; if f = Form' (FormKF (~1, EdUndef, 0, Nundef, "-8 + 2 * x ^^^ 2 = 0")) then () -else raise error "rlang.sml: diff.behav. in Schalk II s.66 Bsp 8a"; +else error "rlang.sml: diff.behav. in Schalk II s.66 Bsp 8a"; (*-> Subproblem ("PolyEq", ["polynomial", ...])*) (* val Form' (FormKF (~1, EdUndef, 0, Nundef, str)) = f; @@ -1257,7 +1257,7 @@ val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val (p,_,f,nxt,_,pt) = me nxt p [1] pt; case f of Form' (FormKF (~1,EdUndef,0,Nundef,"[x = 2, x = -2]")) => () - | _ => raise error "rlang.sml: diff.behav. in Schalk II s.66 Bsp 8a [x = 2, x = -2]"; + | _ => error "rlang.sml: diff.behav. in Schalk II s.66 Bsp 8a [x = 2, x = -2]"; (*----------------- Schalk II s.66 Bsp 10b ------------------------*) "Schalk II s.66 Bsp 10b (1/(x^^^2 - 9)+(2*x+3)/(x+3)=(3*x+4)/(x - 3))"; @@ -1290,7 +1290,7 @@ 0, Nundef, "60 + 28 * x + -13 * x ^^^ 2 + -1 * x ^^^ 3 = 0")) then () -else raise error "rlang.sml: diff.behav. in Schalk II s.66 Bsp 10b"; +else error "rlang.sml: diff.behav. in Schalk II s.66 Bsp 10b"; val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; @@ -1332,7 +1332,7 @@ val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val (p,_,f,nxt,_,pt) = me nxt p [1] pt; if f = Form' (FormKF (~1, EdUndef, 0, Nundef, "-25 + x ^^^ 2 = 0")) then () -else raise error "rlang.sml: diff.behav. in Schalk II s.66 Bsp 20a"; +else error "rlang.sml: diff.behav. in Schalk II s.66 Bsp 20a"; val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; @@ -1345,7 +1345,7 @@ val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val (p,_,f,nxt,_,pt) = me nxt p [1] pt; case f of Form' (FormKF (~1,EdUndef,0,Nundef,"[x = 5, x = -5]")) => () - | _ => raise error "rlang.sml: diff.behav. in Schalk II s.66 Bsp 20a [x = 5, x = -5]"; + | _ => error "rlang.sml: diff.behav. in Schalk II s.66 Bsp 20a [x = 5, x = -5]"; (*----------------- Schalk II s.66 Bsp 23b ------------------------*) "Schalk II s.66 Bsp 23b (2*sqrt(261 - x) - sqrt(2+2*x)=sqrt(2)*sqrt(5 - 3*x))"; @@ -1384,7 +1384,7 @@ if f = Form' (FormKF (~1, EdUndef, 0, Nundef, "-1064944 + 32 * x + -48 * x ^^^ 2 = 0"))then() -else raise error "rlang.sml: diff.behav. in Schalk II s.66 Bsp 23b"; +else error "rlang.sml: diff.behav. in Schalk II s.66 Bsp 23b"; val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; @@ -1393,7 +1393,7 @@ val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val (p,_,f,nxt,_,pt) = me nxt p [1] pt; case f of Form' (FormKF (~1,EdUndef,_,Nundef,"[]")) => () - | _ => raise error "rlang.sml: diff.behav. in Schalk II s.66 Bsp 23b []"; + | _ => error "rlang.sml: diff.behav. in Schalk II s.66 Bsp 23b []"; (*----------------- Schalk II s.66 Bsp 28a ------------------------*) "Schalk II s.66 Bsp 28a (A=(c/d)*sqrt(4*a^^^2 - c^^^2))"; @@ -1427,7 +1427,7 @@ "c ^^^ 4 / d ^^^ 2 + A ^^^ 2 * d ^^^ 2 / d ^^^ 2 +\n-4 * c ^^^ 2 / d ^^^ 2 * a ^^^ 2 =\n0")) then ()*) if f2str f = "c ^^^ 4 / d ^^^ 2 + A ^^^ 2 / 1 + -4 * c ^^^ 2 / d ^^^ 2 * a ^^^ 2 = 0" -then () else raise error "rlang.sml: diff.behav. in Schalk II s.66 Bsp 28a"; +then () else error "rlang.sml: diff.behav. in Schalk II s.66 Bsp 28a"; val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; @@ -1438,7 +1438,7 @@ val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; case f of Form' (FormKF (~1,EdUndef,0,Nundef,"[a = sqrt ((c ^^^ 4 + A ^^^ 2 * d ^^^ 2) / (4 * c ^^^ 2)),\n a = -1 * sqrt ((c ^^^ 4 + A ^^^ 2 * d ^^^ 2) / (4 * c ^^^ 2))]")) => () -| _ => raise error "rlang.sml: diff.behav. in Schalk II s.66 Bsp 28a [a=...]"; +| _ => error "rlang.sml: diff.behav. in Schalk II s.66 Bsp 28a [a=...]"; @@ -1479,7 +1479,7 @@ 0, Nundef, "b * a ^^^ 2 + -1 * a * b ^^^ 2 + (a ^^^ 2 + b ^^^ 2 + -2 * a * b) * x +\n(b + -1 * a) * x ^^^ 2 =\n0")) then () -else raise error "rlang.sml: diff.behav. in chalk I s.87 Bsp 38b"; +else error "rlang.sml: diff.behav. in chalk I s.87 Bsp 38b"; val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val (p,_,f,nxt,_,pt) = me nxt p [1] pt; @@ -1502,7 +1502,7 @@ val (p,_,f,nxt,_,pt) = me nxt p [1] pt;(*1 additional for MGs norm_Rational*) if p = ([],Res) andalso f = Form' (FormKF (~1,EdUndef,0,Nundef, "[x =\n (2 * a * b + -1 * a ^^^ 2 + -1 * b ^^^ 2 +\n sqrt\n (a ^^^ 4 + b ^^^ 4 + -4 * a * a * b ^^^ 2 + -4 * a * b * a ^^^ 2 +\n -4 * b * b * a ^^^ 2 +\n 4 * a * a * b ^^^ 2 +\n 4 * a * b * a ^^^ 2 +\n 2 * a ^^^ 2 * b ^^^ 2)) /\n (-2 * a + 2 * b),\n x =\n (2 * a * b + -1 * a ^^^ 2 + -1 * b ^^^ 2 +\n -1 *\n sqrt\n (a ^^^ 4 + b ^^^ 4 + -4 * a * a * b ^^^ 2 + -4 * a * b * a ^^^ 2 +\n -4 * b * b * a ^^^ 2 +\n 4 * a * a * b ^^^ 2 +\n 4 * a * b * a ^^^ 2 +\n 2 * a ^^^ 2 * b ^^^ 2)) /\n (-2 * a + 2 * b)]")) andalso nxt = ("End_Proof'",End_Proof') then writeln"simplify MG" -else raise error "rlang.sml: diff.behav. in rational-a-b"; +else error "rlang.sml: diff.behav. in rational-a-b"; (*----------------- Schalk II s.68 Bsp 56a ------------------------*) "Schalk II s.68 Bsp 56a ((a+b*x)/(a-b*x) - (a - b*x)/(a+b*x)= (4*a*b)/(a^^^2 - b^^^2))"; @@ -1629,7 +1629,7 @@ Nundef, (*"-4 * b ^^^ 2 + -4 * a * b + 4 * b ^^^ 2 + 8 * a * b +\n(-2 * a + -4 * a + -4 * b + 2 * a + 8 * b) * x +\n-4 * x ^^^ 2 =\n0" before MG*) "4 * a * b + (-4 * a + 4 * b) * x + -4 * x ^^^ 2 = 0")) then () -else raise error "rlang.sml: diff.behav. in Schalk II s.68 Bsp 61b"; +else error "rlang.sml: diff.behav. in Schalk II s.68 Bsp 61b"; val (p,_,f,nxt,_,pt) = me nxt p [1] pt; (*val nxt = ("Model_Problem", Model_Problem ["abcFormula","degree_2","polynomial","univariate","equation"])*) @@ -1649,7 +1649,7 @@ (*if f = Form' (FormKF (~1,EdUndef,0,Nundef, with norm_Rational before MG "[x =\n (-2 * a + -4 * b + 6 * a +\n sqrt\n (32 * a * b + -16 * a ^^^ 2 + -48 * b ^^^ 2 + 24 * a ^^^ 2 +\n 64 * b ^^^ 2 +\n 8 * a ^^^ 2)) /\n -8,\n x =\n (-2 * a + -4 * b + 6 * a +\n -1 *\n sqrt\n (32 * a * b + -16 * a ^^^ 2 + -48 * b ^^^ 2 + 24 * a ^^^ 2 +\n 64 * b ^^^ 2 +\n 8 * a ^^^ 2)) /\n -8]")) then writeln"simplify MG"*) if f = Form' (FormKF (~1,EdUndef,0,Nundef,"[x =\n (-4 * b + 4 * a + sqrt (32 * a * b + 16 * a ^^^ 2 + 16 * b ^^^ 2)) / -8,\n x =\n (-4 * b + 4 * a + -1 * sqrt (32 * a * b + 16 * a ^^^ 2 + 16 * b ^^^ 2)) /\n -8]")) then () -else raise error "rlang.sml: diff.behav. Bsp 61b"; +else error "rlang.sml: diff.behav. Bsp 61b"; (*WN.18.12.03: extreme run-time !!!*) @@ -1681,7 +1681,7 @@ 0, Nundef, "-4 * a * b + (-4 * b + 2 * a) * x + 2 * x ^^^ 2 = 0")) then () -else raise error "rlang.sml: diff.behav. in Schalk II s.68 Bsp 62b"; +else error "rlang.sml: diff.behav. in Schalk II s.68 Bsp 62b"; val (p,_,f,nxt,_,pt) = me nxt p [1] pt; (*val nxt = ("Model_Problem", Model_Problem ["abcFormula","degree_2","polynomial","univariate","equation"])*) @@ -1699,7 +1699,7 @@ (*val (p,_,f,nxt,_,pt) = me nxt p [1] pt;introduc.MGs norm_Rational*) if f = Form' (FormKF (~1,EdUndef,0,Nundef, "[x = (-2 * a + 4 * b + sqrt (16 * a * b + 16 * b ^^^ 2 + 4 * a ^^^ 2)) / 4,\n x =\n (-2 * a + 4 * b + -1 * sqrt (16 * a * b + 16 * b ^^^ 2 + 4 * a ^^^ 2)) / 4]")) then writeln "simplify MG" -else raise error "rlang.sml: diff.behav. in II 62b [x=...]"; +else error "rlang.sml: diff.behav. in II 62b [x=...]"; val asms = get_assumptions_ pt p; if asms = [(str2term"0 <= ((-2 * a + 4 * b + sqrt (16 * a * b + 16 * b ^^^ 2 + 4 * a ^^^ 2)) / 4 + a) ^^^ 2 + ((-2 * a + 4 * b + sqrt (16 * a * b + 16 * b ^^^ 2 + 4 * a ^^^ 2)) / 4 - 2 * b) ^^^ 2", []), (str2term"0 <= a + 2 * b", []), @@ -1710,7 +1710,7 @@ (str2term"8 * (-4 * a * b) <= (-4 * b + 2 * a) ^^^ 2", []), (str2term"8 * (-4 * a * b) <= (-4 * b + 2 * a) ^^^ 2", [])] then writeln "should be simplified MG" -else raise error "rlang.sml: diff.behav. in II 62b asms"; +else error "rlang.sml: diff.behav. in II 62b asms"; "------ WN.TEST---------------------------------"; "------ WN.TEST---------------------------------"; @@ -1732,7 +1732,7 @@ val subst = [(str2term "bdv", str2term "x")]; val SOME (t',_) = rewrite_set_inst_ thy false subst make_ratpoly_in t; if term2str t' = "x ^^^ 2 + 2 * x ^^^ 3 = 0" then () -else raise error "rlang.sml: 7"; +else error "rlang.sml: 7"; *) val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; @@ -1746,7 +1746,7 @@ val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val (p,_,f,nxt,_,pt) = me nxt p [1] pt; if f = Form' (FormKF (~1,EdUndef,0,Nundef,"[x = 0, x = 0, x = -1 / 2]")) then() -else raise error "rlang.sml WN.TEST new behaviour"; +else error "rlang.sml WN.TEST new behaviour"; "------ rlang.sml end---------------------------------"; @@ -1798,7 +1798,7 @@ if f = Form' (FormKF (~1,EdUndef,0,Nundef, "[a = sqrt ((-1 * b ^^^ 2 + 4 * r ^^^ 2) / 1),\n a = -1 * sqrt ((-1 * b ^^^ 2 + 4 * r ^^^ 2) / 1)]")) andalso nxt = ("End_Proof'",End_Proof') then writeln"simplify result\nsimplify result\nsimplify result" -else raise error "rlang.sml: diff.behav. in Pythagoras"; +else error "rlang.sml: diff.behav. in Pythagoras"; val asms = get_assumptions_ pt p; (*if asms = [(str2term"0 <= -4 * (b ^^^ 2 / 4 + -4 * r ^^^ 2 / 4)", []), (str2term"0 <= -4 * (b ^^^ 2 / 4 + -4 * r ^^^ 2 / 4)", [])]*) @@ -1806,7 +1806,7 @@ "[(0 <= -4 * (b ^^^ 2 / 4 + -1 * r ^^^ 2 / 1), []),\ \(0 <= -4 * (b ^^^ 2 / 4 + -1 * r ^^^ 2 / 1), [])]" then writeln"simplify result\nsimplify result\nsimplify result" -else raise error "rlang.sml: diff.behav. in Pythagoras asms"; +else error "rlang.sml: diff.behav. in Pythagoras asms"; "-------------------- WN.15.5.03: equation within the maximum example ------"; @@ -1864,7 +1864,7 @@ 0, Nundef, "-16 * r ^^^ 4 + 8 * r ^^^ 2 * u ^^^ 2 = 0")) then () -else raise error "rlang.sml: diff.behav. in Schalk I s.87 Bsp 38b"; +else error "rlang.sml: diff.behav. in Schalk I s.87 Bsp 38b"; val (p,_,f,nxt,_,pt) = me nxt p c pt; (*val nxt = Model_Problem ["sq_only","degree_2","polynomial","univariate","equation"]) *) val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt; @@ -1880,4 +1880,4 @@ val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; if f = Form' (FormKF (~1,EdUndef,0,Nundef,"[u = sqrt (2 * r ^^^ 2 / 1), u = -1 * sqrt (2 * r ^^^ 2 / 1)]")) then() -else raise error "rlang.sml WN.TEST new behaviour in max-rooteq"; +else error "rlang.sml WN.TEST new behaviour in max-rooteq"; diff -r 95d956108461 -r 460c24a6a6ba test/Tools/isac/Knowledge/root.sml --- a/test/Tools/isac/Knowledge/root.sml Tue Sep 28 08:58:06 2010 +0200 +++ b/test/Tools/isac/Knowledge/root.sml Tue Sep 28 09:06:56 2010 +0200 @@ -5,11 +5,11 @@ val t = str2term "sqrt 1"; val SOME (t',_) = rewrite_set_ thy false Root_erls t; -if term2str t' = "1" then () else raise error "root.sml: diff.behav. sqrt 1"; +if term2str t' = "1" then () else error "root.sml: diff.behav. sqrt 1"; val t = str2term "sqrt -1"; val NONE = rewrite_set_ thy false Root_erls t; val t = str2term "sqrt 0"; val SOME (t',_) = rewrite_set_ thy false Root_erls t; term2str t'; -if term2str t' = "0" then () else raise error "root.sml: diff.behav. sqrt 1"; +if term2str t' = "0" then () else error "root.sml: diff.behav. sqrt 1"; diff -r 95d956108461 -r 460c24a6a6ba test/Tools/isac/Knowledge/rooteq.sml --- a/test/Tools/isac/Knowledge/rooteq.sml Tue Sep 28 08:58:06 2010 +0200 +++ b/test/Tools/isac/Knowledge/rooteq.sml Tue Sep 28 09:06:56 2010 +0200 @@ -18,72 +18,72 @@ val t = (term_of o the o (parse RootEq.thy)) "(sqrt(2+x+3)) is_rootTerm_in x"; val SOME(t_, _) = rewrite_set_ RootEq.thy false RootEq_prls t; val result = term2str t_; -if result <> "True" then raise error "rooteq.sml: new behaviour:" else (); +if result <> "True" then error "rooteq.sml: new behaviour:" else (); val t = (term_of o the o (parse RootEq.thy)) "(sqrt(2+x+3)) is_rootTerm_in x"; val SOME(t_, _) = rewrite_set_ RootEq.thy false RootEq_prls t; val result = term2str t_; -if result <> "True" then raise error "rooteq.sml: new behaviour:" else (); +if result <> "True" then error "rooteq.sml: new behaviour:" else (); val t = (term_of o the o (parse RootEq.thy)) "(nroot 5 (x+4)) is_rootTerm_in x"; val SOME(t_, _) = rewrite_set_ RootEq.thy false RootEq_prls t; val result = term2str t_; -if result <> "True" then raise error "rooteq.sml: new behaviour:" else (); +if result <> "True" then error "rooteq.sml: new behaviour:" else (); val t = (term_of o the o (parse RootEq.thy)) "(sqrt(2+x+3)) is_sqrtTerm_in x"; val SOME(t_, _) = rewrite_set_ RootEq.thy false RootEq_prls t; val result = term2str t_; -if result <> "True" then raise error "rooteq.sml: new behaviour:" else (); +if result <> "True" then error "rooteq.sml: new behaviour:" else (); val t = (term_of o the o (parse RootEq.thy)) "(sqrt(25)) is_sqrtTerm_in x"; val SOME(t_, _) = rewrite_set_ RootEq.thy false RootEq_prls t; val result = term2str t_; -if result <> "False" then raise error "rooteq.sml: new behaviour:" else (); +if result <> "False" then error "rooteq.sml: new behaviour:" else (); val t = (term_of o the o (parse RootEq.thy)) "sqrt(1 + x) is_normSqrtTerm_in x"; val SOME(t_, _) = rewrite_set_ RootEq.thy false RootEq_prls t; val result = term2str t_; -if result <> "True" then raise error "rooteq.sml: new behaviour:" else (); +if result <> "True" then error "rooteq.sml: new behaviour:" else (); val t = (term_of o the o (parse RootEq.thy)) "(3+3*sqrt(x)) is_normSqrtTerm_in x"; val SOME(t_, _) = rewrite_set_ RootEq.thy false RootEq_prls t; val result = term2str t_; -if result <> "True" then raise error "rooteq.sml: new behaviour:" else (); +if result <> "True" then error "rooteq.sml: new behaviour:" else (); val t = (term_of o the o (parse RootEq.thy)) "(sqrt(x+1)+1) is_normSqrtTerm_in x"; val SOME(t_, _) = rewrite_set_ RootEq.thy false RootEq_prls t; val result = term2str t_; -if result <> "False" then raise error "rooteq.sml: new behaviour:" else (); +if result <> "False" then error "rooteq.sml: new behaviour:" else (); val t = (term_of o the o (parse RootEq.thy)) "(1 - u/(sqrt(r - u))) is_normSqrtTerm_in u"; val SOME(t_, _) = rewrite_set_ RootEq.thy false RootEq_prls t; val result = term2str t_; -if result <> "False" then raise error "rooteq.sml: new behaviour:" else (); +if result <> "False" then error "rooteq.sml: new behaviour:" else (); val t = (term_of o the o (parse RootEq.thy)) "(x*(1+x)/(sqrt(x+1))) is_normSqrtTerm_in x"; val SOME(t_, _) = rewrite_set_ RootEq.thy false RootEq_prls t; val result = term2str t_; -if result <> "True" then raise error "rooteq.sml: new behaviour:" else (); +if result <> "True" then error "rooteq.sml: new behaviour:" else (); val t = (term_of o the o (parse RootEq.thy)) "(1 - (sqrt(2+x+3)^^^3)) is_normSqrtTerm_in x"; val SOME(t_, _) = rewrite_set_ RootEq.thy false RootEq_prls t; val result = term2str t_; -if result <> "False" then raise error "rooteq.sml: new behaviour:" else (); +if result <> "False" then error "rooteq.sml: new behaviour:" else (); val t = (term_of o the o (parse RootEq.thy)) "(1 + (sqrt(2+x+3)^^^3)) is_normSqrtTerm_in x"; val SOME(t_, _) = rewrite_set_ RootEq.thy false RootEq_prls t; val result = term2str t_; -if result <> "True" then raise error "rooteq.sml: new behaviour:" else (); +if result <> "True" then error "rooteq.sml: new behaviour:" else (); val result = match_pbl ["equality (sqrt(x)=1)","solveFor x","solutions L"] (get_pbt ["root'","univariate","equation"]); -case result of Matches' _ => () | _ => raise error "rooteq.sml: new behaviour:"; +case result of Matches' _ => () | _ => error "rooteq.sml: new behaviour:"; val result = match_pbl ["equality (sqrt(25)=1)","solveFor x","solutions L"] (get_pbt ["root'","univariate","equation"]); -case result of NoMatch' _ => () | _ => raise error "rooteq.sml: new behaviour:"; +case result of NoMatch' _ => () | _ => error "rooteq.sml: new behaviour:"; (*---------rooteq---- 23.8.02 ---------------------*) "---------(1/sqrt(x)=5)---------------------"; @@ -112,7 +112,7 @@ val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; if f = Form' (FormKF (~1, EdUndef, 0, Nundef, "1 + -25 * x = 0")) then () -else raise error "rooteq.sml: diff.behav.poly in (1/sqrt(x)=5)"; +else error "rooteq.sml: diff.behav.poly in (1/sqrt(x)=5)"; (*-> Subproblem ("PolyEq", ["polynomial", ...])*) val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val (p,_,f,nxt,_,pt) = me nxt p [1] pt; @@ -126,14 +126,14 @@ val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; case f of Form' (FormKF (~1,EdUndef,0,Nundef,"[x = 1 / 25]")) => () - | _ => raise error "rooteq.sml: diff.behav. [x = 1 / 25]"; + | _ => error "rooteq.sml: diff.behav. [x = 1 / 25]"; if asms2str (get_assumptions_ pt p) = "[(0 <= 1 / 25, [])]" (*WN050916 before correction 'rewrite__set_ called with 'Erls' for ..: [(str2term"25 ~= 0",[])] *) then writeln "should be True\n\ \should be True\n\ \should be True\n" -else raise error "rooteq.sml: diff.behav. with 25 ~= 0"; +else error "rooteq.sml: diff.behav. with 25 ~= 0"; "---------(sqrt(x+1)=5)---------------------"; val fmz = ["equality (sqrt(x+1)=5)","solveFor x","solutions L"]; @@ -157,7 +157,7 @@ val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; if f = Form' (FormKF (~1, EdUndef, 0, Nundef, "-24 + x = 0")) then () -else raise error "rooteq.sml: diff.behav.poly in sqrt(x+1)=5"; +else error "rooteq.sml: diff.behav.poly in sqrt(x+1)=5"; (*-> Subproblem ("PolyEq", ["polynomial", ...])*) val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; @@ -169,7 +169,7 @@ val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; case f of Form' (FormKF (~1,EdUndef,0,Nundef,"[x = 24]")) => () - | _ => raise error "rooteq.sml: diff.behav. [x = 24]"; + | _ => error "rooteq.sml: diff.behav. [x = 24]"; "-------------(4*sqrt(4*x+2)=3*sqrt(2*x+24))-----------------"; val fmz = ["equality (4*sqrt(4*x+2)=3*sqrt(2*x+24))","solveFor x","solutions L"]; @@ -188,7 +188,7 @@ val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; if f = Form' (FormKF (~1, EdUndef, 0, Nundef, "-184 + 46 * x = 0")) then () -else raise error "rooteq.sml: diff.behav.poly in 4*sqrt(4*x+2)=3*sqrt(2*x+24)"; +else error "rooteq.sml: diff.behav.poly in 4*sqrt(4*x+2)=3*sqrt(2*x+24)"; val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; @@ -199,11 +199,11 @@ val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; case f of Form' (FormKF (~1,EdUndef,0,Nundef,"[x = 4]")) => () - | _ => raise error "rooteq.sml: diff.behav. [x = 4]"; + | _ => error "rooteq.sml: diff.behav. [x = 4]"; if get_assumptions_ pt p = [(str2term"0 <= 12 * sqrt 2 * 4",[])] then writeln "should be True\nshould be True\nshould be True\n\ \should be True\nshould be True\nshould be True\n" -else raise error "rooteq.sml: diff.behav. with 0 <= 12 * sqrt 2 * 4"; +else error "rooteq.sml: diff.behav. with 0 <= 12 * sqrt 2 * 4"; "--------------(sqrt(x+1)+sqrt(4*x+4)=sqrt(9*x+9))----------------"; val fmz = ["equality (sqrt(x+1)+sqrt(4*x+4)=sqrt(9*x+9))","solveFor x","solutions L"]; @@ -238,7 +238,7 @@ val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; if f = Form' (FormKF (~1, EdUndef, 0, Nundef, "0 = 0")) then () -else raise error "rooteq.sml: diff.behav.poly in (sqrt(x+1)+sqrt(4*x+4)=sqr.."; +else error "rooteq.sml: diff.behav.poly in (sqrt(x+1)+sqrt(4*x+4)=sqr.."; (*-> Subproblem ("PolyEq", ["degree_0", ...])*) val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt; @@ -252,7 +252,7 @@ val (p,_,f,nxt,_,pt) = me nxt p c pt; val asm = get_assumptions_ pt p; if f = Form' (FormKF (~1,EdUndef,0,Nundef,"UniversalList")) andalso asm = [] -then () else raise error "rooteq.sml: diff.behav. in UniversalList 1"; +then () else error "rooteq.sml: diff.behav. in UniversalList 1"; @@ -285,7 +285,7 @@ (*val p = ([6,2],Res) val f = Form' (FormKF (~1,EdUndef,2,Nundef,"0 = 0")) val nxt = Subproblem ("PolyEq",["polynomial","univariate","equation"]))*) if f = Form' (FormKF (~1, EdUndef, 0, Nundef, "0 = 0")) then () -else raise error "rooteq.sml: diff.behav.poly in sqrt(x+1)+sqrt(4*x+4)=sqrt.."; +else error "rooteq.sml: diff.behav.poly in sqrt(x+1)+sqrt(4*x+4)=sqrt.."; val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt; @@ -303,7 +303,7 @@ val nxt = Check_Postcond ["normalize","polynomial","univariate","equation"])*) val (p,_,f,nxt,_,pt) = me nxt p c pt; if f = Form' (FormKF (~1, EdUndef, 0, Nundef, "UniversalList")) then () -else raise error "rooteq.sml: diff.behav.poly in sqrt(x+1)+sqrt(4*x+4)=sqrt.."; +else error "rooteq.sml: diff.behav.poly in sqrt(x+1)+sqrt(4*x+4)=sqrt.."; (* val Form' (FormKF (~1, EdUndef, 0, Nundef, str)) = f; *) @@ -337,7 +337,7 @@ (*val p = ([3,2],Res)val f = Form' (FormKF (~1,EdUndef,2,Nundef,"-1 + x = 0")) val nxt = Subproblem ("PolyEq",["polynomial","univariate","equation"]))*) if f = Form' (FormKF (~1, EdUndef, 0, Nundef, "-1 + x = 0")) then () -else raise error "rooteq.sml: diff.behav.poly in sqrt(x+1)+sqrt(4*x+4)=sqrt.."; +else error "rooteq.sml: diff.behav.poly in sqrt(x+1)+sqrt(4*x+4)=sqrt.."; val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt; @@ -366,7 +366,7 @@ val nxt = Check_Postcond ["sq","root'","univariate","equation"]) *) val (p,_,f,nxt,_,pt) = me nxt p c pt; if p = ([],Res) andalso f = Form' (FormKF (~1,EdUndef,0,Nundef,"[x = 1]")) -then () else raise error "diff.behav. in rooteq.sml: sqrt(x) = 1"; +then () else error "diff.behav. in rooteq.sml: sqrt(x) = 1"; "--------------(sqrt(x+1)+sqrt(4*x+4)=sqrt(9*x+9))---------- SHORTEST.1.----\ @@ -394,7 +394,7 @@ (*val p = ([2,2],Res) val f = Form' (FormKF (~1,EdUndef,2,Nundef,"0 = 0")) val nxt = Subproblem ("PolyEq",["polynomial","univariate","equation"]))*) if f = Form' (FormKF (~1, EdUndef, 0, Nundef, "0 = 0")) then () -else raise error "rooteq.sml: diff.behav.poly in sqrt(x+1)+sqrt(4*x+4)=sqrt.."; +else error "rooteq.sml: diff.behav.poly in sqrt(x+1)+sqrt(4*x+4)=sqrt.."; val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt; @@ -415,7 +415,7 @@ val nxt = Check_Postcond ["sq","root'","univariate","equation"]) *) val (p,_,f,nxt,_,pt) = me nxt p c pt; if p = ([],Res) andalso f = Form'(FormKF (~1,EdUndef,0,Nundef,"UniversalList")) -then () else raise error "new behav. in rooteq.sml: sqrt x = sqrt x"; +then () else error "new behav. in rooteq.sml: sqrt x = sqrt x"; "--------------(3*sqrt(x+3)+sqrt(x+6)=sqrt(4*x+33))----------------"; @@ -450,7 +450,7 @@ val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt; if f = Form' (FormKF (~1, EdUndef, 0, Nundef, "-648 + -324 * x = 0")) then () -else raise error "rooteq.sml: diff.behav.poly in 3*sqrt(x+3)+sqrt(x+6)=sqrt.."; +else error "rooteq.sml: diff.behav.poly in 3*sqrt(x+3)+sqrt(x+6)=sqrt.."; (*-> Subproblem ("PolyEq", ["degree_1", ...])*) val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt; @@ -463,7 +463,7 @@ val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; case f of Form' (FormKF (~1,EdUndef,0,Nundef,"[x = -2]")) => () - | _ => raise error "rooteq.sml: diff.behav. [x = -2]"; + | _ => error "rooteq.sml: diff.behav. [x = -2]"; "----------- rooteq.sml end--------"; diff -r 95d956108461 -r 460c24a6a6ba test/Tools/isac/Knowledge/rootrateq.sml --- a/test/Tools/isac/Knowledge/rootrateq.sml Tue Sep 28 08:58:06 2010 +0200 +++ b/test/Tools/isac/Knowledge/rootrateq.sml Tue Sep 28 09:06:56 2010 +0200 @@ -15,37 +15,37 @@ val t1 = (term_of o the o (parse thy)) "(-8 - sqrt(x) + x^^^2) is_rootRatAddTerm_in x"; val SOME (t,_) = rewrite_set_ RootRatEq.thy false RootRatEq_prls t1; if (term2str t) = "False" then () - else raise error "rootrateq.sml: diff.behav. 1 in is_rootRatAddTerm_in"; + else error "rootrateq.sml: diff.behav. 1 in is_rootRatAddTerm_in"; val t1 = (term_of o the o (parse thy)) "(1/x) is_rootRatAddTerm_in x"; val SOME (t,_) = rewrite_set_ RootRatEq.thy false RootRatEq_prls t1; if (term2str t) = "False" then () - else raise error "rootrateq.sml: diff.behav. 2 in is_rootRatAddTerm_in"; + else error "rootrateq.sml: diff.behav. 2 in is_rootRatAddTerm_in"; val t1 = (term_of o the o (parse thy)) "(1/sqrt(x)) is_rootRatAddTerm_in x"; val SOME (t,_) = rewrite_set_ RootRatEq.thy false RootRatEq_prls t1; if (term2str t) = "False" then () - else raise error "rootrateq.sml: diff.behav. 3 in is_rootRatAddTerm_in"; + else error "rootrateq.sml: diff.behav. 3 in is_rootRatAddTerm_in"; val t1 = (term_of o the o (parse thy)) "(1/(sqrt(x)+1)) is_rootRatAddTerm_in x"; val SOME (t,_) = rewrite_set_ RootRatEq.thy false RootRatEq_prls t1; if (term2str t) = "True" then () - else raise error "rootrateq.sml: diff.behav. 4 in is_rootRatAddTerm_in"; + else error "rootrateq.sml: diff.behav. 4 in is_rootRatAddTerm_in"; val t1 = (term_of o the o (parse thy)) "(3 + 1/(1+sqrt(x))) is_rootRatAddTerm_in x"; val SOME (t,_) = rewrite_set_ RootRatEq.thy false RootRatEq_prls t1; if (term2str t) = "True" then () - else raise error "rootrateq.sml: diff.behav. 5 in is_rootRatAddTerm_in"; + else error "rootrateq.sml: diff.behav. 5 in is_rootRatAddTerm_in"; val t1 = (term_of o the o (parse thy)) "(1/(1+sqrt(y)) + 3 + 1/(1+sqrt(x))) is_rootRatAddTerm_in x"; val SOME (t,_) = rewrite_set_ RootRatEq.thy false RootRatEq_prls t1; if (term2str t) = "True" then () - else raise error "rootrateq.sml: diff.behav. 6 in is_rootRatAddTerm_in"; + else error "rootrateq.sml: diff.behav. 6 in is_rootRatAddTerm_in"; val t1 = (term_of o the o (parse thy)) "(1/(1+sqrt(x)) + 3 + 1/(1+sqrt(y))) is_rootRatAddTerm_in x"; val SOME (t,_) = rewrite_set_ RootRatEq.thy false RootRatEq_prls t1; if (term2str t) = "True" then () - else raise error "rootrateq.sml: diff.behav. 7 in is_rootRatAddTerm_in"; + else error "rootrateq.sml: diff.behav. 7 in is_rootRatAddTerm_in"; "--------------------- test thm rootrat_equation_left_1 ---------------------"; @@ -81,7 +81,7 @@ val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; if f = Form' (FormKF (~1, EdUndef, 0, Nundef, "1 + -4 * x = 0")) then () -else raise error "rootrateq.sml: diff.behav. in rootrat_equation_left_1"; +else error "rootrateq.sml: diff.behav. in rootrat_equation_left_1"; (*-> Subproblem ("RootEq", ["polynomial", ...])*) val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; @@ -94,7 +94,7 @@ val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; case f of Form' (FormKF (~1,EdUndef,0,Nundef,"[x = 1 / 4]")) => () - | _ => raise error "rootrateq.sml: diff.behav. in -2 + 1/(1 - sqrt(x))= 0 -> [x = 1/4]"; + | _ => error "rootrateq.sml: diff.behav. in -2 + 1/(1 - sqrt(x))= 0 -> [x = 1/4]"; "--------------------- test thm rootrat_equation_left_2 ---------------------"; val fmz = ["equality (3/(1+sqrt(x))= 1)", "solveFor x","solutions L"]; @@ -128,7 +128,7 @@ val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; if f = Form' (FormKF (~1, EdUndef, 0, Nundef, "4 + -1 * x = 0")) then () -else raise error "rootrateq.sml: diff.behav. in rootrat_equation_left_2"; +else error "rootrateq.sml: diff.behav. in rootrat_equation_left_2"; (*-> Subproblem ("PolyEq", ["polynomial", ...])*) val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; @@ -141,7 +141,7 @@ val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; case f of Form' (FormKF (~1,EdUndef,0,Nundef,"[x = 4]")) => () - | _ => raise error "rootrateq.sml: diff.behav. in 3/(1+sqrt(x))= 1 -> [x = 4]"; + | _ => error "rootrateq.sml: diff.behav. in 3/(1+sqrt(x))= 1 -> [x = 4]"; "--------------------- test thm rootrat_equation_right_1 ---------------"; val fmz = ["equality ( 0= -2 + 1/(1 - sqrt(x)))", "solveFor x","solutions L"]; @@ -171,7 +171,7 @@ val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; if f = Form' (FormKF (~1, EdUndef, 0, Nundef, "-1 + 4 * x = 0")) then () -else raise error "rootrateq.sml: diff.behav.ppoly in rootrat_equation_right_1"; +else error "rootrateq.sml: diff.behav.ppoly in rootrat_equation_right_1"; val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; @@ -184,7 +184,7 @@ val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; case f of Form' (FormKF (~1,EdUndef,0,Nundef,"[x = 1 / 4]")) => () - | _ => raise error "rootrateq.sml: diff.behav. in -2 + 1/(1 - sqrt(x))= 0 -> [x = 1/4]"; + | _ => error "rootrateq.sml: diff.behav. in -2 + 1/(1 - sqrt(x))= 0 -> [x = 1/4]"; "--------------------- test thm rootrat_equation_right_2 --------------------"; val fmz = ["equality (1 = 3/(1+sqrt(x)))", "solveFor x","solutions L"]; @@ -213,7 +213,7 @@ val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; if f = Form' (FormKF (~1, EdUndef, 0, Nundef, "-4 + x = 0")) then () -else raise error "rootrateq.sml: diff.behav. in rootrat_equation_right_2"; +else error "rootrateq.sml: diff.behav. in rootrat_equation_right_2"; val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; @@ -226,4 +226,4 @@ val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; case f of Form' (FormKF (~1,EdUndef,0,Nundef,"[x = 4]")) => () - | _ => raise error "rootrateq.sml: diff.behav. in 3/(1+sqrt(x))= 1 -> [x = 4]"; + | _ => error "rootrateq.sml: diff.behav. in 3/(1+sqrt(x))= 1 -> [x = 4]"; diff -r 95d956108461 -r 460c24a6a6ba test/Tools/isac/Knowledge/simplify.sml --- a/test/Tools/isac/Knowledge/simplify.sml Tue Sep 28 08:58:06 2010 +0200 +++ b/test/Tools/isac/Knowledge/simplify.sml Tue Sep 28 09:06:56 2010 +0200 @@ -33,7 +33,7 @@ val Form res = (#1 o pt_extract) (pt, ([],Res)); show_pt pt; if p = ([], Res) andalso term2str res = "5 * a" then () -else raise error "simplify.sml: diff.behav. CAScmd: Simplify (2*a + 3*a)"; +else error "simplify.sml: diff.behav. CAScmd: Simplify (2*a + 3*a)"; "----------- append inform with final result ---------------------"; @@ -54,4 +54,4 @@ val ((pt,p),_) = get_calc 1; show_pt pt; val Form res = (#1 o pt_extract) (pt, ([],Res)); if p = ([], Res) andalso term2str res = "14" then () -else raise error "simplify.sml: append inform with final result ?!?"; +else error "simplify.sml: append inform with final result ?!?"; diff -r 95d956108461 -r 460c24a6a6ba test/Tools/isac/Knowledge/system.sml --- a/test/Tools/isac/Knowledge/system.sml Tue Sep 28 08:58:06 2010 +0200 +++ b/test/Tools/isac/Knowledge/system.sml Tue Sep 28 09:06:56 2010 +0200 @@ -24,21 +24,21 @@ val SOME (t,_) = rewrite_set_ thy false norm_Poly t; if term2str t = "[0 = -1 * q_0 * (0 / 2) + c_2, 0 = L * c + -1 * q_0 * (L ^^^ 2 / 2) + c_2]" -then () else raise error "system.sml, diff.behav. in norm_Poly"; +then () else error "system.sml, diff.behav. in norm_Poly"; val t = str2term "[0 = c*0 + -1*q_0*(0^^^2 / 2) + c_2,\ \ 0 = c*L + -1*q_0*(L^^^2 / 2) + c_2]"; val SOME (t,_) = rewrite_set_ thy false norm_Rational t; if term2str t = "[0 = c_2, 0 = (2 * c_2 + 2 * L * c + -1 * L ^^^ 2 * q_0) / 2]" -then () else raise error "system.sml, diff.behav. in norm_Rational"; +then () else error "system.sml, diff.behav. in norm_Rational"; val t = str2term "nth_ 1 [0 = c*0 + -1*q_0*(0^^^2 / 2) + c_2,\ \ 0 = c*L + -1*q_0*(L^^^2 / 2) + c_2]"; val SOME (t,_) = rewrite_set_ thy false list_rls t; if term2str t = "0 = c * 0 + -1 * q_0 * (0 ^^^ 2 / 2) + c_2" -then () else raise error "system.sml, list_rls"; +then () else error "system.sml, list_rls"; "----------- me --------------------------------------------------"; @@ -55,12 +55,12 @@ val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; case nxt of (_, Specify_Theory "Biegelinie") => () - | _ => raise error "system.sml diff.behav.in me --1"; + | _ => error "system.sml diff.behav.in me --1"; val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; case nxt of (_, Apply_Method ["EqSystem", "normalize", "2x2"]) => () - | _ => raise error "system.sml diff.behav.in me --2"; + | _ => error "system.sml diff.behav.in me --2"; val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f; val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f; val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f; @@ -69,18 +69,18 @@ case nxt of (_, Subproblem ("Biegelinie", ["triangular", "2x2", "linear", "system"])) => () - | _ => raise error "system.sml diff.behav.in me --3"; + | _ => error "system.sml diff.behav.in me --3"; val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))]; val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; case nxt of (_, Specify_Theory "Biegelinie") => () - | _ => raise error "system.sml diff.behav.in me --1"; + | _ => error "system.sml diff.behav.in me --1"; val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt; case nxt of (_, Apply_Method ["EqSystem", "normalize", "2x2"]) => () - | _ => raise error "system.sml diff.behav.in me --2"; + | _ => error "system.sml diff.behav.in me --2"; val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f; val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f; val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f; @@ -92,9 +92,9 @@ WN060421 stopped as soon as exp_IsacCore_Equ_Sys_Lin_No-1.xml worked ... if f2str f = "" then () -else raise error "system.sml diff.behav.in me --99"; +else error "system.sml diff.behav.in me --99"; case nxt of ("End_Proof'", End_Proof') => () - | _ => raise error "system.sml diff.behav.in me --99"; + | _ => error "system.sml diff.behav.in me --99"; print_depth 11;nxt;print_depth 3; ---*) diff -r 95d956108461 -r 460c24a6a6ba test/Tools/isac/Knowledge/termorder.sml --- a/test/Tools/isac/Knowledge/termorder.sml Tue Sep 28 08:58:06 2010 +0200 +++ b/test/Tools/isac/Knowledge/termorder.sml Tue Sep 28 09:06:56 2010 +0200 @@ -20,13 +20,13 @@ val x4 = (term_of o the o (parse thy)) "x + a + b"; if ord_make_polynomial_in true thy substx (x1,x2) = true(*LESS *) then () -else raise error "termorder.sml diff.behav ord_make_polynomial_in #1"; +else error "termorder.sml diff.behav ord_make_polynomial_in #1"; if ord_make_polynomial_in true thy substa (x1,x2) = true(*LESS *) then () -else raise error "termorder.sml diff.behav ord_make_polynomial_in #2"; +else error "termorder.sml diff.behav ord_make_polynomial_in #2"; if ord_make_polynomial_in true thy substb (x1,x2) = false(*GREATER*) then () -else raise error "termorder.sml diff.behav ord_make_polynomial_in #3"; +else error "termorder.sml diff.behav ord_make_polynomial_in #3"; val aa = (term_of o the o (parse thy)) "-1 * a * x"; val bb = (term_of o the o (parse thy)) "x^^^3"; @@ -47,7 +47,7 @@ val SOME (t',_) = rewrite_set_inst_ thy false [(bdv,a)] make_polynomial_in x2; if term2str t' = "b + x + a" then () -else raise error "termorder.sml diff.behav ord_make_polynomial_in #11"; +else error "termorder.sml diff.behav ord_make_polynomial_in #11"; val NONE = rewrite_set_inst_ thy false [(bdv,b)] make_polynomial_in x2; @@ -57,7 +57,7 @@ val SOME (t',_) = rewrite_set_inst_ thy false [(bdv,x)] make_polynomial_in x2; if term2str t' = "a + b + x" then () -else raise error "termorder.sml diff.behav ord_make_polynomial_in #13"; +else error "termorder.sml diff.behav ord_make_polynomial_in #13"; @@ -69,26 +69,26 @@ term2str t'; "(-6) + (-5 * x + (-15 * x ^^^ 2))";*) if term2str t' = "-6 + -5 * x + -15 * x ^^^ 2 + 0" then () -else raise error "termorder.sml diff.behav ord_make_polynomial_in #14"; +else error "termorder.sml diff.behav ord_make_polynomial_in #14"; val SOME (t',_) = rewrite_set_inst "Isac"false [("bdv","x")] "make_polynomial_in" ppp'; (*MG 2003... "(-6) + (-5 * x + (-15) * x ^^^ 2)";*) if t' = "-6 + -5 * x + -15 * x ^^^ 2 + 0" then () -else raise error "termorder.sml diff.behav ord_make_polynomial_in #15"; +else error "termorder.sml diff.behav ord_make_polynomial_in #15"; val ttt' = "(3*x + 5)/18"; val ttt = (term_of o the o (parse thy)) ttt'; val SOME (uuu,_) = rewrite_set_inst_ thy false [(bdv,x)] make_polynomial_in ttt; if term2str uuu = "(5 + 3 * x) / 18" then () -else raise error "termorder.sml diff.behav ord_make_polynomial_in #16"; +else error "termorder.sml diff.behav ord_make_polynomial_in #16"; val SOME (uuu,_) = rewrite_set_ thy false make_polynomial ttt; if term2str uuu = "(5 + 3 * x) / 18" then () -else raise error "termorder.sml diff.behav ord_make_polynomial_in #16"; +else error "termorder.sml diff.behav ord_make_polynomial_in #16"; diff -r 95d956108461 -r 460c24a6a6ba test/Tools/isac/OLDTESTS/modspec.sml --- a/test/Tools/isac/OLDTESTS/modspec.sml Tue Sep 28 08:58:06 2010 +0200 +++ b/test/Tools/isac/OLDTESTS/modspec.sml Tue Sep 28 09:06:56 2010 +0200 @@ -31,10 +31,10 @@ [([], Pbl), ([1], Frm),([1], Res), ([2], Res), ([3], Pbl), ([3, 1], Frm), ([3, 1], Res), ([3, 2, 1], Frm), ([3, 2, 1], Res), ([3, 2, 2], Res), ([3, 2], Res)] then () else -raise error "modspec.sml: diff.behav. get_interval after replace} other 2 a"; +error "modspec.sml: diff.behav. get_interval after replace} other 2 a"; print_depth 99;map fst (get_interval ([3, 2, 1], Res) ([],Res) 9999 pt); print_depth 3; if map fst (get_interval ([3, 2, 1], Res) ([],Res) 9999 pt) = [([3, 2, 1], Res), ([3, 2, 2], Res), ([3, 2], Res)] then () else -raise error "modspec.sml: diff.behav. get_interval after replace} other 2 b"; +error "modspec.sml: diff.behav. get_interval after replace} other 2 b"; diff -r 95d956108461 -r 460c24a6a6ba test/Tools/isac/OLDTESTS/root-equ.sml --- a/test/Tools/isac/OLDTESTS/root-equ.sml Tue Sep 28 08:58:06 2010 +0200 +++ b/test/Tools/isac/OLDTESTS/root-equ.sml Tue Sep 28 09:06:56 2010 +0200 @@ -77,7 +77,7 @@ (*"x = (0 + -1 * -36) // -15"*) val rls = ("Test_simplify"); val (ct,_) = the (rewrite_set thy' false rls ct); -if ct<>"x = -12 / 5"then raise error "new behaviour in testexample"else (); +if ct<>"x = -12 / 5"then error "new behaviour in testexample"else (); (* val ct = "x = (-12) / 5" : cterm' @@ -203,7 +203,7 @@ val (t,_) = the (rewrite_set_ thy false rls t); val t' = term2str t; if t' = "x = 4" then () -else raise error "root-equ.sml: new behav. in rewrite_ x+4"; +else error "root-equ.sml: new behav. in rewrite_ x+4"; " _________________ rewrite x=4_________________ "; " _________________ rewrite x=4_________________ "; @@ -249,7 +249,7 @@ "x = 0 + -1 * -4"; (*11*)val rls = "Test_simplify"; val (ct,_) = the (rewrite_set thy' false rls ct); -if ct="x = 4" then () else raise error "new behaviour in test-example"; +if ct="x = 4" then () else error "new behaviour in test-example"; @@ -629,7 +629,7 @@ val (p,_,f,nxt,_,pt) = me nxt p [1] pt; (* val nxt = ("End_Proof'",End_Proof');*) if f <> (Form' (FormKF (~1,EdUndef,0,Nundef,"[x = 4]"))) -then raise error "root-equ.sml: diff.behav. in me + tacs input" +then error "root-equ.sml: diff.behav. in me + tacs input" else (); writeln (pr_ptree pr_short pt); diff -r 95d956108461 -r 460c24a6a6ba test/Tools/isac/OLDTESTS/script.sml --- a/test/Tools/isac/OLDTESTS/script.sml Tue Sep 28 08:58:06 2010 +0200 +++ b/test/Tools/isac/OLDTESTS/script.sml Tue Sep 28 09:06:56 2010 +0200 @@ -237,7 +237,7 @@ (FormKF (~1,EdUndef,1,Nundef, "9 + 4 * x = 5 + 2 * x + 2 * sqrt (x ^^^ 2 + 5 * x)")) -then () else raise error "behaviour in root-expl. Free_Solve changed"; +then () else error "behaviour in root-expl. Free_Solve changed"; writeln (pr_ptree pr_short pt); ---------------------------------meNEW raises exception with not-locatable*) @@ -317,29 +317,29 @@ val tacs = sel_rules pt ([],Pbl); if tacs = [Apply_Method ["Test", "squ-equ-test-subpbl1"]] then () - else raise error "script.sml: diff.behav. in sel_rules ([],Pbl)"; + else error "script.sml: diff.behav. in sel_rules ([],Pbl)"; val tacs = sel_rules pt ([1],Res); if tacs = [Rewrite_Set "norm_equation", Rewrite_Set "Test_simplify", Subproblem ("Test.thy", ["linear", "univariate", "equation", "test"]), Check_elementwise "Assumptions"] then () - else raise error "script.sml: diff.behav. in sel_rules ([1],Res)"; + else error "script.sml: diff.behav. in sel_rules ([1],Res)"; val tacs = sel_rules pt ([3],Pbl); if tacs = [Apply_Method ["Test", "solve_linear"]] then () - else raise error "script.sml: diff.behav. in sel_rules ([3],Pbl)"; + else error "script.sml: diff.behav. in sel_rules ([3],Pbl)"; val tacs = sel_rules pt ([3,1],Res); if tacs = [Rewrite_Set_Inst (["(bdv, x)"], "isolate_bdv"), Rewrite_Set "Test_simplify"] then () - else raise error "script.sml: diff.behav. in sel_rules ([3,1],Res)"; + else error "script.sml: diff.behav. in sel_rules ([3,1],Res)"; val tacs = sel_rules pt ([3],Res); if tacs = [Rewrite_Set "norm_equation", Rewrite_Set "Test_simplify", Subproblem ("Test.thy", ["linear", "univariate", "equation", "test"]), Check_elementwise "Assumptions"] then () - else raise error "script.sml: diff.behav. in sel_rules ([3],Res)"; + else error "script.sml: diff.behav. in sel_rules ([3],Res)"; val tacs = (sel_rules pt ([],Res)) handle PTREE str => [Tac str]; if tacs = [Tac "no tactics applicable at the end of a calculation"] then () - else raise error "script.sml: diff.behav. in sel_rules ([],Res)"; + else error "script.sml: diff.behav. in sel_rules ([],Res)"; diff -r 95d956108461 -r 460c24a6a6ba test/Tools/isac/OLDTESTS/script_if.sml --- a/test/Tools/isac/OLDTESTS/script_if.sml Tue Sep 28 08:58:06 2010 +0200 +++ b/test/Tools/isac/OLDTESTS/script_if.sml Tue Sep 28 09:06:56 2010 +0200 @@ -130,7 +130,7 @@ val (p,_,f,nxt,_,pt) = me nxt p [1] pt; if f = Form' (FormKF (~1,EdUndef,0,Nundef,"[x = -1 / 2]")) andalso nxt = ("End_Proof'",End_Proof') then () -else raise error "new behaviour in testexample rationals2.sml 1+2*x=0"; +else error "new behaviour in testexample rationals2.sml 1+2*x=0"; (*---------------------------------*) "-------------- is_rootequ_in - SubProblem -------------------------"; @@ -166,4 +166,4 @@ if p = ([1,1],Frm) andalso f = Form' (FormKF (~1,EdUndef,2,Nundef,"sqrt x - 1 = 0")) andalso nxt = ("Empty_Tac",Empty_Tac) (*script ist noch 'helpless'*) then () -else raise error "new behaviour in testexample rationals2.sml sqrt(x) - 1 = 0"; +else error "new behaviour in testexample rationals2.sml sqrt(x) - 1 = 0"; diff -r 95d956108461 -r 460c24a6a6ba test/Tools/isac/OLDTESTS/scriptnew.sml --- a/test/Tools/isac/OLDTESTS/scriptnew.sml Tue Sep 28 08:58:06 2010 +0200 +++ b/test/Tools/isac/OLDTESTS/scriptnew.sml Tue Sep 28 09:06:56 2010 +0200 @@ -77,12 +77,12 @@ val (p,_,f,nxt,_,pt) = me nxt p c pt; (*"#0"*) if p=([4],Res) then () -else raise error ("new behaviour in 30.4.02 Testterm: p="^(pos'2str p)); +else error ("new behaviour in 30.4.02 Testterm: p="^(pos'2str p)); (*----script 666 ------------------------------------------------*) val (p,_,f,nxt,_,pt) = me nxt p c pt; (*"#0"*) if nxt=("End_Proof'",End_Proof') then () -else raise error "new behaviour in 30.4.02 Testterm: End_Proof"; +else error "new behaviour in 30.4.02 Testterm: End_Proof"; @@ -149,7 +149,7 @@ val (p,_,f,nxt,_,pt) = me nxt p c pt; if f=(Form' (FormKF (~1,EdUndef,0,Nundef,"a = 0 ^^^ 2"))) andalso nxt=("End_Proof'",End_Proof') then () -else raise error "different behaviour test 9.5.02 Testeq: While Try Repeat @@"; +else error "different behaviour test 9.5.02 Testeq: While Try Repeat @@"; @@ -198,7 +198,7 @@ val (p,_,f,nxt,_,pt) = (me nxt p c pt) handle e => print_exn e; if f=(Form' (FormKF (~1,EdUndef,0,Nundef,"[a = 0 ^^^ 2]"))) andalso nxt=("End_Proof'",End_Proof') then () -else raise error "different behaviour in test 11.5.02 Testeq: let e_e =... in [e_]"; +else error "different behaviour in test 11.5.02 Testeq: let e_e =... in [e_]"; @@ -290,7 +290,7 @@ (* nxt = ("Check_Postcond",Check_Postcond ("Test.thy","sqrt-equ-test"));*) val (p,_,f,nxt,_,pt) = me nxt p [1] pt; if f<>(Form' (FormKF (~1,EdUndef,0,Nundef,"[x = 4]"))) -then raise error "scriptnew.sml 1: me + tacs from script: new behaviour" +then error "scriptnew.sml 1: me + tacs from script: new behaviour" else (); "--- 15<> ---"; (* val nxt = ("End_Proof'",End_Proof');*) @@ -375,7 +375,7 @@ (*FIXXXXXXXXXXXXXXXXXXXXXXXME reestablish check: if f= Form'(FormKF(~1,EdUndef,1,Nundef,"sqrt (9 + 4 * x) = sqrt x + sqrt (5 + x)")) -then() else raise error "new behaviour in test-example 1.norm sqrt-equ-test"; +then() else error "new behaviour in test-example 1.norm sqrt-equ-test"; #################################################*) (* use"../tests/scriptnew.sml"; @@ -411,7 +411,7 @@ if asms = [(str2term "0 <= 9 + 4 * x",[1]), (str2term "0 <= x",[1]), (str2term "0 <= -3 + x",[1])] then () -else raise error "scriptnew.sml diff.behav. in sqrt assumptions 1"; +else error "scriptnew.sml diff.behav. in sqrt assumptions 1"; val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt; @@ -425,7 +425,7 @@ (str2term "0 <= -3 + x",[1]), (str2term "0 <= x ^^^ 2 + -3 * x",[6]), (str2term "0 <= 6 + x",[6])] then () -else raise error "scriptnew.sml diff.behav. in sqrt assumptions 2"; +else error "scriptnew.sml diff.behav. in sqrt assumptions 2"; val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt; @@ -442,7 +442,7 @@ ("Check_Postcond",Check_Postcond ["linear","univariate","equation","test"])*) val asms = get_assumptions_ pt p; if asms = [] then () -else raise error "scriptnew.sml diff.behav. in sqrt assumptions 3"; +else error "scriptnew.sml diff.behav. in sqrt assumptions 3"; val (p,_,f,nxt,_,pt) = me nxt p c pt; (*val nxt = ("Check_elementwise",Check_elementwise "Assumptions")*) @@ -468,7 +468,7 @@ val Form' (FormKF (_,_,_,_,ff)) = f; if ff="[x = -12 / 5]" then writeln("there should be L = []\nthere should be L = []\nthere should be L = []\nthere should be L = []\nthere should be L = []\n") -else raise error "diff.behav. in scriptnew.sml; root-eq: L = []"; +else error "diff.behav. in scriptnew.sml; root-eq: L = []"; val asms = get_assumptions_ pt p; if asms = [(str2term "0 <= 9 + 4 * (-12 / 5)",[]), @@ -476,7 +476,7 @@ (str2term "0 <= -3 + -12 / 5", []), (str2term "0 <= (-12 / 5) ^^^ 2 + -3 * (-12 / 5)", []), (str2term "0 <= 6 + -12 / 5", [])] then () -else raise error "scriptnew.sml diff.behav. in sqrt assumptions 4"; +else error "scriptnew.sml diff.behav. in sqrt assumptions 4"; "------------------ script with Map, Subst (biquadr.equ.)---------"; diff -r 95d956108461 -r 460c24a6a6ba test/Tools/isac/OLDTESTS/subp-rooteq.sml --- a/test/Tools/isac/OLDTESTS/subp-rooteq.sml Tue Sep 28 08:58:06 2010 +0200 +++ b/test/Tools/isac/OLDTESTS/subp-rooteq.sml Tue Sep 28 09:06:56 2010 +0200 @@ -134,7 +134,7 @@ val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val Form' (FormKF (_,EdUndef,0,Nundef,res)) = f; if (snd nxt)=End_Proof' andalso res="[x = 1]" then () -else raise error "subp-rooteq.sml: new.behav. in miniscript with mini-subpbl"; +else error "subp-rooteq.sml: new.behav. in miniscript with mini-subpbl"; "---------------- solve_linear as rootpbl -----------------"; @@ -177,7 +177,7 @@ val nxt = ("End_Proof'",End_Proof') : string * tac*) val Form' (FormKF (_,EdUndef,0,Nundef,res)) = f; if (snd nxt)=End_Proof' andalso res="[x = 1]" then () -else raise error "subp-rooteq.sml: new.behav. in solve_linear as rootpbl"; +else error "subp-rooteq.sml: new.behav. in solve_linear as rootpbl"; "---------------- solve_plain_square as rootpbl -----------"; @@ -210,7 +210,7 @@ val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val Form' (FormKF (~1,EdUndef,0,Nundef,res)) = f; if snd nxt=End_Proof' andalso res="[x = -3, x = 3]" then () -else raise error "subp-rooteq.sml: new.behav. in solve_plain_square as rootpbl"; +else error "subp-rooteq.sml: new.behav. in solve_plain_square as rootpbl"; @@ -283,7 +283,7 @@ val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val Form' (FormKF (~1,EdUndef,0,Nundef,res)) = f; if (snd nxt)=End_Proof' andalso res="[x = 4]" then () -else raise error "subp-rooteq.sml: new.behav. in root-eq + subpbl: solve_linear"; +else error "subp-rooteq.sml: new.behav. in root-eq + subpbl: solve_linear"; @@ -357,7 +357,7 @@ val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val Form' (FormKF (~1,EdUndef,0,Nundef,res)) = f; if (snd nxt)=End_Proof' andalso res="[x = -3, x = 3]" then () -else raise error "subp-rooteq.sml: new.behav. in root-eq + subpbl: solve_plain_square"; +else error "subp-rooteq.sml: new.behav. in root-eq + subpbl: solve_plain_square"; writeln (pr_ptree pr_short pt); @@ -420,12 +420,12 @@ val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val (p,_,f,nxt,_,pt) = me nxt p [1] pt; if p = ([13],Res) then () -else raise error ("subp-rooteq.sml: new.behav. in \ +else error ("subp-rooteq.sml: new.behav. in \ \root-eq + subpbl: solve_linear, p ="^(pos'2str p)); val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val Form' (FormKF (~1,EdUndef,0,Nundef,res)) = f; if (snd nxt)=End_Proof' andalso res="[x = 4]" then () -else raise error "subp-rooteq.sml: new.behav. in root-eq + subpbl: solve_plain_square"; +else error "subp-rooteq.sml: new.behav. in root-eq + subpbl: solve_plain_square"; @@ -485,7 +485,7 @@ val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val Form' (FormKF (~1,EdUndef,0,Nundef,res)) = f; if (snd nxt)=End_Proof' andalso res="[x = -3, x = 3]" then () -else raise error "subp-rooteq.sml: new.behav. in root-eq + subpbl: no_met: square"; +else error "subp-rooteq.sml: new.behav. in root-eq + subpbl: no_met: square"; @@ -533,7 +533,7 @@ val (p,_,Form' (FormKF (_,_,_,_,f)),nxt,_,_) = me nxt p c pt; if f="[x = 5]" andalso nxt=("End_Proof'",End_Proof') then () -else raise error "subp-rooteq.sml: new.behav. in no_met in rootpbl -> linear ---"; +else error "subp-rooteq.sml: new.behav. in no_met in rootpbl -> linear ---"; refine fmz ["univariate","equation","test"]; diff -r 95d956108461 -r 460c24a6a6ba test/Tools/isac/OLDTESTS/tacis.sml --- a/test/Tools/isac/OLDTESTS/tacis.sml Tue Sep 28 08:58:06 2010 +0200 +++ b/test/Tools/isac/OLDTESTS/tacis.sml Tue Sep 28 09:06:56 2010 +0200 @@ -76,7 +76,7 @@ val ip = get_pos 1 1; val (Form f, tac, asms) = pt_extract (pt, p); if term2str f = "[x = 1]"andalso p = ([],Res) andalso ip = ([],Res)then()else - raise error "tacis.sml: diff.behav. in fetchProposedTactic autoCalculate"; + error "tacis.sml: diff.behav. in fetchProposedTactic autoCalculate"; @@ -95,7 +95,7 @@ setNextTactic 1 (Rewrite_Set "norm_equation"); val (_, tacis) = get_calc 1; case tacis of [(Rewrite_Set "norm_equation",_,(([1], Res), _))] => () | _ => - raise error "tacis.sml: diff.behav. in setNextTactic -> autoCalculate (1)"; + error "tacis.sml: diff.behav. in setNextTactic -> autoCalculate (1)"; autoCalculate 1 (Step 1); refFormula 1 (get_pos 1 1) (*x + 1 + -1 * 2 = 0*); setNextTactic 1 (Rewrite_Set "Test_simplify"); @@ -124,7 +124,7 @@ val (_, tacis) = get_calc 1; case tacis of [((Apply_Method ["Test","solve_linear"],_,(([3,1], Frm), _)))] =>() | _ => - raise error "tacis.sml: diff.behav. in setNextTactic -> autoCalculate (2)"; + error "tacis.sml: diff.behav. in setNextTactic -> autoCalculate (2)"; (*#######################################################################*) autoCalculate 1 (Step 1); refFormula 1 (get_pos 1 1) (*-1 + x = 0*); @@ -149,7 +149,7 @@ (*case tacis of 040609 suddenly ???! [((Check_Postcond _, _,(([], Res), _)))] =>() | _ => - raise error "tacis.sml: diff.behav. in setNextTactic -> autoCalculate (3)"; + error "tacis.sml: diff.behav. in setNextTactic -> autoCalculate (3)"; #######################################################################*) autoCalculate 1 (Step 1); refFormula 1 (get_pos 1 1) (*[x = 1]*); @@ -157,7 +157,7 @@ val ip = get_pos 1 1; val (Form f, tac, asms) = pt_extract (pt, p); if term2str f = "[x = 1]"andalso p = ([],Res) andalso ip = ([],Res)then()else - raise error "tacis.sml: diff.behav. in setNextTactic -> autoCalculate (4)"; + error "tacis.sml: diff.behav. in setNextTactic -> autoCalculate (4)"; diff -r 95d956108461 -r 460c24a6a6ba test/Tools/isac/ProgLang/calculate.sml --- a/test/Tools/isac/ProgLang/calculate.sml Tue Sep 28 08:58:06 2010 +0200 +++ b/test/Tools/isac/ProgLang/calculate.sml Tue Sep 28 09:06:56 2010 +0200 @@ -33,7 +33,7 @@ val SOME (thmID, thm) = get_calculation_ thy cal t; (HOLogic.dest_Trueprop (prop_of thm); writeln "all thms wrapped by Trueprop") handle TERM _ => - raise error "calculate.sml: get_calculation_ must return Trueprop"; + error "calculate.sml: get_calculation_ must return Trueprop"; @@ -66,7 +66,7 @@ val Some (t,_) = rewrite_ thy tless_true tval_rls true thm t; Sign.string_of_term (sign_of thy) t; (*val it = "#16" : string*) -if it <> "16" then raise error "calculate.sml: new behaviour in calculate_" +if it <> "16" then error "calculate.sml: new behaviour in calculate_" else (); " ================= calculate.sml: aus script ======================== "; @@ -140,7 +140,7 @@ val (p,_,f,nxt,_,pt) = me nxt p [1] pt; (*nxt = ("End_Proof'",End_Proof')*) if f = Form' (FormKF (~1,EdUndef,0,Nundef,"16")) then () -else raise error "calculate.sml: script test_calculate changed behaviour"; +else error "calculate.sml: script test_calculate changed behaviour"; @@ -421,7 +421,7 @@ val Some (t,_) = rewrite_ thy tless_true tval_rls true thm t; Sign.string_of_term (sign_of thy) t; "16"; - if it <> "16" then raise error "calculate.sml: new behaviour in calculate_" + if it <> "16" then error "calculate.sml: new behaviour in calculate_" else (); (*13.9.02 *** calc: operator = pow not defined*) @@ -458,7 +458,7 @@ val Some (str, simpl) = get_pair thy op_ ef arg; if str = "[] from_ [c, c_2, c_3, c_4] occur_exactly_in -1 * (q_0 * L ^^^ 2) / 2 = True" -then () else raise error "calculate.sml get_pair with 3 args:occur_exactly_in"; +then () else error "calculate.sml get_pair with 3 args:occur_exactly_in"; diff -r 95d956108461 -r 460c24a6a6ba test/Tools/isac/ProgLang/listg.sml --- a/test/Tools/isac/ProgLang/listg.sml Tue Sep 28 08:58:06 2010 +0200 +++ b/test/Tools/isac/ProgLang/listg.sml Tue Sep 28 09:06:56 2010 +0200 @@ -16,7 +16,7 @@ atomty thm; val SOME (t',_) = rewrite_ thy dummy_ord Poly_erls false (num_str @{thm nth_Cons_}) t; if term2str t' = "nth_ (3 + - 1) [b, c, d, e]" then () -else raise error "list_rls.sml, nth_ (3 + - 1) [b, c, d, e]"; +else error "list_rls.sml, nth_ (3 + - 1) [b, c, d, e]"; val t = str2term "nth_ 1 [a,b,c,d,e]"; atomty t; @@ -54,20 +54,20 @@ val thm = ("length_Nil_",""); val (ct,asm) = the (rewrite thy' "tless_true" ("tval_rls") false thm ct); if ct="1 + (1 + (1 + 0))"then() -else raise error ("list_rls.sml 1: behaviour of test-expl changed: "^ct); +else error ("list_rls.sml 1: behaviour of test-expl changed: "^ct); val ct = "length_ [1,1,1]"; val rls = "list_rls"; val (ct,asm) = the (rewrite_set thy' false rls ct); if ct="3"then() -else raise error ("list_rls.sml 2: behaviour of test-expl changed: "^ct); +else error ("list_rls.sml 2: behaviour of test-expl changed: "^ct); val ct = "length_ [1,1,1]"; val t = (term_of o the o (parse ListG.thy)) ct; val t = eval_listexpr_ ListG.thy list_rls t; case t of Free ("3",_) => () -| _ => raise error ("list-rls.sml 3: behaviour of test-expl changed: "^ct); +| _ => error ("list-rls.sml 3: behaviour of test-expl changed: "^ct); diff -r 95d956108461 -r 460c24a6a6ba test/Tools/isac/ProgLang/rewrite.sml --- a/test/Tools/isac/ProgLang/rewrite.sml Tue Sep 28 08:58:06 2010 +0200 +++ b/test/Tools/isac/ProgLang/rewrite.sml Tue Sep 28 09:06:56 2010 +0200 @@ -203,21 +203,21 @@ val SOME (t', _) = rewrite_terms_ thy dummy_ord Erls equs t; writeln "----------- rewrite_terms_ 1---------------------------"; if term2str t' = "M_b 0 = -1 * q_0 * 0 ^^^ 2 / 2 + 0 * c + c_2" then () -else raise error "rewrite.sml rewrite_terms_ [x = 0]"; +else error "rewrite.sml rewrite_terms_ [x = 0]"; val equs = [str2term "M_b 0 = 0"]; val t = str2term "M_b 0 = -1 * q_0 * 0 ^^^ 2 / 2 + 0 * c + c_2"; val SOME (t', _) = rewrite_terms_ thy dummy_ord Erls equs t; writeln "----------- rewrite_terms_ 2---------------------------"; if term2str t' = "0 = -1 * q_0 * 0 ^^^ 2 / 2 + 0 * c + c_2" then () -else raise error "rewrite.sml rewrite_terms_ [M_b 0 = 0]"; +else error "rewrite.sml rewrite_terms_ [M_b 0 = 0]"; val equs = [str2term "x = 0", str2term"M_b 0 = 0"]; val t = str2term "M_b x = -1 * q_0 * x ^^^ 2 / 2 + x * c + c_2"; val SOME (t', _) = rewrite_terms_ thy dummy_ord Erls equs t; writeln "----------- rewrite_terms_ 3---------------------------"; if term2str t' = "0 = -1 * q_0 * 0 ^^^ 2 / 2 + 0 * c + c_2" then () -else raise error "rewrite.sml rewrite_terms_ [x = 0, M_b 0 = 0]"; +else error "rewrite.sml rewrite_terms_ [x = 0, M_b 0 = 0]"; "----------- rewrite_inst_ bdvs -------------------------"; @@ -240,7 +240,7 @@ false bdvs (num_str @{separate_bdvs_add) t; (writeln o term2str) t; if term2str t = "L * c_3 + c_4 = 0 + -1 * (-1 * (q_0 * L ^^^ 2) / 2)" -then () else raise error "rewrite.sml rewrite_inst_ bdvs"; +then () else error "rewrite.sml rewrite_inst_ bdvs"; trace_rewrite:=true; trace_rewrite:=false;--------------------------------------------*) diff -r 95d956108461 -r 460c24a6a6ba test/Tools/isac/ProgLang/scrtools.sml --- a/test/Tools/isac/ProgLang/scrtools.sml Tue Sep 28 08:58:06 2010 +0200 +++ b/test/Tools/isac/ProgLang/scrtools.sml Tue Sep 28 09:06:56 2010 +0200 @@ -83,7 +83,7 @@ val ((pt,p),_) = get_calc 1; show_pt pt; if existpt' ([1], Frm) pt then () -else raise error "scrtools.sml: test-script test_interSteps_1 doesnt work"; +else error "scrtools.sml: test-script test_interSteps_1 doesnt work"; "-------- test the same called by interSteps norm_Poly -----------"; @@ -108,7 +108,7 @@ interSteps 1 ([1], Res); val ((pt,p),_) = get_calc 1; show_pt pt; if existpt' ([1,4], Res) pt then () -else raise error "scrtools.sml: auto-generated norm_Poly doesnt work"; +else error "scrtools.sml: auto-generated norm_Poly doesnt work"; @@ -174,7 +174,7 @@ val (Form form, SOME tac, asm) = pt_extract (pt, ([2], Res)); case (term2str form, tac, terms2strs asm) of ("a", Check_Postcond ["polynomial", "simplification"], []) => () - | _ => raise error "scrtools.sml: auto-generated norm_Rational doesnt work"; + | _ => error "scrtools.sml: auto-generated norm_Rational doesnt work"; @@ -186,7 +186,7 @@ writeln(term2str auto_script); if contain_bdv (get_rules rls) then () -else raise error "scrtools.sml: contain_bdv doesnt work for 'integration'"; +else error "scrtools.sml: contain_bdv doesnt work for 'integration'"; two_scr_arg auto_script; init_istate (Rewrite_Set_Inst (["(bdv, x)"], "integration_rules")) diff -r 95d956108461 -r 460c24a6a6ba test/Tools/isac/ProgLang/termC.sml --- a/test/Tools/isac/ProgLang/termC.sml Tue Sep 28 08:58:06 2010 +0200 +++ b/test/Tools/isac/ProgLang/termC.sml Tue Sep 28 09:06:56 2010 +0200 @@ -21,17 +21,17 @@ "----------- inst_bdv -----------------------------------"; if (term2str o prop_of o num_str) @{thm d1_isolate_add2} = "~ ?bdv occurs_in ?a ==> (?a + ?bdv = 0) = (?bdv = -1 * ?a)" then () -else raise error "termC.sml d1_isolate_add2"; +else error "termC.sml d1_isolate_add2"; val subst = [(str2term "bdv", str2term "x")]; val t = (norm o #prop o rep_thm) (num_str @{thm d1_isolate_add2}); val t' = inst_bdv subst t; if term2str t' = "~ x occurs_in ?a ==> (?a + x = 0) = (x = -1 * ?a)" then () -else raise error "termC.sml inst_bdv 1"; +else error "termC.sml inst_bdv 1"; if string_of_thm (num_str @{thm separate_bdvs_add}) = "\"[] from_ [?bdv_1.0, ?bdv_2.0, ?bdv_3.0, ?bdv_4.0] occur_exactly_in ?a\n\ \ ==> (?a + ?b = ?c) = (?b = ?c + -1 * ?a)\"" then () -else raise error "termC.sml separate_bdvs_add"; +else error "termC.sml separate_bdvs_add"; val subst = [(str2term"bdv_1",str2term"c"), (str2term"bdv_2",str2term"c_2"), (str2term"bdv_3",str2term"c_3"), @@ -40,7 +40,7 @@ val t' = inst_bdv subst t; if term2str t' = "[] from_ [c, c_2, c_3, c_4] occur_exactly_in ?a\n\ \==> (?a + ?b = ?c) = (?b = ?c + -1 * ?a)" then () -else raise error "termC.sml inst_bdv 2"; +else error "termC.sml inst_bdv 2"; "----------- subst_atomic_all ---------------------------"; @@ -52,13 +52,13 @@ val (all_Free_subst, t') = subst_atomic_all env t; if all_Free_subst andalso term2str t' = "tl [c, c_2] from_ [c, c_2] occur_exactly_in nth_ 1 [c_2 = 0, c + c_2 = 1]" then () -else raise error "termC.sml subst_atomic_all should be 'true'"; +else error "termC.sml subst_atomic_all should be 'true'"; val (all_Free_subst, t') = subst_atomic_all (tl env) t; if not all_Free_subst andalso term2str t' = "tl vs_ from_ vs_ occur_exactly_in nth_ 1 [c_2 = 0, c + c_2 = 1]" then () -else raise error "termC.sml subst_atomic_all should be 'false'"; +else error "termC.sml subst_atomic_all should be 'false'"; ===== inhibit exn ============================================================*) diff -r 95d956108461 -r 460c24a6a6ba test/Tools/isac/ProgLang/tools.sml --- a/test/Tools/isac/ProgLang/tools.sml Tue Sep 28 08:58:06 2010 +0200 +++ b/test/Tools/isac/ProgLang/tools.sml Tue Sep 28 09:06:56 2010 +0200 @@ -21,7 +21,7 @@ "----------- fun matchsub ----------------------------------------"; "----------- fun matchsub ----------------------------------------"; if matchsub thy (str2term "(a + (b + c))") (str2term "?x + (?y + ?z)") -then () else raise error "tools.sml matchsub a + (b + c)"; +then () else error "tools.sml matchsub a + (b + c)"; if matchsub thy (str2term "(a + (b + c)) + d") (str2term "?x + (?y + ?z)") -then () else raise error "tools.sml matchsub (a + (b + c)) + d"; +then () else error "tools.sml matchsub (a + (b + c)) + d"; diff -r 95d956108461 -r 460c24a6a6ba test/Tools/isac/xmlsrc/mathml.sml --- a/test/Tools/isac/xmlsrc/mathml.sml Tue Sep 28 08:58:06 2010 +0200 +++ b/test/Tools/isac/xmlsrc/mathml.sml Tue Sep 28 09:06:56 2010 +0200 @@ -31,7 +31,7 @@ "--------- encode ^^^ -> ^ ---------------------------------------"; val str = "a^^^2+b^^^2=c^^^2"; if decode str = "a^2+b^2=c^2" then () -else raise error "mathml.sml: diff.behav. in encode ^^^ -> ^"; +else error "mathml.sml: diff.behav. in encode ^^^ -> ^"; "--------- encode < -> < and > -> > --------------------------"; "--------- encode < -> < and > -> > --------------------------"; @@ -39,7 +39,7 @@ val str = "?bdv occurs_in ?b; 0 < ?n |] ==> ?a / ?b ^ ?n = ?a * ?b ^ - ?n"; if decode str = "?bdv occurs_in ?b; 0 < ?n |] ==> ?a / ?b ^ ?n = ?a * ?b ^ - ?n" -then () else raise error "mathml.sml: diff.behav. in encode '<' and '>'"; +then () else error "mathml.sml: diff.behav. in encode '<' and '>'"; "----- check 'manually' the xml-output of calling functions ------"; formula2xml 1 (str2term ) diff -r 95d956108461 -r 460c24a6a6ba test/Tools/isac/xmlsrc/thy-hierarchy.sml --- a/test/Tools/isac/xmlsrc/thy-hierarchy.sml Tue Sep 28 08:58:06 2010 +0200 +++ b/test/Tools/isac/xmlsrc/thy-hierarchy.sml Tue Sep 28 09:06:56 2010 +0200 @@ -134,7 +134,7 @@ case get_the ["IsacKnowledge", "Test", "Rulesets", "Test_simplify"] of Hrls {guh = "thy_Test-rls-Test_simplify",thy_rls = ("Test", _), mathauthors = _,coursedesign = _} => () - | _ => raise error "thy-hierarchy.sml: [IsacKnowledge,Test,Rulesets]"; + | _ => error "thy-hierarchy.sml: [IsacKnowledge,Test,Rulesets]"; *) @@ -194,12 +194,12 @@ case get_the ["IsacKnowledge", "Biegelinie", "Theorems"] of Html {mathauthors = ["Walther Neuper 2005 supported by a grant from NMI Austria"],...}=>() - | _ => raise error "thy-hierarchy.sml: store_isa overwritten"; + | _ => error "thy-hierarchy.sml: store_isa overwritten"; case get_the ["IsacKnowledge","Biegelinie","Theorems","Belastung_Querkraft"] of Hthm {mathauthors = ["Walther Neuper 2005 supported by a grant from NMI Austria"],...}=>() - | _ => raise error "thy-hierarchy.sml: store_isa overwritten"; + | _ => error "thy-hierarchy.sml: store_isa overwritten"; (* print_depth 7;