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

Small IPC lemmas #822

wants to merge 14 commits into from

Conversation

michaelmcinerney
Copy link
Contributor

No description provided.

Signed-off-by: Michael McInerney <[email protected]>
This is achieved by asserting active_sc_at' in the appropriate
places within the Haskell.

Signed-off-by: Michael McInerney <[email protected]>
Moved, along with some associated lemmas, in order for these results
to be available for postpone_ccorres.

Signed-off-by: Michael McInerney <[email protected]>
Signed-off-by: Michael McInerney <[email protected]>
Signed-off-by: Michael McInerney <[email protected]>
@michaelmcinerney michaelmcinerney marked this pull request as ready for review October 8, 2024 10:22
@michaelmcinerney michaelmcinerney self-assigned this Oct 8, 2024
@michaelmcinerney michaelmcinerney added the MCS related to `rt` branch and mixed-criticality systems label Oct 8, 2024
Comment on lines +6085 to +6090
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'"
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 wpsimp
apply (vcg exspec=refill_sufficient_modifies)
apply (rule ccorres_cond_seq)
apply (rule ccorres_cond_false)
Copy link
Member

Choose a reason for hiding this comment

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

when you do the ccorres_cond_seq + _true or _false combo, you're relying on someone having the proof state loaded in front of them. I much prefer having comments saying what is going on, because I have no idea whatsoever what branches this proof is following

valid_sched_context'_def from_bool_def
split: option.splits bool.splits)
apply ceqv
apply (rule ccorres_cond[where R=\<top>])
Copy link
Member

Choose a reason for hiding this comment

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

I don't like how we've reverted to not having any comments in CRefine. I want to know, what are branches we're looking at...

sign_extend_canonical_address
split: ntfn.splits)
apply fastforce
apply (simp add: refill_buffer_relation_def image_def dom_def Let_def typ_heap_simps
Copy link
Member

Choose a reason for hiding this comment

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

there's a good chance some/all of these simps can be compressed

Copy link
Member

@Xaphiosis Xaphiosis left a comment

Choose a reason for hiding this comment

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

I think generally this is good, but I'm noticing a regression to the mean of not adding comments to guide the reader and future repairer, especially in CRefine, which concerns me a bit. I have too much joyous experience with proofs that break, and then I when I have to fix them I don't know what they were trying to do since whoever wrote them depended on the implicit state to inform the reader.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
MCS related to `rt` branch and mixed-criticality systems
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants