Liking cljdoc? Tell your friends :D
Clojure only.

vaelii.impl.imperative

The do/ imperatives — the one shape given to assert that is neither a fact nor a rule but an instruction: run a labeling / classification and return its result, storing nothing. assert dispatches a do/ form here (run) before any naming or well-formedness check, since those expect a sentence.

This is not part of the assertion write-path — it is a separate feature (answer-set labeling, docs/labeling.md) routed through assert for one entry point — so it lives outside vaelii.core. The backing functions live under vaelii.impl.asp.*, which requires the engine, so they are resolved lazily: a static require would be circular, and the resolve keeps ASP optional (a build without a backend still loads, and the backend choice is made inside the resolved fn). An unavailable build throws a legible error rather than failing to load the engine.

The `do/` imperatives — the one shape given to `assert` that is neither a fact nor
a rule but an *instruction*: run a labeling / classification and return its result,
storing nothing.  `assert` dispatches a `do/` form here (`run`) before any naming or
well-formedness check, since those expect a sentence.

This is not part of the assertion write-path — it is a separate feature (answer-set
labeling, docs/labeling.md) routed through `assert` for one entry point — so it lives
outside `vaelii.core`.  The backing functions live under `vaelii.impl.asp.*`, which
requires the engine, so they are resolved **lazily**: a static require would be
circular, and the resolve keeps ASP optional (a build without a backend still loads,
and the backend choice is made inside the resolved fn).  An unavailable build throws a
legible error rather than failing to load the engine.
raw docstring

runclj

(run kb sentence context)

Run a do/ imperative and return its result, not a handle.

assert returns a handle because asserting stores something; an imperative stores nothing, so there is no handle to return and the useful answer is what it did. A do/ form is already outside the assertion contract — like ist, it is a form given to assert that is not a fact — so this is the third shape assert can return, and the one a caller asked for by writing an imperative.

(do/labeling Ctx) classifies the dilemmas the KB currently holds and commits to one optimal labeling of them inside Ctx (docs/labeling.md). (do/label Base Into) grounds the assumptionRules visible from Base and materializes one inert labeling context per optimal answer set; (do/classify Into) gathers brave/cautious over those labelings (docs/solving.md).

Run a `do/` imperative and return **its result**, not a handle.

`assert` returns a handle because asserting stores something; an imperative stores
nothing, so there is no handle to return and the useful answer is what it did.  A
`do/` form is already outside the assertion contract — like `ist`, it is a form given
to `assert` that is not a fact — so this is the third shape `assert` can return, and
the one a caller asked for by writing an imperative.

`(do/labeling Ctx)` classifies the dilemmas the KB currently holds and commits to one
optimal labeling of them inside `Ctx` (docs/labeling.md).  `(do/label Base Into)`
grounds the `assumptionRules` visible from `Base` and materializes one **inert**
labeling context per optimal answer set; `(do/classify Into)` gathers brave/cautious
over those labelings (docs/solving.md).
raw 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