feat: port HeapLang pure step tactics#516
Conversation
|
Thanks for the PR! It looks good and is ready for merging. One minor thing: the error messages mentioning other tactics are a bit confusing. Worth opening an issue to resolve later. |
@lzy0505 Are you referring to, for example, an error thrown by This has actually been an issue with some existing IPM tactics (see one of the example proofs in I have (partially) addressed this in some of the open PRs by passing the tactic names to the functions that uses |
|
@alvinylt Yes. We should address this systematically. Extending |
Port the wp_pure wrapper tactic family from iris_heap_lang/proofmode.v: wp_lam, wp_let, wp_seq, wp_closure, wp_if, wp_if_true, wp_if_false, wp_proj, wp_inj, wp_pair, wp_unop, wp_binop, wp_op, wp_case, and wp_match. The Lean implementation follows the Rocq implementation with these tactics being thin wrappers around wp_pure. Raise the precedence of wp_pure's focus argument to hl_exp:10 mirroring wp_bind. At default precedence, e.g. `wp_pure <pat>; wp_lam` misparses the focus pattern instead of sequencing. Import PrimitiveLaws from HeapLang/ProofMode, since the wp_rec macro expands to an application of the wp_rec lemma defined there. Add a test section per tactic covering at least one successful and one failing case
942958a to
3e55b40
Compare
Description
Port the wp_pure wrapper tactic family from
iris_heap_lang/proofmode.v:wp_lam,wp_let,wp_seq,wp_closure,wp_if,wp_if_true,wp_if_false,wp_proj,wp_inj,wp_pair,wp_unop,wp_binop,wp_op,wp_case, andwp_match.The Lean implementation follows the Rocq implementation with these tactics being mostly thin wrappers around wp_pure.
Raise the precedence of
wp_pure's focus argument tohl_exp:10mirroringwp_bind. At default precedence, e.g.wp_pure <pat>; wp_lammisparses the;as focus pattern instead of sequencing.Add a test section per tactic covering at least one successful and one failing case.
Partially addresses #480
AI Disclaimer: I am familiar with the Iris-Rocq HeapLang tactic implementation and used Claude Code to help navigate the codebase and assist with testcase boilerplate.
Checklist
authorssection of any appropriate files