Conversation
|
!bench |
|
Benchmark results for cd6018d against 8009d0a are in. There are significant results. @Kha
Large changes (36✅, 4🟥)
Medium changes (19✅, 6🟥)
Small changes (40✅, 150🟥)
|
0f65296 to
c21c3d7
Compare
|
!bench |
|
Benchmark results for c21c3d7 against 7e2fc6a are in. There are significant results. @Kha
Large changes (8✅, 70🟥)
Medium changes (2✅, 81🟥)
Small changes (11✅, 2260🟥)
|
|
The adaptation PR for this PR is leanprover/downstream-lean4#269. |
c21c3d7 to
5f618b7
Compare
|
!bench |
|
Benchmark results for 5f618b7 against 8009d0a are in. There are significant results. @Kha
Large changes (7✅, 10🟥)
Medium changes (10🟥)
Small changes (5✅, 1004🟥)
|
|
!bench |
|
Benchmark results for b3b6bf8 against 8009d0a are in. There are significant results. @Kha
Large changes (10✅, 13🟥)
Medium changes (3✅, 13🟥)
Small changes (11✅, 1222🟥)
|
|
!bench |
|
Benchmark results for b07fca1 against 8009d0a are in. There are significant results. @Kha
Large changes (10✅, 13🟥)
Medium changes (1✅, 10🟥)
Small changes (9✅, 1191🟥)
|
This PR fixes a race in `Runtime.markPersistent` on objects that other threads are using, which could revive such an object with a wrong reference count and lead to a use after free. `lean_mark_persistent` wrote a zero count into thread-shared objects with a plain store. A reference count adjustment that another thread had in flight then landed on top of the zero. For a thread-shared object it now atomically stores a count from the middle of the sticky range, where adjustments in flight cannot move it back out; such an object is never freed and its count is no longer adjusted, but it is not reported by `lean_is_persistent`. Objects owned by the current thread still get a zero count. The interpreter's symbol cache, which relied on persistent names having stable addresses, accepts all never-freed names. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This PR marks the type of each declaration as persistent when it is added to the environment, so that elaboration and kernel checking on multiple threads no longer contend on the reference counts of these terms. The new option `Elab.persistentSignatures` controls this; the language server turns it off by default, as it adds declarations again on every edit. The types are marked in `addDecl`, including the types of the constants the kernel generates for inductive types, and when the signature of a theorem is committed before its proof is elaborated. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
`List.toByteArray_append'.ext` and `List.mergeSort_zipIdx.go` were each used by a later theorem. They are now the private top-level theorems `Array.ext_of_toList_eq` and `List.mergeSort_zipIdx_from`. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Kernel checks of asynchronously added declarations no longer wait for the check of the preceding declaration: the declaration is added to the kernel environment unchecked, and checked against the preceding environment in its own task. Known breakage: `elab/kernelErrorFollowup.lean` and `elab/issue14484.lean` fail because a declaration rejected by the kernel is no longer replaced by an axiom in the kernel environment seen by later declarations and `#print axioms`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ment chain Kernel checks now run against the new `Environment.uncheckedKernelEnv`, which contains preceding declarations before their checks have finished, while `checked` still waits for each check result and replaces rejected declarations with axioms as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A theorem added via `addConstAsync` now enters `uncheckedKernelEnv` as an axiom as soon as its signature is committed, so that kernel checks do not wait for earlier proofs to be elaborated either; the kernel does not unfold theorems. Constants of other environment branches that a declaration refers to, such as auxiliary declarations of a proof or realizations, are added on demand via `uncheckedKernelEnvFor`. `uncheckedKernelEnv` is now also kept across asynchronous compilation and realizations instead of being reset to `checked`. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Constants are no longer added to `uncheckedKernelEnv` on demand when a declaration refers to them. Realized constants are now added when a realization is merged into the environment. Auxiliary declarations created inside a proof are in the environment of that proof only, so a later declaration referring to one of them is rejected by the kernel. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
b07fca1 to
fa208d0
Compare
|
!bench |
|
Benchmark results for fa208d0 against e1228b8 are in. There are significant results. @Kha
Large changes (19✅, 9🟥)
Medium changes (6✅, 13🟥)
Small changes (84✅, 1199🟥)
|
A kernel check holds on to its reduction caches until it is done, so the memory of concurrent checks adds up; in `Mathlib.CategoryTheory.Sites.SheafCohomology.MayerVietoris`, eight overlapping checks doubled the peak memory of the file. Checks now wait for one of `maxParallelKernelChecks` slots. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This PR makes `inductive` and `structure` commands no longer wait for earlier declarations in the file to be elaborated and checked, so that parallel elaboration continues across them. `Environment.addDeclCore` now checks an inductive type declaration against `Environment.uncheckedKernelEnv` and adds the resulting constants to `checked` asynchronously. `mkCasesOn` uses the same environment, and the auxiliary recursors of nested inductive types are now registered by `addDeclCore` itself. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
fa208d0 to
dc2eab2
Compare
|
!bench |
|
Benchmark results for dc2eab2 against e1228b8 are in. There are significant results. @Kha
Large changes (16✅, 7🟥)
Medium changes (5✅, 11🟥)
Small changes (89✅, 1284🟥)
|
This PR makes
inductiveandstructurecommands no longer wait for earlier declarations in the file to be elaborated and checked, so that parallel elaboration continues across them.Environment.addDeclCorenow checks an inductive type declaration againstEnvironment.uncheckedKernelEnvand adds the resulting constants tocheckedasynchronously.mkCasesOnuses the same environment, and the auxiliary recursors of nested inductive types are now registered byaddDeclCoreitself.