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.* and are resolved by symbol on first use, so loading vaelii.core does not load the ASP namespaces; vaelii.core's reasoner and solver tables defer the same way. No asp namespace requires this one, so the deferral breaks no require cycle. The clingo or clasp choice is made inside the resolved fn (vaelii.impl.asp.solver).

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.*` and are
resolved by symbol on first use, so loading `vaelii.core` does not load the ASP
namespaces; `vaelii.core`'s reasoner and solver tables defer the same way.  No `asp`
namespace requires this one, so the deferral breaks no require cycle.  The clingo or
clasp choice is made inside the resolved fn (`vaelii.impl.asp.solver`).
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).
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