Liking cljdoc? Tell your friends :D

vaelii.impl.integrity

Bounded, read-only KB integrity reporting: the passes kb-integrity runs under a work meter (vaelii.impl.budget). vaelii.core requires this namespace; it requires predall and provers, which also sit below vaelii.core. vaelii.impl.quality requires it too: its taxonomy, declaration and clash readings are taxonomy-coverage, stranded-declarations and clash-pairs here, read over the whole KB. See docs/integrity.md.

Bounded, read-only KB integrity reporting: the passes `kb-integrity` runs under a work
meter (`vaelii.impl.budget`).  `vaelii.core` requires this namespace; it requires
`predall` and `provers`, which also sit below `vaelii.core`.  `vaelii.impl.quality`
requires it too: its taxonomy, declaration and clash readings are `taxonomy-coverage`,
`stranded-declarations` and `clash-pairs` here, read over the whole KB.  See
docs/integrity.md.
raw docstring

by-consequentclj

(by-consequent rows)

[polarity functor] -> rule rows — the pruning index a pairing reads, and the reason neither pairing is a cross product over the rule set.

`[polarity functor] -> rule rows` — the pruning index a pairing reads, and the reason
neither pairing is a cross product over the rule set.
sourceraw docstring

clash-pairsclj

(clash-pairs kb rows progress!)

Rule pairs of rows whose consequents would clash if both fired and whose antecedents could shallowly hold at once, as findings in content order: {:rules [h1 h2] :kind :unifier :context :sentences :excepted}, one per maximal common descendant of the two rules' contexts the pair clashes in. progress! is called as clash-units says.

Rule pairs of `rows` whose consequents would clash if both fired and whose
antecedents could shallowly hold at once, as findings in content order:
`{:rules [h1 h2] :kind :unifier :context :sentences :excepted}`, one per maximal common
descendant of the two rules' contexts the pair clashes in.  `progress!` is called as
`clash-units` says.
sourceraw docstring

integrity-opt-keysclj

The options kb-integrity reads: three cooperative bounds and the categories to run.

The options `kb-integrity` reads: three cooperative bounds and the categories to run.
sourceraw docstring

kb-integrityclj

(kb-integrity kb candidate-terms context)
(kb-integrity kb candidate-terms context options)

Run the bounded integrity sweep in context over the finite set of ground candidate-terms. Answers {:status :audited :candidate-count n :work w :elapsed-ms t} when no pass finds anything, :status :gap with the non-empty categories otherwise, and :status :truncated with its :reason, the :pass it stopped in and the findings kept before a bound in options (integrity-opt-keys) ran out. Every answer carries the :work spent and the :elapsed-ms. :categories, a set of category keys, runs those passes alone; without it the sweep runs every pass but the review-categories. Reads only: a diagnostic raised by evaluating a condition goes to a sink local to the call, and the exception reader states are kept for the call (except/with-reader-states). See docs/integrity.md.

Run the bounded integrity sweep in `context` over the finite set of ground
`candidate-terms`.  Answers `{:status :audited :candidate-count n :work w :elapsed-ms t}`
when no pass finds anything, `:status :gap` with the non-empty categories otherwise, and
`:status :truncated` with its `:reason`, the `:pass` it stopped in and the findings kept
before a bound in `options` (`integrity-opt-keys`) ran out.  Every answer carries the
`:work` spent and the `:elapsed-ms`.  `:categories`, a set of category
keys, runs those passes alone; without it the sweep runs every pass but the
`review-categories`.  Reads only: a diagnostic raised by
evaluating a condition goes to a sink local to the call, and the exception reader states
are kept for the call (`except/with-reader-states`).  See docs/integrity.md.
sourceraw docstring

rule-clash-findingsclj

(rule-clash-findings kb contexts remaining review?)

The clashing pairs among the stored rules each of contexts sees, in content order: the live pairs no exceptWhen handles and no acknowledgedFinding names under :rule-clash, and under :rule-clash-review (when review?) the pairs either rule of which is a set/inertRule, marked :inert true, the :excepted ones, and the acknowledged ones, marked with the reason as :acknowledged. The rules are read off the rule extent in the union of the contexts' ancestor sets (reads/as-stored-rules-in) and paired once. A pair is judged in each of contexts that sees both its rules, in print order, reported with that context as :context, and an acknowledgment is read from there. The findings are those of the one-context sweeps together.

The clashing pairs among the stored rules each of `contexts` sees, in content order: the live
pairs no `exceptWhen` handles and no `acknowledgedFinding` names under `:rule-clash`, and
under `:rule-clash-review` (when `review?`) the pairs either rule of which is a
`set/inertRule`, marked `:inert true`, the `:excepted` ones, and the acknowledged ones,
marked with the reason as `:acknowledged`.  The rules are read off the rule extent in the
union of the `contexts`' ancestor sets (`reads/as-stored-rules-in`) and paired once.  A
pair is judged in each of `contexts` that sees both its rules, in print order, reported
with that context as `:context`, and an acknowledgment is read from there.  The findings
are those of the one-context sweeps together.
sourceraw docstring

rule-exception-conjunctsclj

(rule-exception-conjuncts kb handle)

The exceptWhen conjunctions in force for a rule, or nil. Read only for a rule the watched-rule set holds, so an ordinary rule — every rule, on nearly every KB — pays one O(1) membership read and no term lookup.

The `exceptWhen` conjunctions in force for a rule, or nil.  Read only for a rule the
watched-rule set holds, so an ordinary rule — every rule, on nearly every KB — pays one
O(1) membership read and no term lookup.
sourceraw docstring

rule-rowsclj

(rule-rows kb handles progress!)

