working on inform with simplify rational 2, checks in test start_Take
authorwneuper
Thu, 02 Nov 2006 17:16:17 +0100
branchstart_Take
changeset 678fe2d54776716
parent 677 4116020324ab
child 679 06f363494447
working on inform with simplify rational 2, checks in test
src/smltest/ME/inform.sml
     1.1 --- a/src/smltest/ME/inform.sml	Thu Nov 02 16:51:12 2006 +0100
     1.2 +++ b/src/smltest/ME/inform.sml	Thu Nov 02 17:16:17 2006 +0100
     1.3 @@ -479,28 +479,20 @@
     1.4  autoCalculate 1 (Step 1);
     1.5  "--- input the next formula that _should_ be presented by mat-engine";
     1.6  appendFormula 1 "(4 * y + -3 * x) / (x * y) + -1";
     1.7 +val ((pt,p),_) = get_calc 1;
     1.8 +if p = ([4], Res) andalso (length o children o (get_nd pt)) (fst p) = 2 then ()
     1.9 +else raise error ("inform.sml: [rational,simplification] 1");
    1.10 +
    1.11  "--- input the next formula that would be presented by mat-engine";
    1.12  (*autoCalculate 1 (Step 1);*)
    1.13  appendFormula 1 "(4 * y + -3 * x + -1 * (x * y)) / (x * y)";
    1.14 -
    1.15  val ((pt,p),_) = get_calc 1;
    1.16 -show_pt pt;
    1.17 -(*
    1.18 -if p = ([], Res) then ()
    1.19 -else raise error "inform.sml: diff.behav. CAScmd ([],Pbl) FE-interface";
    1.20 -*)
    1.21 -
    1.22 -(*
    1.23 -print_depth 9;
    1.24 -print_depth 5; cs'; print_depth 3;
    1.25 -val (_,_,(pptt,pp)) = cs';
    1.26 -val tt = get_obj g_res pptt [4];
    1.27 -term2str tt;
    1.28 -
    1.29 -(mk_tacis rew_ord erls) (nth 1 der);
    1.30 -*)
    1.31 -
    1.32 -
    1.33 +if p = ([5], Res) andalso (length o children o (get_nd pt)) (fst p) = 0 then ()
    1.34 +else raise error ("inform.sml: [rational,simplification] 2");
    1.35  
    1.36  "--- input the exact final result";(*TODO: Exception- LIST "last_elem" raised*)
    1.37  appendFormula 1 "(-3 * x + 4 * y + -1 * x * y) / (x * y)";
    1.38 +val ((pt,p),_) = get_calc 1;
    1.39 +if p = ([6], Res) andalso (length o children o (get_nd pt)) (fst p) = 2 then ()
    1.40 +else raise error ("inform.sml: [rational,simplification] 3");
    1.41 +show_pt pt;