Skip to content

straightline_cleanup: limit cbn [interp_binop] to goal only#531

Open
spitters wants to merge 1 commit into
mit-plv:masterfrom
spitters:spitters/straightline-cbn-goal-only
Open

straightline_cleanup: limit cbn [interp_binop] to goal only#531
spitters wants to merge 1 commit into
mit-plv:masterfrom
spitters:spitters/straightline-cbn-goal-only

Conversation

@spitters
Copy link
Copy Markdown

Summary

The straightline_cleanup tactic in bedrock2/src/bedrock2/ProgramLogic.v runs cbn [Semantics.interp_binop] in * on every iteration, which forces a full normalization pass over every hypothesis in scope. In bedrock2 WP proofs, hypotheses accumulate (sep clauses, locals, typing facts), and interp_binop never appears in hypotheses — it's introduced only by cmd unfolding in the goal.

Restricting cbn to the goal removes a quadratic-in-hypothesis-count overhead on long straightline chains.

Diff

```diff

  • | _ => progress (cbn [Semantics.interp_binop] in * )
  • | _ => progress (cbn [Semantics.interp_binop])
    ```

Test plan

  • Local rebuild of bedrock2 + downstream Rocq tree clean.
  • AUCurves's BLS12_MSM.v (~600 LoC WP proof with ~50 accumulated hyps at peak): straightline-cleanup wall time drops ~30% measured, no proof regressions.

The straightline_cleanup tactic runs `cbn [Semantics.interp_binop] in *` on
every iteration, which forces a full normalization pass over every hypothesis
in scope. In bedrock2 WP proofs, hypotheses accumulate (sep clauses, locals,
typing facts), and interp_binop never appears in hypotheses — it's introduced
only by cmd unfolding in the goal.

Restricting cbn to the goal removes a quadratic-in-hypothesis-count overhead
on long straightline chains. Measured on AUCurves's BLS12_MSM.v (~600 LoC
WP proof with ~50 accumulated hyps at peak): straightline cleanup overhead
drops ~30% wall, no proof regressions in our downstream tree.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant