The reference non-monotonic truth-maintenance network: nodes keyed by sentex handle
(no sentex reference, so the resident graph holds no records), justifications, premise
strengths, defeat-classes, and the superseded, forced, and blocked sets. Belief is
a least fixpoint over current state, so it is order-independent, and every relabel is
scoped to the affected region (locality). The caller owns physical deletion after a
sweep. See docs/nmtms.md.
The reference non-monotonic truth-maintenance network: nodes keyed by sentex handle (no sentex reference, so the resident graph holds no records), justifications, premise strengths, defeat-classes, and the `superseded`, forced, and `blocked` sets. Belief is a least fixpoint over current state, so it is order-independent, and every relabel is scoped to the affected region (locality). The caller owns physical deletion after a sweep. See docs/nmtms.md.
{:tms tms :m HashMap-of-consequence->HashSet-of-just-keys}, or nil (default): then
has-justification? scans -supports. A run-scoped index bound by chain/chain; the first
ask per conclusion builds its key set and later asks are one hash probe. The binding carries
its TMS and dedup-cache-for hands the map only to that TMS, since a nested run over a
second KB has overlapping handle spaces. Existence is structural, so only a removal
(retract!, sweep!) invalidates, and both clear the cache; add-justification extends the
entry. See docs/inference.md, Justification dedup.
`{:tms tms :m HashMap-of-consequence->HashSet-of-just-keys}`, or nil (default): then
`has-justification?` scans `-supports`. A run-scoped index bound by `chain/chain`; the first
ask per conclusion builds its key set and later asks are one hash probe. The binding carries
its TMS and `dedup-cache-for` hands the map only to that TMS, since a nested run over a
second KB has overlapping handle spaces. Existence is structural, so only a removal
(`retract!`, `sweep!`) invalidates, and both clear the cache; `add-justification` extends the
entry. See docs/inference.md, Justification dedup.(->just id informant antecedents consequence bindings)(->just id informant antecedents consequence bindings strength)(->just id informant antecedents consequence bindings strength subsumptions)Construct a Justification, defaulting strength to :monotonic — a bare monotone
justification adds no defeasibility of its own, so conferred-class caps it at its
weakest antecedent. A rule-handle informant is taken out of antecedents
(without-informant). subsumptions is a rule firing's set of [sub super] pairs,
stored under :subsumptions when it is not empty.
Construct a Justification, defaulting `strength` to :monotonic — a bare monotone justification adds no defeasibility of its own, so `conferred-class` caps it at its weakest antecedent. A rule-handle informant is taken out of `antecedents` (`without-informant`). `subsumptions` is a rule firing's set of `[sub super]` pairs, stored under `:subsumptions` when it is not empty.
(add-justification tms just)(add-justification tms just k)Add just to the network. k, when given, is its justification-key, already built
for the has-justification? that guarded the add.
Add `just` to the network. `k`, when given, is its `justification-key`, already built for the `has-justification?` that guarded the add.
(add-premise tms datum)(add-premise tms datum strength-kw)Add datum as a premise at strength (default :default).
Add `datum` as a premise at `strength` (default :default).
(before-network tms)A reference network tms as it stood when the open write record first recorded it,
as a network over that state map, or tms itself when the record holds none or tms
is not a reference network.
A reference network `tms` as it stood when the open write record first recorded it, as a network over that state map, or `tms` itself when the record holds none or `tms` is not a reference network.
(blocked tms)The justification ids currently blocked by their rule's exception.
The justification ids currently blocked by their rule's exception.
(class-antecedents j)The antecedents of justification j whose classes cap the class it confers: all of
them, except under respell-informant, where only the first does.
The antecedents of justification `j` whose classes cap the class it confers: all of them, except under `respell-informant`, where only the first does.
(classes-in-region tms region in)The defeat-classes of the datums in holds inside region, where region and in are a
grounded-in-region answer: the classes belief carries with that answer's extra forced
OUT, the rest of the graph held at its current classes. The same least fixpoint
region-classes computes during a relabel, built on the protocol reads. The settle reads it
for a nogood weighed at a vantage (docs/nmtms.md, "A defeat is scoped to its vantage").
The defeat-classes of the datums `in` holds inside `region`, where `region` and `in` are a `grounded-in-region` answer: the classes belief carries with that answer's `extra` forced OUT, the rest of the graph held at its current classes. The same least fixpoint `region-classes` computes during a relabel, built on the protocol reads. The settle reads it for a nogood weighed at a vantage (docs/nmtms.md, "A defeat is scoped to its vantage").
(consequence-closure tms seeds)The forward consequence closure of seeds, seeds included: every datum a justification
resting on one of them concludes, transitively. The region grounded-in-region labels,
for a caller that needs the datums a forced-OUT set can move and not their labels.
The forward consequence closure of `seeds`, seeds included: every datum a justification resting on one of them concludes, transitively. The region `grounded-in-region` labels, for a caller that needs the datums a forced-OUT set can move and not their labels.
(create-tms)A fresh, empty truth-maintenance network, the reference implementation. :in is the
believed set and the authority on belief, maintained region-locally; nodes carry no label of
their own. :blocked is the set of justification ids blocked by their rule's exception; it
starts empty. Rules live in the stores as sentexes, not here.
A fresh, empty truth-maintenance network, the reference implementation. `:in` is the believed set and the authority on belief, maintained region-locally; nodes carry no label of their own. `:blocked` is the set of justification ids blocked by their rule's exception; it starts empty. Rules live in the stores as sentexes, not here.
(defeat-class tms datum)The current defeat-class of an IN datum (monotonic / default), or nil
when the datum is OUT. Valid after relabel.
:classes holds only the datums above the lattice's bottom, so IN-ness is what
separates "OUT, hence no class" from "IN at the default class". An entry's mere
presence cannot carry both, since only one of them is information.
The current defeat-class of an IN datum (monotonic / default), or nil when the datum is OUT. Valid after `relabel`. `:classes` holds only the datums *above* the lattice's bottom, so IN-ness is what separates "OUT, hence no class" from "IN at the default class". An entry's mere presence cannot carry both, since only one of them is information.
(dependents tms datum)Justification ids that use datum as an antecedent (or a defeater).
Justification ids that use `datum` as an antecedent (or a defeater).
(dissoc-all m ks)(apply dissoc m ks) in one transient pass, since apply dissoc copies a full HAMT path
per key and ks is the whole swept region of a retraction. Public because
vaelii.impl.dense-jtms drops a swept region from its superseded map through it
(docs/density.md).
`(apply dissoc m ks)` in one transient pass, since `apply dissoc` copies a full HAMT path per key and `ks` is the whole swept region of a retraction. Public because `vaelii.impl.dense-jtms` drops a swept region from its `superseded` map through it (docs/density.md).
(drop-justification! tms jid)Remove the one justification jid from the network, relabel the region it supported, and
sweep what that leaves OUT. Returns retract!'s shape; jid's own record is the caller's
to delete, and is listed only in :removed-supports. The one removal that names a
justification, for a permuting mark leaving: the firing still holds, at a spelling the store
stopped folding into its row (chain/reconcile-spellings!).
Remove the one justification `jid` from the network, relabel the region it supported, and sweep what that leaves OUT. Returns `retract!`'s shape; `jid`'s own record is the caller's to delete, and is listed only in `:removed-supports`. The one removal that names a justification, for a permuting mark leaving: the firing still holds, at a spelling the store stopped folding into its row (`chain/reconcile-spellings!`).
(forced-members tms kind)Every member of forced set kind, as a set.
Every member of forced set `kind`, as a set.
(forced? tms kind x)Is x a member of forced set kind?
Is `x` a member of forced set `kind`?
(graph-just j)The part of a justification the network is made of: everything except the firing's
:bindings. Belief never reads the bindings (valid? needs the antecedents,
conferred-class the strength and informant); only the exceptWhen and NAF re-evaluations
want them, and those take the record from the store. Measured (lein bench-jtms): 80 of
277 B per justification at 3.6 justifications per node. It also normalizes (antecedents to a
vector without the informant, strength defaulted) so both representations store equal
values. :bindings is nil, not dropped. :subsumptions stays for just-key.
The part of a justification the network is made of: everything except the firing's `:bindings`. Belief never reads the bindings (`valid?` needs the antecedents, `conferred-class` the strength and informant); only the `exceptWhen` and NAF re-evaluations want them, and those take the record from the store. Measured (`lein bench-jtms`): 80 of 277 B per justification at 3.6 justifications per node. It also normalizes (antecedents to a vector without the informant, strength defaulted) so both representations store equal values. `:bindings` is nil, not dropped. `:subsumptions` stays for `just-key`.
(grounded-in-region tms extra)(grounded-in-region tms extra belief-only)(grounded-in-region tms extra belief-only invalid)For extra (datums to force OUT): the forward consequence closure of extra (:region)
and, within it, the datums that stay believed once extra is disbelieved (:in), the rest of
the graph held at its current label. Region-local: belief outside the region is read per
datum from in?, which keeps classify-local linear in the number of dilemmas
(grounded_in_region_test). Built on the protocol reads, so both representations answer it
without a method. belief-only maps a justification to the antecedent(s) read at the current
label (exc/belief-only-antecedent); invalid is a set of justification ids read as invalid.
See docs/labeling.md.
For `extra` (datums to force OUT): the forward consequence closure of `extra` (`:region`) and, within it, the datums that stay believed once `extra` is disbelieved (`:in`), the rest of the graph held at its current label. Region-local: belief outside the region is read per datum from `in?`, which keeps `classify-local` linear in the number of dilemmas (`grounded_in_region_test`). Built on the protocol reads, so both representations answer it without a method. `belief-only` maps a justification to the antecedent(s) read at the current label (`exc/belief-only-antecedent`); `invalid` is a set of justification ids read as invalid. See docs/labeling.md.
(has-justification? tms informant antecedents consequence)(has-justification? tms informant antecedents consequence k)Is there already a support for consequence from informant over exactly these
antecedents (as a set), with the same subsumptions? Guards against duplicate
justifications. Answered from the dedup index when one is bound for this TMS — the
same judgement, one hash probe — and by the supports scan otherwise. k, when given,
is justification-key of the same informant and antecedents, and carries the
subsumptions; without it the question is about a justification with none.
Is there already a support for `consequence` from `informant` over exactly these antecedents (as a set), with the same subsumptions? Guards against duplicate justifications. Answered from the dedup index when one is bound for this TMS — the same judgement, one hash probe — and by the supports scan otherwise. `k`, when given, is `justification-key` of the same informant and antecedents, and carries the subsumptions; without it the question is about a justification with none.
(hold! tms h)Open hold h (observe/new-hold) on tms, and answer whether it opened: false when a
hold is open on it already. Until release!, every relabel records the labels it moves
as they were before the hold's first move, and once observe/open-hold! registers h, a
thread other than its owner reads belief, the blocked and superseded sets, and
on the reference every read, from those. A settle holds its network this way, so a
reader beside it reads the belief the settle began from until the settle publishes what
it decided (vaelii.impl.settle/settle).
Open hold `h` (`observe/new-hold`) on `tms`, and answer whether it opened: false when a hold is open on it already. Until `release!`, every relabel records the labels it moves as they were before the hold's first move, and once `observe/open-hold!` registers `h`, a thread other than its owner reads belief, the blocked and superseded sets, and on the reference every read, from those. A settle holds its network this way, so a reader beside it reads the belief the settle began from until the settle publishes what it decided (`vaelii.impl.settle/settle`).
(in? tms datum)Is datum believed? Structural support minus supersession and the :held forced
set: a datum the equality layer has displaced, or a rule a correspondence holds
(docs/nat.md), keeps its place in the fixpoint (a twin or a respelled row is justified
by it) but is not believed, so it stops matching and stops answering queries.
Is `datum` believed? Structural support minus supersession and the `:held` forced set: a datum the equality layer has displaced, or a rule a correspondence holds (docs/nat.md), keeps its place in the fixpoint (a twin or a respelled row is justified by it) but is not believed, so it stops matching and stops answering queries.
(justification-key informant antecedents)(justification-key informant antecedents subsumptions)The dedup key of a justification from informant over antecedents with
subsumptions, a set or nil — just-key, for a caller that asks
has-justification? and then adds the justification, and so would otherwise build the
same set twice.
The dedup key of a justification from `informant` over `antecedents` with `subsumptions`, a set or nil — `just-key`, for a caller that asks `has-justification?` and then adds the justification, and so would otherwise build the same set twice.
(known-datum? tms datum)Does the TMS hold a node for datum? False for an inert sentex
(core/assert-inert) — stored and indexed but never a TMS datum — which is how
retract! tells a belief-bearing retraction from a direct teardown.
Does the TMS hold a node for `datum`? False for an **inert** sentex (`core/assert-inert`) — stored and indexed but never a TMS datum — which is how `retract!` tells a belief-bearing retraction from a direct teardown.
(lowered-depths datum depth dependents antecedents consequence depth-of){node depth} for datum at depth and for every node downstream of it whose
shallowest justification reads shallower once it is, walked shallowest first. Writes
nothing. dependents names the justification ids citing a node, antecedents and
consequence read one justification (nil for an id no longer stored), and depth-of
is the stored depth.
`{node depth}` for `datum` at `depth` and for every node downstream of it whose
shallowest justification reads shallower once it is, walked shallowest first. Writes
nothing. `dependents` names the justification ids citing a node, `antecedents` and
`consequence` read one justification (nil for an id no longer stored), and `depth-of`
is the stored depth.(moved-supports tms)The handles whose premise mark, justifications, or forced or blocked membership tms
moved since the open write record opened, as a set, or nil.
The handles whose premise mark, justifications, or forced or blocked membership `tms` moved since the open write record opened, as a set, or nil.
(network-in? tms datum)Is datum IN in the network, a superseded spelling included? The families
chain/place-nogoods! places detect their nogoods over this label, so a nogood with a
superseded member keeps its placement (docs/nmtms.md).
Is `datum` IN in the network, a superseded spelling included? The families `chain/place-nogoods!` places detect their nogoods over this label, so a nogood with a superseded member keeps its placement (docs/nmtms.md).
(premise-class tms datum)The class datum's premise mark confers: :monotonic for a :mono member, its
premise strength otherwise, nil for a datum that is no premise.
The class `datum`'s premise mark confers: `:monotonic` for a `:mono` member, its premise strength otherwise, nil for a datum that is no premise.
(raw-in? tms datum)Is datum believed, or kept from belief with its label IN: superseded, or a member of
the :held forced set? The label a boundary datum of a region read takes, since the
fixpoint keeps both kinds IN.
Is `datum` believed, or kept from belief with its label IN: superseded, or a member of the `:held` forced set? The label a boundary datum of a region read takes, since the fixpoint keeps both kinds IN.
(region-depths region
premise?
supports
dependents
antecedents
consequence
depth-of){node depth} for each node of region whose depth moves when the region is solved
afresh, every node outside it held at its stored depth. region is closed under
consequence (an affected region). Writes nothing. Knuth's generalization of Dijkstra: a
justification is queued once its last antecedent inside the region is final; the queue pops
shallowest first.
`{node depth}` for each node of `region` whose depth moves when the region is solved
afresh, every node outside it held at its stored depth. `region` is closed under
consequence (an affected region). Writes nothing. Knuth's generalization of Dijkstra: a
justification is queued once its last antecedent inside the region is final; the queue pops
shallowest first.(region-in tms region scope base extra belief-only invalid)The datums of scope, a part of region closed forward within it, that stay believed
with extra forced OUT and invalid (justification ids) read as invalid, every datum of
region outside scope read at its label in base and every datum outside region
at its live one, added to base: grounded-in-region*'s fixpoint over scope, each
justification read by region-valid-fn.
The datums of `scope`, a part of `region` closed forward within it, that stay believed with `extra` forced OUT and `invalid` (justification ids) read as invalid, every datum of `region` outside `scope` read at its label in `base` and every datum outside `region` at its live one, added to `base`: `grounded-in-region*`'s fixpoint over `scope`, each justification read by `region-valid-fn`.
(region-valid-fn tms region belief-only invalid)(fn [in j]): is the justification j valid with in the believed datums of
region, the read region-in makes of each justification. An antecedent or rule
handle in region is believed when in holds it, one outside at its live label, and
one belief-only names for j (a handle or a set) at its label wherever it lies. j
is invalid when blocked, :void or named by invalid.
`(fn [in j])`: is the justification `j` valid with `in` the believed datums of `region`, the read `region-in` makes of each justification. An antecedent or rule handle in `region` is believed when `in` holds it, one outside at its live label, and one `belief-only` names for `j` (a handle or a set) at its label wherever it lies. `j` is invalid when blocked, `:void` or named by `invalid`.
(relabel tms)Recompute every node's label and defeat-class, and clear the blocked and superseded sets
(both derive from queries that are never stored): the whole-graph counterpart to the region
relabels. Nothing on the live paths calls it; it is the differential oracle's operation
(strength_test, jtms_dense_oracle_test, jtms_blocked_test), so both representations
implement it.
Recompute every node's label and defeat-class, and clear the blocked and superseded sets (both derive from queries that are never stored): the whole-graph counterpart to the region relabels. Nothing on the live paths calls it; it is the differential oracle's operation (`strength_test`, `jtms_dense_oracle_test`, `jtms_blocked_test`), so both representations implement it.
(release! tms h)Close hold h on tms. A no-op for a hold that is not the one open.
Close hold `h` on `tms`. A no-op for a hold that is not the one open.
(reset-touched! tms)Clear the accumulated touched sets (see touched / touched-in / touched-new).
settle clears them once it has read them, at the end — so the touched set a caller sees
spans everything since the last settle finished, which for edit is the whole
deferred batch and its one settle rather than the settle alone.
Clear the accumulated touched sets (see `touched` / `touched-in` / `touched-new`). `settle` clears them once it has read them, at the *end* — so the touched set a caller sees spans everything since the last settle finished, which for `edit` is the whole deferred batch and its one settle rather than the settle alone.
The informant of a justification storing a spelling a reader reads of a fact, from the
row holding the fact as written and the marks that sort it (chain/respell-rows!). Its
first antecedent is the row and the rest are the marks: every one must be IN for the
justification to be valid, and only the row caps the class it confers
(class-antecedents), so a spelling holds at the class of the fact it spells.
The informant of a justification storing a spelling a reader reads of a fact, from the row holding the fact as written and the marks that sort it (`chain/respell-rows!`). Its first antecedent is the row and the rest are the marks: every one must be IN for the justification to be valid, and only the row caps the class it confers (`class-antecedents`), so a spelling holds at the class of the fact it spells.
(restrength-informant tms informant strength)Set strength as the rule-contribution slot of every justification whose informant is
informant, and relabel the region their consequences span. The slot caches
provers/firing-strength, which moves when a re-asserted rule's defeasibility resolves or an
exceptWhen arrives or leaves (special/restrength-firings!); without the move belief would
keep the arrival order. The antecedent half of conferred-class is read live, so this is the
only stored copy. The relabel spans the full affected region, since a class that rises can
flip defeat decisions anywhere in the consumer ancestor set.
Set `strength` as the rule-contribution slot of every justification whose informant is `informant`, and relabel the region their consequences span. The slot caches `provers/firing-strength`, which moves when a re-asserted rule's defeasibility resolves or an `exceptWhen` arrives or leaves (`special/restrength-firings!`); without the move belief would keep the arrival order. The antecedent half of `conferred-class` is read live, so this is the only stored copy. The relabel spans the full affected region, since a class that rises can flip defeat decisions anywhere in the consumer ancestor set.
(rests-on j)Every handle justification j needs believed to be valid: its antecedents, plus its
informant when that is a rule handle. The sweep preview, why-not's missing list, the
visibility check and recovery's storedness check read this.
Every handle justification `j` needs believed to be valid: its antecedents, plus its informant when that is a rule handle. The sweep preview, `why-not`'s missing list, the visibility check and recovery's storedness check read this.
(retract! tms datum)Dependency-directed retraction (drop premise / relabel / sweep). Returns {:removed-sentexes [datum...] :removed-justifications [jid...] :removed-supports [[consequence informant]...]}, the last absent when no justification went; a caller deletes the records and the justifications, and reads the supports without a justification fetch. Unknown datums no-op (empty result): retraction is idempotent.
Dependency-directed retraction (drop premise / relabel / sweep). Returns
{:removed-sentexes [datum...] :removed-justifications [jid...]
:removed-supports [[consequence informant]...]}, the last absent when no justification
went; a caller deletes the records and the justifications, and reads the supports
without a justification fetch. Unknown datums no-op (empty result): retraction is
idempotent.(revived tms)(revived tms t)The datums brought back since the last reset: relabelled, believed now, not believed at the
reset, and already in the graph at the reset. A revival is the one belief move nothing
downstream has seen (no arrival to chain from, no justification to withdraw), so settle
re-seeds these onto the agenda. It is touched minus touched-in and touched-new, plus
the -touched-out datums believed again. The two-arity takes touched as the caller
already read it, since the dense network materializes a fresh set per read.
See docs/nmtms.md.
The datums brought back since the last reset: relabelled, believed now, not believed at the reset, and already in the graph at the reset. A revival is the one belief move nothing downstream has seen (no arrival to chain from, no justification to withdraw), so `settle` re-seeds these onto the agenda. It is `touched` minus `touched-in` and `touched-new`, plus the `-touched-out` datums believed again. The two-arity takes `touched` as the caller already read it, since the dense network materializes a fresh set per read. See docs/nmtms.md.
(set-blocked tms jids)Replace the blocked set with jids, the justifications whose exception the caller found to
hold, less any id the network holds no justification for, and relabel the region the change
reaches. The set is replaced and not accumulated, so belief cannot depend on the order the
exceptions were discovered in. The region is seeded from the consequences of the
justifications whose blocked status changed; a call that changes nothing does no work.
Replace the blocked set with `jids`, the justifications whose exception the caller found to hold, less any id the network holds no justification for, and relabel the region the change reaches. The set is replaced and not accumulated, so belief cannot depend on the order the exceptions were discovered in. The region is seeded from the consequences of the justifications whose blocked status changed; a call that changes nothing does no work.
(set-forced tms kind xs on?)Add each of xs to forced set kind (on? true) or take it out, and relabel the
region the members that moved reach. :mono names premises whose class is
:monotonic whatever strength they carry, :out datums never IN, :void
justifications that support nothing, and :held datums the fixpoint labels as usual
and in? never answers believed, so a :held move relabels nothing. A member may be written before its node or its
justification exists, so the element never holds a label the set rules out.
Add each of `xs` to forced set `kind` (`on?` true) or take it out, and relabel the region the members that moved reach. `:mono` names premises whose class is `:monotonic` whatever strength they carry, `:out` datums never IN, `:void` justifications that support nothing, and `:held` datums the fixpoint labels as usual and `in?` never answers believed, so a `:held` move relabels nothing. A member may be written before its node or its justification exists, so the element never holds a label the set rules out.
(snapshot tms)The network as one canonical persistent map (see -snapshot). A testing and
debugging surface — the differential oracle compares two implementations with it.
The network as one canonical persistent map (see `-snapshot`). A testing and debugging surface — the differential oracle compares two implementations with it.
(supersede tms m)Replace the superseded map with m ({datum reason}), as set-blocked replaces:
the caller reconciles the whole answer (special/refresh-supersessions). No relabel:
supersession only subtracts from what in? reports.
**Replace** the superseded map with `m` (`{datum reason}`), as `set-blocked` replaces:
the caller reconciles the whole answer (`special/refresh-supersessions`). No relabel:
supersession only subtracts from what `in?` reports.(superseded tms)The datum -> reason map of spellings an equality merge has displaced.
The `datum -> reason` map of spellings an equality merge has displaced.
(supersession tms datum)Why datum is superseded — the representative that displaced it — or nil.
Why `datum` is superseded — the representative that displaced it — or nil.
(supports tms datum)Justification ids that conclude datum (its supporting justifications).
Justification ids that conclude `datum` (its supporting justifications).
(suspend-premise tms datum)Drop datum's premise mark and relabel its region without sweeping: a retraction's
effect on belief, undone by add-premise at the same strength. Unknown datums no-op.
Bare, not !: the node and its justifications stay. core/preview is the caller
(docs/nmtms.md).
Drop `datum`'s premise mark and relabel its region without sweeping: a retraction's effect on belief, undone by `add-premise` at the same strength. Unknown datums no-op. Bare, not `!`: the node and its justifications stay. `core/preview` is the caller (docs/nmtms.md).
(sweep! tms seeds)Garbage-collect the consequence closure of seeds: every datum in it that is not a premise
and is OUT is deleted with the justifications touching it. Returns retract!'s shape, for
the caller to apply to its own stores. retract!'s sweep without the retraction, for
exceptWhen (docs/exceptions.md, "Garbage collection, not defeat"). Labels must already be
current (set-blocked relabels the same region).
Garbage-collect the consequence closure of `seeds`: every datum in it that is not a premise and is OUT is deleted with the justifications touching it. Returns `retract!`'s shape, for the caller to apply to its own stores. `retract!`'s sweep without the retraction, for `exceptWhen` (docs/exceptions.md, "Garbage collection, not defeat"). Labels must already be current (`set-blocked` relabels the same region).
(touch-mark tms)A mark of this point in the touched set, for a reader that asks the touched set more
than once between resets: touched-since answers what was recorded after it. Each reader keeps
its own mark.
A mark of this point in the touched set, for a reader that asks the touched set more than once between resets: `touched-since` answers what was recorded after it. Each reader keeps its own mark.
(touch-mark-if-kept tms)touch-mark of tms, or nil for a network that keeps no marks (kb/prior-kb's, whose
frames are kept by reading every watched label).
`touch-mark` of `tms`, or nil for a network that keeps no marks (`kb/prior-kb`'s, whose frames are kept by reading every watched label).
(touched tms)The datums whose region has been relabelled since the last reset-touched!: a superset of
every datum whose belief could have flipped. settle reads it to tell tax/refresh-beliefs
which handles moved. It also holds the datums a redundant justification landed on, whose
belief did not move but whose published answer may be stale (add-just*). Consumers read a
superset, so an extra handle costs a re-derivation and never an answer.
The datums whose region has been relabelled since the last `reset-touched!`: a superset of every datum whose belief could have flipped. `settle` reads it to tell `tax/refresh-beliefs` which handles moved. It also holds the datums a redundant justification landed on, whose belief did not move but whose published answer may be stale (`add-just*`). Consumers read a superset, so an extra handle costs a re-derivation and never an answer.
(touched-in tms)The subset of touched whose label was IN when a relabel since the reset first reached it.
With touched and current belief it gives the label delta: IN now but not here came in; here
and OUT now went out. A superseded spelling keeps an IN label and is not believed (in?),
so settle-finish drops the spellings superseded when the settle began. A datum relabelled
twice keeps the earlier answer.
The subset of `touched` whose label was IN when a relabel since the reset first reached it. With `touched` and current belief it gives the label delta: IN now but not here came in; here and OUT now went out. A superseded spelling keeps an IN label and is not believed (`in?`), so `settle-finish` drops the spellings superseded when the settle began. A datum relabelled twice keeps the earlier answer.
(touched-new tms)The datums whose node was created since the last reset — the ones that had no label to move
because they had no node. touched-in cannot say this: a brand-new datum and a
stored one that has been OUT since the settle before both read as "not believed at
the last reset", and they are the two halves revived has to keep apart.
The datums whose **node was created since the last reset** — the ones that had no label to move because they had no node. `touched-in` cannot say this: a brand-new datum and a stored one that has been OUT since the settle before both read as "not believed at the last reset", and they are the two halves `revived` has to keep apart.
(touched-since tms mark)The datums touched recorded after mark (touch-mark): a datum relabelled again
since the mark is in it although touched held it already, which a set difference over
touched would drop. A superset of what moved since the mark, as touched is of what
moved since the reset. The whole of touched for a mark the reset outdated
(reset-touched!) or a nil one.
The datums `touched` recorded after `mark` (`touch-mark`): a datum relabelled again since the mark is in it although `touched` held it already, which a set difference over `touched` would drop. A superset of what moved since the mark, as `touched` is of what moved since the reset. The whole of `touched` for a mark the reset outdated (`reset-touched!`) or a nil one.
(unsupported? tms datum)Does the network hold a node for datum that is no premise and that no justification
concludes?
Does the network hold a node for `datum` that is no premise and that no justification concludes?
(with-dedup-cache tms & body)Run body with the justification dedup index engaged for tms; an outer cache
over the same TMS is reused rather than shadowed — the composition
observe/with-handle-cache makes — and one over another TMS is shadowed by a
fresh map. A no-op when observe/*chain-fast-paths* is bound false — the
reference lever chain_fast_paths_test pulls.
Run `body` with the justification dedup index engaged for `tms`; an outer cache over the *same* TMS is reused rather than shadowed — the composition `observe/with-handle-cache` makes — and one over another TMS is shadowed by a fresh map. A no-op when `observe/*chain-fast-paths*` is bound false — the reference lever `chain_fast_paths_test` pulls.
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 |