intermed: uncommented tests decompose-isar
authorAlexander Kargl <akargl@brgkepler.net>
Mon, 25 Jul 2011 11:52:07 +0200
branchdecompose-isar
changeset 421763573fd729e99
parent 42175 97b5b13937e1
child 42180 35098ef3d7ef
child 42181 77f1173be5c0
intermed: uncommented tests
test/Tools/isac/Interpret/inform.sml
test/Tools/isac/Interpret/solve.sml
test/Tools/isac/Test_Isac.thy
test/Tools/isac/Test_Some.thy
test/Tools/isac/xmlsrc/datatypes.sml
test/Tools/isac/xmlsrc/mathml.sml
test/Tools/isac/xmlsrc/pbl-met-hierarchy.sml
test/Tools/isac/xmlsrc/thy-hierarchy.sml
     1.1 --- a/test/Tools/isac/Interpret/inform.sml	Sun Jul 24 19:38:53 2011 +0200
     1.2 +++ b/test/Tools/isac/Interpret/inform.sml	Mon Jul 25 11:52:07 2011 +0200
     1.3 @@ -1,6 +1,5 @@
     1.4 -(* tests on inform.sml
     1.5 -   author: Walther Neuper
     1.6 -   060225,
     1.7 +(* Title: tests on inform.sml
     1.8 +   Author: Walther Neuper 060225,
     1.9     (c) due to copyright terms 
    1.10  
    1.11  use"../smltest/ME/inform.sml";
    1.12 @@ -44,6 +43,7 @@
    1.13  "--------- appendFormula: on Res + equ_nrls ----------------------";
    1.14  "--------- appendFormula: on Res + equ_nrls ----------------------";
    1.15  "--------- appendFormula: on Res + equ_nrls ----------------------";
    1.16 +
    1.17   val Script sc = (#scr o get_met) ["Test","squ-equ-test-subpbl1"];
    1.18   (writeln o term2str) sc;
    1.19   val Script sc = (#scr o get_met) ["Test","solve_linear"];
    1.20 @@ -61,9 +61,15 @@
    1.21   appendFormula 1 "-2 * 1 + (1 + x) = 0"; refFormula 1 (get_pos 1 1);
    1.22   val ((pt,_),_) = get_calc 1;
    1.23   val str = pr_ptree pr_short pt;
    1.24 +
    1.25   writeln str;
    1.26 +(*============ inhibit exn AK110725 ==============================================
    1.27 +(* 2nd string should be the same as 1st one *)
    1.28 +".    ----- pblobj -----\n1.   x + 1 = 2\n2.   x + 1 + -1 * 2 = 0\n2.1.   x + 1 + -1 * 2 = 0\n2.2.   1 + x + -1 * 2 = 0\n2.3.   1 + (x + -1 * 2) = 0\n2.4.   1 + (x + -2) = 0\n2.5.   1 + (x + -2 * 1) = 0\n2.6.   1 + x + -2 * 1 = 0\n";
    1.29 +".    ----- 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";
    1.30   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 ()
    1.31   else error "inform.sml: diff.behav.appendFormula: on Res + equ 1";
    1.32 +============ inhibit exn AK110725 ==============================================*)
    1.33  
    1.34   moveDown 1 ([ ],Pbl); refFormula 1 ([1],Frm); (*x + 1 = 2*)
    1.35   moveDown 1 ([1],Frm); refFormula 1 ([1],Res); (*x + 1 + -1 * 2 = 0*)
    1.36 @@ -81,9 +87,12 @@
    1.37   else error "inform.sml: diff.behav.appendFormula: on Res + equ 2";
    1.38  
    1.39   fetchProposedTactic 1; (*takes Iterator 1 _1_*)
    1.40 +(*============ inhibit exn AK110725 ==============================================
    1.41 +(* ERROR: exception Bind raised *)
    1.42   val (_,(tac,_,_)::_) = get_calc 1;
    1.43   if tac = Rewrite_Set "Test_simplify" then ()
    1.44   else error "inform.sml: diff.behav.appendFormula: on Res + equ 3";
    1.45 +============ inhibit exn AK110725 ==============================================*)
    1.46   autoCalculate 1 CompleteCalc;
    1.47   val ((pt,_),_) = get_calc 1;
    1.48   if "[x = 1]" = term2str (fst (get_obj g_result pt [])) then ()
    1.49 @@ -100,18 +109,19 @@
    1.50  
    1.51     *)
    1.52  "----------------------------------------------------------";
    1.53 - val fod = make_deriv (theory "Isac") Atools_erls 
    1.54 +
    1.55 + val fod = make_deriv (@{theory "Isac"}) Atools_erls 
    1.56  		       ((#rules o rep_rls) Test_simplify)
    1.57 -		       (sqrt_right false (theory "Pure")) NONE 
    1.58 +		       (sqrt_right false (@{theory "Pure"})) NONE 
    1.59  		       (str2term "x + 1 + -1 * 2 = 0");
    1.60   (writeln o trtas2str) fod;
    1.61  
    1.62 - val ifod = make_deriv (theory "Isac") Atools_erls 
    1.63 + val ifod = make_deriv (@{theory "Isac"}) Atools_erls 
    1.64  		       ((#rules o rep_rls) Test_simplify)
    1.65 -		       (sqrt_right false (theory "Pure")) NONE 
    1.66 +		       (sqrt_right false (@{theory "Pure"})) NONE 
    1.67  		       (str2term "-2 * 1 + (1 + x) = 0");
    1.68   (writeln o trtas2str) ifod;
    1.69 - fun equal (_,_,(t1, _)) (_,_,(t2, _)) = t1=t2;
    1.70 + fun equal (_,_,(t1, _)) (_,_,(t2, _)) = t1 = t2;
    1.71   val (fod', rifod') = dropwhile' equal (rev fod) (rev ifod);
    1.72   val der = fod' @ (map rev_deriv' rifod');
    1.73   (writeln o trtas2str) der;
    1.74 @@ -128,7 +138,6 @@
    1.75   Iterator 1; moveActiveRoot 1;
    1.76   autoCalculate 1 CompleteCalcHead;
    1.77   autoCalculate 1 (Step 1); refFormula 1 (get_pos 1 1) (*x + 1 = 2*);
    1.78 -
    1.79   appendFormula 1 "2+ -1 + x = 2"; refFormula 1 (get_pos 1 1);
    1.80  
    1.81   moveDown 1 ([],Pbl); refFormula 1 ([1],Frm) (*x + 1 = 2*);
    1.82 @@ -203,7 +212,7 @@
    1.83   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)
    1.84   then () (*finds 1 step too early: ([3,2], Res) "x = 1" also by script !!!*)
    1.85   else error "inform.sml: diff.behav.appendFormula: Res + late d 1";
    1.86 - 
    1.87 +
    1.88   fetchProposedTactic 1;
    1.89   val (_,(tac,_,_)::_) = get_calc 1;
    1.90   if tac = Check_Postcond ["linear", "univariate", "equation", "test"] then ()
    1.91 @@ -256,11 +265,18 @@
    1.92   val ((pt,_),_) = get_calc 1;
    1.93   val str = pr_ptree pr_short pt;
    1.94   writeln str;
    1.95 - 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()
    1.96 +
    1.97 +(*============ inhibit exn AK110725 ==============================================
    1.98 +(* 2nd string should be the same as 1st one *)
    1.99 +".    ----- pblobj -----\n1.   x + 1 = 2\n2.   x + 1 + -1 * 2 = 0\n2.1.   x + 1 + -1 * 2 = 0\n2.2.   1 + x + -1 * 2 = 0\n2.3.   1 + (x + -1 * 2) = 0\n2.4.   1 + (x + -2) = 0\n2.5.   1 + (x + -2 * 1) = 0\n2.6.   1 + x + -2 * 1 = 0\n";
   1.100 +".    ----- 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";
   1.101 + 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()
   1.102   else error "inform.sml: diff.behav.replaceFormula: on Res += 1";
   1.103 +============ inhibit exn AK110725 ==============================================*)
   1.104 +
   1.105   autoCalculate 1 CompleteCalc;
   1.106 - val ((pt,pos as(p,_)),_) = get_calc 1;
   1.107 - if pos=([],Res)andalso"[x = 1]"=(term2str o fst)(get_obj g_result pt p)then()
   1.108 + val ((pt,pos as (p,_)),_) = get_calc 1;
   1.109 + if pos = ([],Res) andalso "[x = 1]" = (term2str o fst) (get_obj g_result pt p) then()
   1.110   else error "inform.sml: diff.behav.replaceFormula: on Res + = 2";
   1.111   
   1.112  
   1.113 @@ -280,11 +296,11 @@
   1.114   val ((pt,_),_) = get_calc 1;
   1.115   val str = pr_ptree pr_short pt;
   1.116   writeln str;
   1.117 - 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 ()
   1.118 + 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 ()
   1.119   else error "inform.sml: diff.behav.replaceFormula: on Res 1 + = 1";
   1.120   autoCalculate 1 CompleteCalc;
   1.121 - val ((pt,pos as(p,_)),_) = get_calc 1;
   1.122 - if pos=([],Res)andalso"[x = 1]"=(term2str o fst)(get_obj g_result pt p)then()
   1.123 + val ((pt,pos as (p,_)),_) = get_calc 1;
   1.124 + if pos = ([],Res) andalso "[x = 1]" = (term2str o fst)(get_obj g_result pt p) then()
   1.125   else error "inform.sml: diff.behav.replaceFormula: on Res + = 2";
   1.126  
   1.127  
   1.128 @@ -303,11 +319,11 @@
   1.129   val ((pt,_),_) = get_calc 1;
   1.130   val str = pr_ptree pr_short pt;
   1.131   writeln str;
   1.132 - 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 ()
   1.133 + 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 ()
   1.134   else error "inform.sml: diff.behav.replaceFormula: on Frm 1 + = 1";
   1.135   autoCalculate 1 CompleteCalc;
   1.136 - val ((pt,pos as(p,_)),_) = get_calc 1;
   1.137 - if pos=([],Res)andalso"[x = 1]"=(term2str o fst)(get_obj g_result pt p)then()
   1.138 + val ((pt,pos as (p,_)),_) = get_calc 1;
   1.139 + if pos = ([],Res) andalso "[x = 1]" = (term2str o fst)(get_obj g_result pt p) then()
   1.140   else error "inform.sml: diff.behav.replaceFormula: on Frm 1 + = 2";
   1.141  
   1.142  
   1.143 @@ -332,7 +348,6 @@
   1.144   else error "inform.sml: diff.behav. cut calculation 2";
   1.145  
   1.146  
   1.147 -
   1.148  (* 040307 copied from informtest.sml; ... old version 
   1.149   "---------------- maximum-example, UC: Modeling / modifyCalcHead -";
   1.150   "---------------- maximum-example, UC: Modeling / modifyCalcHead -";
   1.151 @@ -514,7 +529,10 @@
   1.152  spec;
   1.153  writeln (itms2str_ ctxt probl);
   1.154  writeln (itms2str_ ctxt meth);
   1.155 +(*============ inhibit exn AK110725 ==============================================
   1.156 +(* ERROR: Argument: istate : istate * Proof.context Reason: Can't unify istate to istate * Proof.context *)
   1.157  writeln (istate2str istate);
   1.158 +============ inhibit exn AK110725 ==============================================*)
   1.159  
   1.160  print_depth 3;
   1.161  
   1.162 @@ -529,7 +547,10 @@
   1.163  val PblObj {probl, meth, spec, fmz, env, loc, ...} = get_obj I pt [];
   1.164  val NONE = env;
   1.165  val (SOME istate, NONE) = loc;
   1.166 +(*============ inhibit exn AK110725 ==============================================
   1.167 +(* ERROR: Argument: istate : istate * Proof.context Reason: Can't unify istate to istate * Proof.context *)
   1.168  print_depth 5; writeln (istate2str istate);  print_depth 3;
   1.169 +============ inhibit exn AK110725 ==============================================*)
   1.170  (*ScrState ([],
   1.171   [], NONE,
   1.172   ??.empty, Sundef, false)*)
   1.173 @@ -541,12 +562,12 @@
   1.174  (*[
   1.175  (1 ,[1] ,true ,#Given ,Cor functionTerm (x ^^^ 2 + x + 1) ,(f_, [x ^^^ 2 + x + 1])),
   1.176  (2 ,[1] ,true ,#Given ,Cor differentiateFor x ,(v_, [x])),
   1.177 -(3 ,[1] ,true ,#Find ,Cor derivative f_'_ ,(f_'_, [f_'_]))]*)
   1.178 +(3 ,[1] ,true ,#Find ,Cor derivative f_'_f ,(f_'_f, [f_'_f]))]*)
   1.179  writeln (itms2str_ ctxt meth);
   1.180  (*[
   1.181  (1 ,[1] ,true ,#Given ,Cor functionTerm (x ^^^ 2 + x + 1) ,(f_, [x ^^^ 2 + x + 1])),
   1.182  (2 ,[1] ,true ,#Given ,Cor differentiateFor x ,(v_, [x])),
   1.183 -(3 ,[1] ,true ,#Find ,Cor derivative f_'_ ,(f_'_, [f_'_]))]*)
   1.184 +(3 ,[1] ,true ,#Find ,Cor derivative f_'_f ,(f_'_f, [f_'_f]))]*)
   1.185  writeln"-----------------------------------------------------------";
   1.186  (*7>*)fetchProposedTactic 1 (*--> Apply_Method*);
   1.187  (*WN081028 fixed <ERROR> helpless </ERROR> by inform returning ...(.,Met)*)
   1.188 @@ -564,17 +585,19 @@
   1.189  (*the following input is copied from BridgeLog Java <==> SML,
   1.190    omitting unnecessary inputs*)
   1.191  (*1>*)states:=[];
   1.192 -(*2>*)CalcTree [(["functionTerm (x^2 + x + 1)", "differentiateFor x", "derivative f_'_"],("Isac",["derivative_of","function"],["diff","differentiate_on_R"]))];
   1.193 +(*2>*)CalcTree [(["functionTerm (x^2 + x + 1)", "differentiateFor x", "derivative f_'_f"],("Isac",["derivative_of","function"],["diff","differentiate_on_R"]))];
   1.194  (*3>*)Iterator 1; moveActiveRoot 1;
   1.195  
   1.196  (*6>*)(*completeCalcHead*)autoCalculate 1 CompleteCalcHead;
   1.197 -
   1.198  (***difference II***)
   1.199  val ((pt,_),_) = get_calc 1;
   1.200  val PblObj {probl, meth, spec, fmz, env, loc, ...} = get_obj I pt [];
   1.201  val NONE = env;
   1.202  val (SOME istate, NONE) = loc;
   1.203 +(*============ inhibit exn AK110725 ==============================================
   1.204 +(* ERROR: Argument: istate : istate * Proof.context Reason: Can't unify istate to istate * Proof.context *)
   1.205  print_depth 5; writeln (istate2str istate);  print_depth 3;
   1.206 +============ inhibit exn AK110725 ==============================================*)
   1.207  (*ScrState ([],
   1.208   [], NONE,
   1.209   ??.empty, Sundef, false)*)
   1.210 @@ -586,15 +609,14 @@
   1.211  (*[
   1.212  (1 ,[1] ,true ,#Given ,Cor functionTerm (x ^^^ 2 + x + 1) ,(f_, [x ^^^ 2 + x + 1])),
   1.213  (2 ,[1] ,true ,#Given ,Cor differentiateFor x ,(v_, [x])),
   1.214 -(3 ,[1] ,true ,#Find ,Cor derivative f_'_ ,(f_'_, [f_'_]))]*)
   1.215 +(3 ,[1] ,true ,#Find ,Cor derivative f_'_f ,(f_'_f, [f_'_f]))]*)
   1.216  writeln (itms2str_ ctxt meth);
   1.217  (*[
   1.218  (1 ,[1] ,true ,#Given ,Cor functionTerm (x ^^^ 2 + x + 1) ,(f_, [x ^^^ 2 + x + 1])),
   1.219  (2 ,[1] ,true ,#Given ,Cor differentiateFor x ,(v_, [x])),
   1.220 -(3 ,[1] ,true ,#Find ,Cor derivative f_'_ ,(f_'_, [f_'_]))]*)
   1.221 +(3 ,[1] ,true ,#Find ,Cor derivative f_'_f ,(f_'_f, [f_'_f]))]*)
   1.222  writeln"-----------------------------------------------------------";
   1.223  (*7>*)fetchProposedTactic 1 (*--> Apply_Method*);
   1.224 -
   1.225  autoCalculate 1 (Step 1);
   1.226  val ((pt,p),_) = get_calc 1;
   1.227  val Form res = (#1 o pt_extract) (pt, p);
     2.1 --- a/test/Tools/isac/Interpret/solve.sml	Sun Jul 24 19:38:53 2011 +0200
     2.2 +++ b/test/Tools/isac/Interpret/solve.sml	Mon Jul 25 11:52:07 2011 +0200
     2.3 @@ -1,6 +1,5 @@
     2.4 -(* tests on solve.sml
     2.5 -   author: Walther Neuper
     2.6 -   060508,
     2.7 +(* Title: tests on solve.sml
     2.8 +   Author: Walther Neuper 060508,
     2.9     (c) due to copyright terms 
    2.10  
    2.11  is NOT ONLY dependent on Test, but on other thys:
    2.12 @@ -40,14 +39,14 @@
    2.13  "--------- interSteps on norm_Rational ---------------------------";
    2.14  "--------- interSteps on norm_Rational ---------------------------";
    2.15  "--------- interSteps on norm_Rational ---------------------------";
    2.16 -states:=[];(*exp_IsacCore_Simp_Rat_Double_No-7.xml*)
    2.17 -CalcTree [(["Term ((2/(x+3) + 2/(x - 3)) / (8*x/(x^2 - 9)))","normalform N"],
    2.18 -	   ("Rational", 
    2.19 -	    ["rational","simplification"],
    2.20 -	    ["simplification","of_rationals"]))];
    2.21 -moveActiveRoot 1;
    2.22 -autoCalculate 1 CompleteCalc; 
    2.23 -val ((pt,_),_) = get_calc 1; show_pt pt;
    2.24 + states:=[];(*exp_IsacCore_Simp_Rat_Double_No-7.xml*)
    2.25 + CalcTree [(["Term ((2/(x+3) + 2/(x - 3)) / (8*x/(x^2 - 9)))","normalform N"],
    2.26 +	    ("Rational", 
    2.27 +	     ["rational","simplification"],
    2.28 +	     ["simplification","of_rationals"]))];
    2.29 + moveActiveRoot 1;
    2.30 + autoCalculate 1 CompleteCalc; 
    2.31 + val ((pt,_),_) = get_calc 1; show_pt pt;
    2.32  
    2.33  (*with "Script SimplifyScript (t_::real) =       -----------------
    2.34         \  ((Rewrite_Set norm_Rational False) t_)"
    2.35 @@ -98,43 +97,43 @@
    2.36  "--------- prepare pbl, met --------------------------------------";
    2.37  "--------- prepare pbl, met --------------------------------------";
    2.38  store_pbt
    2.39 - (prep_pbt Test.thy "pbl_ttestt" [] e_pblID
    2.40 + (prep_pbt @{theory Test} "pbl_ttestt" [] e_pblID
    2.41   (["test"],
    2.42    [],
    2.43    e_rls, NONE, []));
    2.44  store_pbt
    2.45 - (prep_pbt Test.thy "pbl_ttestt_detail" [] e_pblID
    2.46 + (prep_pbt @{theory Test} "pbl_ttestt_detail" [] e_pblID
    2.47   (["detail","test"],
    2.48 -  [("#Given" ,["realTestGiven t_"]),
    2.49 -   ("#Find"  ,["realTestFind s_"])
    2.50 +  [("#Given" ,["realTestGiven t_t"]),
    2.51 +   ("#Find"  ,["realTestFind s_s"])
    2.52     ],
    2.53    e_rls, NONE, [["Test","test_detail"]]));
    2.54  
    2.55  store_met
    2.56 - (prep_met Test.thy "met_detbin" [] e_metID
    2.57 + (prep_met @{theory Test} "met_detbin" [] e_metID
    2.58   (["Test","test_detail_binom"]:metID,
    2.59 -  [("#Given" ,["realTestGiven t_"]),
    2.60 -   ("#Find"  ,["realTestFind s_"])
    2.61 +  [("#Given" ,["realTestGiven t_t"]),
    2.62 +   ("#Find"  ,["realTestFind s_s"])
    2.63     ],
    2.64 -  {rew_ord'="sqrt_right",rls'=tval_rls,calc = [],srls=e_rls,prls=e_rls,
    2.65 -   crls=tval_rls, nrls=e_rls(*,
    2.66 +  {rew_ord' = "sqrt_right", rls' = tval_rls, calc = [], srls = e_rls, prls = e_rls,
    2.67 +   crls = tval_rls, nrls = e_rls(*,
    2.68     asm_rls=[],asm_thm=[("real_mult_div_cancel2","")]*)},
    2.69 - "Script Testterm (g_::real) =   \
    2.70 + "Script Testterm (g_g::real) =   \
    2.71   \(((Rewrite_Set expand_binoms False) @@\
    2.72 - \  (Rewrite_Set cancel False)) g_)"
    2.73 + \  (Rewrite_Set cancel False)) g_g)"
    2.74   ));
    2.75  store_met
    2.76 - (prep_met Test.thy "met_detpoly" [] e_metID
    2.77 + (prep_met @{theory Test} "met_detpoly" [] e_metID
    2.78   (["Test","test_detail_poly"]:metID,
    2.79 -  [("#Given" ,["realTestGiven t_"]),
    2.80 -   ("#Find"  ,["realTestFind s_"])
    2.81 +  [("#Given" ,["realTestGiven t_t"]),
    2.82 +   ("#Find"  ,["realTestFind s_s"])
    2.83     ],
    2.84 -  {rew_ord'="sqrt_right",rls'=tval_rls,calc=[],srls=e_rls,prls=e_rls,
    2.85 -   crls=tval_rls, nrls=e_rls(*,
    2.86 +  {rew_ord' = "sqrt_right", rls' = tval_rls, calc = [], srls = e_rls, prls = e_rls,
    2.87 +   crls = tval_rls, nrls = e_rls(*,
    2.88     asm_rls=[],asm_thm=[("real_mult_div_cancel2","")]*)},
    2.89 - "Script Testterm (g_::real) =   \
    2.90 + "Script Testterm (g_g::real) =   \
    2.91   \(((Rewrite_Set make_polynomial False) @@\
    2.92 - \  (Rewrite_Set cancel_p False)) g_)"
    2.93 + \  (Rewrite_Set cancel_p False)) g_g)"
    2.94   ));
    2.95  
    2.96  (*---- funktionieren mit Rationals.ML: dummy-Funktionen(1)--------*)
    2.97 @@ -205,6 +204,7 @@
    2.98   val nxt = ("Detail",Detail);"----------------------";
    2.99   val (p,_,f,nxt,_,pt) = (me nxt p [] pt) handle e => OldGoals.print_exn e;
   2.100   val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   2.101 +
   2.102  (*15.10.02*)
   2.103   val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   2.104  (*
   2.105 @@ -256,6 +256,8 @@
   2.106  (---------------WN060614?!?---*)
   2.107  
   2.108   val t = str2term "(3 + x) * (3 + -1 * x)";
   2.109 +(*========== inhibit exn AK110725 ================================================
   2.110 +(* ERROR: Argument: thy : domID * rls Reason: Can't unify theory to domID * rls *)
   2.111   val SOME (t,_) = rewrite_set_ thy false expand_poly t; term2str t;
   2.112   "3 * 3 + 3 * (-1 * x) + (x * 3 + x * (-1 * x))";
   2.113   val SOME (t,_) = rewrite_set_ thy false order_add_mult t; term2str t;
   2.114 @@ -267,6 +269,7 @@
   2.115   val SOME (t,_) = rewrite_set_ thy false reduce_012 t; term2str t;
   2.116   "9 + - (x ^^^ 2)"; 
   2.117   (*14.3.03*)
   2.118 +========== inhibit exn AK110725 ================================================*)
   2.119  
   2.120  val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   2.121  val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   2.122 @@ -353,7 +356,6 @@
   2.123  
   2.124  
   2.125  
   2.126 -
   2.127  val fmz = ["realTestGiven ((x+3)+(-1)*(2+6*x))",
   2.128  	   "realTestFind s"];
   2.129  val (dI',pI',mI') =
   2.130 @@ -421,7 +423,6 @@
   2.131     get_obj g_tac pt [4];
   2.132     *)
   2.133  
   2.134 -
   2.135  "------ interSteps'detailrls' after CompleteCalc -----------------";
   2.136  "------ interSteps'detailrls' after CompleteCalc -----------------";
   2.137  "------ interSteps'detailrls' after CompleteCalc -----------------";
     3.1 --- a/test/Tools/isac/Test_Isac.thy	Sun Jul 24 19:38:53 2011 +0200
     3.2 +++ b/test/Tools/isac/Test_Isac.thy	Mon Jul 25 11:52:07 2011 +0200
     3.3 @@ -28,7 +28,9 @@
     3.4    ("ProgLang/termC.sml") 
     3.5    ("ProgLang/calculate.sml")
     3.6    ("ProgLang/rewrite.sml")
     3.7 -(*("ProgLang/listg.sml") ("ProgLang/scrtools.sml") ("ProgLang/tools.sml") *)
     3.8 +(*("ProgLang/listg.sml")*)
     3.9 +  ("ProgLang/scrtools.sml")
    3.10 +  ("ProgLang/tools.sml")
    3.11  
    3.12    ("Minisubpbl/000-comments.sml")
    3.13    ("Minisubpbl/100-init-rootpbl.sml")
    3.14 @@ -44,19 +46,19 @@
    3.15    ("Interpret/mstools.sml") 
    3.16    ("Interpret/ctree.sml")
    3.17    ("Interpret/ptyps.sml") 
    3.18 -(*("Interpret/generate.sml")*)
    3.19 +  ("Interpret/generate.sml")
    3.20    ("Interpret/calchead.sml") 
    3.21 -(*("Interpret/appl.sml")*)
    3.22 +  ("Interpret/appl.sml")
    3.23    ("Interpret/rewtools.sml") 
    3.24    ("Interpret/script.sml")
    3.25 -(* ("Interpret/solve.sml") 
    3.26 -  ("Interpret/inform.sml")*)
    3.27 +  ("Interpret/solve.sml") 
    3.28 +  ("Interpret/inform.sml")
    3.29    ("Interpret/mathengine.sml")
    3.30  
    3.31 -(*("xmlsrc/mathml.sml")
    3.32 +  ("xmlsrc/mathml.sml")
    3.33    ("xmlsrc/datatypes.sml")
    3.34    ("xmlsrc/pbl-met-hierarchy.sml")
    3.35 -  ("xmlsrc/thy-hierarchy.sml")*)
    3.36 +  ("xmlsrc/thy-hierarchy.sml")
    3.37    ("xmlsrc/interface-xml.sml")
    3.38  
    3.39    ("Frontend/messages.sml")
    3.40 @@ -124,17 +126,17 @@
    3.41    use "Interpret/calchead.sml"      (*!    *)
    3.42    use "Interpret/appl.sml"          (*!complete WEGEN INTERMED TESTCODE*)
    3.43    use "Interpret/rewtools.sml"      (*!    *)
    3.44 -  use "Interpret/script.sml"        (*!TODO/part*)
    3.45 -(*use "Interpret/solve.sml"           !TODO*)
    3.46 -(*use "Interpret/inform.sml"          !TODO*)
    3.47 +  use "Interpret/script.sml"        (*!TODO/part.*)
    3.48 +  use "Interpret/solve.sml"         (*part.*)
    3.49 +  use "Interpret/inform.sml"        (*part.*)
    3.50    use "Interpret/mathengine.sml"    (*!part.*)
    3.51    ML {*"%%%%%%%%%%%%%%%%% end Interpret.thy %%%%%%%%%%%%%%%%%%%%";*}
    3.52    ML {*"%%%%%%%%%%%%%%%%% start xmlsrc.thy %%%%%%%%%%%%%%%%%%%%%";*}
    3.53 -(*use "xmlsrc/mathml.sml"             TODO*)
    3.54 -(*use "xmlsrc/datatypes.sml"          TODO*)
    3.55 -(*use "xmlsrc/pbl-met-hierarchy.sml"  TODO*)
    3.56 -(*use "xmlsrc/thy-hierarchy.sml"      TODO after 2009-2*) 
    3.57 -  use "xmlsrc/interface-xml.sml"    (*TODO after 2009-2*)
    3.58 +  use "xmlsrc/mathml.sml"            (*part.*)
    3.59 +  use "xmlsrc/datatypes.sml"         (*TODO/part.*)
    3.60 +  use "xmlsrc/pbl-met-hierarchy.sml" (*TODO/part.*)
    3.61 +  use "xmlsrc/thy-hierarchy.sml"     (*TODO after 2009-2/part.*) 
    3.62 +  use "xmlsrc/interface-xml.sml"     (*TODO after 2009-2*)
    3.63    ML {*"%%%%%%%%%%%%%%%%% end xmlsrc.thy %%%%%%%%%%%%%%%%%%%%%%%";*}
    3.64    ML {*"%%%%%%%%%%%%%%%%% start Frontend.thy %%%%%%%%%%%%%%%%%%%";*}
    3.65    use "Frontend/messages.sml"        (*new 2011*)
     4.1 --- a/test/Tools/isac/Test_Some.thy	Sun Jul 24 19:38:53 2011 +0200
     4.2 +++ b/test/Tools/isac/Test_Some.thy	Mon Jul 25 11:52:07 2011 +0200
     4.3 @@ -7,542 +7,14 @@
     4.4  
     4.5  ML{* writeln "**** run the test ***************************************" *}
     4.6  
     4.7 -use"../../../test/Tools/isac/Interpret/script.sml" 
     4.8 +use"../../../test/Tools/isac/Interpret/inform.sml" 
     4.9  
    4.10  ML{*
    4.11  
    4.12  
    4.13  
    4.14 -(* Title: tests on solve.sml
    4.15 -   Author: Walther Neuper 060508,
    4.16 -   (c) due to copyright terms 
    4.17  
    4.18 -is NOT ONLY dependent on Test, but on other thys:
    4.19 -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    4.20 -uses from Rational.ML: Rrls cancel_p, Rrls cancel
    4.21 -which in turn
    4.22 -uses from Poly.ML: Rls make_polynomial, Rls expand_binom 
    4.23  
    4.24 -use"../smltest/ME/solve.sml";
    4.25 -use"solve.sml";
    4.26 -*)
    4.27 -
    4.28 -"-----------------------------------------------------------------";
    4.29 -"table of contents -----------------------------------------------";
    4.30 -"-----------------------------------------------------------------";
    4.31 -"--------- interSteps on norm_Rational ---------------------------";
    4.32 -(*---vvv NOT working after meNEW.04mmdd*)
    4.33 -"###### val intermediate_ptyps = !ptyps;val intermediate_mets = !mets";
    4.34 -"--------- prepare pbl, met --------------------------------------";
    4.35 -"-------- cancel, without detail ------------------------------";
    4.36 -"-------- cancel, detail rev-rew (cancel) afterwards ----------";
    4.37 -"-------------- cancel_p, without detail ------------------------------";
    4.38 -"-------------- cancel_p, detail rev-rew (cancel) afterwards ----------";
    4.39 -(*---^^^ NOT working*)
    4.40 -"on 'miniscript with mini-subpbl':";
    4.41 -"------ interSteps'donesteps': on 'miniscript with mini-subpbl'---";
    4.42 -"------ interSteps'detailrls' after CompleteCalc -----------------";
    4.43 -"------ interSteps after appendFormula ---------------------------";
    4.44 -(*---vvv not brought to work 0403*)
    4.45 -"------ Detail_Set -----------------------------------------------";
    4.46 -"###### ptyps:= intermediate_ptyps;met:= intermediate_mets;#######";
    4.47 -"-----------------------------------------------------------------";
    4.48 -"-----------------------------------------------------------------";
    4.49 -"-----------------------------------------------------------------";
    4.50 -
    4.51 -
    4.52 -"--------- interSteps on norm_Rational ---------------------------";
    4.53 -"--------- interSteps on norm_Rational ---------------------------";
    4.54 -"--------- interSteps on norm_Rational ---------------------------";
    4.55 - states:=[];(*exp_IsacCore_Simp_Rat_Double_No-7.xml*)
    4.56 - CalcTree [(["Term ((2/(x+3) + 2/(x - 3)) / (8*x/(x^2 - 9)))","normalform N"],
    4.57 -	    ("Rational", 
    4.58 -	     ["rational","simplification"],
    4.59 -	     ["simplification","of_rationals"]))];
    4.60 - moveActiveRoot 1;
    4.61 - autoCalculate 1 CompleteCalc; 
    4.62 - val ((pt,_),_) = get_calc 1; show_pt pt;
    4.63 -
    4.64 -(*with "Script SimplifyScript (t_::real) =       -----------------
    4.65 -       \  ((Rewrite_Set norm_Rational False) t_)"
    4.66 -case pt of Nd (PblObj _, [Nd _]) => ((*met only applies norm_Rational*))
    4.67 -	 | _ => error  "solve.sml: interSteps on norm_Rational 1";
    4.68 -interSteps 1 ([1], Res);
    4.69 -getFormulaeFromTo 1 ([1], Frm) ([1,12], Res) 99999 false;
    4.70 -interSteps 1 ([1,3], Res);
    4.71 -
    4.72 -getTactic 1 ([1,4], Res)  (*here get the tactic, and ...*);
    4.73 -interSteps 1 ([1,5], Res) (*... here get the intermediate steps above*);
    4.74 -
    4.75 -getTactic 1 ([1,5,1], Frm);
    4.76 -val ((pt,_),_) = get_calc 1; show_pt pt;
    4.77 -
    4.78 -getTactic 1 ([1,8], Res) (*Rewrite_Set "common_nominator_p" *);
    4.79 -interSteps 1 ([1,9], Res)(*TODO.WN060606 reverse rew*);
    4.80 ---------------------------------------------------------------------*)
    4.81 -
    4.82 -case pt of Nd (PblObj _, [Nd _, Nd _, Nd _, Nd _, Nd _, Nd _]) => ()
    4.83 -	 | _ => error  "solve.sml: interSteps on norm_Rational 1";
    4.84 -(*these have been done now by the script ^^^ immediately...
    4.85 -interSteps 1 ([1], Res);
    4.86 -getFormulaeFromTo 1 ([1], Frm) ([1,12], Res) 99999 false;
    4.87 -*)
    4.88 -interSteps 1 ([6], Res);
    4.89 -
    4.90 -getTactic 1 ([6,1], Frm)  (*here get the tactic, and ...*);
    4.91 -interSteps 1 ([6,1], Res) (*... here get the intermediate steps above*);
    4.92 -(*========== inhibit exn AK110721 ================================================
    4.93 -
    4.94 -getTactic 1 ([3,4,1], Frm);
    4.95 -val ((pt,_),_) = get_calc 1; show_pt pt;
    4.96 -val (Form form, SOME tac, asm) = pt_extract (pt, ([6], Res));
    4.97 -case (term2str form, tac, terms2strs asm) of
    4.98 -    ("1 / 2", Check_Postcond ["rational", "simplification"], 
    4.99 -     ["-36 * x + 4 * x ^^^ 3 ~= 0"]) => ()
   4.100 -  | _ => error "solve.sml: interSteps on norm_Rational 2";
   4.101 -
   4.102 -
   4.103 -
   4.104 -"###### val intermediate_ptyps = !ptyps;val intermediate_mets = !mets";
   4.105 -"###### val intermediate_ptyps = !ptyps;val intermediate_mets = !mets";
   4.106 -"###### val intermediate_ptyps = !ptyps;val intermediate_mets = !mets";
   4.107 -val intermediate_ptyps = !ptyps;
   4.108 -val intermediate_mets = !mets;
   4.109 -
   4.110 -"--------- prepare pbl, met --------------------------------------";
   4.111 -"--------- prepare pbl, met --------------------------------------";
   4.112 -"--------- prepare pbl, met --------------------------------------";
   4.113 -store_pbt
   4.114 - (prep_pbt Test.thy "pbl_ttestt" [] e_pblID
   4.115 - (["test"],
   4.116 -  [],
   4.117 -  e_rls, NONE, []));
   4.118 -store_pbt
   4.119 - (prep_pbt Test.thy "pbl_ttestt_detail" [] e_pblID
   4.120 - (["detail","test"],
   4.121 -  [("#Given" ,["realTestGiven t_"]),
   4.122 -   ("#Find"  ,["realTestFind s_"])
   4.123 -   ],
   4.124 -  e_rls, NONE, [["Test","test_detail"]]));
   4.125 -
   4.126 -store_met
   4.127 - (prep_met Test.thy "met_detbin" [] e_metID
   4.128 - (["Test","test_detail_binom"]:metID,
   4.129 -  [("#Given" ,["realTestGiven t_"]),
   4.130 -   ("#Find"  ,["realTestFind s_"])
   4.131 -   ],
   4.132 -  {rew_ord'="sqrt_right",rls'=tval_rls,calc = [],srls=e_rls,prls=e_rls,
   4.133 -   crls=tval_rls, nrls=e_rls(*,
   4.134 -   asm_rls=[],asm_thm=[("real_mult_div_cancel2","")]*)},
   4.135 - "Script Testterm (g_::real) =   \
   4.136 - \(((Rewrite_Set expand_binoms False) @@\
   4.137 - \  (Rewrite_Set cancel False)) g_)"
   4.138 - ));
   4.139 -store_met
   4.140 - (prep_met Test.thy "met_detpoly" [] e_metID
   4.141 - (["Test","test_detail_poly"]:metID,
   4.142 -  [("#Given" ,["realTestGiven t_"]),
   4.143 -   ("#Find"  ,["realTestFind s_"])
   4.144 -   ],
   4.145 -  {rew_ord'="sqrt_right",rls'=tval_rls,calc=[],srls=e_rls,prls=e_rls,
   4.146 -   crls=tval_rls, nrls=e_rls(*,
   4.147 -   asm_rls=[],asm_thm=[("real_mult_div_cancel2","")]*)},
   4.148 - "Script Testterm (g_::real) =   \
   4.149 - \(((Rewrite_Set make_polynomial False) @@\
   4.150 - \  (Rewrite_Set cancel_p False)) g_)"
   4.151 - ));
   4.152 -
   4.153 -(*---- funktionieren mit Rationals.ML: dummy-Funktionen(1)--------*)
   4.154 -
   4.155 -"-------- cancel, without detail ------------------------------";
   4.156 -"-------- cancel, without detail ------------------------------";
   4.157 -"-------- cancel, without detail ------------------------------";
   4.158 -val fmz = ["realTestGiven (((3 + x) * (3 - x)) / ((3 + x) * (3 + x)))",
   4.159 -	   "realTestFind s"];
   4.160 -val (dI',pI',mI') =
   4.161 -  ("Test",["detail","test"],["Test","test_detail_binom"]);
   4.162 -
   4.163 -val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))];
   4.164 -val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.165 -val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.166 -val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.167 -val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.168 -val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.169 -val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.170 -(*nxt = ("Apply_Method",Apply_Method ("Test","test_detail"))*)
   4.171 -val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.172 -val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.173 -val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.174 -val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.175 -(*"(3 + -1 * x) / (3 + x)"*)
   4.176 -if nxt = ("End_Proof'",End_Proof') then ()
   4.177 -else error "details.sml, changed behaviour in: without detail";
   4.178 -
   4.179 - val str = pr_ptree pr_short pt;
   4.180 - writeln str;
   4.181 -
   4.182 -
   4.183 -"-------- cancel, detail rev-rew (cancel) afterwards ----------";
   4.184 -"-------- cancel, detail rev-rew (cancel) afterwards ----------";
   4.185 -"-------- cancel, detail rev-rew (cancel) afterwards ----------";
   4.186 - val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))];
   4.187 - val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.188 - val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.189 - val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.190 - val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.191 - val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.192 - val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.193 - (*nxt = ("Apply_Method",Apply_Method ("Test","test_detail"))*)
   4.194 - val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.195 - (*val nxt = ("Rewrite_Set",Rewrite_Set "expand_binoms")*)
   4.196 - val (p,_,f,nxt,_,pt) = me nxt p [] pt; (* rewrite must exist for Detail*)
   4.197 -(* val nxt = ("Detail",Detail);"----------------------";*)
   4.198 -
   4.199 -
   4.200 -(*WN.11.9.03: after meNEW not yet implemented -------------------------*)
   4.201 - val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.202 -(*FIXXXXXME.040216 #####################################################
   4.203 -# val nxt = ("Detail", Detail) : string * tac
   4.204 -val it = "----------------------" : string
   4.205 ->  val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.206 -val f = Form' (FormKF (~1, EdUndef, ...)) : mout
   4.207 -val nxt = ("Empty_Tac", Empty_Tac) : string * tac
   4.208 -val p = ([2, 1], Res) : pos'
   4.209 -#########################################################################
   4.210 - val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.211 - val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.212 - val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.213 - val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.214 - (*val nxt = ("End_Detail",End_Detail)*)
   4.215 - val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.216 - (*val nxt = ("Rewrite_Set",Rewrite_Set "cancel")*)
   4.217 - val (p,_,f,nxt,_,pt) = me nxt p [] pt; (* rewrite must exist for Detail*)
   4.218 - val nxt = ("Detail",Detail);"----------------------";
   4.219 - val (p,_,f,nxt,_,pt) = (me nxt p [] pt) handle e => OldGoals.print_exn e;
   4.220 - val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.221 -(*15.10.02*)
   4.222 - val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.223 -(*
   4.224 -rewrite "Rationals" "tless_true""e_rls"true("sym_real_plus_minus_binom","")
   4.225 -	"3 ^^^ 2 - x ^^^ 2";
   4.226 -*)
   4.227 - val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.228 - val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.229 - val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.230 - val (p,_,f,nxt,_,pt) = (me nxt p [] pt) handle e => OldGoals.print_exn e;
   4.231 - val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.232 -if f = Form' (FormKF (~1,EdUndef,0,Nundef,"(3 - x) / (3 + x)"))
   4.233 -   andalso nxt = ("End_Proof'",End_Proof') then ()
   4.234 -else error "new behaviour in details.sml, \
   4.235 -		 \cancel, rev-rew (cancel) afterwards";
   4.236 -FIXXXXXME.040216 #####################################################*)
   4.237 -
   4.238 -(*---- funktionieren mit Rationals.ML: dummy-Funktionen(1)--------*)
   4.239 -
   4.240 -"-------------- cancel_p, without detail ------------------------------";
   4.241 -"-------------- cancel_p, without detail ------------------------------";
   4.242 -"-------------- cancel_p, without detail ------------------------------";
   4.243 -val fmz = ["realTestGiven (((3 + x)*(3+(-1)*x)) / ((3+x) * (3+x)))",
   4.244 -	   "realTestFind s"];
   4.245 -val (dI',pI',mI') =
   4.246 -  ("Test",["detail","test"],["Test","test_detail_poly"]);
   4.247 -
   4.248 -(*val p = e_pos'; val c = [];
   4.249 -val (mI,m) = ("Init_Proof",Init_Proof (fmz, (dI',pI',mI')));
   4.250 -val (p,_,f,nxt,_,pt) = me (mI,m) p c EmptyPtree;*)
   4.251 -val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))];
   4.252 -val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.253 -val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.254 -val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.255 -val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.256 -val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.257 -val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.258 -(*nxt = ("Apply_Method",Apply_Method ("Test","test_detail"))*)
   4.259 -val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.260 -"(3 + x) * (3 + -1 * x) / ((3 + x) * (3 + x))";
   4.261 -
   4.262 - (*14.3.03*)
   4.263 -(*---------------WN060614?!?---
   4.264 - val t = str2term "(3 + x) * (3 + -1 * x) / ((3 + x) * (3 + x))";
   4.265 - val SOME (t,_) = rewrite_set_ thy false make_polynomial t; term2str t;
   4.266 - "(9 + - (x ^^^ 2)) / (9 + 6 * x + x ^^^ 2)";
   4.267 - val SOME (t,_) = rewrite_set_ thy false cancel_p t; term2str t;
   4.268 - cancel_p_ thy t;
   4.269 -(---------------WN060614?!?---*)
   4.270 -
   4.271 - val t = str2term "(3 + x) * (3 + -1 * x)";
   4.272 - val SOME (t,_) = rewrite_set_ thy false expand_poly t; term2str t;
   4.273 - "3 * 3 + 3 * (-1 * x) + (x * 3 + x * (-1 * x))";
   4.274 - val SOME (t,_) = rewrite_set_ thy false order_add_mult t; term2str t;
   4.275 - "3 * 3 + (3 * x + (-1 * (3 * x) + -1 * (x * x)))";
   4.276 - val SOME (t,_) = rewrite_set_ thy false simplify_power t; term2str t;
   4.277 - "3 ^^^ 2 + (3 * x + (-1 * (3 * x) + -1 * x ^^^ 2))";
   4.278 - val SOME (t,_) = rewrite_set_ thy false collect_numerals t; term2str t;
   4.279 - "9 + (0 * x + -1 * x ^^^ 2)";
   4.280 - val SOME (t,_) = rewrite_set_ thy false reduce_012 t; term2str t;
   4.281 - "9 + - (x ^^^ 2)"; 
   4.282 - (*14.3.03*)
   4.283 -
   4.284 -val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.285 -val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.286 -val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.287 -(*"(3 + -1 * x) / (3 + x)"*)
   4.288 -if nxt = ("End_Proof'",End_Proof') then ()
   4.289 -else error "details.sml, changed behaviour in: cancel_p, without detail";
   4.290 -
   4.291 -"-------------- cancel_p, detail rev-rew (cancel) afterwards ----------";
   4.292 -"-------------- cancel_p, detail rev-rew (cancel) afterwards ----------";
   4.293 -"-------------- cancel_p, detail rev-rew (cancel) afterwards ----------";
   4.294 -(* val p = e_pos'; val c = [];
   4.295 - val (mI,m) = ("Init_Proof",Init_Proof (fmz, (dI',pI',mI')));
   4.296 - val (p,_,f,nxt,_,pt) = me (mI,m) p c EmptyPtree;*)
   4.297 -val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))];
   4.298 - val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.299 - val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.300 - val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.301 - val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.302 - val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.303 - val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.304 - (*nxt = ("Apply_Method",Apply_Method ("Test","test_detail_poly"))*)
   4.305 - val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.306 - (*val nxt = ("Rewrite_Set",Rewrite_Set "make_polynomial")*)
   4.307 - val (p,_,f,nxt,_,pt) = me nxt p [] pt; (* rewrite must exist for Detail*)
   4.308 -
   4.309 -(*14.3.03.FIXXXXXME since Isa02/reverse-rew.sml:
   4.310 -  fun make_deriv ...  Rls_ not yet impl. (| Thm | Calc) 
   4.311 -  Rls_ needed for make_polynomial ----------------------
   4.312 - val nxt = ("Detail",Detail);"----------------------";
   4.313 - val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.314 - val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.315 - val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.316 - val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.317 - val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.318 - val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.319 - val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.320 - val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.321 - val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.322 - val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.323 - val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.324 - val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.325 - val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.326 - val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.327 - val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.328 - val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.329 - val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.330 - val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.331 - val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.332 - val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.333 - val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.334 - val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.335 - val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.336 - val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.337 - val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.338 - val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.339 - val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.340 - val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.341 - val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.342 - val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.343 - if nxt = ("End_Detail",End_Detail) then ()
   4.344 - else error "details.sml: new behav. in Detail make_polynomial";
   4.345 -----------------------------------------------------------------------*)
   4.346 -
   4.347 -(*---------------
   4.348 - val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.349 - (*val nxt = ("Rewrite_Set",Rewrite_Set "cancel_p")*)
   4.350 - val (p,_,f,nxt,_,pt) = me nxt p [] pt; (* rewrite must exist for Detail*)
   4.351 - val nxt = ("Detail",Detail);"----------------------";
   4.352 - val (p,_,f,nxt,_,pt) = (me nxt p [] pt) handle e => OldGoals.print_exn e;
   4.353 - val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.354 - val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.355 - val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.356 - val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.357 - val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.358 - val (p,_,f,nxt,_,pt) = (me nxt p [] pt) handle e => OldGoals.print_exn e;
   4.359 - val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.360 -if f = Form' (FormKF (~1,EdUndef,0,Nundef,"(3 + x) / (3 - x)"))
   4.361 -   andalso nxt = ("End_Proof'",End_Proof') then ()
   4.362 -else error "new behaviour in details.sml, cancel_p afterwards";
   4.363 -
   4.364 -----------------*)
   4.365 -
   4.366 -
   4.367 -
   4.368 -
   4.369 -
   4.370 -val fmz = ["realTestGiven ((x+3)+(-1)*(2+6*x))",
   4.371 -	   "realTestFind s"];
   4.372 -val (dI',pI',mI') =
   4.373 -  ("Test",["detail","test"],["Test","test_detail_poly"]);
   4.374 -
   4.375 -(* val p = e_pos'; val c = [];
   4.376 - val (mI,m) = ("Init_Proof",Init_Proof (fmz, (dI',pI',mI')));
   4.377 - val (p,_,f,nxt,_,pt) = me (mI,m) p c EmptyPtree;*)
   4.378 -val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))];
   4.379 -val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.380 - val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.381 - val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.382 - val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.383 - val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.384 - val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.385 - (*nxt = ("Apply_Method",Apply_Method ("Test","test_detail_poly"))*)
   4.386 - val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.387 -(*16.10.02 --- kommt auf POLY_EXCEPTION ?!??? ----------------------------
   4.388 - (*val nxt = ("Rewrite_Set",Rewrite_Set "make_polynomial")*)
   4.389 - val (p,_,f,nxt,_,pt) = me nxt p [] pt; (* rewrite must exist for Detail*)
   4.390 - val nxt = ("Detail",Detail);"----------------------";
   4.391 - val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.392 - val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.393 - val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.394 - val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   4.395 --------------------------------------------------------------------------*)
   4.396 -
   4.397 -
   4.398 -"------ interSteps'donesteps': on 'miniscript with mini-subpbl'---";
   4.399 -"------ interSteps'donesteps': on 'miniscript with mini-subpbl'---";
   4.400 -"------ interSteps'donesteps': on 'miniscript with mini-subpbl'---";
   4.401 - states:=[];
   4.402 - CalcTree [(["equality (x+1=(2::real))", "solveFor x","solutions L"], 
   4.403 -   ("Test", ["sqroot-test","univariate","equation","test"],
   4.404 -    ["Test","squ-equ-test-subpbl1"]))];
   4.405 - Iterator 1;
   4.406 - moveActiveRoot 1;
   4.407 - autoCalculate 1 CompleteCalc; 
   4.408 - moveActiveRoot 1; 
   4.409 -
   4.410 - interSteps 1 ([],Res);
   4.411 - val [(_,(((pt,_),_),[(_,ip)]))] = !states;
   4.412 - val ("donesteps",_(*,ss*), lastpos) = detailstep pt ip;
   4.413 - (*case ss of [(_,_,t1),(_,_,t2),(_,_,t3),(_,_,t4),(_,_,t5),(_,_,t6)] => 
   4.414 -	    (writeln o terms2str) [t1,t2,t3,t4,t5,t6]
   4.415 -	  | _ => error "details.sml: diff.behav. in detail miniscript";*) if lastpos = ([4], Res) then ()
   4.416 - else error "details.sml: diff.behav. in interSteps'donesteps' 1";
   4.417 -
   4.418 - moveActiveDown 1;
   4.419 - moveActiveDown 1;
   4.420 - moveActiveDown 1;
   4.421 - moveActiveDown 1; 
   4.422 -
   4.423 - interSteps 1 ([3],Pbl) (*subproblem*);
   4.424 - val [(_,(((pt,_),_),[(_,ip)]))] = !states;
   4.425 - val ("donesteps",_(*,ss*), lastpos) = detailstep pt ip;
   4.426 - (*case ss of [(_,_,t1),(_,_,t2),(_,_,t3)] => 
   4.427 -	    (writeln o terms2str) [t1,t2,t3]
   4.428 -	  | _ => error "details.sml: diff.behav. in detail miniscript";*) if lastpos = ([3, 2], Res) then ()
   4.429 - else error "details.sml: diff.behav. in interSteps'donesteps' 1";
   4.430 -
   4.431 -
   4.432 -(* val [(_,(((pt,_),_),[(_,ip)]))] = !states;
   4.433 -   writeln (pr_ptree pr_short pt);
   4.434 -   get_obj g_tac pt [4];
   4.435 -   *)
   4.436 -
   4.437 -
   4.438 -"------ interSteps'detailrls' after CompleteCalc -----------------";
   4.439 -"------ interSteps'detailrls' after CompleteCalc -----------------";
   4.440 -"------ interSteps'detailrls' after CompleteCalc -----------------";
   4.441 - states:=[];
   4.442 - CalcTree [(["equality (x+1=(2::real))", "solveFor x","solutions L"], 
   4.443 -   ("Test", ["sqroot-test","univariate","equation","test"],
   4.444 -    ["Test","squ-equ-test-subpbl1"]))];
   4.445 - Iterator 1;
   4.446 - moveActiveRoot 1;
   4.447 - autoCalculate 1 CompleteCalc;
   4.448 - interSteps 1 ([],Res);
   4.449 - moveActiveRoot 1; 
   4.450 - moveActiveDown 1;
   4.451 - moveActiveDown 1;
   4.452 - moveActiveDown 1;  
   4.453 - refFormula 1 (get_pos 1 1); (* 2 Res, <ISA> -1 + x = 0 </ISA> *)
   4.454 -
   4.455 - interSteps 1 ([2],Res);
   4.456 - val [(_,(((pt,_),_),[(_,(p,_))]))] = !states;
   4.457 - if length (children (get_nd pt p)) = 6 then ()
   4.458 - else error "details.sml: diff.behav. in interSteps'detailrls' 1";
   4.459 -
   4.460 - moveActiveDown 1;
   4.461 - moveActiveDown 1; refFormula 1 (get_pos 1 1); (* 3,1 Frm, <ISA> -1 + x = 0 </ISA>  *);
   4.462 -
   4.463 - interSteps 1 ([3,1],Frm) (*<ERROR> first formula on level has NO detail </E*);
   4.464 - val [(_,(((pt,_),_),[(_,(p,_))]))] = !states;
   4.465 - if length (children (get_nd pt p)) = 0 then () (*NO detail at ([xxx,1],Frm)*)
   4.466 - else error "details.sml: diff.behav. in interSteps'detailrls' 2";
   4.467 -
   4.468 - moveActiveDown 1; 
   4.469 - refFormula 1 (get_pos 1 1); (* 3,1 Res, <ISA> x = 0 + -1 * -1 </ISA> *)
   4.470 -
   4.471 - interSteps 1 ([3,1],Res);
   4.472 - val ((pt,p),_) = get_calc 1; show_pt pt;
   4.473 - term2str (get_obj g_res pt [3,1,1]);(*"x = 0 + -1 * -1"  ok*)
   4.474 - term2str (get_obj g_form pt [3,2]); (*"x = 0 + -1 * -1"  ok*)
   4.475 - get_obj g_tac pt [3,1,1];           (*Rewrite_Inst.."risolate_bdv_add ok*)
   4.476 -
   4.477 - moveActiveDown 1; 
   4.478 - refFormula 1 (get_pos 1 1); (* 3,2 Res, <ISA> x = 1 </ISA> *)
   4.479 -
   4.480 - interSteps 1 ([3,2],Res);
   4.481 - val [(_,(((pt,_),_),[(_,(p,_))]))] = !states;
   4.482 - if length (children (get_nd pt p)) = 2 then ()
   4.483 - else error "details.sml: diff.behav. in interSteps'detailrls' 3";
   4.484 -
   4.485 - val ((pt,p),_) = get_calc 1; show_pt pt;
   4.486 -
   4.487 -
   4.488 -"------ interSteps after appendFormula ---------------------------";
   4.489 -"------ interSteps after appendFormula ---------------------------";
   4.490 -"------ interSteps after appendFormula ---------------------------";
   4.491 -states:=[];
   4.492 -CalcTree [(["equality (x+1=(2::real))", "solveFor x","solutions L"], 
   4.493 -  ("Test", ["sqroot-test","univariate","equation","test"],
   4.494 -   ["Test","squ-equ-test-subpbl1"]))];
   4.495 -Iterator 1;
   4.496 -moveActiveRoot 1;
   4.497 -autoCalculate 1 CompleteCalcHead;
   4.498 -autoCalculate 1 (Step 1);
   4.499 -autoCalculate 1 (Step 1);
   4.500 -appendFormula 1 "x - 1 = 0"(*generates intermediate steps*);
   4.501 -(*these are not shown, because the resulting formula is on the same
   4.502 -  level as the previous formula*)
   4.503 -interSteps 1 ([2],Res) (*error: last unchanged was ([2, 9], Res)*); 
   4.504 -(*...and these are the internals*)
   4.505 -val ((pt,p),_) = get_calc 1; show_pt pt;
   4.506 -val (_,_,lastpos) =detailstep pt p;
   4.507 -if p = ([2], Res) andalso lastpos = ([2, 9], Res) then ()
   4.508 -else error "solve.sml: diff.beh. after appendFormula x - 1 = 0";
   4.509 -
   4.510 -
   4.511 -"------ Detail_Set -----------------------------------------------";
   4.512 -"------ Detail_Set -----------------------------------------------";
   4.513 -"------ Detail_Set -----------------------------------------------";
   4.514 - states:=[]; (*start of calculation, return No.1*)
   4.515 - CalcTree [(["equality (x+1=(2::real))", "solveFor x","solutions L"], 
   4.516 -   ("Test", ["sqroot-test","univariate","equation","test"],
   4.517 -    ["Test","squ-equ-test-subpbl1"]))];
   4.518 - Iterator 1; moveActiveRoot 1; 
   4.519 - autoCalculate 1 CompleteCalcHead;
   4.520 - autoCalculate 1 (Step 1);
   4.521 - autoCalculate 1 (Step 1);
   4.522 -
   4.523 - fetchProposedTactic 1 (*DG decides to do this tactic in detail*);
   4.524 - (*TODO ...*)
   4.525 - setNextTactic 1 (Detail_Set "Test_simplify");
   4.526 -
   4.527 -
   4.528 - val ((pt,p),tacis) = get_calc 1;
   4.529 - val str = pr_ptree pr_short pt;
   4.530 - writeln str;
   4.531 -
   4.532 - print_depth 3;
   4.533 - term2str (fst (get_obj g_result pt [1]));
   4.534 -
   4.535 -
   4.536 -
   4.537 -
   4.538 -"###### ptyps:= intermediate_ptyps;met:= intermediate_mets;#######";
   4.539 -"###### ptyps:= intermediate_ptyps;met:= intermediate_mets;#######";
   4.540 -"###### ptyps:= intermediate_ptyps;met:= intermediate_mets;#######";
   4.541 -ptyps:= intermediate_ptyps;
   4.542 -mets:= intermediate_mets;
   4.543 -========== inhibit exn AK110721 ================================================*)
   4.544  
   4.545  
   4.546  
   4.547 @@ -562,8 +34,8 @@
   4.548  end
   4.549  
   4.550  
   4.551 -(*========== inhibit exn 110719 ================================================
   4.552 -============ inhibit exn 110719 ==============================================*)
   4.553 +(*========== inhibit exn AK110725 ================================================
   4.554 +============ inhibit exn AK110725 ==============================================*)
   4.555  
   4.556  
   4.557  (*-.-.-.-.-.-isolate response.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
     5.1 --- a/test/Tools/isac/xmlsrc/datatypes.sml	Sun Jul 24 19:38:53 2011 +0200
     5.2 +++ b/test/Tools/isac/xmlsrc/datatypes.sml	Mon Jul 25 11:52:07 2011 +0200
     5.3 @@ -1,5 +1,5 @@
     5.4 -(* test for sml/xmlsrc/datatypes.sml
     5.5 -   authors: Walther Neuper 2003
     5.6 +(* Title: test for sml/xmlsrc/datatypes.sml
     5.7 +   Authors: Walther Neuper 2003
     5.8     (c) due to copyright terms
     5.9  
    5.10  use"../smltest/xmlsrc/datatypes.sml";
    5.11 @@ -20,10 +20,28 @@
    5.12  "----------- fun rules2xml ---------------------------------------";
    5.13  "----------- fun rules2xml ---------------------------------------";
    5.14  "----------- fun rules2xml ---------------------------------------";
    5.15 +
    5.16  show_thes();
    5.17  val thyID = "Test";
    5.18 +
    5.19 +(*========== inhibit exn AK110725 ================================================
    5.20  val thydata = get_the ["IsacKnowledge", "Test", "Rulesets", "ac_plus_times"];
    5.21 -val Hrls {thy_rls = (_,Rls {rules=rules as rule::_,...}),...} = thydata;
    5.22 +(*AK110725 
    5.23 +(*val thydata = get_the ["IsacKnowledge", "Test", "Rulesets", "ac_plus_times"]; 
    5.24 +  (* ERROR: get_pbt not found: ["IsacKnowledge","Test","Rulesets","ac_plus_times"] *)*)
    5.25 +"~~~~~ fun get_the, args:"; val (theID:theID) = (["IsacKnowledge", "Test", "Rulesets", "ac_plus_times"]);
    5.26 +(*get_py  (Thy_Info.get_theory "Pure") theID theID (! thehier); 
    5.27 +  (* ERROR: get_pbt not found: ["IsacKnowledge","Test","Rulesets","ac_plus_times"] *)*)
    5.28 +print_depth 999;
    5.29 +(!thehier);
    5.30 +
    5.31 +(*"~~~~~ fun get_py, args:"; val (thy, d, _, []) = ((Thy_Info.get_theory "Pure"), theID, theID, (! thehier));*)
    5.32 +"~~~~~ fun get_py, args:"; val (thy, d, _, [_]) = ((Thy_Info.get_theory "Pure"), theID, theID, (!thehier));
    5.33 +error ("get_pbt not found: "^(strs2str d));
    5.34 +(*AK110725 To be continued...s*)
    5.35 +*)
    5.36 +
    5.37 +val Hrls {thy_rls = (_,Rls {rules = rules as rule::_,...}),...} = thydata;
    5.38  
    5.39  (*for rule2xml...*)
    5.40  val (j, thyID, Thm (thmID, thm)) = (2, thyID, rule);
    5.41 @@ -35,6 +53,7 @@
    5.42  "----------- fun thm''2xml ---------------------------------------";
    5.43  "----------- fun thm''2xml ---------------------------------------";
    5.44  "----------- fun thm''2xml ---------------------------------------";
    5.45 +
    5.46  show_thes();
    5.47  val theID = ["IsacKnowledge", "Diff", "Theorems", "frac_conv"];
    5.48  val thydata = get_the theID;
    5.49 @@ -46,4 +65,5 @@
    5.50  
    5.51  
    5.52  (* use"../smltest/xmlsrc/datatypes.sml";
    5.53 -   *)
    5.54 \ No newline at end of file
    5.55 +   *)
    5.56 +============ inhibit exn AK110725 ==============================================*)
     6.1 --- a/test/Tools/isac/xmlsrc/mathml.sml	Sun Jul 24 19:38:53 2011 +0200
     6.2 +++ b/test/Tools/isac/xmlsrc/mathml.sml	Mon Jul 25 11:52:07 2011 +0200
     6.3 @@ -1,5 +1,5 @@
     6.4 -(* tests for mathml.sml
     6.5 -   author: Walther Neuper 060311
     6.6 +(* Title: tests for mathml.sml
     6.7 +   Author: Walther Neuper 060311
     6.8     (c) isac-team 2006
     6.9  
    6.10  use"../smltest/xmlsrc/mathml.sml";
    6.11 @@ -25,7 +25,6 @@
    6.12  "-----------------------------------------------------------------";
    6.13  (*==================================================================*)
    6.14  
    6.15 -
    6.16  "--------- encode ^^^ -> ^ ---------------------------------------";
    6.17  "--------- encode ^^^ -> ^ ---------------------------------------";
    6.18  "--------- encode ^^^ -> ^ ---------------------------------------";
    6.19 @@ -33,20 +32,41 @@
    6.20  if decode str = "a^2+b^2=c^2" then ()
    6.21  else error "mathml.sml: diff.behav. in encode ^^^ -> ^";
    6.22  
    6.23 -"--------- encode < -> &lt and > -> &gt --------------------------";
    6.24 -"--------- encode < -> &lt and > -> &gt --------------------------";
    6.25 -"--------- encode < -> &lt and > -> &gt --------------------------";
    6.26 +"--------- encode < -> &lt; and > -> &gt; --------------------------";
    6.27 +"--------- encode < -> &lt; and > -> &gt; --------------------------";
    6.28 +"--------- encode < -> &lt; and > -> &gt; --------------------------";
    6.29  val str = "?bdv occurs_in ?b; 0 < ?n |] ==> ?a / ?b ^ ?n = ?a * ?b ^ - ?n";
    6.30 -if decode str = 
    6.31 -   "?bdv occurs_in ?b; 0 &lt ?n |] ==&gt ?a / ?b ^ ?n = ?a * ?b ^ - ?n" 
    6.32 -then () else error "mathml.sml: diff.behav. in encode '<' and '>'";
    6.33 +if decode str = "?bdv occurs_in ?b; 0 &lt; ?n |] ==&gt; ?a / ?b ^ ?n = ?a * ?b ^ - ?n" then ()
    6.34 +else error "mathml.sml: diff.behav. in encode '<' and '>'";
    6.35  
    6.36 +(*========== inhibit exn AK110725 ================================================
    6.37  "----- check 'manually' the xml-output of calling functions ------";
    6.38 -formula2xml 1 (str2term )
    6.39 +formula2xml 1 (str2term str);
    6.40  
    6.41 +(* AK110725 
    6.42 +(*str2term str; (* ERROR: Inner syntax error at "; 0 < ?n |] ==> ?a / ?b ^ ?n = ?a * ?b ^ - ?n"
    6.43 +                   Failed to parse term*)*)
    6.44 +"~~~~~ fun str2term, args:"; val (str) = (str);
    6.45 +Thy_Info.get_theory "Isac";
    6.46 +
    6.47 +parse_patt;
    6.48 +parse_patt (Thy_Info.get_theory "Isac");
    6.49 +(*parse_patt (Thy_Info.get_theory "Isac") str; (* ERROR: Inner syntax error at "; 0 < ?n |] ==> ?a / ?b ^ ?n = ?a * ?b ^ - ?n"
    6.50 +Failed to parse term*)*)
    6.51 +
    6.52 +"~~~~~ fun parse_patt, args:"; val (thy, str) = ((Thy_Info.get_theory "Isac"), str);
    6.53 +(thy, str) 
    6.54 +|>> thy2ctxt
    6.55 +(*|-> ProofContext.read_term_pattern (*ERROR: Inner syntax error at "; 0 < ?n |] ==> ?a / ?b ^ ?n = ?a * ?b ^ - ?n"
    6.56 +Failed to parse term*)*)
    6.57 +
    6.58 +ProofContext.read_term_pattern;
    6.59 +(@{theory "Isac"}, str) |>> thy2ctxt;
    6.60 +"~~~~~ fun ProofContext.read_term_pattern, args:"; val () = ();
    6.61 +(*AK110725 To be continued...*)
    6.62 +*)
    6.63  (*==================================================================*)
    6.64  "-----------------------------------------------------------------";
    6.65  "exported from struct --------------------------------------------";
    6.66  "-----------------------------------------------------------------";
    6.67 -
    6.68 -
    6.69 +========== inhibit exn AK110725 ================================================*)
     7.1 --- a/test/Tools/isac/xmlsrc/pbl-met-hierarchy.sml	Sun Jul 24 19:38:53 2011 +0200
     7.2 +++ b/test/Tools/isac/xmlsrc/pbl-met-hierarchy.sml	Mon Jul 25 11:52:07 2011 +0200
     7.3 @@ -1,5 +1,5 @@
     7.4 -(* tests for sml/xmlsrc/pbl-met-hierarchy.sml
     7.5 -   author: Walther Neuper 060209
     7.6 +(* Title: tests for sml/xmlsrc/pbl-met-hierarchy.sml
     7.7 +   Author: Walther Neuper 060209
     7.8     (c) isac-team 2006
     7.9  
    7.10  use"../smltest/xmlsrc/pbl-met-hierarchy.sml";
    7.11 @@ -8,7 +8,7 @@
    7.12  CAUTION with testing *2file functions -- they are actually writing !!!
    7.13  *)
    7.14  
    7.15 -val thy = (theory "Isac");
    7.16 +val thy = @{theory "Isac"};
    7.17  
    7.18  "-----------------------------------------------------------------";
    7.19  "table of contents -----------------------------------------------";
    7.20 @@ -35,7 +35,11 @@
    7.21  ***
    7.22  Exception- OPTION raised
    7.23  *)
    7.24 -pbl2xml ["Biegelinien"] (get_pbt ["Biegelinien"]);
    7.25 +
    7.26 +
    7.27 +(*========== inhibit exn AK110725 ================================================
    7.28 +  pbl2xml ["Biegelinien"] (get_pbt ["Biegelinien"]);
    7.29 +
    7.30  (* val id = ["Biegelinie"];
    7.31     val {(*guh,*)cas,met,ppc,prls,thy,where_} = get_pbt ["Biegelinie"];
    7.32     AND STEP THROUGH pbl2xml ...
    7.33 @@ -72,3 +76,5 @@
    7.34  thes2file          (path ^ "thy/");
    7.35  *)
    7.36  
    7.37 +
    7.38 +============ inhibit exn AK110725 ==============================================*)
     8.1 --- a/test/Tools/isac/xmlsrc/thy-hierarchy.sml	Sun Jul 24 19:38:53 2011 +0200
     8.2 +++ b/test/Tools/isac/xmlsrc/thy-hierarchy.sml	Mon Jul 25 11:52:07 2011 +0200
     8.3 @@ -1,5 +1,5 @@
     8.4 -(* tests for sml/xmlsrc/thy-hierarchy.sml
     8.5 -   authors: Walther Neuper 060113
     8.6 +(* Title: tests for sml/xmlsrc/thy-hierarchy.sml
     8.7 +   Authors: Walther Neuper 060113
     8.8     (c) due to copyright terms
     8.9  
    8.10  use"../smltest/xmlsrc/thy-hierarchy.sml";
    8.11 @@ -8,7 +8,7 @@
    8.12  CAUTION with testing *2file functions -- they are actually writing to ~/tmp
    8.13  *)
    8.14  
    8.15 -val thy = (theory "Isac");
    8.16 +val thy = @{theory "Isac"};
    8.17  
    8.18  "-----------------------------------------------------------------";
    8.19  "table of contents -----------------------------------------------";
    8.20 @@ -51,6 +51,7 @@
    8.21  val thy = assoc_thy (thyID2theory' thy');
    8.22  
    8.23  "collect_thms thy'------------------------------------------------";
    8.24 +(*========== inhibit exn AK110725 ================================================
    8.25  (PureThy.all_thms_of thy);
    8.26  
    8.27  (apfst single) ("Integrate.integral_var", integral_var);
    8.28 @@ -65,6 +66,7 @@
    8.29  (makeHthm ("IsacKnowledge",thy')) ("Integrate.integral_var", integral_var);
    8.30  map (makeHthm ("IsacKnowledge",thy')) (PureThy.all_thms_of thy);
    8.31  collect_thms' ("IsacKnowledge",thy');
    8.32 +========== inhibit exn AK110725 ================================================*)
    8.33  
    8.34  "collect_rlss thy'------------------------------------------------";
    8.35  makeHrls "IsacKnowledge" ("integration_rules", (thy', integration_rules));
    8.36 @@ -75,6 +77,7 @@
    8.37  			  (!ruleset');
    8.38  collect_rlss ("IsacKnowledge",thy');
    8.39  
    8.40 +(*========== inhibit exn AK110725 ================================================
    8.41  "collect_thy thy-------------------------------------------------";
    8.42  val thy' = "ListG";
    8.43  val thy = assoc_thy (thyID2theory' thy');
    8.44 @@ -83,6 +86,7 @@
    8.45   (collect_cals ("IsacKnowledge",thy')) @ 
    8.46   (collect_ords ("IsacKnowledge",thy')));
    8.47  collect_thy "IsacKnowledge" thy';
    8.48 +========== inhibit exn AK110725 ================================================*)
    8.49  
    8.50  "collect_thydata -------------------------------------------------";
    8.51  (!isab_thm_thy);
    8.52 @@ -94,10 +98,11 @@
    8.53  
    8.54  "thy_hierarchy ---------------------------------------------------";
    8.55  val theID = ["IsacScripts", "ListG", "Theorems", "append_Cons"]:theID;
    8.56 +(*========== inhibit exn AK110725 ================================================
    8.57  val thydat as (theID, thydata) = 
    8.58 -    (theID, Hthm {guh=theID2guh theID, mathauthors=[],
    8.59 -     coursedesign=[], thm=append_Cons});
    8.60 -
    8.61 +    (theID, Hthm {guh = theID2guh theID, mathauthors = [],
    8.62 +     coursedesign = [], thm = append_Cons});
    8.63 +========== inhibit exn AK110725 ================================================*)
    8.64  val th = [] : thehier;
    8.65  val theID' = cut_theID th theID;
    8.66  val th = fill_parents th theID' theID;
    8.67 @@ -123,6 +128,7 @@
    8.68  thy_hierarchy2file path;
    8.69  *)
    8.70  
    8.71 +(*========== inhibit exn AK110725 ================================================
    8.72  get_the ["IsacKnowledge"];
    8.73  get_the ["IsacKnowledge", "Test"];
    8.74  get_the ["IsacKnowledge", "Test", "Theorems"];
    8.75 @@ -148,6 +154,7 @@
    8.76  val theID = ["IsacKnowledge", "Poly", "Rulesets", "norm_Poly"];
    8.77  val rlsdata = get_the theID;
    8.78  writeln(thydata2xml (theID, rlsdata));
    8.79 +========== inhibit exn AK110725 ================================================*)
    8.80  
    8.81  (*FIXXXXXXXME.WN060714 in rls make Calc : calc -> rule [add scriptop!]
    8.82    see sml/../datatypes.sml !
    8.83 @@ -247,11 +254,15 @@
    8.84  
    8.85  val ptyp = hd (! thehier);
    8.86  val theID = ["IsacKnowledge","Integrate","Rulesets","add_new_c"];
    8.87 +(*========== inhibit exn AK110725 ================================================
    8.88  val thydata = get_the theID;
    8.89 +
    8.90  (* creates a file ...
    8.91  thydata2file "~/tmp/"[] theID thydata (*reports Exception- Match in question*);
    8.92  *)
    8.93 +
    8.94  thydata2xml (theID, thydata) (*reports Exception- Match in question*);
    8.95 +
    8.96  val (theID:theID, Hrls {guh, coursedesign, mathauthors, thy_rls}) = 
    8.97      (theID, thydata);
    8.98  rls2xml i thy_rls (*reports Exception- Match in question*);
    8.99 @@ -263,4 +274,4 @@
   8.100  			 srls, calc, rules, scr})) = 
   8.101      (j, (thyID, "Seq", data));
   8.102  rules2xml (j+2*i) thyID rules (*reports Exception- Match in question*);
   8.103 -
   8.104 +============ inhibit exn AK110725 ==============================================*)