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
Revert "Stop doing early universe minimization and nf_evar in abstract" #18640
Conversation
This reverts commit fea5fcc.
I have tested these two commits on top of the |
3b76e88
to
a657220
Compare
We should probably @coqbot bench |
Fixed by reverting fea5fcc The reason the first abstract changes the behaviour is that it changes which branch we take in https://github.com/coq/coq/blob/3d86c1d4569b0a25a00677833b9f47c3059a8345/vernac/declare.ml#L1826 Why we have this code is not clear but removing it (so it becomes just `if not poly && keep_body_ucst_separate`) causes undefined universe anomaly at https://github.com/coq/coq/blob/3d86c1d4569b0a25a00677833b9f47c3059a8345/test-suite/success/rewrite.v#L50 In any case with this code and fea5fcc (indeed from coq#17745) we use an unminimized initial_euctx which has `{foo.5} |= Set = foo.5` which is added to the global env (we are in univ monomorphic mode), and since monomorphic universes are declared `> Set` we get the error. I guess short term we should revert fea5fcc and long term we should look into not checking is_empty_private_constants.
a657220
to
14685d5
Compare
just added changelog |
🏁 Bench results:
🐢 Top 25 slow downs┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ │ TOP 25 SLOW DOWNS │ │ │ │ OLD NEW DIFF %DIFF Ln FILE │ ├─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤ │ 250.5120 251.9870 1.4750 0.59% 8 coq-neural-net-interp-computed-lite/theories/MaxOfTwoNumbersSimpler/Computed/AllLogits.v.html │ │ 150.8370 151.9040 1.0670 0.71% 1190 coq-unimath/UniMath/CategoryTheory/GrothendieckConstruction/IsPullback.v.html │ │ 62.2650 63.2840 1.0190 1.64% 609 coq-fiat-crypto-with-bedrock/rupicola/bedrock2/bedrock2/src/bedrock2Examples/lightbulb.v.html │ │ 3.1020 3.9830 0.8810 28.40% 24 coq-fiat-crypto-with-bedrock/src/Rewriter/Passes/MultiRetSplit.v.html │ │ 8.6970 9.5000 0.8030 9.23% 447 coq-unimath/UniMath/CategoryTheory/DisplayedCats/Examples/StrictTwoSidedDispCat.v.html │ │ 100.5370 101.3270 0.7900 0.79% 20 coq-fiat-crypto-with-bedrock/src/Rewriter/Passes/NBE.v.html │ │ 46.7820 47.5170 0.7350 1.57% 558 coq-fiat-crypto-with-bedrock/rupicola/bedrock2/bedrock2/src/bedrock2Examples/insertionsort.v.html │ │ 11.0670 11.7960 0.7290 6.59% 410 coq-verdi-raft/theories/RaftProofs/LeaderLogsLogMatchingProof.v.html │ │ 22.3910 22.9600 0.5690 2.54% 595 coq-unimath/UniMath/CategoryTheory/GrothendieckConstruction/IsPullback.v.html │ │ 96.1950 96.7200 0.5250 0.55% 968 coq-performance-tests-lite/src/fiat_crypto_via_setoid_rewrite_standalone.v.html │ │ 2.2270 2.7240 0.4970 22.32% 490 coq-stdlib/Reals/Cauchy/ConstructiveCauchyRealsMult.v.html │ │ 130.4550 130.9430 0.4880 0.37% 22 coq-fiat-crypto-with-bedrock/src/Rewriter/Passes/ArithWithCasts.v.html │ │ 0.5230 0.9930 0.4700 89.87% 291 coq-metacoq-pcuic/pcuic/theories/PCUICContextConversion.v.html │ │ 96.1480 96.6140 0.4660 0.48% 999 coq-performance-tests-lite/src/fiat_crypto_via_setoid_rewrite_standalone.v.html │ │ 33.9960 34.4530 0.4570 1.34% 79 coq-rewriter/src/Rewriter/Rewriter/Examples/PerfTesting/SieveOfEratosthenes.v.html │ │ 24.3490 24.7890 0.4400 1.81% 85 coq-fiat-crypto-with-bedrock/src/Curves/Montgomery/AffineProofs.v.html │ │ 9.2280 9.6350 0.4070 4.41% 420 coq-engine-bench-lite/coq/PerformanceDemos/one_step_reduction.v.html │ │ 3.0300 3.4310 0.4010 13.23% 757 coq-fiat-crypto-with-bedrock/src/AbstractInterpretation/ZRangeProofs.v.html │ │ 33.7720 34.1680 0.3960 1.17% 79 coq-rewriter-perf-SuperFast/src/Rewriter/Rewriter/Examples/PerfTesting/SieveOfEratosthenes.v.html │ │ 0.5260 0.8890 0.3630 69.01% 265 coq-metacoq-pcuic/pcuic/theories/PCUICContextConversion.v.html │ │ 0.8110 1.1540 0.3430 42.29% 384 coq-stdlib/MSets/MSetAVL.v.html │ │ 79.3800 79.6960 0.3160 0.40% 48 coq-fiat-crypto-with-bedrock/src/Curves/Weierstrass/AffineProofs.v.html │ │ 0.5970 0.9090 0.3120 52.26% 1073 coq-unimath/UniMath/CategoryTheory/DisplayedCats/Examples/StrictTwoSidedDispCat.v.html │ │ 17.8120 18.1120 0.3000 1.68% 32 coq-performance-tests-lite/src/pattern.v.html │ │ 8.8750 9.1620 0.2870 3.23% 3269 coq-fiat-crypto-with-bedrock/src/Assembly/WithBedrock/Proofs.v.html │ └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ 🐇 Top 25 speed ups┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ │ TOP 25 SPEED UPS │ │ │ │ OLD NEW DIFF %DIFF Ln FILE │ ├────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤ │ 65.5410 63.0580 -2.4830 -3.79% 609 coq-bedrock2/bedrock2/src/bedrock2Examples/lightbulb.v.html │ │ 67.9390 67.0530 -0.8860 -1.30% 27 coq-fiat-crypto-with-bedrock/src/Rewriter/Passes/ToFancyWithCasts.v.html │ │ 13.3060 12.4270 -0.8790 -6.61% 82 coq-rewriter/src/Rewriter/Rewriter/Examples.v.html │ │ 3.9990 3.1580 -0.8410 -21.03% 27 coq-fiat-crypto-with-bedrock/src/Rewriter/Passes/ToFancyWithCasts.v.html │ │ 95.2130 94.5230 -0.6900 -0.72% 103 coq-fiat-crypto-with-bedrock/src/Arithmetic/BarrettReduction.v.html │ │ 13.3920 12.7420 -0.6500 -4.85% 88 coq-rewriter/src/Rewriter/Rewriter/Examples.v.html │ │ 9.5490 8.9460 -0.6030 -6.31% 952 coq-unimath/UniMath/CategoryTheory/DisplayedCats/Examples/StrictTwoSidedDispCat.v.html │ │ 33.7150 33.1270 -0.5880 -1.74% 839 coq-unimath/UniMath/CategoryTheory/GrothendieckConstruction/IsPullback.v.html │ │ 18.2160 17.6590 -0.5570 -3.06% 61 coq-rewriter/src/Rewriter/Rewriter/Examples/PrefixSums.v.html │ │ 6.7630 6.2230 -0.5400 -7.98% 23 coq-rewriter/src/Rewriter/Demo.v.html │ │ 8.7660 8.2300 -0.5360 -6.11% 34 coq-rewriter/src/Rewriter/Rewriter/Examples/PerfTesting/Plus0Tree.v.html │ │ 11.2810 10.7590 -0.5220 -4.63% 79 coq-rewriter/src/Rewriter/Rewriter/Examples/PerfTesting/LiftLetsMap.v.html │ │ 8.7510 8.2300 -0.5210 -5.95% 27 coq-rewriter-perf-SuperFast/src/Rewriter/Rewriter/Examples/PerfTesting/UnderLetsPlus0.v.html │ │ 11.2030 10.7020 -0.5010 -4.47% 79 coq-rewriter-perf-SuperFast/src/Rewriter/Rewriter/Examples/PerfTesting/LiftLetsMap.v.html │ │ 18.3380 17.8440 -0.4940 -2.69% 31 coq-engine-bench-lite/coq/PerformanceDemos/pattern.v.html │ │ 2.2520 1.7870 -0.4650 -20.65% 736 coq-stdlib/Reals/Cauchy/ConstructiveCauchyReals.v.html │ │ 44.3520 43.9050 -0.4470 -1.01% 827 coq-vst/veric/binop_lemmas4.v.html │ │ 1.0380 0.6100 -0.4280 -41.23% 813 coq-stdlib/MSets/MSetRBT.v.html │ │ 8.7240 8.3170 -0.4070 -4.67% 34 coq-rewriter-perf-SuperFast/src/Rewriter/Rewriter/Examples/PerfTesting/Plus0Tree.v.html │ │ 2.0950 1.6920 -0.4030 -19.24% 42 coq-fiat-crypto-with-bedrock/src/Rewriter/Passes/ToFancyWithCasts.v.html │ │ 6.5870 6.1990 -0.3880 -5.89% 10 coq-rewriter/src/Rewriter/Rewriter/Examples.v.html │ │ 19.4790 19.0990 -0.3800 -1.95% 2736 coq-metacoq-safechecker/safechecker/theories/PCUICTypeChecker.v.html │ │ 0.6770 0.2990 -0.3780 -55.83% 870 coq-stdlib/MSets/MSetRBT.v.html │ │ 8.7410 8.3950 -0.3460 -3.96% 27 coq-rewriter/src/Rewriter/Rewriter/Examples/PerfTesting/UnderLetsPlus0.v.html │ │ 15.2780 14.9350 -0.3430 -2.25% 613 coq-fiat-crypto-with-bedrock/rupicola/bedrock2/compiler/src/compiler/FlattenExpr.v.html │ └────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine as a hotfix.
@coqbot merge now |
… and nf_evar in abstract"
Fix #18636