Liking cljdoc? Tell your friends :D

vaelii.impl.fluent

The per-instant functionality audit for fluent-carried values.

functional (checks / special) enforces at-most-one-value over the bare literals of a marked predicate: two co-believed (P a v1) / (P a v2) derive (equals v1 v2) and merge. A value carried the event-calculus way never appears in a bare literal — it rides inside a fluent NAT under initiates, and holdsAt derives it at a moment (docs/time.md, CxChange). So the equality closure never sees the pair, and per-instant functionality — a function that has at most one value for one subject at any single instant — is enforced by nothing at assert.

Whether two fluents overlap at an instant follows from initiates, terminates and the clipping closure, and is not known when a fluent is asserted. So this reads it on demand, the shape vaelii.impl.predall/specified-violations uses for the analogous reason: an audit reports, it does not mutate belief. A merge-eligible clash (two symbol values) is reported as :merge and a non-mergeable one (two numbers or strings) as :contradiction, mirroring functional's own split, and the caller decides what to do with the report.

Reached from outside through vaelii.core/functional-at-instant-violations and vaelii.core/all-functional-at-instant-violations, thin delegations to the readers here. This namespace sits below vaelii.core, which requires it, so no delegation runs through vaelii.impl.wiring. The fact reads run through the prover registry below (provers/ask), each goal prepared as the public read prepares it (quasiquote/prepare-goal-for-read); the one read that needs a rule — holdsAt, which the registry does not expand — runs the node engine directly (inference/solutions) at a bounded depth, the below-vaelii.core form of the read vaelii.core/query runs. The audit still answers what a user's read answers: it passes only concrete contexts, and the genlCx ancestor scoping is applied in the matching layer below (docs/namespaces.md, "The layering").

The per-instant functionality audit for fluent-carried values.

`functional` (checks / special) enforces at-most-one-value over the **bare** literals of
a marked predicate: two co-believed `(P a v1)` / `(P a v2)` derive `(equals v1 v2)` and
merge.  A value carried the event-calculus way never appears in a bare literal — it rides
inside a fluent NAT under `initiates`, and `holdsAt` derives it at a moment (docs/time.md,
CxChange).  So the equality closure never sees the pair, and per-instant functionality —
a function that has at most one value for one subject at any single instant — is enforced
by nothing at assert.

Whether two fluents overlap at an instant follows from `initiates`, `terminates` and the
clipping closure, and is not known when a fluent is asserted.  So this reads it on demand,
the shape `vaelii.impl.predall/specified-violations` uses for the analogous reason: an
audit reports, it does not mutate belief.  A merge-eligible clash (two symbol values) is
reported as `:merge` and a non-mergeable one (two numbers or strings) as `:contradiction`,
mirroring `functional`'s own split, and the caller decides what to do with the report.

Reached from outside through `vaelii.core/functional-at-instant-violations` and
`vaelii.core/all-functional-at-instant-violations`, thin delegations to the readers here.
This namespace sits **below** `vaelii.core`, which requires it, so no delegation runs
through `vaelii.impl.wiring`.  The fact reads run through the prover registry below
(`provers/ask`), each goal prepared as the public read prepares it
(`quasiquote/prepare-goal-for-read`); the one read that needs a rule — `holdsAt`, which the
registry does not expand — runs the node engine directly (`inference/solutions`) at a
bounded depth, the below-`vaelii.core` form of the read `vaelii.core/query` runs.  The audit
still answers what a user's read answers: it passes only concrete contexts, and the `genlCx`
ancestor scoping is applied in the matching layer below (docs/namespaces.md,
"The layering").
raw docstring

all-functional-at-instant-violationsclj

(all-functional-at-instant-violations kb context)

Every (functional_at_instant f) declaration visible in context, audited, as {f #{violation …} …} — declarations that clash nowhere are omitted, so a clean sweep is an empty map. The one call an integrity sweep makes; functional-at-instant-violations is the per-declaration reader it is built from.

Every `(functional_at_instant f)` declaration visible in `context`, audited, as
`{f #{violation …} …}` — declarations that clash nowhere are omitted, so a clean sweep is
an empty map.  The one call an integrity sweep makes; `functional-at-instant-violations`
is the per-declaration reader it is built from.
sourceraw docstring

functional-at-instant-violationsclj

(functional-at-instant-violations kb f context)

The per-instant clashes of one (functional_at_instant f) declaration in context, as a set of maps {:function f :subject s :instant t :values #{v …} :kind k} — one per moment t at which more than one distinct value of f holds for one subject s. :kind is :merge when every clashing value is a symbol (the pair functional would merge) and :contradiction otherwise (two numbers or strings functional refuses outright).

Every believed time_point is a candidate moment, and holdsAt is asked of each filler at each — so a value holding at a different instant from another is not a clash, which is what the event-calculus representation buys over a bare functional mark. The read follows belief and is scoped to context, so two fillers in contexts that cannot see each other do not clash, and a filler whose initiating event is disbelieved is not a value.

The per-instant clashes of one `(functional_at_instant f)` declaration in `context`, as a
set of maps `{:function f :subject s :instant t :values #{v …} :kind k}` — one per
moment `t` at which more than one distinct value of `f` holds for one subject `s`.  `:kind`
is `:merge` when every clashing value is a symbol (the pair `functional` would merge) and
`:contradiction` otherwise (two numbers or strings `functional` refuses outright).

Every believed `time_point` is a candidate moment, and `holdsAt` is asked of each filler
at each — so a value holding at a different instant from another is not a clash, which is
what the event-calculus representation buys over a bare `functional` mark.  The read
follows belief and is scoped to `context`, so two fillers in contexts that cannot see each
other do not clash, and a filler whose initiating event is disbelieved is not a value.
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