neuper@42314
|
1 |
(* Title: todo's for isac core
|
neuper@42314
|
2 |
Author: Walther Neuper 111013
|
neuper@42314
|
3 |
(c) copyright due to lincense terms.
|
neuper@42314
|
4 |
*)
|
wneuper@59504
|
5 |
theory TODO
|
wneuper@59504
|
6 |
imports "~~/src/Doc/Prog_Prove/LaTeXsugar"
|
wneuper@59504
|
7 |
begin
|
neuper@42314
|
8 |
|
wneuper@59574
|
9 |
section \<open>TODOs from current changesets\<close>
|
wneuper@59568
|
10 |
text\<open>
|
wneuper@59568
|
11 |
Shift more complicated issues from the next subsection to the next but one!
|
wneuper@59568
|
12 |
\<close>
|
wneuper@59574
|
13 |
subsection \<open>Current changeset\<close>
|
wneuper@59574
|
14 |
text \<open>
|
wneuper@59569
|
15 |
\begin{itemize}
|
wneuper@59574
|
16 |
\item xxx
|
wneuper@59582
|
17 |
\item xxx
|
wneuper@59583
|
18 |
\item xxx
|
wneuper@59577
|
19 |
\item lucas-intrpreter.locate_input_tactic: execute_progr_2 srls tac cstate (progr, Rule.e_rls)
|
wneuper@59577
|
20 |
^^^^^^^^^^
|
wneuper@59574
|
21 |
\item xxx
|
wneuper@59574
|
22 |
\item xxx
|
wneuper@59574
|
23 |
\end{itemize}
|
wneuper@59574
|
24 |
\<close>
|
wneuper@59574
|
25 |
subsection \<open>Postponed from current changeset\<close>
|
wneuper@59574
|
26 |
text \<open>
|
wneuper@59574
|
27 |
\begin{itemize}
|
wneuper@59583
|
28 |
\item clarify handling of contexts
|
wneuper@59583
|
29 |
\begin{itemize}
|
wneuper@59583
|
30 |
\item Check_Elementwise "Assumptions": prerequisite for ^^goal
|
wneuper@59583
|
31 |
\item xxx
|
wneuper@59583
|
32 |
\item Tactic.Apply_Method' (mI, _, _, _(*ctxt ?!?*))) .. remove ctxt
|
wneuper@59583
|
33 |
\item rm ctxt from Subproblem' (is separated in associate!))
|
wneuper@59583
|
34 |
\item check Tactic.Subproblem': are 2 terms required?
|
wneuper@59583
|
35 |
\item xxx
|
wneuper@59583
|
36 |
\item Test_Some.--- rat-equ: remove x = 0 from [x = 0, x = 6 / 5] due to contexts --
|
wneuper@59583
|
37 |
--: wait for deleting Check_Elementwise Assumptions
|
wneuper@59583
|
38 |
\item xxx
|
wneuper@59583
|
39 |
\item lucas-intrpreter.assy: Generate.generate1 (Celem.assoc_thy "Isac")
|
wneuper@59583
|
40 |
\end{itemize}
|
wneuper@59583
|
41 |
\item xxx
|
wneuper@59583
|
42 |
\item complete mstools.sml (* survey on handling contexts:
|
wneuper@59583
|
43 |
\item xxx
|
wneuper@59583
|
44 |
\item dest_spec (Const ("Product_Type.Pair", _) $ d $ (Const ("Product_Type.Pair", _) FORALL occur.
|
wneuper@59582
|
45 |
\item introduce simple type names to LUCAS_INTERPRETER <-?-> readable paper
|
wneuper@59577
|
46 |
\item xxx
|
wneuper@59582
|
47 |
\item check in states: length ?? > 1 with tracing these cases
|
wneuper@59578
|
48 |
\item xxx
|
wneuper@59579
|
49 |
\item datatype L,R,D --> Istate
|
wneuper@59578
|
50 |
\item xxx
|
wneuper@59584
|
51 |
\item Lucin.Ass_Weak etc \<longrightarrow> NEW structutre ? LItool ?
|
wneuper@59578
|
52 |
\item xxx
|
wneuper@59579
|
53 |
\item istate
|
wneuper@59579
|
54 |
\begin{itemize}
|
wneuper@59583
|
55 |
\item DONE rename srcstate --> pstate
|
wneuper@59583
|
56 |
and after review of Rrls, detail ?-->? istate
|
wneuper@59579
|
57 |
\item locate_input_tactic: get_simplifier cstate (*TODO: shift to init_istate*)
|
wneuper@59579
|
58 |
\item xxx
|
wneuper@59579
|
59 |
\item xxx
|
wneuper@59579
|
60 |
\item xxx
|
wneuper@59579
|
61 |
\end{itemize}
|
wneuper@59579
|
62 |
\item xxx
|
wneuper@59579
|
63 |
\item ctxt context
|
wneuper@59579
|
64 |
\begin{itemize}
|
wneuper@59583
|
65 |
\item DONE Rewrite.eval_listexpr_ thy ..: can thy be extracted from ctxt ?
|
wneuper@59579
|
66 |
\item xxx
|
wneuper@59579
|
67 |
\item xxx
|
wneuper@59579
|
68 |
\end{itemize}
|
wneuper@59578
|
69 |
\item push srls into srcstate
|
wneuper@59578
|
70 |
\item change Lucin.handle_leaf "locate" "Isac" sr E a v t
|
wneuper@59578
|
71 |
to Lucin.handle_leaf "locate" ctxt ( srcstate ) !!srls in scrstate!!^^
|
wneuper@59578
|
72 |
and redesign handle_leaf .. subst_stacexpr .. associate
|
wneuper@59578
|
73 |
to Tactic.from_code :
|
wneuper@59578
|
74 |
+ keep ! trace_script
|
wneuper@59582
|
75 |
\item in locate_input_tactic .. ?assy?; Program.is_eval_expr .use Term.exists_Const
|
wneuper@59579
|
76 |
\item trace_script: replace ' by " in writeln
|
wneuper@59578
|
77 |
\item xxx
|
wneuper@59578
|
78 |
\item librarys.ml --> libraryC.sml + text from termC.sml
|
wneuper@59578
|
79 |
\item xxx
|
wneuper@59577
|
80 |
\item rm tactic Check_elementwise "Assumptions" in a way, which keeps it for Minisubpbl
|
wneuper@59577
|
81 |
\item xxx
|
wneuper@59574
|
82 |
\item language definition: use (f #> g) x = x |> f |> g instead of @
|
wneuper@59574
|
83 |
see implementation.pdf p.16
|
wneuper@59574
|
84 |
\item xxx
|
wneuper@59574
|
85 |
\item xxx
|
wneuper@59579
|
86 |
\item xxx
|
wneuper@59574
|
87 |
\item pull update of Ctree.state out of 2 Lucin funs (locate_input_formula is different))
|
wneuper@59569
|
88 |
\begin{itemize}
|
wneuper@59574
|
89 |
\item 1. check if Ctree.state can be updated OUTSIDE determine_next_step
|
wneuper@59574
|
90 |
\item 2. fun locate_input_tactic: pull generate1 out (because it stores ctxt also in cstate)
|
wneuper@59577
|
91 |
\item
|
wneuper@59569
|
92 |
\item xxx
|
wneuper@59569
|
93 |
\end{itemize}
|
wneuper@59577
|
94 |
\item concentracte "insert_assumptions" in "associate" ?for determine_next_tactic ?where?
|
wneuper@59577
|
95 |
\begin{itemize}
|
wneuper@59577
|
96 |
\item rm from "generate1" ("Detail_Set_Inst'", Tactic.Detail_Set' ?)
|
wneuper@59577
|
97 |
\item shift from "applicable_in..Apply_Method" to ? ? ? (is ONLY use-case in appl.sml))
|
wneuper@59583
|
98 |
\item ?"insert_assumptions" necessary in "init_pstate" ?+++? in "applicable_in" ?+++? "associate"
|
wneuper@59577
|
99 |
\item xxx
|
wneuper@59577
|
100 |
\item xxx
|
wneuper@59577
|
101 |
\item DO DELETIONS AFTER analogous concentrations in determine_next_tactic
|
wneuper@59577
|
102 |
\end{itemize}
|
wneuper@59577
|
103 |
\item xxx
|
wneuper@59579
|
104 |
\item ? what is the difference headline <--> cascmd in
|
wneuper@59579
|
105 |
Subproblem' (spec, oris, headline, fmz_, context, cascmd)
|
wneuper@59569
|
106 |
\item xxx
|
wneuper@59574
|
107 |
\item inform: TermC.parse (Celem.assoc_thy "Isac") istr --> parseNEW context istr
|
wneuper@59574
|
108 |
\item extract common code from associate.. stac2tac_
|
wneuper@59574
|
109 |
\end{itemize}
|
wneuper@59574
|
110 |
\<close>
|
wneuper@59574
|
111 |
|
wneuper@59574
|
112 |
section \<open>Separated tasks\<close>
|
wneuper@59574
|
113 |
text \<open>
|
wneuper@59574
|
114 |
\<close>
|
wneuper@59574
|
115 |
subsection \<open>Simple\<close>
|
wneuper@59574
|
116 |
text \<open>
|
wneuper@59574
|
117 |
\begin{itemize}
|
wneuper@59574
|
118 |
\item Diff.thy: differentiateX --> differentiate after removal of script-constant
|
wneuper@59574
|
119 |
\item Test.thy: met_test_sqrt2: deleted?!
|
wneuper@59574
|
120 |
\item xxx
|
wneuper@59577
|
121 |
\item Applicable.applicable_in --> Applicable.tactic_at
|
wneuper@59585
|
122 |
\item Const ("Program.SubProblem", _) --> Const ("Program.SubProblem", _):rename! separate?
|
wneuper@59574
|
123 |
\item xxx
|
wneuper@59578
|
124 |
\item adopt naming conventions in Knowledge: EqSystem --> Equation_System, etc
|
wneuper@59578
|
125 |
\item xxx
|
wneuper@59582
|
126 |
\item TermC.vars_of replace by vars (recognises numerals)
|
wneuper@59578
|
127 |
\item xxx
|
wneuper@59574
|
128 |
\item xxx
|
wneuper@59574
|
129 |
\end{itemize}
|
wneuper@59574
|
130 |
\<close>
|
wneuper@59574
|
131 |
subsection \<open>Simple but laborous\<close>
|
wneuper@59574
|
132 |
text \<open>
|
wneuper@59574
|
133 |
\begin{itemize}
|
wneuper@59579
|
134 |
\item prep_met
|
wneuper@59579
|
135 |
\begin{itemize}
|
wneuper@59579
|
136 |
\item rename field scr in meth
|
wneuper@59579
|
137 |
\item xxx
|
wneuper@59579
|
138 |
\item check match between args of partial_function and model-pattern of meth;
|
wneuper@59579
|
139 |
provide error message.
|
wneuper@59579
|
140 |
\item xxx
|
wneuper@59579
|
141 |
\item automatically extrac rls from program-code
|
wneuper@59579
|
142 |
? take ["SignalProcessing", "Z_Transform", "Inverse_sub"] as an example ?
|
wneuper@59579
|
143 |
\item xxx
|
wneuper@59579
|
144 |
\item xxx
|
wneuper@59579
|
145 |
\item xxx
|
wneuper@59579
|
146 |
\end{itemize}
|
wneuper@59574
|
147 |
\item xxx
|
wneuper@59579
|
148 |
\item drop "init_form" and use "Take" in programs (start with latter!)
|
wneuper@59574
|
149 |
\item xxx
|
wneuper@59582
|
150 |
\item deprive Check_elementwise, but keep it for Minisubpl
|
wneuper@59582
|
151 |
(which checks for Check_Postcond separated by another tactic)
|
wneuper@59582
|
152 |
This seems a prerequisite for appropriate handling of contexts at Check_Postcond.
|
wneuper@59582
|
153 |
\item xxx
|
wneuper@59574
|
154 |
\item xxx
|
wneuper@59574
|
155 |
\end{itemize}
|
wneuper@59574
|
156 |
\<close>
|
wneuper@59574
|
157 |
subsection \<open>Questionable\<close>
|
wneuper@59574
|
158 |
text \<open>
|
wneuper@59574
|
159 |
\begin{itemize}
|
wneuper@59574
|
160 |
\item finish output of trace_script with Check_Postcond (useful for SubProblem)
|
wneuper@59574
|
161 |
\item unify in signature LANGUAGE_TOOLS =\\
|
wneuper@59574
|
162 |
val pblterm: Rule.domID -> Celem.pblID -> term vvv vvv\\
|
wneuper@59574
|
163 |
val subpbl: string -> string list -> term unify with ^^^
|
wneuper@59574
|
164 |
\item xxx
|
wneuper@59574
|
165 |
\item xxx
|
wneuper@59574
|
166 |
\item xxx
|
wneuper@59574
|
167 |
\item xxx
|
wneuper@59574
|
168 |
\end{itemize}
|
wneuper@59574
|
169 |
\<close>
|
wneuper@59574
|
170 |
section \<open>Complex, related to --> other tasks\<close>
|
wneuper@59574
|
171 |
text \<open>
|
wneuper@59574
|
172 |
\<close>
|
wneuper@59574
|
173 |
subsection \<open>review all signatures wrt. implementation.pdf canonical argument order\<close>
|
wneuper@59574
|
174 |
text \<open>
|
wneuper@59574
|
175 |
\<close>
|
wneuper@59574
|
176 |
subsection \<open>solve, loc_solve_, ...\<close>
|
wneuper@59574
|
177 |
text \<open>
|
wneuper@59574
|
178 |
unify to calcstate, calcstate'
|
wneuper@59574
|
179 |
\begin{itemize}
|
wneuper@59583
|
180 |
\item ?delete Check_Postcond' in begin_end_prog (already done in solve?)
|
wneuper@59583
|
181 |
in case both are needed, unify !
|
wneuper@59583
|
182 |
\item xxx
|
wneuper@59574
|
183 |
\item ? rename begin_end_prog -> check_switch_prog
|
wneuper@59574
|
184 |
\item adopt the same for specification phase
|
wneuper@59574
|
185 |
\item xxx
|
wneuper@59574
|
186 |
\end{itemize}
|
wneuper@59574
|
187 |
\<close>
|
wneuper@59574
|
188 |
subsection \<open>Review modelling- + specification-phase\<close>
|
wneuper@59574
|
189 |
text \<open>
|
wneuper@59574
|
190 |
\begin{itemize}
|
wneuper@59574
|
191 |
\item "--- hack for funpack: generalise handling of meths which extend problem items ---"
|
wneuper@59569
|
192 |
\begin{itemize}
|
wneuper@59574
|
193 |
\item see several locations of hack in code
|
wneuper@59574
|
194 |
\item these locations are NOT sufficient, see
|
wneuper@59574
|
195 |
test/../biegelinie-3.sml --- IntegrierenUndKonstanteBestimmen2: Bsp.7.70. auto ---
|
wneuper@59574
|
196 |
\item "fun associate" "match_ags ..dI" instead "..pI" breaks many tests, however,
|
wneuper@59574
|
197 |
this would be according to survey Notes (3) in src/../calchead.sml.
|
wneuper@59574
|
198 |
\end{itemize}
|
wneuper@59574
|
199 |
\item see "failed trial to generalise handling of meths"98298342fb6d
|
wneuper@59574
|
200 |
\item abstract specify + nxt_specif to common aux-funs;
|
wneuper@59574
|
201 |
see e.g. "--- hack for funpack: generalise handling of meths which extend problem items ---"
|
wneuper@59574
|
202 |
\item xxx
|
wneuper@59574
|
203 |
\item type model = itm list ?
|
wneuper@59574
|
204 |
\item review survey Notes in src/../calchead.sml: they are questionable
|
wneuper@59574
|
205 |
\item review copy-named, probably two issues commingled
|
wneuper@59574
|
206 |
\begin{itemize}
|
wneuper@59574
|
207 |
\item special handling of "#Find#, because it is not a formal argument of partial_function
|
wneuper@59574
|
208 |
\item special naming for solutions of equation solving: x_1, x_2, ...
|
wneuper@59569
|
209 |
\end{itemize}
|
wneuper@59569
|
210 |
\item xxx
|
wneuper@59574
|
211 |
\item this has been written in one go:
|
wneuper@59574
|
212 |
\begin{itemize}
|
wneuper@59574
|
213 |
\item reconsidering Model.max_vt, use problem with meth ["DiffApp","max_by_calculus"]
|
wneuper@59574
|
214 |
\item reconsider add_field': where is it used for what? Shift into mk_oris
|
wneuper@59574
|
215 |
\item reconsider match_itms_oris: where is it used for what? max_vt ONLY???
|
wneuper@59574
|
216 |
\item in Specify_Method search root-oris for items (e.g. "errorBound"), #1# in survey
|
wneuper@59574
|
217 |
\item Specify_Problem, Specify_Method: check respective identifiers after re-Specify_
|
wneuper@59574
|
218 |
(relevant for pre-condition)
|
wneuper@59574
|
219 |
\item unify match_ags to mk_oris1..N with different args (fmz | pat list, pbl | meth
|
wneuper@59574
|
220 |
\item
|
wneuper@59574
|
221 |
\end{itemize}
|
wneuper@59574
|
222 |
\end{itemize}
|
wneuper@59574
|
223 |
\<close>
|
wneuper@59574
|
224 |
subsection \<open>taci list, type step\<close>
|
wneuper@59574
|
225 |
text \<open>
|
wneuper@59574
|
226 |
\begin{itemize}
|
wneuper@59574
|
227 |
\item states.sml: check, when "length tacis > 1"
|
wneuper@59574
|
228 |
\item in Test_Isac.thy there is only 1 error in Interpret/inform.sml
|
wneuper@59574
|
229 |
\item (*WN190713 REMOVE: "creating a new node" was never implemented for more than one node?!?
|
wneuper@59569
|
230 |
\item xxx
|
wneuper@59573
|
231 |
\end{itemize}
|
wneuper@59574
|
232 |
\<close>
|
wneuper@59574
|
233 |
subsection \<open>Cleanup signatures\<close>
|
wneuper@59574
|
234 |
text \<open>
|
wneuper@59573
|
235 |
\begin{itemize}
|
wneuper@59573
|
236 |
\item there are comments in several signatures
|
wneuper@59573
|
237 |
\item ML_file "~~/src/Tools/isac/Interpret/specification-elems.sml" can be (almost) deleted
|
wneuper@59574
|
238 |
\item src/../Frontend/: signatures missing
|
wneuper@59573
|
239 |
\item xxx
|
wneuper@59569
|
240 |
\end{itemize}
|
wneuper@59574
|
241 |
\<close>
|
wneuper@59574
|
242 |
subsection \<open>Ctree\<close>
|
wneuper@59574
|
243 |
text \<open>
|
wneuper@59568
|
244 |
\begin{itemize}
|
wneuper@59574
|
245 |
\item review get_ctxt, update_ctxt, get_istate, upd_istate, upd_ctxt,
|
wneuper@59574
|
246 |
<---> update_loc', repl_loc (remove the latter)
|
wneuper@59568
|
247 |
\item delete field ctxt in PblObj in favour of loc
|
wneuper@59568
|
248 |
\item xxx
|
wneuper@59574
|
249 |
\item xxx
|
wneuper@59568
|
250 |
\end{itemize}
|
wneuper@59574
|
251 |
\<close>
|
wneuper@59574
|
252 |
subsection \<open>replace theory/thy by context/ctxt\<close>
|
wneuper@59574
|
253 |
text \<open>
|
wneuper@59574
|
254 |
\begin{itemize}
|
wneuper@59577
|
255 |
\item cleaup the many conversions string -- theory
|
wneuper@59577
|
256 |
\item make dest_spec --> (theory, pblID, metID) ?+ common_subthy ?
|
wneuper@59574
|
257 |
\item 1. Rewrite.eval_true_, then
|
wneuper@59574
|
258 |
Lucin.handle_leaf, Rewrite.eval_listexpr_, Generate.generate1, Lucin.stac2tac.
|
wneuper@59577
|
259 |
\item fun associate
|
wneuper@59577
|
260 |
let val thy = Celem.assoc_thy "Isac";(*TODO*)
|
wneuper@59574
|
261 |
\item xxx
|
wneuper@59574
|
262 |
\item xxx
|
wneuper@59577
|
263 |
\item xxx
|
wneuper@59577
|
264 |
\item !!! Tactic.Refine_Problem uses Pattern.match, which takes a theory, NOT a ctxt
|
wneuper@59577
|
265 |
but there is Proof_Context.theory_of !!!
|
wneuper@59574
|
266 |
\end{itemize}
|
wneuper@59574
|
267 |
\<close>
|
wneuper@59583
|
268 |
subsection \<open>Rfuns, Begin_/End_Detail', Rrls, Istate\<close>
|
wneuper@59574
|
269 |
text \<open>
|
wneuper@59562
|
270 |
\begin{itemize}
|
wneuper@59573
|
271 |
\item removing from_pblobj_or_detail' causes many strange errors
|
wneuper@59573
|
272 |
\item ^^^+ see from_pblobj_or_detail_thm, from_pblobj_or_detail_calc, ...
|
wneuper@59573
|
273 |
\item xxx
|
wneuper@59569
|
274 |
\item probably only "normal_form" seems to be needed
|
wneuper@59569
|
275 |
\item deleted Rfuns in NEW "locate_input_tactic": no active test for "locate_rule"
|
wneuper@59569
|
276 |
but that seems desirable
|
wneuper@59569
|
277 |
\item ?how is the relation to reverse-rewriting ???
|
wneuper@59569
|
278 |
\item "Rfuns" markers in test/../rational
|
wneuper@59562
|
279 |
\item xxx
|
wneuper@59573
|
280 |
\item datatype istate (Istate.T): remove RrlsState, scrstate: use Rrls only for creating results beyond
|
wneuper@59573
|
281 |
rewriting and/or respective intermediate steps (e.g. cancellation of fractions).
|
wneuper@59583
|
282 |
Thus we get a 1-step-action which does NOT require a state beyond istate/pstate.
|
wneuper@59573
|
283 |
Thus we drastically reduce complexity, also get rid of "fun from_pblobj_or_detail_calc" , etc.
|
wneuper@59573
|
284 |
\item debug ^^^ related: is there an occurence of Steps with more than 1 element?
|
wneuper@59569
|
285 |
\item xxx
|
wneuper@59573
|
286 |
\item and do_solve_step (* WN1907: ?only for Begin_/End_Detail' DEL!!!*)
|
wneuper@59573
|
287 |
\item xxx
|
wneuper@59573
|
288 |
\item shouldn't go Rfuns from Rewrite --> Rewrite_Set; they behave similar to "fun interSteps" ?
|
wneuper@59562
|
289 |
\end{itemize}
|
wneuper@59574
|
290 |
\<close>
|
wneuper@59574
|
291 |
subsection \<open>Inverse_Z_Transform.thy\<close>
|
wneuper@59574
|
292 |
text \<open>
|
wneuper@59538
|
293 |
\begin{itemize}
|
wneuper@59550
|
294 |
\item\label{new-var-rhs} rule1..6, ruleZY introduce new variables on the rhs of the rewrite-rule.
|
wneuper@59550
|
295 |
? replace rewriting with substitution ?!?
|
wneuper@59537
|
296 |
The problem is related to the decision of typing for "d_d" and making bound variables free (while
|
wneuper@59550
|
297 |
shifting specific handling in equation solving etc. to the meta-logic).
|
wneuper@59550
|
298 |
\item Find "stepResponse (x[n::real]::bool)" is superfluous, because immediately used by
|
wneuper@59550
|
299 |
rewrite-rules; see \ref{new-var-rhs}.
|
wneuper@59538
|
300 |
\item Reconsider whole problem:
|
wneuper@59538
|
301 |
input only the polynomial as argument of partial_function, in ([1], Frm) compile lhs "X z" ?
|
wneuper@59538
|
302 |
\end{itemize}
|
wneuper@59574
|
303 |
\<close>
|
wneuper@59574
|
304 |
subsection \<open>Adopt Isabelle's numerals for Isac\<close>
|
wneuper@59574
|
305 |
text \<open>
|
wneuper@59540
|
306 |
\begin{itemize}
|
wneuper@59574
|
307 |
\item replace numerals of type "real" by "nat" in some specific functions from ListC.thy
|
wneuper@59574
|
308 |
and have both representations in parallel for "nat".
|
wneuper@59574
|
309 |
\item xxx
|
wneuper@59574
|
310 |
\item xxx
|
wneuper@59540
|
311 |
\end{itemize}
|
wneuper@59574
|
312 |
\<close>
|
wneuper@59574
|
313 |
subsection \<open>Finetunig required for xmldata\<close>
|
wneuper@59574
|
314 |
text \<open>
|
wneuper@59574
|
315 |
See xmldata https://intra.ist.tugraz.at/hg/isac/rev/5b222a649390
|
wneuper@59574
|
316 |
and in kbase html-representation generated from these xmldata.
|
wneuper@59574
|
317 |
Notes in ~~/xmldata/TODO.txt.
|
wneuper@59574
|
318 |
\<close>
|
wneuper@59574
|
319 |
|
wneuper@59574
|
320 |
section \<open>Hints for further development\<close>
|
wneuper@59574
|
321 |
text \<open>
|
wneuper@59574
|
322 |
\<close>
|
wneuper@59574
|
323 |
subsection \<open>get proof-state\<close>
|
wneuper@59574
|
324 |
text \<open>
|
wneuper@59574
|
325 |
Re: [isabelle] Programatically get "this"
|
wneuper@59574
|
326 |
----------------------------------------------------
|
wneuper@59574
|
327 |
So here is my (Makarius') version of your initial example, following these principles:
|
wneuper@59574
|
328 |
begin{verbatim}
|
wneuper@59574
|
329 |
notepad
|
wneuper@59574
|
330 |
begin
|
wneuper@59574
|
331 |
assume a: A
|
wneuper@59574
|
332 |
ML_val \<open>
|
wneuper@59574
|
333 |
val ctxt = @{context};
|
wneuper@59558
|
334 |
|
wneuper@59574
|
335 |
val this_name =
|
wneuper@59574
|
336 |
Name_Space.full_name (Proof_Context.naming_of ctxt) (Binding.name
|
wneuper@59574
|
337 |
Auto_Bind.thisN);
|
wneuper@59574
|
338 |
val this = #thms (the (Proof_Context.lookup_fact ctxt this_name));
|
wneuper@59574
|
339 |
\<close>
|
wneuper@59574
|
340 |
end
|
wneuper@59574
|
341 |
end{verbatim}
|
wneuper@59574
|
342 |
\<close>
|
wneuper@59574
|
343 |
subsection \<open>write Specification to jEdit\<close>
|
wneuper@59574
|
344 |
text \<open>
|
wneuper@59574
|
345 |
Re: [isabelle] Printing terms with type annotations
|
wneuper@59574
|
346 |
----------------------------------------------------
|
wneuper@59574
|
347 |
On 06/02/2019 17:52, Moa Johansson wrote:
|
wneuper@59574
|
348 |
>
|
wneuper@59574
|
349 |
> I’m writing some code that should create a snippet of Isar script.
|
wneuper@59574
|
350 |
|
wneuper@59574
|
351 |
This is how Sledgehammer approximates this:
|
wneuper@59574
|
352 |
|
wneuper@59574
|
353 |
http://isabelle.in.tum.de/repos/isabelle/file/Isabelle2018/src/HOL/Tools/Sledgehammer/sledgehammer_isar_proof.ML#l299
|
wneuper@59574
|
354 |
|
wneuper@59574
|
355 |
(The module name already shows that the proper terminology is "Isar
|
wneuper@59574
|
356 |
proof" (or "Isar proof text"). Proof scripts are a thing from the past,
|
wneuper@59574
|
357 |
before Isar. You can emulate old-style proof scripts via a sequence of
|
wneuper@59574
|
358 |
'apply' commands, but this is improper Isar.)
|
wneuper@59574
|
359 |
|
wneuper@59574
|
360 |
Note that there is no standard function in Isabelle/Pure, because the
|
wneuper@59574
|
361 |
problem to print just the right amount of type information is very
|
wneuper@59574
|
362 |
complex and not fully solved. One day, after 1 or 2 rounds of
|
wneuper@59574
|
363 |
refinements over the above approach, it might become generally available.
|
wneuper@59574
|
364 |
\<close>
|
wneuper@59574
|
365 |
subsection \<open>follow Isabelle conventions (*Does not yet work in Isabelle2018\<close>
|
wneuper@59574
|
366 |
text \<open>
|
wneuper@59574
|
367 |
isabelle update -u path_cartouches
|
wneuper@59574
|
368 |
isabelle update -u inner_syntax_cartouches
|
wneuper@59574
|
369 |
\<close>
|
wneuper@59582
|
370 |
section \<open>Questions to Isabelle experts\<close>
|
wneuper@59582
|
371 |
text \<open>
|
wneuper@59582
|
372 |
\begin{itemize}
|
wneuper@59582
|
373 |
\item how HANDLE these exceptions, e.g.:
|
wneuper@59582
|
374 |
Syntax.read_term ctxt "Randbedingungen y 0 = (0::real), y L = 0, M_b 0 = 0, M_b L = 0]"
|
wneuper@59582
|
375 |
GIVES
|
wneuper@59582
|
376 |
"Inner syntax error
|
wneuper@59582
|
377 |
Failed to parse term"
|
wneuper@59582
|
378 |
\item xxx
|
wneuper@59582
|
379 |
\item xxx
|
wneuper@59582
|
380 |
\item xxx
|
wneuper@59582
|
381 |
\item xxx
|
wneuper@59582
|
382 |
\end{itemize}
|
wneuper@59582
|
383 |
\<close>
|
wneuper@59582
|
384 |
|
wneuper@59574
|
385 |
section \<open>For copy & paste\<close>
|
wneuper@59574
|
386 |
text \<open>
|
wneuper@59582
|
387 |
\begin{itemize}
|
wneuper@59558
|
388 |
\begin{itemize}
|
wneuper@59558
|
389 |
\item xxx
|
wneuper@59540
|
390 |
\begin{itemize}
|
wneuper@59558
|
391 |
\item xxx
|
wneuper@59540
|
392 |
\begin{itemize}
|
wneuper@59558
|
393 |
\item xxx
|
wneuper@59574
|
394 |
\begin{itemize}
|
wneuper@59574
|
395 |
\item xxx
|
wneuper@59574
|
396 |
\end{itemize}
|
wneuper@59540
|
397 |
\end{itemize}
|
wneuper@59540
|
398 |
\end{itemize}
|
wneuper@59504
|
399 |
\end{itemize}
|
wneuper@59504
|
400 |
\end{itemize}
|
wneuper@59504
|
401 |
\<close>
|
wneuper@59574
|
402 |
subsection \<open>xxx\<close>
|
wneuper@59574
|
403 |
subsubsection \<open>xxx\<close>
|
neuper@52150
|
404 |
end
|