test/Tools/isac/Knowledge/equation.sml
author Walther Neuper <neuper@ist.tugraz.at>
Tue, 28 Sep 2010 09:06:56 +0200
branchisac-update-Isa09-2
changeset 38031 460c24a6a6ba
parent 37960 ec20007095f2
child 38050 4c52ad406c20
permissions -rw-r--r--
tuned error and writeln

# raise error --> error
# writeln in atomtyp, atomty, atomt and xmlsrc
neuper@37906
     1
(* tests on the equation solver
neuper@37906
     2
   author: Walther Neuper
neuper@37906
     3
   070703
neuper@37906
     4
   (c) due to copyright terms
neuper@37906
     5
neuper@37906
     6
use"../smltest/IsacKnowledge/equation.sml";
neuper@37906
     7
use"equation.sml";
neuper@37906
     8
*)
neuper@37906
     9
val thy = Isac.thy;
neuper@37906
    10
neuper@37906
    11
"-----------------------------------------------------------------";
neuper@37906
    12
"table of contents -----------------------------------------------";
neuper@37906
    13
"-----------------------------------------------------------------";
neuper@37906
    14
"----------- CAS input -------------------------------------------";
neuper@37906
    15
"-----------------------------------------------------------------";
neuper@37906
    16
"-----------------------------------------------------------------";
neuper@37906
    17
"-----------------------------------------------------------------";
neuper@37906
    18
neuper@37906
    19
neuper@37906
    20
"----------- CAS input -------------------------------------------";
neuper@37906
    21
"----------- CAS input -------------------------------------------";
neuper@37906
    22
"----------- CAS input -------------------------------------------";
neuper@37906
    23
states:=[];
neuper@37906
    24
CalcTree [([], ("e_domID", ["e_pblID"], ["e_metID"]))];
neuper@37906
    25
Iterator 1;
neuper@37906
    26
moveActiveRoot 1;
neuper@37906
    27
replaceFormula 1 "solve (x+1=2, x)";
neuper@37906
    28
autoCalculate 1 CompleteCalc;
neuper@37906
    29
val ((pt,p),_) = get_calc 1;
neuper@37906
    30
val Form res = (#1 o pt_extract) (pt, ([],Res));
neuper@37906
    31
show_pt pt;
neuper@37906
    32
if p = ([], Res) andalso term2str res = "[x = 1]" then ()
neuper@38031
    33
else error "equation.sml behav.changed for CAS solve (x+1=2, x))";