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