aspec: add function for mapping arch objects from objects

This commit is contained in:
Gerwin Klein 2018-10-11 12:25:35 +11:00
parent 516952bd9d
commit 7a48f4c8c7
1 changed files with 3 additions and 0 deletions

View File

@ -439,6 +439,9 @@ lemmas kernel_object_cases_asm =
kernel_object.induct[where kernel_object=x and P="\<lambda>x'. x = x' \<longrightarrow> P x' \<longrightarrow> R" for P R x,
simplified, rule_format, rotated -1]
definition aobj_of :: "kernel_object \<Rightarrow> arch_kernel_obj option"
where
"aobj_of ko \<equiv> case ko of ArchObj aobj \<Rightarrow> Some aobj | _ \<Rightarrow> None"
text {* Checks whether a cnode's contents are well-formed. *}