Constructing a RefinedDiscrTree #
RefinedDiscrTree
is lazy, so to add an entry, we need to compute
the first Key
and a LazyEntry
. These are computed by initializeLazyEntry
.
We provide RefinedDiscrTree.insert
for directly performing this insert.
For initializing a RefinedDiscrTree
using all imported constants,
we provide createImportedDiscrTree
, which loops through all imported constants,
and does this with a parallel computation.
There is also createModuleDiscrTree
which does the same but with the constants
from the current file.
Directly insert a Key
, LazyEntry
pair into a RefinedDiscrTree
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Structure for quickly initializing a lazy discrimination tree with a large number of elements using concurrent functions for generating entries.
- root : Std.HashMap Key Nat
Maps keys to index in tries array.
Lazy entries for root of trie.
Instances For
Add an entry to the pre-discrimination tree.
Equations
- d.push k e = Lean.Meta.RefinedDiscrTree.PreDiscrTree.modifyAt✝ d k fun (x : Array (Lean.Meta.RefinedDiscrTree.LazyEntry × α)) => x.push e
Instances For
Convert a pre-discrimination tree to a RefinedDiscrTree
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Merge two discrimination trees.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Combine two initial results.
Equations
Instances For
Create a RefinedDiscrTree
consisting of all entries generated by act
from imported constants. (it gets called by addConstToPreDiscrTree
).
This uses parallel computation.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Allocate constants to tasks according to constantsPerTask
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
A discriminator tree for the current module's declarations only.
Note. We use different discrimination trees for imported and current module declarations since imported declarations are typically much more numerous but not changed while the current module is edited.
- ref : IO.Ref (RefinedDiscrTree α)
The reference to the
RefinedDiscrTree
.
Instances For
Create a RefinedDiscrTree
for current module declarations, consisting of all
entries generated by act
from constants in the current file.
(it gets called by addConstToPreDiscrTree
)
Equations
- One or more equations did not get rendered due to their size.