Liking cljdoc? Tell your friends :D

vaelii.impl.asp.solver

Backend selector for vaelii's ASP solver. Callers (reason.clj) use solver/solve/solver/available? so the engine can run the in-process clingo backend (default, when libclingo + JNA are present) or fall back to the clasp subprocess — without any caller change.

The clingo backend is loaded LAZILY via requiring-resolve so JNA/libclingo stay optional: a plain build (without the :with-clingo profile) has no JNA on the classpath, the resolve fails cleanly, and the facade falls back to clasp. clasp is also the deliberate fallback for long-running daemons, since an in-process native crash takes down the whole JVM.

Select explicitly with -Dvaelii.asp.solver or VAELII_ASP_SOLVER = clingo|clasp. Default is auto: prefer in-process clingo when it loads, else clasp.

Backend selector for vaelii's ASP solver. Callers (reason.clj) use
`solver/solve`/`solver/available?` so the engine can run the in-process
clingo backend (default, when libclingo + JNA are present) or fall back to
the clasp subprocess — without any caller change.

The clingo backend is loaded LAZILY via requiring-resolve so JNA/libclingo
stay optional: a plain build (without the `:with-clingo` profile) has no JNA
on the classpath, the resolve fails cleanly, and the facade falls back to
clasp. clasp is also the deliberate fallback for long-running daemons, since
an in-process native crash takes down the whole JVM.

Select explicitly with -Dvaelii.asp.solver or VAELII_ASP_SOLVER = clingo|clasp.
Default is auto: prefer in-process clingo when it loads, else clasp.
raw docstring

available?clj

(available?)

True if the selected backend can solve in this environment.

True if the selected backend can solve in this environment.
raw docstring

classify-bothclj

(classify-both aspif-text)

Cautious + brave classification of aspif-text in one shot. On the clingo backend (AUTO routing) the program is loaded ONCE and solve.enum_mode is switched between the two enumerations; on clasp it is two separate solves. Returns {:cautious <result> :brave <result>} (each shaped like solve). Lets reason/classify-context avoid a redundant second control_new + load.

Cautious + brave classification of `aspif-text` in one shot. On the clingo
backend (AUTO routing) the program is loaded ONCE and `solve.enum_mode` is
switched between the two enumerations; on clasp it is two separate solves.
Returns `{:cautious <result> :brave <result>}` (each shaped like `solve`).
Lets `reason/classify-context` avoid a redundant second control_new + load.
raw docstring

solveclj

(solve aspif-text mode)

Solve aspif-text in mode via the selected backend. Contract identical to clasp/solve and clingo/solve. In AUTO mode the backend is chosen per program size (backend-for): clingo for small programs, clasp for large.

Solve `aspif-text` in `mode` via the selected backend. Contract identical to
clasp/solve and clingo/solve. In AUTO mode the backend is chosen per program
size (`backend-for`): clingo for small programs, clasp for large.
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