Test_Isac works again, perfectly ..
# the same tests works as in 8df4b6196660 (the *child* of "Test_Isac works...")
# ..EXCEPT those marked with "exception Div raised"
# for general state of tests see Test_Isac section {* history of tests *}.
1 (* tests on simplification
4 (c) due to copyright terms
6 use"../smltest/IsacKnowledge/simplify.sml";
10 "--------------------------------------------------------";
11 "--------------------------------------------------------";
12 "table of contents --------------------------------------";
13 "--------------------------------------------------------";
14 "----------- CAS-command Simplify -----------------------";
15 "----------- append inform with final result ------------";
16 "--------------------------------------------------------";
17 "--------------------------------------------------------";
18 "--------------------------------------------------------";
20 val thy = @{theory "Simplify"};
22 "----------- CAS-command Simplify -----------------------";
23 "----------- CAS-command Simplify -----------------------";
24 "----------- CAS-command Simplify -----------------------";
25 (*============ inhibit exn WN120321 ==============================================
26 WN120321.TODO reanimate test/../simplify.sml: CAS-command Simplify
29 CalcTree [([], ("e_domID", ["e_pblID"], ["e_metID"]))];
32 replaceFormula 1 "Simplify (2*a + 3*a)";
33 autoCalculate 1 (Step 1);
34 autoCalculate 1 CompleteCalc;
35 val ((pt,p),_) = get_calc 1;
36 val Form res = (#1 o pt_extract) (pt, ([],Res)); show_pt pt; term2str res;
37 if p = ([], Res) andalso term2str res = "5 * a" then ()
38 else error "simplify.sml: diff.behav. CAScmd: Simplify (2*a + 3*a)";
39 ============ inhibit exn WN120321 ==============================================*)
42 "----------- append inform with final result ------------";
43 "----------- append inform with final result ------------";
44 "----------- append inform with final result ------------";
46 CalcTree [(["Term ((14 * x * y) / ( x * y ))", "normalform N"],
47 ("Rational", ["rational","simplification"], ["simplification","of_rationals"]))];
50 autoCalculate 1 CompleteCalcHead;
51 val ((pt,p),_) = get_calc 1; show_pt pt;
53 (([], Frm), Simplify (14 * x * y / (x * y)))] *)
54 pt_extract (pt, p); (*determines SOME (Apply_Method ["simplification", "of_rationals"])*)
56 autoCalculate 1 (Step 1);
57 val ((pt,p),_) = get_calc 1; show_pt pt;
59 (([], Frm), Simplify (14 * x * y / (x * y))),
60 (([1], Frm), 14 * x * y / (x * y))] *)
63 val ((pt,p),_) = get_calc 1; show_pt pt;
65 (([], Frm), Simplify (14 * x * y / (x * y))),
66 (([1], Frm), 14 * x * y / (x * y)),
67 (([1,1], Frm), 14 * x * y / (x * y)),
68 (([1,1], Res), 14 * (x * y) / (x * y)),
69 (([1,2], Res), 14 / 1),
73 autoCalculate 1 (Step 1);
74 val ((pt,p),_) = get_calc 1; show_pt pt;
76 (([], Frm), Simplify (14 * x * y / (x * y))),
77 (([1], Frm), 14 * x * y / (x * y)),
78 (([1,1], Frm), 14 * x * y / (x * y)),
79 (([1,1], Res), 14 * (x * y) / (x * y)),
80 (([1,2], Res), 14 / 1),
84 val Form res = (#1 o pt_extract) (pt, ([],Res));
85 if p = ([], Res) andalso term2str res = "14" then ()
86 else error "simplify.sml: append inform with final result changed";