Liking cljdoc? Tell your friends :D

vaelii.impl.argtype-pass

The argument-type pass over every stored fact (special/arg-type-extents), run so that it can stop and resume: run-all draws every fact in one call, and run! draws them under a per-fact budget, stops at a fact boundary when asked, and keeps what it still owes in the store, where the next call resumes it. docs/argtypes.md, "The pass over a stored KB".

What it owes is one value, the owed record: the functors it has drawn whole (by name), the fact handle it reached in the next one, the facts it set aside over budget with the part of the checks that ran out, and whether the sweep over the functors has ended. A KB with a directory keeps it there as arg-types-owed.edn, replaced whole through a temp file, an fsync and an atomic rename; a KB without one keeps it in memory. It names stored content and nothing else, so a pass stopped under one engine resumes under another.

A commit is where the record moves: the violations drawn since the last one are filed, belief is settled, every registered store is forced to disk, and only then is the record written. So the record never runs ahead of the stored mints, and a process killed between two commits resumes, once belief is rebuilt, at the last one: the facts after it are drawn again, which adds nothing to what they already wrote (has-justification?, find-sentex-handle).

The argument-type pass over every stored fact (`special/arg-type-extents`), run so that
it can stop and resume: `run-all` draws every fact in one call, and `run!` draws them
under a per-fact budget, stops at a fact boundary when asked, and keeps what it still
owes in the store, where the next call resumes it.  docs/argtypes.md, "The pass over a
stored KB".

**What it owes** is one value, the *owed record*: the functors it has drawn whole (by
name), the fact handle it reached in the next one, the facts it set aside over budget
with the part of the checks that ran out, and whether the sweep over the functors has
ended.  A KB with a directory keeps it there as `arg-types-owed.edn`, replaced whole
through a temp file, an fsync and an atomic rename; a KB without one keeps it in memory.
It names stored content and nothing else, so a pass stopped under one engine resumes
under another.

**A commit** is where the record moves: the violations drawn since the last one are
filed, belief is settled, every registered store is forced to disk, and only then is the
record written.  So the record never runs ahead of the stored mints, and a process killed
between two commits resumes, once belief is rebuilt, at the last one: the facts after it
are drawn again, which adds nothing to what they already wrote (`has-justification?`,
`find-sentex-handle`).
raw docstring

clear-owed!clj

(clear-owed! kb)

Record that the pass owes nothing: a pass ran to its end with nothing set aside.

Record that the pass owes nothing: a pass ran to its end with nothing set aside.
sourceraw docstring

default-budget-msclj

The checks one fact's draw may run for before the fact is set aside.

The checks one fact's draw may run for before the fact is set aside.
sourceraw docstring

owe-all!clj

(owe-all! kb)

Record that the whole pass is owed: a removal from the records of a KB without belief can release a mint anywhere a removed membership or edge withheld one.

Record that the whole pass is owed: a removal from the records of a KB without belief
can release a mint anywhere a removed membership or edge withheld one.
sourceraw docstring

owedclj

(owed kb)

What the pass still owes over kb, or nil: {:facts :total :swept? :deferred}, the facts drawn and counted when it last committed, whether the sweep over every functor has ended, and the facts set aside, each {:fact :phase :budget-ms :ms}.

What the pass still owes over `kb`, or nil: `{:facts :total :swept? :deferred}`, the
facts drawn and counted when it last committed, whether the sweep over every functor has
ended, and the facts set aside, each `{:fact :phase :budget-ms :ms}`.
sourceraw docstring

read-owedclj

(read-owed kb)

The owed record kb keeps, or nil when the pass owes nothing.

The owed record `kb` keeps, or nil when the pass owes nothing.
sourceraw docstring

request-stop!clj

(request-stop! kb)

Ask the pass running over kb to stop at its next fact boundary. True when one runs, false when none does: a request is not held for a pass that has not started.

Ask the pass running over `kb` to stop at its next fact boundary.  True when one runs,
false when none does: a request is not held for a pass that has not started.
sourceraw docstring

run-allclj

(run-all kb)

The pass over every fact in one call, with no budget, no stop and no record: the implementation of vaelii.core/record-arg-types. {:facts n :recorded n :violations [v …]}; the caller files the violations and settles.

The pass over every fact in one call, with no budget, no stop and no record: the
implementation of `vaelii.core/record-arg-types`.  `{:facts n :recorded n :violations
[v …]}`; the caller files the violations and settles.
sourceraw docstring

run-pass!clj

(run-pass! kb
           {:keys [resume? budget-ms stop? on-progress progress-every-ms
                   commit-every-ms retry-deferred?]
            :or {resume? true budget-ms default-budget-ms}})

The pass under a budget, stoppable and resumable; the implementation of vaelii.core/record-arg-types!, whose docstring is the contract.

The pass under a budget, stoppable and resumable; the implementation of
`vaelii.core/record-arg-types!`, whose docstring is the contract.
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