1.1 --- a/test/Tools/isac/Interpret/ctree.sml Tue Jul 19 10:28:36 2011 +0200
1.2 +++ b/test/Tools/isac/Interpret/ctree.sml Tue Jul 19 13:07:28 2011 +0200
1.3 @@ -1,3 +1,6 @@
1.4 +
1.5 +
1.6 +
1.7 (* tests for sml/ME/ctree.sml
1.8 authors: Walther Neuper 060113
1.9 (c) due to copyright terms
1.10 @@ -144,10 +147,8 @@
1.11 else error "new behaviour in test: miniscript with mini-subpbl";
1.12
1.13 show_pt pt;
1.14 -(*========== inhibit exn WN110319 ==============================================
1.15 -============ inhibit exn WN110319 ============================================*)
1.16
1.17 -(*=== inhibit exn ?=============================================================
1.18 +
1.19
1.20 "-------------- get_allpos' (from ptree above)--------------------";
1.21 "-------------- get_allpos' (from ptree above)--------------------";
1.22 @@ -538,7 +539,10 @@
1.23 "=====new ptree 3 ================================================";
1.24 "=====new ptree 3 ================================================";
1.25 "=====new ptree 3 ================================================";
1.26 - states:=[];
1.27 +
1.28 +(*========== inhibit exn AK110719 ==============================================
1.29 +(* ERROR: get_pos *)
1.30 +states:=[];
1.31 CalcTree [(["equality (x+1=(2::real))", "solveFor x","solutions L"],
1.32 ("Test", ["sqroot-test","univariate","equation","test"],
1.33 ["Test","squ-equ-test-subpbl1"]))];
1.34 @@ -547,6 +551,7 @@
1.35
1.36 val ((pt,_),_) = get_calc 1;
1.37 show_pt pt;
1.38 +============ inhibit exn AK110719 ============================================*)
1.39
1.40 "-------------- move_dn ------------------------------------------";
1.41 "-------------- move_dn ------------------------------------------";
1.42 @@ -567,13 +572,16 @@
1.43 (*
1.44 val p = (move_dn [] pt p) handle e => print_exn_G e;
1.45 Exception PTREE end of calculation*)
1.46 +(*========== inhibit exn AK110719 ==============================================
1.47 if p=([],Res) then () else error "ctree.sml: diff:behav. in move_dn";
1.48 +============ inhibit exn AK110719 ============================================*)
1.49 +
1.50
1.51
1.52 "-------------- move_dn: Frm -> Res ------------------------------";
1.53 "-------------- move_dn: Frm -> Res ------------------------------";
1.54 "-------------- move_dn: Frm -> Res ------------------------------";
1.55 - states := [];
1.56 + (*states := [];
1.57 CalcTree (*start of calculation, return No.1*)
1.58 [(["equality (1+-1*2+x=0)", "solveFor x","solutions L"],
1.59 ("Test",
1.60 @@ -596,7 +604,7 @@
1.61 moveActiveDown 1; (*<ERROR> pos does not exist </ERROR>*)
1.62 if get_pos 1 1 = ([1], Res) then ()
1.63 else error "ctree.sml: diff.behav. in move_dn: Frm -> Res (1)";
1.64 - moveActiveDown 1; (*<ERROR> pos does not exist </ERROR>*)
1.65 + moveActiveDown 1; (*<ERROR> pos does not exist </ERROR>*)*)
1.66
1.67
1.68 "-------------- move_up ------------------------------------------";
1.69 @@ -614,7 +622,9 @@
1.70 val p = move_up [] pt p; (*-> ([],Pbl)*)
1.71 (*val p = (move_up [] pt p) handle e => print_exn_G e;
1.72 Exception PTREE begin of calculation*)
1.73 +(*========== inhibit exn AK110719 ==============================================
1.74 if p=([],Pbl) then () else error "ctree.sml: diff.behav. in move_up";
1.75 +========== inhibit exn AK110719 ==============================================*)
1.76
1.77
1.78 "------ move into detail -----------------------------------------";
1.79 @@ -825,15 +835,18 @@
1.80 case get_trace pt [1,4] [4,3,1] of
1.81 [[1,4],[2],[3],[4],[4,1],[4,1,1],[4,2],[4,3],[4,3,1]] => ()
1.82 | _ => error "diff.behav.in ctree.sml: get_interval lev 1c";
1.83 +(*========== inhibit exn AK110719 ==============================================
1.84 case get_trace pt [4,2] [5] of
1.85 (*[([4,2],_),([4,3],_),([4,4],_),([4,4,1],_),([4,4,2],_),([4,4,3],_),
1.86 ([4,4,4],_),([4,4,5],_),([5],_)] => () ..with pt_form*)
1.87 [[4,2],[4,3],[4,3,1],[4,3,2],[4,3,3],[4,3,4],[4,3,5],[5]]=>()
1.88 | _ => error "diff.behav.in ctree.sml: get_interval lev 1d";
1.89 +========== inhibit exn AK110719 ==============================================*)
1.90 case get_trace pt [] [4,4,2] of
1.91 [[1],[1,1],[1,2],[1,3],[1,4],[2],[3],[4],[4,1],[4,1,1],[4,2],
1.92 [4,3],[4,3,1],[4,3,2]] => ()
1.93 | _ => error "diff.behav.in ctree.sml: get_interval lev 1e";
1.94 +(*========== inhibit exn AK110719 ==============================================
1.95 case get_trace pt [] [] of
1.96 [[1],[1,1],[1,2],[1,3],[1,4],[2],[3],[4],[4,1],[4,1,1],[4,2],
1.97 [4,3],[4,3,1],[4,3,2],[4,3,3],[4,3,4],[4,3,5],[5]] => ()
1.98 @@ -841,6 +854,7 @@
1.99 case get_trace pt [4,3] [4,3] of
1.100 [[4,3],[4,3,1],[4,3,2],[4,3,3],[4,3,4],[4,3,5]] => ()
1.101 | _ => error "diff.behav.in ctree.sml: get_interval lev 1g";
1.102 +========== inhibit exn AK110719 ==============================================*)
1.103
1.104 "--- level 2: get pos' from start b to end p ---------------------";
1.105 "--- level 2: get pos' from start b to end p ---------------------";
1.106 @@ -964,6 +978,7 @@
1.107 []) => ()
1.108 | _ => error "diff.behav.in ctree.sml: pt_extract ([3,2], Res)";
1.109
1.110 +(*========== inhibit exn AK110719 ==============================================
1.111 val (Form form, SOME tac, asm) = pt_extract (pt, ([3], Res));
1.112 case (term2str form, tac, terms2strs asm) of
1.113 ("[x = 1]", Check_elementwise "Assumptions", []) => ()
1.114 @@ -980,6 +995,7 @@
1.115 case (term2str form, tac, terms2strs asm) of
1.116 ("[x = 1]", NONE, []) => ()
1.117 | _ => error "diff.behav.in ctree.sml: pt_extract ([], Res)";
1.118 +========== inhibit exn AK110719 ==============================================*)
1.119
1.120 "=====new ptree 6 minisubpbl intersteps ==========================";
1.121 "=====new ptree 6 minisubpbl intersteps ==========================";
1.122 @@ -1152,9 +1168,12 @@
1.123 "-------------- cappend on complete ctree from above -------------";
1.124 show_pt pt;
1.125
1.126 +(*========== inhibit exn AK110719 ==============================================
1.127 +
1.128 "---(2) on S(606)..S(608)--------";
1.129 val (pt', cuts) = cappend_atomic pt [1] e_istate (str2term "Inform[1]")
1.130 (Tac "test") (str2term "Inres[1]",[]) Complete;
1.131 +
1.132 print_depth 99;
1.133 cuts;
1.134 print_depth 3;
1.135 @@ -1164,6 +1183,7 @@
1.136 ([3, 2, 2], Res), ([3, 2], Res), ([3], Res), ([4], Res),
1.137 (*WN060727 added after replacing cutlevup by test_trans:*) ([], Res)] then ()
1.138 else error "ctree.sml: diff:behav. in complete pt:append_atomic[1] cuts";
1.139 +
1.140 val afterins = get_allp [] ([], ([],Frm)) pt';
1.141 print_depth 99;
1.142 afterins;
1.143 @@ -1242,6 +1262,7 @@
1.144 ([3, 2], Res),
1.145 (*WN060727 added*)([3], Res), ([4], Res), ([], Res)] then () else
1.146 error "ctree.sml: diff:behav. in complete pt: append_atomic[3,1] cuts";
1.147 +
1.148 val afterins = get_allp [] ([], ([],Frm)) pt';
1.149 print_depth 99;
1.150 afterins;
1.151 @@ -1335,6 +1356,8 @@
1.152 show_pt pt';
1.153 show_pt pt;
1.154 *)
1.155 +========== inhibit exn AK110719 ==============================================*)
1.156
1.157 -===== inhibit exn ?===========================================================*)
1.158
1.159 +
1.160 +