Premise additions, premise removals and rule direction changes applied to the records
of a KB whose belief is not built (apply!), and the sweep that follows the rebuild
(sweep!): vaelii.core/edit-records! and vaelii.core/settle-record-edits! are the
entry points. See docs/storage.md, "Editing the records of a KB without belief".
Premise additions, premise removals and rule direction changes applied to the records of a KB whose belief is not built (`apply!`), and the sweep that follows the rebuild (`sweep!`): `vaelii.core/edit-records!` and `vaelii.core/settle-record-edits!` are the entry points. See docs/storage.md, "Editing the records of a KB without belief".
The functors apply! adds a fact of. Each stores where assert stores it, as written:
the shipped vocabulary marks none of them symmetric, commutative or forced
decontextualized, and add-problem refuses a store that does. Of their index entries
only a genl edge's taxonomy supporters go beyond the record's own.
The functors `apply!` adds a fact of. Each stores where `assert` stores it, as written: the shipped vocabulary marks none of them symmetric, commutative or forced decontextualized, and `add-problem` refuses a store that does. Of their index entries only a `genl` edge's taxonomy supporters go beyond the record's own.
(apply! kb batch)Apply batch to the records of kb, which must have no belief: :add, a seq of
[sentence context] of an addable functor; :remove, a seq of handles; :direction,
{handle direction} over sx/direction-engines. No belief read, sweep or settle runs.
The additions are written first (add-one!). A removed record is deleted with its
index postings unless a justification that survives the batch concludes it; such a
record only loses its premise mark. A rule's direction is written into its record.
Every stored justification resting on a deleted record, and every firing of a rule the
batch takes off :forward, is deleted, except a firing that rests on a deleted genl
or genlCx edge: sweep! reads its antecedents as the facts to re-chain, then deletes
it. An addition stored already counts under :present and a removal naming no stored
record under :absent, so the same batch run again after a crash completes it.
Returns {:added n :present n :removed n :unpremised n :absent n :redirected n :justifications-removed n :seeds [h …]}, :seeds naming where the settle starts. A
batch adding a genl edge or removing or redirecting a stored record owes the
argument-type pass (argpass/owe-all!) before its first write. Refuses before writing
what vaelii.core/edit-records! lists.
Apply `batch` to the records of `kb`, which must have no belief: `:add`, a seq of
`[sentence context]` of an `addable` functor; `:remove`, a seq of handles; `:direction`,
`{handle direction}` over `sx/direction-engines`. No belief read, sweep or settle runs.
The additions are written first (`add-one!`). A removed record is deleted with its
index postings unless a justification that survives the batch concludes it; such a
record only loses its premise mark. A rule's direction is written into its record.
Every stored justification resting on a deleted record, and every firing of a rule the
batch takes off `:forward`, is deleted, except a firing that rests on a deleted `genl`
or `genlCx` edge: `sweep!` reads its antecedents as the facts to re-chain, then deletes
it. An addition stored already counts under `:present` and a removal naming no stored
record under `:absent`, so the same batch run again after a crash completes it.
Returns `{:added n :present n :removed n :unpremised n :absent n :redirected n
:justifications-removed n :seeds [h …]}`, `:seeds` naming where the settle starts. A
batch adding a `genl` edge or removing or redirecting a stored record owes the
argument-type pass (`argpass/owe-all!`) before its first write. Refuses before writing
what `vaelii.core/edit-records!` lists.(sweep! kb seeds)(sweep! kb seeds report)Delete the unrooted justifications the last recover left out (:unrooted), sweep
the consequence closure of their stored conclusions and of seeds as a retraction
sweeps it — every record there that is not a premise and is OUT goes, with the
justifications touching it (jtms/sweep!), through the removal choke point — and settle;
chain each forward rule among seeds over the stored facts, re-chain the antecedents of
the unrooted rule firings (special/firing-seeds) and settle; then bring each seed that
is a stored premise fact in as assert brings a stored fact in (arrive-all!), and
settle. Runs over a KB with belief. Returns {:unrooted n :removed-sentexes n :removed-justifications n :rules-chained n :rechained n :arrived n}.
report, when given, is called with {:phase :sweep :step k :done i :total 8} as each
step begins (sweep-steps), and with the chain's :derived and :pending beside while
it runs.
Delete the unrooted justifications the last `recover` left out (`:unrooted`), sweep
the consequence closure of their stored conclusions and of `seeds` as a retraction
sweeps it — every record there that is not a premise and is OUT goes, with the
justifications touching it (`jtms/sweep!`), through the removal choke point — and settle;
chain each forward rule among `seeds` over the stored facts, re-chain the antecedents of
the unrooted rule firings (`special/firing-seeds`) and settle; then bring each seed that
is a stored premise fact in as `assert` brings a stored fact in (`arrive-all!`), and
settle. Runs over a KB with belief. Returns `{:unrooted n :removed-sentexes n
:removed-justifications n :rules-chained n :rechained n :arrived n}`.
`report`, when given, is called with `{:phase :sweep :step k :done i :total 8}` as each
step begins (`sweep-steps`), and with the chain's `:derived` and `:pending` beside while
it runs.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 |