diff -r 25ca8a204fd8 -r 5b996050e25f test/Tools/isac/Interpret/ctree.sml --- a/test/Tools/isac/Interpret/ctree.sml Tue Jul 19 10:28:36 2011 +0200 +++ b/test/Tools/isac/Interpret/ctree.sml Tue Jul 19 13:07:28 2011 +0200 @@ -1,3 +1,6 @@ + + + (* tests for sml/ME/ctree.sml authors: Walther Neuper 060113 (c) due to copyright terms @@ -144,10 +147,8 @@ else error "new behaviour in test: miniscript with mini-subpbl"; show_pt pt; -(*========== inhibit exn WN110319 ============================================== -============ inhibit exn WN110319 ============================================*) -(*=== inhibit exn ?============================================================= + "-------------- get_allpos' (from ptree above)--------------------"; "-------------- get_allpos' (from ptree above)--------------------"; @@ -538,7 +539,10 @@ "=====new ptree 3 ================================================"; "=====new ptree 3 ================================================"; "=====new ptree 3 ================================================"; - states:=[]; + +(*========== inhibit exn AK110719 ============================================== +(* ERROR: get_pos *) +states:=[]; CalcTree [(["equality (x+1=(2::real))", "solveFor x","solutions L"], ("Test", ["sqroot-test","univariate","equation","test"], ["Test","squ-equ-test-subpbl1"]))]; @@ -547,6 +551,7 @@ val ((pt,_),_) = get_calc 1; show_pt pt; +============ inhibit exn AK110719 ============================================*) "-------------- move_dn ------------------------------------------"; "-------------- move_dn ------------------------------------------"; @@ -567,13 +572,16 @@ (* val p = (move_dn [] pt p) handle e => print_exn_G e; Exception PTREE end of calculation*) +(*========== inhibit exn AK110719 ============================================== if p=([],Res) then () else error "ctree.sml: diff:behav. in move_dn"; +============ inhibit exn AK110719 ============================================*) + "-------------- move_dn: Frm -> Res ------------------------------"; "-------------- move_dn: Frm -> Res ------------------------------"; "-------------- move_dn: Frm -> Res ------------------------------"; - states := []; + (*states := []; CalcTree (*start of calculation, return No.1*) [(["equality (1+-1*2+x=0)", "solveFor x","solutions L"], ("Test", @@ -596,7 +604,7 @@ moveActiveDown 1; (* pos does not exist *) if get_pos 1 1 = ([1], Res) then () else error "ctree.sml: diff.behav. in move_dn: Frm -> Res (1)"; - moveActiveDown 1; (* pos does not exist *) + moveActiveDown 1; (* pos does not exist *)*) "-------------- move_up ------------------------------------------"; @@ -614,7 +622,9 @@ val p = move_up [] pt p; (*-> ([],Pbl)*) (*val p = (move_up [] pt p) handle e => print_exn_G e; Exception PTREE begin of calculation*) +(*========== inhibit exn AK110719 ============================================== if p=([],Pbl) then () else error "ctree.sml: diff.behav. in move_up"; +========== inhibit exn AK110719 ==============================================*) "------ move into detail -----------------------------------------"; @@ -825,15 +835,18 @@ 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]] => () | _ => error "diff.behav.in ctree.sml: get_interval lev 1c"; +(*========== inhibit exn AK110719 ============================================== 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]]=>() | _ => error "diff.behav.in ctree.sml: get_interval lev 1d"; +========== inhibit exn AK110719 ==============================================*) 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]] => () | _ => error "diff.behav.in ctree.sml: get_interval lev 1e"; +(*========== inhibit exn AK110719 ============================================== 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]] => () @@ -841,6 +854,7 @@ 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]] => () | _ => error "diff.behav.in ctree.sml: get_interval lev 1g"; +========== inhibit exn AK110719 ==============================================*) "--- level 2: get pos' from start b to end p ---------------------"; "--- level 2: get pos' from start b to end p ---------------------"; @@ -964,6 +978,7 @@ []) => () | _ => error "diff.behav.in ctree.sml: pt_extract ([3,2], Res)"; +(*========== inhibit exn AK110719 ============================================== val (Form form, SOME tac, asm) = pt_extract (pt, ([3], Res)); case (term2str form, tac, terms2strs asm) of ("[x = 1]", Check_elementwise "Assumptions", []) => () @@ -980,6 +995,7 @@ case (term2str form, tac, terms2strs asm) of ("[x = 1]", NONE, []) => () | _ => error "diff.behav.in ctree.sml: pt_extract ([], Res)"; +========== inhibit exn AK110719 ==============================================*) "=====new ptree 6 minisubpbl intersteps =========================="; "=====new ptree 6 minisubpbl intersteps =========================="; @@ -1152,9 +1168,12 @@ "-------------- cappend on complete ctree from above -------------"; show_pt pt; +(*========== inhibit exn AK110719 ============================================== + "---(2) on S(606)..S(608)--------"; val (pt', cuts) = cappend_atomic pt [1] e_istate (str2term "Inform[1]") (Tac "test") (str2term "Inres[1]",[]) Complete; + print_depth 99; cuts; print_depth 3; @@ -1164,6 +1183,7 @@ ([3, 2, 2], Res), ([3, 2], Res), ([3], Res), ([4], Res), (*WN060727 added after replacing cutlevup by test_trans:*) ([], Res)] then () else error "ctree.sml: diff:behav. in complete pt:append_atomic[1] cuts"; + val afterins = get_allp [] ([], ([],Frm)) pt'; print_depth 99; afterins; @@ -1242,6 +1262,7 @@ ([3, 2], Res), (*WN060727 added*)([3], Res), ([4], Res), ([], Res)] then () else error "ctree.sml: diff:behav. in complete pt: append_atomic[3,1] cuts"; + val afterins = get_allp [] ([], ([],Frm)) pt'; print_depth 99; afterins; @@ -1335,6 +1356,8 @@ show_pt pt'; show_pt pt; *) +========== inhibit exn AK110719 ==============================================*) -===== inhibit exn ?===========================================================*) + +