# HG changeset patch # User wneuper # Date 1109959326 -3600 # Node ID e28395152230e5b596c1b14df49e69bb8697ab21 # Parent de62f4a39c049294b1846a96915e2f25d5572ca8 sml-050304b-inform: all tests ok except 3 in auto-inform.sml diff -r de62f4a39c04 -r e28395152230 src/sml/systest/ctree.sml --- a/src/sml/systest/ctree.sml Fri Mar 04 19:02:06 2005 +0100 +++ b/src/sml/systest/ctree.sml Fri Mar 04 19:02:06 2005 +0100 @@ -4,7 +4,7 @@ *) "-----------------------------------------------------------------"; -"=====new ptree 1 miniscript with mini-subpbl ===================="; +"-------------- build miniscript stepwise BEFORE ALL TESTS -------"; "-------------- get_allpos' (from ptree above)--------------------"; (**#####################################################################(**) "-------------- cut_level (from ptree above)----------------------"; @@ -50,12 +50,12 @@ "-----------------------------------------------------------------"; - - - -"=====new ptree 1 miniscript with mini-subpbl ===================="; -"=====new ptree 1 miniscript with mini-subpbl ===================="; -"=====new ptree 1 miniscript with mini-subpbl ===================="; +"-------------- build miniscript stepwise BEFORE ALL TESTS -------"; +"-------------- build miniscript stepwise BEFORE ALL TESTS -------"; +"-------------- build miniscript stepwise BEFORE ALL TESTS -------"; +"this build should be detailed each time a test fails later \ +\i.e. all the tests should be caught here first \ +\and linked with a reference to the respective test environment"; val fmz = ["equality (x+1=2)", "solveFor x","solutions L"]; val (dI',pI',mI') = @@ -75,9 +75,17 @@ val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val (p,_,f,nxt,_,pt) = me nxt p [1] pt; -(*###cappend_form: pos =[1] ... while calculating nxt, which pt is dropped -val nxt = ("Apply_Method", Apply_Method ["Test", "squ-equ-test-subpbl1"])*) +"ctree.sml-------------- get_allpos' new ------------------------\""; +val (PP, pp) = split_last [1]; +val ((pt', cuts), clevup) = cut_bottom (PP, pp) (get_nd pt PP); +val cuts = get_allp [] ([], ([],Frm)) pt; +val cuts2 = get_allps [] [1] (children pt); +"ctree.sml-------------- cut_tree new (from ptree above)----------"; +val (pt', cuts) = cut_tree pt ([1],Frm); +"ctree.sml-------------- cappend on complete ctree from above ----"; +val (pt', cuts) = cappend_form pt [1] e_istate (str2term "Inform[1]"); +"----------------------------------------------------------------/"; val (p,_,f,nxt,_,pt) = me nxt p [1] pt(*cappend_form: pos =[1]*); val (p,_,f,nxt,_,pt) = me nxt p [1] pt(*cappend_atomic: pos =[1]*); val (p,_,f,nxt,_,pt) = me nxt p [1] pt(*cappend_atomic: pos =[2]*); @@ -1105,6 +1113,26 @@ "-------------- cappend on complete ctree from above -------------"; "-------------- cappend on complete ctree from above -------------"; +"---(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; +if cuts = [([2, 1], Frm), ([2, 1], Res), ([2, 2], Res), ([2, 3], Res), + ([2, 4], Res), ([2, 5], Res), ([2, 6], Res), ([2], Res), ([3], Pbl), + ([3, 1], Frm), ([3, 1], Res), ([3, 2, 1], Frm), ([3, 2, 1], Res), + ([3, 2, 2], Res), ([3, 2], Res), ([3], Res), ([4], Res)] then () else +raise error "ctree.sml: diff:behav. in complete pt: append_atomic[1] cuts"; +val afterins = get_allp [] ([], ([],Frm)) pt'; +print_depth 99; +afterins; +print_depth 3; +if afterins = [([1], Frm), ([1], Res), ([], Res)] then () else +raise error "ctree.sml: diff:behav. in complete pt: append_atomic[1] afterins"; +show_pt pt'; + + "---(3) on S(606)..S(608)--------"; val (pt', cuts) = cappend_atomic pt [2] e_istate (str2term "Inform[2]") (Tac "test") (str2term "Inres[2]",[]) Complete;