test/Tools/isac/OLDTESTS/modspec.sml
author Walther Neuper <neuper@ist.tugraz.at>
Tue, 28 Sep 2010 09:06:56 +0200
branchisac-update-Isa09-2
changeset 38031 460c24a6a6ba
parent 37906 e2b23ba9df13
child 38058 ad0485155c0e
permissions -rw-r--r--
tuned error and writeln

# raise error --> error
# writeln in atomtyp, atomty, atomt and xmlsrc
neuper@37906
     1
(* WN040107
neuper@37906
     2
   use"../systest/modspec.sml";
neuper@37906
     3
   use"systest/modspec.sml";
neuper@37906
     4
   use"modspec.sml";
neuper@37906
     5
 *)
neuper@37906
     6
neuper@37906
     7
"--------- get_interval after replace} other 2 -------------------";
neuper@37906
     8
"-----------------------------------------------------------------";
neuper@37906
     9
neuper@37906
    10
neuper@37906
    11
"--------- get_interval after replace} other 2 -------------------";
neuper@37906
    12
"--------- get_interval after replace} other 2 -------------------";
neuper@37906
    13
"--------- get_interval after replace} other 2 -------------------";
neuper@37906
    14
 states:=[];
neuper@37906
    15
 CalcTree
neuper@37906
    16
 [(["equality (x+1=2)", "solveFor x","solutions L"], 
neuper@37906
    17
   ("Test.thy", 
neuper@37906
    18
    ["sqroot-test","univariate","equation","test"],
neuper@37906
    19
    ["Test","squ-equ-test-subpbl1"]))];
neuper@37906
    20
 Iterator 1;
neuper@37906
    21
 moveActiveRoot 1;
neuper@37906
    22
 autoCalculate 1 CompleteCalc;
neuper@37906
    23
 moveActiveFormula 1 ([2],Res); (*there is "-1 + x = 0"*)
neuper@37906
    24
 replaceFormula 1 "x = 1"; 
neuper@37906
    25
 (*... returns calcChangedEvent with ...*)
neuper@37906
    26
 val (unc, del, gen) = (([1],Res), ([4],Res), ([3,2],Res));
neuper@37906
    27
 val ((pt,_),_) = get_calc 1;
neuper@37906
    28
neuper@37906
    29
print_depth 99;map fst (get_interval ([],Pbl) ([],Res) 9999 pt);print_depth 3;
neuper@37906
    30
if map fst (get_interval ([],Pbl) ([],Res) 9999 pt) = 
neuper@37906
    31
    [([], Pbl), ([1], Frm),([1], Res), ([2], Res), ([3], Pbl), ([3, 1], Frm), 
neuper@37906
    32
     ([3, 1], Res), ([3, 2, 1], Frm), ([3, 2, 1], Res), ([3, 2, 2], Res),
neuper@37906
    33
      ([3, 2], Res)] then () else
neuper@38031
    34
error "modspec.sml: diff.behav. get_interval after replace} other 2 a";
neuper@37906
    35
neuper@37906
    36
print_depth 99;map fst (get_interval ([3, 2, 1], Res) ([],Res) 9999 pt);
neuper@37906
    37
print_depth 3;
neuper@37906
    38
if map fst (get_interval ([3, 2, 1], Res) ([],Res) 9999 pt) = 
neuper@37906
    39
    [([3, 2, 1], Res), ([3, 2, 2], Res), ([3, 2], Res)] then () else
neuper@38031
    40
error "modspec.sml: diff.behav. get_interval after replace} other 2 b";