1.1 --- a/test/Tools/isac/Knowledge/inssort.sml Wed Oct 19 15:39:15 2022 +0200
1.2 +++ b/test/Tools/isac/Knowledge/inssort.sml Thu Oct 20 10:23:38 2022 +0200
1.3 @@ -2,7 +2,8 @@
1.4 Author: Walther Neuper 17.6.00
1.5 (c) copyright due to lincense terms.
1.6
1.7 -Strange ERROR "Undefined fact: "xfoldr_Nil""
1.8 +S
1.9 +trange ERROR "Undefined fact: "xfoldr_Nil""
1.10 *)
1.11 "-----------------------------------------------------------------------------";
1.12 "-----------------------------------------------------------------------------";
1.13 @@ -12,7 +13,7 @@
1.14 "----------- insertion sort by rewrite stepwise ------------------------------";
1.15 "----------- insertion sort with ruleset -------------------------------------";
1.16 "----------- insertion sort with MathEngine ----------------------------------";
1.17 -"----------- insertion sort: CAS-command -------------------------------------";
1.18 +(*"----------- insertion sort: CAS-command -------------------------------------";*)
1.19 "----------- insertion sort: met_Prog_sort_ins_steps -------------------------";
1.20 "-----------------------------------------------------------------------------";
1.21 "-----------------------------------------------------------------------------";
1.22 @@ -101,7 +102,7 @@
1.23 val (dI',pI',mI') = ("InsSort", ["insertion", "SORT", "Programming"],
1.24 ["Programming", "SORT", "insertion"]);
1.25 val p = e_pos'; val c = [];
1.26 -val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))]; (*nxt = ("Model_Problem",..*)
1.27 +val (p,_,f,nxt,_,pt) = Test_Code.init_calc @{context} [(fmz, (dI',pI',mI'))]; (*nxt = ("Model_Problem",..*)
1.28 val (p,_,f,nxt,_,pt) = me nxt p c pt;
1.29 val (p,_,f,nxt,_,pt) = me nxt p c pt;
1.30 val (p,_,f,nxt,_,pt) = me nxt p c pt;
1.31 @@ -116,14 +117,15 @@
1.32 | _ => error "--- insertion sort with MathEngine CHANGED 1"
1.33 else error "--- insertion sort with MathEngine CHANGED 2";
1.34
1.35 +(*POSTPONE CORRECTION AT END OF TRANSITION TO Isabelle/PIDE/Isac (~ Cas_Cmd)
1.36 "----------- insertion sort: CAS-command -------------------------------------";
1.37 "----------- insertion sort: CAS-command -------------------------------------";
1.38 "----------- insertion sort: CAS-command -------------------------------------";
1.39 -val (p,_,f,nxt,_,pt) = CalcTreeTEST [([], References.empty)];
1.40 +val (p,_,f,nxt,_,pt) = Test_Code.init_calc @{context} [([], References.empty)];
1.41 (*+*)if ((fst p) |> get_obj g_origin pt |> LibraryC.fst3) = []
1.42 (*+*)then () else error "check correct of get_ctxt at start of (sub-)problem";
1.43 val (_,(_,c,(pt,p))) = Step_Solve.by_term (pt, p) "Sort {||1, 3, 2||}";
1.44 -Test_Tool.show_pt pt; (*this trick \<up> \<up> \<up> micked input of \<up> \<up> \<up> \<up> \<up> \<up> in the front-end.
1.45 +Test_Tool.show_pt pt; ( *this trick \<up> \<up> \<up> micked input of \<up> \<up> \<up> \<up> \<up> \<up> in the front-end.
1.46 the trick worked in changeset fbaff8cf0179, it does not work in 59c5dd27d589
1.47 (TODO hg bisect ?) and raises the ERROR Undefined fact: "xfoldr_Nil" here.
1.48 vvvvv
1.49 @@ -162,7 +164,7 @@
1.50 "----------- insertion sort: met_Prog_sort_ins_steps -------------------------";
1.51 "----------- insertion sort: met_Prog_sort_ins_steps -------------------------";
1.52 States.reset ();
1.53 -CalcTree
1.54 +CalcTree @{context}
1.55 [(["unsorted {||1, 3, 2||}", "sorted s_s"],
1.56 ("InsSort", ["insertion", "SORT", "Programming"],
1.57 ["Programming", "SORT", "insertion_steps"]))];