Commit d1be2253 authored by Dan Frumin's avatar Dan Frumin

Use `PureExec` for pure symbolic execution rules

parent 8ec7cd1e
......@@ -128,14 +128,8 @@ Proof.
intros Hfill Hpure Hϕ Hb ? Hp. subst.
destruct b.
- destruct Hb as [[_ ?] | Hb']; last by inversion Hb'. subst.
rewrite -(bin_log_pure_l Δ Γ E2 K e1 e2 t τ).
{ exact Hp. }
{ intros. apply pure_exec_safe. exact Hϕ. }
{ intros. apply pure_exec_puredet; eauto. }
- rewrite -(bin_log_pure_masked_l Δ Γ E1 E2 K e1 e2 t τ).
{ exact Hp. }
{ intros. apply pure_exec_safe. exact Hϕ. }
{ intros. apply pure_exec_puredet; eauto. }
by rewrite -(bin_log_pure_l Δ Γ E2 K e1 e2 t τ _ _ Hϕ).
- by rewrite -(bin_log_pure_masked_l Δ Γ E1 E2 K e1 e2 t τ _ _ Hϕ).
Qed.
Tactic Notation "rel_pure_l" open_constr(ef) :=
......@@ -179,14 +173,7 @@ Lemma tac_rel_pure_r `{logrelG Σ} K e1 ℶ E1 E2 Δ Γ e e2 eres ϕ t τ :
envs_entails (bin_log_related E1 E2 Δ Γ t e τ).
Proof.
intros Hfill Hpure Hϕ ?? Hp. subst.
rewrite -(bin_log_pure_r Δ Γ E1 E2 K e1 e2 t τ).
{ exact Hp. }
{ assumption. }
{ intros σ.
destruct Hpure as [Hsafe Hstep].
destruct (Hsafe σ Hϕ) as [e2' [σ2' [? Hstep']]].
destruct (Hstep _ _ _ _ Hϕ Hstep') as (? & ? & ?); subst.
done. }
by rewrite -(bin_log_pure_r Δ Γ E1 E2 K e1 e2 t τ).
Qed.
Tactic Notation "rel_pure_r" open_constr(ef) :=
......
......@@ -30,7 +30,7 @@ Proof.
Qed.
Ltac tp_bind_helper :=
rewrite ?fill_app /=;
rewrite /=;
lazymatch goal with
| |- fill ?K ?e = fill _ ?efoc =>
reshape_expr e ltac:(fun K' e' =>
......@@ -184,12 +184,7 @@ Proof.
rewrite Hfill.
rewrite comm.
rewrite (assoc _ (spec_ctx ρ) (j _)%I).
rewrite step_pure //; last first.
{ intros σ.
destruct Hpure as [Hsafe Hstep].
destruct (Hsafe σ Hϕ) as [e2' [σ2' [? Hstep']]].
destruct (Hstep _ _ _ _ Hϕ Hstep') as (? & ? & ?); subst.
done. }
rewrite step_pure //.
rewrite -[Q]elim_modal.
apply uPred.sep_mono_r.
apply uPred.wand_intro_l.
......
This diff is collapsed.
......@@ -52,7 +52,7 @@ Section rules.
by apply head_prim_step.
Qed.
Lemma step_pure E ρ j K e e' :
Lemma step_pure_old E ρ j K e e' :
( σ, prim_step e σ e' σ [])
nclose specN E
spec_ctx ρ j fill K e ={E}= j fill K e'.
......@@ -69,6 +69,21 @@ Section rules.
iFrame. iPureIntro. eapply rtc_r, step_insert_no_fork_prim; eauto.
Qed.
Lemma step_pure E ρ j K e e' ϕ :
PureExec ϕ e e'
nclose specN E
ϕ
spec_ctx ρ j fill K e ={E}= j fill K e'.
Proof.
intros Hpure Hcl Hϕ.
rewrite step_pure_old //; last first.
intros σ.
destruct Hpure as [Hsafe Hstep].
destruct (Hsafe σ Hϕ) as [e2' [σ2' [? Hstep']]].
destruct (Hstep _ _ _ _ Hϕ Hstep') as (? & ? & ?); subst.
done.
Qed.
Lemma step_alloc E ρ j K e v:
to_val e = Some v nclose specN E
spec_ctx ρ j fill K (ref e) ={E}= l, j fill K #l l ↦ₛ v.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment