theory structures_proofs

lemma (in kernel_all_substitute) seL4_Fault_UnknownSyscall_new_spec:
  "\<forall>s. \<Gamma> \<turnstile> {s}
       \<acute>ret__struct_seL4_Fault_C :== PROC seL4_Fault_UnknownSyscall_new(\<acute>syscallNumber)
       \<lbrace>seL4_Fault_UnknownSyscall_lift \<acute>ret__struct_seL4_Fault_C = \<lparr>
          seL4_Fault_UnknownSyscall_CL.syscallNumber_CL = (\<^bsup>s\<^esup>syscallNumber___unsigned AND mask 32) \<rparr> \<and>
        seL4_Fault_get_tag \<acute>ret__struct_seL4_Fault_C = scast seL4_Fault_UnknownSyscall\<rbrace>" apply (rule allI, rule conseqPre, vcg) apply (clarsimp simp: guard_simps o_def mask_def shift_over_ao_dists) apply (rule context_conjI[THEN iffD1[OF conj_commute]],
         fastforce simp: seL4_Fault_get_tag_eq_x seL4_Fault_UnknownSyscall_def
                         mask_def shift_over_ao_dists word_bw_assocs word_ao_dist) apply (simp add: seL4_Fault_UnknownSyscall_lift_def) apply (erule seL4_Fault_lift_UnknownSyscall[THEN subst[OF sym]]; simp?) apply ((intro conjI sign_extend_eq)?;
         (simp add: mask_def shift_over_ao_dists multi_shift_simps word_size
                    word_ao_dist word_bw_assocs word_and_max_simps seL4_Fault_UnknownSyscall_def))? done

(* Proof state trace *)
proof (prove)
goal (1 subgoal):
 1. \<forall>s. \<Gamma>\<turnstile> {s} Call seL4_Fault_UnknownSyscall_new_'proc \<lbrace>seL4_Fault_UnknownSyscall_lift \<acute>ret__struct_seL4_Fault_C = \<lparr>syscallNumber_CL = \<^bsup>s\<^esup>syscallNumber && mask 32\<rparr> \<and> seL4_Fault_get_tag \<acute>ret__struct_seL4_Fault_C = SCAST(32 signed \<rightarrow> 32) seL4_Fault_UnknownSyscall\<rbrace> proof (prove)
goal (1 subgoal):
 1. \<And>s. {s} \<subseteq> \<lbrace>\<forall>v. 0 <s 2 \<and> 0 \<le>s 0 \<and> 0 <s 0x20 \<and> 1 <s 2 \<and> 0 \<le>s 1 \<and> 0 \<le>s 0 \<and> 0 <s 0x20 \<and> seL4_Fault_UnknownSyscall_lift (seL4_Fault_C.words_C_update (\<lambda>v. Arrays.update v (unat 1) (SCAST(32 signed \<rightarrow> 32) 0 || (\<acute>syscallNumber << unat 0))) (seL4_Fault_C.words_C_update (\<lambda>v. Arrays.update v (unat 0) (SCAST(32 signed \<rightarrow> 32) 0 || (SCAST(32 signed \<rightarrow> 32) seL4_Fault_UnknownSyscall && 0xF << unat 0))) v)) = \<lparr>syscallNumber_CL = \<^bsup>s\<^esup>syscallNumber && mask 32\<rparr> \<and> seL4_Fault_get_tag (seL4_Fault_C.words_C_update (\<lambda>v. Arrays.update v (unat 1) (SCAST(32 signed \<rightarrow> 32) 0 || (\<acute>syscallNumber << unat 0))) (seL4_Fault_C.words_C_update (\<lambda>v. Arrays.update v (unat 0) (SCAST(32 signed \<rightarrow> 32) 0 || (SCAST(32 signed \<rightarrow> 32) seL4_Fault_UnknownSyscall && 0xF << unat 0))) v)) = SCAST(32 signed \<rightarrow> 32) seL4_Fault_UnknownSyscall\<rbrace> proof (prove)
goal (1 subgoal):
 1. \<And>s v. seL4_Fault_UnknownSyscall_lift (seL4_Fault_C.words_C_update (\<lambda>x. Arrays.update (Arrays.update x (Suc 0) (syscallNumber_' s)) 0 (SCAST(32 signed \<rightarrow> 32) seL4_Fault_UnknownSyscall && 0xF)) v) = \<lparr>syscallNumber_CL = syscallNumber_' s\<rparr> \<and> seL4_Fault_get_tag (seL4_Fault_C.words_C_update (\<lambda>x. Arrays.update (Arrays.update x (Suc 0) (syscallNumber_' s)) 0 (SCAST(32 signed \<rightarrow> 32) seL4_Fault_UnknownSyscall && 0xF)) v) = SCAST(32 signed \<rightarrow> 32) seL4_Fault_UnknownSyscall proof (prove)
goal (1 subgoal):
 1. \<And>s v. seL4_Fault_get_tag (seL4_Fault_C.words_C_update (\<lambda>x. Arrays.update (Arrays.update x (Suc 0) (syscallNumber_' s)) 0 (SCAST(32 signed \<rightarrow> 32) seL4_Fault_UnknownSyscall && 0xF)) v) = SCAST(32 signed \<rightarrow> 32) seL4_Fault_UnknownSyscall \<Longrightarrow> seL4_Fault_UnknownSyscall_lift (seL4_Fault_C.words_C_update (\<lambda>x. Arrays.update (Arrays.update x (Suc 0) (syscallNumber_' s)) 0 (SCAST(32 signed \<rightarrow> 32) seL4_Fault_UnknownSyscall && 0xF)) v) = \<lparr>syscallNumber_CL = syscallNumber_' s\<rparr> proof (prove)
goal (1 subgoal):
 1. \<And>s v. seL4_Fault_get_tag (seL4_Fault_C.words_C_update (\<lambda>x. Arrays.update (Arrays.update x (Suc 0) (syscallNumber_' s)) 0 (SCAST(32 signed \<rightarrow> 32) seL4_Fault_UnknownSyscall && 0xF)) v) = SCAST(32 signed \<rightarrow> 32) seL4_Fault_UnknownSyscall \<Longrightarrow> (case seL4_Fault_lift (seL4_Fault_C.words_C_update (\<lambda>x. Arrays.update (Arrays.update x (Suc 0) (syscallNumber_' s)) 0 (SCAST(32 signed \<rightarrow> 32) seL4_Fault_UnknownSyscall && 0xF)) v) of Some (SeL4_Fault_UnknownSyscall rec) \<Rightarrow> rec) = \<lparr>syscallNumber_CL = syscallNumber_' s\<rparr> proof (prove)
goal:
No subgoals! proof (prove)
goal:
No subgoals!