test/Tools/isac/MathEngine/me-misc.sml
author wneuper <Walther.Neuper@jku.at>
Sun, 11 Sep 2022 14:31:15 +0200
changeset 60549 c0a775618258
parent 60340 0ee698b0a703
child 60571 19a172de0bb5
permissions -rw-r--r--
resolve name clash in get_calc
     1 (* Title:  "MethEngine/me-misc.sml"
     2    Author: Walther Neuper
     3    (c) due to copyright terms
     4 *)
     5 
     6 "-----------------------------------------------------------------------------------------------";
     7 "table of contents -----------------------------------------------------------------------------";
     8 "-----------------------------------------------------------------------------------------------";
     9 "----------- fun get_interval after replace} other 2 -------------------------------------------";
    10 "-----------------------------------------------------------------------------------------------";
    11 "-----------------------------------------------------------------------------------------------";
    12 "-----------------------------------------------------------------------------------------------";
    13 
    14 "----------- fun get_interval after replace} other 2 -------------------------------------------";
    15 "----------- fun get_interval after replace} other 2 -------------------------------------------";
    16 "----------- fun get_interval after replace} other 2 -------------------------------------------";
    17 States.reset ();
    18  CalcTree [(["equality (x+1=(2::real))", "solveFor x", "solutions L"], 
    19    ("Test", ["sqroot-test", "univariate", "equation", "test"],
    20     ["Test", "squ-equ-test-subpbl1"]))];
    21  Iterator 1;
    22  moveActiveRoot 1;
    23  autoCalculate 1 CompleteCalc;
    24  moveActiveFormula 1 ([2],Res); (*there is "-1 + x = 0"*)
    25  replaceFormula 1 "x = 1"; 
    26  (*... returns calcChangedEvent with ...*)
    27  val (unc, del, gen) = (([1],Res), ([4],Res), ([3,2],Res));
    28  val ((pt,_),_) = States.get_calc 1;
    29 
    30 (*default_print_depth 99*)map fst3 (ME_Misc.get_interval ([],Pbl) ([],Res) 9999 pt);(*default_print_depth 3*)
    31 if map fst3 (ME_Misc.get_interval ([],Pbl) ([],Res) 9999 pt) = 
    32     [([], Pbl), ([1], Frm),([1], Res), ([2], Res), ([3], Pbl), ([3, 1], Frm), 
    33      ([3, 1], Res), ([3, 2, 1], Frm), ([3, 2, 1], Res), ([3, 2, 2], Res),
    34       ([3, 2], Res)] then () else
    35 error "calchead.sml: diff.behav. ME_Misc.get_interval after replace} other 2 a";
    36 
    37 (*default_print_depth 99*)map fst3 (ME_Misc.get_interval ([3, 2, 1], Res) ([],Res) 9999 pt); (*default_print_depth 3*)
    38 if map fst3 (ME_Misc.get_interval ([3, 2, 1], Res) ([],Res) 9999 pt) = 
    39     [([3, 2, 1], Res), ([3, 2, 2], Res), ([3, 2], Res)] then () else
    40 error "modspec.sml: diff.behav. ME_Misc.get_interval after replace} other 2 b";
    41