1.1 --- a/src/sml/systest/ctree.sml Fri Mar 04 19:02:06 2005 +0100
1.2 +++ b/src/sml/systest/ctree.sml Fri Mar 04 19:02:06 2005 +0100
1.3 @@ -4,7 +4,7 @@
1.4 *)
1.5
1.6 "-----------------------------------------------------------------";
1.7 -"=====new ptree 1 miniscript with mini-subpbl ====================";
1.8 +"-------------- build miniscript stepwise BEFORE ALL TESTS -------";
1.9 "-------------- get_allpos' (from ptree above)--------------------";
1.10 (**#####################################################################(**)
1.11 "-------------- cut_level (from ptree above)----------------------";
1.12 @@ -50,12 +50,12 @@
1.13 "-----------------------------------------------------------------";
1.14
1.15
1.16 -
1.17 -
1.18 -
1.19 -"=====new ptree 1 miniscript with mini-subpbl ====================";
1.20 -"=====new ptree 1 miniscript with mini-subpbl ====================";
1.21 -"=====new ptree 1 miniscript with mini-subpbl ====================";
1.22 +"-------------- build miniscript stepwise BEFORE ALL TESTS -------";
1.23 +"-------------- build miniscript stepwise BEFORE ALL TESTS -------";
1.24 +"-------------- build miniscript stepwise BEFORE ALL TESTS -------";
1.25 +"this build should be detailed each time a test fails later \
1.26 +\i.e. all the tests should be caught here first \
1.27 +\and linked with a reference to the respective test environment";
1.28 val fmz = ["equality (x+1=2)",
1.29 "solveFor x","solutions L"];
1.30 val (dI',pI',mI') =
1.31 @@ -75,9 +75,17 @@
1.32 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
1.33 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
1.34 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
1.35 -(*###cappend_form: pos =[1] ... while calculating nxt, which pt is dropped
1.36 -val nxt = ("Apply_Method", Apply_Method ["Test", "squ-equ-test-subpbl1"])*)
1.37 +"ctree.sml-------------- get_allpos' new ------------------------\"";
1.38 +val (PP, pp) = split_last [1];
1.39 +val ((pt', cuts), clevup) = cut_bottom (PP, pp) (get_nd pt PP);
1.40
1.41 +val cuts = get_allp [] ([], ([],Frm)) pt;
1.42 +val cuts2 = get_allps [] [1] (children pt);
1.43 +"ctree.sml-------------- cut_tree new (from ptree above)----------";
1.44 +val (pt', cuts) = cut_tree pt ([1],Frm);
1.45 +"ctree.sml-------------- cappend on complete ctree from above ----";
1.46 +val (pt', cuts) = cappend_form pt [1] e_istate (str2term "Inform[1]");
1.47 +"----------------------------------------------------------------/";
1.48 val (p,_,f,nxt,_,pt) = me nxt p [1] pt(*cappend_form: pos =[1]*);
1.49 val (p,_,f,nxt,_,pt) = me nxt p [1] pt(*cappend_atomic: pos =[1]*);
1.50 val (p,_,f,nxt,_,pt) = me nxt p [1] pt(*cappend_atomic: pos =[2]*);
1.51 @@ -1105,6 +1113,26 @@
1.52 "-------------- cappend on complete ctree from above -------------";
1.53 "-------------- cappend on complete ctree from above -------------";
1.54
1.55 +"---(2) on S(606)..S(608)--------";
1.56 +val (pt', cuts) = cappend_atomic pt [1] e_istate (str2term "Inform[1]")
1.57 + (Tac "test") (str2term "Inres[1]",[]) Complete;
1.58 +print_depth 99;
1.59 +cuts;
1.60 +print_depth 3;
1.61 +if cuts = [([2, 1], Frm), ([2, 1], Res), ([2, 2], Res), ([2, 3], Res),
1.62 + ([2, 4], Res), ([2, 5], Res), ([2, 6], Res), ([2], Res), ([3], Pbl),
1.63 + ([3, 1], Frm), ([3, 1], Res), ([3, 2, 1], Frm), ([3, 2, 1], Res),
1.64 + ([3, 2, 2], Res), ([3, 2], Res), ([3], Res), ([4], Res)] then () else
1.65 +raise error "ctree.sml: diff:behav. in complete pt: append_atomic[1] cuts";
1.66 +val afterins = get_allp [] ([], ([],Frm)) pt';
1.67 +print_depth 99;
1.68 +afterins;
1.69 +print_depth 3;
1.70 +if afterins = [([1], Frm), ([1], Res), ([], Res)] then () else
1.71 +raise error "ctree.sml: diff:behav. in complete pt: append_atomic[1] afterins";
1.72 +show_pt pt';
1.73 +
1.74 +
1.75 "---(3) on S(606)..S(608)--------";
1.76 val (pt', cuts) = cappend_atomic pt [2] e_istate (str2term "Inform[2]")
1.77 (Tac "test") (str2term "Inres[2]",[]) Complete;