lucin: prep. test for further improving sig. for locate_input_tactic
1 (* Title: todo's for isac core
2 Author: Walther Neuper 111013
3 (c) copyright due to lincense terms.
6 imports "~~/src/Doc/Prog_Prove/LaTeXsugar"
9 section \<open>TODOs from current changesets\<close>
11 Shift more complicated issues from the next subsection to the next but one!
13 subsection \<open>Current changeset\<close>
17 \item introduce simple type names to LUCAS_INTERPRETER <-?-> readable paper
18 \item check in states: length ?? > 1 with tracing these cases
24 subsection \<open>Postponed from current changeset\<close>
27 \item language definition: use (f #> g) x = x |> f |> g instead of @
28 see implementation.pdf p.16
31 \item pull update of Ctree.state out of 2 Lucin funs (locate_input_formula is different))
33 \item 1. check if Ctree.state can be updated OUTSIDE determine_next_step
34 \item 2. fun locate_input_tactic: pull generate1 out (because it stores ctxt also in cstate)
40 \item inform: TermC.parse (Celem.assoc_thy "Isac") istr --> parseNEW context istr
41 \item extract common code from associate.. stac2tac_
45 section \<open>Separated tasks\<close>
48 subsection \<open>Simple\<close>
51 \item Diff.thy: differentiateX --> differentiate after removal of script-constant
52 \item Test.thy: met_test_sqrt2: deleted?!
58 subsection \<open>Simple but laborous\<close>
61 \item rename rename field scr in meth
62 \item prep_met: check match between args of partial_function and model-pattern of meth;
63 provide error message.
70 subsection \<open>Questionable\<close>
73 \item finish output of trace_script with Check_Postcond (useful for SubProblem)
74 \item unify in signature LANGUAGE_TOOLS =\\
75 val pblterm: Rule.domID -> Celem.pblID -> term vvv vvv\\
76 val subpbl: string -> string list -> term unify with ^^^
83 section \<open>Complex, related to --> other tasks\<close>
86 subsection \<open>review all signatures wrt. implementation.pdf canonical argument order\<close>
89 subsection \<open>solve, loc_solve_, ...\<close>
91 unify to calcstate, calcstate'
93 \item ? rename begin_end_prog -> check_switch_prog
94 \item adopt the same for specification phase
98 subsection \<open>Review modelling- + specification-phase\<close>
101 \item "--- hack for funpack: generalise handling of meths which extend problem items ---"
103 \item see several locations of hack in code
104 \item these locations are NOT sufficient, see
105 test/../biegelinie-3.sml --- IntegrierenUndKonstanteBestimmen2: Bsp.7.70. auto ---
106 \item "fun associate" "match_ags ..dI" instead "..pI" breaks many tests, however,
107 this would be according to survey Notes (3) in src/../calchead.sml.
109 \item see "failed trial to generalise handling of meths"98298342fb6d
110 \item abstract specify + nxt_specif to common aux-funs;
111 see e.g. "--- hack for funpack: generalise handling of meths which extend problem items ---"
113 \item type model = itm list ?
114 \item review survey Notes in src/../calchead.sml: they are questionable
115 \item review copy-named, probably two issues commingled
117 \item special handling of "#Find#, because it is not a formal argument of partial_function
118 \item special naming for solutions of equation solving: x_1, x_2, ...
121 \item this has been written in one go:
123 \item reconsidering Model.max_vt, use problem with meth ["DiffApp","max_by_calculus"]
124 \item reconsider add_field': where is it used for what? Shift into mk_oris
125 \item reconsider match_itms_oris: where is it used for what? max_vt ONLY???
126 \item in Specify_Method search root-oris for items (e.g. "errorBound"), #1# in survey
127 \item Specify_Problem, Specify_Method: check respective identifiers after re-Specify_
128 (relevant for pre-condition)
129 \item unify match_ags to mk_oris1..N with different args (fmz | pat list, pbl | meth
134 subsection \<open>taci list, type step\<close>
137 \item states.sml: check, when "length tacis > 1"
138 \item in Test_Isac.thy there is only 1 error in Interpret/inform.sml
139 \item (*WN190713 REMOVE: "creating a new node" was never implemented for more than one node?!?
143 subsection \<open>Cleanup signatures\<close>
146 \item there are comments in several signatures
147 \item ML_file "~~/src/Tools/isac/Interpret/specification-elems.sml" can be (almost) deleted
148 \item src/../Frontend/: signatures missing
152 subsection \<open>Ctree\<close>
155 \item review get_ctxt, update_ctxt, get_istate, upd_istate, upd_ctxt,
156 <---> update_loc', repl_loc (remove the latter)
157 \item delete field ctxt in PblObj in favour of loc
162 subsection \<open>replace theory/thy by context/ctxt\<close>
165 \item 1. Rewrite.eval_true_, then
166 Lucin.handle_leaf, Rewrite.eval_listexpr_, Generate.generate1, Lucin.stac2tac.
171 subsection \<open>Rfuns, Begin_/End_Detail', Rrls\<close>
174 \item removing from_pblobj_or_detail' causes many strange errors
175 \item ^^^+ see from_pblobj_or_detail_thm, from_pblobj_or_detail_calc, ...
177 \item probably only "normal_form" seems to be needed
178 \item deleted Rfuns in NEW "locate_input_tactic": no active test for "locate_rule"
179 but that seems desirable
180 \item ?how is the relation to reverse-rewriting ???
181 \item "Rfuns" markers in test/../rational
183 \item datatype istate (Istate.T): remove RrlsState, scrstate: use Rrls only for creating results beyond
184 rewriting and/or respective intermediate steps (e.g. cancellation of fractions).
185 Thus we get a 1-step-action which does NOT require a state beyond istate(?).
186 Thus we drastically reduce complexity, also get rid of "fun from_pblobj_or_detail_calc" , etc.
187 \item debug ^^^ related: is there an occurence of Steps with more than 1 element?
189 \item and do_solve_step (* WN1907: ?only for Begin_/End_Detail' DEL!!!*)
191 \item shouldn't go Rfuns from Rewrite --> Rewrite_Set; they behave similar to "fun interSteps" ?
194 subsection \<open>Inverse_Z_Transform.thy\<close>
197 \item\label{new-var-rhs} rule1..6, ruleZY introduce new variables on the rhs of the rewrite-rule.
198 ? replace rewriting with substitution ?!?
199 The problem is related to the decision of typing for "d_d" and making bound variables free (while
200 shifting specific handling in equation solving etc. to the meta-logic).
201 \item Find "stepResponse (x[n::real]::bool)" is superfluous, because immediately used by
202 rewrite-rules; see \ref{new-var-rhs}.
203 \item Reconsider whole problem:
204 input only the polynomial as argument of partial_function, in ([1], Frm) compile lhs "X z" ?
207 subsection \<open>Adopt Isabelle's numerals for Isac\<close>
210 \item replace numerals of type "real" by "nat" in some specific functions from ListC.thy
211 and have both representations in parallel for "nat".
216 subsection \<open>Finetunig required for xmldata\<close>
218 See xmldata https://intra.ist.tugraz.at/hg/isac/rev/5b222a649390
219 and in kbase html-representation generated from these xmldata.
220 Notes in ~~/xmldata/TODO.txt.
223 section \<open>Hints for further development\<close>
226 subsection \<open>get proof-state\<close>
228 Re: [isabelle] Programatically get "this"
229 ----------------------------------------------------
230 So here is my (Makarius') version of your initial example, following these principles:
236 val ctxt = @{context};
239 Name_Space.full_name (Proof_Context.naming_of ctxt) (Binding.name
241 val this = #thms (the (Proof_Context.lookup_fact ctxt this_name));
246 subsection \<open>write Specification to jEdit\<close>
248 Re: [isabelle] Printing terms with type annotations
249 ----------------------------------------------------
250 On 06/02/2019 17:52, Moa Johansson wrote:
252 > I’m writing some code that should create a snippet of Isar script.
254 This is how Sledgehammer approximates this:
256 http://isabelle.in.tum.de/repos/isabelle/file/Isabelle2018/src/HOL/Tools/Sledgehammer/sledgehammer_isar_proof.ML#l299
258 (The module name already shows that the proper terminology is "Isar
259 proof" (or "Isar proof text"). Proof scripts are a thing from the past,
260 before Isar. You can emulate old-style proof scripts via a sequence of
261 'apply' commands, but this is improper Isar.)
263 Note that there is no standard function in Isabelle/Pure, because the
264 problem to print just the right amount of type information is very
265 complex and not fully solved. One day, after 1 or 2 rounds of
266 refinements over the above approach, it might become generally available.
268 subsection \<open>follow Isabelle conventions (*Does not yet work in Isabelle2018\<close>
270 isabelle update -u path_cartouches
271 isabelle update -u inner_syntax_cartouches
273 section \<open>For copy & paste\<close>
289 subsection \<open>xxx\<close>
290 subsubsection \<open>xxx\<close>