Liking cljdoc? Tell your friends :D

vaelii.impl.decide.arity

The arity family: a stored tuple whose length breaks its functor's length is held in the :out forced set, and two exact bindings of one predicate, or of two predicates a genl edge relates, whose lengths differ are a pair the settle places one contradicts of in CxUniverse (chain/sync-arity-pairs!). A negates declaration whose sides' lengths rule out a shared argument list is a one-member clash (negates-clash, chain/sync-negates-lengths!). See docs/nmtms.md, "The forced sets", and docs/taxonomy.md, "Arity".

The arity family: a stored tuple whose length breaks its functor's length is held in
the `:out` forced set, and two exact bindings of one predicate, or of two predicates a
`genl` edge relates, whose lengths differ are a pair the settle places one
`contradicts` of in CxUniverse (`chain/sync-arity-pairs!`).  A `negates` declaration
whose sides' lengths rule out a shared argument list is a one-member clash
(`negates-clash`, `chain/sync-negates-lengths!`).  See docs/nmtms.md, "The forced
sets", and docs/taxonomy.md, "Arity".
raw docstring

admits-shape?clj

(admits-shape? q kind v)

Does a length binding of the engine term q, kind and v as sx/arity-binding answers them, admit every length q's shape admits (shape-length)? An exact length agrees with an exact shape of that length, an arityMin floor with a shape whose shortest length is at or above it, and variable_arity with every shape. True for a term with no shape.

Does a length binding of the engine term `q`, `kind` and `v` as `sx/arity-binding`
answers them, admit every length `q`'s shape admits (`shape-length`)?  An exact length
agrees with an exact shape of that length, an `arityMin` floor with a shape whose
shortest length is at or above it, and `variable_arity` with every shape.  True for a
term with no shape.
sourceraw docstring

below-pair?clj

(below-pair? kb q ms memo)

Is the member of the pair ms other than a binding of q a binding of a predicate below q over the unscoped closure? q stores an exact binding, so the predicates bound-up answers for one below it hold q; memo is bound-up's.

Is the member of the pair `ms` other than a binding of `q` a binding of a predicate
below `q` over the unscoped closure?  `q` stores an exact binding, so the predicates
`bound-up` answers for one below it hold `q`; `memo` is `bound-up`'s.
sourceraw docstring

binding-handle?clj

(binding-handle? kb h)

Is the stored record at h a binding of a relation's length (binding-of)?

Is the stored record at `h` a binding of a relation's length (`binding-of`)?
sourceraw docstring

broken-bindingclj

(broken-binding kb q n)

The binding a tuple of n arguments of q breaks, as {:length n :via p :grounds [h …] :route [h …]} with :length an exact length, or {:min m …} for a floor, or nil when it breaks none (shape-breaks?, then relation-length with its grounds). :route holds the IN supporters of one path of genl edges from q up to :via (tax/genl-path-edges), empty for a length q binds itself.

The binding a tuple of `n` arguments of `q` breaks, as `{:length n :via p :grounds [h …]
:route [h …]}` with `:length` an exact length, or `{:min m …}` for a floor, or nil when
it breaks none (`shape-breaks?`, then `relation-length` with its grounds).  `:route`
holds the IN supporters of one path of `genl` edges from `q` up to `:via`
(`tax/genl-path-edges`), empty for a length `q` binds itself.
sourceraw docstring

class-pathsclj

(class-paths kb t ok?)

{C [h …]}: each exact-arity class C strictly above the type t that no other such class above t is below, with the supporters of one shortest path of genl edges from t up to it, an edge entering the walk through its first supporter [h ctx] that ok? takes, in content order of the supporters' contexts. The walk enters only the types that reach an exact-arity class (reaches-class?), and expands parents in name order, so the path is a function of the edges and their supporters. Empty for an exact-arity class t, which binds its members itself. Unscoped: a relation's length is read the same at every context.

`{C [h …]}`: each exact-arity class `C` strictly above the type `t` that no other such
class above `t` is below, with the supporters of one shortest path of `genl` edges from
`t` up to it, an edge entering the walk through its first supporter `[h ctx]` that
`ok?` takes, in content order of the supporters' contexts.  The walk enters only the
types that reach an exact-arity class (`reaches-class?`), and expands parents in name
order, so the path is a function of the edges and their supporters.  Empty for an
exact-arity class `t`, which binds its members itself.  Unscoped: a relation's length
is read the same at every context.
sourceraw docstring

