Repository navigation
feat(simplify): proof-local reduction-opacity overrides - #1245
Merged
Merged
Conversation
The hint clause gains two items, `-delta op` and `+delta op`, at every
granularity: proof-local, tactic-local and per call.
hint -delta f.
with hint -delta f (done).
simplify hint -delta f.
`-delta op` blocks the delta- and iota-reduction (match-fix) of `op`;
`+delta op` allows it, even when `op` is declared `[opaque]`. An
explicit unfolding (`cbv op`, `rewrite /op`) still unfolds.
The overrides live in the proof-local simplify context and travel with
`user_local`. They are consulted at the match-fix sites of
EcReduction and EcCallbyValue, and at the delta sites.
The reductions of crush that used a fixed strategy, namely the head
reductions of `t_lazy_match` and the closing simplification of
`t_crush` and `t_crush_fwd`, now take the whole proof-local simplify
context: its activated databases, local rules and opacity overrides.
A rule of a database activated with `hint +db` used to be invisible
there, so a rule that applies only after an unfolding never fired
inside `/>`, while the same rule in the default database did.
Tests in tests/hint-delta-opacity.ec and tests/hint-db-crush.ec.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The hint clause gains two items,
-delta opand+delta op, at everygranularity: proof-local, tactic-local and per call.
-delta opblocks the delta- and iota-reduction (match-fix) ofop;+delta opallows it, even whenopis declared[opaque]. Anexplicit unfolding (
cbv op,rewrite /op) still unfolds.The overrides live in the proof-local simplify context and travel with
user_local. They are consulted at the match-fix sites ofEcReduction and EcCallbyValue, and at the delta sites.
The reductions of crush that used a fixed strategy, namely the head
reductions of
t_lazy_matchand the closing simplification oft_crushandt_crush_fwd, now take the whole proof-local simplifycontext: its activated databases, local rules and opacity overrides.
A rule of a database activated with
hint +dbused to be invisiblethere, so a rule that applies only after an unfolding never fired
inside
/>, while the same rule in the default database did.Tests in tests/hint-delta-opacity.ec and tests/hint-db-crush.ec.