test/Tools/isac/Interpret/script.sml
author Walther Neuper <walther.neuper@jku.at>
Tue, 01 Oct 2019 10:47:25 +0200
changeset 59635 9fc1bb69813c
parent 59601 0cff71323cdd
child 59666 f461cae19cd4
permissions -rw-r--r--
lucin: drop unused bool argument in tactic Rewrite*Inst
     1 (* Title:  test/../script.sml
     2    Author: Walther Neuper 050908
     3    (c) copyright due to lincense terms.
     4 *)
     5 "-----------------------------------------------------------------";
     6 "table of contents -----------------------------------------------";
     7 "-----------------------------------------------------------------";
     8 "----------- fun sel_appl_atomic_tacs ----------------------------";
     9 "----------- fun init_form, fun get_stac -------------------------";
    10 "----------- fun sel_rules ---------------------------------------";
    11 "----------- fun sel_appl_atomic_tacs ----------------------------";
    12 "----------- fun de_esc_underscore -------------------------------";
    13 "----------- fun go ----------------------------------------------";
    14 "----------- fun formal_args -------------------------------------";
    15 "----------- fun dsc_valT ----------------------------------------";
    16 "----------- fun itms2args ---------------------------------------";
    17 "----------- fun rep_tac_ ----------------------------------------";
    18 "----------- fun init_pstate -----------------------------------------------------------------";
    19 "-----------------------------------------------------------------";
    20 "-----------------------------------------------------------------";
    21 "-----------------------------------------------------------------";
    22 
    23 val thy =  @{theory Isac_Knowledge};
    24 
    25 "----------- fun sel_appl_atomic_tacs ----------------------------";
    26 "----------- fun sel_appl_atomic_tacs ----------------------------";
    27 "----------- fun sel_appl_atomic_tacs ----------------------------";
    28 
    29 reset_states ();
    30 CalcTree [(["equality (x+1=(2::real))", "solveFor x","solutions L"], 
    31   ("Test", ["sqroot-test","univariate","equation","test"],
    32    ["Test","squ-equ-test-subpbl1"]))];
    33 Iterator 1;
    34 moveActiveRoot 1;
    35 autoCalculate 1 CompleteCalcHead;
    36 autoCalculate 1 (Step 1);
    37 autoCalculate 1 (Step 1);
    38 val ((pt, p), _) = get_calc 1; show_pt pt;
    39 val appltacs = sel_appl_atomic_tacs pt p;
    40 case appltacs of 
    41   [Rewrite ("radd_commute", radd_commute), 
    42   Rewrite ("add_assoc", add_assoc), Calculate "TIMES"]
    43   => if (term2str o Thm.prop_of) radd_commute = "?m + ?n = ?n + ?m" andalso 
    44         (term2str o Thm.prop_of) add_assoc = "?a + ?b + ?c = ?a + (?b + ?c)" then ()
    45         else error "script.sml fun sel_appl_atomic_tacs diff.behav. 2"
    46 | _ => error "script.sml fun sel_appl_atomic_tacs diff.behav. 1";
    47 
    48 trace_script := true;
    49 trace_script := false;
    50 applyTactic 1 p (hd appltacs);
    51 val ((pt, p), _) = get_calc 1; show_pt pt;
    52 val appltacs = sel_appl_atomic_tacs pt p;
    53 (*applyTactic 1 p (hd appltacs); WAS assy: call by ([3], Pbl)*)
    54 
    55 "~~~~~ fun applyTactic, args:"; val ((cI:calcID), ip, tac) = (1, p, (hd appltacs));
    56 val ((pt, _), _) = get_calc cI;
    57 val p = get_pos cI 1;
    58 locatetac;
    59 locatetac tac;
    60 
    61 (*locatetac tac (pt, ip); (*WAS assy: call by ([3], Pbl)*)*)
    62 "~~~~~ fun locatetac, args:"; val (tac, (ptp as (pt, p))) = (tac, (pt, ip));
    63 val (mI,m) = mk_tac'_ tac;
    64 applicable_in p pt m ; (*Appl*)
    65 member op = specsteps mI; (*false*)
    66 (*loc_solve_ (mI,m) ptp; (*Argument: (mI, m) : string * tac Reason: Can't unify tac_ with tac*)*)
    67 loc_solve_; (*without _ ??? result is -> lOc writing error ???*)
    68 (*val it = fn: string * tac_ -> ctree * (pos * pos_) -> lOc_*)
    69 (mI,m); (*string * tac*)
    70 ptp (*ctree * pos'*);
    71 "~~~~~ fun loc_solve_, args:"; val (m ,(pt,pos)) = ((mI,m), ptp);
    72 (*val (msg, cs') = solve m (pt, pos);
    73 (*Argument: m : string * tac Reason: Can't unify tac_ with tac (Different type constructors)*)*)
    74 m;
    75 (pt, pos);
    76 "~~~~~ fun solve, args:"; val ((mI,m), (pt, po as (p,p_))) = (m, (pt, pos));
    77 (*solve has still p_!!!!!!!!!!!!!!!!!!!!!!!!!*)
    78 
    79 e_metID = get_obj g_metID pt (par_pblobj pt p); (*false*)
    80 val ctxt = get_ctxt pt po;
    81 
    82 (*generate1 (assoc_thy (get_obj g_domID pt (par_pblobj pt p))) m (e_istate, ctxt) (p,p_) pt;
    83 (*Argument: m : tac Reason: Can't unify tac_ with tac (Different type constructors)*)*)
    84 (assoc_thy (get_obj g_domID pt (par_pblobj pt p)));
    85 assoc_thy;
    86 
    87 autoCalculate 1 CompleteCalc;
    88 
    89 "----------- fun init_form, fun get_stac -------------------------";
    90 "----------- fun init_form, fun get_stac -------------------------";
    91 "----------- fun init_form, fun get_stac -------------------------";
    92 val fmz = ["equality (x+1=(2::real))", "solveFor x", "solutions L"];
    93 val (dI',pI',mI') = ("Test",["sqroot-test","univariate","equation","test"],
    94   ["Test","squ-equ-test-subpbl1"]);
    95 val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))];
    96 val (p,_,f,nxt,_,pt) = me nxt p [] pt;
    97 val (p,_,f,nxt,_,pt) = me nxt p [] pt;
    98 val (p,_,f,nxt,_,pt) = me nxt p [] pt;
    99 val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   100 val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   101 val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   102 val (p,_,f,nxt,_,pt) = me nxt p [] pt;
   103 "~~~~~ fun me, args:"; val (_,tac) = nxt;
   104 "~~~~~ fun locatetac, args:"; val ptp as (pt, p) = (pt, p);
   105 val (mI,m) = mk_tac'_ tac;
   106 val Appl m = applicable_in p pt m;
   107 member op = specsteps mI; (*false*)
   108 "~~~~~ fun loc_solve_, args:"; val (m, (pt, pos) ) = ((mI, m), ptp);
   109 "~~~~~ fun solve, args:"; val (("Apply_Method", Apply_Method' (mI,_,_,ctxt)), pos as (p,_)) = (m, pos);
   110 val {srls, ...} = get_met mI;
   111 val PblObj {meth=itms, ...} = get_obj I pt p;
   112 val thy' = get_obj g_domID pt p;
   113 val thy = assoc_thy thy';
   114 val (is as Pstate (env,_,_,_,_,_), ctxt, sc) = init_pstate ctxt itms mI;
   115 val ini = init_form thy sc env;
   116 "----- fun init_form, args:"; val (Prog sc) = sc;
   117 "----- fun get_stac, args:"; val (y, h $ body) = (thy, sc);
   118 case get_stac thy sc of SOME (Free ("e_e", _)) => ()
   119 | _ => error "script: Const (?, ?) in script (as term) changed";;
   120 
   121 "----------- fun sel_rules ---------------------------------------";
   122 "----------- fun sel_rules ---------------------------------------";
   123 "----------- fun sel_rules ---------------------------------------";
   124 (* compare test/../interface.sml
   125 "--------- getTactic, fetchApplicableTactics ------------";
   126 *)
   127  reset_states ();
   128  CalcTree [(["equality (x+1=(2::real))", "solveFor x","solutions L"], 
   129    ("Test", ["sqroot-test","univariate","equation","test"],
   130     ["Test","squ-equ-test-subpbl1"]))];
   131  Iterator 1;
   132  moveActiveRoot 1;
   133  autoCalculate 1 CompleteCalc;
   134  val ((pt,_),_) = get_calc 1;
   135  show_pt pt;
   136 
   137 (*UC\label{SOLVE:MANUAL:TACTIC:listall} UC 30.3.2.2 p.175*)
   138  val tacs = sel_rules pt ([],Pbl);
   139  case tacs of [Apply_Method ["Test", "squ-equ-test-subpbl1"]] => ()
   140  | _ => error "script.sml: diff.behav. in sel_rules ([],Pbl)";
   141 
   142  val tacs = sel_rules pt ([1],Res);
   143  case tacs of [Rewrite_Set "norm_equation", Rewrite_Set "Test_simplify",
   144       Subproblem ("Test", ["LINEAR", "univariate", "equation", "test"]),
   145       Check_elementwise "Assumptions"] => ()
   146  | _ => error "script.sml: diff.behav. in sel_rules ([1],Res)";
   147 
   148  val tacs = sel_rules pt ([3],Pbl);
   149  case tacs of [Apply_Method ["Test", "solve_linear"]] => ()
   150  | _ => error "script.sml: diff.behav. in sel_rules ([3],Pbl)";
   151 
   152  val tacs = sel_rules pt ([3,1],Res);
   153  case tacs of [Rewrite_Set_Inst (["(''bdv'', x)"], "isolate_bdv"), Rewrite_Set "Test_simplify"] => ()
   154  | _ => error "script.sml: diff.behav. in sel_rules ([3,1],Res)";
   155 
   156  val tacs = sel_rules pt ([3],Res);
   157  case tacs of [Rewrite_Set "norm_equation", Rewrite_Set "Test_simplify",
   158       Subproblem ("Test", ["LINEAR", "univariate", "equation", "test"]),
   159       Check_elementwise "Assumptions"] => ()
   160  | _ => error "script.sml: diff.behav. in sel_rules ([3],Res)";
   161 
   162  val tacs = (sel_rules pt ([],Res)) handle PTREE str => [Tac str];
   163  case tacs of [Tac "no tactics applicable at the end of a calculation"] => ()
   164  | _ => error "script.sml: diff.behav. in sel_rules ([],Res)";
   165 
   166 "----------- fun sel_appl_atomic_tacs ----------------------------";
   167 "----------- fun sel_appl_atomic_tacs ----------------------------";
   168 "----------- fun sel_appl_atomic_tacs ----------------------------";
   169  reset_states ();
   170  CalcTree [(["equality (x+1=(2::real))", "solveFor x","solutions L"], 
   171    ("Test", ["sqroot-test","univariate","equation","test"],
   172     ["Test","squ-equ-test-subpbl1"]))];
   173  Iterator 1;
   174  moveActiveRoot 1;
   175  autoCalculate 1 CompleteCalc;
   176 
   177 (*UC\label{SOLVE:MANUAL:TACTIC:listall} UC 30.3.2.2 p.175*)
   178  fetchApplicableTactics 1 99999 ([],Pbl);
   179 
   180  fetchApplicableTactics 1 99999 ([1],Res);
   181 "~~~~~ fun fetchApplicableTactics, args:"; val (cI, (scope:int), (p:pos')) = (1, 99999, ([1],Res));
   182 val ((pt, _), _) = get_calc cI;
   183 (*version 1:*)
   184 case sel_rules pt p of [Rewrite_Set "norm_equation", Rewrite_Set "Test_simplify",
   185   Subproblem ("Test", ["LINEAR", "univariate", "equation", "test"]),
   186   Check_elementwise "Assumptions"] => ()
   187 | _ => error "fetchApplicableTactics ([1],Res) changed";
   188 (*version 2:*)
   189 (*WAS:
   190 sel_appl_atomic_tacs pt p;
   191 ...
   192 ### atomic_appl_tacs: not impl. for tac='Subproblem(Test,["LINEAR","univariate","equation","test"])' 
   193 ### atomic_appl_tacs: not impl. for tac = 'Check_elementwise "Assumptions"' 
   194 *)
   195 
   196 "~~~~~ fun sel_appl_atomic_tacs, args:"; val (pt, (p,p_)) = (pt, p);
   197 is_spec_pos p_ = false;
   198         val pp = par_pblobj pt p
   199         val thy' = (get_obj g_domID pt pp):theory'
   200         val thy = assoc_thy thy'
   201         val metID = get_obj g_metID pt pp
   202         val metID' =
   203           if metID = e_metID 
   204           then (thd3 o snd3) (get_obj g_origin pt pp)
   205           else metID
   206         val {scr=Prog sc,srls,erls,rew_ord'=ro,...} = get_met metID'
   207         val Pstate (env,_,a,v,_,_) = get_istate pt (p,p_)
   208         val alltacs = (*we expect at least 1 stac in a script*)
   209           map ((stac2tac pt thy) o rep_stacexpr o #2 o
   210            (handle_leaf "selrul" thy' srls env a v)) (stacpbls sc)
   211         val f =
   212           case p_ of
   213               Frm => get_obj g_form pt p
   214             | Res => (fst o (get_obj g_result pt)) p;
   215 (*WN120611 stopped and took version 1 again for fetchApplicableTactics !
   216 (distinct o flat o (map (atomic_appl_tacs thy ro erls f))) alltacs
   217 ...
   218 ### atomic_appl_tacs: not impl. for tac='Subproblem(Test,["LINEAR","univariate","equation","test"])' 
   219 ### atomic_appl_tacs: not impl. for tac = 'Check_elementwise "Assumptions"' 
   220 *)
   221 
   222 "----------- fun de_esc_underscore -------------------------------";
   223 "----------- fun de_esc_underscore -------------------------------";
   224 "----------- fun de_esc_underscore -------------------------------";
   225 (*
   226 > val str = "Rewrite_Set_Inst";
   227 > val esc = esc_underscore str;
   228 val it = "Rewrite'_Set'_Inst" : string
   229 > val des = de_esc_underscore esc;
   230  val des = de_esc_underscore esc;*)
   231 
   232 "----------- fun go ----------------------------------------------";
   233 "----------- fun go ----------------------------------------------";
   234 "----------- fun go ----------------------------------------------";
   235 (*
   236 > val t = (Thm.term_of o the o (parse thy)) "a+b";
   237 val it = Const (#,#) $ Free (#,#) $ Free ("b","RealDef.real") : term
   238 > val plus_a = go [L] t; 
   239 > val b = go [R] t; 
   240 > val plus = go [L,L] t; 
   241 > val a = go [L,R] t;
   242 
   243 > val t = (Thm.term_of o the o (parse thy)) "a+b+c";
   244 val t = Const (#,#) $ (# $ # $ Free #) $ Free ("c","RealDef.real") : term
   245 > val pl_pl_a_b = go [L] t; 
   246 > val c = go [R] t; 
   247 > val a = go [L,R,L,R] t; 
   248 > val b = go [L,R,R] t; 
   249 *)
   250 
   251 "----------- fun formal_args -------------------------------------";
   252 "----------- fun formal_args -------------------------------------";
   253 "----------- fun formal_args -------------------------------------";
   254 (*
   255 > formal_args scr;
   256   [Free ("f_","RealDef.real"),Free ("v_","RealDef.real"),
   257    Free ("eqs_","bool List.list")] : term list
   258 *)
   259 "----------- fun dsc_valT ----------------------------------------";
   260 "----------- fun dsc_valT ----------------------------------------";
   261 "----------- fun dsc_valT ----------------------------------------";
   262 (*> val t = (Thm.term_of o the o (parse thy)) "equality";
   263 > val T = type_of t;
   264 val T = "bool => Tools.una" : typ
   265 > val dsc = dsc_valT t;
   266 val dsc = "una" : string
   267 
   268 > val t = (Thm.term_of o the o (parse thy)) "fixedValues";
   269 > val T = type_of t;
   270 val T = "bool List.list => Tools.nam" : typ
   271 > val dsc = dsc_valT t;
   272 val dsc = "nam" : string*)
   273 "----------- fun itms2args ---------------------------------------";
   274 "----------- fun itms2args ---------------------------------------";
   275 "----------- fun itms2args ---------------------------------------";
   276 (*
   277 > val sc = ... Solve_root_equation ...
   278 > val mI = ("Program","sqrt-equ-test");
   279 > val PblObj{meth={ppc=itms,...},...} = get_obj I pt [];
   280 > val ts = itms2args thy mI itms;
   281 > map (term_to_string''' thy) ts;
   282 ["sqrt (#9 + #4 * x) = sqrt x + sqrt (#5 + x)","x","#0"] : string list
   283 *)
   284 "----------- fun rep_tac_ ----------------------------------------";
   285 "----------- fun rep_tac_ ----------------------------------------";
   286 "----------- fun rep_tac_ ----------------------------------------";
   287 (***************fun rep_tac_ (Rewrite_Inst' (thy', rod, rls, put, subs, (thmID, _), f, (f', _))) = 
   288 Fehlersuche 25.4.01
   289 (a)----- als String zusammensetzen:
   290 ML> term2str f; 
   291 val it = "d_d x #4 + d_d x (x ^^^ #2 + #3 * x)" : string
   292 ML> term2str f'; 
   293 val it = "#0 + d_d x (x ^^^ #2 + #3 * x)" : string
   294 ML> subs;
   295 val it = [(Free ("bdv","RealDef.real"),Free ("x","RealDef.real"))] : subst
   296 > val tt = (Thm.term_of o the o (parse thy))
   297   "(Rewrite_Inst[(''bdv'',x)]diff_const (d_d x #4 + d_d x (x ^^^ #2 + #3 * x)))=(#0 + d_d x (x ^^^ #2 + #3 * x))";
   298 > atomty tt;
   299 ML> tracing (term2str tt); 
   300 (Rewrite_Inst [(''bdv'',x)] diff_const  d_d x #4 + d_d x (x ^^^ #2 + #3 * x)) =
   301  #0 + d_d x (x ^^^ #2 + #3 * x)
   302 
   303 (b)----- laut rep_tac_:
   304 > val ttt=HOLogic.mk_eq (lhs,f');
   305 > atomty ttt;
   306 
   307 
   308 (*Fehlersuche 1-2Monate vor 4.01:*)
   309 > val tt = (Thm.term_of o the o (parse thy))
   310   "Rewrite_Inst[(''bdv'',x)]square_equation_left True(x=#1+#2)";
   311 > atomty tt;
   312 
   313 > val f = (Thm.term_of o the o (parse thy)) "x=#1+#2";
   314 > val f' = (Thm.term_of o the o (parse thy)) "x=#3";
   315 > val subs = [((Thm.term_of o the o (parse thy)) "bdv",
   316 	       (Thm.term_of o the o (parse thy)) "x")];
   317 > val sT = (type_of o fst o hd) subs;
   318 > val subs' = list2isalist (HOLogic.mk_prodT (sT, sT))
   319 			      (map HOLogic.mk_prod subs);
   320 > val sT' = type_of subs';
   321 > val lhs = Const ("Prog_Tac.Rewrite'_Inst",[sT',idT,fT,fT] ---> fT) 
   322   $ subs' $ Free (thmID,idT) $ @{term True} $ f;
   323 > lhs = tt;
   324 val it = true : bool
   325 > rep_tac_ (Rewrite_Inst' 
   326 	       ("Program","tless_true","eval_rls",false,subs,
   327 		("square_equation_left",""),f,(f',[])));
   328 *)
   329 (****************************| rep_tac_ (Rewrite' (thy', _, _, put, (thmID, _), f, (f', _)))=
   330 > val tt = (Thm.term_of o the o (parse thy)) (*____   ____..test*)
   331   "Rewrite square_equation_left True (x=#1+#2) = (x=#3)";
   332 
   333 > val f = (Thm.term_of o the o (parse thy)) "x=#1+#2";
   334 > val f' = (Thm.term_of o the o (parse thy)) "x=#3";
   335 > val Thm (id,thm) = 
   336   rep_tac_ (Rewrite' 
   337    ("Program","tless_true","eval_rls",false,
   338     ("square_equation_left",""),f,(f',[])));
   339 > val SOME ct = parse thy   
   340   "Rewrite square_equation_left True (x=#1+#2)"; 
   341 > rewrite_ Program.thy tless_true eval_rls true thm ct;
   342 val it = SOME ("x = #3",[]) : (cterm * cterm list) option
   343 *)
   344 (****************************************  | rep_tac_ (Rewrite_Set_Inst' 
   345 WN050824: type error ...
   346   let val fT = type_of f;
   347     val sT = (type_of o fst o hd) subs;
   348     val subs' = list2isalist (HOLogic.mk_prodT (sT, sT))
   349       (map HOLogic.mk_prod subs);
   350     val sT' = type_of subs';
   351     val lhs = Const ("Prog_Tac.Rewrite'_Set'_Inst",
   352 		     [sT',idT,fT,fT] ---> fT) 
   353       $ subs' $ Free (id_rls rls,idT) $ b $ f;
   354   in (((make_rule (assoc_thy thy')) o HOLogic.mk_eq) (lhs,f'),(lhs,f')) end*)
   355 (* ... vals from Rewrite_Inst' ...
   356 > rep_tac_ (Rewrite_Set_Inst' 
   357 	       ("Program",false,subs,
   358 		"isolate_bdv",f,(f',[])));
   359 *)
   360 (* val (Rewrite_Set' (thy',put,rls,f,(f',asm)))=m;
   361 *)
   362 (**************************************   | rep_tac_ (Rewrite_Set' (thy',put,rls,f,(f',asm)))=
   363 13.3.01:
   364 val thy = assoc_thy thy';
   365 val t = HOLogic.mk_eq (lhs,f');
   366 make_rule thy t;
   367 --------------------------------------------------
   368 val lll = (Thm.term_of o the o (parse thy)) 
   369   "Rewrite_Set SqRoot_simplify (d_d x (x ^^^ #2 + #3 * x) + d_d x #4)";
   370 
   371 --------------------------------------------------
   372 > val f = (Thm.term_of o the o (parse thy)) "x=#1+#2";
   373 > val f' = (Thm.term_of o the o (parse thy)) "x=#3";
   374 > val Thm (id,thm) = 
   375   rep_tac_ (Rewrite_Set' 
   376    ("Program",false,"SqRoot_simplify",f,(f',[])));
   377 val id = "(Rewrite_Set SqRoot_simplify True x = #1 + #2) = (x = #3)" : string
   378 val thm = "(Rewrite_Set SqRoot_simplify True x = #1 + #2) = (x = #3)" : thm
   379 *)
   380 (*****************************************   | rep_tac_ (Calculate' (thy',op_,f,(f',thm')))=
   381 > val lhs'=(Thm.term_of o the o (parse thy))"Calculate plus (#1+#2)";
   382   ... test-root-equ.sml: calculate ...
   383 > val Appl m'=applicable_in p pt (Calculate "PLUS");
   384 > val (lhs,_)=tac_2etac m';
   385 > lhs'=lhs;
   386 val it = true : bool*)
   387 
   388 "----------- fun init_pstate -----------------------------------------------------------------";
   389 "----------- fun init_pstate -----------------------------------------------------------------";
   390 "----------- fun init_pstate -----------------------------------------------------------------";
   391 val fmz = ["Traegerlaenge L","Streckenlast q_0","Biegelinie y",
   392 	     "Randbedingungen [y 0 = (0::real), y L = 0, M_b 0 = 0, M_b L = 0]",
   393 	     "FunktionsVariable x", "GleichungsVariablen [c, c_2, c_3, c_4]",
   394 	     "AbleitungBiegelinie dy"];
   395 val (dI',pI',mI') = ("Biegelinie", ["Biegelinien"],
   396 		     ["IntegrierenUndKonstanteBestimmen2"]);
   397 val p = e_pos'; val c = [];
   398 (*[], Pbl*)val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))]; (*nxt = Model_Problem*)
   399 (*[], Pbl*)val (p,_,f,nxt,_,pt) = me nxt p c pt; (*nxt = Add_Given "Traegerlaenge L"*)
   400 (*[], Pbl*)val (p,_,f,nxt,_,pt) = me nxt p c pt; (*nxt = Add_Given "Streckenlast q_0"*)
   401 (*[], Pbl*)val (p,_,f,nxt,_,pt) = me nxt p c pt; (*nxt = Add_Find "Biegelinie y"*)
   402 (*[], Pbl*)val (p,_,f,nxt,_,pt) = me nxt p c pt; (*nxt = Add_Relation "Randbedingungen [y 0 = 0]", ERROR MISSING step: M_b 0 = 0*)
   403 (*[], Pbl*)val (p,_,f,nxt,_,pt) = me nxt p c pt; (*nxt = Add_Relation "Randbedingungen [y L = 0, M_b 0 = 0, M_b L = 0]"*)
   404 (*[], Pbl*)val (p,_,f,nxt,_,pt) = me nxt p c pt; (*nxt = Specify_Theory "Biegelinie"*)
   405 (*[], Pbl*)val (p,_,f,nxt,_,pt) = me nxt p c pt; (*nxt = Specify_Problem ["Biegelinien"]*)
   406 (*[], Pbl*)val (p,_,f,nxt,_,pt) = me nxt p c pt; (*nxt = Specify_Method ["IntegrierenUndKonstanteBestimmen2"]*)
   407 (*[], Met*)val (p,_,f,nxt,_,pt) = me nxt p c pt; (*nxt = Add_Given "FunktionsVariable x"*)
   408 (*[], Met*)val (p,_,f,nxt,_,pt) = me nxt p c pt; (*nxt = Add_Given "GleichungsVariablen [c, c_2, c_3, c_4]"*)
   409 (*[], Met*)val (p,_,f,nxt,_,pt) = me nxt p c pt; (*nxt = Add_Given "AbleitungBiegelinie dy"*)
   410 (*[], Met*)val (p''''',_,f,nxt''''',_,pt''''') = me nxt p c pt; (*nxt''''' = Apply_Method ["IntegrierenUndKonstanteBestimmen2"*)
   411 
   412 (*+*)val PblObj {meth, spec = (thy, _ , metID), ...} = get_obj I pt''''' (fst p''''');
   413 (*+*)val ctxt = get_ctxt pt''''' p''''';
   414 "~~~~~ fun init_pstate , args:"; val (thy, itms, metID) = (assoc_thy thy, meth, metID);
   415 val (Pstate st, ctxt, Prog _) = init_pstate ctxt itms metID;
   416 if scrstate2str st =
   417 "([\"\n(l, L)\",\"\n(q, q_0)\",\"\n(v, x)\",\"\n(b, dy)\",\"\n(s, [y 0 = 0, y L = 0, M_b 0 = 0, M_b L = 0])\",\"\n(vs, [c, c_2, c_3, c_4])\",\"\n(id_abl, y)\"], [], NONE, \n??.empty, Safe, true)"
   418 then () else error "init_pstate changed for Biegelinie";
   419 
   420 (*[1], Pbl*)val (p,_,f,nxt,_,pt) = me nxt''''' p''''' c pt'''''; (*nxt = Model_Problem*)
   421 if p = ([1], Pbl) andalso (fst nxt) = "Model_Problem" then ()
   422 else error "modeling root-problem of Biegelinie 7.70 changed";