class-route-ok?clj

(class-route-ok? tms [h _])

Does the genl edge supporter [h ctx] carry a metatype route: IN at :monotonic?

Does the `genl` edge supporter `[h ctx]` carry a metatype route: IN at `:monotonic`?
sourceraw docstring

classes-queued?clj

(classes-queued? tax c)

Does the settle owe a class sync: a stored record queued one (take-classes!), or a genl edge moved since ::class-gen (take-class-ends!)?

Does the settle owe a class sync: a stored record queued one (`take-classes!`), or a
`genl` edge moved since `::class-gen` (`take-class-ends!`)?
sourceraw docstring

classes-synced!clj

(classes-synced! kb hs)

Drop the handles hs from ::classes: their store path synced the class memberships they move (chain/arity-classes-moved!).

Drop the handles `hs` from `::classes`: their store path synced the class memberships
they move (`chain/arity-classes-moved!`).
sourceraw docstring

drain!clj

(drain! kb)

Refresh the inert shapes (refresh-shapes!) of every functor whose length can have moved since the last call, and answer {:pairs {p dirs} :moved ts :bound qs}. :pairs holds the predicates whose arity pairs the settle places again (pair-sets): :both for a queued predicate and those below it, whose own binding or whose lengths above moved, and :up for an exact-bound predicate at or below the lower end of a genl edge moved since ::gen. :moved is the set of terms whose length can have moved, or :all. :bound maps each predicate whose own bindings were stored, removed or relabelled since the last call to those bindings' #{[kind value]}, on every call: what unary-consistent? reads. Everything is refreshed when the shapes are owed whole (a recover), on the first call, and when the genl relation was rebuilt: every functor of a stored fact, :up for every bound predicate, and :moved :all.

Refresh the inert shapes (`refresh-shapes!`) of every functor whose length can have
moved since the last call, and answer `{:pairs {p dirs} :moved ts :bound qs}`.  `:pairs`
holds the predicates whose arity pairs the settle places again (`pair-sets`): `:both`
for a queued predicate and those below it, whose own binding or whose lengths above
moved, and `:up` for an exact-bound predicate at or below the lower end of a `genl`
edge moved since `::gen`.  `:moved` is the set of terms whose length can have moved, or
`:all`.  `:bound` maps each predicate whose own bindings were stored, removed or
relabelled since the last call to those bindings' `#{[kind value]}`, on every call:
what `unary-consistent?` reads.
Everything is refreshed when the shapes are owed whole (a recover), on the first call,
and when the `genl` relation was rebuilt: every functor of a stored fact, `:up` for
every bound predicate, and `:moved` `:all`.
sourceraw docstring

exact-classesclj

The exact-arity classes, each a type (sx/exact-arity-classes).

The exact-arity classes, each a type (`sx/exact-arity-classes`).
sourceraw docstring

fact-shapeclj

(fact-shape sx)

[q n] for a stored fact sx whose sentence is a positive tuple of n arguments with a symbol functor, else nil. checks asks it of a sentence about to be written, as {:sentence s}.

`[q n]` for a stored fact `sx` whose sentence is a positive tuple of `n` arguments with
a symbol functor, else nil.  `checks` asks it of a sentence about to be written, as
`{:sentence s}`.
sourceraw docstring

familyclj

The arity family's entry in decide/registry: the forced-monotonic spellings it reads as bindings, and the write hook that queues a binding's predicate (note-arity!) and holds a stored tuple breaking its functor's length in the :out forced set. A recover empties the length entries and owes the shapes whole (::owed), which the first drain! after it computes.

The arity family's entry in `decide/registry`: the forced-monotonic spellings it reads as
bindings, and the write hook that queues a binding's predicate (`note-arity!`) and
holds a stored tuple breaking its functor's length in the `:out` forced set.  A
recover empties the length entries and owes the shapes whole (`::owed`), which the
first `drain!` after it computes.
sourceraw docstring

inert-bindingclj

(inert-binding kb sx)

The binding a stored tuple sx in the :out forced set breaks (broken-binding), or nil when sx breaks none.

The binding a stored tuple `sx` in the `:out` forced set breaks (`broken-binding`), or
nil when `sx` breaks none.
sourceraw docstring

