test/Tools/isac/Minisubpbl/100-init-rootpbl.sml
author Walther Neuper <neuper@ist.tugraz.at>
Fri, 20 May 2011 08:12:51 +0200
branchdecompose-isar
changeset 42011 6a9ba30ab6bc
parent 41986 64efbbbed4b4
child 42012 e0144cf528e1
permissions -rw-r--r--
tuned
     1 (* Title:  100-init-rootpbl.sml
     2    Author: Walther Neuper 1105
     3    (c) copyright due to lincense terms.
     4 *)
     5 
     6 "----------- Minisubplb/100-init-rootpbl.sml ---------------------";
     7 "----------- Minisubplb/100-init-rootpbl.sml ---------------------";
     8 "----------- Minisubplb/100-init-rootpbl.sml ---------------------";
     9 val fmz = ["equality (x+1=(2::real))", "solveFor x","solutions L"];
    10 val (dI',pI',mI') =
    11   ("Test", ["sqroot-test","univariate","equation","test"],
    12    ["Test","squ-equ-test-subpbl1"]);
    13 *}
    14 ML {*
    15 "~~~~~ fun CalcTreeTEST, args:"; val [(fmz, sp):fmz] = [(fmz, (dI',pI',mI'))];
    16 "~~~~~ fun nxt_specify_init_calc, args:"; val (fmz : fmz_, (dI, pI, mI) : spec) = (fmz, sp);
    17 val thy = assoc_thy dI
    18 ;mI = ["no_met"]; (*false*)
    19 val (pI, (pors, pctxt), mI) = (pI, get_pbt pI |> #ppc |> prep_ori fmz thy, mI)
    20 val {cas, ppc, thy=thy',...} = get_pbt pI
    21 val dI = theory2theory' (maxthy thy thy');
    22 val hdl =
    23   case cas of SOME t => subst_atomic ((vars_of_pbl_' ppc) ~~~ vals_of_oris pors) t;
    24 val (pt, _) = cappend_problem e_ptree [] (e_istate, pctxt) (fmz, (dI, pI, mI))
    25 				  (pors, (dI, pI, mI), hdl)
    26 val pt = update_ctxt pt [] pctxt
    27 ;((pt, ([], Pbl)), fst3 (nxt_specif Model_Problem (pt, ([], Pbl)))) : calcstate;
    28 
    29 val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))];
    30 case nxt of ("Model_Problem", _) => ()
    31 | _ => error "minisubpbl: CalcTreeTEST has no nxt = Model_Problem";
    32