Liking cljdoc? Tell your friends :D
Clojure only.

vaelii.impl.record-edit

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 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

apply!clj

(apply! kb batch)

Apply batch to the records of kb, which must have no belief: :remove, a seq of handles, and :direction, {handle direction} with a direction sx/direction-engines names. No check, no dependency sweep and no settle runs.

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. A removal naming no stored record is counted under :absent, so the same batch run again after a crash completes it.

Returns {:removed n :unpremised n :absent n :redirected n :justifications-removed n :seeds [h …]}: :seeds are what the settle starts from, the kept removals, the stored conclusions of the deleted justifications and the rules the batch puts on :forward.

Refuses a KB with belief (:belief-built), an except, defeat or exceptWhen removal (:record-edit-unsupported), and a direction on a handle that is not a stored derive rule (:unknown-option, :unknown-handle), before writing anything.

Apply `batch` to the records of `kb`, which must have no belief: `:remove`, a seq of
handles, and `:direction`, `{handle direction}` with a direction `sx/direction-engines`
names.  No check, no dependency sweep and no settle runs.

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.  A
removal naming no stored record is counted under `:absent`, so the same batch run again
after a crash completes it.

Returns `{:removed n :unpremised n :absent n :redirected n :justifications-removed n
:seeds [h …]}`: `:seeds` are what the settle starts from, the kept removals, the stored
conclusions of the deleted justifications and the rules the batch puts on `:forward`.

Refuses a KB with belief (`:belief-built`), an `except`, `defeat` or `exceptWhen`
removal (`:record-edit-unsupported`), and a direction on a handle that is not a stored
derive rule (`:unknown-option`, `:unknown-handle`), before writing anything.
sourceraw docstring

sweep!clj

(sweep! kb seeds)

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; then chain each forward rule among seeds over the stored facts and settle again. Runs over a KB with belief. Returns {:unrooted n :removed-sentexes n :removed-justifications n :rules-chained n}.

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;
then chain each forward rule among `seeds` over the stored facts and settle again.  Runs
over a KB with belief.  Returns `{:unrooted n :removed-sentexes n
:removed-justifications n :rules-chained n}`.
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