Remove vernacstate cache#21975
Conversation
|
@coqbot bench |
|
rocqide bug (also in master): Lemma foo : Set.
Proof.
exact Type.
Qed.step to after Proof, set printing universes in IDE interface, go to end: the error message does not print universes |
|
🏁 Bench results: INFO: failed to install rocq-mathcomp-boot (dependency rocq-elpi failed) 🐢 Top 25 slow downs┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ │ TOP 25 SLOW DOWNS │ │ │ │ OLD NEW DIFF %DIFF Ln FILE │ ├───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤ │ 203 206 3.0066 1.48% 8 coq-neural-net-interp-computed-lite/theories/MaxOfTwoNumbersSimpler/Computed/AllLogits.v.html │ │ 94.3 96.5 2.1806 2.31% 968 coq-performance-tests-lite/src/fiat_crypto_via_setoid_rewrite_standalone.v.html │ │ 94.9 96.5 1.6773 1.77% 999 coq-performance-tests-lite/src/fiat_crypto_via_setoid_rewrite_standalone.v.html │ │ 21.7 22.5 0.8106 3.74% 49 coq-fiat-crypto-with-bedrock/src/Curves/Weierstrass/AffineProofs.v.html │ │ 41.9 42.7 0.7804 1.86% 221 coq-fiat-crypto-with-bedrock/src/Bedrock/P256/Coord32.v.html │ │ 36.1 36.9 0.7441 2.06% 222 coq-fiat-crypto-with-bedrock/src/Bedrock/P256/Coord32.v.html │ │ 22.9 23.5 0.6337 2.77% 776 coq-fiat-crypto-with-bedrock/src/Bedrock/Secp256k1/JoyeLadder.v.html │ │ 26.8 27.5 0.6294 2.35% 794 coq-fiat-crypto-with-bedrock/src/Bedrock/Secp256k1/JoyeLadder.v.html │ │ 0.944 1.54 0.5970 63.25% 572 rocq-stdlib/theories/MSets/MSetAVL.v.html │ │ 21.4 22.0 0.5613 2.62% 242 coq-fiat-crypto-with-bedrock/src/Bedrock/P256/Coord32.v.html │ │ 30.5 31.1 0.5588 1.83% 223 coq-fiat-crypto-with-bedrock/src/Bedrock/P256/Coord32.v.html │ │ 24.3 24.8 0.4968 2.05% 782 coq-fiat-crypto-with-bedrock/src/Bedrock/Secp256k1/JoyeLadder.v.html │ │ 31.0 31.5 0.4896 1.58% 255 coq-fiat-crypto-with-bedrock/src/Bedrock/P256/Coord.v.html │ │ 25.0 25.4 0.4548 1.82% 224 coq-fiat-crypto-with-bedrock/src/Bedrock/P256/Coord32.v.html │ │ 18.0 18.4 0.4447 2.47% 32 coq-performance-tests-lite/src/pattern.v.html │ │ 38.4 38.8 0.4441 1.16% 224 coq-performance-tests-lite/PerformanceExperiments/rewrite_lift_lets_map.v.html │ │ 44.6 45.0 0.4305 0.97% 257 coq-fiat-crypto-with-bedrock/src/Bedrock/P256/Jacobian.v.html │ │ 0.346 0.775 0.4292 124.16% 682 rocq-stdlib/theories/Numbers/DecimalFacts.v.html │ │ 3.81 4.23 0.4244 11.14% 492 rocq-stdlib/theories/Reals/Cauchy/ConstructiveCauchyRealsMult.v.html │ │ 20.3 20.7 0.4138 2.04% 233 coq-fiat-crypto-with-bedrock/src/Bedrock/P256/Coord32.v.html │ │ 36.6 37.0 0.4106 1.12% 139 coq-fiat-parsers/src/Parsers/Refinement/SharpenedJSON.v.html │ │ 17.0 17.4 0.3990 2.34% 762 coq-fiat-crypto-with-bedrock/src/Bedrock/Secp256k1/JoyeLadder.v.html │ │ 25.1 25.5 0.3918 1.56% 550 coq-fiat-crypto-with-bedrock/rupicola/bedrock2/bedrock2/src/bedrock2Examples/insertionsort.v.html │ │ 16.9 17.2 0.3697 2.19% 6 coq-fiat-crypto-with-bedrock/rupicola/bedrock2/deps/riscv-coq/src/riscv/Proofs/DecodeEncodeCSR.v.html │ │ 3.40 3.75 0.3513 10.34% 233 coq-fiat-crypto-with-bedrock/src/Bedrock/P256/RecodeProofs.v.html │ └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ 🐇 Top 25 speed ups┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ │ TOP 25 SPEED UPS │ │ │ │ OLD NEW DIFF %DIFF Ln FILE │ ├─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤ │ 40.3 39.1 -1.2355 -3.07% 1423 coq-fiat-crypto-with-bedrock/rupicola/bedrock2/compiler/src/compiler/FlatToRiscvFunctions.v.html │ │ 44.4 43.5 -0.9513 -2.14% 578 coq-fiat-crypto-with-bedrock/rupicola/bedrock2/compiler/src/compiler/MMIO.v.html │ │ 84.0 83.2 -0.8161 -0.97% 48 coq-fiat-crypto-with-bedrock/src/Curves/Weierstrass/AffineProofs.v.html │ │ 12.2 11.5 -0.6939 -5.69% 194 coq-fiat-crypto-with-bedrock/src/Fancy/Barrett256.v.html │ │ 2.76 2.14 -0.6281 -22.72% 212 rocq-stdlib/theories/setoid_ring/Ncring_tac.v.html │ │ 108 108 -0.6070 -0.56% 22 coq-fiat-crypto-with-bedrock/src/Rewriter/Passes/ArithWithCasts.v.html │ │ 12.9 12.3 -0.5689 -4.41% 1628 coq-fiat-crypto-with-bedrock/src/Util/FSets/FMapTrie.v.html │ │ 30.4 29.8 -0.5555 -1.83% 305 coq-fiat-crypto-with-bedrock/src/Bedrock/Secp256k1/Addchain.v.html │ │ 0.773 0.230 -0.5430 -70.24% 374 rocq-stdlib/theories/Sorting/SetoidList.v.html │ │ 54.8 54.3 -0.5328 -0.97% 296 coq-fiat-crypto-with-bedrock/src/Bedrock/Secp256k1/Addchain.v.html │ │ 0.776 0.271 -0.5050 -65.04% 484 rocq-stdlib/theories/Numbers/HexadecimalFacts.v.html │ │ 4.15 3.66 -0.4889 -11.78% 196 rocq-stdlib/theories/ZArith/ZModOffset.v.html │ │ 21.1 20.7 -0.4089 -1.94% 479 rocq-metarocq-erasure/erasure/theories/EWcbvEvalCstrsAsBlocksFixLambdaInd.v.html │ │ 0.800 0.398 -0.4015 -50.20% 1604 rocq-stdlib/theories/micromega/Tauto.v.html │ │ 0.905 0.507 -0.3983 -44.01% 586 rocq-stdlib/theories/Strings/Byte.v.html │ │ 42.3 41.9 -0.3967 -0.94% 543 coq-fiat-crypto-with-bedrock/src/Bedrock/End2End/X25519/EdwardsXYZT.v.html │ │ 59.6 59.2 -0.3921 -0.66% 659 coq-fiat-crypto-with-bedrock/src/Bedrock/Secp256k1/JacobianCoZ.v.html │ │ 10.0 9.66 -0.3662 -3.65% 2852 coq-fiat-crypto-with-bedrock/src/Assembly/EquivalenceProofs.v.html │ │ 34.7 34.3 -0.3649 -1.05% 898 coq-fiat-crypto-with-bedrock/src/Bedrock/Secp256k1/JoyeLadder.v.html │ │ 1.43 1.07 -0.3590 -25.05% 733 coq-category-theory/Construction/Comma/Adjunction.v.html │ │ 16.2 15.8 -0.3380 -2.09% 632 coq-fiat-crypto-with-bedrock/rupicola/bedrock2/compiler/src/compiler/FlattenExpr.v.html │ │ 22.2 21.9 -0.3318 -1.50% 651 rocq-stdlib/theories/Zmod/ZmodBase.v.html │ │ 37.4 37.1 -0.3317 -0.89% 276 coq-fiat-crypto-with-bedrock/src/Bedrock/P256/Coord.v.html │ │ 0.395 0.0686 -0.3266 -82.64% 373 rocq-stdlib/theories/Sorting/SetoidList.v.html │ │ 31.7 31.4 -0.3211 -1.01% 198 coq-fiat-crypto-with-bedrock/src/Bedrock/Field/Synthesis/Examples/p224_64_new.v.html │ └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ |
|
Removing the cache seems ok to me. At the same time the disable_summary API for RocqIDE seems very ugly. IMO it is better to remove from RocqIDE the "printing options" and have the user write |
The root state was bugged in a way countered by a cache bug: - init_core / register_root_state would save the initial state, with Flags.quiet = false - init_extra would set Flags.quiet := true - restore_root_state would think the cache is still valid and so not touch Flags.quiet (NB: Flags.quiet is in the summary as goption "Silent") If we remove the cache (or invalidate after setting Flags.quiet) restore_root_state would restore Flags.quiet := false. Instead of trying to change the init flow to stop setting Flags.quiet between register and restore, we just remove the root state and the first saved state is the one saved by new_doc. This means there is no way to return to before new_doc, so STM can't handle more than 1 doc. AFAICT this is fine (in particular compile mode rejects multiple .v arguments, rocqide starts 1 idetop per document).
Otherwise setting the state to execute a command will overwrite the IDE options. (it works in master because of some unsound cache handling)
Knowing when to call invalidate is tricky so if bench agrees it's better to remove this.
Knowing when to call invalidate is tricky so if bench agrees it's
better to remove this.
Indeed in master the cache is handled unsoundly (skips unfreeze of a state which isn't the currently installed state) which hides some bugs:
Overlays: