theory structures_proofs

lemma (in kernel_all_substitute) endpoint_ptr_get_epQueue_head_spec:
           defines "ptrval s \<equiv> cslift s \<^bsup>s\<^esup>endpoint_ptr"
           shows "\<forall>s. \<Gamma> \<turnstile> \<lbrace>s. s \<Turnstile>\<^sub>c \<^bsup>s\<^esup>endpoint_ptr\<rbrace>
            \<acute>ret__unsigned :== PROC endpoint_ptr_get_epQueue_head(\<acute>endpoint_ptr)
            \<lbrace>\<acute>ret__unsigned = endpoint_CL.epQueue_head_CL (endpoint_lift ((the (ptrval s))))\<rbrace> " unfolding ptrval_def apply (rule allI, rule conseqPre, vcg) apply (clarsimp simp: h_t_valid_clift_Some_iff) apply (simp add: endpoint_lift_def guard_simps mask_def typ_heap_simps ucast_def) apply (simp add: sign_extend_def' mask_def nth_is_and_neq_0 word_bw_assocs
                   shift_over_ao_dists word_oa_dist word_and_max_simps)? done

(* Proof state trace *)
proof (prove)
goal (1 subgoal):
 1. \<forall>s. \<Gamma>\<turnstile> \<lbrace>s. s \<Turnstile>\<^sub>c \<^bsup>s\<^esup>endpoint_ptr\<rbrace> Call endpoint_ptr_get_epQueue_head_'proc \<lbrace>\<acute>ret__unsigned = epQueue_head_CL (endpoint_lift (the (ptrval s)))\<rbrace> proof (prove)
goal (1 subgoal):
 1. \<forall>s. \<Gamma>\<turnstile> \<lbrace>s. s \<Turnstile>\<^sub>c \<^bsup>s\<^esup>endpoint_ptr\<rbrace> Call endpoint_ptr_get_epQueue_head_'proc \<lbrace>\<acute>ret__unsigned = epQueue_head_CL (endpoint_lift (the (cslift s \<^bsup>s\<^esup>endpoint_ptr)))\<rbrace> proof (prove)
goal (1 subgoal):
 1. \<And>s. \<lbrace>s. s \<Turnstile>\<^sub>c \<^bsup>s\<^esup>endpoint_ptr\<rbrace> \<subseteq> {sa. \<forall>v. 0 \<le>s 0 \<and> 0 <s 0x20 \<and> 1 <s 4 \<and> 0 \<le>s 1 \<and> sa \<Turnstile>\<^sub>c endpoint_ptr_' sa \<and> ((if False then 1 else 0) \<noteq> 0 \<longrightarrow> 0 \<le>s 0x1F \<and> 0x1F <s 0x20 \<and> ((if (h_val (hrs_mem (t_hrs_' (globals sa))) (PTR(32 word[4]) &(endpoint_ptr_' sa\<rightarrow>[''words_C''])).[unat 1] && 0xFFFFFFF0 << unat 0) && (1 << unat 0x1F) \<noteq> 0 then 1 else 0) \<noteq> 0 \<longrightarrow> (h_val (hrs_mem (t_hrs_' (globals sa))) (PTR(32 word[4]) &(endpoint_ptr_' sa\<rightarrow>[''words_C''])).[unat 1] && 0xFFFFFFF0 << unat 0) || SCAST(32 signed \<rightarrow> 32) 0 = epQueue_head_CL (endpoint_lift (the (cslift s (endpoint_ptr_' s))))) \<and> ((if (h_val (hrs_mem (t_hrs_' (globals sa))) (PTR(32 word[4]) &(endpoint_ptr_' sa\<rightarrow>[''words_C''])).[unat 1] && 0xFFFFFFF0 << unat 0) && (1 << unat 0x1F) \<noteq> 0 then 1 else 0) = 0 \<longrightarrow> h_val (hrs_mem (t_hrs_' (globals sa))) (PTR(32 word[4]) &(endpoint_ptr_' sa\<rightarrow>[''words_C''])).[unat 1] && 0xFFFFFFF0 << unat 0 = epQueue_head_CL (endpoint_lift (the (cslift s (endpoint_ptr_' s)))))) \<and> ((if False then 1 else 0) = 0 \<longrightarrow> h_val (hrs_mem (t_hrs_' (globals sa))) (PTR(32 word[4]) &(endpoint_ptr_' sa\<rightarrow>[''words_C''])).[unat 1] && 0xFFFFFFF0 << unat 0 = epQueue_head_CL (endpoint_lift (the (cslift s (endpoint_ptr_' s)))))} proof (prove)
goal (1 subgoal):
 1. \<And>x v. cslift x (endpoint_ptr_' x) = Some v \<Longrightarrow> h_val (hrs_mem (t_hrs_' (globals x))) (PTR(32 word[4]) &(endpoint_ptr_' x\<rightarrow>[''words_C''])).[Suc 0] && 0xFFFFFFF0 = epQueue_head_CL (endpoint_lift v) proof (prove)
goal:
No subgoals! proof (prove)
goal:
No subgoals!