walther@60096
|
1 |
(* Title: src/Tools/isac/BridgeJEdit/Calculation.thy
|
walther@60095
|
2 |
Author: Walther Neuper, JKU Linz
|
walther@60095
|
3 |
(c) due to copyright terms
|
walther@60095
|
4 |
|
walther@60121
|
5 |
Outer syntax for Isabelle/Isac's Calculation.
|
walther@60095
|
6 |
*)
|
walther@60095
|
7 |
|
walther@60095
|
8 |
theory Calculation
|
walther@60115
|
9 |
imports
|
walther@60149
|
10 |
(**) "~~/src/Tools/isac/Knowledge/Build_Thydata" (*remove after devel.of BridgeJEdit*)
|
walther@60149
|
11 |
(** )"~~/src/Tools/isac/MathEngine/MathEngine" ( *activate after devel.of BridgeJEdit*)
|
walther@60149
|
12 |
(**) "HOL-SPARK.SPARK" (*remove after devel.of BridgeJEdit*)
|
walther@60095
|
13 |
keywords
|
walther@60127
|
14 |
"Example" :: thy_load ("str") (* "spark_vc" :: thy_goal *)
|
walther@60132
|
15 |
and "Problem" :: thy_decl (* root-problem + recursively in Solution;
|
walther@60132
|
16 |
"spark_vc" :: thy_goal *)
|
walther@60127
|
17 |
and "Specification" "Model" "References" "Solution" (* structure only *)
|
walther@60147
|
18 |
and "Given" "Find" "Relate" "Where" (* await input of term *)
|
walther@60127
|
19 |
and "RTheory" (* await input of string; "R" distingues "Problem".."RProblem" *)
|
walther@60127
|
20 |
and "RProblem" "RMethod" (* await input of string list *)
|
walther@60127
|
21 |
"Tactic" (* optional for each step 0..end of calculation *)
|
walther@60095
|
22 |
begin
|
walther@60095
|
23 |
|
walther@60123
|
24 |
(**)ML_file parseC.sml(**)
|
walther@60146
|
25 |
(**)ML_file preliminary.sml(**)
|
walther@60146
|
26 |
|
walther@60095
|
27 |
|
walther@60123
|
28 |
section \<open>new code for Outer_Syntax Example, Problem, ...\<close>
|
walther@60117
|
29 |
|
walther@60123
|
30 |
subsection \<open>code for Problem\<close>
|
walther@60123
|
31 |
text \<open>
|
walther@60123
|
32 |
Again, we copy code from spark_vc into Calculation.thy and
|
walther@60123
|
33 |
add functionality for Problem
|
walther@60123
|
34 |
such that the code keeps running during adaption from spark_vc to Problem.
|
walther@60123
|
35 |
\<close> ML \<open>
|
walther@60123
|
36 |
\<close> ML \<open>
|
walther@60123
|
37 |
\<close>
|
walther@60123
|
38 |
|
walther@60148
|
39 |
subsubsection \<open>TODO\<close>
|
walther@60123
|
40 |
ML \<open>
|
walther@60123
|
41 |
\<close> ML \<open>
|
walther@60123
|
42 |
\<close> ML \<open>
|
walther@60123
|
43 |
\<close>
|
walther@60148
|
44 |
|
walther@60148
|
45 |
subsubsection \<open>TODO\<close>
|
walther@60123
|
46 |
ML \<open>
|
walther@60123
|
47 |
\<close> ML \<open>
|
walther@60123
|
48 |
\<close> ML \<open>
|
walther@60148
|
49 |
\<close>
|
walther@60123
|
50 |
|
walther@60148
|
51 |
subsubsection \<open>TODO\<close>
|
walther@60123
|
52 |
ML \<open>
|
walther@60123
|
53 |
\<close> ML \<open>
|
walther@60132
|
54 |
\<close> ML \<open>
|
walther@60097
|
55 |
\<close>
|
walther@60097
|
56 |
|
walther@60103
|
57 |
section \<open>setup command_keyword \<close>
|
walther@60103
|
58 |
ML \<open>
|
walther@60103
|
59 |
\<close> ML \<open>
|
walther@60103
|
60 |
val _ =
|
walther@60117
|
61 |
Outer_Syntax.command \<^command_keyword>\<open>Example\<close> "start a Calculation from a Formalise-file"
|
walther@60117
|
62 |
(Resources.provide_parse_files "Example" -- Parse.parname
|
walther@60150
|
63 |
>> (Toplevel.theory o (*vvvvvvvvvvvvvvvvvvvv--- HACK: test independent from session Isac*)
|
walther@60150
|
64 |
(Preliminary.load_formalisation @{theory Biegelinie} ParseC.formalisation)));
|
walther@60110
|
65 |
\<close> ML \<open>
|
walther@60123
|
66 |
val _ =
|
walther@60123
|
67 |
Outer_Syntax.local_theory_to_proof \<^command_keyword>\<open>Problem\<close>
|
walther@60123
|
68 |
"start a Specification, either from scratch or from preceding 'Example'"
|
walther@60148
|
69 |
(ParseC.problem >> Preliminary.prove_vc);
|
walther@60123
|
70 |
\<close> ML \<open>
|
walther@60148
|
71 |
Preliminary.prove_vc: ParseC.problem -> Proof.context -> Proof.state;
|
walther@60146
|
72 |
SPARK_Commands.prove_vc: string -> Proof.context -> Proof.state
|
walther@60146
|
73 |
\<close> ML \<open>
|
walther@60132
|
74 |
\<close>
|
walther@60103
|
75 |
|
walther@60116
|
76 |
subsection \<open>test runs with Example\<close>
|
walther@60150
|
77 |
|
walther@60150
|
78 |
Example \<open>/usr/local/isabisac/src/Tools/isac/Examples/exp_Statics_Biegel_Timischl_7-70\<close>
|
walther@60150
|
79 |
|
walther@60150
|
80 |
(*vvvvvvvv--- makes Outer_Syntax..Problem run; Isac code is just added*)
|
walther@60150
|
81 |
spark_open \<open>~~/src/HOL/SPARK/Examples/Gcd/greatest_common_divisor/g_c_d\<close>
|
walther@60150
|
82 |
|
walther@60150
|
83 |
(*..Problem adds to SPARK..*)
|
walther@60150
|
84 |
Problem (*procedure_g_c_d_4*)("Biegelinie", ["Biegelinien"])
|
walther@60150
|
85 |
Specification:
|
walther@60150
|
86 |
(*1*)
|
walther@60150
|
87 |
Model:
|
walther@60150
|
88 |
Given: "Traegerlaenge ", "Streckenlast "
|
walther@60150
|
89 |
Where: "q_0 ist_integrierbar_auf {| 0, L |}", "0 < L"
|
walther@60150
|
90 |
Find: "Biegelinie "
|
walther@60150
|
91 |
Relate: "Randbedingungen "
|
walther@60150
|
92 |
References:
|
walther@60150
|
93 |
(*2*)
|
walther@60150
|
94 |
RTheory: ""
|
walther@60150
|
95 |
RProblem: ["", ""]
|
walther@60150
|
96 |
RMethod: ["", ""]
|
walther@60150
|
97 |
(*2*)
|
walther@60150
|
98 |
(*1*)
|
walther@60150
|
99 |
Solution:
|
walther@60150
|
100 |
(*
|
walther@60150
|
101 |
compare click on above Given: "Traegerlaenge ", "Streckenlast "
|
walther@60150
|
102 |
with click on from \<open>0 < d\<close> in SPARK/../Greatest_Common_Divisorthy
|
walther@60150
|
103 |
*)
|
walther@60150
|
104 |
|
walther@60150
|
105 |
subsection \<open><Output> BY CLICK ON Problem..Solution\<close>
|
walther@60116
|
106 |
text \<open>
|
walther@60150
|
107 |
Comparison of the two subsections below:
|
walther@60150
|
108 |
(1) <Output> AFTER session Isac (after ./zcoding-to-test.sh) WITH click on Problem..Specification:
|
walther@60150
|
109 |
((WHILE click ON Example SHOWS NO ERROR))
|
walther@60150
|
110 |
# headline = ..(1) == (2) ..PARSED + Specification
|
walther@60150
|
111 |
# i_model = Inc ..IN 4 ELEMENTS, (1) == (2) ..?!? FROM PARSED ?!?
|
walther@60150
|
112 |
# o_model = COMPLETE WITH 7 ELEMENTS ..FROM Example
|
walther@60150
|
113 |
# refs = ("Biegelinie", ["Biegelinien"], ["IntegrierenUndKonstanteBestimmen2"])..FROM References
|
walther@60107
|
114 |
|
walther@60150
|
115 |
(2) <Output> WITHOUT session Isac (after ./ztest-to-coding.sh) WITH click on Problem..Specification:
|
walther@60150
|
116 |
((WHILE click ON Example SHOWS !!! ERROR))
|
walther@60150
|
117 |
# headline = ..(1) == (2) ..PARSED + Specification
|
walther@60150
|
118 |
# i_model = Inc ..IN 4 ELEMENTS, (1) == (2) ..?!? FROM PARSED ?!?
|
walther@60150
|
119 |
# o_model = [] ..NO Example
|
walther@60150
|
120 |
# refs = ("Biegelinie", ["Biegelinien"], ["empty_meth_id"]) ..FROM headline ONLY
|
walther@60102
|
121 |
\<close>
|
walther@60129
|
122 |
|
walther@60150
|
123 |
subsubsection \<open>(1) WITH session Isac (AFTER ./zcoding-to-test.sh)\<close>
|
walther@60129
|
124 |
text \<open>
|
walther@60150
|
125 |
{a = "//--- Spark_Commands.prove_vc", headline =
|
walther@60150
|
126 |
(((((("(", "Biegelinie"), ","), ["Biegelinien"]), ")"),
|
walther@60150
|
127 |
((((("Specification", ":"),
|
walther@60150
|
128 |
((((((((((((((("Model", (("", ""), "")), ":"), "Given"), ":"), ["<markup>", "<markup>"]),
|
walther@60150
|
129 |
"Where"),
|
walther@60150
|
130 |
":"),
|
walther@60150
|
131 |
["<markup>", "<markup>"]),
|
walther@60150
|
132 |
"Find"),
|
walther@60150
|
133 |
":"),
|
walther@60150
|
134 |
"<markup>"),
|
walther@60150
|
135 |
"Relate"),
|
walther@60150
|
136 |
":"),
|
walther@60150
|
137 |
["<markup>"]),
|
walther@60150
|
138 |
(("References", ":"),
|
walther@60150
|
139 |
(((((((("RTheory", ":"), ""), "RProblem"), ":"), ["", ""]), "RMethod"), ":"), ["", ""])))),
|
walther@60150
|
140 |
"Solution"),
|
walther@60150
|
141 |
":"),
|
walther@60150
|
142 |
[])),
|
walther@60150
|
143 |
"")} (line 677 of "~~/src/Tools/isac/BridgeJEdit/Calculation.thy")
|
walther@60150
|
144 |
{a = "prove_vc", i_model =
|
walther@60150
|
145 |
[(0, [], false, "#Given",
|
walther@60150
|
146 |
Inc ((Const ("Biegelinie.Traegerlaenge", "real \<Rightarrow> una"), []), (Const ("empty", "??.'a"), []))),
|
walther@60150
|
147 |
(0, [], false, "#Given",
|
walther@60150
|
148 |
Inc ((Const ("Biegelinie.Streckenlast", "real \<Rightarrow> una"), []), (Const ("empty", "??.'a"), []))),
|
walther@60150
|
149 |
(0, [], false, "#Find",
|
walther@60150
|
150 |
Inc ((Const ("Biegelinie.Biegelinie", "(real \<Rightarrow> real) \<Rightarrow> una"), []),
|
walther@60150
|
151 |
(Const ("empty", "??.'a"), []))),
|
walther@60150
|
152 |
(0, [], false, "#Relate",
|
walther@60150
|
153 |
Inc ((Const ("Biegelinie.Randbedingungen", "bool list \<Rightarrow> una"), []),
|
walther@60150
|
154 |
(Const ("empty", "??.'a"), [])))],
|
walther@60150
|
155 |
o_model =
|
walther@60150
|
156 |
[(1, [1], "#Given", Const ("Biegelinie.Traegerlaenge", "real \<Rightarrow> una"), [Free ("L", "real")]),
|
walther@60150
|
157 |
(2, [1], "#Given", Const ("Biegelinie.Streckenlast", "real \<Rightarrow> una"), [Free ("q_0", "real")]),
|
walther@60150
|
158 |
(3, [1], "#Find", Const ("Biegelinie.Biegelinie", "(real \<Rightarrow> real) \<Rightarrow> una"),
|
walther@60150
|
159 |
[Free ("y", "real \<Rightarrow> real")]),
|
walther@60150
|
160 |
(4, [1], "#Relate", Const ("Biegelinie.Randbedingungen", "bool list \<Rightarrow> una"),
|
walther@60150
|
161 |
[Const ("List.list.Cons", "bool \<Rightarrow> bool list \<Rightarrow> bool list") $
|
walther@60150
|
162 |
(Const ("HOL.eq", "real \<Rightarrow> real \<Rightarrow> bool") $ (Free ("y", "real \<Rightarrow> real") $ Free ("0", "real")) $
|
walther@60150
|
163 |
Free ("0", "real")) $
|
walther@60150
|
164 |
Const ("List.list.Nil", "bool list"),
|
walther@60150
|
165 |
Const ("List.list.Cons", "bool \<Rightarrow> bool list \<Rightarrow> bool list") $
|
walther@60150
|
166 |
(Const ("HOL.eq", "real \<Rightarrow> real \<Rightarrow> bool") $ (Free ("y", "real \<Rightarrow> real") $ Free ("L", "real")) $
|
walther@60150
|
167 |
Free ("0", "real")) $
|
walther@60150
|
168 |
Const ("List.list.Nil", "bool list"),
|
walther@60150
|
169 |
Const ("List.list.Cons", "bool \<Rightarrow> bool list \<Rightarrow> bool list") $
|
walther@60150
|
170 |
(Const ("HOL.eq", "real \<Rightarrow> real \<Rightarrow> bool") $
|
walther@60150
|
171 |
(Const ("Biegelinie.M'_b", "real \<Rightarrow> real") $ Free ("0", "real")) $ Free ("0", "real")) $
|
walther@60150
|
172 |
Const ("List.list.Nil", "bool list"),
|
walther@60150
|
173 |
Const ("List.list.Cons", "bool \<Rightarrow> bool list \<Rightarrow> bool list") $
|
walther@60150
|
174 |
(Const ("HOL.eq", "real \<Rightarrow> real \<Rightarrow> bool") $
|
walther@60150
|
175 |
(Const ("Biegelinie.M'_b", "real \<Rightarrow> real") $ Free ("L", "real")) $ Free ("0", "real")) $
|
walther@60150
|
176 |
Const ("List.list.Nil", "bool list")]),
|
walther@60150
|
177 |
(5, [1], "#undef", Const ("Biegelinie.FunktionsVariable", "real \<Rightarrow> una"), [Free ("x", "real")]),
|
walther@60150
|
178 |
(6, [1], "#undef", Const ("Biegelinie.GleichungsVariablen", "real list \<Rightarrow> una"),
|
walther@60150
|
179 |
[Const ("List.list.Cons", "real \<Rightarrow> real list \<Rightarrow> real list") $ Free ("c", "real") $
|
walther@60150
|
180 |
Const ("List.list.Nil", "real list"),
|
walther@60150
|
181 |
Const ("List.list.Cons", "real \<Rightarrow> real list \<Rightarrow> real list") $ Free ("c_2", "real") $
|
walther@60150
|
182 |
Const ("List.list.Nil", "real list"),
|
walther@60150
|
183 |
Const ("List.list.Cons", "real \<Rightarrow> real list \<Rightarrow> real list") $ Free ("c_3", "real") $
|
walther@60150
|
184 |
Const ("List.list.Nil", "real list"),
|
walther@60150
|
185 |
Const ("List.list.Cons", "real \<Rightarrow> real list \<Rightarrow> real list") $ Free ("c_4", "real") $
|
walther@60150
|
186 |
Const ("List.list.Nil", "real list")]),
|
walther@60150
|
187 |
(7, [1], "#undef", Const ("Biegelinie.AbleitungBiegelinie", "(real \<Rightarrow> real) \<Rightarrow> una"),
|
walther@60150
|
188 |
[Free ("dy", "real \<Rightarrow> real")])],
|
walther@60150
|
189 |
refs =
|
walther@60150
|
190 |
("Biegelinie", ["Biegelinien"],
|
walther@60150
|
191 |
["IntegrierenUndKonstanteBestimmen2"])} (line 690 of "~~/src/Tools/isac/BridgeJEdit/Calculation.thy")
|
walther@60150
|
192 |
### Proof_Context.gen_fixes
|
walther@60150
|
193 |
### Proof_Context.gen_fixes
|
walther@60150
|
194 |
### Proof_Context.gen_fixes
|
walther@60150
|
195 |
### Syntax_Phases.check_terms
|
walther@60150
|
196 |
### Syntax_Phases.check_typs
|
walther@60150
|
197 |
### Syntax_Phases.check_typs
|
walther@60150
|
198 |
### Syntax_Phases.check_typs
|
walther@60150
|
199 |
## calling Output.report
|
walther@60150
|
200 |
#### Syntax_Phases.check_props
|
walther@60150
|
201 |
### Syntax_Phases.check_terms
|
walther@60150
|
202 |
### Syntax_Phases.check_typs
|
walther@60150
|
203 |
### Syntax_Phases.check_typs
|
walther@60150
|
204 |
## calling Output.report
|
walther@60150
|
205 |
#### Syntax_Phases.check_props
|
walther@60150
|
206 |
### Syntax_Phases.check_terms
|
walther@60150
|
207 |
### Syntax_Phases.check_typs
|
walther@60150
|
208 |
### Syntax_Phases.check_typs
|
walther@60150
|
209 |
## calling Output.report
|
walther@60150
|
210 |
#### Syntax_Phases.check_props
|
walther@60150
|
211 |
### Syntax_Phases.check_terms
|
walther@60150
|
212 |
### Syntax_Phases.check_typs
|
walther@60150
|
213 |
### Syntax_Phases.check_typs
|
walther@60150
|
214 |
## calling Output.report
|
walther@60150
|
215 |
#### Syntax_Phases.check_props
|
walther@60150
|
216 |
### Syntax_Phases.check_terms
|
walther@60150
|
217 |
### Syntax_Phases.check_typs
|
walther@60150
|
218 |
### Syntax_Phases.check_typs
|
walther@60150
|
219 |
## calling Output.report
|
walther@60150
|
220 |
#### Syntax_Phases.check_props
|
walther@60150
|
221 |
### Syntax_Phases.check_terms
|
walther@60150
|
222 |
### Syntax_Phases.check_typs
|
walther@60150
|
223 |
### Syntax_Phases.check_typs
|
walther@60150
|
224 |
## calling Output.report
|
walther@60150
|
225 |
#### Syntax_Phases.check_props
|
walther@60150
|
226 |
### Syntax_Phases.check_terms
|
walther@60150
|
227 |
### Syntax_Phases.check_typs
|
walther@60150
|
228 |
### Syntax_Phases.check_typs
|
walther@60150
|
229 |
## calling Output.report
|
walther@60150
|
230 |
#### Syntax_Phases.check_props
|
walther@60150
|
231 |
### Syntax_Phases.check_terms
|
walther@60150
|
232 |
### Syntax_Phases.check_typs
|
walther@60150
|
233 |
### Syntax_Phases.check_typs
|
walther@60150
|
234 |
## calling Output.report
|
walther@60150
|
235 |
#### Syntax_Phases.check_props
|
walther@60150
|
236 |
### Syntax_Phases.check_terms
|
walther@60150
|
237 |
### Syntax_Phases.check_typs
|
walther@60150
|
238 |
### Syntax_Phases.check_typs
|
walther@60150
|
239 |
## calling Output.report
|
walther@60150
|
240 |
#### Syntax_Phases.check_props
|
walther@60150
|
241 |
### Syntax_Phases.check_terms
|
walther@60150
|
242 |
### Syntax_Phases.check_typs
|
walther@60150
|
243 |
### Syntax_Phases.check_typs
|
walther@60150
|
244 |
## calling Output.report
|
walther@60150
|
245 |
#### Syntax_Phases.check_props
|
walther@60150
|
246 |
### Syntax_Phases.check_terms
|
walther@60150
|
247 |
### Syntax_Phases.check_typs
|
walther@60150
|
248 |
### Syntax_Phases.check_typs
|
walther@60150
|
249 |
## calling Output.report
|
walther@60150
|
250 |
#### Syntax_Phases.check_props
|
walther@60150
|
251 |
### Syntax_Phases.check_terms
|
walther@60150
|
252 |
### Syntax_Phases.check_typs
|
walther@60150
|
253 |
### Syntax_Phases.check_typs
|
walther@60150
|
254 |
## calling Output.report
|
walther@60150
|
255 |
#### Syntax_Phases.check_props
|
walther@60150
|
256 |
### Syntax_Phases.check_terms
|
walther@60150
|
257 |
### Syntax_Phases.check_typs
|
walther@60150
|
258 |
### Syntax_Phases.check_typs
|
walther@60150
|
259 |
## calling Output.report
|
walther@60150
|
260 |
#### Syntax_Phases.check_props
|
walther@60150
|
261 |
### Syntax_Phases.check_terms
|
walther@60150
|
262 |
### Syntax_Phases.check_typs
|
walther@60150
|
263 |
### Syntax_Phases.check_typs
|
walther@60150
|
264 |
## calling Output.report
|
walther@60150
|
265 |
#### Syntax_Phases.check_props
|
walther@60150
|
266 |
### Syntax_Phases.check_terms
|
walther@60150
|
267 |
### Syntax_Phases.check_typs
|
walther@60150
|
268 |
### Syntax_Phases.check_typs
|
walther@60150
|
269 |
## calling Output.report
|
walther@60150
|
270 |
#### Syntax_Phases.check_props
|
walther@60150
|
271 |
### Syntax_Phases.check_terms
|
walther@60150
|
272 |
### Syntax_Phases.check_typs
|
walther@60150
|
273 |
### Syntax_Phases.check_typs
|
walther@60150
|
274 |
## calling Output.report
|
walther@60150
|
275 |
#### Syntax_Phases.check_props
|
walther@60150
|
276 |
### Syntax_Phases.check_terms
|
walther@60150
|
277 |
### Syntax_Phases.check_typs
|
walther@60150
|
278 |
### Syntax_Phases.check_typs
|
walther@60150
|
279 |
## calling Output.report
|
walther@60150
|
280 |
#### Syntax_Phases.check_props
|
walther@60150
|
281 |
### Syntax_Phases.check_terms
|
walther@60150
|
282 |
### Syntax_Phases.check_typs
|
walther@60150
|
283 |
### Syntax_Phases.check_typs
|
walther@60150
|
284 |
## calling Output.report
|
walther@60150
|
285 |
#### Syntax_Phases.check_props
|
walther@60150
|
286 |
### Syntax_Phases.check_terms
|
walther@60150
|
287 |
### Syntax_Phases.check_typs
|
walther@60150
|
288 |
### Syntax_Phases.check_typs
|
walther@60150
|
289 |
## calling Output.report
|
walther@60150
|
290 |
#### Syntax_Phases.check_props
|
walther@60150
|
291 |
### Syntax_Phases.check_terms
|
walther@60150
|
292 |
### Syntax_Phases.check_typs
|
walther@60150
|
293 |
### Syntax_Phases.check_typs
|
walther@60150
|
294 |
## calling Output.report
|
walther@60150
|
295 |
#### Syntax_Phases.check_props
|
walther@60150
|
296 |
### Syntax_Phases.check_terms
|
walther@60150
|
297 |
### Syntax_Phases.check_typs
|
walther@60150
|
298 |
### Syntax_Phases.check_typs
|
walther@60150
|
299 |
## calling Output.report
|
walther@60150
|
300 |
#### Syntax_Phases.check_props
|
walther@60150
|
301 |
### Syntax_Phases.check_terms
|
walther@60150
|
302 |
### Syntax_Phases.check_typs
|
walther@60150
|
303 |
### Syntax_Phases.check_typs
|
walther@60150
|
304 |
## calling Output.report
|
walther@60150
|
305 |
#### Syntax_Phases.check_props
|
walther@60150
|
306 |
### Syntax_Phases.check_terms
|
walther@60150
|
307 |
### Syntax_Phases.check_typs
|
walther@60150
|
308 |
### Syntax_Phases.check_typs
|
walther@60150
|
309 |
### Syntax_Phases.check_typs
|
walther@60150
|
310 |
## calling Output.report
|
walther@60150
|
311 |
#### Syntax_Phases.check_props
|
walther@60150
|
312 |
### Syntax_Phases.check_terms
|
walther@60150
|
313 |
### Syntax_Phases.check_typs
|
walther@60150
|
314 |
### Syntax_Phases.check_typs
|
walther@60150
|
315 |
### Syntax_Phases.check_typs
|
walther@60150
|
316 |
## calling Output.report
|
walther@60150
|
317 |
### Syntax_Phases.check_terms
|
walther@60150
|
318 |
### Syntax_Phases.check_typs
|
walther@60150
|
319 |
### Syntax_Phases.check_typs
|
walther@60150
|
320 |
### Syntax_Phases.check_typs
|
walther@60150
|
321 |
## calling Output.report
|
walther@60150
|
322 |
### Syntax_Phases.check_terms
|
walther@60150
|
323 |
### Syntax_Phases.check_typs
|
walther@60150
|
324 |
### Syntax_Phases.check_typs
|
walther@60150
|
325 |
### Syntax_Phases.check_typs
|
walther@60150
|
326 |
## calling Output.report
|
walther@60150
|
327 |
### Syntax_Phases.check_terms
|
walther@60150
|
328 |
### Syntax_Phases.check_typs
|
walther@60150
|
329 |
### Syntax_Phases.check_typs
|
walther@60150
|
330 |
### Syntax_Phases.check_typs
|
walther@60150
|
331 |
## calling Output.report
|
walther@60150
|
332 |
### Syntax_Phases.check_terms
|
walther@60150
|
333 |
### Syntax_Phases.check_typs
|
walther@60150
|
334 |
### Syntax_Phases.check_typs
|
walther@60150
|
335 |
### Syntax_Phases.check_typs
|
walther@60150
|
336 |
## calling Output.report
|
walther@60150
|
337 |
### Syntax_Phases.check_terms
|
walther@60150
|
338 |
### Syntax_Phases.check_typs
|
walther@60150
|
339 |
### Syntax_Phases.check_typs
|
walther@60150
|
340 |
### Syntax_Phases.check_typs
|
walther@60150
|
341 |
## calling Output.report
|
walther@60150
|
342 |
### Proof_Context.gen_fixes
|
walther@60150
|
343 |
### Proof_Context.gen_fixes
|
walther@60150
|
344 |
\<close>
|
walther@60129
|
345 |
|
walther@60150
|
346 |
subsubsection \<open>(2) WITHOUT session Isac (AFTER ./ztest-to-coding.sh)\<close>
|
walther@60150
|
347 |
text \<open>
|
walther@60150
|
348 |
{a = "//--- Spark_Commands.prove_vc", headline =
|
walther@60150
|
349 |
(((((("(", "Biegelinie"), ","), ["Biegelinien"]), ")"),
|
walther@60150
|
350 |
((((("Specification", ":"),
|
walther@60150
|
351 |
((((((((((((((("Model", (("", ""), "")), ":"), "Given"), ":"), ["<markup>", "<markup>"]),
|
walther@60150
|
352 |
"Where"),
|
walther@60150
|
353 |
":"),
|
walther@60150
|
354 |
["<markup>", "<markup>"]),
|
walther@60150
|
355 |
"Find"),
|
walther@60150
|
356 |
":"),
|
walther@60150
|
357 |
"<markup>"),
|
walther@60150
|
358 |
"Relate"),
|
walther@60150
|
359 |
":"),
|
walther@60150
|
360 |
["<markup>"]),
|
walther@60150
|
361 |
(("References", ":"),
|
walther@60150
|
362 |
(((((((("RTheory", ":"), ""), "RProblem"), ":"), ["", ""]), "RMethod"), ":"), ["", ""])))),
|
walther@60150
|
363 |
"Solution"),
|
walther@60150
|
364 |
":"),
|
walther@60150
|
365 |
[])),
|
walther@60150
|
366 |
"")}
|
walther@60150
|
367 |
{a = "prove_vc", i_model =
|
walther@60150
|
368 |
[(0, [], false, "#Given",
|
walther@60150
|
369 |
Inc ((Const ("Biegelinie.Traegerlaenge", "real \<Rightarrow> una"), []), (Const ("empty", "??.'a"), []))),
|
walther@60150
|
370 |
(0, [], false, "#Given",
|
walther@60150
|
371 |
Inc ((Const ("Biegelinie.Streckenlast", "real \<Rightarrow> una"), []), (Const ("empty", "??.'a"), []))),
|
walther@60150
|
372 |
(0, [], false, "#Find",
|
walther@60150
|
373 |
Inc ((Const ("Biegelinie.Biegelinie", "(real \<Rightarrow> real) \<Rightarrow> una"), []),
|
walther@60150
|
374 |
(Const ("empty", "??.'a"), []))),
|
walther@60150
|
375 |
(0, [], false, "#Relate",
|
walther@60150
|
376 |
Inc ((Const ("Biegelinie.Randbedingungen", "bool list \<Rightarrow> una"), []),
|
walther@60150
|
377 |
(Const ("empty", "??.'a"), [])))],
|
walther@60150
|
378 |
o_model = [], refs = ("Biegelinie", ["Biegelinien"], ["empty_meth_id"])}
|
walther@60150
|
379 |
### Proof_Context.gen_fixes
|
walther@60150
|
380 |
### Proof_Context.gen_fixes
|
walther@60150
|
381 |
### Proof_Context.gen_fixes
|
walther@60150
|
382 |
### Syntax_Phases.check_terms
|
walther@60150
|
383 |
### Syntax_Phases.check_typs
|
walther@60150
|
384 |
### Syntax_Phases.check_typs
|
walther@60150
|
385 |
### Syntax_Phases.check_typs
|
walther@60150
|
386 |
## calling Output.report
|
walther@60150
|
387 |
#### Syntax_Phases.check_props
|
walther@60150
|
388 |
### Syntax_Phases.check_terms
|
walther@60150
|
389 |
### Syntax_Phases.check_typs
|
walther@60150
|
390 |
### Syntax_Phases.check_typs
|
walther@60150
|
391 |
## calling Output.report
|
walther@60150
|
392 |
#### Syntax_Phases.check_props
|
walther@60150
|
393 |
### Syntax_Phases.check_terms
|
walther@60150
|
394 |
### Syntax_Phases.check_typs
|
walther@60150
|
395 |
### Syntax_Phases.check_typs
|
walther@60150
|
396 |
## calling Output.report
|
walther@60150
|
397 |
#### Syntax_Phases.check_props
|
walther@60150
|
398 |
### Syntax_Phases.check_terms
|
walther@60150
|
399 |
### Syntax_Phases.check_typs
|
walther@60150
|
400 |
### Syntax_Phases.check_typs
|
walther@60150
|
401 |
## calling Output.report
|
walther@60150
|
402 |
#### Syntax_Phases.check_props
|
walther@60150
|
403 |
### Syntax_Phases.check_terms
|
walther@60150
|
404 |
### Syntax_Phases.check_typs
|
walther@60150
|
405 |
### Syntax_Phases.check_typs
|
walther@60150
|
406 |
## calling Output.report
|
walther@60150
|
407 |
#### Syntax_Phases.check_props
|
walther@60150
|
408 |
### Syntax_Phases.check_terms
|
walther@60150
|
409 |
### Syntax_Phases.check_typs
|
walther@60150
|
410 |
### Syntax_Phases.check_typs
|
walther@60150
|
411 |
## calling Output.report
|
walther@60150
|
412 |
#### Syntax_Phases.check_props
|
walther@60150
|
413 |
### Syntax_Phases.check_terms
|
walther@60150
|
414 |
### Syntax_Phases.check_typs
|
walther@60150
|
415 |
### Syntax_Phases.check_typs
|
walther@60150
|
416 |
## calling Output.report
|
walther@60150
|
417 |
#### Syntax_Phases.check_props
|
walther@60150
|
418 |
### Syntax_Phases.check_terms
|
walther@60150
|
419 |
### Syntax_Phases.check_typs
|
walther@60150
|
420 |
### Syntax_Phases.check_typs
|
walther@60150
|
421 |
## calling Output.report
|
walther@60150
|
422 |
#### Syntax_Phases.check_props
|
walther@60150
|
423 |
### Syntax_Phases.check_terms
|
walther@60150
|
424 |
### Syntax_Phases.check_typs
|
walther@60150
|
425 |
### Syntax_Phases.check_typs
|
walther@60150
|
426 |
## calling Output.report
|
walther@60150
|
427 |
#### Syntax_Phases.check_props
|
walther@60150
|
428 |
### Syntax_Phases.check_terms
|
walther@60150
|
429 |
### Syntax_Phases.check_typs
|
walther@60150
|
430 |
### Syntax_Phases.check_typs
|
walther@60150
|
431 |
## calling Output.report
|
walther@60150
|
432 |
#### Syntax_Phases.check_props
|
walther@60150
|
433 |
### Syntax_Phases.check_terms
|
walther@60150
|
434 |
### Syntax_Phases.check_typs
|
walther@60150
|
435 |
### Syntax_Phases.check_typs
|
walther@60150
|
436 |
## calling Output.report
|
walther@60150
|
437 |
#### Syntax_Phases.check_props
|
walther@60150
|
438 |
### Syntax_Phases.check_terms
|
walther@60150
|
439 |
### Syntax_Phases.check_typs
|
walther@60150
|
440 |
### Syntax_Phases.check_typs
|
walther@60150
|
441 |
## calling Output.report
|
walther@60150
|
442 |
#### Syntax_Phases.check_props
|
walther@60150
|
443 |
### Syntax_Phases.check_terms
|
walther@60150
|
444 |
### Syntax_Phases.check_typs
|
walther@60150
|
445 |
### Syntax_Phases.check_typs
|
walther@60150
|
446 |
## calling Output.report
|
walther@60150
|
447 |
#### Syntax_Phases.check_props
|
walther@60150
|
448 |
### Syntax_Phases.check_terms
|
walther@60150
|
449 |
### Syntax_Phases.check_typs
|
walther@60150
|
450 |
### Syntax_Phases.check_typs
|
walther@60150
|
451 |
## calling Output.report
|
walther@60150
|
452 |
#### Syntax_Phases.check_props
|
walther@60150
|
453 |
### Syntax_Phases.check_terms
|
walther@60150
|
454 |
### Syntax_Phases.check_typs
|
walther@60150
|
455 |
### Syntax_Phases.check_typs
|
walther@60150
|
456 |
## calling Output.report
|
walther@60150
|
457 |
#### Syntax_Phases.check_props
|
walther@60150
|
458 |
### Syntax_Phases.check_terms
|
walther@60150
|
459 |
### Syntax_Phases.check_typs
|
walther@60150
|
460 |
### Syntax_Phases.check_typs
|
walther@60150
|
461 |
## calling Output.report
|
walther@60150
|
462 |
#### Syntax_Phases.check_props
|
walther@60150
|
463 |
### Syntax_Phases.check_terms
|
walther@60150
|
464 |
### Syntax_Phases.check_typs
|
walther@60150
|
465 |
### Syntax_Phases.check_typs
|
walther@60150
|
466 |
## calling Output.report
|
walther@60150
|
467 |
#### Syntax_Phases.check_props
|
walther@60150
|
468 |
### Syntax_Phases.check_terms
|
walther@60150
|
469 |
### Syntax_Phases.check_typs
|
walther@60150
|
470 |
### Syntax_Phases.check_typs
|
walther@60150
|
471 |
## calling Output.report
|
walther@60150
|
472 |
#### Syntax_Phases.check_props
|
walther@60150
|
473 |
### Syntax_Phases.check_terms
|
walther@60150
|
474 |
### Syntax_Phases.check_typs
|
walther@60150
|
475 |
### Syntax_Phases.check_typs
|
walther@60150
|
476 |
## calling Output.report
|
walther@60150
|
477 |
#### Syntax_Phases.check_props
|
walther@60150
|
478 |
### Syntax_Phases.check_terms
|
walther@60150
|
479 |
### Syntax_Phases.check_typs
|
walther@60150
|
480 |
### Syntax_Phases.check_typs
|
walther@60150
|
481 |
## calling Output.report
|
walther@60150
|
482 |
#### Syntax_Phases.check_props
|
walther@60150
|
483 |
### Syntax_Phases.check_terms
|
walther@60150
|
484 |
### Syntax_Phases.check_typs
|
walther@60150
|
485 |
### Syntax_Phases.check_typs
|
walther@60150
|
486 |
## calling Output.report
|
walther@60150
|
487 |
#### Syntax_Phases.check_props
|
walther@60150
|
488 |
### Syntax_Phases.check_terms
|
walther@60150
|
489 |
### Syntax_Phases.check_typs
|
walther@60150
|
490 |
### Syntax_Phases.check_typs
|
walther@60150
|
491 |
## calling Output.report
|
walther@60150
|
492 |
#### Syntax_Phases.check_props
|
walther@60150
|
493 |
### Syntax_Phases.check_terms
|
walther@60150
|
494 |
### Syntax_Phases.check_typs
|
walther@60150
|
495 |
### Syntax_Phases.check_typs
|
walther@60150
|
496 |
### Syntax_Phases.check_typs
|
walther@60150
|
497 |
## calling Output.report
|
walther@60150
|
498 |
#### Syntax_Phases.check_props
|
walther@60150
|
499 |
### Syntax_Phases.check_terms
|
walther@60150
|
500 |
### Syntax_Phases.check_typs
|
walther@60150
|
501 |
### Syntax_Phases.check_typs
|
walther@60150
|
502 |
### Syntax_Phases.check_typs
|
walther@60150
|
503 |
## calling Output.report
|
walther@60150
|
504 |
### Syntax_Phases.check_terms
|
walther@60150
|
505 |
### Syntax_Phases.check_typs
|
walther@60150
|
506 |
### Syntax_Phases.check_typs
|
walther@60150
|
507 |
### Syntax_Phases.check_typs
|
walther@60150
|
508 |
## calling Output.report
|
walther@60150
|
509 |
### Syntax_Phases.check_terms
|
walther@60150
|
510 |
### Syntax_Phases.check_typs
|
walther@60150
|
511 |
### Syntax_Phases.check_typs
|
walther@60150
|
512 |
### Syntax_Phases.check_typs
|
walther@60150
|
513 |
## calling Output.report
|
walther@60150
|
514 |
### Syntax_Phases.check_terms
|
walther@60150
|
515 |
### Syntax_Phases.check_typs
|
walther@60150
|
516 |
### Syntax_Phases.check_typs
|
walther@60150
|
517 |
### Syntax_Phases.check_typs
|
walther@60150
|
518 |
## calling Output.report
|
walther@60150
|
519 |
### Syntax_Phases.check_terms
|
walther@60150
|
520 |
### Syntax_Phases.check_typs
|
walther@60150
|
521 |
### Syntax_Phases.check_typs
|
walther@60150
|
522 |
### Syntax_Phases.check_typs
|
walther@60150
|
523 |
## calling Output.report
|
walther@60150
|
524 |
### Syntax_Phases.check_terms
|
walther@60150
|
525 |
### Syntax_Phases.check_typs
|
walther@60150
|
526 |
### Syntax_Phases.check_typs
|
walther@60150
|
527 |
### Syntax_Phases.check_typs
|
walther@60150
|
528 |
## calling Output.report
|
walther@60150
|
529 |
### Proof_Context.gen_fixes
|
walther@60150
|
530 |
### Proof_Context.gen_fixes
|
walther@60129
|
531 |
\<close>
|
walther@60104
|
532 |
|
walther@60148
|
533 |
section \<open>Notes: adapt spark_vc to Problem using Naproche as model\<close>
|
walther@60123
|
534 |
|
walther@60123
|
535 |
subsection \<open>survey on steps of investigation\<close>
|
walther@60119
|
536 |
text \<open>
|
walther@60132
|
537 |
We stopped step 3.4 going down from Outer_Syntax.local_theory_to_proof into proof.
|
walther@60132
|
538 |
Now we go the other way: Naproche checks the input via the Isabelle/server
|
walther@60132
|
539 |
and outputs highlighting, semantic annotations and errors via PIDE ---
|
walther@60132
|
540 |
and we investigate the output.
|
walther@60133
|
541 |
|
walther@60133
|
542 |
Investigation of Naproche showed, that annotations are ONLY sent bY
|
walther@60133
|
543 |
Output.report: string list -> unit, where string holds markup.
|
walther@60134
|
544 |
For Output.report @ {print} is NOT available, so we trace all respective CALLS.
|
walther@60134
|
545 |
However, NO @ {print} available in src/Pure is reached by "spark_vc procedure_g_c_d_4",
|
walther@60134
|
546 |
so tracing is done by writeln (which breaks build between Main and Complex_Main
|
walther@60134
|
547 |
by writing longer strings, see Pure/General/output.ML).
|
walther@60134
|
548 |
|
walther@60134
|
549 |
Tracing is implemented in (1) Isabelle_Naproche and in (2) isabisac in parallel;
|
walther@60134
|
550 |
(1) requires only Pure, thus is built quicker, but does NOT handle proofs within ML
|
walther@60134
|
551 |
(2) requires HOL.SPARK, there is full proof handling, but this is complex.
|
walther@60134
|
552 |
|
walther@60134
|
553 |
Tracing the calls of Output.report shows some properties of handling proofs,
|
walther@60134
|
554 |
see text in SPARK/Examples/Gcd/Greatest_Common_Divisor.thy.
|
walther@60119
|
555 |
\<close>
|
walther@60119
|
556 |
|
walther@60129
|
557 |
end(* SEE "outcomment before creating session Isac" ABOVE !!! OTHERWISE YOU HAVE..
|
walther@60127
|
558 |
ERROR: Found the end of the theory, but the last SPARK environment is still open.
|
walther@60129
|
559 |
..is acceptable for testing spark_vc .. proof - ...
|
walther@60127
|
560 |
*)
|