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

Minor Nondet Monad improvements #665

Merged
merged 3 commits into from
Aug 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
8 changes: 0 additions & 8 deletions lib/Monads/nondet/Nondet_More_VCG.thy
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,6 @@ lemma hoare_pre_addE:
apply (subst iff_conv_conj_imp)
by(intro conjI impI; rule hoare_weaken_preE, assumption, clarsimp)

lemma hoare_disjI1:
"\<lbrace>R\<rbrace> f \<lbrace>P\<rbrace> \<Longrightarrow> \<lbrace>R\<rbrace> f \<lbrace>\<lambda>r s. P r s \<or> Q r s\<rbrace>"
by (erule hoare_post_imp [rotated]) simp

lemma hoare_disjI2:
"\<lbrace>R\<rbrace> f \<lbrace>Q\<rbrace> \<Longrightarrow> \<lbrace>R\<rbrace> f \<lbrace>\<lambda>r s. P r s \<or> Q r s \<rbrace>"
by (rule hoare_post_imp [OF _ hoare_disjI1, where P1=Q], auto)

lemma hoare_name_pre_state:
"\<lbrakk> \<And>s. P s \<Longrightarrow> \<lbrace>(=) s\<rbrace> f \<lbrace>Q\<rbrace> \<rbrakk> \<Longrightarrow> \<lbrace>P\<rbrace> f \<lbrace>Q\<rbrace>"
by (clarsimp simp: valid_def)
Expand Down
459 changes: 228 additions & 231 deletions lib/Monads/nondet/Nondet_VCG.thy

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion proof/refine/AARCH64/Schedule_R.thy
Original file line number Diff line number Diff line change
Expand Up @@ -2314,7 +2314,7 @@ lemma schedule_invs':
apply (wpsimp wp: scheduleChooseNewThread_invs' ssa_invs'
chooseThread_invs_no_cicd' setSchedulerAction_invs' setSchedulerAction_direct
switchToThread_tcb_in_cur_domain' switchToThread_ct_not_queued_2
| wp hoare_disjI2[where Q="\<lambda>_ s. tcb_in_cur_domain' (ksCurThread s) s"]
| wp hoare_disjI2[where R="\<lambda>_ s. tcb_in_cur_domain' (ksCurThread s) s"]
| wp hoare_drop_imp[where f="isHighestPrio d p" for d p]
| simp only: obj_at'_activatable_st_tcb_at'[simplified comp_def]
| strengthen invs'_invs_no_cicd
Expand Down
2 changes: 1 addition & 1 deletion proof/refine/ARM/Schedule_R.thy
Original file line number Diff line number Diff line change
Expand Up @@ -2153,7 +2153,7 @@ lemma schedule_invs':
apply (wpsimp wp: scheduleChooseNewThread_invs' ssa_invs'
chooseThread_invs_no_cicd' setSchedulerAction_invs' setSchedulerAction_direct
switchToThread_tcb_in_cur_domain' switchToThread_ct_not_queued_2
| wp hoare_disjI2[where Q="\<lambda>_ s. tcb_in_cur_domain' (ksCurThread s) s"]
| wp hoare_disjI2[where R="\<lambda>_ s. tcb_in_cur_domain' (ksCurThread s) s"]
| wp hoare_drop_imp[where f="isHighestPrio d p" for d p]
| simp only: obj_at'_activatable_st_tcb_at'[simplified comp_def]
| strengthen invs'_invs_no_cicd
Expand Down
2 changes: 1 addition & 1 deletion proof/refine/ARM_HYP/Schedule_R.thy
Original file line number Diff line number Diff line change
Expand Up @@ -2279,7 +2279,7 @@ lemma schedule_invs':
apply (wpsimp wp: scheduleChooseNewThread_invs' ssa_invs'
chooseThread_invs_no_cicd' setSchedulerAction_invs' setSchedulerAction_direct
switchToThread_tcb_in_cur_domain' switchToThread_ct_not_queued_2
| wp hoare_disjI2[where Q="\<lambda>_ s. tcb_in_cur_domain' (ksCurThread s) s"]
| wp hoare_disjI2[where R="\<lambda>_ s. tcb_in_cur_domain' (ksCurThread s) s"]
| wp hoare_drop_imp[where f="isHighestPrio d p" for d p]
| simp only: obj_at'_activatable_st_tcb_at'[simplified comp_def]
| strengthen invs'_invs_no_cicd
Expand Down
2 changes: 1 addition & 1 deletion proof/refine/RISCV64/Schedule_R.thy
Original file line number Diff line number Diff line change
Expand Up @@ -2141,7 +2141,7 @@ lemma schedule_invs':
apply (wpsimp wp: scheduleChooseNewThread_invs' ssa_invs'
chooseThread_invs_no_cicd' setSchedulerAction_invs' setSchedulerAction_direct
switchToThread_tcb_in_cur_domain' switchToThread_ct_not_queued_2
| wp hoare_disjI2[where Q="\<lambda>_ s. tcb_in_cur_domain' (ksCurThread s) s"]
| wp hoare_disjI2[where R="\<lambda>_ s. tcb_in_cur_domain' (ksCurThread s) s"]
| wp hoare_drop_imp[where f="isHighestPrio d p" for d p]
| simp only: obj_at'_activatable_st_tcb_at'[simplified comp_def]
| strengthen invs'_invs_no_cicd
Expand Down
2 changes: 1 addition & 1 deletion proof/refine/X64/Schedule_R.thy
Original file line number Diff line number Diff line change
Expand Up @@ -2144,7 +2144,7 @@ lemma schedule_invs':
apply (wpsimp wp: scheduleChooseNewThread_invs' ssa_invs'
chooseThread_invs_no_cicd' setSchedulerAction_invs' setSchedulerAction_direct
switchToThread_tcb_in_cur_domain' switchToThread_ct_not_queued_2
| wp hoare_disjI2[where Q="\<lambda>_ s. tcb_in_cur_domain' (ksCurThread s) s"]
| wp hoare_disjI2[where R="\<lambda>_ s. tcb_in_cur_domain' (ksCurThread s) s"]
| wp hoare_drop_imp[where f="isHighestPrio d p" for d p]
| simp only: obj_at'_activatable_st_tcb_at'[simplified comp_def]
| strengthen invs'_invs_no_cicd
Expand Down
Loading