[STATEMENT]
lemma "\<lbrakk> (P, C0, Main) \<turnstile> (C', M', pc', nt') -ek\<rightarrow> (C, M, pc, nt); C \<noteq> ClassMain P; C' \<noteq> ClassMain P \<rbrakk>
  \<Longrightarrow> (case pc of None \<Rightarrow> True |
    \<lfloor>pc''\<rfloor> \<Rightarrow> (TYPING P) C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and>
  (case pc' of None \<Rightarrow> True |
    \<lfloor>pc''\<rfloor> \<Rightarrow> (TYPING P) C' M' ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C' M'))"
  and instr_of_reachable_node_typable: "\<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, pc, nt); C \<noteq> ClassMain P \<rbrakk>
  \<Longrightarrow> case pc of None \<Rightarrow> True |
  \<lfloor>pc''\<rfloor> \<Rightarrow> (TYPING P) C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lbrakk> (P, C0, Main) \<turnstile> (C', M', pc', nt') -ek\<rightarrow> (C, M, pc, nt); C \<noteq> ClassMain P; C' \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case pc of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case pc' of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C' M' ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C' M'))) &&& (\<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, pc, nt); C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> case pc of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
[PROOF STEP]
proof (induct rule: JVMCFG_reachable_inducts)
[PROOF STATE]
proof (state)
goal (51 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc n ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = Load n; ek = \<Up>\<lambda>s. s(Stack (stkLength (P, C, M) pc) := s (Local n)); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>Suc pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc n ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = Store n; ek = \<Up>\<lambda>s. s(Local n := s (Stack (stkLength (P, C, M) pc - 1))); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>Suc pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 51 subgoals...
[PROOF STEP]
case (CFG_Load C P C0 Main M pc n ek)
[PROOF STATE]
proof (state)
this:
C \<noteq> ClassMain P
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter)
C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)
instrs_of (PROG P) C M ! pc = Load n
ek = \<Up>\<lambda>s. s(Stack (stkLength (P, C, M) pc) := s (Local n))
C \<noteq> ClassMain P
C \<noteq> ClassMain P

goal (51 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc n ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = Load n; ek = \<Up>\<lambda>s. s(Stack (stkLength (P, C, M) pc) := s (Local n)); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>Suc pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc n ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = Store n; ek = \<Up>\<lambda>s. s(Local n := s (Stack (stkLength (P, C, M) pc - 1))); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>Suc pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 51 subgoals...
[PROOF STEP]
from \<open>(P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter)\<close> \<open>C \<noteq> ClassMain P\<close>
[PROOF STATE]
proof (chain)
picking this:
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter)
C \<noteq> ClassMain P
[PROOF STEP]
obtain Ts T mxs mxl\<^sub>0 "is" xt where "PROG P \<turnstile> C sees M:Ts\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in C"
    and "instrs_of (PROG P) C M = is"
[PROOF STATE]
proof (prove)
using this:
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter)
C \<noteq> ClassMain P

goal (1 subgoal):
 1. (\<And>Ts T mxs mxl\<^sub>0 is xt. \<lbrakk>PROG P \<turnstile> C sees M: Ts\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in C; instrs_of (PROG P) C M = is\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by -(drule method_of_reachable_node_exists, auto)
[PROOF STATE]
proof (state)
this:
PROG P \<turnstile> C sees M: Ts\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in C
instrs_of (PROG P) C M = is

goal (51 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc n ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = Load n; ek = \<Up>\<lambda>s. s(Stack (stkLength (P, C, M) pc) := s (Local n)); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>Suc pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc n ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = Store n; ek = \<Up>\<lambda>s. s(Local n := s (Stack (stkLength (P, C, M) pc - 1))); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>Suc pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 51 subgoals...
[PROOF STEP]
with CFG_Load
[PROOF STATE]
proof (chain)
picking this:
C \<noteq> ClassMain P
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter)
C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)
instrs_of (PROG P) C M ! pc = Load n
ek = \<Up>\<lambda>s. s(Stack (stkLength (P, C, M) pc) := s (Local n))
C \<noteq> ClassMain P
C \<noteq> ClassMain P
PROG P \<turnstile> C sees M: Ts\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in C
instrs_of (PROG P) C M = is
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
C \<noteq> ClassMain P
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter)
C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)
instrs_of (PROG P) C M ! pc = Load n
ek = \<Up>\<lambda>s. s(Stack (stkLength (P, C, M) pc) := s (Local n))
C \<noteq> ClassMain P
C \<noteq> ClassMain P
PROG P \<turnstile> C sees M: Ts\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in C
instrs_of (PROG P) C M = is

goal (1 subgoal):
 1. (case \<lfloor>Suc pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
[PROOF STEP]
by (fastforce dest!: wt_jvm_prog_impl_wt_instr [OF wf_jvmprog_is_wf_typ])
[PROOF STATE]
proof (state)
this:
(case \<lfloor>Suc pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))

goal (50 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc n ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = Store n; ek = \<Up>\<lambda>s. s(Local n := s (Stack (stkLength (P, C, M) pc - 1))); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>Suc pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc v ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = Push v; ek = \<Up>\<lambda>s. s(Stack (stkLength (P, C, M) pc) \<mapsto> Value v); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>Suc pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 50 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (50 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc n ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = Store n; ek = \<Up>\<lambda>s. s(Local n := s (Stack (stkLength (P, C, M) pc - 1))); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>Suc pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc v ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = Push v; ek = \<Up>\<lambda>s. s(Stack (stkLength (P, C, M) pc) \<mapsto> Value v); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>Suc pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 50 subgoals...
[PROOF STEP]
case (CFG_Store C P C0 Main M pc n ek)
[PROOF STATE]
proof (state)
this:
C \<noteq> ClassMain P
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter)
C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)
instrs_of (PROG P) C M ! pc = Store n
ek = \<Up>\<lambda>s. s(Local n := s (Stack (stkLength (P, C, M) pc - 1)))
C \<noteq> ClassMain P
C \<noteq> ClassMain P

goal (50 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc n ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = Store n; ek = \<Up>\<lambda>s. s(Local n := s (Stack (stkLength (P, C, M) pc - 1))); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>Suc pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc v ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = Push v; ek = \<Up>\<lambda>s. s(Stack (stkLength (P, C, M) pc) \<mapsto> Value v); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>Suc pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 50 subgoals...
[PROOF STEP]
from \<open>(P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter)\<close> \<open>C \<noteq> ClassMain P\<close>
[PROOF STATE]
proof (chain)
picking this:
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter)
C \<noteq> ClassMain P
[PROOF STEP]
obtain Ts T mxs mxl\<^sub>0 "is" xt where "PROG P \<turnstile> C sees M:Ts\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in C"
    and "instrs_of (PROG P) C M = is"
[PROOF STATE]
proof (prove)
using this:
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter)
C \<noteq> ClassMain P

goal (1 subgoal):
 1. (\<And>Ts T mxs mxl\<^sub>0 is xt. \<lbrakk>PROG P \<turnstile> C sees M: Ts\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in C; instrs_of (PROG P) C M = is\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by -(drule method_of_reachable_node_exists, auto)
[PROOF STATE]
proof (state)
this:
PROG P \<turnstile> C sees M: Ts\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in C
instrs_of (PROG P) C M = is

goal (50 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc n ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = Store n; ek = \<Up>\<lambda>s. s(Local n := s (Stack (stkLength (P, C, M) pc - 1))); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>Suc pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc v ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = Push v; ek = \<Up>\<lambda>s. s(Stack (stkLength (P, C, M) pc) \<mapsto> Value v); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>Suc pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 50 subgoals...
[PROOF STEP]
with CFG_Store
[PROOF STATE]
proof (chain)
picking this:
C \<noteq> ClassMain P
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter)
C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)
instrs_of (PROG P) C M ! pc = Store n
ek = \<Up>\<lambda>s. s(Local n := s (Stack (stkLength (P, C, M) pc - 1)))
C \<noteq> ClassMain P
C \<noteq> ClassMain P
PROG P \<turnstile> C sees M: Ts\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in C
instrs_of (PROG P) C M = is
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
C \<noteq> ClassMain P
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter)
C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)
instrs_of (PROG P) C M ! pc = Store n
ek = \<Up>\<lambda>s. s(Local n := s (Stack (stkLength (P, C, M) pc - 1)))
C \<noteq> ClassMain P
C \<noteq> ClassMain P
PROG P \<turnstile> C sees M: Ts\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in C
instrs_of (PROG P) C M = is

goal (1 subgoal):
 1. (case \<lfloor>Suc pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
[PROOF STEP]
by (fastforce dest!: wt_jvm_prog_impl_wt_instr [OF wf_jvmprog_is_wf_typ])
[PROOF STATE]
proof (state)
this:
(case \<lfloor>Suc pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))

goal (49 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc v ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = Push v; ek = \<Up>\<lambda>s. s(Stack (stkLength (P, C, M) pc) \<mapsto> Value v); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>Suc pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = Pop; ek = \<Up>id; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>Suc pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 49 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (49 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc v ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = Push v; ek = \<Up>\<lambda>s. s(Stack (stkLength (P, C, M) pc) \<mapsto> Value v); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>Suc pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = Pop; ek = \<Up>id; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>Suc pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 49 subgoals...
[PROOF STEP]
case (CFG_Push C P C0 Main M pc v ek)
[PROOF STATE]
proof (state)
this:
C \<noteq> ClassMain P
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter)
C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)
instrs_of (PROG P) C M ! pc = Push v
ek = \<Up>\<lambda>s. s(Stack (stkLength (P, C, M) pc) \<mapsto> Value v)
C \<noteq> ClassMain P
C \<noteq> ClassMain P

goal (49 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc v ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = Push v; ek = \<Up>\<lambda>s. s(Stack (stkLength (P, C, M) pc) \<mapsto> Value v); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>Suc pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = Pop; ek = \<Up>id; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>Suc pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 49 subgoals...
[PROOF STEP]
from \<open>(P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter)\<close> \<open>C \<noteq> ClassMain P\<close>
[PROOF STATE]
proof (chain)
picking this:
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter)
C \<noteq> ClassMain P
[PROOF STEP]
obtain Ts T mxs mxl\<^sub>0 "is" xt where "PROG P \<turnstile> C sees M:Ts\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in C"
    and "instrs_of (PROG P) C M = is"
[PROOF STATE]
proof (prove)
using this:
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter)
C \<noteq> ClassMain P

goal (1 subgoal):
 1. (\<And>Ts T mxs mxl\<^sub>0 is xt. \<lbrakk>PROG P \<turnstile> C sees M: Ts\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in C; instrs_of (PROG P) C M = is\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by -(drule method_of_reachable_node_exists, auto)
[PROOF STATE]
proof (state)
this:
PROG P \<turnstile> C sees M: Ts\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in C
instrs_of (PROG P) C M = is

goal (49 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc v ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = Push v; ek = \<Up>\<lambda>s. s(Stack (stkLength (P, C, M) pc) \<mapsto> Value v); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>Suc pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = Pop; ek = \<Up>id; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>Suc pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 49 subgoals...
[PROOF STEP]
with CFG_Push
[PROOF STATE]
proof (chain)
picking this:
C \<noteq> ClassMain P
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter)
C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)
instrs_of (PROG P) C M ! pc = Push v
ek = \<Up>\<lambda>s. s(Stack (stkLength (P, C, M) pc) \<mapsto> Value v)
C \<noteq> ClassMain P
C \<noteq> ClassMain P
PROG P \<turnstile> C sees M: Ts\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in C
instrs_of (PROG P) C M = is
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
C \<noteq> ClassMain P
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter)
C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)
instrs_of (PROG P) C M ! pc = Push v
ek = \<Up>\<lambda>s. s(Stack (stkLength (P, C, M) pc) \<mapsto> Value v)
C \<noteq> ClassMain P
C \<noteq> ClassMain P
PROG P \<turnstile> C sees M: Ts\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in C
instrs_of (PROG P) C M = is

goal (1 subgoal):
 1. (case \<lfloor>Suc pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
[PROOF STEP]
by (fastforce dest!: wt_jvm_prog_impl_wt_instr [OF wf_jvmprog_is_wf_typ])
[PROOF STATE]
proof (state)
this:
(case \<lfloor>Suc pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))

goal (48 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = Pop; ek = \<Up>id; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>Suc pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = IAdd; ek = \<Up>\<lambda>s. let i1 = the_Intg (stkAt s (stkLength (P, C, M) pc - 1)); i2 = the_Intg (stkAt s (stkLength (P, C, M) pc - 2)) in s(Stack (stkLength (P, C, M) pc - 2) \<mapsto> Value (Intg (i1 + i2))); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>Suc pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 48 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (48 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = Pop; ek = \<Up>id; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>Suc pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = IAdd; ek = \<Up>\<lambda>s. let i1 = the_Intg (stkAt s (stkLength (P, C, M) pc - 1)); i2 = the_Intg (stkAt s (stkLength (P, C, M) pc - 2)) in s(Stack (stkLength (P, C, M) pc - 2) \<mapsto> Value (Intg (i1 + i2))); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>Suc pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 48 subgoals...
[PROOF STEP]
case (CFG_Pop C P C0 Main M pc ek)
[PROOF STATE]
proof (state)
this:
C \<noteq> ClassMain P
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter)
C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)
instrs_of (PROG P) C M ! pc = Pop
ek = \<Up>id
C \<noteq> ClassMain P
C \<noteq> ClassMain P

goal (48 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = Pop; ek = \<Up>id; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>Suc pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = IAdd; ek = \<Up>\<lambda>s. let i1 = the_Intg (stkAt s (stkLength (P, C, M) pc - 1)); i2 = the_Intg (stkAt s (stkLength (P, C, M) pc - 2)) in s(Stack (stkLength (P, C, M) pc - 2) \<mapsto> Value (Intg (i1 + i2))); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>Suc pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 48 subgoals...
[PROOF STEP]
from \<open>(P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter)\<close> \<open>C \<noteq> ClassMain P\<close>
[PROOF STATE]
proof (chain)
picking this:
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter)
C \<noteq> ClassMain P
[PROOF STEP]
obtain Ts T mxs mxl\<^sub>0 "is" xt where "PROG P \<turnstile> C sees M:Ts\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in C"
    and "instrs_of (PROG P) C M = is"
[PROOF STATE]
proof (prove)
using this:
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter)
C \<noteq> ClassMain P

goal (1 subgoal):
 1. (\<And>Ts T mxs mxl\<^sub>0 is xt. \<lbrakk>PROG P \<turnstile> C sees M: Ts\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in C; instrs_of (PROG P) C M = is\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by -(drule method_of_reachable_node_exists, auto)
[PROOF STATE]
proof (state)
this:
PROG P \<turnstile> C sees M: Ts\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in C
instrs_of (PROG P) C M = is

goal (48 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = Pop; ek = \<Up>id; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>Suc pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = IAdd; ek = \<Up>\<lambda>s. let i1 = the_Intg (stkAt s (stkLength (P, C, M) pc - 1)); i2 = the_Intg (stkAt s (stkLength (P, C, M) pc - 2)) in s(Stack (stkLength (P, C, M) pc - 2) \<mapsto> Value (Intg (i1 + i2))); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>Suc pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 48 subgoals...
[PROOF STEP]
with CFG_Pop
[PROOF STATE]
proof (chain)
picking this:
C \<noteq> ClassMain P
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter)
C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)
instrs_of (PROG P) C M ! pc = Pop
ek = \<Up>id
C \<noteq> ClassMain P
C \<noteq> ClassMain P
PROG P \<turnstile> C sees M: Ts\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in C
instrs_of (PROG P) C M = is
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
C \<noteq> ClassMain P
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter)
C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)
instrs_of (PROG P) C M ! pc = Pop
ek = \<Up>id
C \<noteq> ClassMain P
C \<noteq> ClassMain P
PROG P \<turnstile> C sees M: Ts\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in C
instrs_of (PROG P) C M = is

