Liking cljdoc? Tell your friends :D

vaelii.impl.asp.label

Brave/cautious classification and the two labeling writers. classify reads the Program the KB last recorded; classify-local and classify-datum classify the current dilemmas from the JTMS dependency graph with no backend. label-context records the labeling the engine committed to; label-dilemmas (do/labeling) commits one inside a context. See docs/asp.md and docs/labeling.md.

Brave/cautious classification and the two labeling writers.  `classify` reads the
`Program` the KB last recorded; `classify-local` and `classify-datum` classify the
current dilemmas from the JTMS dependency graph with no backend.  `label-context`
records the labeling the engine committed to; `label-dilemmas` (`do/labeling`) commits
one inside a context.  See docs/asp.md and docs/labeling.md.
raw docstring

classifyclj

(classify kb)

Classify the program kb last recorded (last-program): {:true #{handle} :supportable #{handle} :false #{handle}}, all empty when none is recorded. The classification label-dilemmas recorded on the program is read back, not recomputed.

Classify the program `kb` last recorded (`last-program`): `{:true #{handle}
:supportable #{handle} :false #{handle}}`, all empty when none is recorded.  The
classification `label-dilemmas` recorded on the program is read back, not recomputed.
sourceraw docstring

classify-datumclj

(classify-datum kb h context)

Handle h's class over the optimal labelings of the dilemmas a reader at context reads: :true, :supportable or :false, or nil when no such dilemma classifies it. classify-local's answer, with a backend's member-component classification for a :refinable member. The (bravely S) / (cautiously S) prover reads it.

Handle `h`'s class over the optimal labelings of the dilemmas a reader at `context`
reads: `:true`, `:supportable` or `:false`, or nil when no such dilemma classifies it.
`classify-local`'s answer, with a backend's member-component classification for a
`:refinable` member.  The `(bravely S)` / `(cautiously S)` prover reads it.
sourceraw docstring

classify-localclj

(classify-local kb)
(classify-local kb context)

The skeptical/credulous classification of the KB's current dilemmas, or with context of the dilemmas a reader there reads (clashes/contradictions-at), from the JTMS dependency graph with no backend. Returns {:true #{} :supportable #{} :false #{} :refinable #{}}, or nil when there is no dilemma: a believed datum is :true when every optimal resolution keeps it, :supportable when some do, :false when none do. :refinable holds the members of the unenumerated clusters whose members move none of each other, where a Program is exact. A datum past a cap is :supportable. See docs/labeling.md, "The solve-free bracket".

The skeptical/credulous classification of the KB's current dilemmas, or with `context`
of the dilemmas a reader there reads (`clashes/contradictions-at`), from the JTMS
dependency graph with no backend.  Returns `{:true #{} :supportable #{} :false #{}
:refinable #{}}`, or nil when there is no dilemma: a believed datum is `:true` when every
optimal resolution keeps it, `:supportable` when some do, `:false` when none do.
`:refinable` holds the members of the unenumerated clusters whose members move none of
each other, where a `Program` is exact.  A datum past a cap is `:supportable`.  See
docs/labeling.md, "The solve-free bracket".
sourceraw docstring

classify-programclj

source

dilemma-programclj

(dilemma-program kb)

One Program covering every dilemma kb currently reports, or nil if it reports none: one program, so a handle contested in two dilemmas is kept or given up once.

One `Program` covering every dilemma `kb` currently reports, or nil if it reports
none: one program, so a handle contested in two dilemmas is kept or given up once.
sourceraw docstring

label-contextclj

(label-context kb ctx base)

Write (genlCx ctx base) and, in ctx, a copy of each assumption of the recorded Program the TMS believes, in content order. Returns {:context ctx :handles [h ...]}, the handles empty with no recorded program; the edge is written either way. See docs/asp.md, "Labeling contexts".

Write `(genlCx ctx base)` and, in `ctx`, a copy of each assumption of the recorded
`Program` the TMS believes, in content order.  Returns `{:context ctx :handles [h ...]}`,
the handles empty with no recorded program; the edge is written either way.  See
docs/asp.md, "Labeling contexts".
sourceraw docstring

label-dilemmasclj

(label-dilemmas kb ctx base)

do/labeling: classify the dilemmas kb holds and commit one optimal labeling of them inside ctx, both read off local-labeling. Records the program, carrying the classification, in kb's :program slot; writes (genlCx ctx base) and a :monotonic copy in ctx of each kept assumption, in content order. Throws :labeling-inconsistent when the two disagree. Returns {:context ctx :handles [h ...] :classification {...} :program p}, the handles empty and nothing written when the KB holds no dilemma. See docs/labeling.md, "(do/labeling Ctx)".

`do/labeling`: classify the dilemmas `kb` holds and commit one optimal labeling of them
inside `ctx`, both read off `local-labeling`.  Records the program, carrying the
classification, in `kb`'s `:program` slot; writes `(genlCx ctx base)` and a `:monotonic`
copy in `ctx` of each kept assumption, in content order.  Throws
`:labeling-inconsistent` when the two disagree.  Returns `{:context ctx :handles [h ...]
:classification {...} :program p}`, the handles empty and nothing written when the KB
holds no dilemma.  See docs/labeling.md, "`(do/labeling Ctx)`".
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