Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Normalizer: invalidate memoizations if cfg changes #3072

Merged
merged 4 commits into from
Nov 1, 2023

Conversation

mtzguido
Copy link
Member

This is an old problem with the normalizer.

We first tried to fix it here: #2161, but that lead to several regressions in everest, so we dropped it. Another attempt was here #2175 (which I seem to have later messed up as a PR, the relevant commit is b860c96).

This revives the original fix and adds a compatibility option to make sure other projects keep working. I have an everest green and will make follow up PRs soon.

This was part of #2986, splitting it for better documentation.

Fixes #2155.

mtzguido added a commit to mtzguido/steel that referenced this pull request Oct 27, 2023
These two definitions failed after the fix in
FStarLang/FStar#3072. The assertions make it
work
mtzguido added a commit to mtzguido/steel that referenced this pull request Oct 27, 2023
I've seen this proof randomly regress several times, with the error:

* Error 228 at Steel.ST.Array.Util.fst(68,4-68,25):
  - Tactic failed
  - "apply_lemma: Cannot instantiate lemma FStar.Tactics.V2.Logic.fa_intro_lem (with postcondition: Prims.squash (forall (x: Steel.Effect.Common.vprop).
      Steel.Effect.Common.equiv (Steel.Effect.Common.VStar (*?u4892*) _ (*?u4888*) _) (*?u4880*) _ ==>
      (*?u4872*) _)) to match goal (Prims.squash (forall (x2: Steel.Effect.Common.vprop).
      Steel.Effect.Common.equiv (Steel.Effect.Common.VStar x x2) x ==>
      Steel.Effect.Common.equiv (Steel.Effect.Common.VStar x2 x)
        (Steel.Effect.Common.VStar (Steel.Effect.Common.VStar Steel.Effect.Common.emp x)
            Steel.Effect.Common.emp)))"

The latest one being when trying to merge the normalizer fix in
FStarLang/FStar#3072. Apparently, just adding an
extra unit makes it work, so I am just doing that to unblock the F* PR.
mtzguido added a commit to mtzguido/hacl-star that referenced this pull request Oct 30, 2023
Due to the normalizer fix in
FStarLang/FStar#3072, some old normalization
directives in Vale now behave differently, and the proofs fail. It's
quite hard to figure out why exactly, and probably not worth it. So, use
this compatibility option when required to keep the proofs working.
mtzguido added a commit to FStarLang/steel that referenced this pull request Oct 30, 2023
@mtzguido mtzguido merged commit ea917da into FStarLang:master Nov 1, 2023
@mtzguido mtzguido deleted the norm_fix branch November 1, 2023 20:21
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.

Memoization in the normalizer is not consistent with normalization requests
1 participant