-
Notifications
You must be signed in to change notification settings - Fork 447
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
feat: asynchronous kernel checking #6368
Draft
Kha
wants to merge
42
commits into
leanprover:kernel-env-base
Choose a base branch
from
Kha:async-tc
base: kernel-env-base
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Kha
force-pushed
the
async-tc
branch
6 times, most recently
from
December 13, 2024 09:36
06a6e24
to
b44a2ff
Compare
github-actions
bot
added
the
toolchain-available
A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN
label
Dec 13, 2024
Mathlib CI status (docs):
|
!bench |
Here are the benchmark results for commit 9b36754. |
!bench |
Here are the benchmark results for commit ed17ab3. Benchmark Metric Change
========================================================================
- big_do branches 4.0% (329.8 σ)
- big_do instructions 1.1% (63.6 σ)
- big_do maxrss 5.8% (124.1 σ)
+ big_omega.lean branch-misses -64.9% (-143.9 σ)
+ big_omega.lean branches -70.2% (-4059.2 σ)
+ big_omega.lean instructions -71.1% (-3756.4 σ)
+ big_omega.lean maxrss -54.7% (-105.7 σ)
+ big_omega.lean task-clock -74.6% (-347.4 σ)
+ big_omega.lean wall-clock -74.8% (-327.5 σ)
+ big_omega.lean MT branch-misses -69.1% (-546.0 σ)
+ big_omega.lean MT branches -72.4% (-9861.4 σ)
+ big_omega.lean MT instructions -72.9% (-13535.0 σ)
+ big_omega.lean MT maxrss -66.4% (-47.5 σ)
+ big_omega.lean MT task-clock -80.9% (-135.4 σ)
+ big_omega.lean MT wall-clock -80.9% (-135.2 σ)
+ binarytrees instructions -8.4% (-3211.4 σ)
+ binarytrees.st instructions -8.4% (-5177.1 σ)
- bv_decide_mul branches 1.5% (382.5 σ)
+ bv_decide_mul instructions -1.2% (-215.5 σ)
- bv_decide_mul maxrss 1.6% (42.3 σ)
+ bv_decide_realworld branches -1.5% (-178.8 σ)
+ bv_decide_realworld instructions -3.9% (-529.8 σ)
- bv_decide_realworld maxrss 4.1% (15.4 σ)
+ bv_decide_realworld task-clock -1.8% (-11.5 σ)
+ bv_decide_realworld wall-clock -2.1% (-15.1 σ)
+ const_fold instructions -3.5% (-82.7 σ)
+ deriv instructions -1.9% (-45.7 σ)
+ ilean roundtrip instructions -3.3% (-500.2 σ)
- import Lean branches 340.3% (6011.9 σ)
- import Lean instructions 238.0% (3468.3 σ)
- import Lean maxrss 2.9% (30.2 σ)
- import Lean task-clock 84.4% (17.1 σ)
- import Lean wall-clock 84.1% (17.1 σ)
- language server startup branches 50.5% (88.1 σ)
- language server startup instructions 38.5% (61.2 σ)
- language server startup wall-clock 19.1% (14.3 σ)
- liasolver instructions 3.5% (1661.0 σ)
+ liasolver maxrss -1.4% (-37.9 σ)
- libleanshared.so binary size 3.9%
+ nat_repr instructions -5.0% (-1756.3 σ)
+ parser instructions -4.4% (-1586.4 σ)
+ parser maxrss -1.4% (-37.9 σ)
+ qsort instructions -4.0% (-1866.2 σ)
+ qsort maxrss -1.4% (-16.6 σ)
- rbmap instructions 1.5% (184.0 σ)
+ rbmap_1 instructions -1.8% (-102.6 σ)
+ rbmap_fbip instructions -10.3% (-708.9 σ)
+ rbmap_library instructions -1.9% (-171.1 σ)
- reduceMatch instructions 17.1% (675.1 σ)
- reduceMatch maxrss 19.8% (820.9 σ)
- reduceMatch task-clock 12.8% (14.3 σ)
- reduceMatch wall-clock 12.4% (12.6 σ)
- simp_arith1 branch-misses 3.6% (12.7 σ)
- simp_arith1 branches 129.5% (4425.6 σ)
- simp_arith1 instructions 84.0% (2749.9 σ)
- simp_arith1 maxrss 3.6% (64.0 σ)
- simp_arith1 task-clock 43.7% (66.8 σ)
- simp_arith1 wall-clock 43.3% (55.9 σ)
- stdlib attribute application 199.1% (90.3 σ)
- stdlib dsimp 13.6% (20.7 σ)
- stdlib fix level params 10.8% (21.2 σ)
- stdlib instructions 13.0% (4005.3 σ)
- stdlib maxrss 39.4% (163.9 σ)
- stdlib process pre-definitions 162.7% (292.1 σ)
- stdlib share common exprs 12.5% (131.1 σ)
- stdlib tactic execution 25.2% (338.6 σ)
- stdlib task-clock 16.7% (1478.4 σ)
- stdlib type checking 38.8% (56.0 σ)
- stdlib wall-clock 14.9% (77.2 σ)
- stdlib size bytes .olean 2.7%
- stdlib size lines 2.3%
- stdlib size lines C 1.4%
- stdlib size max dynamic symbols 1.4%
- tests/bench/ interpreted instructions 3.1% (515.5 σ)
- tests/bench/ interpreted maxrss 3.6% (11.5 σ)
- tests/bench/ interpreted task-clock 32.8% (35.8 σ)
- tests/bench/ interpreted wall-clock 12.2% (21.4 σ)
- tests/compiler sum binary sizes 4.7%
+ unionfind instructions -8.2% (-2666.8 σ)
+ unionfind task-clock -11.6% (-20.6 σ)
+ unionfind wall-clock -11.6% (-20.6 σ)
- workspaceSymbols instructions 1.7% (2541.3 σ)
- workspaceSymbols maxrss 3.5% (73.0 σ) |
!bench |
Here are the benchmark results for commit ed17ab3. Benchmark Metric Change
========================================================================
- big_do branches 3.5% (293.7 σ)
- big_do instructions 2.7% (159.7 σ)
- big_do maxrss 5.6% (119.1 σ)
+ big_omega.lean branch-misses -65.2% (-145.9 σ)
+ big_omega.lean branches -70.4% (-4095.9 σ)
+ big_omega.lean instructions -70.7% (-3688.5 σ)
+ big_omega.lean maxrss -54.7% (-105.8 σ)
+ big_omega.lean task-clock -73.7% (-331.5 σ)
+ big_omega.lean wall-clock -73.9% (-312.6 σ)
+ big_omega.lean MT branch-misses -69.8% (-564.6 σ)
+ big_omega.lean MT branches -72.5% (-9938.0 σ)
+ big_omega.lean MT instructions -72.8% (-13467.7 σ)
+ big_omega.lean MT maxrss -66.4% (-47.4 σ)
+ big_omega.lean MT task-clock -80.1% (-129.2 σ)
+ big_omega.lean MT wall-clock -80.2% (-129.0 σ)
+ binarytrees task-clock -5.3% (-15.3 σ)
- bv_decide_mul branches 1.2% (317.9 σ)
- bv_decide_mul maxrss 1.4% (38.1 σ)
+ bv_decide_realworld branches -1.5% (-178.5 σ)
+ bv_decide_realworld instructions -2.6% (-350.6 σ)
- bv_decide_realworld maxrss 4.1% (15.6 σ)
- import Lean branch-misses 8.4% (125.8 σ)
- import Lean branches 349.4% (6047.4 σ)
- import Lean instructions 236.1% (3460.0 σ)
- import Lean maxrss 2.9% (30.4 σ)
- import Lean task-clock 74.1% (15.9 σ)
- import Lean wall-clock 74.0% (15.9 σ)
- language server startup branches 50.2% (87.7 σ)
- language server startup instructions 37.2% (59.7 σ)
- language server startup wall-clock 18.6% (14.0 σ)
- libleanshared.so binary size 1.9%
- parser instructions 1.0% (347.7 σ)
- reduceMatch instructions 17.6% (691.7 σ)
- reduceMatch maxrss 19.8% (821.3 σ)
- reduceMatch task-clock 16.1% (17.4 σ)
- reduceMatch wall-clock 15.7% (15.5 σ)
- simp_arith1 branch-misses 8.3% (28.3 σ)
- simp_arith1 branches 129.8% (4430.4 σ)
- simp_arith1 instructions 83.1% (2733.9 σ)
- simp_arith1 maxrss 3.5% (62.6 σ)
- simp_arith1 task-clock 40.1% (62.9 σ)
- simp_arith1 wall-clock 39.8% (52.7 σ)
- stdlib attribute application 204.4% (91.1 σ)
- stdlib dsimp 13.9% (21.0 σ)
- stdlib fix level params 10.3% (20.4 σ)
- stdlib instructions 13.8% (4219.1 σ)
- stdlib maxrss 39.4% (163.8 σ)
- stdlib process pre-definitions 164.7% (293.5 σ)
- stdlib share common exprs 12.7% (132.2 σ)
- stdlib tactic execution 26.8% (355.2 σ)
- stdlib task-clock 17.6% (1544.3 σ)
- stdlib type checking 39.0% (56.2 σ)
- stdlib wall-clock 15.7% (80.6 σ)
- stdlib size bytes .olean 2.7%
- stdlib size lines 2.3%
- stdlib size lines C 1.4%
- stdlib size max dynamic symbols 1.4%
- tests/bench/ interpreted instructions 5.5% (893.1 σ)
- tests/bench/ interpreted maxrss 3.5% (11.2 σ)
- tests/bench/ interpreted task-clock 36.9% (39.0 σ)
- tests/bench/ interpreted wall-clock 15.6% (26.5 σ)
- tests/compiler sum binary sizes 2.8%
- workspaceSymbols instructions 5.3% (7607.4 σ)
- workspaceSymbols maxrss 3.5% (72.3 σ) |
This PR actually prevents Lake from accidentally picking up other toolchains installed on the machine. Fixes regression introduced in leanprover#6176
This PR ensures tactics are evaluated incrementally in the body of `classical`.
This PR fixes and improves the propagator for forall-expressions in the `grind` tactic. --------- Co-authored-by: Kim Morrison <[email protected]>
…anprover#6581) This PR adds the following configuration options to `Grind.Config`: `splitIte`, `splitMatch`, and `splitIndPred`.
This PR adds support for creating local E-matching theorems for universal propositions known to be true. It allows `grind` to automatically solve examples such as: ```lean example (b : List α) (p : α → Prop) (h₁ : ∀ a ∈ b, p a) (h₂ : ∃ a ∈ b, ¬p a) : False := by grind ```
…#6584) This PR adds helper theorems to implement offset constraints in grind.
This PR fixes a bug in the `grind` canonicalizer.
This PR continues aligning `List/Array/Vector` lemmas, finishing up lemmas about `map`.
This PR continues aligning `List/Array` lemmas, finishing `filter` and `filterMap`.
This PR improves the `grind` canonicalizer diagnostics. --------- Co-authored-by: Kim Morrison <[email protected]>
This PR adds less-than and less-than-or-equal-to relations to `UInt32`, consistent with the other `UIntN` types.
This PR implements `Std.Net.Addr` which contains structures around IP and socket addresses. While we could implement our own parser instead of going through the `addr_in`/`addr_in6` route we will need to implement these conversions to make proper system calls anyway. Hence this is likely the approach with the least amount of non trivial code overall. The only thing I am uncertain about is whether `ofString` should return `Option` or `Except`, unfortunately `libuv` doesn't hand out error messages on IP parsing.
This PR adds a `toFin` and `msb` lemma for unsigned bitvector division. We *don't* have `toInt_udiv`, since the only truly general statement we can make does no better than unfolding the definition, and it's not uncontroversially clear how to unfold `toInt` (see `toInt_eq_msb_cond`/`toInt_eq_toNat_cond`/`toInt_eq_toNat_bmod` for a few options currently provided). Instead, we do have `toInt_udiv_of_msb` that's able to provide a more meaningful rewrite given an extra side-condition (that `x.msb = false`). This PR also upstreams a minor `Nat` theorem (`Nat.div_le_div_left`) needed for the above from Mathlib. --------- Co-authored-by: Kim Morrison <[email protected]>
… types (leanprover#6587) This PR adds decidable instances for the `LE` and `LT` instances for the `Offset` types defined in `Std.Time`.
…nprover#6347) This PR adds `BitVec.toNat_rotateLeft` and `BitVec.toNat_rotateLeft`. --------- Co-authored-by: Kim Morrison <[email protected]>
This PR adds a `toFin` and `msb` lemma for unsigned bitvector modulus. Similar to leanprover#6402, we don't provide a general `toInt_umod` lemmas, but instead choose to provide more specialized rewrites, with extra side-conditions. --------- Co-authored-by: Kim Morrison <[email protected]>
…prover#6599) The FFI description didn't mention Int or signed integers. This PR adds `Int` and signed integers to the FFI document.
Users have requested toolchain tags on `lean4-cli`, so let's add it to the release checklist to make sure these get added regularly. Previously, `lean4-cli` has used more complicated tags, but going forward we're going to just use the simple `v4.16.0` style tags, with no repository-specific versioning. --------- Co-authored-by: Markus Himmel <[email protected]>
This PR fixes a bug in the pattern selection in the `grind`.
This PR adds support for case-splitting on `<->` (and `@Eq Prop`) in the `grind` tactic.
This PR fixes a bug in the `simp_arith` tactic. See new test.
This PR improves the case-split heuristic used in grind, prioritizing case-splits with fewer cases.
This PR fixes a bug in the `grind` core module responsible for merging equivalence classes and propagating constraints.
This PR fixes one of the sanity check tests used in `grind`.
This PR adds lemmas about `Array.append`, improving alignment with the `List` API.
This PR improves the case split heuristic used in the `grind` tactic, ensuring it now avoids unnecessary case-splits on `Iff`.
This PR improves the usability of the `[grind =]` attribute by automatically handling forbidden pattern symbols. For example, consider the following theorem tagged with this attribute: ``` getLast?_eq_some_iff {xs : List α} {a : α} : xs.getLast? = some a ↔ ∃ ys, xs = ys ++ [a] ``` Here, the selected pattern is `xs.getLast? = some a`, but `Eq` is a forbidden pattern symbol. Instead of producing an error, this function converts the pattern into a multi-pattern, allowing the attribute to be used conveniently.
This PR allows the dot ident notation to resolve to the current definition, or to any of the other definitions in the same mutual block. Existing code that uses dot ident notation may need to have `nonrec` added if the ident has the same name as the definition. Closes leanprover#6601
) This PR implements support for offset constraints in the `grind` tactic. Several features are still missing, such as constraint propagation and support for offset equalities, but `grind` can already solve examples like the following: ```lean example (a b c : Nat) : a ≤ b → b + 2 ≤ c → a + 1 ≤ c := by grind example (a b c : Nat) : a ≤ b → b ≤ c → a ≤ c := by grind example (a b c : Nat) : a + 1 ≤ b → b + 1 ≤ c → a + 2 ≤ c := by grind example (a b c : Nat) : a + 1 ≤ b → b + 1 ≤ c → a + 1 ≤ c := by grind example (a b c : Nat) : a + 1 ≤ b → b ≤ c + 2 → a ≤ c + 1 := by grind example (a b c : Nat) : a + 2 ≤ b → b ≤ c + 2 → a ≤ c := by grind ``` --------- Co-authored-by: Kim Morrison <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
changelog-language
Language features, tactics, and metaprograms
toolchain-available
A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR implements executing kernel checking in parallel to elaboration, which is a prerequisite for parallelizing elaboration itself.
Stacked on #6214