goal (1 subgoal):
 1. (case \<lfloor>Suc pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
[PROOF STEP]
by (fastforce dest!: wt_jvm_prog_impl_wt_instr [OF wf_jvmprog_is_wf_typ])
[PROOF STATE]
proof (state)
this:
(case \<lfloor>Suc pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))

goal (47 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = IAdd; ek = \<Up>\<lambda>s. let i1 = the_Intg (stkAt s (stkLength (P, C, M) pc - 1)); i2 = the_Intg (stkAt s (stkLength (P, C, M) pc - 2)) in s(Stack (stkLength (P, C, M) pc - 2) \<mapsto> Value (Intg (i1 + i2))); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>Suc pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc i. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = Goto i; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>nat (int pc + i)\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 47 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (47 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = IAdd; ek = \<Up>\<lambda>s. let i1 = the_Intg (stkAt s (stkLength (P, C, M) pc - 1)); i2 = the_Intg (stkAt s (stkLength (P, C, M) pc - 2)) in s(Stack (stkLength (P, C, M) pc - 2) \<mapsto> Value (Intg (i1 + i2))); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>Suc pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc i. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = Goto i; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>nat (int pc + i)\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 47 subgoals...
[PROOF STEP]
case (CFG_IAdd C P C0 Main M pc ek)
[PROOF STATE]
proof (state)
this:
C \<noteq> ClassMain P
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter)
C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)
instrs_of (PROG P) C M ! pc = IAdd
ek = \<Up>\<lambda>s. let i1 = the_Intg (stkAt s (stkLength (P, C, M) pc - 1)); i2 = the_Intg (stkAt s (stkLength (P, C, M) pc - 2)) in s(Stack (stkLength (P, C, M) pc - 2) \<mapsto> Value (Intg (i1 + i2)))
C \<noteq> ClassMain P
C \<noteq> ClassMain P

goal (47 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = IAdd; ek = \<Up>\<lambda>s. let i1 = the_Intg (stkAt s (stkLength (P, C, M) pc - 1)); i2 = the_Intg (stkAt s (stkLength (P, C, M) pc - 2)) in s(Stack (stkLength (P, C, M) pc - 2) \<mapsto> Value (Intg (i1 + i2))); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>Suc pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc i. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = Goto i; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>nat (int pc + i)\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 47 subgoals...
[PROOF STEP]
from \<open>(P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter)\<close> \<open>C \<noteq> ClassMain P\<close>
[PROOF STATE]
proof (chain)
picking this:
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter)
C \<noteq> ClassMain P
[PROOF STEP]
obtain Ts T mxs mxl\<^sub>0 "is" xt where "PROG P \<turnstile> C sees M:Ts\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in C"
    and "instrs_of (PROG P) C M = is"
[PROOF STATE]
proof (prove)
using this:
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter)
C \<noteq> ClassMain P

goal (1 subgoal):
 1. (\<And>Ts T mxs mxl\<^sub>0 is xt. \<lbrakk>PROG P \<turnstile> C sees M: Ts\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in C; instrs_of (PROG P) C M = is\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by -(drule method_of_reachable_node_exists, auto)
[PROOF STATE]
proof (state)
this:
PROG P \<turnstile> C sees M: Ts\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in C
instrs_of (PROG P) C M = is

goal (47 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = IAdd; ek = \<Up>\<lambda>s. let i1 = the_Intg (stkAt s (stkLength (P, C, M) pc - 1)); i2 = the_Intg (stkAt s (stkLength (P, C, M) pc - 2)) in s(Stack (stkLength (P, C, M) pc - 2) \<mapsto> Value (Intg (i1 + i2))); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>Suc pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc i. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = Goto i; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>nat (int pc + i)\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 47 subgoals...
[PROOF STEP]
with CFG_IAdd
[PROOF STATE]
proof (chain)
picking this:
C \<noteq> ClassMain P
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter)
C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)
instrs_of (PROG P) C M ! pc = IAdd
ek = \<Up>\<lambda>s. let i1 = the_Intg (stkAt s (stkLength (P, C, M) pc - 1)); i2 = the_Intg (stkAt s (stkLength (P, C, M) pc - 2)) in s(Stack (stkLength (P, C, M) pc - 2) \<mapsto> Value (Intg (i1 + i2)))
C \<noteq> ClassMain P
C \<noteq> ClassMain P
PROG P \<turnstile> C sees M: Ts\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in C
instrs_of (PROG P) C M = is
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
C \<noteq> ClassMain P
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter)
C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)
instrs_of (PROG P) C M ! pc = IAdd
ek = \<Up>\<lambda>s. let i1 = the_Intg (stkAt s (stkLength (P, C, M) pc - 1)); i2 = the_Intg (stkAt s (stkLength (P, C, M) pc - 2)) in s(Stack (stkLength (P, C, M) pc - 2) \<mapsto> Value (Intg (i1 + i2)))
C \<noteq> ClassMain P
C \<noteq> ClassMain P
PROG P \<turnstile> C sees M: Ts\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in C
instrs_of (PROG P) C M = is

goal (1 subgoal):
 1. (case \<lfloor>Suc pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
[PROOF STEP]
by (fastforce dest!: wt_jvm_prog_impl_wt_instr [OF wf_jvmprog_is_wf_typ])
[PROOF STATE]
proof (state)
this:
(case \<lfloor>Suc pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))

goal (46 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc i. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = Goto i; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>nat (int pc + i)\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = CmpEq; ek = \<Up>\<lambda>s. let e1 = stkAt s (stkLength (P, C, M) pc - 1); e2 = stkAt s (stkLength (P, C, M) pc - 2) in s(Stack (stkLength (P, C, M) pc - 2) \<mapsto> Value (Bool (e1 = e2))); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>Suc pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 46 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (46 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc i. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = Goto i; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>nat (int pc + i)\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = CmpEq; ek = \<Up>\<lambda>s. let e1 = stkAt s (stkLength (P, C, M) pc - 1); e2 = stkAt s (stkLength (P, C, M) pc - 2) in s(Stack (stkLength (P, C, M) pc - 2) \<mapsto> Value (Bool (e1 = e2))); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>Suc pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 46 subgoals...
[PROOF STEP]
case (CFG_Goto C P C0 Main M pc i)
[PROOF STATE]
proof (state)
this:
C \<noteq> ClassMain P
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter)
C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)
instrs_of (PROG P) C M ! pc = Goto i
C \<noteq> ClassMain P
C \<noteq> ClassMain P

goal (46 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc i. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = Goto i; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>nat (int pc + i)\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = CmpEq; ek = \<Up>\<lambda>s. let e1 = stkAt s (stkLength (P, C, M) pc - 1); e2 = stkAt s (stkLength (P, C, M) pc - 2) in s(Stack (stkLength (P, C, M) pc - 2) \<mapsto> Value (Bool (e1 = e2))); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>Suc pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 46 subgoals...
[PROOF STEP]
from \<open>(P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter)\<close> \<open>C \<noteq> ClassMain P\<close>
[PROOF STATE]
proof (chain)
picking this:
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter)
C \<noteq> ClassMain P
[PROOF STEP]
obtain Ts T mxs mxl\<^sub>0 "is" xt where "PROG P \<turnstile> C sees M:Ts\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in C"
    and "instrs_of (PROG P) C M = is"
[PROOF STATE]
proof (prove)
using this:
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter)
C \<noteq> ClassMain P

goal (1 subgoal):
 1. (\<And>Ts T mxs mxl\<^sub>0 is xt. \<lbrakk>PROG P \<turnstile> C sees M: Ts\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in C; instrs_of (PROG P) C M = is\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by -(drule method_of_reachable_node_exists, auto)
[PROOF STATE]
proof (state)
this:
PROG P \<turnstile> C sees M: Ts\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in C
instrs_of (PROG P) C M = is

goal (46 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc i. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = Goto i; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>nat (int pc + i)\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = CmpEq; ek = \<Up>\<lambda>s. let e1 = stkAt s (stkLength (P, C, M) pc - 1); e2 = stkAt s (stkLength (P, C, M) pc - 2) in s(Stack (stkLength (P, C, M) pc - 2) \<mapsto> Value (Bool (e1 = e2))); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>Suc pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 46 subgoals...
[PROOF STEP]
with CFG_Goto
[PROOF STATE]
proof (chain)
picking this:
C \<noteq> ClassMain P
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter)
C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)
instrs_of (PROG P) C M ! pc = Goto i
C \<noteq> ClassMain P
C \<noteq> ClassMain P
PROG P \<turnstile> C sees M: Ts\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in C
instrs_of (PROG P) C M = is
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
C \<noteq> ClassMain P
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter)
C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)
instrs_of (PROG P) C M ! pc = Goto i
C \<noteq> ClassMain P
C \<noteq> ClassMain P
PROG P \<turnstile> C sees M: Ts\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in C
instrs_of (PROG P) C M = is

goal (1 subgoal):
 1. (case \<lfloor>nat (int pc + i)\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
[PROOF STEP]
by (fastforce dest!: wt_jvm_prog_impl_wt_instr [OF wf_jvmprog_is_wf_typ])
[PROOF STATE]
proof (state)
this:
(case \<lfloor>nat (int pc + i)\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))

goal (45 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = CmpEq; ek = \<Up>\<lambda>s. let e1 = stkAt s (stkLength (P, C, M) pc - 1); e2 = stkAt s (stkLength (P, C, M) pc - 2) in s(Stack (stkLength (P, C, M) pc - 2) \<mapsto> Value (Bool (e1 = e2))); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>Suc pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc i ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = IfFalse i; i \<noteq> 1; ek = (\<lambda>s. stkAt s (stkLength (P, C, M) pc - 1) = Bool False)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>nat (int pc + i)\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 45 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (45 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = CmpEq; ek = \<Up>\<lambda>s. let e1 = stkAt s (stkLength (P, C, M) pc - 1); e2 = stkAt s (stkLength (P, C, M) pc - 2) in s(Stack (stkLength (P, C, M) pc - 2) \<mapsto> Value (Bool (e1 = e2))); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>Suc pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc i ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = IfFalse i; i \<noteq> 1; ek = (\<lambda>s. stkAt s (stkLength (P, C, M) pc - 1) = Bool False)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>nat (int pc + i)\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 45 subgoals...
[PROOF STEP]
case (CFG_CmpEq C P C0 Main M pc ek)
[PROOF STATE]
proof (state)
this:
C \<noteq> ClassMain P
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter)
C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)
instrs_of (PROG P) C M ! pc = CmpEq
ek = \<Up>\<lambda>s. let e1 = stkAt s (stkLength (P, C, M) pc - 1); e2 = stkAt s (stkLength (P, C, M) pc - 2) in s(Stack (stkLength (P, C, M) pc - 2) \<mapsto> Value (Bool (e1 = e2)))
C \<noteq> ClassMain P
C \<noteq> ClassMain P

goal (45 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = CmpEq; ek = \<Up>\<lambda>s. let e1 = stkAt s (stkLength (P, C, M) pc - 1); e2 = stkAt s (stkLength (P, C, M) pc - 2) in s(Stack (stkLength (P, C, M) pc - 2) \<mapsto> Value (Bool (e1 = e2))); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>Suc pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc i ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = IfFalse i; i \<noteq> 1; ek = (\<lambda>s. stkAt s (stkLength (P, C, M) pc - 1) = Bool False)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>nat (int pc + i)\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 45 subgoals...
[PROOF STEP]
from \<open>(P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter)\<close> \<open>C \<noteq> ClassMain P\<close>
[PROOF STATE]
proof (chain)
picking this:
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter)
C \<noteq> ClassMain P
[PROOF STEP]
obtain Ts T mxs mxl\<^sub>0 "is" xt where "PROG P \<turnstile> C sees M:Ts\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in C"
    and "instrs_of (PROG P) C M = is"
[PROOF STATE]
proof (prove)
using this:
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter)
C \<noteq> ClassMain P

goal (1 subgoal):
 1. (\<And>Ts T mxs mxl\<^sub>0 is xt. \<lbrakk>PROG P \<turnstile> C sees M: Ts\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in C; instrs_of (PROG P) C M = is\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by -(drule method_of_reachable_node_exists, auto)
[PROOF STATE]
proof (state)
this:
PROG P \<turnstile> C sees M: Ts\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in C
instrs_of (PROG P) C M = is

goal (45 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = CmpEq; ek = \<Up>\<lambda>s. let e1 = stkAt s (stkLength (P, C, M) pc - 1); e2 = stkAt s (stkLength (P, C, M) pc - 2) in s(Stack (stkLength (P, C, M) pc - 2) \<mapsto> Value (Bool (e1 = e2))); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>Suc pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc i ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = IfFalse i; i \<noteq> 1; ek = (\<lambda>s. stkAt s (stkLength (P, C, M) pc - 1) = Bool False)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>nat (int pc + i)\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 45 subgoals...
[PROOF STEP]
with CFG_CmpEq
[PROOF STATE]
proof (chain)
picking this:
C \<noteq> ClassMain P
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter)
C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)
instrs_of (PROG P) C M ! pc = CmpEq
ek = \<Up>\<lambda>s. let e1 = stkAt s (stkLength (P, C, M) pc - 1); e2 = stkAt s (stkLength (P, C, M) pc - 2) in s(Stack (stkLength (P, C, M) pc - 2) \<mapsto> Value (Bool (e1 = e2)))
C \<noteq> ClassMain P
C \<noteq> ClassMain P
PROG P \<turnstile> C sees M: Ts\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in C
instrs_of (PROG P) C M = is
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
C \<noteq> ClassMain P
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter)
C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)
instrs_of (PROG P) C M ! pc = CmpEq
ek = \<Up>\<lambda>s. let e1 = stkAt s (stkLength (P, C, M) pc - 1); e2 = stkAt s (stkLength (P, C, M) pc - 2) in s(Stack (stkLength (P, C, M) pc - 2) \<mapsto> Value (Bool (e1 = e2)))
C \<noteq> ClassMain P
C \<noteq> ClassMain P
PROG P \<turnstile> C sees M: Ts\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in C
instrs_of (PROG P) C M = is

goal (1 subgoal):
 1. (case \<lfloor>Suc pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
[PROOF STEP]
by (fastforce dest!: wt_jvm_prog_impl_wt_instr [OF wf_jvmprog_is_wf_typ])
[PROOF STATE]
proof (state)
this:
(case \<lfloor>Suc pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))

goal (44 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc i ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = IfFalse i; i \<noteq> 1; ek = (\<lambda>s. stkAt s (stkLength (P, C, M) pc - 1) = Bool False)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>nat (int pc + i)\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc i ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = IfFalse i; ek = (\<lambda>s. stkAt s (stkLength (P, C, M) pc - 1) \<noteq> Bool False \<or> i = 1)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>Suc pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 44 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (44 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc i ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = IfFalse i; i \<noteq> 1; ek = (\<lambda>s. stkAt s (stkLength (P, C, M) pc - 1) = Bool False)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>nat (int pc + i)\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc i ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = IfFalse i; ek = (\<lambda>s. stkAt s (stkLength (P, C, M) pc - 1) \<noteq> Bool False \<or> i = 1)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>Suc pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 44 subgoals...
[PROOF STEP]
case (CFG_IfFalse_False C P C0 Main M pc i ek)
[PROOF STATE]
proof (state)
this:
C \<noteq> ClassMain P
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter)
C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)
instrs_of (PROG P) C M ! pc = IfFalse i
i \<noteq> 1
ek = (\<lambda>s. stkAt s (stkLength (P, C, M) pc - 1) = Bool False)\<^sub>\<surd>
C \<noteq> ClassMain P
C \<noteq> ClassMain P

goal (44 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc i ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = IfFalse i; i \<noteq> 1; ek = (\<lambda>s. stkAt s (stkLength (P, C, M) pc - 1) = Bool False)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>nat (int pc + i)\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc i ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = IfFalse i; ek = (\<lambda>s. stkAt s (stkLength (P, C, M) pc - 1) \<noteq> Bool False \<or> i = 1)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>Suc pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 44 subgoals...
[PROOF STEP]
from \<open>(P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter)\<close> \<open>C \<noteq> ClassMain P\<close>
[PROOF STATE]
proof (chain)
picking this:
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter)
C \<noteq> ClassMain P
[PROOF STEP]
obtain Ts T mxs mxl\<^sub>0 "is" xt where "PROG P \<turnstile> C sees M:Ts\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in C"
    and "instrs_of (PROG P) C M = is"
