Liking cljdoc? Tell your friends :D

vaelii.impl.vantage

The joint reading of CxInference and a variable context: which readers can answer a goal, and the two strategies that answer it, :fan (the reference) and :post-hoc, which return the same answers and witnesses. See docs/contexts.md.

The joint reading of `CxInference` and a variable context: which readers can answer a
goal, and the two strategies that answer it, `:fan` (the reference) and `:post-hoc`,
which return the same answers and witnesses.  See docs/contexts.md.
raw docstring

*rows-per-reader*clj

The join rows post-hoc builds per lattice context (at least one context) before it abandons the pass to the fan. A cost decision that changes no answer (docs/defenses.md#post-hoc-placement-is-the-default-because-it-is-bounded).

The join rows post-hoc builds per lattice context (at least one context) before it
abandons the pass to the fan.  A cost decision that changes no answer
(docs/defenses.md#post-hoc-placement-is-the-default-because-it-is-bounded).
sourceraw docstring

*strategy*clj

Which implementation answers a joint read: :fan (the reference) or :post-hoc (the default). A cost decision that must not change the answer set; outside post-hoc's domain the fan answers whatever this says (docs/defenses.md#post-hoc-placement-is-the-default-because-it-is-bounded).

Which implementation answers a joint read: `:fan` (the reference) or `:post-hoc` (the
default).  A cost decision that must not change the answer set; outside post-hoc's
domain the fan answers whatever this says
(docs/defenses.md#post-hoc-placement-is-the-default-because-it-is-bounded).
sourceraw docstring

answersclj

(answers kb goals run-at {:keys [expands-rules? witness prepared-at]})

goals answered as a joint read, as {:answers [...] :strategy s}. s is :unscoped for a goal every literal of which is deferred (read at '?ctx, no witness), :post-hoc, or :fan; :abandoned-post-hoc true sits beside :fan when post-hoc abandoned the pass. Each answer carries its maximal witness (attach-witness).

run-at reads the goal at one named context. Options: :witness (default CxInference, or the caller's variable), :expands-rules? (true puts the read outside post-hoc's domain: an expanded rule's antecedent facts are not among goals, so their contexts never reach a placement), and :prepared-at (the goal as prepared at a given context).

`goals` answered as a joint read, as `{:answers [...] :strategy s}`.  `s` is `:unscoped`
for a goal every literal of which is deferred (read at `'?ctx`, no witness), `:post-hoc`,
or `:fan`; `:abandoned-post-hoc true` sits beside `:fan` when post-hoc abandoned the
pass.  Each answer carries its maximal witness (`attach-witness`).

`run-at` reads the goal at one named context.  Options: `:witness` (default
`CxInference`, or the caller's variable), `:expands-rules?` (true puts the read outside
post-hoc's domain: an expanded rule's antecedent facts are not among `goals`, so their
contexts never reach a placement), and `:prepared-at` (the goal as prepared at a given
context).
sourceraw docstring

fanclj

(fan kb goals witness run-at)

Ask every reader the scoped question through run-at, a fn of the context to read in, and return the witnessed answers. With no reader at all, run-at reads at '?ctx under exc/*unscoped-own* and the answers carry no witness.

Ask every reader the scoped question through `run-at`, a fn of the context to read in,
and return the witnessed answers.  With no reader at all, `run-at` reads at `'?ctx`
under `exc/*unscoped-own*` and the answers carry no witness.
sourceraw docstring

fan-distinctclj

(fan-distinct kb goals run-at)

The fan for a read answering sentex records (sentexes-matching): the distinct records some reader returns, with no witness attached. Lazy over the readers; the readers seed is paid before the first element.

The fan for a read answering sentex records (`sentexes-matching`): the distinct records
some reader returns, with no witness attached.  Lazy over the readers; the `readers`
seed is paid before the first element.
sourceraw docstring

placeable?clj

(placeable? kb goals)

Is every literal of goals answered by provers/placeable-prover?s alone, as provers/applicable-provers dispatches it? Post-hoc answers only such a goal, and the join re-asks placing-provers of each literal it substitutes.

Is every literal of `goals` answered by `provers/placeable-prover?`s alone, as
`provers/applicable-provers` dispatches it?  Post-hoc answers only such a goal, and the
join re-asks `placing-provers` of each literal it substitutes.
sourceraw docstring

post-hocclj

(post-hoc kb goals witness budget prepared-at)

The witnessed answers of goals from one unscoped join, each row placed by placements and its bindings projected onto the goals' variables before grouping. Returns abandoned when the join abandons, or when prepared-at prepares the goal at CxNothing differently from goals, which means a merge rewrote it.

The witnessed answers of `goals` from one unscoped join, each row placed by
`placements` and its bindings projected onto the goals' variables before grouping.
Returns `abandoned` when the join abandons, or when `prepared-at` prepares the goal at
`CxNothing` differently from `goals`, which means a merge rewrote it.
sourceraw docstring

readersclj

(readers kb goals)

Every context that could witness a joint answer to goals: the genlCx lattice's contexts, plus each context outside it holding a fact the goals match (candidate-contexts) or an ingredient of a computed answer to one of them (provers/ingredient-contexts).

The union is closed under tax/meet-closure as it stands. A context outside the lattice sees only itself and no context sees it, so it meets no other context, and a common descendant of two lattice contexts is a lattice context.

Every context that could witness a joint answer to `goals`: the `genlCx` lattice's
contexts, plus each context outside it holding a fact the goals match
(`candidate-contexts`) or an ingredient of a computed answer to one of them
(`provers/ingredient-contexts`).

The union is closed under `tax/meet-closure` as it stands.  A context outside the
lattice sees only itself and no context sees it, so it meets no other context, and a
common descendant of two lattice contexts is a lattice context.
sourceraw docstring

witness-keyclj

The key a CxInference answer reports its witness under: :context, beside the bindings. A variable context unifies the witness into that variable instead.

The key a `CxInference` answer reports its witness under: `:context`, beside the
bindings.  A variable context unifies the witness into that variable instead.
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