src/smltest/IsacKnowledge/simplify.sml
branchstart_Take
changeset 682 634a6268de81
parent 672 8e8e94006f2c
     1.1 --- a/src/smltest/IsacKnowledge/simplify.sml	Fri Nov 03 14:30:32 2006 +0100
     1.2 +++ b/src/smltest/IsacKnowledge/simplify.sml	Fri Nov 03 18:15:55 2006 +0100
     1.3 @@ -12,6 +12,7 @@
     1.4  "table of contents -----------------------------------------------";
     1.5  "-----------------------------------------------------------------";
     1.6  "----------- CAS-command Simplify --------------------------------";
     1.7 +"----------- append inform with final result ---------------------";
     1.8  "-----------------------------------------------------------------";
     1.9  "-----------------------------------------------------------------";
    1.10  "-----------------------------------------------------------------";
    1.11 @@ -34,20 +35,22 @@
    1.12  else raise error "simplify.sml: diff.behav. CAScmd: Simplify (2*a + 3*a)";
    1.13  
    1.14  
    1.15 +"----------- append inform with final result ---------------------";
    1.16 +"----------- append inform with final result ---------------------";
    1.17 +"----------- append inform with final result ---------------------";
    1.18 +states:=[];
    1.19 +CalcTree [(["term ((14 * x * y) / ( x * y ))", "normalform N"],
    1.20 +	   ("Rational.thy",["rational","simplification"],
    1.21 +	    ["simplification","of_rationals"]))];
    1.22 +Iterator 1;
    1.23 +moveActiveRoot 1;
    1.24 +autoCalculate 1 CompleteCalcHead;
    1.25 +autoCalculate 1 (Step 1);
    1.26 +appendFormula 1 "14";
    1.27 +val ((pt,p),_) = get_calc 1; show_pt pt;
    1.28  
    1.29 -
    1.30 -
    1.31 -
    1.32 -
    1.33 -
    1.34 -
    1.35 -
    1.36 -
    1.37 -
    1.38 -
    1.39 -
    1.40 -
    1.41 -
    1.42 -
    1.43 -
    1.44 -
    1.45 +autoCalculate 1 (Step 1);
    1.46 +val ((pt,p),_) = get_calc 1; show_pt pt;
    1.47 +val Form res = (#1 o pt_extract) (pt, ([],Res));
    1.48 +if p = ([], Res) andalso term2str res = "14" then ()
    1.49 +else raise error "simplify.sml: append inform with final result ?!?";