test/Tools/isac/Knowledge/partial_fractions.sml
author Walther Neuper <neuper@ist.tugraz.at>
Tue, 11 Oct 2011 10:59:42 +0200
branchdecompose-isar
changeset 42305 3ff2cf70f845
parent 42301 93083d4e05d8
child 42310 55931ca19f4d
permissions -rw-r--r--
in Build_Inverse_Z_Transform one step further

in subsubsection {*Stepwise check the program*}
see test --- why helpless here ? ---
     1 (* Title:  partial fraction decomposition
     2    Author: Jan Rocnik
     3    (c) due to copyright terms
     4 *)
     5 
     6 "--------------------------------------------------------";
     7 "table of contents --------------------------------------";
     8 "--------------------------------------------------------";
     9 "----------- why helpless here ? ------------------------";
    10 "--------------------------------------------------------";
    11 "--------------------------------------------------------";
    12 "--------------------------------------------------------";
    13 
    14 
    15 "----------- why helpless here ? ------------------------";
    16 "----------- why helpless here ? ------------------------";
    17 "----------- why helpless here ? ------------------------";
    18 val fmz = ["filterExpression (X z = 3 / (z - 1/4 + -1/8 * (1/(z::real))))", 
    19   "stepResponse (x[n::real]::bool)"];
    20 val (dI,pI,mI) = ("Isac", ["inverse", "Z_Transform", "SignalProcessing"], 
    21   ["SignalProcessing","Z_Transform","inverse"]);
    22 val (p,_,f,nxt,_,pt)  = CalcTreeTEST [(fmz, (dI,pI,mI))]; 
    23 val (p,_,f,nxt,_,pt) = me nxt p [] pt; "Add_Given";
    24 val (p,_,f,nxt,_,pt) = me nxt p [] pt; "Add_Find";
    25 val (p,_,f,nxt,_,pt) = me nxt p [] pt; "Specify_Theory";
    26 val (p,_,f,nxt,_,pt) = me nxt p [] pt; "Specify_Problem";
    27 val (p,_,f,nxt,_,pt) = me nxt p [] pt; "Specify_Method";
    28 val (p,_,f,nxt,_,pt) = me nxt p [] pt; "nxt = Apply_Method";
    29 val (p,_,f,nxt,_,pt) = me nxt p [] pt; 
    30   "nxt = Rewrite (ruleZY, Inverse_Z_Transform.ruleZY) --> X z = 3 / (z - 1 / 4 + -1 / 8 * (1 / z))";
    31 val (p,_,f,nxt,_,pt) = me nxt p [] pt; 
    32   "nxt = Rewrite_Set norm_Rational --> X' z = 3 / (z * (z - 1 / 4 + -1 / 8 * (1 / z)))";
    33 "~~~~~ fun me, args:"; val ((_,tac), (p:pos'), _, (pt:ptree)) = (nxt, p, [], pt);
    34 val ("ok", (_, _, ptp)) = locatetac tac (pt,p)
    35 val (pt, p) = ptp;
    36 "~~~~~ fun step, args:"; val (((ip as (_,p_)):pos'), ((ptp as (pt,p), tacis):calcstate)) = 
    37                            (p, ((pt, e_pos'),[]));
    38 val pIopt = get_pblID (pt,ip);
    39 ip = ([],Res); "false";
    40 tacis; " = []";
    41 pIopt; (* = SOME ["inverse", "Z_Transform", "SignalProcessing"]*)
    42 member op = [Pbl,Met] p_ andalso is_none (get_obj g_env pt (fst p)); "false";
    43 (*nxt_solve_ (pt,ip); "WAS isalist2list applied to NON-list 'no_meth'"
    44    THIS MEANS: replace no_meth by [no_meth] in Script.*)
    45 (*WAS val ("helpless",_) = step p ((pt, e_pos'),[]) *)
    46 (*WAS val (p,_,f,nxt,_,pt) = me nxt p [] pt; "Empty_Tac instead SubProblem";*)
    47