src/HOL/MicroJava/BV/BVNoTypeError.thy
changeset 56073 29e308b56d23
parent 55524 f41ef840f09d
child 58263 6c907aad90ba
equal deleted inserted replaced
56072:31e427387ab5 56073:29e308b56d23
   234   moreover {
   234   moreover {
   235     assume "\<not>(xcp \<noteq> None \<or> frs = [])"
   235     assume "\<not>(xcp \<noteq> None \<or> frs = [])"
   236     then obtain stk loc C sig pc frs' where
   236     then obtain stk loc C sig pc frs' where
   237       xcp [simp]: "xcp = None" and
   237       xcp [simp]: "xcp = None" and
   238       frs [simp]: "frs = (stk,loc,C,sig,pc)#frs'" 
   238       frs [simp]: "frs = (stk,loc,C,sig,pc)#frs'" 
   239       by (clarsimp simp add: neq_Nil_conv) fast
   239       by (clarsimp simp add: neq_Nil_conv)
   240 
   240 
   241     from conforms obtain  ST LT rT maxs maxl ins et where
   241     from conforms obtain  ST LT rT maxs maxl ins et where
   242       hconf:  "G \<turnstile>h hp \<surd>" and
   242       hconf:  "G \<turnstile>h hp \<surd>" and
   243       "class":  "is_class G C" and
   243       "class":  "is_class G C" and
   244       meth:   "method (G, C) sig = Some (C, rT, maxs, maxl, ins, et)" and
   244       meth:   "method (G, C) sig = Some (C, rT, maxs, maxl, ins, et)" and
   245       phi:    "Phi C sig ! pc = Some (ST,LT)" and
   245       phi:    "Phi C sig ! pc = Some (ST,LT)" and
   246       frame:  "correct_frame G hp (ST,LT) maxl ins (stk,loc,C,sig,pc)" and
   246       frame:  "correct_frame G hp (ST,LT) maxl ins (stk,loc,C,sig,pc)" and
   247       frames: "correct_frames G hp Phi rT sig frs'"
   247       frames: "correct_frames G hp Phi rT sig frs'"
   248       by (auto simp add: correct_state_def) (rule that)
   248       by (auto simp add: correct_state_def)
   249 
   249 
   250     from frame obtain
   250     from frame obtain
   251       stk: "approx_stk G hp stk ST" and
   251       stk: "approx_stk G hp stk ST" and
   252       loc: "approx_loc G hp loc LT" and
   252       loc: "approx_loc G hp loc LT" and
   253       pc:  "pc < length ins" and
   253       pc:  "pc < length ins" and
   352       { assume "x \<noteq> Null"
   352       { assume "x \<noteq> Null"
   353         with x
   353         with x
   354         obtain D fs where
   354         obtain D fs where
   355           hp: "hp (the_Addr x) = Some (D,fs)" and
   355           hp: "hp (the_Addr x) = Some (D,fs)" and
   356           D:  "G \<turnstile> D \<preceq>C C"
   356           D:  "G \<turnstile> D \<preceq>C C"
   357           by - (drule non_npD, assumption, clarsimp, blast)
   357           by - (drule non_npD, assumption, clarsimp)
   358         hence "hp (the_Addr x) \<noteq> None" (is ?P1) by simp
   358         hence "hp (the_Addr x) \<noteq> None" (is ?P1) by simp
   359         moreover
   359         moreover
   360         from wf mth hp D
   360         from wf mth hp D
   361         have "method (G, cname_of hp x) (mn, ps) \<noteq> None" (is ?P2)
   361         have "method (G, cname_of hp x) (mn, ps) \<noteq> None" (is ?P2)
   362           by (auto dest: subcls_widen_methd)
   362           by (auto dest: subcls_widen_methd)