Liking cljdoc? Tell your friends :D
Clojure only.

vaelii.impl.record-edit

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".
raw docstring

addableclj

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.
sourceraw docstring

apply!clj

(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.
sourceraw docstring

sweep!clj

(sweep! kb seeds)
(sweep! kb seeds report)
(sweep! kb seeds report phase)

Sweep the consequence closure of seeds and of the stored conclusions of the unrooted justifications recover left out (:unrooted) as a retraction sweeps it (jtms/sweep!, through the removal choke point), and settle. Inside (phase f), chain each forward rule among seeds over the stored facts, re-chain the unrooted rule firings' antecedents (special/firing-seeds) and settle. Bring each seed that is a stored premise fact in as assert does (arrive-all!) and settle, then delete the unrooted justifications, last, so a call phase stops leaves them for the next call to read the firings off. 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.

Sweep the consequence closure of `seeds` and of the stored conclusions of the unrooted
justifications `recover` left out (`:unrooted`) as a retraction sweeps it (`jtms/sweep!`,
through the removal choke point), and settle.  Inside `(phase f)`, chain each forward
rule among `seeds` over the stored facts, re-chain the unrooted rule firings' antecedents
(`special/firing-seeds`) and settle.  Bring each seed that is a stored premise fact in as
`assert` does (`arrive-all!`) and settle, then delete the unrooted justifications, last,
so a call `phase` stops leaves them for the next call to read the firings off.  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.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close