inert-tuple?clj

(inert-tuple? kb sx)

Does the stored fact sx break its functor's length (shape-breaks?), which holds it in the :out forced set? A true answer for a shape ::out does not record queues the shape under ::fresh, and the next refresh reads each of its tuples (refresh-shapes!): the tuples stored before it can wait on a queued binding.

Does the stored fact `sx` break its functor's length (`shape-breaks?`), which holds it
in the `:out` forced set?  A true answer for a shape `::out` does not record queues the
shape under `::fresh`, and the next refresh reads each of its tuples
(`refresh-shapes!`): the tuples stored before it can wait on a queued binding.
sourceraw docstring

kind-ofclj

(kind-of kb ms)

:arity-descension for the member handles ms of two exact bindings (binding-of) of different lengths; the kind negates-clash gives a lone negates declaration; else nil.

`:arity-descension` for the member handles `ms` of two exact bindings (`binding-of`)
of different lengths; the kind `negates-clash` gives a lone `negates` declaration;
else nil.
sourceraw docstring

lengths-cache-limitclj

The most weight one KB's length entries hold before the least recently used are evicted, an entry weighing one plus the lengths and floors it holds (entry): the shipped default the cache profile scales and the memory guard shrinks.

The most weight one KB's length entries hold before the least recently used are
evicted, an entry weighing one plus the lengths and floors it holds (`entry`): the
shipped default the cache profile scales and the memory guard shrinks.
sourceraw docstring

membership-ofclj

(membership-of sx)

[T x] for a stored fact sx whose sentence is the positive membership (T x) of a symbol in a symbol type, else nil.

`[T x]` for a stored fact `sx` whose sentence is the positive membership `(T x)` of a
symbol in a symbol type, else nil.
sourceraw docstring

mintable-type?clj

(mintable-type? kb t)

Is t a type a membership can be minted in: a symbol other than thing whose own arity admits one argument (unary-consistent?)? A type is a unary predicate, so a declared type with no arity statement is one, and the declaration that mints in it entails its unary_predicate membership (special/entail-existing). thing mints nothing: a membership in it says nothing about the term. One read of t's stored arity bindings, with no genl closure read (docs/argtypes.md, "Where it does not mint").

