10592
|
1 |
(* Title: HOL/BCV/JVM.thy
|
|
2 |
ID: $Id$
|
|
3 |
Author: Tobias Nipkow
|
|
4 |
Copyright 2000 TUM
|
|
5 |
|
|
6 |
*)
|
|
7 |
|
10637
|
8 |
header "Kildall for the JVM"
|
10592
|
9 |
|
|
10 |
theory JVM = Kildall + JType + Opt + Product + DFA_err + StepMono + BVSpec:
|
|
11 |
|
|
12 |
types state = "state_type option err"
|
|
13 |
|
|
14 |
constdefs
|
|
15 |
stk_esl :: "'c prog => nat => ty list esl"
|
|
16 |
"stk_esl S maxs == upto_esl maxs (JType.esl S)"
|
|
17 |
|
|
18 |
reg_sl :: "'c prog => nat => ty err list sl"
|
|
19 |
"reg_sl S maxr == Listn.sl maxr (Err.sl (JType.esl S))"
|
|
20 |
|
|
21 |
sl :: "'c prog => nat => nat => state sl"
|
|
22 |
"sl S maxs maxr ==
|
|
23 |
Err.sl(Opt.esl(Product.esl (stk_esl S maxs) (Err.esl(reg_sl S maxr))))"
|
|
24 |
|
|
25 |
states :: "'c prog => nat => nat => state set"
|
|
26 |
"states S maxs maxr == fst(sl S maxs maxr)"
|
|
27 |
|
|
28 |
le :: "'c prog => nat => nat => state ord"
|
|
29 |
"le S maxs maxr == fst(snd(sl S maxs maxr))"
|
|
30 |
|
|
31 |
sup :: "'c prog => nat => nat => state binop"
|
|
32 |
"sup S maxs maxr == snd(snd(sl S maxs maxr))"
|
|
33 |
|
|
34 |
|
|
35 |
constdefs
|
|
36 |
exec :: "jvm_prog \<Rightarrow> nat \<Rightarrow> ty \<Rightarrow> instr list \<Rightarrow> nat \<Rightarrow> state \<Rightarrow> state"
|
|
37 |
"exec G maxs rT bs == err_step (\<lambda>pc. app (bs!pc) G maxs rT) (\<lambda>pc. step (bs!pc) G)"
|
|
38 |
|
|
39 |
kiljvm :: "jvm_prog => nat => nat => ty => instr list => state list => state list"
|
|
40 |
"kiljvm G maxs maxr rT bs ==
|
|
41 |
kildall (sl G maxs maxr) (exec G maxs rT bs) (\<lambda>pc. succs (bs!pc) pc)"
|
|
42 |
|
10637
|
43 |
wt_kil :: "jvm_prog \<Rightarrow> cname \<Rightarrow> ty list \<Rightarrow> ty \<Rightarrow> nat \<Rightarrow> nat \<Rightarrow> instr list \<Rightarrow> bool"
|
|
44 |
"wt_kil G C pTs rT mxs mxl ins ==
|
|
45 |
bounded (\<lambda>n. succs (ins!n) n) (size ins) \<and> 0 < size ins \<and>
|
|
46 |
(let first = Some ([],(OK (Class C))#((map OK pTs))@(replicate mxl Err));
|
|
47 |
start = OK first#(replicate (size ins-1) (OK None));
|
|
48 |
result = kiljvm G mxs (1+size pTs+mxl) rT ins start
|
|
49 |
in \<forall>n < size ins. result!n \<noteq> Err)"
|
|
50 |
|
|
51 |
wt_jvm_prog_kildall :: "jvm_prog => bool"
|
|
52 |
"wt_jvm_prog_kildall G ==
|
|
53 |
wf_prog (\<lambda>G C (sig,rT,(maxs,maxl,b)). wt_kil G C (snd sig) rT maxs maxl b) G"
|
10592
|
54 |
|
|
55 |
lemma JVM_states_unfold:
|
|
56 |
"states S maxs maxr == err(opt((Union {list n (types S) |n. n <= maxs}) <*>
|
|
57 |
list maxr (err(types S))))"
|
|
58 |
apply (unfold states_def JVM.sl_def Opt.esl_def Err.sl_def
|
|
59 |
stk_esl_def reg_sl_def Product.esl_def
|
|
60 |
Listn.sl_def upto_esl_def JType.esl_def Err.esl_def)
|
|
61 |
by simp
|
|
62 |
|
|
63 |
|
|
64 |
lemma JVM_le_unfold:
|
|
65 |
"le S m n ==
|
|
66 |
Err.le(Opt.le(Product.le(Listn.le(subtype S))(Listn.le(Err.le(subtype S)))))"
|
|
67 |
apply (unfold JVM.le_def JVM.sl_def Opt.esl_def Err.sl_def
|
|
68 |
stk_esl_def reg_sl_def Product.esl_def
|
|
69 |
Listn.sl_def upto_esl_def JType.esl_def Err.esl_def)
|
|
70 |
by simp
|
|
71 |
|
|
72 |
|
|
73 |
lemma Err_convert:
|
|
74 |
"Err.le (subtype G) a b = G \<turnstile> a <=o b"
|
|
75 |
by (auto simp add: Err.le_def sup_ty_opt_def lift_top_def lesub_def subtype_def
|
|
76 |
split: err.split)
|
|
77 |
|
|
78 |
lemma loc_convert:
|
|
79 |
"Listn.le (Err.le (subtype G)) a b = G \<turnstile> a <=l b"
|
|
80 |
by (unfold Listn.le_def lesub_def sup_loc_def list_all2_def)
|
|
81 |
(simp add: Err_convert)
|
|
82 |
|
|
83 |
lemma zip_map [rule_format]:
|
|
84 |
"\<forall>a. length a = length b --> zip (map f a) (map g b) = map (\<lambda>(x,y). (f x, g y)) (zip a b)"
|
|
85 |
apply (induct b)
|
|
86 |
apply simp
|
|
87 |
apply clarsimp
|
|
88 |
apply (case_tac aa)
|
|
89 |
apply simp+
|
|
90 |
done
|
|
91 |
|
|
92 |
lemma stk_convert:
|
|
93 |
"Listn.le (subtype G) a b = G \<turnstile> map OK a <=l map OK b"
|
|
94 |
proof
|
|
95 |
assume "Listn.le (subtype G) a b"
|
|
96 |
|
|
97 |
hence le: "list_all2 (subtype G) a b"
|
|
98 |
by (unfold Listn.le_def lesub_def)
|
|
99 |
|
|
100 |
{ fix x' y'
|
|
101 |
assume "length a = length b"
|
|
102 |
"(x',y') \<in> set (zip (map OK a) (map OK b))"
|
|
103 |
then
|
|
104 |
obtain x y where OK:
|
|
105 |
"x' = OK x" "y' = OK y" "(x,y) \<in> set (zip a b)"
|
|
106 |
by (auto simp add: zip_map)
|
|
107 |
with le
|
|
108 |
have "subtype G x y"
|
|
109 |
by (simp add: list_all2_def Ball_def)
|
|
110 |
with OK
|
|
111 |
have "G \<turnstile> x' <=o y'"
|
|
112 |
by (simp add: subtype_def)
|
|
113 |
}
|
|
114 |
|
|
115 |
with le
|
|
116 |
show "G \<turnstile> map OK a <=l map OK b"
|
|
117 |
by (auto simp add: sup_loc_def list_all2_def)
|
|
118 |
next
|
|
119 |
assume "G \<turnstile> map OK a <=l map OK b"
|
|
120 |
|
|
121 |
thus "Listn.le (subtype G) a b"
|
|
122 |
apply (unfold sup_loc_def list_all2_def Listn.le_def lesub_def)
|
|
123 |
apply (clarsimp simp add: zip_map subtype_def)
|
|
124 |
apply (drule bspec, assumption)
|
|
125 |
apply auto
|
|
126 |
done
|
|
127 |
qed
|
|
128 |
|
|
129 |
|
|
130 |
lemma state_conv:
|
|
131 |
"Product.le (Listn.le (subtype G)) (Listn.le (Err.le (subtype G))) a b = G \<turnstile> a <=s b"
|
|
132 |
by (unfold Product.le_def lesub_def sup_state_def)
|
|
133 |
(simp add: split_beta stk_convert loc_convert)
|
|
134 |
|
|
135 |
lemma state_opt_conv:
|
|
136 |
"Opt.le (Product.le (Listn.le (subtype G)) (Listn.le (Err.le (subtype G)))) a b = G \<turnstile> a <=' b"
|
|
137 |
by (unfold Opt.le_def lesub_def sup_state_opt_def lift_bottom_def)
|
|
138 |
(auto simp add: state_conv split: option.split)
|
|
139 |
|
|
140 |
lemma JVM_le_convert:
|
|
141 |
"le G m n (OK t1) (OK t2) = G \<turnstile> t1 <=' t2"
|
|
142 |
by (simp add: JVM_le_unfold Err.le_def lesub_def state_opt_conv)
|
|
143 |
|
|
144 |
lemma JVM_le_Err_conv:
|
|
145 |
"le G m n = Err.le (sup_state_opt G)"
|
|
146 |
apply (simp add: expand_fun_eq)
|
|
147 |
apply (unfold Err.le_def JVM_le_unfold lesub_def)
|
|
148 |
apply (clarsimp split: err.splits)
|
|
149 |
apply (simp add: state_opt_conv)
|
|
150 |
done
|
|
151 |
|
|
152 |
lemma special_ex_swap_lemma [iff]:
|
|
153 |
"(? X. (? n. X = A n & P n) & Q X) = (? n. Q(A n) & P n)"
|
|
154 |
by blast
|
|
155 |
|
10630
|
156 |
lemmas [iff del] = not_None_eq
|
|
157 |
|
10592
|
158 |
theorem exec_pres_type:
|
|
159 |
"[| wf_prog wf_mb S |] ==>
|
|
160 |
pres_type (exec S maxs rT bs) (size bs) (states S maxs maxr)"
|
|
161 |
apply (unfold pres_type_def list_def step_def JVM_states_unfold)
|
|
162 |
apply (clarify elim!: option_map_in_optionI lift_in_errI)
|
|
163 |
apply (simp add: exec_def err_step_def lift_def split: err.split)
|
|
164 |
apply (simp add: step_def option_map_def split: option.splits)
|
|
165 |
apply clarify
|
|
166 |
apply (case_tac "bs!p")
|
|
167 |
|
10637
|
168 |
apply fastsimp
|
|
169 |
apply fastsimp
|
|
170 |
apply fastsimp
|
|
171 |
apply fastsimp
|
|
172 |
apply fastsimp
|
10592
|
173 |
apply clarsimp
|
|
174 |
defer
|
10637
|
175 |
apply fastsimp
|
|
176 |
apply fastsimp
|
10592
|
177 |
apply clarsimp
|
|
178 |
defer
|
10637
|
179 |
apply fastsimp
|
|
180 |
apply fastsimp
|
|
181 |
apply fastsimp
|
|
182 |
apply fastsimp
|
|
183 |
apply fastsimp
|
|
184 |
apply fastsimp
|
|
185 |
apply fastsimp
|
|
186 |
apply fastsimp
|
|
187 |
apply fastsimp
|
10592
|
188 |
defer
|
|
189 |
|
10637
|
190 |
(* Invoke *)
|
10592
|
191 |
apply (simp add: Un_subset_iff)
|
10630
|
192 |
apply (drule method_wf_mdecl, assumption+)
|
10592
|
193 |
apply (simp add: wf_mdecl_def wf_mhead_def)
|
|
194 |
|
10637
|
195 |
(* Getfield *)
|
10630
|
196 |
apply (rule_tac fn = "(vname,cname)" in fields_is_type)
|
|
197 |
defer
|
|
198 |
apply assumption+
|
|
199 |
apply (simp add: field_def)
|
|
200 |
apply (drule map_of_SomeD)
|
|
201 |
apply (rule map_of_SomeI)
|
|
202 |
apply (auto simp add: unique_fields)
|
10592
|
203 |
done
|
|
204 |
|
10630
|
205 |
|
|
206 |
lemmas [iff] = not_None_eq
|
|
207 |
|
|
208 |
|
10592
|
209 |
theorem exec_mono:
|
|
210 |
"wf_prog wf_mb G ==>
|
|
211 |
mono (JVM.le G maxs maxr) (exec G maxs rT bs) (size bs) (states G maxs maxr)"
|
|
212 |
apply (unfold mono_def)
|
|
213 |
apply clarify
|
|
214 |
apply (unfold lesub_def)
|
|
215 |
apply (case_tac t)
|
|
216 |
apply (simp add: JVM_le_unfold Err.le_def exec_def err_step_def lift_def)
|
|
217 |
apply (case_tac s)
|
|
218 |
apply (simp add: JVM_le_unfold Err.le_def exec_def err_step_def lift_def)
|
|
219 |
apply (simp add: JVM_le_convert exec_def err_step_def lift_def)
|
|
220 |
apply (simp add: JVM_le_unfold Err.le_def exec_def err_step_def lift_def)
|
|
221 |
apply (rule conjI)
|
|
222 |
apply clarify
|
|
223 |
apply (rule step_mono, assumption+)
|
|
224 |
apply (rule impI)
|
|
225 |
apply (erule contrapos_nn)
|
|
226 |
apply (rule app_mono, assumption+)
|
|
227 |
done
|
|
228 |
|
|
229 |
theorem semilat_JVM_slI:
|
|
230 |
"[| wf_prog wf_mb G |] ==> semilat(sl G maxs maxr)"
|
|
231 |
apply (unfold JVM.sl_def stk_esl_def reg_sl_def)
|
|
232 |
apply (rule semilat_opt)
|
|
233 |
apply (rule err_semilat_Product_esl)
|
|
234 |
apply (rule err_semilat_upto_esl)
|
|
235 |
apply (rule err_semilat_JType_esl, assumption+)
|
|
236 |
apply (rule err_semilat_eslI)
|
|
237 |
apply (rule semilat_Listn_sl)
|
|
238 |
apply (rule err_semilat_JType_esl, assumption+)
|
|
239 |
done
|
|
240 |
|
|
241 |
lemma sl_triple_conv:
|
|
242 |
"sl G maxs maxr ==
|
|
243 |
(states G maxs maxr, le G maxs maxr, sup G maxs maxr)"
|
|
244 |
by (simp (no_asm) add: states_def JVM.le_def JVM.sup_def)
|
|
245 |
|
|
246 |
|
|
247 |
ML_setup {* bind_thm ("wf_subcls1", wf_subcls1); *}
|
|
248 |
|
|
249 |
theorem is_bcv_kiljvm:
|
|
250 |
"[| wf_prog wf_mb G; bounded (\<lambda>pc. succs (bs!pc) pc) (size bs) |] ==>
|
|
251 |
is_bcv (JVM.le G maxs maxr) Err (exec G maxs rT bs) (\<lambda>pc. succs (bs!pc) pc)
|
|
252 |
(size bs) (states G maxs maxr) (kiljvm G maxs maxr rT bs)"
|
|
253 |
apply (unfold kiljvm_def sl_triple_conv)
|
|
254 |
apply (rule is_bcv_kildall)
|
|
255 |
apply (simp (no_asm) add: sl_triple_conv [symmetric])
|
|
256 |
apply (force intro!: semilat_JVM_slI dest: wf_acyclic simp add: symmetric sl_triple_conv)
|
|
257 |
apply (simp (no_asm) add: JVM_le_unfold)
|
|
258 |
apply (blast intro!: order_widen wf_converse_subcls1_impl_acc_subtype
|
|
259 |
dest: wf_subcls1 wf_acyclic)
|
|
260 |
apply (simp add: JVM_le_unfold)
|
|
261 |
apply (erule exec_pres_type)
|
|
262 |
apply assumption
|
|
263 |
apply (erule exec_mono)
|
|
264 |
done
|
|
265 |
|
10637
|
266 |
|
|
267 |
theorem wt_kil_correct:
|
|
268 |
"[| wt_kil G C pTs rT maxs mxl bs; wf_prog wf_mb G;
|
10592
|
269 |
is_class G C; \<forall>x \<in> set pTs. is_type G x |]
|
|
270 |
==> \<exists>phi. wt_method G C pTs rT maxs mxl bs phi"
|
|
271 |
proof -
|
|
272 |
let ?start = "OK (Some ([],(OK (Class C))#((map OK pTs))@(replicate mxl Err)))
|
|
273 |
#(replicate (size bs-1) (OK None))"
|
|
274 |
|
10637
|
275 |
assume wf: "wf_prog wf_mb G"
|
|
276 |
assume isclass: "is_class G C"
|
|
277 |
assume istype: "\<forall>x \<in> set pTs. is_type G x"
|
|
278 |
|
|
279 |
assume "wt_kil G C pTs rT maxs mxl bs"
|
|
280 |
then obtain maxr r where
|
|
281 |
bounded: "bounded (\<lambda>pc. succs (bs!pc) pc) (size bs)" and
|
|
282 |
result: "r = kiljvm G maxs maxr rT bs ?start" and
|
|
283 |
success: "\<forall>n < size bs. r!n \<noteq> Err" and
|
|
284 |
instrs: "0 < size bs" and
|
|
285 |
maxr: "maxr = Suc (length pTs + mxl)"
|
|
286 |
by (unfold wt_kil_def) simp
|
10592
|
287 |
|
|
288 |
{ fix pc
|
|
289 |
have "succs (bs!pc) pc \<noteq> []"
|
|
290 |
by (cases "bs!pc") auto
|
|
291 |
}
|
|
292 |
|
|
293 |
hence non_empty: "non_empty (\<lambda>pc. succs (bs!pc) pc)"
|
|
294 |
by (unfold non_empty_def) blast
|
|
295 |
|
|
296 |
from wf bounded
|
|
297 |
have bcv:
|
|
298 |
"is_bcv (le G maxs maxr) Err (exec G maxs rT bs) (\<lambda>pc. succs (bs!pc) pc)
|
|
299 |
(size bs) (states G maxs maxr) (kiljvm G maxs maxr rT bs)"
|
|
300 |
by (rule is_bcv_kiljvm)
|
|
301 |
|
|
302 |
{ fix l x
|
|
303 |
have "set (replicate l x) \<subseteq> {x}"
|
|
304 |
by (cases "0 < l") simp+
|
|
305 |
} note subset_replicate = this
|
|
306 |
|
|
307 |
from istype
|
|
308 |
have "set pTs \<subseteq> types G"
|
|
309 |
by auto
|
|
310 |
|
|
311 |
hence "OK `` set pTs \<subseteq> err (types G)"
|
|
312 |
by auto
|
|
313 |
|
|
314 |
with instrs maxr isclass
|
|
315 |
have "?start \<in> list (length bs) (states G maxs maxr)"
|
|
316 |
apply (unfold list_def JVM_states_unfold)
|
|
317 |
apply simp
|
|
318 |
apply (rule conjI)
|
|
319 |
apply (simp add: Un_subset_iff)
|
|
320 |
apply (rule_tac B = "{Err}" in subset_trans)
|
|
321 |
apply (simp add: subset_replicate)
|
|
322 |
apply simp
|
|
323 |
apply (rule_tac B = "{OK None}" in subset_trans)
|
|
324 |
apply (simp add: subset_replicate)
|
|
325 |
apply simp
|
|
326 |
done
|
|
327 |
|
|
328 |
with bcv success result
|
|
329 |
have
|
|
330 |
"\<exists>ts\<in>list (length bs) (states G maxs maxr).
|
|
331 |
?start <=[le G maxs maxr] ts \<and>
|
|
332 |
welltyping (JVM.le G maxs maxr) Err (JVM.exec G maxs rT bs) (\<lambda>pc. succs (bs ! pc) pc) ts"
|
|
333 |
by (unfold is_bcv_def) auto
|
|
334 |
|
|
335 |
then obtain phi' where
|
|
336 |
l: "phi' \<in> list (length bs) (states G maxs maxr)" and
|
|
337 |
s: "?start <=[le G maxs maxr] phi'" and
|
|
338 |
w: "welltyping (le G maxs maxr) Err (exec G maxs rT bs) (\<lambda>pc. succs (bs ! pc) pc) phi'"
|
|
339 |
by blast
|
|
340 |
|
|
341 |
hence dynamic:
|
|
342 |
"dynamic_wt (sup_state_opt G) (exec G maxs rT bs) (\<lambda>pc. succs (bs ! pc) pc) phi'"
|
|
343 |
by (simp add: dynamic_wt_def exec_def JVM_le_Err_conv)
|
|
344 |
|
|
345 |
from s
|
|
346 |
have le: "le G maxs maxr (?start ! 0) (phi'!0)"
|
|
347 |
by (drule_tac p=0 in le_listD) (simp add: lesub_def)+
|
|
348 |
|
|
349 |
from l
|
|
350 |
have l: "size phi' = size bs"
|
|
351 |
by simp
|
|
352 |
|
|
353 |
with instrs w
|
|
354 |
have "phi' ! 0 \<noteq> Err"
|
|
355 |
by (unfold welltyping_def) simp
|
|
356 |
|
|
357 |
with instrs l
|
|
358 |
have phi0: "OK (map ok_val phi' ! 0) = phi' ! 0"
|
|
359 |
by clarsimp
|
|
360 |
|
|
361 |
from l bounded
|
|
362 |
have "bounded (\<lambda>pc. succs (bs ! pc) pc) (length phi')"
|
|
363 |
by simp
|
|
364 |
|
|
365 |
with dynamic non_empty
|
|
366 |
have "static_wt (sup_state_opt G) (\<lambda>pc. app (bs!pc) G maxs rT) (\<lambda>pc. step (bs!pc) G)
|
|
367 |
(\<lambda>pc. succs (bs!pc) pc) (map ok_val phi')"
|
|
368 |
by (auto intro: dynamic_imp_static simp add: exec_def)
|
|
369 |
|
|
370 |
with instrs l le bounded
|
|
371 |
have "wt_method G C pTs rT maxs mxl bs (map ok_val phi')"
|
|
372 |
apply (unfold wt_method_def static_wt_def)
|
|
373 |
apply simp
|
|
374 |
apply (rule conjI)
|
|
375 |
apply (unfold wt_start_def)
|
|
376 |
apply (rule JVM_le_convert [THEN iffD1])
|
|
377 |
apply (simp (no_asm) add: phi0)
|
|
378 |
apply clarify
|
|
379 |
apply (erule allE, erule impE, assumption)
|
|
380 |
apply (elim conjE)
|
|
381 |
apply (clarsimp simp add: lesub_def wt_instr_def)
|
|
382 |
apply (unfold bounded_def)
|
|
383 |
apply blast
|
|
384 |
done
|
|
385 |
|
|
386 |
thus ?thesis by blast
|
|
387 |
qed
|
|
388 |
|
10637
|
389 |
lemma is_type_pTs:
|
|
390 |
"[| wf_prog wf_mb G; (C,S,fs,mdecls) \<in> set G; (sig,rT,code) \<in> set mdecls;
|
|
391 |
t \<in> set (snd sig) |]
|
|
392 |
==> is_type G t"
|
|
393 |
proof -
|
|
394 |
assume "wf_prog wf_mb G"
|
|
395 |
"(C,S,fs,mdecls) \<in> set G"
|
|
396 |
"(sig,rT,code) \<in> set mdecls"
|
|
397 |
hence "wf_mdecl wf_mb G C (sig,rT,code)"
|
|
398 |
by (unfold wf_prog_def wf_cdecl_def) auto
|
|
399 |
hence "\<forall>t \<in> set (snd sig). is_type G t"
|
|
400 |
by (unfold wf_mdecl_def wf_mhead_def) auto
|
|
401 |
moreover
|
|
402 |
assume "t \<in> set (snd sig)"
|
|
403 |
ultimately
|
|
404 |
show ?thesis by blast
|
|
405 |
qed
|
|
406 |
|
|
407 |
|
|
408 |
theorem jvm_kildall_correct:
|
|
409 |
"wt_jvm_prog_kildall G ==> \<exists>Phi. wt_jvm_prog G Phi"
|
|
410 |
proof -
|
|
411 |
assume wtk: "wt_jvm_prog_kildall G"
|
|
412 |
|
|
413 |
then obtain wf_mb where
|
|
414 |
wf: "wf_prog wf_mb G"
|
|
415 |
by (auto simp add: wt_jvm_prog_kildall_def)
|
|
416 |
|
|
417 |
let ?Phi = "\<lambda>C sig. let (C,rT,(maxs,maxl,ins)) = the (method (G,C) sig) in
|
|
418 |
SOME phi. wt_method G C (snd sig) rT maxs maxl ins phi"
|
|
419 |
|
|
420 |
{ fix C S fs mdecls sig rT code
|
|
421 |
assume "(C,S,fs,mdecls) \<in> set G" "(sig,rT,code) \<in> set mdecls"
|
|
422 |
with wf
|
|
423 |
have "method (G,C) sig = Some (C,rT,code) \<and> is_class G C \<and> (\<forall>t \<in> set (snd sig). is_type G t)"
|
|
424 |
by (simp add: methd is_type_pTs)
|
|
425 |
} note this [simp]
|
|
426 |
|
|
427 |
from wtk
|
|
428 |
have "wt_jvm_prog G ?Phi"
|
|
429 |
apply (unfold wt_jvm_prog_def wt_jvm_prog_kildall_def wf_prog_def wf_cdecl_def)
|
|
430 |
apply clarsimp
|
|
431 |
apply (drule bspec, assumption)
|
|
432 |
apply (unfold wf_mdecl_def)
|
|
433 |
apply clarsimp
|
|
434 |
apply (drule bspec, assumption)
|
|
435 |
apply clarsimp
|
|
436 |
apply (drule wt_kil_correct [OF _ wf])
|
|
437 |
apply (auto intro: someI)
|
|
438 |
done
|
|
439 |
|
|
440 |
thus ?thesis by blast
|
|
441 |
qed
|
|
442 |
|
10592
|
443 |
end
|