theory structures_proofs

lemma (in kernel_all_substitute) seL4_Fault_VMFault_get_instructionFault_spec:
  "\<forall>s. \<Gamma> \<turnstile> \<lbrace>s. seL4_Fault_get_tag \<acute>seL4_Fault = scast seL4_Fault_VMFault\<rbrace>
       \<acute>ret__unsigned :== PROC seL4_Fault_VMFault_get_instructionFault(\<acute>seL4_Fault)
       \<lbrace>\<acute>ret__unsigned = seL4_Fault_VMFault_CL.instructionFault_CL (seL4_Fault_VMFault_lift \<^bsup>s\<^esup>seL4_Fault)\<rbrace>" apply(rule allI, rule conseqPre, vcg) apply (clarsimp simp:guard_simps) apply (simp add:seL4_Fault_VMFault_lift_def) apply (subst seL4_Fault_lift_VMFault) apply (simp add: o_def
                    seL4_Fault_get_tag_def
                    seL4_Fault_VMFault_def
                    mask_def word_size shift_over_ao_dists) apply (subst seL4_Fault_lift_VMFault, simp)? apply (simp add: o_def
                   seL4_Fault_get_tag_def
                   seL4_Fault_VMFault_def
                   mask_def word_size shift_over_ao_dists multi_shift_simps
                   word_bw_assocs word_oa_dist word_and_max_simps ucast_def
                   sign_extend_def' nth_is_and_neq_0) done

(* Proof state trace *)
proof (prove)
goal (1 subgoal):
 1. \<forall>s. \<Gamma>\<turnstile> \<lbrace>s. seL4_Fault_get_tag \<acute>seL4_Fault = SCAST(32 signed \<rightarrow> 32) seL4_Fault_VMFault\<rbrace> Call seL4_Fault_VMFault_get_instructionFault_'proc \<lbrace>\<acute>ret__unsigned = instructionFault_CL (seL4_Fault_VMFault_lift \<^bsup>s\<^esup>seL4_Fault)\<rbrace> proof (prove)
goal (1 subgoal):
 1. \<And>s. \<lbrace>s. seL4_Fault_get_tag \<acute>seL4_Fault = SCAST(32 signed \<rightarrow> 32) seL4_Fault_VMFault\<rbrace> \<subseteq> \<lbrace>\<forall>v. 0 \<le>s 0x11 \<and> 0x11 <s 0x20 \<and> 0 <s 2 \<and> 0 \<le>s 0 \<and> ((if False then 1 else 0) \<noteq> 0 \<longrightarrow> 0 \<le>s 0x1F \<and> 0x1F <s 0x20 \<and> ((if (seL4_Fault_C.words_C \<acute>seL4_Fault.[unat 0] && 0x20000 >> unat 0x11) && (1 << unat 0x1F) \<noteq> 0 then 1 else 0) \<noteq> 0 \<longrightarrow> (seL4_Fault_C.words_C \<acute>seL4_Fault.[unat 0] && 0x20000 >> unat 0x11) || SCAST(32 signed \<rightarrow> 32) 0 = instructionFault_CL (seL4_Fault_VMFault_lift \<^bsup>s\<^esup>seL4_Fault)) \<and> ((if (seL4_Fault_C.words_C \<acute>seL4_Fault.[unat 0] && 0x20000 >> unat 0x11) && (1 << unat 0x1F) \<noteq> 0 then 1 else 0) = 0 \<longrightarrow> seL4_Fault_C.words_C \<acute>seL4_Fault.[unat 0] && 0x20000 >> unat 0x11 = instructionFault_CL (seL4_Fault_VMFault_lift \<^bsup>s\<^esup>seL4_Fault))) \<and> ((if False then 1 else 0) = 0 \<longrightarrow> seL4_Fault_C.words_C \<acute>seL4_Fault.[unat 0] && 0x20000 >> unat 0x11 = instructionFault_CL (seL4_Fault_VMFault_lift \<^bsup>s\<^esup>seL4_Fault))\<rbrace> proof (prove)
goal (1 subgoal):
 1. \<And>x. seL4_Fault_get_tag (seL4_Fault_' x) = SCAST(32 signed \<rightarrow> 32) seL4_Fault_VMFault \<Longrightarrow> seL4_Fault_C.words_C (seL4_Fault_' x).[0] && 0x20000 >> 17 = instructionFault_CL (seL4_Fault_VMFault_lift (seL4_Fault_' x)) proof (prove)
goal (1 subgoal):
 1. \<And>x. seL4_Fault_get_tag (seL4_Fault_' x) = SCAST(32 signed \<rightarrow> 32) seL4_Fault_VMFault \<Longrightarrow> seL4_Fault_C.words_C (seL4_Fault_' x).[0] && 0x20000 >> 17 = instructionFault_CL (case seL4_Fault_lift (seL4_Fault_' x) of Some (SeL4_Fault_VMFault rec) \<Rightarrow> rec) proof (prove)
goal (2 subgoals):
 1. \<And>x. seL4_Fault_get_tag (seL4_Fault_' x) = SCAST(32 signed \<rightarrow> 32) seL4_Fault_VMFault \<Longrightarrow> seL4_Fault_get_tag (seL4_Fault_' x) = SCAST(32 signed \<rightarrow> 32) seL4_Fault_VMFault
 2. \<And>x. seL4_Fault_get_tag (seL4_Fault_' x) = SCAST(32 signed \<rightarrow> 32) seL4_Fault_VMFault \<Longrightarrow> seL4_Fault_C.words_C (seL4_Fault_' x).[0] && 0x20000 >> 17 = instructionFault_CL (case Some (SeL4_Fault_VMFault \<lparr>seL4_Fault_VMFault_CL.address_CL = seL4_Fault_C.words_C (seL4_Fault_' x).[1] >> 0, FSR_CL = (seL4_Fault_C.words_C (seL4_Fault_' x).[0] >> 18) && mask 14, instructionFault_CL = (seL4_Fault_C.words_C (seL4_Fault_' x).[0] >> 17) && mask 1\<rparr>) of Some (SeL4_Fault_VMFault rec) \<Rightarrow> rec) proof (prove)
goal (1 subgoal):
 1. \<And>x. seL4_Fault_get_tag (seL4_Fault_' x) = SCAST(32 signed \<rightarrow> 32) seL4_Fault_VMFault \<Longrightarrow> seL4_Fault_C.words_C (seL4_Fault_' x).[0] && 0x20000 >> 17 = instructionFault_CL (case Some (SeL4_Fault_VMFault \<lparr>seL4_Fault_VMFault_CL.address_CL = seL4_Fault_C.words_C (seL4_Fault_' x).[1] >> 0, FSR_CL = (seL4_Fault_C.words_C (seL4_Fault_' x).[0] >> 18) && mask 14, instructionFault_CL = (seL4_Fault_C.words_C (seL4_Fault_' x).[0] >> 17) && mask 1\<rparr>) of Some (SeL4_Fault_VMFault rec) \<Rightarrow> rec) proof (prove)
goal (1 subgoal):
 1. \<And>x. seL4_Fault_get_tag (seL4_Fault_' x) = SCAST(32 signed \<rightarrow> 32) seL4_Fault_VMFault \<Longrightarrow> seL4_Fault_C.words_C (seL4_Fault_' x).[0] && 0x20000 >> 17 = instructionFault_CL (case Some (SeL4_Fault_VMFault \<lparr>seL4_Fault_VMFault_CL.address_CL = seL4_Fault_C.words_C (seL4_Fault_' x).[1] >> 0, FSR_CL = (seL4_Fault_C.words_C (seL4_Fault_' x).[0] >> 18) && mask 14, instructionFault_CL = (seL4_Fault_C.words_C (seL4_Fault_' x).[0] >> 17) && mask 1\<rparr>) of Some (SeL4_Fault_VMFault rec) \<Rightarrow> rec) proof (prove)
goal:
No subgoals!