1.1 --- a/test/Tools/isac/Knowledge/diffapp.sml Tue Sep 28 08:58:06 2010 +0200
1.2 +++ b/test/Tools/isac/Knowledge/diffapp.sml Tue Sep 28 09:06:56 2010 +0200
1.3 @@ -280,7 +280,7 @@
1.4 val (p,_,f,nxt,_,pt) = me nxt p c pt;
1.5 val (p,_,f,nxt,_,pt) = me nxt p c pt;
1.6 case nxt of (_, Specify_Method ["DiffApp","max_by_calculus"]) => ()
1.7 - | _ => raise error "diffapp.sml: max-exp me, nxt = Specify_Method";
1.8 + | _ => error "diffapp.sml: max-exp me, nxt = Specify_Method";
1.9
1.10 val oris = fst3 (get_obj g_origin pt (fst p)); writeln(oris2str oris);
1.11 val pits = get_obj g_pbl pt (fst p); writeln(itms2str_ ctxt pits);
1.12 @@ -291,7 +291,7 @@
1.13 val (p,_,f,nxt,_,pt) = me nxt p c pt;
1.14 val (p,_,f,nxt,_,pt) = me nxt p c pt;
1.15 case nxt of (_,Apply_Method ["DiffApp","max_by_calculus"] ) => ()
1.16 - | _ => raise error "diffapp.sml: max-exp me, nxt = Apply_Method";
1.17 + | _ => error "diffapp.sml: max-exp me, nxt = Apply_Method";
1.18 val (p,_,f,nxt,_,pt) = me nxt p c pt;
1.19
1.20 (*since 0508 Apply_Method does the 1st step, if NONE init_form -------------
1.21 @@ -302,7 +302,7 @@
1.22 (*val nxt = ("Model_Problem",Model_Problem ["by_explicit","make","function"])*)
1.23 ----------------------------------------------------------------------------*)
1.24 case nxt of (_, Model_Problem(*["by_explicit", "make", "function"]*)) => ()
1.25 - | _ => raise error "diffapp.sml: max-exp me, nxt = Model_Problem";
1.26 + | _ => error "diffapp.sml: max-exp me, nxt = Model_Problem";
1.27
1.28 val (p,_,f,nxt,_,pt) = me nxt p c pt;
1.29 val (p,_,f,nxt,_,pt) = me nxt p c pt;
1.30 @@ -318,7 +318,7 @@
1.31 val (p,_,f,nxt,_,pt) = me nxt p c pt;
1.32 val (p,_,f,nxt,_,pt) = me nxt p c pt;
1.33 case nxt of (_, Apply_Method ["DiffApp", "make_fun_by_explicit"]) => ()
1.34 - | _ => raise error "diffapp.sml: max-exp Apply_Method ([1], Met) ";
1.35 + | _ => error "diffapp.sml: max-exp Apply_Method ([1], Met) ";
1.36
1.37 (*----since WN050901 (ie. corr. mathengine#nxt_specify_ ..nxt_spec Pbl->p_
1.38 we get at ...
1.39 @@ -429,12 +429,12 @@
1.40 writeln (itms2str_ ctxt mits);
1.41 (*
1.42 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 ()
1.43 - else raise error "diffapp.sml: diff.behav. in autoCalc .. scripts for max 1";
1.44 + else error "diffapp.sml: diff.behav. in autoCalc .. scripts for max 1";
1.45 *)
1.46 (*FIXME: the environments contain identifers, and NOT values ?!?!?*)
1.47 (* WN051209 while extending 'fun step' for initac, this became better ...
1.48 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 ()
1.49 - else raise error "diffapp.sml: diff.behav. in autoCalc .. scripts for max 1";
1.50 + else error "diffapp.sml: diff.behav. in autoCalc .. scripts for max 1";
1.51 *)
1.52
1.53
1.54 @@ -478,7 +478,7 @@
1.55 "(hd o filterVar A) [A = a * b, (a / 2) ^^^ 2 + (b / 2) ^^^ 2 = r ^^^ 2]";
1.56 val SOME (s',_) = rewrite_set_ thy false list_rls s;
1.57 val s'' = term2str s';
1.58 -if s''="A = a * b" then () else raise error "new behaviour with list_rls 1.1.";
1.59 +if s''="A = a * b" then () else error "new behaviour with list_rls 1.1.";
1.60 val env = env @ [(str2term "e_::bool",str2term "A = a * b")];
1.61
1.62 (*--- 2.line: condition alone ---*)
1.63 @@ -488,7 +488,7 @@
1.64 "1 < length_ [A = a * b, (a / 2) ^^^ 2 + (b / 2) ^^^ 2 = r ^^^ 2]";
1.65 val SOME (s',_) = rewrite_set_ thy false list_rls s;
1.66 val s'' = term2str s';
1.67 -if s''="True" then () else raise error "new behaviour with list_rls 1.2.";
1.68 +if s''="True" then () else error "new behaviour with list_rls 1.2.";
1.69
1.70 (*--- 2.line in script ---*)
1.71 val t = str2term
1.72 @@ -509,7 +509,7 @@
1.73 "SubProblem (Reals_, [make, function], [no_met])\n\
1.74 \ [REAL A, REAL b,\n\
1.75 \ BOOL_LIST [A = a * b, (a / 2) ^^^ 2 + (b / 2) ^^^ 2 = r ^^^ 2]]" then ()
1.76 -else raise error "new behaviour with list_rls 1.3.";
1.77 +else error "new behaviour with list_rls 1.3.";
1.78 val env = env @ [(str2term "t_::bool",
1.79 str2term "A = (2*sqrt(r^^^2-(b/2)^^^2)) * b")];
1.80
1.81 @@ -544,7 +544,7 @@
1.82 "(hd o filterVar b) [A = a * b, (a / 2) ^^^ 2 + (b / 2) ^^^ 2 = r ^^^ 2]";
1.83 val SOME (t',_) = rewrite_set_ thy false list_rls t;
1.84 val s' = term2str t';
1.85 -if s' = "A = a * b" then () else raise error "new behaviour with list_rls 2.1";
1.86 +if s' = "A = a * b" then () else error "new behaviour with list_rls 2.1";
1.87 val env = env @ [(str2term "h_::bool", str2term s')];
1.88
1.89 (*--- 2.line in script ---*)
1.90 @@ -559,7 +559,7 @@
1.91 val SOME (t',_) = rewrite_set_ thy false list_rls t;
1.92 val s' = term2str t';
1.93 if s' = "(a / 2) ^^^ 2 + (b / 2) ^^^ 2 = r ^^^ 2" then ()
1.94 -else raise error "new behaviour with list_rls 2.2";
1.95 +else error "new behaviour with list_rls 2.2";
1.96 val env = env @ [(str2term "e_1::bool", str2term s')];
1.97
1.98 (*--- 3.line in script ---*)
1.99 @@ -569,7 +569,7 @@
1.100 val t = str2term "dropWhile (ident A) (Vars (A = a * b))";
1.101 val SOME (t',_) = rewrite_set_ thy false list_rls t;
1.102 val s' = term2str t';
1.103 -if s' = "[a, b]" then () else raise error "new behaviour with list_rls 2.3";
1.104 +if s' = "[a, b]" then () else error "new behaviour with list_rls 2.3";
1.105 val env = env @ [(str2term "vs_::real list", str2term s')];
1.106
1.107 (*--- 4.line in script ---*)
1.108 @@ -579,7 +579,7 @@
1.109 val t = str2term "hd (dropWhile (ident b) [a, b])";
1.110 val SOME (t',_) = rewrite_set_ thy false list_rls t;
1.111 val s' = term2str t';
1.112 -if s' = "a" then () else raise error "new behaviour with list_rls 2.4.";
1.113 +if s' = "a" then () else error "new behaviour with list_rls 2.4.";
1.114 val env = env @ [(str2term "v_1::real", str2term s')];
1.115
1.116 (*--- 5.line in script ---*)
1.117 @@ -603,7 +603,7 @@
1.118 val SOME (t',_) = rewrite_set_ thy false list_rls t;
1.119 val s' = term2str t';
1.120 if s' = "Substitute [a = 2 * sqrt (r ^^^ 2 - (b / 2) ^^^ 2)] (A = a * b)"
1.121 -then () else raise error "new behaviour with list_rls 2.6.";
1.122 +then () else error "new behaviour with list_rls 2.6.";
1.123
1.124
1.125 "---------------------- 2.5.03: Make_fun_by_new_variable -----------------";
1.126 @@ -642,7 +642,7 @@
1.127 val SOME (t',_) = rewrite_set_ thy false list_rls t;
1.128 trace_rewrite:=false;
1.129 val s' = term2str t';
1.130 -if s' = "A = a * b" then() else raise error "new behaviour with list_rls 3.1.";
1.131 +if s' = "A = a * b" then() else error "new behaviour with list_rls 3.1.";
1.132 val env = env @ [(str2term "h_::bool", str2term s')];
1.133
1.134 (*--- 2.line in script ---*)
1.135 @@ -655,7 +655,7 @@
1.136 val SOME (t',_) = rewrite_set_ thy false list_rls t;
1.137 val s' = term2str t';
1.138 if s' = "[a / 2 = r * sin alpha, b / 2 = r * cos alpha]"
1.139 -then () else raise error "new behaviour with list_rls 3.2.";
1.140 +then () else error "new behaviour with list_rls 3.2.";
1.141 val env = env @ [(str2term "es_::bool list", str2term s')];
1.142
1.143 (*--- 3.line in script ---*)
1.144 @@ -665,7 +665,7 @@
1.145 val t = str2term "dropWhile (ident A) (Vars (A = a * b))";
1.146 val SOME (t',_) = rewrite_set_ thy false list_rls t;
1.147 val s' = term2str t';
1.148 -if s' = "[a, b]" then () else raise error "new behaviour with list_rls 3.3.";
1.149 +if s' = "[a, b]" then () else error "new behaviour with list_rls 3.3.";
1.150 val env = env @ [(str2term "vs_::real list", str2term s')];
1.151
1.152 (*--- 4.line in script ---*)
1.153 @@ -675,7 +675,7 @@
1.154 val t = str2term "nth_ 1 [a, b]";
1.155 val SOME (t',_) = rewrite_set_ thy false list_rls t;
1.156 val s' = term2str t';
1.157 -if s' = "a" then () else raise error "new behaviour with list_rls 3.4.";
1.158 +if s' = "a" then () else error "new behaviour with list_rls 3.4.";
1.159 val env = env @ [(str2term "v_1", str2term s')];
1.160
1.161 (*--- 5.line in script ---*)
1.162 @@ -685,7 +685,7 @@
1.163 val t = str2term "nth_ 2 [a, b]";
1.164 val SOME (t',_) = rewrite_set_ thy false list_rls t;
1.165 val s' = term2str t';
1.166 -if s' = "b" then () else raise error "new behaviour with list_rls 3.5.";
1.167 +if s' = "b" then () else error "new behaviour with list_rls 3.5.";
1.168 val env = env @ [(str2term "v_2", str2term s')];
1.169
1.170 (*--- 6.line in script ---*)
1.171 @@ -697,7 +697,7 @@
1.172 val SOME (t',_) = rewrite_set_ thy false list_rls t;
1.173 val s' = term2str t';
1.174 if s' = "a / 2 = r * sin alpha" then ()
1.175 -else raise error "new behaviour with list_rls 3.6.";
1.176 +else error "new behaviour with list_rls 3.6.";
1.177 val e_1 = str2term "e_1::bool";
1.178 val env = env @ [(e_1, str2term s')];
1.179
1.180 @@ -710,7 +710,7 @@
1.181 val SOME (t',_) = rewrite_set_ thy false list_rls t;
1.182 val s' = term2str t';
1.183 if s' = "b / 2 = r * cos alpha" then ()
1.184 -else raise error "new behaviour with list_rls 3.7.";
1.185 +else error "new behaviour with list_rls 3.7.";
1.186 val env = env @ [(str2term "e_2::bool", str2term s')];
1.187
1.188 (*--- 8.line in script ---*)
1.189 @@ -744,7 +744,7 @@
1.190 val s'' = term2str s';
1.191 if s'' =
1.192 "Substitute [a = 2 * r * sin alpha, b = 2 * r * cos alpha] (A = a * b)"
1.193 -then () else raise error "new behaviour with list_rls 3.10.";
1.194 +then () else error "new behaviour with list_rls 3.10.";
1.195
1.196
1.197