* This software may be distributed and modified according to the terms of
* the GNU General Public License version 2. Note that NO WARRANTY is provided.
* See "LICENSE_GPLv2.txt" for details.
*
* @TAG(NICTA_GPL)
*)
(*
* Toplevel capDL refinement theorem.
*)
theory Refine_D
imports Syscall_DR
begin
text {*
Toplevel @{text dcorres} theorem.
*}
lemma valid_etcbs_sched: "valid_sched s \<longrightarrow> valid_etcbs s" by fastforce
lemma handle_event_invs_and_valid_sched:
"\<lbrace>invs and valid_sched and (\<lambda>s. e \<noteq> Interrupt \<longrightarrow> ct_active s) and (\<lambda>s. scheduler_action s = resume_cur_thread)\<rbrace> Syscall_A.handle_event e
\<lbrace>\<lambda>rv. invs and valid_sched\<rbrace>"
by (wp he_invs handle_event_valid_sched, simp)
lemma dcorres_call_kernel:
"dcorres dc \<top>
(invs and valid_sched and valid_pdpt_objs and (\<lambda>s. e \<noteq> Interrupt \<longrightarrow> ct_running s)
and (\<lambda>s. scheduler_action s = resume_cur_thread))