Is `t` a type a membership can be minted in: a symbol other than `thing` whose own
arity admits one argument (`unary-consistent?`)?  A type is a unary predicate, so
a declared type with no arity statement is one, and the declaration that mints in it
entails its `unary_predicate` membership (`special/entail-existing`).  `thing` mints
nothing: a membership in it says nothing about the term.  One read of `t`'s stored
arity bindings, with no `genl` closure read (docs/argtypes.md, "Where it does not
mint").
sourceraw docstring

moved?clj

(moved? tax c)

Does the settle owe the family work: a refresh (lengths-moved?), or a negates declaration queued under ::neg?

Does the settle owe the family work: a refresh (`lengths-moved?`), or a `negates`
declaration queued under `::neg`?
sourceraw docstring

negates-clashclj

(negates-clash kb [_ p q])

The clash of the declaration (negates P Q) that the lengths of P and Q (relation-length) give, as {:kind k :grounds #{h}} with :grounds the bindings stating the lengths, else nil. :negates-arity: no argument list fits both, an exact length differing from the other side's exact length or below its floor. :negates-unary: both sides are bound to one argument, where disjoint is the declaration that says it (docs/taxonomy.md, "Predicate metadata").

The clash of the declaration `(negates P Q)` that the lengths of `P` and `Q`
(`relation-length`) give, as `{:kind k :grounds #{h}}` with `:grounds` the bindings
stating the lengths, else nil.  `:negates-arity`: no argument list fits both, an exact
length differing from the other side's exact length or below its floor.
`:negates-unary`: both sides are bound to one argument, where `disjoint` is the
declaration that says it (docs/taxonomy.md, "Predicate metadata").
sourceraw docstring

note-relabelled!clj

(note-relabelled! kb hs)

Queue the predicates of the bindings among the relabelled handles hs (drain!): a binding a rule concludes goes OUT with its antecedents, and a binding OUT binds nothing (held-bindings). A relabelled negates declaration is queued under ::neg.

Queue the predicates of the bindings among the relabelled handles `hs` (`drain!`): a
binding a rule concludes goes OUT with its antecedents, and a binding OUT binds nothing
(`held-bindings`).  A relabelled `negates` declaration is queued under `::neg`.
sourceraw docstring

pair-setsclj

(pair-sets kb q dirs memo)

The member sets of the arity pairs at q, each two exact bindings stored in CxUniverse (root-exact) whose lengths differ: two of q, and one of q with one of a predicate above it, or with dirs :both below it too, over the unscoped closure. A relation's length is read the same at every context, so the pair is too. Reads no closure while the lengths stored at or above q (lengths-of), and under :both at or below it, are one, and reads the bindings of a predicate only where its own lengths (own-held) differ from q's. memo is bound-up's, and holds below-lengths' answers beside its own.

The member sets of the arity pairs at `q`, each two exact bindings stored in
CxUniverse (`root-exact`) whose lengths differ: two of `q`, and one of `q` with one of a
predicate above it, or with `dirs` `:both` below it too, over the unscoped closure.  A
relation's length is read the same at every context, so the pair is too.  Reads no
closure while the lengths stored at or above `q` (`lengths-of`), and under `:both` at
or below it, are one, and reads the bindings of a predicate only where its own lengths
(`own-held`) differ from `q`'s.  `memo` is `bound-up`'s, and holds `below-lengths`'
answers beside its own.
sourceraw docstring

reaches-class?clj

(reaches-class? kb t)

Does the type t reach an exact-arity class (sx/exact-arity-classes) over the unscoped closure, or is it one? Held in kb's length entries under [::reaches t], which an edge moving at or above t evicts (evict-below!).

Does the type `t` reach an exact-arity class (`sx/exact-arity-classes`) over the
unscoped closure, or is it one?  Held in `kb`'s length entries under `[::reaches t]`,
which an edge moving at or above `t` evicts (`evict-below!`).
sourceraw docstring

relabel-owed?clj

(relabel-owed? kb hs)

Does note-relabelled! read a record among the relabelled handles hs?

Does `note-relabelled!` read a record among the relabelled handles `hs`?
sourceraw docstring

relabelled-heldclj

(relabelled-held kb hs)

The handles among hs whose node this settle did not create, that the TMS still holds, and whose network label moved in this settle (jtms/touched-in): a created or removed binding is queued at the store and removal choke points (note-arity!), and a redundant justification moves no label, so only these are read.

The handles among `hs` whose node this settle did not create, that the TMS still
holds, and whose network label moved in this settle (`jtms/touched-in`): a created or
removed binding is queued at the store and removal choke points (`note-arity!`), and a
redundant justification moves no label, so only these are read.
sourceraw docstring

relation-lengthclj

(relation-length kb q)
(relation-length kb q grounds?)
(relation-length kb q grounds? write)

What binds q's length, as {:exact n :via p} or {:min m :via q}, or nil, read the same at every context: an engine term's :shape (shape-length), else q's own bindings (reduce-own), else the one exact length the bound predicates above it agree on, none of them variable_arity, with :via the first of them by name. With grounds?, the result also carries :grounds #{h}: the bindings stating the length, an engine term's own bindings stating its shape's length. The rule is docs/taxonomy.md's "Arity"; why-not reads the grounds of an inert tuple's length (inert-binding).

With write, the length a write not yet stored would give q (write-breaks): :held maps a predicate to the bindings the write adds to it, in held-bindings' shape, and :above holds the predicates the write puts above q.

What binds `q`'s length, as `{:exact n :via p}` or `{:min m :via q}`, or nil, read the
same at every context: an engine term's `:shape` (`shape-length`), else `q`'s own
bindings (`reduce-own`), else the one exact length the bound predicates above it agree
on, none of them `variable_arity`, with `:via` the first of them by name.  With
`grounds?`, the result also carries `:grounds #{h}`: the bindings stating the length,
an engine term's own bindings stating its shape's length.  The rule is
docs/taxonomy.md's "Arity"; `why-not` reads the grounds of an inert tuple's length
(`inert-binding`).

With `write`, the length a write not yet stored would give `q` (`write-breaks`):
`:held` maps a predicate to the bindings the write adds to it, in `held-bindings`'
shape, and `:above` holds the predicates the write puts above `q`.
sourceraw docstring

released?clj

(released? kb q)

Does a variable_arity binding of q, IN in any context, release it? relation-length answers {:min m} or nil for such a q and does not report the release, which admitsArgnum and the integrity pass's undeclared-arity read beside it.

Does a `variable_arity` binding of `q`, IN in any context, release it?  `relation-length`
answers `{:min m}` or nil for such a `q` and does not report the release, which
`admitsArgnum` and the integrity pass's undeclared-arity read beside it.
sourceraw docstring

root-bindingsclj

(root-bindings kb q)

The handles of q's exact bindings stored in CxUniverse.

The handles of `q`'s exact bindings stored in CxUniverse.
sourceraw docstring

shape-lengthclj

(shape-length q)

The length an engine grammar term's :shape gives it (predicates/shape-of), with no grounds: {:exact n} for a fixed argument list, {:min n} for one with an :optional or :variadic tail; nil for a term with no shape.

The length an engine grammar term's `:shape` gives it (`predicates/shape-of`), with
no grounds: `{:exact n}` for a fixed argument list, `{:min n}` for one with an
`:optional` or `:variadic` tail; nil for a term with no shape.
sourceraw docstring

take-class-ends!clj

(take-class-ends! kb)

The lower ends of the genl edges moved since the last call (tax/moves-since), whatever sentence supports each edge, the generation read recorded under ::class-gen. Every logged end on the first call and after the relation was rebuilt.

The lower ends of the `genl` edges moved since the last call (`tax/moves-since`),
whatever sentence supports each edge, the generation read recorded under `::class-gen`.
Every logged end on the first call and after the relation was rebuilt.
sourceraw docstring

take-classes!clj

(take-classes! kb)

The handles queued under ::classes since the last call (note-class!), the queue emptied.

The handles queued under `::classes` since the last call (`note-class!`), the queue
emptied.
sourceraw docstring

take-negates!clj

(take-negates! kb)

The negates declarations queued under ::neg since the last call, the queue emptied.

The `negates` declarations queued under `::neg` since the last call, the queue
emptied.
sourceraw docstring

unary-consistent?clj

(unary-consistent? kb t)

Does t's own arity admit one argument and no other: an engine term's :shape of exactly one, or, for any other term, no IN binding of a length other than one, no variable_arity release and no arityMin floor above one? A type bound to one length and another admits neither, so a declaration naming it mints nothing. The stored bindings, held in the length entries (own-held), answer when every one of them admits one, since then every IN subset of them does; otherwise the IN bindings answer (held-bindings), so no OUT binding decides. No genl closure is read, so a length t inherits is not consulted (mintable-type?, docs/argtypes.md).

Does `t`'s own arity admit one argument and no other: an engine term's `:shape` of
exactly one, or, for any other term, no IN binding of a length other than one, no
`variable_arity` release and no `arityMin` floor above one?  A type bound to one length
and another admits neither, so a declaration naming it mints nothing.  The stored
bindings, held in the length entries (`own-held`), answer when every one of them admits
one, since then every IN subset of them does; otherwise the IN bindings answer
(`held-bindings`), so no OUT binding decides.  No `genl` closure is read, so a length
`t` inherits is not consulted (`mintable-type?`, docs/argtypes.md).
sourceraw docstring

write-breaksclj

(write-breaks kb s mono?)

The stored shapes the sentence s, written at :monotonic when mono? and not yet stored, would hold inert: [{:relation f :arguments n :count c} …] for each functor whose length it can move (write-targets) and each length n its positive facts are stored at that the length relation-length gives with the write breaks and the stored length does not (shape-breaks?), c the count of those facts in every context, in content order: a relation's length is read the same at every context, so a tuple in any context is held inert. A functor with an engine shape takes its length from the shape, which no write moves. Empty when the write moves no length.

The stored shapes the sentence `s`, written at `:monotonic` when `mono?` and not yet
stored, would hold inert: `[{:relation f :arguments n :count c} …]` for each functor
whose length it can move (`write-targets`) and each length `n` its positive facts are
stored at that the length `relation-length` gives with the write breaks and the stored
length does not (`shape-breaks?`), `c` the count of those facts in every context, in
content order: a relation's length is read the same at every context, so a tuple in
any context is held inert.  A functor with an engine shape takes its length from the shape, which
no write moves.  Empty when the write moves no length.
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