Storage protocols so the record store and index store each have swappable implementations (in-memory by default, on-disk for durability, or an alternate KV store later). The rest of the system programs against these protocols and never against a concrete backend.
Storage protocols so the record store and index store each have swappable implementations (in-memory by default, on-disk for durability, or an alternate KV store later). The rest of the system programs against these protocols and never against a concrete backend.
The index store — the flattened count-aware trie, the secondary root indexes, the
rule predicate index, the exception re-check index, and the inverted term index.
Every entry is derived from the records, so it can be thrown away and rebuilt
(vaelii.impl.reindex); it needs no durability of its own.
The index store — the flattened count-aware trie, the secondary root indexes, the rule predicate index, the exception re-check index, and the inverted term index. Every entry is derived from the records, so it can be thrown away and rebuilt (`vaelii.impl.reindex`); it needs no durability of its own.
(sentexes-with-term store term)Handles of sentexes the term index keys by term.
Handles of sentexes the term index keys by `term`.
(rules-by-consequent store pred)Handles of rules concluding pred.
Handles of rules concluding pred.
(rules-with-exception-on store pred)Handles of rules whose exception mentions pred.
Handles of rules whose exception mentions pred.
(unindex-exception! store handle preds)Deregister a rule handle from its exception predicates.
Deregister a rule handle from its exception predicates.
(sentexes-with-terms store terms)Handles of sentexes keyed by all terms — one intersection.
Handles of sentexes keyed by all `terms` — one intersection.
(index-sentex store sentex handle)Insert a ground sentex handle into the trie.
Insert a ground sentex handle into the trie.
(count-with-arg store pos term)How many fact sentexes have term at pos.
How many fact sentexes have `term` at `pos`.
(count-in-context store context)How many sentexes are in context.
How many sentexes are in `context`.
(unindex-sentex! store sentex handle)Remove a sentex handle from the trie.
Remove a sentex handle from the trie.
(children store prefix)Child tokens registered under an interior prefix.
Child tokens registered under an interior prefix.
(sentexes-with-functor store pred)Handles of fact sentexes whose functor is pred (any arity, either polarity).
Handles of fact sentexes whose functor is `pred` (any arity, either polarity).
(exception-rules store)Handles of every rule carrying an exception.
Handles of every rule carrying an exception.
(index-entries store)Every index entry as a lazy [key value] seq — the portable projection.
Every index entry as a lazy `[key value]` seq — the portable projection.
(lookup store pattern)Handles whose path matches a full pattern.
Handles whose path matches a full pattern.
(sentexes-in-context store context)Handles of sentexes asserted in context.
Handles of sentexes asserted in `context`.
(terms store)Every symbol term the index is keyed by — the KB's vocabulary, unordered.
Every symbol term the index is keyed by — the KB's vocabulary, unordered.
(clear-index! store)Remove every index entry (wipe the store — reindex rebuilds).
Remove every index entry (wipe the store — `reindex` rebuilds).
(count-at store prefix)Sentex count under a path prefix.
Sentex count under a path prefix.
(rules-by-antecedent store pred)Handles of rules with an antecedent on pred.
Handles of rules with an antecedent on pred.
(sentexes-with-arg store pos term)Handles of fact sentexes with term at 1-based argument pos.
Handles of fact sentexes with `term` at 1-based argument `pos`.
(term-count store)How many distinct symbol terms the index is keyed by (one set-size read, O(1)).
How many distinct symbol terms the index is keyed by (one set-size read, O(1)).
(count-with-functor store pred)How many fact sentexes have functor pred.
How many fact sentexes have functor `pred`.
(unindex-rule! store handle ante-preds conseq-pred)Deregister a rule handle.
Deregister a rule handle.
(index-rule store handle ante-preds conseq-pred)Register a rule handle by its predicates.
Register a rule handle by its predicates.
(index-load store entries)Install [key value] entries into an empty index, in this store's own representation.
Install `[key value]` entries into an empty index, in this store's own representation.
(index-exception store handle preds)Register a rule handle under each predicate its exception mentions.
Register a rule handle under each predicate its exception mentions.
(exception-rule? store handle)Is handle in the exception/watched-rule roster? (O(1) membership — the firing-path gate.)
Is `handle` in the exception/watched-rule roster? (O(1) membership — the firing-path gate.)
(sentexes-with-args store pred pos-terms)Handles with functor pred AND each [pos term] — one set intersection.
Handles with functor `pred` AND each `[pos term]` — one set intersection.
The record store — canonical sentexes and justifications, keyed by integer handle. The durable ground truth: everything else the KB holds is derived from it.
The record store — canonical sentexes and justifications, keyed by integer handle. The durable ground truth: everything else the KB holds is derived from it.
(clear-records! store)Remove every stored record (wipe the whole store).
Remove every stored record (wipe the whole store).
(get-sentex store id)Fetch a sentex by handle, or nil.
Fetch a sentex by handle, or nil.
(sentex-ids store)All live sentex handles.
All live sentex handles.
(mark-premise store id strength)Record a handle as an asserted premise at strength.
Record a handle as an asserted premise at `strength`.
(unmark-premise! store id)Record that a handle is no longer a premise.
Record that a handle is no longer a premise.
(put-sentex store sentex)Persist a sentex; return its handle.
Persist a sentex; return its handle.
(put-justification store d)Persist a justification; return its handle.
Persist a justification; return its handle.
(delete-sentex! store id)Remove a sentex record.
Remove a sentex record.
(get-provenance store id)The provenance map for handle id, or nil.
The provenance map for handle `id`, or nil.
(delete-provenance! store id)Remove the provenance for handle id.
Remove the provenance for handle `id`.
(next-id store)Allocate the next monotonic handle — one above every
handle the store holds, including one that arrived as
an explicit :id on a put rather than from here. A
handle is an identity, so no store may issue one twice.
Allocate the next monotonic handle — one above every handle the store holds, including one that arrived as an explicit `:id` on a put rather than from here. A handle is an identity, so no store may issue one twice.
(delete-justification! store id)Remove a justification record.
Remove a justification record.
(premise-ids store)All handles currently marked as premises.
All handles currently marked as premises.
(put-provenance store id prov)Persist the provenance map for handle id (overwrites).
Persist the provenance map for handle `id` (overwrites).
(get-justification store id)Fetch a justification by handle, or nil.
Fetch a justification by handle, or nil.
(justification-ids store)All live justification handles.
All live justification handles.
(premise-strength store id)The recorded assumption strength of a premise handle.
The recorded assumption strength of a premise handle.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |