Theory Link_separation_kernel_model_to_CISK
subsection ‹Link implementation to CISK: the specific separation kernel is an interpretation of the generic model.\label{sect:link_to_CISK}›
theory Link_separation_kernel_model_to_CISK
imports Separation_kernel_model
begin
text ‹We show that the separation kernel instantiation satisfies the
specification of CISK.
›
theorem CISK_proof_obligations_satisfied:
shows
"Controllable_Interruptible_Separation_Kernel
rstep
routput_f
(↑s0)
rcurrent
rcswitch
rkinvolved
rifp
rvpeq
rAS_set
rinvariant
rprecondition
raborting
rwaiting
rset_error_code"
proof (unfold_locales)
show "∀ a b c u. (rvpeq u a b ∧ rvpeq u b c) ⟶ rvpeq u a c"
and "∀ a b u. rvpeq u a b ⟶ rvpeq u b a"
and "∀ a u. rvpeq u a a"
using inst_vpeq_rel by metis+
show "∀ a s t. rvpeq (rcurrent s) s t ∧ rcurrent s = rcurrent t ⟶ routput_f s a = routput_f t a"
using inst_output_consistency by metis
show "∀ u . rifp u u"
using inst_ifp_refl by metis
show "∀s t u a. rvpeq u s t ∧ rvpeq (rcurrent s) s t ∧ True ∧ rprecondition s (rcurrent s) a ∧ True ∧ rprecondition t (rcurrent t) a ∧ rcurrent s = rcurrent t ⟶
rvpeq u (rstep s a) (rstep t a)"
using inst_weakly_step_consistent by blast
show "∀ s a . rcurrent (rstep s a) = rcurrent s"
using inst_step_atomicity by metis
show " ∀a s u. ¬ rifp (rcurrent s) u ∧ True ∧ rprecondition s (rcurrent s) a ⟶ rvpeq u s (rstep s a)"
using inst_local_respect by blast
show "∀n s t. rcurrent s = rcurrent t ⟶ rcurrent (rcswitch n s) = rcurrent (rcswitch n t)"
using inst_cswitch_independent_of_state by metis
show "∀u s t n. rvpeq u s t ⟶ rvpeq u (rcswitch n s) (rcswitch n t)"
using inst_cswitch_consistency by metis
show "[] ∈ rAS_set"
unfolding rAS_set_def
by auto
show "True"
by auto
show "∀s n. True ⟶ True"
by auto
show "∀s d n a. rprecondition s d a ⟶ rprecondition (rcswitch n s) d a"
using precondition_after_cswitch by blast
show "∀s d aseq. True ∧ aseq ∈ rAS_set ∧ aseq ≠ [] ⟶ rprecondition s d (hd aseq)"
using prec_first_IPC_action prec_first_EV_WAIT_action prec_first_EV_SIGNAL_action
unfolding rAS_set_def is_sub_seq_def
by auto
show "∀s a a'. (∃aseq∈rAS_set. is_sub_seq a a' aseq) ∧ True ∧ rprecondition s (rcurrent s) a ∧ ¬ raborting s (rcurrent s) a ∧ ¬ rwaiting s (rcurrent s) a ⟶
rprecondition (rstep s a) (rcurrent s) a'"
using prec_after_IPC_step prec_after_EV_SIGNAL_step prec_after_EV_WAIT_step
unfolding rAS_set_def is_sub_seq_def
by auto
show "∀s d a a'. rcurrent s ≠ d ∧ rprecondition s d a ⟶ rprecondition (rstep s a') d a"
using prec_dom_independent by blast
show "∀s a. True ⟶ True"
by auto
show "∀n s. raborting (rcswitch n s) = raborting s"
using aborting_switch_independent by auto
show "∀s a d. rcurrent s ≠ d ⟶ raborting (rstep s a) d = raborting s d"
using aborting_dom_independent by auto
show "∀s t u. rvpeq u s t ⟶ raborting s u = raborting t u"
using raborting_consistent by auto
show "∀n s. rwaiting (rcswitch n s) = rwaiting s"
using waiting_switch_independent by auto
show "∀s t u a. rvpeq (rcurrent s) s t ∧ (∀ d ∈ rkinvolved a . rvpeq d s t)
∧ rvpeq u s t
⟶ rwaiting s u a = rwaiting t u a"
unfolding Kernel.involved_def
using waiting_consistent by auto
show "∀s a. ∀ d ∈ rkinvolved a. rprecondition s (rcurrent s) a ⟶ rifp d (rcurrent s)"
using involved_ifp by blast
show "∀s a. rwaiting s (rcurrent s) a ⟶ rstep s a = s"
using spec_of_waiting by blast
show "∀s d a' a. rcurrent s ≠ d ∧ raborting s d a ⟶ raborting (rset_error_code s a') d a"
unfolding rset_error_code_def
by auto
show "∀s t u a. rvpeq u s t ⟶ rvpeq u (rset_error_code s a) (rset_error_code t a)"
unfolding rset_error_code_def
by auto
show "∀s u a. ¬ rifp (rcurrent s) u ⟶ rvpeq u s (rset_error_code s a)"
unfolding rset_error_code_def
by (metis ‹∀a u. rvpeq u a a›)
show "∀s a. rcurrent (rset_error_code s a) = rcurrent s"
unfolding rset_error_code_def
by auto
show "∀s d a a'. rprecondition s d a ∧ raborting s (rcurrent s) a' ⟶ rprecondition (rset_error_code s a') d a"
unfolding rset_error_code_def
by auto
show "∀s d a' a. rcurrent s ≠ d ∧ rwaiting s d a ⟶ rwaiting (rset_error_code s a') d a"
unfolding rset_error_code_def
by auto
qed
text ‹Now we can instantiate CISK with some initial state, interrupt function, etc.›
interpretation Inst:
Controllable_Interruptible_Separation_Kernel
rstep
routput_f
"↑s0"
rcurrent
rcswitch
"(=) 42"
rkinvolved
rifp
rvpeq
rAS_set
rinvariant
rprecondition
raborting
rwaiting
rset_error_code
using CISK_proof_obligations_satisfied by auto
text ‹The main theorem: the instantiation implements the information flow policy @{term ifp}.›
theorem risecure:
"Inst.isecure"
using Inst.unwinding_implies_isecure_CISK
by blast
end