theory structures_proofs

lemma (in kernel_all_substitute) seL4_Fault_UserException_get_number_spec:
  "\<forall>s. \<Gamma> \<turnstile> \<lbrace>s. seL4_Fault_get_tag \<acute>seL4_Fault = scast seL4_Fault_UserException\<rbrace>
       \<acute>ret__unsigned :== PROC seL4_Fault_UserException_get_number(\<acute>seL4_Fault)
       \<lbrace>\<acute>ret__unsigned = seL4_Fault_UserException_CL.number_CL (seL4_Fault_UserException_lift \<^bsup>s\<^esup>seL4_Fault)\<rbrace>" apply(rule allI, rule conseqPre, vcg) apply (clarsimp simp:guard_simps) apply (simp add:seL4_Fault_UserException_lift_def) apply (subst seL4_Fault_lift_UserException) apply (simp add: o_def
                    seL4_Fault_get_tag_def
                    seL4_Fault_UserException_def
                    mask_def word_size shift_over_ao_dists) apply (subst seL4_Fault_lift_UserException, simp)? apply (simp add: o_def
                   seL4_Fault_get_tag_def
                   seL4_Fault_UserException_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_UserException\<rbrace> Call seL4_Fault_UserException_get_number_'proc \<lbrace>\<acute>ret__unsigned = number_CL (seL4_Fault_UserException_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_UserException\<rbrace> \<subseteq> \<lbrace>\<forall>v. 0 \<le>s 0 \<and> 0 <s 0x20 \<and> 1 <s 2 \<and> 0 \<le>s 1 \<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 1] && 0xFFFFFFFF >> unat 0) && (1 << unat 0x1F) \<noteq> 0 then 1 else 0) \<noteq> 0 \<longrightarrow> (seL4_Fault_C.words_C \<acute>seL4_Fault.[unat 1] && 0xFFFFFFFF >> unat 0) || SCAST(32 signed \<rightarrow> 32) 0 = number_CL (seL4_Fault_UserException_lift \<^bsup>s\<^esup>seL4_Fault)) \<and> ((if (seL4_Fault_C.words_C \<acute>seL4_Fault.[unat 1] && 0xFFFFFFFF >> unat 0) && (1 << unat 0x1F) \<noteq> 0 then 1 else 0) = 0 \<longrightarrow> seL4_Fault_C.words_C \<acute>seL4_Fault.[unat 1] && 0xFFFFFFFF >> unat 0 = number_CL (seL4_Fault_UserException_lift \<^bsup>s\<^esup>seL4_Fault))) \<and> ((if False then 1 else 0) = 0 \<longrightarrow> seL4_Fault_C.words_C \<acute>seL4_Fault.[unat 1] && 0xFFFFFFFF >> unat 0 = number_CL (seL4_Fault_UserException_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_UserException \<Longrightarrow> seL4_Fault_C.words_C (seL4_Fault_' x).[Suc 0] && 0xFFFFFFFF = number_CL (seL4_Fault_UserException_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_UserException \<Longrightarrow> seL4_Fault_C.words_C (seL4_Fault_' x).[Suc 0] && 0xFFFFFFFF = number_CL (case seL4_Fault_lift (seL4_Fault_' x) of Some (SeL4_Fault_UserException 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_UserException \<Longrightarrow> seL4_Fault_get_tag (seL4_Fault_' x) = SCAST(32 signed \<rightarrow> 32) seL4_Fault_UserException
 2. \<And>x. seL4_Fault_get_tag (seL4_Fault_' x) = SCAST(32 signed \<rightarrow> 32) seL4_Fault_UserException \<Longrightarrow> seL4_Fault_C.words_C (seL4_Fault_' x).[Suc 0] && 0xFFFFFFFF = number_CL (case Some (SeL4_Fault_UserException \<lparr>number_CL = seL4_Fault_C.words_C (seL4_Fault_' x).[1] >> 0, code_CL = (seL4_Fault_C.words_C (seL4_Fault_' x).[0] >> 4) && mask 28\<rparr>) of Some (SeL4_Fault_UserException 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_UserException \<Longrightarrow> seL4_Fault_C.words_C (seL4_Fault_' x).[Suc 0] && 0xFFFFFFFF = number_CL (case Some (SeL4_Fault_UserException \<lparr>number_CL = seL4_Fault_C.words_C (seL4_Fault_' x).[1] >> 0, code_CL = (seL4_Fault_C.words_C (seL4_Fault_' x).[0] >> 4) && mask 28\<rparr>) of Some (SeL4_Fault_UserException 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_UserException \<Longrightarrow> seL4_Fault_C.words_C (seL4_Fault_' x).[Suc 0] && 0xFFFFFFFF = number_CL (case Some (SeL4_Fault_UserException \<lparr>number_CL = seL4_Fault_C.words_C (seL4_Fault_' x).[1] >> 0, code_CL = (seL4_Fault_C.words_C (seL4_Fault_' x).[0] >> 4) && mask 28\<rparr>) of Some (SeL4_Fault_UserException rec) \<Rightarrow> rec) proof (prove)
goal:
No subgoals!