The Reasoning record and its readers, as a held namespace (vaelii.impl.types.prover
states what that means). A KB holds one Reasoning value in a volatile under its
:reasoning field: the belief network, the taxonomy, and every atom a recover or a
settle fills. vaelii.impl.kb/empty-reasoning builds an empty one.
A Reasoning value is not a store. A KB's two stores, :records and :index, are
durable and are reached through vaelii.impl.protocols, and both survive the process
that wrote them. A Reasoning value lives in this process alone:
vaelii.impl.recovery/recover rebuilds it from the records, as vaelii.impl.reindex
rebuilds the index from them. vaelii.impl.reasoning-image writes one to a directory so
that an open can install it in place of a recover, and a KB that declines the image runs
the recover instead.
A background rebuild's install replaces the whole value with one vreset!
(vaelii.impl.recovery), so the belief a KB holds changes in one step. A reader
that must read the network and the taxonomy of one belief reads them through one
dereference: vaelii.impl.kb/read-view returns a KB whose volatile holds the current
value and is never reset, and vaelii.core's public reads run against it while an
install is pending.
Each reader below is inlined at its call site, so (taxonomy kb) compiles to
(:taxonomy @(:reasoning kb)): one field read, one volatile read and one field read.
The `Reasoning` record and its readers, as a held namespace (`vaelii.impl.types.prover` states what that means). A KB holds one `Reasoning` value in a volatile under its `:reasoning` field: the belief network, the taxonomy, and every atom a recover or a settle fills. `vaelii.impl.kb/empty-reasoning` builds an empty one. A `Reasoning` value is not a store. A KB's two stores, `:records` and `:index`, are durable and are reached through `vaelii.impl.protocols`, and both survive the process that wrote them. A `Reasoning` value lives in this process alone: `vaelii.impl.recovery/recover` rebuilds it from the records, as `vaelii.impl.reindex` rebuilds the index from them. `vaelii.impl.reasoning-image` writes one to a directory so that an open can install it in place of a recover, and a KB that declines the image runs the recover instead. A background rebuild's install replaces the whole value with one `vreset!` (`vaelii.impl.recovery`), so the belief a KB holds changes in one step. A reader that must read the network and the taxonomy of one belief reads them through one dereference: `vaelii.impl.kb/read-view` returns a KB whose volatile holds the current value and is never reset, and `vaelii.core`'s public reads run against it while an install is pending. Each reader below is inlined at its call site, so `(taxonomy kb)` compiles to `(:taxonomy @(:reasoning kb))`: one field read, one volatile read and one field read.
(chain-stats kb)kb's :chain-stats atom.
`kb`'s `:chain-stats` atom.
(clash-readings kb)kb's :clash-readings atom.
`kb`'s `:clash-readings` atom.
(meta-except-count kb)kb's :meta-except-count atom.
`kb`'s `:meta-except-count` atom.
(of kb)The Reasoning value kb holds now.
The `Reasoning` value `kb` holds now.
(preserved-clashes kb)kb's :preserved-clashes atom.
`kb`'s `:preserved-clashes` atom.
(rule-antecedents kb)kb's :rule-antecedents atom.
`kb`'s `:rule-antecedents` atom.
(rule-contexts kb)kb's :rule-contexts atom.
`kb`'s `:rule-contexts` atom.
(scoped-defeats kb)kb's :scoped-defeats atom.
`kb`'s `:scoped-defeats` atom.
(settle-stats kb)kb's :settle-stats atom.
`kb`'s `:settle-stats` atom.
(sib-exc-dirty kb)kb's :sib-exc-dirty atom.
`kb`'s `:sib-exc-dirty` atom.
(supersessions kb)kb's :supersessions atom.
`kb`'s `:supersessions` atom.
(vantage-disagreements kb)kb's :vantage-disagreements atom.
`kb`'s `:vantage-disagreements` atom.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |