Skip to content
Snippets Groups Projects
Commit b4d7c4ef authored by Robbert Krebbers's avatar Robbert Krebbers
Browse files

Only run `simpl` locally.

parent 133d10e0
No related branches found
No related tags found
No related merge requests found
...@@ -24,16 +24,18 @@ Proof. rewrite /envs_entails=> ? ->. by apply wp_value. Qed. ...@@ -24,16 +24,18 @@ Proof. rewrite /envs_entails=> ? ->. by apply wp_value. Qed.
Ltac wp_value_head := eapply tac_wp_value; [apply _|lazy beta]. Ltac wp_value_head := eapply tac_wp_value; [apply _|lazy beta].
Tactic Notation "wp_pure" open_constr(efoc) := Tactic Notation "wp_pure" open_constr(efoc) :=
iStartProof; simpl; (* simpl possible [of_val]s *) iStartProof;
lazymatch goal with lazymatch goal with
| |- envs_entails _ (wp ?E ?e ?Q) => reshape_expr e ltac:(fun K e' => | |- envs_entails _ (wp ?E ?e ?Q) =>
unify e' efoc; let e := eval simpl in e in
eapply (tac_wp_pure _ _ _ (fill K e')); reshape_expr e ltac:(fun K e' =>
[apply _ (* PureExec *) unify e' efoc;
|try fast_done (* The pure condition for PureExec *) eapply (tac_wp_pure _ _ _ (fill K e'));
|apply _ (* IntoLaters *) [apply _ (* PureExec *)
|simpl_subst; try wp_value_head (* new goal *) |try fast_done (* The pure condition for PureExec *)
]) |apply _ (* IntoLaters *)
|simpl_subst; try wp_value_head (* new goal *)
])
|| fail "wp_pure: cannot find" efoc "in" e "or" efoc "is not a reduct" || fail "wp_pure: cannot find" efoc "in" e "or" efoc "is not a reduct"
| _ => fail "wp_pure: not a 'wp'" | _ => fail "wp_pure: not a 'wp'"
end. end.
......
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