Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small IPC lemmas #822

Open
wants to merge 14 commits into
base: rt
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions proof/crefine/RISCV64/Ipc_C.thy
Original file line number Diff line number Diff line change
Expand Up @@ -6082,6 +6082,18 @@ lemma schedContext_resume_ccorres:
to_bool_def)
done

lemma obj_at_cslift_ntfn:
fixes P :: "notification \<Rightarrow> bool"
shows "\<lbrakk>obj_at' P ntfn s; (s, s') \<in> rf_sr\<rbrakk> \<Longrightarrow>
\<exists>ko ko'. ko_at' ko ntfn s \<and> P ko \<and>
cslift s' (Ptr ntfn) = Some ko' \<and>
cnotification_relation (cslift s') ko ko'"
Comment on lines +6085 to +6090
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you actually need the type annotation/fixes? I would have thought the cnotification_relation would constrain ko, which then should constrain P.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can check this. This lemma started off life as a copy paste of the analogous lemma for TCBs and was then modified. That’s where the fixes and type annotations would be from

apply (frule obj_at_ko_at')
apply clarsimp
apply (frule cmap_relation_ntfn)
apply (drule (1) cmap_relation_ko_atD)
apply fastforce
done

lemma maybeDonateSchedContext_ccorres:
"ccorres dc xfdc
Expand Down