Every rule of handles as a rule-row: the one record read per rule a pairing pays. progress! is called with {:done i :total n} before the loop and every progress-every rules.

A negated implication and a variable-functor consequent are dropped here: the first concludes nothing to cover or clash with, and the second concludes anything.

Every rule of `handles` as a `rule-row`: the one record read per rule a pairing pays.
`progress!` is called with `{:done i :total n}` before the loop and every
`progress-every` rules.

A negated implication and a variable-functor consequent are dropped here: the first
concludes nothing to cover or clash with, and the second concludes anything.
sourceraw docstring

rule-variablesclj

(rule-variables forms)

Every variable across a rule's patterns, sorted by name — so a renaming is a function of the rule's content rather than of a set's iteration order, and two loads of the same KB report the same substitution.

Every variable across a rule's patterns, **sorted by name** — so a renaming is a
function of the rule's content rather than of a set's iteration order, and two loads of
the same KB report the same substitution.
sourceraw docstring

stranded-declarationsclj

(stranded-declarations kb context progress!)

Which argument constraints name a position their predicate does not have — {:total n :stranded [entry …] :typed-thing [entry …]}, :total counting the declarations walked and the :stranded entries {:handle :sentence :context :predicate :position :arity :via :message} in content order. :typed-thing lists, in the same order, the declarations that type a position thing, each {:handle :sentence :context :facts} with :facts its predicate's stored extent: a declaration typing thing mints nothing (arity/mint-target?), so the remedy is a narrower type in the declaration. With a context, only the believed declarations it sees are walked; with nil, every believed one. :message is the one checks/arg-position-violation wrote. progress! is called with {:done 0 :total n} once the declarations are known.

Which argument constraints name a position their predicate does not have —
`{:total n :stranded [entry …] :typed-thing [entry …]}`, `:total` counting the
declarations walked and the `:stranded` entries
`{:handle :sentence :context :predicate :position :arity :via :message}` in content
order.  `:typed-thing` lists, in the same order, the declarations that type a position
`thing`, each `{:handle :sentence :context :facts}` with `:facts` its predicate's stored
extent: a declaration typing `thing` mints nothing (`arity/mint-target?`), so the
remedy is a narrower type in the declaration.  With a `context`, only the believed
declarations it sees are walked; with nil, every believed one.  `:message` is the one
`checks/arg-position-violation` wrote.  `progress!` is called with `{:done 0 :total n}`
once the declarations are known.
sourceraw docstring

subsumption-readingclj

(subsumption-reading kb a b context rd)
(subsumption-reading kb a b context rd scoped?)

{:statuses ss :witness w :via t} for types a and b: ss is a subset of #{:coextensional :genl :spec :disjoint :orthogonal}, and w names what put :orthogonal in it — :declared, :shared-instance, :shared-spec (a shared subtype with a known (nonempty t)) or :unwitnessed-spec (a shared subtype not known nonempty) — with t the instance or the subtype it found (nil for :declared). w and t are nil when ss holds no :orthogonal. rd holds the facts-only reads: :members (the terms a (t ?x) read answers), :isa? (x an instance of t) and :holds? (a ground goal answered), each read from context. vaelii.core's subsumption-statuses and disjointness-audit read through this with query's reads, and the :open-sibling-pair pass with facts-only-reads. At the five-argument arity the genl paths and shared subtypes use every edge, as vaelii.core/genl? and specs do at their short arity. Separation and overlap witnesses remain contextual. With scoped? true they are read through the edges context sees, as the :open-sibling-pair pass reads them. At the unscoped arity, rd may also supply prepared :genl?, :specs and contextual :disjoint? reads; scoped reads ignore them.

`{:statuses ss :witness w :via t}` for types `a` and `b`: `ss` is a subset of
`#{:coextensional :genl :spec :disjoint :orthogonal}`, and `w` names what put
`:orthogonal` in it — `:declared`, `:shared-instance`, `:shared-spec` (a shared subtype
with a known `(nonempty t)`) or `:unwitnessed-spec` (a shared subtype not known
nonempty) — with `t` the instance or the subtype it found (nil for `:declared`).  `w`
and `t` are nil when `ss` holds no `:orthogonal`.  `rd` holds the facts-only reads:
`:members` (the terms a `(t ?x)` read answers), `:isa?` (`x` an instance of `t`) and
`:holds?` (a ground goal answered), each read from `context`.  `vaelii.core`'s
`subsumption-statuses` and `disjointness-audit` read through this with `query`'s reads,
and the `:open-sibling-pair` pass with `facts-only-reads`.  At the five-argument arity
the `genl` paths and shared subtypes use every edge, as `vaelii.core/genl?` and `specs`
do at their short arity. Separation and overlap witnesses remain contextual.
With `scoped?` true they are read through the edges `context` sees, as the
`:open-sibling-pair` pass reads them. At the unscoped arity, `rd` may also supply
prepared `:genl?`, `:specs` and contextual `:disjoint?` reads; scoped reads ignore them.
sourceraw docstring

taxonomy-coverageclj

(taxonomy-coverage kb type-names progress!)

{:names :edged :root :rooted :islands}, read from every context: how many type names carry a genl edge, how many reach the root, and :islands, the edged types that do not (docs/quality.md, "Taxonomy coverage is two numbers"). type-names is every type-shaped name, filtered as the nodes are; progress! is taxonomy-reach's.

`{:names :edged :root :rooted :islands}`, read from every context: how many type names
carry a `genl` edge, how many reach the root, and `:islands`, the edged types that do
not (docs/quality.md, "Taxonomy coverage is two numbers").  `type-names` is every
type-shaped name, filtered as the nodes are; `progress!` is `taxonomy-reach`'s.
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