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
Followup of #17993, fixes #18239: anomaly on triggering conditions for simpl on encapsulated mutual fixpoints #18243
Conversation
@coqbot run full ci |
…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.
8e65e45
to
b789f40
Compare
@SkySkimmer: I renamed the OCaml variables in a way which I hope is clearer. I added new tests, checked the result of simpl, and documented the behavior (using a |
@coqbot run full ci |
Tried fiat crypto locally, Curves/Weierstrass/AffineProofs worked fine with |
@coqbot bench |
I retried 2 times and all 3 jobs failed the same way (
) |
also why is |
It did also fail on master in a similar way https://gitlab.inria.fr/coq/coq/-/jobs/3555681 |
🏁 Bench results:
INFO: failed to install 🐢 Top 25 slow downs┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ │ TOP 25 SLOW DOWNS │ │ │ │ OLD NEW DIFF %DIFF Ln FILE │ ├────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤ │ 40.2370 42.2890 2.0520 5.10% 224 coq-performance-tests-lite/PerformanceExperiments/rewrite_lift_lets_map.v.html │ │ 41.3580 43.3830 2.0250 4.90% 236 coq-rewriter-perf-SuperFast/src/Rewriter/Rewriter/Examples/PerfTesting/LiftLetsMap.v.html │ │ 41.6540 43.4500 1.7960 4.31% 236 coq-rewriter/src/Rewriter/Rewriter/Examples/PerfTesting/LiftLetsMap.v.html │ │ 49.7160 51.4440 1.7280 3.48% 365 coq-mathcomp-odd-order/theories/PFsection4.v.html │ │ 41.3120 42.6930 1.3810 3.34% 368 coq-mathcomp-odd-order/theories/PFsection4.v.html │ │ 62.7730 63.9000 1.1270 1.80% 139 coq-fiat-parsers/src/Parsers/Refinement/SharpenedJSON.v.html │ │ 211.6500 212.6680 1.0180 0.48% 141 coq-fiat-crypto-with-bedrock/src/UnsaturatedSolinasHeuristics/Tests.v.html │ │ 24.3110 25.1150 0.8040 3.31% 20 coq-fiat-crypto-with-bedrock/src/Spec/Test/X25519.v.html │ │ 24.3180 25.1090 0.7910 3.25% 25 coq-fiat-crypto-with-bedrock/src/Spec/Test/X25519.v.html │ │ 19.0320 19.6470 0.6150 3.23% 28 coq-fiat-crypto-with-bedrock/src/Spec/Test/X25519.v.html │ │ 121.1760 121.7520 0.5760 0.48% 155 coq-fiat-crypto-with-bedrock/src/UnsaturatedSolinasHeuristics/Tests.v.html │ │ 34.6070 35.0830 0.4760 1.38% 548 coq-fiat-crypto-with-bedrock/rupicola/bedrock2/compiler/src/compiler/MMIO.v.html │ │ 28.3320 28.7390 0.4070 1.44% 147 coq-vst/veric/expr_lemmas4.v.html │ │ 10.8320 11.2140 0.3820 3.53% 55 coq-category-theory/Construction/Comma/Natural/Transformation.v.html │ │ 12.7020 13.0840 0.3820 3.01% 15 coq-fiat-crypto-with-bedrock/src/Spec/Test/X25519.v.html │ │ 45.7750 46.1490 0.3740 0.82% 558 coq-bedrock2/bedrock2/src/bedrock2Examples/insertionsort.v.html │ │ 10.2910 10.6590 0.3680 3.58% 496 coq-rewriter/src/Rewriter/Rewriter/Wf.v.html │ │ 113.3430 113.7070 0.3640 0.32% 999 coq-performance-tests-lite/src/fiat_crypto_via_setoid_rewrite_standalone.v.html │ │ 13.0830 13.4320 0.3490 2.67% 55 coq-fiat-crypto-with-bedrock/src/Bedrock/End2End/X25519/Field25519.v.html │ │ 16.4700 16.8190 0.3490 2.12% 957 coq-unimath/UniMath/CategoryTheory/Monoidal/Examples/DisplayedCartesianMonoidal.v.html │ │ 20.8700 21.1970 0.3270 1.57% 49 coq-fiat-crypto-with-bedrock/src/Curves/Weierstrass/AffineProofs.v.html │ │ 51.7610 52.0740 0.3130 0.60% 50 coq-fiat-crypto-with-bedrock/src/Bedrock/Field/Synthesis/Examples/p224_64_new.v.html │ │ 142.8150 143.1250 0.3100 0.22% 1190 coq-unimath/UniMath/CategoryTheory/GrothendieckConstruction/IsPullback.v.html │ │ 27.4860 27.7830 0.2970 1.08% 194 coq-vst/veric/expr_lemmas4.v.html │ │ 126.3220 126.6090 0.2870 0.23% 22 coq-fiat-crypto-with-bedrock/src/Rewriter/Passes/ArithWithCasts.v.html │ └────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ 🐇 Top 25 speed ups┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ │ TOP 25 SPEED UPS │ │ │ │ OLD NEW DIFF %DIFF Ln FILE │ ├─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤ │ 54.9890 53.7650 -1.2240 -2.23% 915 coq-fiat-crypto-with-bedrock/src/Bedrock/End2End/X25519/GarageDoor.v.html │ │ 114.5260 113.6070 -0.9190 -0.80% 48 coq-fiat-crypto-with-bedrock/src/Curves/Weierstrass/AffineProofs.v.html │ │ 90.9920 90.2280 -0.7640 -0.84% 103 coq-fiat-crypto-with-bedrock/src/Arithmetic/BarrettReduction.v.html │ │ 18.1080 17.4120 -0.6960 -3.84% 3269 coq-fiat-crypto-with-bedrock/src/Assembly/WithBedrock/Proofs.v.html │ │ 22.5970 21.9760 -0.6210 -2.75% 219 coq-fiat-crypto-with-bedrock/src/Curves/EdwardsMontgomery.v.html │ │ 2.3690 1.7780 -0.5910 -24.95% 209 coq-stdlib/setoid_ring/Ncring_tac.v.html │ │ 23.1320 22.5440 -0.5880 -2.54% 352 coq-fiat-crypto-with-bedrock/src/Curves/Montgomery/XZProofs.v.html │ │ 28.2970 27.7810 -0.5160 -1.82% 12 coq-fourcolor/theories/job299to302.v.html │ │ 28.4030 28.0070 -0.3960 -1.39% 12 coq-fourcolor/theories/job618to622.v.html │ │ 28.3050 27.9140 -0.3910 -1.38% 12 coq-fourcolor/theories/job279to282.v.html │ │ 19.5460 19.1680 -0.3780 -1.93% 40 coq-fiat-crypto-with-bedrock/src/PushButtonSynthesis/SolinasReductionReificationCache.v.html │ │ 8.0860 7.7170 -0.3690 -4.56% 2854 coq-fiat-crypto-with-bedrock/src/Assembly/EquivalenceProofs.v.html │ │ 23.3150 22.9590 -0.3560 -1.53% 12 coq-fourcolor/theories/job283to286.v.html │ │ 14.6710 14.3250 -0.3460 -2.36% 315 coq-fiat-crypto-with-bedrock/src/Bedrock/Group/ScalarMult/MontgomeryLadder.v.html │ │ 12.0170 11.6860 -0.3310 -2.75% 258 coq-fiat-crypto-with-bedrock/src/Curves/Montgomery/XZProofs.v.html │ │ 20.6810 20.3500 -0.3310 -1.60% 1073 coq-metacoq-safechecker/safechecker/theories/PCUICSafeReduce.v.html │ │ 161.8300 161.5050 -0.3250 -0.20% 233 coq-fiat-crypto-with-bedrock/rupicola/bedrock2/deps/riscv-coq/src/riscv/Proofs/DecodeByExtension.v.html │ │ 34.2650 33.9460 -0.3190 -0.93% 12 coq-fourcolor/theories/job165to189.v.html │ │ 40.2520 39.9360 -0.3160 -0.79% 835 coq-fiat-crypto-with-bedrock/src/Fancy/Compiler.v.html │ │ 35.1840 34.8730 -0.3110 -0.88% 12 coq-fourcolor/theories/job254to270.v.html │ │ 9.2280 8.9420 -0.2860 -3.10% 149 coq-category-theory/Structure/Monoid.v.html │ │ 19.7460 19.4610 -0.2850 -1.44% 12 coq-fourcolor/theories/job550to553.v.html │ │ 14.7740 14.4890 -0.2850 -1.93% 212 coq-fiat-crypto-with-bedrock/src/Curves/Weierstrass/Projective.v.html │ │ 30.3860 30.1090 -0.2770 -0.91% 12 coq-fourcolor/theories/job287to290.v.html │ │ 10.8700 10.5950 -0.2750 -2.53% 497 coq-mathcomp-algebra/mathcomp/algebra/ssrnum.v.html │ └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ |
Got it to pass after another retry, with the failures on master I gurss it's an unrelated problem. @coqbot merge now |
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.
In addition to fixing bug #18239, introduced in #17993, this fixes also a similar bug anterior to #17993.
Fixes #18239