[PROOF STATE]
proof (prove)
using this:
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter)
C \<noteq> ClassMain P

goal (1 subgoal):
 1. (\<And>Ts T mxs mxl\<^sub>0 is xt. \<lbrakk>PROG P \<turnstile> C sees M: Ts\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in C; instrs_of (PROG P) C M = is\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by -(drule method_of_reachable_node_exists, auto)
[PROOF STATE]
proof (state)
this:
PROG P \<turnstile> C sees M: Ts\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in C
instrs_of (PROG P) C M = is

goal (44 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc i ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = IfFalse i; i \<noteq> 1; ek = (\<lambda>s. stkAt s (stkLength (P, C, M) pc - 1) = Bool False)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>nat (int pc + i)\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc i ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = IfFalse i; ek = (\<lambda>s. stkAt s (stkLength (P, C, M) pc - 1) \<noteq> Bool False \<or> i = 1)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>Suc pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 44 subgoals...
[PROOF STEP]
with CFG_IfFalse_False
[PROOF STATE]
proof (chain)
picking this:
C \<noteq> ClassMain P
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter)
C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)
instrs_of (PROG P) C M ! pc = IfFalse i
i \<noteq> 1
ek = (\<lambda>s. stkAt s (stkLength (P, C, M) pc - 1) = Bool False)\<^sub>\<surd>
C \<noteq> ClassMain P
C \<noteq> ClassMain P
PROG P \<turnstile> C sees M: Ts\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in C
instrs_of (PROG P) C M = is
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
C \<noteq> ClassMain P
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter)
C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)
instrs_of (PROG P) C M ! pc = IfFalse i
i \<noteq> 1
ek = (\<lambda>s. stkAt s (stkLength (P, C, M) pc - 1) = Bool False)\<^sub>\<surd>
C \<noteq> ClassMain P
C \<noteq> ClassMain P
PROG P \<turnstile> C sees M: Ts\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in C
instrs_of (PROG P) C M = is

goal (1 subgoal):
 1. (case \<lfloor>nat (int pc + i)\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
[PROOF STEP]
by (fastforce dest!: wt_jvm_prog_impl_wt_instr [OF wf_jvmprog_is_wf_typ])
[PROOF STATE]
proof (state)
this:
(case \<lfloor>nat (int pc + i)\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))

goal (43 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc i ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = IfFalse i; ek = (\<lambda>s. stkAt s (stkLength (P, C, M) pc - 1) \<noteq> Bool False \<or> i = 1)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>Suc pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 43 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (43 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc i ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = IfFalse i; ek = (\<lambda>s. stkAt s (stkLength (P, C, M) pc - 1) \<noteq> Bool False \<or> i = 1)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>Suc pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 43 subgoals...
[PROOF STEP]
case (CFG_IfFalse_True C P C0 Main M pc i ek)
[PROOF STATE]
proof (state)
this:
C \<noteq> ClassMain P
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter)
C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)
instrs_of (PROG P) C M ! pc = IfFalse i
ek = (\<lambda>s. stkAt s (stkLength (P, C, M) pc - 1) \<noteq> Bool False \<or> i = 1)\<^sub>\<surd>
C \<noteq> ClassMain P
C \<noteq> ClassMain P

goal (43 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc i ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = IfFalse i; ek = (\<lambda>s. stkAt s (stkLength (P, C, M) pc - 1) \<noteq> Bool False \<or> i = 1)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>Suc pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 43 subgoals...
[PROOF STEP]
from \<open>(P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter)\<close> \<open>C \<noteq> ClassMain P\<close>
[PROOF STATE]
proof (chain)
picking this:
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter)
C \<noteq> ClassMain P
[PROOF STEP]
obtain Ts T mxs mxl\<^sub>0 "is" xt where "PROG P \<turnstile> C sees M:Ts\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in C"
    and "instrs_of (PROG P) C M = is"
[PROOF STATE]
proof (prove)
using this:
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter)
C \<noteq> ClassMain P

goal (1 subgoal):
 1. (\<And>Ts T mxs mxl\<^sub>0 is xt. \<lbrakk>PROG P \<turnstile> C sees M: Ts\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in C; instrs_of (PROG P) C M = is\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by -(drule method_of_reachable_node_exists, auto)
[PROOF STATE]
proof (state)
this:
PROG P \<turnstile> C sees M: Ts\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in C
instrs_of (PROG P) C M = is

goal (43 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc i ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = IfFalse i; ek = (\<lambda>s. stkAt s (stkLength (P, C, M) pc - 1) \<noteq> Bool False \<or> i = 1)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>Suc pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 43 subgoals...
[PROOF STEP]
with CFG_IfFalse_True
[PROOF STATE]
proof (chain)
picking this:
C \<noteq> ClassMain P
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter)
C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)
instrs_of (PROG P) C M ! pc = IfFalse i
ek = (\<lambda>s. stkAt s (stkLength (P, C, M) pc - 1) \<noteq> Bool False \<or> i = 1)\<^sub>\<surd>
C \<noteq> ClassMain P
C \<noteq> ClassMain P
PROG P \<turnstile> C sees M: Ts\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in C
instrs_of (PROG P) C M = is
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
C \<noteq> ClassMain P
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter)
C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)
instrs_of (PROG P) C M ! pc = IfFalse i
ek = (\<lambda>s. stkAt s (stkLength (P, C, M) pc - 1) \<noteq> Bool False \<or> i = 1)\<^sub>\<surd>
C \<noteq> ClassMain P
C \<noteq> ClassMain P
PROG P \<turnstile> C sees M: Ts\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in C
instrs_of (PROG P) C M = is

goal (1 subgoal):
 1. (case \<lfloor>Suc pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
[PROOF STEP]
using [[simproc del: list_to_set_comprehension]]
[PROOF STATE]
proof (prove)
using this:
C \<noteq> ClassMain P
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter)
C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)
instrs_of (PROG P) C M ! pc = IfFalse i
ek = (\<lambda>s. stkAt s (stkLength (P, C, M) pc - 1) \<noteq> Bool False \<or> i = 1)\<^sub>\<surd>
C \<noteq> ClassMain P
C \<noteq> ClassMain P
PROG P \<turnstile> C sees M: Ts\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in C
instrs_of (PROG P) C M = is

goal (1 subgoal):
 1. (case \<lfloor>Suc pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
[PROOF STEP]
by (fastforce dest!: wt_jvm_prog_impl_wt_instr [OF wf_jvmprog_is_wf_typ])
[PROOF STATE]
proof (state)
this:
(case \<lfloor>Suc pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))

goal (42 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 42 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (42 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 42 subgoals...
[PROOF STEP]
case (CFG_New_Update C P C0 Main M pc Cl ek)
[PROOF STATE]
proof (state)
this:
C \<noteq> ClassMain P
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Normal)
C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)
instrs_of (PROG P) C M ! pc = New Cl
ek = \<Up>\<lambda>s. let a = the (new_Addr (heap_of s)) in s(Heap \<mapsto> Hp (heap_of s(a \<mapsto> blank (PROG P) Cl)), Stack (stkLength (P, C, M) pc) \<mapsto> Value (Addr a))
C \<noteq> ClassMain P
C \<noteq> ClassMain P

goal (42 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 42 subgoals...
[PROOF STEP]
from \<open>(P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Normal)\<close> \<open>C \<noteq> ClassMain P\<close>
[PROOF STATE]
proof (chain)
picking this:
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Normal)
C \<noteq> ClassMain P
[PROOF STEP]
obtain Ts T mxs mxl\<^sub>0 "is" xt where "PROG P \<turnstile> C sees M:Ts\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in C"
    and "instrs_of (PROG P) C M = is"
[PROOF STATE]
proof (prove)
using this:
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Normal)
C \<noteq> ClassMain P

goal (1 subgoal):
 1. (\<And>Ts T mxs mxl\<^sub>0 is xt. \<lbrakk>PROG P \<turnstile> C sees M: Ts\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in C; instrs_of (PROG P) C M = is\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by -(drule method_of_reachable_node_exists, auto)
[PROOF STATE]
proof (state)
this:
PROG P \<turnstile> C sees M: Ts\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in C
instrs_of (PROG P) C M = is

goal (42 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 42 subgoals...
[PROOF STEP]
with CFG_New_Update
[PROOF STATE]
proof (chain)
picking this:
C \<noteq> ClassMain P
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Normal)
C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)
instrs_of (PROG P) C M ! pc = New Cl
ek = \<Up>\<lambda>s. let a = the (new_Addr (heap_of s)) in s(Heap \<mapsto> Hp (heap_of s(a \<mapsto> blank (PROG P) Cl)), Stack (stkLength (P, C, M) pc) \<mapsto> Value (Addr a))
C \<noteq> ClassMain P
C \<noteq> ClassMain P
PROG P \<turnstile> C sees M: Ts\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in C
instrs_of (PROG P) C M = is
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
C \<noteq> ClassMain P
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Normal)
C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)
instrs_of (PROG P) C M ! pc = New Cl
ek = \<Up>\<lambda>s. let a = the (new_Addr (heap_of s)) in s(Heap \<mapsto> Hp (heap_of s(a \<mapsto> blank (PROG P) Cl)), Stack (stkLength (P, C, M) pc) \<mapsto> Value (Addr a))
C \<noteq> ClassMain P
C \<noteq> ClassMain P
PROG P \<turnstile> C sees M: Ts\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in C
instrs_of (PROG P) C M = is

goal (1 subgoal):
 1. (case \<lfloor>Suc pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
[PROOF STEP]
by (fastforce dest!: wt_jvm_prog_impl_wt_instr [OF wf_jvmprog_is_wf_typ])
[PROOF STATE]
proof (state)
this:
(case \<lfloor>Suc pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))

goal (41 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 41 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (41 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 41 subgoals...
[PROOF STEP]
case (CFG_New_Exceptional_handle C P C0 Main M pc pc' Cl ek)
[PROOF STATE]
proof (state)
this:
C \<noteq> ClassMain P
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Exceptional \<lfloor>pc'\<rfloor> Enter)
C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)
instrs_of (PROG P) C M ! pc = New Cl
ek = \<Up>\<lambda>s. s(Exception := None)(Stack (stkLength (P, C, M) pc' - 1) \<mapsto> Value (Addr (addr_of_sys_xcpt OutOfMemory)))
C \<noteq> ClassMain P
C \<noteq> ClassMain P

goal (41 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 41 subgoals...
[PROOF STEP]
hence "TYPING P C M ! pc \<noteq> None" and "pc < length (instrs_of (PROG P) C M)"
[PROOF STATE]
proof (prove)
using this:
C \<noteq> ClassMain P
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Exceptional \<lfloor>pc'\<rfloor> Enter)
C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)
instrs_of (PROG P) C M ! pc = New Cl
ek = \<Up>\<lambda>s. s(Exception := None)(Stack (stkLength (P, C, M) pc' - 1) \<mapsto> Value (Addr (addr_of_sys_xcpt OutOfMemory)))
C \<noteq> ClassMain P
C \<noteq> ClassMain P

goal (1 subgoal):
 1. TYPING P C M ! pc \<noteq> None &&& pc < length (instrs_of (PROG P) C M)
[PROOF STEP]
by simp_all
[PROOF STATE]
proof (state)
this:
TYPING P C M ! pc \<noteq> None
pc < length (instrs_of (PROG P) C M)

goal (41 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 41 subgoals...
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
TYPING P C M ! pc \<noteq> None
pc < length (instrs_of (PROG P) C M)

goal (41 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 41 subgoals...
[PROOF STEP]
from \<open>(P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Exceptional \<lfloor>pc'\<rfloor> Enter)\<close> \<open>C \<noteq> ClassMain P\<close>
[PROOF STATE]
proof (chain)
picking this:
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Exceptional \<lfloor>pc'\<rfloor> Enter)
C \<noteq> ClassMain P
[PROOF STEP]
obtain Ts T mxs mxl\<^sub>0 where
    "PROG P \<turnstile> C sees M:Ts\<rightarrow>T = (mxs, mxl\<^sub>0, instrs_of (PROG P) C M, ex_table_of (PROG P) C M) in C"
[PROOF STATE]
proof (prove)
using this:
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Exceptional \<lfloor>pc'\<rfloor> Enter)
C \<noteq> ClassMain P

goal (1 subgoal):
 1. (\<And>Ts T mxs mxl\<^sub>0. PROG P \<turnstile> C sees M: Ts\<rightarrow>T = (mxs, mxl\<^sub>0, instrs_of (PROG P) C M, ex_table_of (PROG P) C M) in C \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (fastforce dest: method_of_reachable_node_exists)
[PROOF STATE]
proof (state)
this:
PROG P \<turnstile> C sees M: Ts\<rightarrow>T = (mxs, mxl\<^sub>0, instrs_of (PROG P) C M, ex_table_of (PROG P) C M) in C

goal (41 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 41 subgoals...
[PROOF STEP]
with \<open>pc < length (instrs_of (PROG P) C M)\<close> \<open>instrs_of (PROG P) C M ! pc = New Cl\<close>
[PROOF STATE]
proof (chain)
picking this:
pc < length (instrs_of (PROG P) C M)
instrs_of (PROG P) C M ! pc = New Cl
PROG P \<turnstile> C sees M: Ts\<rightarrow>T = (mxs, mxl\<^sub>0, instrs_of (PROG P) C M, ex_table_of (PROG P) C M) in C
[PROOF STEP]
have "PROG P,T,mxs,length (instrs_of (PROG P) C M),ex_table_of (PROG P) C M
    \<turnstile> New Cl,pc :: TYPING P C M"
[PROOF STATE]
proof (prove)
using this:
pc < length (instrs_of (PROG P) C M)
instrs_of (PROG P) C M ! pc = New Cl
PROG P \<turnstile> C sees M: Ts\<rightarrow>T = (mxs, mxl\<^sub>0, instrs_of (PROG P) C M, ex_table_of (PROG P) C M) in C

goal (1 subgoal):
 1. PROG P,T,mxs,length (instrs_of (PROG P) C M),ex_table_of (PROG P) C M \<turnstile> New Cl,pc :: TYPING P C M
[PROOF STEP]
by (fastforce dest!: wt_jvm_prog_impl_wt_instr [OF wf_jvmprog_is_wf_typ])
[PROOF STATE]
proof (state)
this:
PROG P,T,mxs,length (instrs_of (PROG P) C M),ex_table_of (PROG P) C M \<turnstile> New Cl,pc :: TYPING P C M

goal (41 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 41 subgoals...
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
PROG P,T,mxs,length (instrs_of (PROG P) C M),ex_table_of (PROG P) C M \<turnstile> New Cl,pc :: TYPING P C M

goal (41 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 41 subgoals...
[PROOF STEP]
from \<open>(P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Exceptional \<lfloor>pc'\<rfloor> Enter)\<close> \<open>C \<noteq> ClassMain P\<close>
    \<open>instrs_of (PROG P) C M ! pc = New Cl\<close>
[PROOF STATE]
proof (chain)
picking this:
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Exceptional \<lfloor>pc'\<rfloor> Enter)
C \<noteq> ClassMain P
instrs_of (PROG P) C M ! pc = New Cl
[PROOF STEP]
obtain d'
    where "match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) = \<lfloor>(pc', d')\<rfloor>"
[PROOF STATE]
proof (prove)
using this:
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Exceptional \<lfloor>pc'\<rfloor> Enter)
C \<noteq> ClassMain P
instrs_of (PROG P) C M ! pc = New Cl

goal (1 subgoal):
 1. (\<And>d'. match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) = \<lfloor>(pc', d')\<rfloor> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by cases (fastforce elim: JVMCFG.cases)
[PROOF STATE]
proof (state)
this:
match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) = \<lfloor>(pc', d')\<rfloor>

goal (41 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 41 subgoals...
[PROOF STEP]
hence "\<exists>(f, t, D, h, d)\<in>set (ex_table_of (PROG P) C M).
    matches_ex_entry (PROG P) OutOfMemory pc (f, t, D, h, d) \<and> h = pc' \<and> d = d'"
[PROOF STATE]
proof (prove)
using this:
match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) = \<lfloor>(pc', d')\<rfloor>

goal (1 subgoal):
 1. \<exists>(f, t, D, h, d)\<in>set (ex_table_of (PROG P) C M). matches_ex_entry (PROG P) OutOfMemory pc (f, t, D, h, d) \<and> h = pc' \<and> d = d'
[PROOF STEP]
by -(drule match_ex_table_SomeD)
[PROOF STATE]
proof (state)
this:
\<exists>(f, t, D, h, d)\<in>set (ex_table_of (PROG P) C M). matches_ex_entry (PROG P) OutOfMemory pc (f, t, D, h, d) \<and> h = pc' \<and> d = d'

goal (41 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 41 subgoals...
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
TYPING P C M ! pc \<noteq> None
pc < length (instrs_of (PROG P) C M)
PROG P,T,mxs,length (instrs_of (PROG P) C M),ex_table_of (PROG P) C M \<turnstile> New Cl,pc :: TYPING P C M
\<exists>(f, t, D, h, d)\<in>set (ex_table_of (PROG P) C M). matches_ex_entry (PROG P) OutOfMemory pc (f, t, D, h, d) \<and> h = pc' \<and> d = d'
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
TYPING P C M ! pc \<noteq> None
pc < length (instrs_of (PROG P) C M)
PROG P,T,mxs,length (instrs_of (PROG P) C M),ex_table_of (PROG P) C M \<turnstile> New Cl,pc :: TYPING P C M
\<exists>(f, t, D, h, d)\<in>set (ex_table_of (PROG P) C M). matches_ex_entry (PROG P) OutOfMemory pc (f, t, D, h, d) \<and> h = pc' \<and> d = d'

goal (1 subgoal):
 1. (case \<lfloor>pc'\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
[PROOF STEP]
using \<open>instrs_of (PROG P) C M ! pc = New Cl\<close>
[PROOF STATE]
proof (prove)
using this:
TYPING P C M ! pc \<noteq> None
pc < length (instrs_of (PROG P) C M)
PROG P,T,mxs,length (instrs_of (PROG P) C M),ex_table_of (PROG P) C M \<turnstile> New Cl,pc :: TYPING P C M
\<exists>(f, t, D, h, d)\<in>set (ex_table_of (PROG P) C M). matches_ex_entry (PROG P) OutOfMemory pc (f, t, D, h, d) \<and> h = pc' \<and> d = d'
instrs_of (PROG P) C M ! pc = New Cl

goal (1 subgoal):
 1. (case \<lfloor>pc'\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
[PROOF STEP]
by (fastforce simp: relevant_entries_def is_relevant_entry_def matches_ex_entry_def)
[PROOF STATE]
proof (state)
this:
(case \<lfloor>pc'\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))

goal (40 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 40 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (40 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 40 subgoals...
[PROOF STEP]
case (CFG_Getfield_Update C P C0 Main M pc F Cl ek)
[PROOF STATE]
proof (state)
this:
C \<noteq> ClassMain P
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Normal)
C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)
instrs_of (PROG P) C M ! pc = Getfield F Cl
ek = \<Up>\<lambda>s. let (D, fs) = the (heap_of s (the_Addr (stkAt s (stkLength (P, C, M) pc - 1)))) in s(Stack (stkLength (P, C, M) pc - 1) \<mapsto> Value (the (fs (F, Cl))))
C \<noteq> ClassMain P
C \<noteq> ClassMain P

goal (40 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 40 subgoals...
[PROOF STEP]
from \<open>(P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Normal)\<close> \<open>C \<noteq> ClassMain P\<close>
[PROOF STATE]
proof (chain)
picking this:
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Normal)
C \<noteq> ClassMain P
[PROOF STEP]
obtain Ts T mxs mxl\<^sub>0 "is" xt where "PROG P \<turnstile> C sees M:Ts\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in C"
    and "instrs_of (PROG P) C M = is"
[PROOF STATE]
proof (prove)
using this:
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Normal)
C \<noteq> ClassMain P

goal (1 subgoal):
 1. (\<And>Ts T mxs mxl\<^sub>0 is xt. \<lbrakk>PROG P \<turnstile> C sees M: Ts\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in C; instrs_of (PROG P) C M = is\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by -(drule method_of_reachable_node_exists, auto)
[PROOF STATE]
proof (state)
this:
PROG P \<turnstile> C sees M: Ts\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in C
instrs_of (PROG P) C M = is

goal (40 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 40 subgoals...
[PROOF STEP]
with CFG_Getfield_Update
[PROOF STATE]
proof (chain)
picking this:
C \<noteq> ClassMain P
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Normal)
C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)
instrs_of (PROG P) C M ! pc = Getfield F Cl
ek = \<Up>\<lambda>s. let (D, fs) = the (heap_of s (the_Addr (stkAt s (stkLength (P, C, M) pc - 1)))) in s(Stack (stkLength (P, C, M) pc - 1) \<mapsto> Value (the (fs (F, Cl))))
C \<noteq> ClassMain P
C \<noteq> ClassMain P
PROG P \<turnstile> C sees M: Ts\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in C
instrs_of (PROG P) C M = is
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
C \<noteq> ClassMain P
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Normal)
C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)
instrs_of (PROG P) C M ! pc = Getfield F Cl
ek = \<Up>\<lambda>s. let (D, fs) = the (heap_of s (the_Addr (stkAt s (stkLength (P, C, M) pc - 1)))) in s(Stack (stkLength (P, C, M) pc - 1) \<mapsto> Value (the (fs (F, Cl))))
C \<noteq> ClassMain P
C \<noteq> ClassMain P
PROG P \<turnstile> C sees M: Ts\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in C
instrs_of (PROG P) C M = is

goal (1 subgoal):
 1. (case \<lfloor>Suc pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
[PROOF STEP]
by (fastforce dest!: wt_jvm_prog_impl_wt_instr [OF wf_jvmprog_is_wf_typ])
[PROOF STATE]
proof (state)
this:
(case \<lfloor>Suc pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))

goal (39 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 39 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (39 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 39 subgoals...
[PROOF STEP]
case (CFG_Getfield_Exceptional_handle C P C0 Main M pc pc' F Cl ek)
[PROOF STATE]
proof (state)
this:
C \<noteq> ClassMain P
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Exceptional \<lfloor>pc'\<rfloor> Enter)
C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)
instrs_of (PROG P) C M ! pc = Getfield F Cl
ek = \<Up>\<lambda>s. s(Exception := None)(Stack (stkLength (P, C, M) pc' - 1) \<mapsto> Value (Addr (addr_of_sys_xcpt NullPointer)))
C \<noteq> ClassMain P
C \<noteq> ClassMain P

goal (39 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 39 subgoals...
[PROOF STEP]
hence "TYPING P C M ! pc \<noteq> None" and "pc < length (instrs_of (PROG P) C M)"
[PROOF STATE]
proof (prove)
using this:
C \<noteq> ClassMain P
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Exceptional \<lfloor>pc'\<rfloor> Enter)
C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)
instrs_of (PROG P) C M ! pc = Getfield F Cl
ek = \<Up>\<lambda>s. s(Exception := None)(Stack (stkLength (P, C, M) pc' - 1) \<mapsto> Value (Addr (addr_of_sys_xcpt NullPointer)))
C \<noteq> ClassMain P
C \<noteq> ClassMain P

goal (1 subgoal):
 1. TYPING P C M ! pc \<noteq> None &&& pc < length (instrs_of (PROG P) C M)
[PROOF STEP]
by simp_all
[PROOF STATE]
proof (state)
this:
TYPING P C M ! pc \<noteq> None
pc < length (instrs_of (PROG P) C M)

goal (39 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 39 subgoals...
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
TYPING P C M ! pc \<noteq> None
pc < length (instrs_of (PROG P) C M)

goal (39 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 39 subgoals...
[PROOF STEP]
from \<open>(P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Exceptional \<lfloor>pc'\<rfloor> Enter)\<close> \<open>C \<noteq> ClassMain P\<close>
[PROOF STATE]
proof (chain)
picking this:
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Exceptional \<lfloor>pc'\<rfloor> Enter)
C \<noteq> ClassMain P
[PROOF STEP]
obtain Ts T mxs mxl\<^sub>0 where
    "PROG P \<turnstile> C sees M:Ts\<rightarrow>T = (mxs, mxl\<^sub>0, instrs_of (PROG P) C M, ex_table_of (PROG P) C M) in C"
[PROOF STATE]
proof (prove)
using this:
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Exceptional \<lfloor>pc'\<rfloor> Enter)
C \<noteq> ClassMain P

goal (1 subgoal):
 1. (\<And>Ts T mxs mxl\<^sub>0. PROG P \<turnstile> C sees M: Ts\<rightarrow>T = (mxs, mxl\<^sub>0, instrs_of (PROG P) C M, ex_table_of (PROG P) C M) in C \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (fastforce dest: method_of_reachable_node_exists)
[PROOF STATE]
proof (state)
this:
PROG P \<turnstile> C sees M: Ts\<rightarrow>T = (mxs, mxl\<^sub>0, instrs_of (PROG P) C M, ex_table_of (PROG P) C M) in C

goal (39 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 39 subgoals...
[PROOF STEP]
with \<open>pc < length (instrs_of (PROG P) C M)\<close> \<open>instrs_of (PROG P) C M ! pc = Getfield F Cl\<close>
[PROOF STATE]
proof (chain)
picking this:
pc < length (instrs_of (PROG P) C M)
instrs_of (PROG P) C M ! pc = Getfield F Cl
PROG P \<turnstile> C sees M: Ts\<rightarrow>T = (mxs, mxl\<^sub>0, instrs_of (PROG P) C M, ex_table_of (PROG P) C M) in C
[PROOF STEP]
have "PROG P,T,mxs,length (instrs_of (PROG P) C M),ex_table_of (PROG P) C M
    \<turnstile> Getfield F Cl,pc :: TYPING P C M"
[PROOF STATE]
proof (prove)
using this:
pc < length (instrs_of (PROG P) C M)
instrs_of (PROG P) C M ! pc = Getfield F Cl
PROG P \<turnstile> C sees M: Ts\<rightarrow>T = (mxs, mxl\<^sub>0, instrs_of (PROG P) C M, ex_table_of (PROG P) C M) in C

goal (1 subgoal):
 1. PROG P,T,mxs,length (instrs_of (PROG P) C M),ex_table_of (PROG P) C M \<turnstile> Getfield F Cl,pc :: TYPING P C M
[PROOF STEP]
by (fastforce dest!: wt_jvm_prog_impl_wt_instr [OF wf_jvmprog_is_wf_typ])
[PROOF STATE]
proof (state)
this:
PROG P,T,mxs,length (instrs_of (PROG P) C M),ex_table_of (PROG P) C M \<turnstile> Getfield F Cl,pc :: TYPING P C M

goal (39 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 39 subgoals...
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
PROG P,T,mxs,length (instrs_of (PROG P) C M),ex_table_of (PROG P) C M \<turnstile> Getfield F Cl,pc :: TYPING P C M

goal (39 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 39 subgoals...
[PROOF STEP]
from \<open>(P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Exceptional \<lfloor>pc'\<rfloor> Enter)\<close> \<open>C \<noteq> ClassMain P\<close>
    \<open>instrs_of (PROG P) C M ! pc = Getfield F Cl\<close>
[PROOF STATE]
proof (chain)
picking this:
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Exceptional \<lfloor>pc'\<rfloor> Enter)
C \<noteq> ClassMain P
instrs_of (PROG P) C M ! pc = Getfield F Cl
[PROOF STEP]
obtain d'
    where "match_ex_table (PROG P) NullPointer pc (ex_table_of (PROG P) C M) = \<lfloor>(pc', d')\<rfloor>"
[PROOF STATE]
proof (prove)
using this:
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Exceptional \<lfloor>pc'\<rfloor> Enter)
C \<noteq> ClassMain P
instrs_of (PROG P) C M ! pc = Getfield F Cl

goal (1 subgoal):
 1. (\<And>d'. match_ex_table (PROG P) NullPointer pc (ex_table_of (PROG P) C M) = \<lfloor>(pc', d')\<rfloor> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by cases (fastforce elim: JVMCFG.cases)
[PROOF STATE]
proof (state)
this:
match_ex_table (PROG P) NullPointer pc (ex_table_of (PROG P) C M) = \<lfloor>(pc', d')\<rfloor>

goal (39 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 39 subgoals...
[PROOF STEP]
hence "\<exists>(f, t, D, h, d)\<in>set (ex_table_of (PROG P) C M).
    matches_ex_entry (PROG P) NullPointer pc (f, t, D, h, d) \<and> h = pc' \<and> d = d'"
[PROOF STATE]
proof (prove)
using this:
match_ex_table (PROG P) NullPointer pc (ex_table_of (PROG P) C M) = \<lfloor>(pc', d')\<rfloor>

goal (1 subgoal):
 1. \<exists>(f, t, D, h, d)\<in>set (ex_table_of (PROG P) C M). matches_ex_entry (PROG P) NullPointer pc (f, t, D, h, d) \<and> h = pc' \<and> d = d'
[PROOF STEP]
by -(drule match_ex_table_SomeD)
[PROOF STATE]
proof (state)
this:
\<exists>(f, t, D, h, d)\<in>set (ex_table_of (PROG P) C M). matches_ex_entry (PROG P) NullPointer pc (f, t, D, h, d) \<and> h = pc' \<and> d = d'

goal (39 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 39 subgoals...
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
TYPING P C M ! pc \<noteq> None
pc < length (instrs_of (PROG P) C M)
PROG P,T,mxs,length (instrs_of (PROG P) C M),ex_table_of (PROG P) C M \<turnstile> Getfield F Cl,pc :: TYPING P C M
\<exists>(f, t, D, h, d)\<in>set (ex_table_of (PROG P) C M). matches_ex_entry (PROG P) NullPointer pc (f, t, D, h, d) \<and> h = pc' \<and> d = d'
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
TYPING P C M ! pc \<noteq> None
pc < length (instrs_of (PROG P) C M)
PROG P,T,mxs,length (instrs_of (PROG P) C M),ex_table_of (PROG P) C M \<turnstile> Getfield F Cl,pc :: TYPING P C M
\<exists>(f, t, D, h, d)\<in>set (ex_table_of (PROG P) C M). matches_ex_entry (PROG P) NullPointer pc (f, t, D, h, d) \<and> h = pc' \<and> d = d'

goal (1 subgoal):
 1. (case \<lfloor>pc'\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
[PROOF STEP]
using \<open>instrs_of (PROG P) C M ! pc = Getfield F Cl\<close>
[PROOF STATE]
proof (prove)
using this:
TYPING P C M ! pc \<noteq> None
pc < length (instrs_of (PROG P) C M)
PROG P,T,mxs,length (instrs_of (PROG P) C M),ex_table_of (PROG P) C M \<turnstile> Getfield F Cl,pc :: TYPING P C M
\<exists>(f, t, D, h, d)\<in>set (ex_table_of (PROG P) C M). matches_ex_entry (PROG P) NullPointer pc (f, t, D, h, d) \<and> h = pc' \<and> d = d'
instrs_of (PROG P) C M ! pc = Getfield F Cl

goal (1 subgoal):
 1. (case \<lfloor>pc'\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
[PROOF STEP]
by (fastforce simp: relevant_entries_def is_relevant_entry_def matches_ex_entry_def)
[PROOF STATE]
proof (state)
this:
(case \<lfloor>pc'\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))

goal (38 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 38 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (38 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 38 subgoals...
[PROOF STEP]
case (CFG_Putfield_Update C P C0 Main M pc F Cl ek)
[PROOF STATE]
proof (state)
this:
C \<noteq> ClassMain P
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Normal)
C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)
instrs_of (PROG P) C M ! pc = Putfield F Cl
ek = \<Up>\<lambda>s. let v = stkAt s (stkLength (P, C, M) pc - 1); r = stkAt s (stkLength (P, C, M) pc - 2); a = the_Addr r; (D, fs) = the (heap_of s a); h' = heap_of s(a \<mapsto> (D, fs((F, Cl) \<mapsto> v))) in s(Heap \<mapsto> Hp h')
C \<noteq> ClassMain P
C \<noteq> ClassMain P

goal (38 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 38 subgoals...
[PROOF STEP]
from \<open>(P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Normal)\<close> \<open>C \<noteq> ClassMain P\<close>
[PROOF STATE]
proof (chain)
picking this:
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Normal)
C \<noteq> ClassMain P
[PROOF STEP]
obtain Ts T mxs mxl\<^sub>0 "is" xt where "PROG P \<turnstile> C sees M:Ts\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in C"
    and "instrs_of (PROG P) C M = is"
[PROOF STATE]
proof (prove)
using this:
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Normal)
C \<noteq> ClassMain P

goal (1 subgoal):
 1. (\<And>Ts T mxs mxl\<^sub>0 is xt. \<lbrakk>PROG P \<turnstile> C sees M: Ts\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in C; instrs_of (PROG P) C M = is\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by -(drule method_of_reachable_node_exists, auto)
[PROOF STATE]
proof (state)
this:
PROG P \<turnstile> C sees M: Ts\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in C
instrs_of (PROG P) C M = is

goal (38 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 38 subgoals...
[PROOF STEP]
with CFG_Putfield_Update
[PROOF STATE]
proof (chain)
picking this:
C \<noteq> ClassMain P
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Normal)
C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)
instrs_of (PROG P) C M ! pc = Putfield F Cl
ek = \<Up>\<lambda>s. let v = stkAt s (stkLength (P, C, M) pc - 1); r = stkAt s (stkLength (P, C, M) pc - 2); a = the_Addr r; (D, fs) = the (heap_of s a); h' = heap_of s(a \<mapsto> (D, fs((F, Cl) \<mapsto> v))) in s(Heap \<mapsto> Hp h')
C \<noteq> ClassMain P
C \<noteq> ClassMain P
PROG P \<turnstile> C sees M: Ts\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in C
instrs_of (PROG P) C M = is
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
C \<noteq> ClassMain P
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Normal)
C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)
instrs_of (PROG P) C M ! pc = Putfield F Cl
ek = \<Up>\<lambda>s. let v = stkAt s (stkLength (P, C, M) pc - 1); r = stkAt s (stkLength (P, C, M) pc - 2); a = the_Addr r; (D, fs) = the (heap_of s a); h' = heap_of s(a \<mapsto> (D, fs((F, Cl) \<mapsto> v))) in s(Heap \<mapsto> Hp h')
C \<noteq> ClassMain P
C \<noteq> ClassMain P
PROG P \<turnstile> C sees M: Ts\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in C
instrs_of (PROG P) C M = is

goal (1 subgoal):
 1. (case \<lfloor>Suc pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
[PROOF STEP]
by (fastforce dest!: wt_jvm_prog_impl_wt_instr [OF wf_jvmprog_is_wf_typ])
[PROOF STATE]
proof (state)
this:
(case \<lfloor>Suc pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))

goal (37 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 37 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (37 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 37 subgoals...
[PROOF STEP]
case (CFG_Putfield_Exceptional_handle C P C0 Main M pc pc' F Cl ek)
[PROOF STATE]
proof (state)
this:
C \<noteq> ClassMain P
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Exceptional \<lfloor>pc'\<rfloor> Enter)
C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)
instrs_of (PROG P) C M ! pc = Putfield F Cl
ek = \<Up>\<lambda>s. s(Exception := None)(Stack (stkLength (P, C, M) pc' - 1) \<mapsto> Value (Addr (addr_of_sys_xcpt NullPointer)))
C \<noteq> ClassMain P
C \<noteq> ClassMain P

goal (37 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 37 subgoals...
[PROOF STEP]
hence "TYPING P C M ! pc \<noteq> None" and "pc < length (instrs_of (PROG P) C M)"
[PROOF STATE]
proof (prove)
using this:
C \<noteq> ClassMain P
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Exceptional \<lfloor>pc'\<rfloor> Enter)
C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)
instrs_of (PROG P) C M ! pc = Putfield F Cl
ek = \<Up>\<lambda>s. s(Exception := None)(Stack (stkLength (P, C, M) pc' - 1) \<mapsto> Value (Addr (addr_of_sys_xcpt NullPointer)))
C \<noteq> ClassMain P
C \<noteq> ClassMain P

goal (1 subgoal):
 1. TYPING P C M ! pc \<noteq> None &&& pc < length (instrs_of (PROG P) C M)
[PROOF STEP]
by simp_all
[PROOF STATE]
proof (state)
this:
TYPING P C M ! pc \<noteq> None
pc < length (instrs_of (PROG P) C M)

goal (37 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 37 subgoals...
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
TYPING P C M ! pc \<noteq> None
pc < length (instrs_of (PROG P) C M)

goal (37 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 37 subgoals...
[PROOF STEP]
from \<open>(P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Exceptional \<lfloor>pc'\<rfloor> Enter)\<close> \<open>C \<noteq> ClassMain P\<close>
[PROOF STATE]
proof (chain)
picking this:
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Exceptional \<lfloor>pc'\<rfloor> Enter)
C \<noteq> ClassMain P
[PROOF STEP]
obtain Ts T mxs mxl\<^sub>0 where
    "PROG P \<turnstile> C sees M:Ts\<rightarrow>T = (mxs, mxl\<^sub>0, instrs_of (PROG P) C M, ex_table_of (PROG P) C M) in C"
[PROOF STATE]
proof (prove)
using this:
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Exceptional \<lfloor>pc'\<rfloor> Enter)
C \<noteq> ClassMain P

goal (1 subgoal):
 1. (\<And>Ts T mxs mxl\<^sub>0. PROG P \<turnstile> C sees M: Ts\<rightarrow>T = (mxs, mxl\<^sub>0, instrs_of (PROG P) C M, ex_table_of (PROG P) C M) in C \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (fastforce dest: method_of_reachable_node_exists)
[PROOF STATE]
proof (state)
this:
PROG P \<turnstile> C sees M: Ts\<rightarrow>T = (mxs, mxl\<^sub>0, instrs_of (PROG P) C M, ex_table_of (PROG P) C M) in C

goal (37 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 37 subgoals...
[PROOF STEP]
with \<open>pc < length (instrs_of (PROG P) C M)\<close> \<open>instrs_of (PROG P) C M ! pc = Putfield F Cl\<close>
[PROOF STATE]
proof (chain)
picking this:
pc < length (instrs_of (PROG P) C M)
instrs_of (PROG P) C M ! pc = Putfield F Cl
PROG P \<turnstile> C sees M: Ts\<rightarrow>T = (mxs, mxl\<^sub>0, instrs_of (PROG P) C M, ex_table_of (PROG P) C M) in C
[PROOF STEP]
have "PROG P,T,mxs,length (instrs_of (PROG P) C M),ex_table_of (PROG P) C M
    \<turnstile> Putfield F Cl,pc :: TYPING P C M"
[PROOF STATE]
proof (prove)
using this:
pc < length (instrs_of (PROG P) C M)
instrs_of (PROG P) C M ! pc = Putfield F Cl
PROG P \<turnstile> C sees M: Ts\<rightarrow>T = (mxs, mxl\<^sub>0, instrs_of (PROG P) C M, ex_table_of (PROG P) C M) in C

goal (1 subgoal):
 1. PROG P,T,mxs,length (instrs_of (PROG P) C M),ex_table_of (PROG P) C M \<turnstile> Putfield F Cl,pc :: TYPING P C M
[PROOF STEP]
by (fastforce dest!: wt_jvm_prog_impl_wt_instr [OF wf_jvmprog_is_wf_typ])
[PROOF STATE]
proof (state)
this:
PROG P,T,mxs,length (instrs_of (PROG P) C M),ex_table_of (PROG P) C M \<turnstile> Putfield F Cl,pc :: TYPING P C M

goal (37 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 37 subgoals...
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
PROG P,T,mxs,length (instrs_of (PROG P) C M),ex_table_of (PROG P) C M \<turnstile> Putfield F Cl,pc :: TYPING P C M

goal (37 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 37 subgoals...
[PROOF STEP]
from \<open>(P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Exceptional \<lfloor>pc'\<rfloor> Enter)\<close> \<open>C \<noteq> ClassMain P\<close>
    \<open>instrs_of (PROG P) C M ! pc = Putfield F Cl\<close>
[PROOF STATE]
proof (chain)
picking this:
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Exceptional \<lfloor>pc'\<rfloor> Enter)
C \<noteq> ClassMain P
instrs_of (PROG P) C M ! pc = Putfield F Cl
[PROOF STEP]
obtain d'
    where "match_ex_table (PROG P) NullPointer pc (ex_table_of (PROG P) C M) = \<lfloor>(pc', d')\<rfloor>"
[PROOF STATE]
proof (prove)
using this:
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Exceptional \<lfloor>pc'\<rfloor> Enter)
C \<noteq> ClassMain P
instrs_of (PROG P) C M ! pc = Putfield F Cl

goal (1 subgoal):
 1. (\<And>d'. match_ex_table (PROG P) NullPointer pc (ex_table_of (PROG P) C M) = \<lfloor>(pc', d')\<rfloor> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by cases (fastforce elim: JVMCFG.cases)
[PROOF STATE]
proof (state)
this:
match_ex_table (PROG P) NullPointer pc (ex_table_of (PROG P) C M) = \<lfloor>(pc', d')\<rfloor>

goal (37 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 37 subgoals...
[PROOF STEP]
hence "\<exists>(f, t, D, h, d)\<in>set (ex_table_of (PROG P) C M).
    matches_ex_entry (PROG P) NullPointer pc (f, t, D, h, d) \<and> h = pc' \<and> d = d'"
[PROOF STATE]
proof (prove)
using this:
match_ex_table (PROG P) NullPointer pc (ex_table_of (PROG P) C M) = \<lfloor>(pc', d')\<rfloor>

goal (1 subgoal):
 1. \<exists>(f, t, D, h, d)\<in>set (ex_table_of (PROG P) C M). matches_ex_entry (PROG P) NullPointer pc (f, t, D, h, d) \<and> h = pc' \<and> d = d'
[PROOF STEP]
by -(drule match_ex_table_SomeD)
[PROOF STATE]
proof (state)
this:
\<exists>(f, t, D, h, d)\<in>set (ex_table_of (PROG P) C M). matches_ex_entry (PROG P) NullPointer pc (f, t, D, h, d) \<and> h = pc' \<and> d = d'

goal (37 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 37 subgoals...
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
TYPING P C M ! pc \<noteq> None
pc < length (instrs_of (PROG P) C M)
PROG P,T,mxs,length (instrs_of (PROG P) C M),ex_table_of (PROG P) C M \<turnstile> Putfield F Cl,pc :: TYPING P C M
\<exists>(f, t, D, h, d)\<in>set (ex_table_of (PROG P) C M). matches_ex_entry (PROG P) NullPointer pc (f, t, D, h, d) \<and> h = pc' \<and> d = d'
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
TYPING P C M ! pc \<noteq> None
pc < length (instrs_of (PROG P) C M)
PROG P,T,mxs,length (instrs_of (PROG P) C M),ex_table_of (PROG P) C M \<turnstile> Putfield F Cl,pc :: TYPING P C M
\<exists>(f, t, D, h, d)\<in>set (ex_table_of (PROG P) C M). matches_ex_entry (PROG P) NullPointer pc (f, t, D, h, d) \<and> h = pc' \<and> d = d'

goal (1 subgoal):
 1. (case \<lfloor>pc'\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
[PROOF STEP]
using \<open>instrs_of (PROG P) C M ! pc = Putfield F Cl\<close>
[PROOF STATE]
proof (prove)
using this:
TYPING P C M ! pc \<noteq> None
pc < length (instrs_of (PROG P) C M)
PROG P,T,mxs,length (instrs_of (PROG P) C M),ex_table_of (PROG P) C M \<turnstile> Putfield F Cl,pc :: TYPING P C M
\<exists>(f, t, D, h, d)\<in>set (ex_table_of (PROG P) C M). matches_ex_entry (PROG P) NullPointer pc (f, t, D, h, d) \<and> h = pc' \<and> d = d'
instrs_of (PROG P) C M ! pc = Putfield F Cl

goal (1 subgoal):
 1. (case \<lfloor>pc'\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
[PROOF STEP]
by (fastforce simp: relevant_entries_def is_relevant_entry_def matches_ex_entry_def)
[PROOF STATE]
proof (state)
this:
(case \<lfloor>pc'\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))

goal (36 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 36 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (36 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 36 subgoals...
[PROOF STEP]
case (CFG_Checkcast_Check_Normal C P C0 Main M pc Cl ek)
[PROOF STATE]
proof (state)
this:
C \<noteq> ClassMain P
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter)
C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)
instrs_of (PROG P) C M ! pc = Checkcast Cl
ek = (\<lambda>s. cast_ok (PROG P) Cl (heap_of s) (stkAt s (stkLength (P, C, M) pc - 1)))\<^sub>\<surd>
C \<noteq> ClassMain P
C \<noteq> ClassMain P

goal (36 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 36 subgoals...
[PROOF STEP]
from \<open>(P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter)\<close> \<open>C \<noteq> ClassMain P\<close>
[PROOF STATE]
proof (chain)
picking this:
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter)
C \<noteq> ClassMain P
[PROOF STEP]
obtain Ts T mxs mxl\<^sub>0 "is" xt where "PROG P \<turnstile> C sees M:Ts\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in C"
    and "instrs_of (PROG P) C M = is"
[PROOF STATE]
proof (prove)
using this:
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter)
C \<noteq> ClassMain P

goal (1 subgoal):
 1. (\<And>Ts T mxs mxl\<^sub>0 is xt. \<lbrakk>PROG P \<turnstile> C sees M: Ts\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in C; instrs_of (PROG P) C M = is\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by -(drule method_of_reachable_node_exists, auto)
[PROOF STATE]
proof (state)
this:
PROG P \<turnstile> C sees M: Ts\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in C
instrs_of (PROG P) C M = is

goal (36 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 36 subgoals...
[PROOF STEP]
with CFG_Checkcast_Check_Normal
[PROOF STATE]
proof (chain)
picking this:
C \<noteq> ClassMain P
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter)
C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)
instrs_of (PROG P) C M ! pc = Checkcast Cl
ek = (\<lambda>s. cast_ok (PROG P) Cl (heap_of s) (stkAt s (stkLength (P, C, M) pc - 1)))\<^sub>\<surd>
C \<noteq> ClassMain P
C \<noteq> ClassMain P
PROG P \<turnstile> C sees M: Ts\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in C
instrs_of (PROG P) C M = is
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
C \<noteq> ClassMain P
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter)
C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)
instrs_of (PROG P) C M ! pc = Checkcast Cl
ek = (\<lambda>s. cast_ok (PROG P) Cl (heap_of s) (stkAt s (stkLength (P, C, M) pc - 1)))\<^sub>\<surd>
C \<noteq> ClassMain P
C \<noteq> ClassMain P
PROG P \<turnstile> C sees M: Ts\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in C
instrs_of (PROG P) C M = is

goal (1 subgoal):
 1. (case \<lfloor>Suc pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
[PROOF STEP]
by (fastforce dest!: wt_jvm_prog_impl_wt_instr [OF wf_jvmprog_is_wf_typ])
[PROOF STATE]
proof (state)
this:
(case \<lfloor>Suc pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))

goal (35 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 35 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (35 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 35 subgoals...
[PROOF STEP]
case (CFG_Checkcast_Exceptional_handle C P C0 Main M pc pc' Cl ek)
[PROOF STATE]
proof (state)
this:
C \<noteq> ClassMain P
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Exceptional \<lfloor>pc'\<rfloor> Enter)
C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)
instrs_of (PROG P) C M ! pc = Checkcast Cl
ek = \<Up>\<lambda>s. s(Exception := None)(Stack (stkLength (P, C, M) pc' - 1) \<mapsto> Value (Addr (addr_of_sys_xcpt ClassCast)))
C \<noteq> ClassMain P
C \<noteq> ClassMain P

goal (35 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 35 subgoals...
[PROOF STEP]
hence "TYPING P C M ! pc \<noteq> None" and "pc < length (instrs_of (PROG P) C M)"
[PROOF STATE]
proof (prove)
using this:
C \<noteq> ClassMain P
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Exceptional \<lfloor>pc'\<rfloor> Enter)
C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)
instrs_of (PROG P) C M ! pc = Checkcast Cl
ek = \<Up>\<lambda>s. s(Exception := None)(Stack (stkLength (P, C, M) pc' - 1) \<mapsto> Value (Addr (addr_of_sys_xcpt ClassCast)))
C \<noteq> ClassMain P
C \<noteq> ClassMain P

goal (1 subgoal):
 1. TYPING P C M ! pc \<noteq> None &&& pc < length (instrs_of (PROG P) C M)
[PROOF STEP]
by simp_all
[PROOF STATE]
proof (state)
this:
TYPING P C M ! pc \<noteq> None
pc < length (instrs_of (PROG P) C M)

goal (35 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 35 subgoals...
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
TYPING P C M ! pc \<noteq> None
pc < length (instrs_of (PROG P) C M)

goal (35 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 35 subgoals...
[PROOF STEP]
from \<open>(P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Exceptional \<lfloor>pc'\<rfloor> Enter)\<close> \<open>C \<noteq> ClassMain P\<close>
[PROOF STATE]
proof (chain)
picking this:
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Exceptional \<lfloor>pc'\<rfloor> Enter)
C \<noteq> ClassMain P
[PROOF STEP]
obtain Ts T mxs mxl\<^sub>0 where
    "PROG P \<turnstile> C sees M:Ts\<rightarrow>T = (mxs, mxl\<^sub>0, instrs_of (PROG P) C M, ex_table_of (PROG P) C M) in C"
[PROOF STATE]
proof (prove)
using this:
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Exceptional \<lfloor>pc'\<rfloor> Enter)
C \<noteq> ClassMain P

goal (1 subgoal):
 1. (\<And>Ts T mxs mxl\<^sub>0. PROG P \<turnstile> C sees M: Ts\<rightarrow>T = (mxs, mxl\<^sub>0, instrs_of (PROG P) C M, ex_table_of (PROG P) C M) in C \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (fastforce dest: method_of_reachable_node_exists)
[PROOF STATE]
proof (state)
this:
PROG P \<turnstile> C sees M: Ts\<rightarrow>T = (mxs, mxl\<^sub>0, instrs_of (PROG P) C M, ex_table_of (PROG P) C M) in C

goal (35 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 35 subgoals...
[PROOF STEP]
with \<open>pc < length (instrs_of (PROG P) C M)\<close> \<open>instrs_of (PROG P) C M ! pc = Checkcast Cl\<close>
[PROOF STATE]
proof (chain)
picking this:
pc < length (instrs_of (PROG P) C M)
instrs_of (PROG P) C M ! pc = Checkcast Cl
PROG P \<turnstile> C sees M: Ts\<rightarrow>T = (mxs, mxl\<^sub>0, instrs_of (PROG P) C M, ex_table_of (PROG P) C M) in C
[PROOF STEP]
have "PROG P,T,mxs,length (instrs_of (PROG P) C M),ex_table_of (PROG P) C M
    \<turnstile> Checkcast Cl,pc :: TYPING P C M"
[PROOF STATE]
proof (prove)
using this:
pc < length (instrs_of (PROG P) C M)
instrs_of (PROG P) C M ! pc = Checkcast Cl
PROG P \<turnstile> C sees M: Ts\<rightarrow>T = (mxs, mxl\<^sub>0, instrs_of (PROG P) C M, ex_table_of (PROG P) C M) in C

goal (1 subgoal):
 1. PROG P,T,mxs,length (instrs_of (PROG P) C M),ex_table_of (PROG P) C M \<turnstile> Checkcast Cl,pc :: TYPING P C M
[PROOF STEP]
by (fastforce dest!: wt_jvm_prog_impl_wt_instr [OF wf_jvmprog_is_wf_typ])
[PROOF STATE]
proof (state)
this:
PROG P,T,mxs,length (instrs_of (PROG P) C M),ex_table_of (PROG P) C M \<turnstile> Checkcast Cl,pc :: TYPING P C M

goal (35 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 35 subgoals...
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
PROG P,T,mxs,length (instrs_of (PROG P) C M),ex_table_of (PROG P) C M \<turnstile> Checkcast Cl,pc :: TYPING P C M

goal (35 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 35 subgoals...
[PROOF STEP]
from \<open>(P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Exceptional \<lfloor>pc'\<rfloor> Enter)\<close> \<open>C \<noteq> ClassMain P\<close>
    \<open>instrs_of (PROG P) C M ! pc = Checkcast Cl\<close>
[PROOF STATE]
proof (chain)
picking this:
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Exceptional \<lfloor>pc'\<rfloor> Enter)
C \<noteq> ClassMain P
instrs_of (PROG P) C M ! pc = Checkcast Cl
[PROOF STEP]
obtain d'
    where "match_ex_table (PROG P) ClassCast pc (ex_table_of (PROG P) C M) = \<lfloor>(pc', d')\<rfloor>"
[PROOF STATE]
proof (prove)
using this:
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Exceptional \<lfloor>pc'\<rfloor> Enter)
C \<noteq> ClassMain P
instrs_of (PROG P) C M ! pc = Checkcast Cl

goal (1 subgoal):
 1. (\<And>d'. match_ex_table (PROG P) ClassCast pc (ex_table_of (PROG P) C M) = \<lfloor>(pc', d')\<rfloor> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by cases (fastforce elim: JVMCFG.cases)
[PROOF STATE]
proof (state)
this:
match_ex_table (PROG P) ClassCast pc (ex_table_of (PROG P) C M) = \<lfloor>(pc', d')\<rfloor>

goal (35 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 35 subgoals...
[PROOF STEP]
hence "\<exists>(f, t, D, h, d)\<in>set (ex_table_of (PROG P) C M).
    matches_ex_entry (PROG P) ClassCast pc (f, t, D, h, d) \<and> h = pc' \<and> d = d'"
[PROOF STATE]
proof (prove)
using this:
match_ex_table (PROG P) ClassCast pc (ex_table_of (PROG P) C M) = \<lfloor>(pc', d')\<rfloor>

goal (1 subgoal):
 1. \<exists>(f, t, D, h, d)\<in>set (ex_table_of (PROG P) C M). matches_ex_entry (PROG P) ClassCast pc (f, t, D, h, d) \<and> h = pc' \<and> d = d'
[PROOF STEP]
by -(drule match_ex_table_SomeD)
[PROOF STATE]
proof (state)
this:
\<exists>(f, t, D, h, d)\<in>set (ex_table_of (PROG P) C M). matches_ex_entry (PROG P) ClassCast pc (f, t, D, h, d) \<and> h = pc' \<and> d = d'

goal (35 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 35 subgoals...
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
TYPING P C M ! pc \<noteq> None
pc < length (instrs_of (PROG P) C M)
PROG P,T,mxs,length (instrs_of (PROG P) C M),ex_table_of (PROG P) C M \<turnstile> Checkcast Cl,pc :: TYPING P C M
\<exists>(f, t, D, h, d)\<in>set (ex_table_of (PROG P) C M). matches_ex_entry (PROG P) ClassCast pc (f, t, D, h, d) \<and> h = pc' \<and> d = d'
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
TYPING P C M ! pc \<noteq> None
pc < length (instrs_of (PROG P) C M)
PROG P,T,mxs,length (instrs_of (PROG P) C M),ex_table_of (PROG P) C M \<turnstile> Checkcast Cl,pc :: TYPING P C M
\<exists>(f, t, D, h, d)\<in>set (ex_table_of (PROG P) C M). matches_ex_entry (PROG P) ClassCast pc (f, t, D, h, d) \<and> h = pc' \<and> d = d'

goal (1 subgoal):
 1. (case \<lfloor>pc'\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
[PROOF STEP]
using \<open>instrs_of (PROG P) C M ! pc = Checkcast Cl\<close>
[PROOF STATE]
proof (prove)
using this:
TYPING P C M ! pc \<noteq> None
pc < length (instrs_of (PROG P) C M)
PROG P,T,mxs,length (instrs_of (PROG P) C M),ex_table_of (PROG P) C M \<turnstile> Checkcast Cl,pc :: TYPING P C M
\<exists>(f, t, D, h, d)\<in>set (ex_table_of (PROG P) C M). matches_ex_entry (PROG P) ClassCast pc (f, t, D, h, d) \<and> h = pc' \<and> d = d'
instrs_of (PROG P) C M ! pc = Checkcast Cl

goal (1 subgoal):
 1. (case \<lfloor>pc'\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
[PROOF STEP]
by (fastforce simp: relevant_entries_def is_relevant_entry_def matches_ex_entry_def)
[PROOF STATE]
proof (state)
this:
(case \<lfloor>pc'\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))

goal (34 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 34 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (34 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 34 subgoals...
[PROOF STEP]
case (CFG_Throw_handle C P C0 Main M pc pc' ek)
[PROOF STATE]
proof (state)
this:
C \<noteq> ClassMain P
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Exceptional \<lfloor>pc'\<rfloor> Enter)
C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)
pc' \<noteq> length (instrs_of (PROG P) C M)
instrs_of (PROG P) C M ! pc = Throw
ek = \<Up>\<lambda>s. s(Exception := None)(Stack (stkLength (P, C, M) pc' - 1) \<mapsto> Value (stkAt s (stkLength (P, C, M) pc - 1)))
C \<noteq> ClassMain P
C \<noteq> ClassMain P

goal (34 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 34 subgoals...
[PROOF STEP]
hence "TYPING P C M ! pc \<noteq> None" and "pc < length (instrs_of (PROG P) C M)"
[PROOF STATE]
proof (prove)
using this:
C \<noteq> ClassMain P
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Exceptional \<lfloor>pc'\<rfloor> Enter)
C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)
pc' \<noteq> length (instrs_of (PROG P) C M)
instrs_of (PROG P) C M ! pc = Throw
ek = \<Up>\<lambda>s. s(Exception := None)(Stack (stkLength (P, C, M) pc' - 1) \<mapsto> Value (stkAt s (stkLength (P, C, M) pc - 1)))
C \<noteq> ClassMain P
C \<noteq> ClassMain P

goal (1 subgoal):
 1. TYPING P C M ! pc \<noteq> None &&& pc < length (instrs_of (PROG P) C M)
[PROOF STEP]
by simp_all
[PROOF STATE]
proof (state)
this:
TYPING P C M ! pc \<noteq> None
pc < length (instrs_of (PROG P) C M)

goal (34 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 34 subgoals...
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
TYPING P C M ! pc \<noteq> None
pc < length (instrs_of (PROG P) C M)

goal (34 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 34 subgoals...
[PROOF STEP]
from \<open>(P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Exceptional \<lfloor>pc'\<rfloor> Enter)\<close> \<open>C \<noteq> ClassMain P\<close>
[PROOF STATE]
proof (chain)
picking this:
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Exceptional \<lfloor>pc'\<rfloor> Enter)
C \<noteq> ClassMain P
[PROOF STEP]
obtain Ts T mxs mxl\<^sub>0 where
    "PROG P \<turnstile> C sees M:Ts\<rightarrow>T = (mxs, mxl\<^sub>0, instrs_of (PROG P) C M, ex_table_of (PROG P) C M) in C"
[PROOF STATE]
proof (prove)
using this:
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Exceptional \<lfloor>pc'\<rfloor> Enter)
C \<noteq> ClassMain P

goal (1 subgoal):
 1. (\<And>Ts T mxs mxl\<^sub>0. PROG P \<turnstile> C sees M: Ts\<rightarrow>T = (mxs, mxl\<^sub>0, instrs_of (PROG P) C M, ex_table_of (PROG P) C M) in C \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (fastforce dest: method_of_reachable_node_exists)
[PROOF STATE]
proof (state)
this:
PROG P \<turnstile> C sees M: Ts\<rightarrow>T = (mxs, mxl\<^sub>0, instrs_of (PROG P) C M, ex_table_of (PROG P) C M) in C

goal (34 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 34 subgoals...
[PROOF STEP]
with \<open>pc < length (instrs_of (PROG P) C M)\<close> \<open>instrs_of (PROG P) C M ! pc = Throw\<close>
[PROOF STATE]
proof (chain)
picking this:
pc < length (instrs_of (PROG P) C M)
instrs_of (PROG P) C M ! pc = Throw
PROG P \<turnstile> C sees M: Ts\<rightarrow>T = (mxs, mxl\<^sub>0, instrs_of (PROG P) C M, ex_table_of (PROG P) C M) in C
[PROOF STEP]
have "PROG P,T,mxs,length (instrs_of (PROG P) C M),ex_table_of (PROG P) C M
    \<turnstile> Throw,pc :: TYPING P C M"
[PROOF STATE]
proof (prove)
using this:
pc < length (instrs_of (PROG P) C M)
instrs_of (PROG P) C M ! pc = Throw
PROG P \<turnstile> C sees M: Ts\<rightarrow>T = (mxs, mxl\<^sub>0, instrs_of (PROG P) C M, ex_table_of (PROG P) C M) in C

goal (1 subgoal):
 1. PROG P,T,mxs,length (instrs_of (PROG P) C M),ex_table_of (PROG P) C M \<turnstile> Throw,pc :: TYPING P C M
[PROOF STEP]
by (fastforce dest!: wt_jvm_prog_impl_wt_instr [OF wf_jvmprog_is_wf_typ])
[PROOF STATE]
proof (state)
this:
PROG P,T,mxs,length (instrs_of (PROG P) C M),ex_table_of (PROG P) C M \<turnstile> Throw,pc :: TYPING P C M

goal (34 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 34 subgoals...
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
PROG P,T,mxs,length (instrs_of (PROG P) C M),ex_table_of (PROG P) C M \<turnstile> Throw,pc :: TYPING P C M

goal (34 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 34 subgoals...
[PROOF STEP]
from \<open>(P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Exceptional \<lfloor>pc'\<rfloor> Enter)\<close> \<open>C \<noteq> ClassMain P\<close>
    \<open>instrs_of (PROG P) C M ! pc = Throw\<close>
[PROOF STATE]
proof (chain)
picking this:
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Exceptional \<lfloor>pc'\<rfloor> Enter)
C \<noteq> ClassMain P
instrs_of (PROG P) C M ! pc = Throw
[PROOF STEP]
obtain d' Exc
    where "match_ex_table (PROG P) Exc pc (ex_table_of (PROG P) C M) = \<lfloor>(pc', d')\<rfloor>"
[PROOF STATE]
proof (prove)
using this:
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Exceptional \<lfloor>pc'\<rfloor> Enter)
C \<noteq> ClassMain P
instrs_of (PROG P) C M ! pc = Throw

goal (1 subgoal):
 1. (\<And>Exc d'. match_ex_table (PROG P) Exc pc (ex_table_of (PROG P) C M) = \<lfloor>(pc', d')\<rfloor> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by cases (fastforce elim: JVMCFG.cases)
[PROOF STATE]
proof (state)
this:
match_ex_table (PROG P) Exc pc (ex_table_of (PROG P) C M) = \<lfloor>(pc', d')\<rfloor>

goal (34 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 34 subgoals...
[PROOF STEP]
hence "\<exists>(f, t, D, h, d)\<in>set (ex_table_of (PROG P) C M).
    matches_ex_entry (PROG P) Exc pc (f, t, D, h, d) \<and> h = pc' \<and> d = d'"
[PROOF STATE]
proof (prove)
using this:
match_ex_table (PROG P) Exc pc (ex_table_of (PROG P) C M) = \<lfloor>(pc', d')\<rfloor>

goal (1 subgoal):
 1. \<exists>(f, t, D, h, d)\<in>set (ex_table_of (PROG P) C M). matches_ex_entry (PROG P) Exc pc (f, t, D, h, d) \<and> h = pc' \<and> d = d'
[PROOF STEP]
by -(drule match_ex_table_SomeD)
[PROOF STATE]
proof (state)
this:
\<exists>(f, t, D, h, d)\<in>set (ex_table_of (PROG P) C M). matches_ex_entry (PROG P) Exc pc (f, t, D, h, d) \<and> h = pc' \<and> d = d'

goal (34 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 34 subgoals...
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
TYPING P C M ! pc \<noteq> None
pc < length (instrs_of (PROG P) C M)
PROG P,T,mxs,length (instrs_of (PROG P) C M),ex_table_of (PROG P) C M \<turnstile> Throw,pc :: TYPING P C M
\<exists>(f, t, D, h, d)\<in>set (ex_table_of (PROG P) C M). matches_ex_entry (PROG P) Exc pc (f, t, D, h, d) \<and> h = pc' \<and> d = d'
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
TYPING P C M ! pc \<noteq> None
pc < length (instrs_of (PROG P) C M)
PROG P,T,mxs,length (instrs_of (PROG P) C M),ex_table_of (PROG P) C M \<turnstile> Throw,pc :: TYPING P C M
\<exists>(f, t, D, h, d)\<in>set (ex_table_of (PROG P) C M). matches_ex_entry (PROG P) Exc pc (f, t, D, h, d) \<and> h = pc' \<and> d = d'

goal (1 subgoal):
 1. (case \<lfloor>pc'\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
[PROOF STEP]
using \<open>instrs_of (PROG P) C M ! pc = Throw\<close>
[PROOF STATE]
proof (prove)
using this:
TYPING P C M ! pc \<noteq> None
pc < length (instrs_of (PROG P) C M)
PROG P,T,mxs,length (instrs_of (PROG P) C M),ex_table_of (PROG P) C M \<turnstile> Throw,pc :: TYPING P C M
\<exists>(f, t, D, h, d)\<in>set (ex_table_of (PROG P) C M). matches_ex_entry (PROG P) Exc pc (f, t, D, h, d) \<and> h = pc' \<and> d = d'
instrs_of (PROG P) C M ! pc = Throw

goal (1 subgoal):
 1. (case \<lfloor>pc'\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
[PROOF STEP]
by (fastforce simp: relevant_entries_def is_relevant_entry_def matches_ex_entry_def)
[PROOF STATE]
proof (state)
this:
(case \<lfloor>pc'\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))

goal (33 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 33 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (33 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 33 subgoals...
[PROOF STEP]
case (CFG_Invoke_NP_handle C P C0 Main M pc pc' M' n ek)
[PROOF STATE]
proof (state)
this:
C \<noteq> ClassMain P
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Exceptional \<lfloor>pc'\<rfloor> Enter)
C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)
instrs_of (PROG P) C M ! pc = Invoke M' n
ek = \<Up>\<lambda>s. s(Exception := None)(Stack (stkLength (P, C, M) pc' - 1) \<mapsto> Value (Addr (addr_of_sys_xcpt NullPointer)))
C \<noteq> ClassMain P
C \<noteq> ClassMain P

goal (33 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 33 subgoals...
[PROOF STEP]
hence "TYPING P C M ! pc \<noteq> None" and "pc < length (instrs_of (PROG P) C M)"
[PROOF STATE]
proof (prove)
using this:
C \<noteq> ClassMain P
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Exceptional \<lfloor>pc'\<rfloor> Enter)
C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)
instrs_of (PROG P) C M ! pc = Invoke M' n
ek = \<Up>\<lambda>s. s(Exception := None)(Stack (stkLength (P, C, M) pc' - 1) \<mapsto> Value (Addr (addr_of_sys_xcpt NullPointer)))
C \<noteq> ClassMain P
C \<noteq> ClassMain P

goal (1 subgoal):
 1. TYPING P C M ! pc \<noteq> None &&& pc < length (instrs_of (PROG P) C M)
[PROOF STEP]
by simp_all
[PROOF STATE]
proof (state)
this:
TYPING P C M ! pc \<noteq> None
pc < length (instrs_of (PROG P) C M)

goal (33 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 33 subgoals...
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
TYPING P C M ! pc \<noteq> None
pc < length (instrs_of (PROG P) C M)

goal (33 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 33 subgoals...
[PROOF STEP]
from \<open>(P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Exceptional \<lfloor>pc'\<rfloor> Enter)\<close> \<open>C \<noteq> ClassMain P\<close>
[PROOF STATE]
proof (chain)
picking this:
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Exceptional \<lfloor>pc'\<rfloor> Enter)
C \<noteq> ClassMain P
[PROOF STEP]
obtain Ts T mxs mxl\<^sub>0 where
    "PROG P \<turnstile> C sees M:Ts\<rightarrow>T = (mxs, mxl\<^sub>0, instrs_of (PROG P) C M, ex_table_of (PROG P) C M) in C"
[PROOF STATE]
proof (prove)
using this:
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Exceptional \<lfloor>pc'\<rfloor> Enter)
C \<noteq> ClassMain P

goal (1 subgoal):
 1. (\<And>Ts T mxs mxl\<^sub>0. PROG P \<turnstile> C sees M: Ts\<rightarrow>T = (mxs, mxl\<^sub>0, instrs_of (PROG P) C M, ex_table_of (PROG P) C M) in C \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (fastforce dest: method_of_reachable_node_exists)
[PROOF STATE]
proof (state)
this:
PROG P \<turnstile> C sees M: Ts\<rightarrow>T = (mxs, mxl\<^sub>0, instrs_of (PROG P) C M, ex_table_of (PROG P) C M) in C

goal (33 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 33 subgoals...
[PROOF STEP]
with \<open>pc < length (instrs_of (PROG P) C M)\<close> \<open>instrs_of (PROG P) C M ! pc = Invoke M' n\<close>
[PROOF STATE]
proof (chain)
picking this:
pc < length (instrs_of (PROG P) C M)
instrs_of (PROG P) C M ! pc = Invoke M' n
PROG P \<turnstile> C sees M: Ts\<rightarrow>T = (mxs, mxl\<^sub>0, instrs_of (PROG P) C M, ex_table_of (PROG P) C M) in C
[PROOF STEP]
have "PROG P,T,mxs,length (instrs_of (PROG P) C M),ex_table_of (PROG P) C M
    \<turnstile> Invoke M' n,pc :: TYPING P C M"
[PROOF STATE]
proof (prove)
using this:
pc < length (instrs_of (PROG P) C M)
instrs_of (PROG P) C M ! pc = Invoke M' n
PROG P \<turnstile> C sees M: Ts\<rightarrow>T = (mxs, mxl\<^sub>0, instrs_of (PROG P) C M, ex_table_of (PROG P) C M) in C

goal (1 subgoal):
 1. PROG P,T,mxs,length (instrs_of (PROG P) C M),ex_table_of (PROG P) C M \<turnstile> Invoke M' n,pc :: TYPING P C M
[PROOF STEP]
by (fastforce dest!: wt_jvm_prog_impl_wt_instr [OF wf_jvmprog_is_wf_typ])
[PROOF STATE]
proof (state)
this:
PROG P,T,mxs,length (instrs_of (PROG P) C M),ex_table_of (PROG P) C M \<turnstile> Invoke M' n,pc :: TYPING P C M

goal (33 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 33 subgoals...
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
PROG P,T,mxs,length (instrs_of (PROG P) C M),ex_table_of (PROG P) C M \<turnstile> Invoke M' n,pc :: TYPING P C M

goal (33 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 33 subgoals...
[PROOF STEP]
from \<open>(P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Exceptional \<lfloor>pc'\<rfloor> Enter)\<close> \<open>C \<noteq> ClassMain P\<close>
    \<open>instrs_of (PROG P) C M ! pc = Invoke M' n\<close>
[PROOF STATE]
proof (chain)
picking this:
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Exceptional \<lfloor>pc'\<rfloor> Enter)
C \<noteq> ClassMain P
instrs_of (PROG P) C M ! pc = Invoke M' n
[PROOF STEP]
obtain d'
    where "match_ex_table (PROG P) NullPointer pc (ex_table_of (PROG P) C M) = \<lfloor>(pc', d')\<rfloor>"
[PROOF STATE]
proof (prove)
using this:
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Exceptional \<lfloor>pc'\<rfloor> Enter)
C \<noteq> ClassMain P
instrs_of (PROG P) C M ! pc = Invoke M' n

goal (1 subgoal):
 1. (\<And>d'. match_ex_table (PROG P) NullPointer pc (ex_table_of (PROG P) C M) = \<lfloor>(pc', d')\<rfloor> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by cases (fastforce elim: JVMCFG.cases)
[PROOF STATE]
proof (state)
this:
match_ex_table (PROG P) NullPointer pc (ex_table_of (PROG P) C M) = \<lfloor>(pc', d')\<rfloor>

goal (33 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 33 subgoals...
[PROOF STEP]
hence "\<exists>(f, t, D, h, d)\<in>set (ex_table_of (PROG P) C M).
    matches_ex_entry (PROG P) NullPointer pc (f, t, D, h, d) \<and> h = pc' \<and> d = d'"
[PROOF STATE]
proof (prove)
using this:
match_ex_table (PROG P) NullPointer pc (ex_table_of (PROG P) C M) = \<lfloor>(pc', d')\<rfloor>

goal (1 subgoal):
 1. \<exists>(f, t, D, h, d)\<in>set (ex_table_of (PROG P) C M). matches_ex_entry (PROG P) NullPointer pc (f, t, D, h, d) \<and> h = pc' \<and> d = d'
[PROOF STEP]
by -(drule match_ex_table_SomeD)
[PROOF STATE]
proof (state)
this:
\<exists>(f, t, D, h, d)\<in>set (ex_table_of (PROG P) C M). matches_ex_entry (PROG P) NullPointer pc (f, t, D, h, d) \<and> h = pc' \<and> d = d'

goal (33 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 33 subgoals...
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
TYPING P C M ! pc \<noteq> None
pc < length (instrs_of (PROG P) C M)
PROG P,T,mxs,length (instrs_of (PROG P) C M),ex_table_of (PROG P) C M \<turnstile> Invoke M' n,pc :: TYPING P C M
\<exists>(f, t, D, h, d)\<in>set (ex_table_of (PROG P) C M). matches_ex_entry (PROG P) NullPointer pc (f, t, D, h, d) \<and> h = pc' \<and> d = d'
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
TYPING P C M ! pc \<noteq> None
pc < length (instrs_of (PROG P) C M)
PROG P,T,mxs,length (instrs_of (PROG P) C M),ex_table_of (PROG P) C M \<turnstile> Invoke M' n,pc :: TYPING P C M
\<exists>(f, t, D, h, d)\<in>set (ex_table_of (PROG P) C M). matches_ex_entry (PROG P) NullPointer pc (f, t, D, h, d) \<and> h = pc' \<and> d = d'

goal (1 subgoal):
 1. (case \<lfloor>pc'\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
[PROOF STEP]
using \<open>instrs_of (PROG P) C M ! pc = Invoke M' n\<close>
[PROOF STATE]
proof (prove)
using this:
TYPING P C M ! pc \<noteq> None
pc < length (instrs_of (PROG P) C M)
PROG P,T,mxs,length (instrs_of (PROG P) C M),ex_table_of (PROG P) C M \<turnstile> Invoke M' n,pc :: TYPING P C M
\<exists>(f, t, D, h, d)\<in>set (ex_table_of (PROG P) C M). matches_ex_entry (PROG P) NullPointer pc (f, t, D, h, d) \<and> h = pc' \<and> d = d'
instrs_of (PROG P) C M ! pc = Invoke M' n

goal (1 subgoal):
 1. (case \<lfloor>pc'\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
[PROOF STEP]
by (fastforce simp: relevant_entries_def is_relevant_entry_def matches_ex_entry_def)
[PROOF STATE]
proof (state)
this:
(case \<lfloor>pc'\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))

goal (32 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 32 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (32 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 32 subgoals...
[PROOF STEP]
case (CFG_Invoke_Return_Exceptional_handle C P C0 Main M pc pc' M' n ek)
[PROOF STATE]
proof (state)
this:
C \<noteq> ClassMain P
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Exceptional \<lfloor>pc'\<rfloor> nodeType.Return)
C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)
instrs_of (PROG P) C M ! pc = Invoke M' n
ek = \<Up>\<lambda>s. s(Exception := None, Stack (stkLength (P, C, M) pc' - 1) := s Exception)
C \<noteq> ClassMain P
C \<noteq> ClassMain P

goal (32 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 32 subgoals...
[PROOF STEP]
hence "TYPING P C M ! pc \<noteq> None" and "pc < length (instrs_of (PROG P) C M)"
[PROOF STATE]
proof (prove)
using this:
C \<noteq> ClassMain P
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Exceptional \<lfloor>pc'\<rfloor> nodeType.Return)
C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)
instrs_of (PROG P) C M ! pc = Invoke M' n
ek = \<Up>\<lambda>s. s(Exception := None, Stack (stkLength (P, C, M) pc' - 1) := s Exception)
C \<noteq> ClassMain P
C \<noteq> ClassMain P

goal (1 subgoal):
 1. TYPING P C M ! pc \<noteq> None &&& pc < length (instrs_of (PROG P) C M)
[PROOF STEP]
by simp_all
[PROOF STATE]
proof (state)
this:
TYPING P C M ! pc \<noteq> None
pc < length (instrs_of (PROG P) C M)

goal (32 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 32 subgoals...
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
TYPING P C M ! pc \<noteq> None
pc < length (instrs_of (PROG P) C M)

goal (32 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 32 subgoals...
[PROOF STEP]
from \<open>(P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Exceptional \<lfloor>pc'\<rfloor> Return)\<close> \<open>C \<noteq> ClassMain P\<close>
[PROOF STATE]
proof (chain)
picking this:
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Exceptional \<lfloor>pc'\<rfloor> nodeType.Return)
C \<noteq> ClassMain P
[PROOF STEP]
obtain Ts T mxs mxl\<^sub>0 where
    "PROG P \<turnstile> C sees M:Ts\<rightarrow>T = (mxs, mxl\<^sub>0, instrs_of (PROG P) C M, ex_table_of (PROG P) C M) in C"
[PROOF STATE]
proof (prove)
using this:
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Exceptional \<lfloor>pc'\<rfloor> nodeType.Return)
C \<noteq> ClassMain P

goal (1 subgoal):
 1. (\<And>Ts T mxs mxl\<^sub>0. PROG P \<turnstile> C sees M: Ts\<rightarrow>T = (mxs, mxl\<^sub>0, instrs_of (PROG P) C M, ex_table_of (PROG P) C M) in C \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (fastforce dest: method_of_reachable_node_exists)
[PROOF STATE]
proof (state)
this:
PROG P \<turnstile> C sees M: Ts\<rightarrow>T = (mxs, mxl\<^sub>0, instrs_of (PROG P) C M, ex_table_of (PROG P) C M) in C

goal (32 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 32 subgoals...
[PROOF STEP]
with \<open>pc < length (instrs_of (PROG P) C M)\<close> \<open>instrs_of (PROG P) C M ! pc = Invoke M' n\<close>
[PROOF STATE]
proof (chain)
picking this:
pc < length (instrs_of (PROG P) C M)
instrs_of (PROG P) C M ! pc = Invoke M' n
PROG P \<turnstile> C sees M: Ts\<rightarrow>T = (mxs, mxl\<^sub>0, instrs_of (PROG P) C M, ex_table_of (PROG P) C M) in C
[PROOF STEP]
have "PROG P,T,mxs,length (instrs_of (PROG P) C M),ex_table_of (PROG P) C M
    \<turnstile> Invoke M' n,pc :: TYPING P C M"
[PROOF STATE]
proof (prove)
using this:
pc < length (instrs_of (PROG P) C M)
instrs_of (PROG P) C M ! pc = Invoke M' n
PROG P \<turnstile> C sees M: Ts\<rightarrow>T = (mxs, mxl\<^sub>0, instrs_of (PROG P) C M, ex_table_of (PROG P) C M) in C

goal (1 subgoal):
 1. PROG P,T,mxs,length (instrs_of (PROG P) C M),ex_table_of (PROG P) C M \<turnstile> Invoke M' n,pc :: TYPING P C M
[PROOF STEP]
by (fastforce dest!: wt_jvm_prog_impl_wt_instr [OF wf_jvmprog_is_wf_typ])
[PROOF STATE]
proof (state)
this:
PROG P,T,mxs,length (instrs_of (PROG P) C M),ex_table_of (PROG P) C M \<turnstile> Invoke M' n,pc :: TYPING P C M

goal (32 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 32 subgoals...
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
PROG P,T,mxs,length (instrs_of (PROG P) C M),ex_table_of (PROG P) C M \<turnstile> Invoke M' n,pc :: TYPING P C M

goal (32 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 32 subgoals...
[PROOF STEP]
from \<open>(P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Exceptional \<lfloor>pc'\<rfloor> Return)\<close> \<open>C \<noteq> ClassMain P\<close>
    \<open>instrs_of (PROG P) C M ! pc = Invoke M' n\<close>
[PROOF STATE]
proof (chain)
picking this:
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Exceptional \<lfloor>pc'\<rfloor> nodeType.Return)
C \<noteq> ClassMain P
instrs_of (PROG P) C M ! pc = Invoke M' n
[PROOF STEP]
obtain d' Exc
    where "match_ex_table (PROG P) Exc pc (ex_table_of (PROG P) C M) = \<lfloor>(pc', d')\<rfloor>"
[PROOF STATE]
proof (prove)
using this:
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Exceptional \<lfloor>pc'\<rfloor> nodeType.Return)
C \<noteq> ClassMain P
instrs_of (PROG P) C M ! pc = Invoke M' n

goal (1 subgoal):
 1. (\<And>Exc d'. match_ex_table (PROG P) Exc pc (ex_table_of (PROG P) C M) = \<lfloor>(pc', d')\<rfloor> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by cases (fastforce elim: JVMCFG.cases)
[PROOF STATE]
proof (state)
this:
match_ex_table (PROG P) Exc pc (ex_table_of (PROG P) C M) = \<lfloor>(pc', d')\<rfloor>

goal (32 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 32 subgoals...
[PROOF STEP]
hence "\<exists>(f, t, D, h, d)\<in>set (ex_table_of (PROG P) C M).
    matches_ex_entry (PROG P) Exc pc (f, t, D, h, d) \<and> h = pc' \<and> d = d'"
[PROOF STATE]
proof (prove)
using this:
match_ex_table (PROG P) Exc pc (ex_table_of (PROG P) C M) = \<lfloor>(pc', d')\<rfloor>

goal (1 subgoal):
 1. \<exists>(f, t, D, h, d)\<in>set (ex_table_of (PROG P) C M). matches_ex_entry (PROG P) Exc pc (f, t, D, h, d) \<and> h = pc' \<and> d = d'
[PROOF STEP]
by -(drule match_ex_table_SomeD)
[PROOF STATE]
proof (state)
this:
\<exists>(f, t, D, h, d)\<in>set (ex_table_of (PROG P) C M). matches_ex_entry (PROG P) Exc pc (f, t, D, h, d) \<and> h = pc' \<and> d = d'

goal (32 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 32 subgoals...
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
TYPING P C M ! pc \<noteq> None
pc < length (instrs_of (PROG P) C M)
PROG P,T,mxs,length (instrs_of (PROG P) C M),ex_table_of (PROG P) C M \<turnstile> Invoke M' n,pc :: TYPING P C M
\<exists>(f, t, D, h, d)\<in>set (ex_table_of (PROG P) C M). matches_ex_entry (PROG P) Exc pc (f, t, D, h, d) \<and> h = pc' \<and> d = d'
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
TYPING P C M ! pc \<noteq> None
pc < length (instrs_of (PROG P) C M)
PROG P,T,mxs,length (instrs_of (PROG P) C M),ex_table_of (PROG P) C M \<turnstile> Invoke M' n,pc :: TYPING P C M
\<exists>(f, t, D, h, d)\<in>set (ex_table_of (PROG P) C M). matches_ex_entry (PROG P) Exc pc (f, t, D, h, d) \<and> h = pc' \<and> d = d'

goal (1 subgoal):
 1. (case \<lfloor>pc'\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
[PROOF STEP]
using \<open>instrs_of (PROG P) C M ! pc = Invoke M' n\<close>
[PROOF STATE]
proof (prove)
using this:
TYPING P C M ! pc \<noteq> None
pc < length (instrs_of (PROG P) C M)
PROG P,T,mxs,length (instrs_of (PROG P) C M),ex_table_of (PROG P) C M \<turnstile> Invoke M' n,pc :: TYPING P C M
\<exists>(f, t, D, h, d)\<in>set (ex_table_of (PROG P) C M). matches_ex_entry (PROG P) Exc pc (f, t, D, h, d) \<and> h = pc' \<and> d = d'
instrs_of (PROG P) C M ! pc = Invoke M' n

goal (1 subgoal):
 1. (case \<lfloor>pc'\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
[PROOF STEP]
by (fastforce simp: relevant_entries_def is_relevant_entry_def matches_ex_entry_def)
[PROOF STATE]
proof (state)
this:
(case \<lfloor>pc'\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))

goal (31 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 31 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (31 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 31 subgoals...
[PROOF STEP]
case (CFG_Invoke_Return_Check_Normal C P C0 Main M pc M' n ST LT ek)
[PROOF STATE]
proof (state)
this:
C \<noteq> ClassMain P
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, nodeType.Return)
C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)
instrs_of (PROG P) C M ! pc = Invoke M' n
TYPING P C M ! pc = \<lfloor>(ST, LT)\<rfloor>
ST ! n \<noteq> NT
ek = (\<lambda>s. s Exception = None)\<^sub>\<surd>
C \<noteq> ClassMain P
C \<noteq> ClassMain P

goal (31 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 31 subgoals...
[PROOF STEP]
from \<open>(P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Return)\<close> \<open>C \<noteq> ClassMain P\<close>
[PROOF STATE]
proof (chain)
picking this:
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, nodeType.Return)
C \<noteq> ClassMain P
[PROOF STEP]
obtain Ts T mxs mxl\<^sub>0 "is" xt where "PROG P \<turnstile> C sees M:Ts\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in C"
    and "instrs_of (PROG P) C M = is"
[PROOF STATE]
proof (prove)
using this:
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, nodeType.Return)
C \<noteq> ClassMain P

goal (1 subgoal):
 1. (\<And>Ts T mxs mxl\<^sub>0 is xt. \<lbrakk>PROG P \<turnstile> C sees M: Ts\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in C; instrs_of (PROG P) C M = is\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by -(drule method_of_reachable_node_exists, auto)
[PROOF STATE]
proof (state)
this:
PROG P \<turnstile> C sees M: Ts\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in C
instrs_of (PROG P) C M = is

goal (31 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 31 subgoals...
[PROOF STEP]
with CFG_Invoke_Return_Check_Normal
[PROOF STATE]
proof (chain)
picking this:
C \<noteq> ClassMain P
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, nodeType.Return)
C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)
instrs_of (PROG P) C M ! pc = Invoke M' n
TYPING P C M ! pc = \<lfloor>(ST, LT)\<rfloor>
ST ! n \<noteq> NT
ek = (\<lambda>s. s Exception = None)\<^sub>\<surd>
C \<noteq> ClassMain P
C \<noteq> ClassMain P
PROG P \<turnstile> C sees M: Ts\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in C
instrs_of (PROG P) C M = is
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
C \<noteq> ClassMain P
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, nodeType.Return)
C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)
instrs_of (PROG P) C M ! pc = Invoke M' n
TYPING P C M ! pc = \<lfloor>(ST, LT)\<rfloor>
ST ! n \<noteq> NT
ek = (\<lambda>s. s Exception = None)\<^sub>\<surd>
C \<noteq> ClassMain P
C \<noteq> ClassMain P
PROG P \<turnstile> C sees M: Ts\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in C
instrs_of (PROG P) C M = is

goal (1 subgoal):
 1. (case \<lfloor>Suc pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
[PROOF STEP]
by (fastforce dest!: wt_jvm_prog_impl_wt_instr [OF wf_jvmprog_is_wf_typ])
[PROOF STATE]
proof (state)
this:
(case \<lfloor>Suc pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))

goal (30 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 30 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (30 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 30 subgoals...
[PROOF STEP]
case (Method_LTrue P C0 Main C M)
[PROOF STATE]
proof (state)
this:
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter)
C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)
C \<noteq> ClassMain P
C \<noteq> ClassMain P

goal (30 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 30 subgoals...
[PROOF STEP]
from \<open>(P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter)\<close> \<open>C \<noteq> ClassMain P\<close>
[PROOF STATE]
proof (chain)
picking this:
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter)
C \<noteq> ClassMain P
[PROOF STEP]
obtain Ts T mxs mxl\<^sub>0 "is" xt where "PROG P \<turnstile> C sees M:Ts\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in C"
    and "instrs_of (PROG P) C M = is"
[PROOF STATE]
proof (prove)
using this:
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter)
C \<noteq> ClassMain P

goal (1 subgoal):
 1. (\<And>Ts T mxs mxl\<^sub>0 is xt. \<lbrakk>PROG P \<turnstile> C sees M: Ts\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in C; instrs_of (PROG P) C M = is\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by -(drule method_of_reachable_node_exists, auto)
[PROOF STATE]
proof (state)
this:
PROG P \<turnstile> C sees M: Ts\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in C
instrs_of (PROG P) C M = is

goal (30 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 30 subgoals...
[PROOF STEP]
with Method_LTrue
[PROOF STATE]
proof (chain)
picking this:
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter)
C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)
C \<noteq> ClassMain P
C \<noteq> ClassMain P
PROG P \<turnstile> C sees M: Ts\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in C
instrs_of (PROG P) C M = is
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter)
C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)
C \<noteq> ClassMain P
C \<noteq> ClassMain P
PROG P \<turnstile> C sees M: Ts\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in C
instrs_of (PROG P) C M = is

goal (1 subgoal):
 1. (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
[PROOF STEP]
by (fastforce dest!: wt_jvm_prog_impl_wt_start [OF wf_jvmprog_is_wf_typ] simp: wt_start_def)
[PROOF STATE]
proof (state)
this:
(case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))

goal (29 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Exceptional None Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = \<Up>\<lambda>s. s(Exception \<mapsto> Value (Addr (addr_of_sys_xcpt OutOfMemory))); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 29 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (29 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Exceptional None Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = \<Up>\<lambda>s. s(Exception \<mapsto> Value (Addr (addr_of_sys_xcpt OutOfMemory))); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 29 subgoals...
[PROOF STEP]
case (reachable_step P C0 Main C M opc nt ek C' M' opc' nt')
[PROOF STATE]
proof (state)
this:
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, opc, nt)
C \<noteq> ClassMain P \<Longrightarrow> case opc of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)
 (P, C0, Main) \<turnstile> (C, M, opc, nt) -ek\<rightarrow> (C', M', opc', nt')
\<lbrakk>C' \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case opc' of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C' M' ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C' M')) \<and> (case opc of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
C' \<noteq> ClassMain P

goal (29 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>a aa b ab ac ad ba e ae af ag bb. \<lbrakk> (a, aa, b) \<turnstile> \<Rightarrow>(ab, ac, ad, ba); ab \<noteq> ClassMain a \<Longrightarrow> case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac);  (a, aa, b) \<turnstile> (ab, ac, ad, ba) -e\<rightarrow> (ae, af, ag, bb); \<lbrakk>ae \<noteq> ClassMain a; ab \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> (case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)) \<and> (case ad of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ab ac ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ab ac)); ae \<noteq> ClassMain a\<rbrakk> \<Longrightarrow> case ag of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING a ae af ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG a) ae af)
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 7. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Exceptional None Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = \<Up>\<lambda>s. s(Exception \<mapsto> Value (Addr (addr_of_sys_xcpt OutOfMemory))); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 29 subgoals...
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
using this:
 (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, opc, nt)
C \<noteq> ClassMain P \<Longrightarrow> case opc of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)
 (P, C0, Main) \<turnstile> (C, M, opc, nt) -ek\<rightarrow> (C', M', opc', nt')
\<lbrakk>C' \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case opc' of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C' M' ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C' M')) \<and> (case opc of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
C' \<noteq> ClassMain P

goal (1 subgoal):
 1. case opc' of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C' M' ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C' M')
[PROOF STEP]
by (cases "C = ClassMain P") (fastforce elim: JVMCFG.cases, simp)
[PROOF STATE]
proof (state)
this:
case opc' of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C' M' ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C' M')

goal (28 subgoals):
 1. \<And>P C0 Main. ClassMain P \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))
 2. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Enter); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 3. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 4. \<And>P C0 Main T mxs mxl\<^sub>0 is xt D initParams ek. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, Normal); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); PROG P \<turnstile> C0 sees Main: []\<rightarrow>T = (mxs, mxl\<^sub>0, is, xt) in D; initParams = [\<lambda>s. s Heap, \<lambda>s. \<lfloor>Value Null\<rfloor>]; ek = \<lambda>(s, ret). True:(ClassMain P, MethodMain P, 0)\<hookrightarrow>\<^bsub>(D, Main)\<^esub>initParams; D \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P D Main ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) D Main)) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 5. \<And>P C0 Main. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(ClassMain P, MethodMain P, \<lfloor>0\<rfloor>, nodeType.Return); ClassMain P \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)); ClassMain P \<noteq> ClassMain P; ClassMain P \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P))) \<and> (case \<lfloor>0\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P (ClassMain P) (MethodMain P) ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) (ClassMain P) (MethodMain P)))
 6. \<And>P C0 Main C M. \<lbrakk> (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, None, Enter); C \<noteq> ClassMain P \<Longrightarrow> case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 7. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = (\<lambda>s. new_Addr (heap_of s) \<noteq> None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 8. \<And>C P C0 Main M pc Cl pc' ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; pc' = (case match_ex_table (PROG P) OutOfMemory pc (ex_table_of (PROG P) C M) of None \<Rightarrow> None | \<lfloor>(pc'', d)\<rfloor> \<Rightarrow> \<lfloor>pc''\<rfloor>); ek = (\<lambda>s. new_Addr (heap_of s) = None)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 9. \<And>C P C0 Main M pc Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Exceptional None Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = New Cl; ek = \<Up>\<lambda>s. s(Exception \<mapsto> Value (Addr (addr_of_sys_xcpt OutOfMemory))); C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case None of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
 10. \<And>C P C0 Main M pc F Cl ek. \<lbrakk>C \<noteq> ClassMain P;  (P, C0, Main) \<turnstile> \<Rightarrow>(C, M, \<lfloor>pc\<rfloor>, Enter); C \<noteq> ClassMain P \<Longrightarrow> case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M); instrs_of (PROG P) C M ! pc = Getfield F Cl; ek = (\<lambda>s. stkAt s (stkLength (P, C, M) pc - 1) \<noteq> Null)\<^sub>\<surd>; C \<noteq> ClassMain P; C \<noteq> ClassMain P\<rbrakk> \<Longrightarrow> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M)) \<and> (case \<lfloor>pc\<rfloor> of None \<Rightarrow> True | \<lfloor>pc''\<rfloor> \<Rightarrow> TYPING P C M ! pc'' \<noteq> None \<and> pc'' < length (instrs_of (PROG P) C M))
A total of 28 subgoals...
[PROOF STEP]
qed simp_all