test/Tools/isac/Knowledge/simplify.sml
changeset 52105 2786cc9704c8
parent 42400 dcacb8077a98
child 55402 d580d7fc9b8e
     1.1 --- a/test/Tools/isac/Knowledge/simplify.sml	Mon Sep 16 11:28:43 2013 +0200
     1.2 +++ b/test/Tools/isac/Knowledge/simplify.sml	Mon Sep 16 12:20:00 2013 +0200
     1.3 @@ -44,24 +44,44 @@
     1.4  "----------- append inform with final result ------------";
     1.5  states:=[];
     1.6  CalcTree [(["Term ((14 * x * y) / ( x * y ))", "normalform N"],
     1.7 -	   ("Rational",["rational","simplification"],
     1.8 -	    ["simplification","of_rationals"]))];
     1.9 +	("Rational", ["rational","simplification"], ["simplification","of_rationals"]))];
    1.10  Iterator 1;
    1.11  moveActiveRoot 1;
    1.12  autoCalculate 1 CompleteCalcHead;
    1.13 -
    1.14 -val ((pt,p),_) = get_calc 1;
    1.15 -pt_extract (pt, p);
    1.16 +val ((pt,p),_) = get_calc 1; show_pt pt; 
    1.17 +(*[
    1.18 +(([], Frm), Simplify (14 * x * y / (x * y)))] *)
    1.19 +pt_extract (pt, p); (*determines SOME (Apply_Method ["simplification", "of_rationals"])*)
    1.20  
    1.21  autoCalculate 1 (Step 1);
    1.22 +val ((pt,p),_) = get_calc 1; show_pt pt;
    1.23 +(*[
    1.24 +(([], Frm), Simplify (14 * x * y / (x * y))),
    1.25 +(([1], Frm), 14 * x * y / (x * y))] *)
    1.26  
    1.27  appendFormula 1 "14";
    1.28  val ((pt,p),_) = get_calc 1; show_pt pt;
    1.29 +(*[
    1.30 +(([], Frm), Simplify (14 * x * y / (x * y))),
    1.31 +(([1], Frm), 14 * x * y / (x * y)),
    1.32 +(([1,1], Frm), 14 * x * y / (x * y)),
    1.33 +(([1,1], Res), 14 * (x * y) / (x * y)),
    1.34 +(([1,2], Res), 14 / 1),
    1.35 +(([1,3], Res), 14),
    1.36 +(([1], Res), 14)]*)
    1.37  
    1.38  autoCalculate 1 (Step 1);
    1.39  val ((pt,p),_) = get_calc 1; show_pt pt;
    1.40 +(*[
    1.41 +(([], Frm), Simplify (14 * x * y / (x * y))),
    1.42 +(([1], Frm), 14 * x * y / (x * y)),
    1.43 +(([1,1], Frm), 14 * x * y / (x * y)),
    1.44 +(([1,1], Res), 14 * (x * y) / (x * y)),
    1.45 +(([1,2], Res), 14 / 1),
    1.46 +(([1,3], Res), 14),
    1.47 +(([1], Res), 14),
    1.48 +(([], Res), 14)] *)
    1.49  val Form res = (#1 o pt_extract) (pt, ([],Res));
    1.50 -term2str res = "??.empty";
    1.51  if p = ([], Res) andalso term2str res = "14" then ()
    1.52 -else error "simplify.sml: append inform with final result ?!?";
    1.53 +else error "simplify.sml: append inform with final result changed";
    1.54