Skip to content
Snippets Groups Projects
Commit 88dcbd11 authored by Robbert Krebbers's avatar Robbert Krebbers Committed by Ralf Jung
Browse files

final tweaks

parent 01abd043
No related branches found
No related tags found
No related merge requests found
...@@ -170,18 +170,6 @@ Proof. ...@@ -170,18 +170,6 @@ Proof.
iIntros "_". iPureIntro. rewrite /num_laters_per_step /=. lia. iIntros "_". iPureIntro. rewrite /num_laters_per_step /=. lia.
Qed. Qed.
(** This just re-exports the lifting lemma when one wants to generate a single
credit during a pure step. *)
Lemma wp_pure_step_credit s E e1 e2 ϕ Φ :
PureExec ϕ 1 e1 e2
ϕ
(£ 1 -∗ WP e2 @ s; E {{ Φ }}) -∗
WP e1 @ s; E {{ Φ }}.
Proof.
iIntros (Hexec Hphi) "Hwp".
iApply wp_pure_step_later; done.
Qed.
(** Recursive functions: we do not use this lemmas as it is easier to use Löb (** Recursive functions: we do not use this lemmas as it is easier to use Löb
induction directly, but this demonstrates that we can state the expected induction directly, but this demonstrates that we can state the expected
reasoning principle for recursive functions, without any visible ▷. *) reasoning principle for recursive functions, without any visible ▷. *)
......
...@@ -57,16 +57,16 @@ Lemma tac_wp_pure_credit `{!heapGS_gen hlc Σ} Δ Δ' s E j K e1 e2 ϕ Φ : ...@@ -57,16 +57,16 @@ Lemma tac_wp_pure_credit `{!heapGS_gen hlc Σ} Δ Δ' s E j K e1 e2 ϕ Φ :
PureExec ϕ 1 e1 e2 PureExec ϕ 1 e1 e2
ϕ ϕ
MaybeIntoLaterNEnvs 1 Δ Δ' MaybeIntoLaterNEnvs 1 Δ Δ'
(match envs_app false (Esnoc Enil j (£ 1)) Δ' with match envs_app false (Esnoc Enil j (£ 1)) Δ' with
| Some Δ'' => | Some Δ'' =>
envs_entails Δ'' (WP fill K e2 @ s; E {{ Φ }}) envs_entails Δ'' (WP fill K e2 @ s; E {{ Φ }})
| None => False | None => False
end) end
envs_entails Δ (WP (fill K e1) @ s; E {{ Φ }}). envs_entails Δ (WP (fill K e1) @ s; E {{ Φ }}).
Proof. Proof.
rewrite envs_entails_unseal=> ??? . rewrite envs_entails_unseal=> ??? .
pose proof @pure_exec_fill. pose proof @pure_exec_fill.
rewrite -wp_pure_step_credit; last done. rewrite -lifting.wp_pure_step_later; last done.
rewrite into_laterN_env_sound /=. apply later_mono. rewrite into_laterN_env_sound /=. apply later_mono.
destruct (envs_app _ _ _) as [Δ''|] eqn:HΔ'; [ | contradiction ]. destruct (envs_app _ _ _) as [Δ''|] eqn:HΔ'; [ | contradiction ].
rewrite envs_app_sound //; simpl. rewrite envs_app_sound //; simpl.
...@@ -161,7 +161,7 @@ Tactic Notation "wp_pure" open_constr(efoc) "credit:" constr(H) := ...@@ -161,7 +161,7 @@ Tactic Notation "wp_pure" open_constr(efoc) "credit:" constr(H) :=
let Htmp := iFresh in let Htmp := iFresh in
let finish _ := let finish _ :=
pm_reduce; pm_reduce;
(iDestructHyp Htmp as H || fail 2 "wp_pure: " H " is not fresh"); (iDestructHyp Htmp as H || fail 2 "wp_pure:" H "is not fresh");
wp_finish wp_finish
in in
lazymatch goal with lazymatch goal with
......
...@@ -193,7 +193,7 @@ Tactic failure: wp_pure: cannot find ?y in (Var "x") or ...@@ -193,7 +193,7 @@ Tactic failure: wp_pure: cannot find ?y in (Var "x") or
"test_wp_pure_credit_fail" "test_wp_pure_credit_fail"
: string : string
The command has indeed failed with message: The command has indeed failed with message:
Tactic failure: wp_pure: "Hcred" is not fresh. Tactic failure: wp_pure: "Hcred" is not fresh.
1 goal 1 goal
Σ : gFunctors Σ : gFunctors
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment