Liking cljdoc? Tell your friends :D

vaelii.impl.context-nat

The structural genlCx producer for reified-NAT contexts — docs/context-nat.md.

(contextArgSubrelation F pos R) orders two F-contexts by the product of the declared sub-relations at the positions where they differ, and (contextArgGenlCx F pos) places every F-context under its argument at pos. This namespace materializes each such genlCx edge as a justified sentex in CxUniverse, never a premise. R is resolved by a bounded oracle: a registered pure comparator, else the genlCx closure for a sub-relation in closure-orders and each believed stored (R a b) fact.

The structural genlCx producer for reified-NAT contexts — docs/context-nat.md.

`(contextArgSubrelation F pos R)` orders two `F`-contexts by the product of the declared
sub-relations at the positions where they differ, and `(contextArgGenlCx F pos)` places
every `F`-context under its argument at `pos`.  This namespace **materializes** each such
`genlCx` edge as a **justified** sentex in CxUniverse, never a premise.  `R` is resolved
by a bounded oracle: a registered pure comparator, else the `genlCx` closure for a
sub-relation in `closure-orders` and each believed stored `(R a b)` fact.
raw docstring

any-context-declarations?clj

(any-context-declarations? kb)

Presence check: does the KB declare any contextArgSubrelation or contextArgGenlCx? The producer is a no-op otherwise — two O(1) functor counts per assert, the shape res/any-corresponding-predicates? has.

Presence check: does the KB declare any `contextArgSubrelation` or `contextArgGenlCx`?
The producer is a no-op otherwise — two O(1) functor counts per assert, the shape
`res/any-corresponding-predicates?` has.
sourceraw docstring

arg-supersclj

(arg-supers kb k e)

The contexts the structural producer places k under for (natFormula k e) in CxUniverse: the arg-context at each of the arg-genlcx-declarations of e's function, in position order.

The contexts the structural producer places `k` under for `(natFormula k e)` in
CxUniverse: the `arg-context` at each of the `arg-genlcx-declarations` of `e`'s
function, in position order.
sourceraw docstring

pair-reachclj

(pair-reach kb k e)

The contexts whose ancestor set a (natFormula k e) in CxUniverse widens through the contextArgSubrelation pairs the producer builds for k, in name order. They are each other context of e's function a route orders below e, and k when a route orders it below another. Empty for a k outside cx/, which takes no pair. Writes nothing.

The contexts whose ancestor set a `(natFormula k e)` in CxUniverse widens through the
`contextArgSubrelation` pairs the producer builds for `k`, in name order.  They are each
other context of `e`'s function a route orders below `e`, and `k` when a route orders it
below another.  Empty for a `k` outside `cx/`, which takes no pair.  Writes nothing.
sourceraw docstring

reconcile-genlCxclj

(reconcile-genlCx kb sentence moves)

The structural-genlCx maintenance a just-asserted sentence and the belief moves of its write (moves, reconcile-moves) call for: the arrival of sentence (reconcile-arrival), a genlCx edge read with the moved edges once. A no-op, two functor counts, on a KB that declares no contextArgSubrelation and no contextArgGenlCx. Returns true when an edge gained a justification, which the caller settles.

The structural-genlCx maintenance a just-asserted `sentence` and the belief moves of its
write (`moves`, `reconcile-moves`) call for: the arrival of `sentence`
(`reconcile-arrival`), a `genlCx` edge read with the moved edges once.  A no-op, two
functor counts, on a KB that declares no `contextArgSubrelation` and no
`contextArgGenlCx`.  Returns true when an
edge gained a justification, which the caller settles.
sourceraw docstring

reconcile-movesclj

(reconcile-moves kb {:keys [edges arrived derived departed] :as moves})

The structural genlCx maintenance the belief moves moves of a settled write call for (special/take-producer-moves!), read in content order. reconcile-edge-move takes each of the :edges. Each :arrived or :derived handle believed and of a functor declared-heads names is read as an arrival. Each contextsOrderedBothWays departed-pairs finds among the :departed orders its pair again (reorder-pair). Local: the cost follows the moves and the contexts they name. Returns true when an edge gained a justification, which the caller settles.

The structural genlCx maintenance the belief moves `moves` of a settled write call for
(`special/take-producer-moves!`), read in content order.  `reconcile-edge-move` takes
each of the `:edges`.  Each `:arrived` or `:derived` handle believed and of a functor
`declared-heads` names is read as an arrival.  Each `contextsOrderedBothWays`
`departed-pairs` finds among the `:departed` orders its pair again (`reorder-pair`).
Local: the cost follows the moves and the contexts they name.  Returns true when an edge
gained a justification, which the caller settles.
sourceraw docstring

reconcile-revivalsclj

(reconcile-revivals kb moves removed)

The structural genlCx maintenance a teardown owes once its belief has settled: the belief moves of the teardown (moves, reconcile-moves), and the target of every except or defeat among the removed sentences, whose belief or visibility the removal gave back with no relabel. An equality or a contextsOrderedBothWays among them between two context NATs of one function has its pair ordered again, both ways. Behind nat/any-reified-constants?. Returns true when an edge gained a justification, which the caller settles.

The structural genlCx maintenance a teardown owes once its belief has settled: the
belief moves of the teardown (`moves`, `reconcile-moves`), and the target of every
`except` or `defeat` among the `removed` sentences, whose belief or visibility the removal
gave back with no relabel.  An equality or a `contextsOrderedBothWays` among them between
two context NATs of one function has its pair ordered again, both ways.  Behind
`nat/any-reified-constants?`.  Returns true when an edge gained a justification, which
the caller settles.
sourceraw docstring

unwritten-readclj

(unwritten-read kb expr)

[k read-kb] for a read of the context of expr nobody has written into: k the cx/ constant its content names, read-kb kb with a genlCx edge from k to each of unminted-supers (kb/with-context-edges); nil when there are none. Held among the resident values under the change clock (observe/cached), so the reads between two writes share one read copy and its caches.

`[k read-kb]` for a read of the context of `expr` nobody has written into: `k` the
`cx/` constant its content names, `read-kb` `kb` with a `genlCx` edge from `k` to each
of `unminted-supers` (`kb/with-context-edges`); nil when there are none.  Held among the
resident values under the change clock (`observe/cached`), so the reads between two
writes share one read copy and its caches.
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