237 frs [simp]: "frs = (stk,loc,C,sig,pc)#frs'" |
237 frs [simp]: "frs = (stk,loc,C,sig,pc)#frs'" |
238 by (clarsimp simp add: neq_Nil_conv) fast |
238 by (clarsimp simp add: neq_Nil_conv) fast |
239 |
239 |
240 from conforms obtain ST LT rT maxs maxl ins et where |
240 from conforms obtain ST LT rT maxs maxl ins et where |
241 hconf: "G \<turnstile>h hp \<surd>" and |
241 hconf: "G \<turnstile>h hp \<surd>" and |
242 class: "is_class G C" and |
242 "class": "is_class G C" and |
243 meth: "method (G, C) sig = Some (C, rT, maxs, maxl, ins, et)" and |
243 meth: "method (G, C) sig = Some (C, rT, maxs, maxl, ins, et)" and |
244 phi: "Phi C sig ! pc = Some (ST,LT)" and |
244 phi: "Phi C sig ! pc = Some (ST,LT)" and |
245 frame: "correct_frame G hp (ST,LT) maxl ins (stk,loc,C,sig,pc)" and |
245 frame: "correct_frame G hp (ST,LT) maxl ins (stk,loc,C,sig,pc)" and |
246 frames: "correct_frames G hp Phi rT sig frs'" |
246 frames: "correct_frames G hp Phi rT sig frs'" |
247 by (auto simp add: correct_state_def) |
247 by (auto simp add: correct_state_def) |
275 with eff stk loc pc' |
275 with eff stk loc pc' |
276 have "check_instr (ins!pc) G hp stk loc C sig pc maxs frs'" |
276 have "check_instr (ins!pc) G hp stk loc C sig pc maxs frs'" |
277 proof (cases "ins!pc") |
277 proof (cases "ins!pc") |
278 case (Getfield F C) |
278 case (Getfield F C) |
279 with app stk loc phi obtain v vT stk' where |
279 with app stk loc phi obtain v vT stk' where |
280 class: "is_class G C" and |
280 "class": "is_class G C" and |
281 field: "field (G, C) F = Some (C, vT)" and |
281 field: "field (G, C) F = Some (C, vT)" and |
282 stk: "stk = v # stk'" and |
282 stk: "stk = v # stk'" and |
283 conf: "G,hp \<turnstile> v ::\<preceq> Class C" |
283 conf: "G,hp \<turnstile> v ::\<preceq> Class C" |
284 apply clarsimp |
284 apply clarsimp |
285 apply (blast dest: conf_widen [OF wf]) |
285 apply (blast dest: conf_widen [OF wf]) |
289 assume "v \<noteq> Null" |
289 assume "v \<noteq> Null" |
290 with conf field isRef wf |
290 with conf field isRef wf |
291 have "\<exists>D vs. hp (the_Addr v) = Some (D,vs) \<and> G \<turnstile> D \<preceq>C C" |
291 have "\<exists>D vs. hp (the_Addr v) = Some (D,vs) \<and> G \<turnstile> D \<preceq>C C" |
292 by (auto dest!: non_np_objD) |
292 by (auto dest!: non_np_objD) |
293 } |
293 } |
294 ultimately show ?thesis using Getfield field class stk hconf wf |
294 ultimately show ?thesis using Getfield field "class" stk hconf wf |
295 apply clarsimp |
295 apply clarsimp |
296 apply (fastsimp intro: wf_prog_ws_prog |
296 apply (fastsimp intro: wf_prog_ws_prog |
297 dest!: hconfD widen_cfs_fields oconf_objD) |
297 dest!: hconfD widen_cfs_fields oconf_objD) |
298 done |
298 done |
299 next |
299 next |
300 case (Putfield F C) |
300 case (Putfield F C) |
301 with app stk loc phi obtain v ref vT stk' where |
301 with app stk loc phi obtain v ref vT stk' where |
302 class: "is_class G C" and |
302 "class": "is_class G C" and |
303 field: "field (G, C) F = Some (C, vT)" and |
303 field: "field (G, C) F = Some (C, vT)" and |
304 stk: "stk = v # ref # stk'" and |
304 stk: "stk = v # ref # stk'" and |
305 confv: "G,hp \<turnstile> v ::\<preceq> vT" and |
305 confv: "G,hp \<turnstile> v ::\<preceq> vT" and |
306 confr: "G,hp \<turnstile> ref ::\<preceq> Class C" |
306 confr: "G,hp \<turnstile> ref ::\<preceq> Class C" |
307 apply clarsimp |
307 apply clarsimp |
312 assume "ref \<noteq> Null" |
312 assume "ref \<noteq> Null" |
313 with confr field isRef wf |
313 with confr field isRef wf |
314 have "\<exists>D vs. hp (the_Addr ref) = Some (D,vs) \<and> G \<turnstile> D \<preceq>C C" |
314 have "\<exists>D vs. hp (the_Addr ref) = Some (D,vs) \<and> G \<turnstile> D \<preceq>C C" |
315 by (auto dest: non_np_objD) |
315 by (auto dest: non_np_objD) |
316 } |
316 } |
317 ultimately show ?thesis using Putfield field class stk confv |
317 ultimately show ?thesis using Putfield field "class" stk confv |
318 by clarsimp |
318 by clarsimp |
319 next |
319 next |
320 case (Invoke C mn ps) |
320 case (Invoke C mn ps) |
321 with app |
321 with app |
322 obtain apTs X ST' where |
322 obtain apTs X ST' where |