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.";