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
Error: Anomaly "Not an unfoldable reference." #18239
Comments
@coqbot minimize coq.dev git clone --recurse-submodules https://github.com/mit-plv/fiat-crypto.git --branch=sp2019latest
cd fiat-crypto
make TIMED=1 some-early util |
Hey @JasonGross, the coq bug minimizer is running your script, I'll come back to you with the results once it's done. |
This comment was marked as outdated.
This comment was marked as outdated.
Seems to be from #17993 |
Reduced Fixpoint even n := match n with 0 => true | S n => negb (odd n) end
with odd n := match n with 0 => false | S n => negb (even n) end.
Definition boo n (x:unit) := even n.
Eval simpl in boo 2. (* anomaly *) The problem appears with a partially applied definition whose body is a mutual fixpoint (PartialEvaluate is the partially applied definition in fcl). cc @herbelin |
Interestingly, the following fails similarly even before #17993: Fixpoint even n := match n with 0 => fun _ : unit => true | S n => odd n end
with odd n := match n with 0 => fun _ => false | S n => even n end.
Definition boo n (x:unit) := even n x.
Fail Eval simpl in boo 2.
(* Not an unfoldable reference. *) |
Another interesting example (before #17993): Fixpoint f_fix_fun n := match n with 0 => fun _ : unit => true | S n => fun _ => true end.
Definition boo_fix_fun n := f_fix_fun n.
Eval simpl in boo_fix_fun 2. (* fun _ : unit => true *)
Fixpoint f_fix n := match n with 0 => fun _ : unit => true | S n => fun _ => true end.
Definition boo_fix n := f_fix n tt.
Eval simpl in boo_fix 2. (* boo_fix 2 *)
Definition f_case n := match n with 0 => fun _ : unit => true | S n => fun _ => true end.
Definition boo_case n := f_case n tt.
Eval simpl in boo_case 2. (* true *) Shouldn't it be consistent, typically by reducing also |
…ons for simpl. We ensure that there are enough arguments in the original applied constant, in addition to ensuring enough arguments in the constant that immediately surrounds a global mutual fixpoint. This incidentally fixes a pre-coq#17993 bug.
…ons for simpl. We ensure that there are enough arguments in the original applied constant, in addition to ensuring enough arguments in the constant that immediately surrounds a global mutual fixpoint. This incidentally fixes a pre-coq#17993 bug.
…ing conditions for simpl on encapsulated mutual fixpoints Reviewed-by: SkySkimmer Co-authored-by: SkySkimmer <SkySkimmer@users.noreply.github.com>
… conditions for simpl." This reverts commit b789f40.
The [original justification](https://github.com/coq/coq/wiki/Coq-Call-2020-06-24#adding-back-fiat-crypto-legacy) was: > Jason is willing to put in the time to maintain it, and help > understanding failures in the proof automation part. > > Maxime suggests adding it to the allow_failure pipeline, but Théo > mentions it does not report back this information very well. A coqbot > change can allow that, pinging Jason in case of failure. Théo is on it. > Emilio raises the point that we still need to investigate regressions in > developments. We agree but see the cost/benefit for f-c-l to have been > too high in the past (partly due to our inability to quickly debug the > Ltac code there). Hence we compromise on this tradeoff of putting it in > allow-failure for now. However, there hasn't been an issue with the Ltac code in fiat-crypto-legacy in a long time, the brief stint of time when f-c-l was failing on master resulted in a bug in Coq being missed (see coq#18239), and there is no longer any backwards compatibility that we are trying to maintain with f-c-l, insofar as we are moving towards Ltac2 and away from Ltac1, I expect that there shouldn't be too many semantics changes in Ltac1, and so I think it may be time to remove the allow_failure.
Within the past four days or so (since the merging of #18014), it seems there's been a regression that introduced an anomaly into fiat-crypto-legacy:
The text was updated successfully, but these errors were encountered: