Expand description
State layer (SPEC-019 R.1–R.3): the (state …) clause, fixed kernel
selections and reductions (including protocol-position maximum), the fold, and the
canonical JSON rendering.
Every function here is a pure set function of a thread’s accepted acts: permuting or duplicating the input leaves the output unchanged (R7). No clock, no randomness, no other thread.
Structs§
- Act
- An accepted message as the fold sees it (SPEC-019 Reference, “act”).
- State
Bounds (:state-bounds …)(SPEC-019 R.1, ADR-1911). Defaults apply when absent.- State
Clause - The parsed
(state …)clause (SPEC-019 R.1).
Enums§
- Condition
- Closed authored threshold expressions (SPEC-038 CON-3805).
- Entry
- One entry of the state clause.
- Freeze
Policy - Rule
- One author-facing rule (SPEC-019 R.1). Defined by desugaring to the
kernel (R.2); see
fold. - Scalar
Type - Scalar types of state-bearing fields.
- State
Type - The type of a state field, derived from its rule and the shapes.
- Value
- A state value (SPEC-019 R.3).
Constants§
- RESERVED_
REPLACES - The reserved bookkeeping keyword (SPEC-019 ADR-1901). Inserted into the shapes of every writer, delete, and remove verb by the compiler; never declared by an author; never read as data by any rule.
- ROUTING_
KEYWORDS - Routing keywords that a closed shape admits beside the declared fields.
Functions§
- field_
type - The declared type of
(verb, key)from the dialect’s shapes. - fold
- The fold (SPEC-019 R.2): every field of the clause over the accepted acts, in clause order. Total on any finite slice; a set function of it.
- frontier
- The frontier: addresses no accepted act names in
:caused-by, sorted. - keyword_
fields - The keyword parameters of a simple message as a map, routing keywords excluded.
- opener
- The accepted opener, if present: the act of the protocol’s opener verb.
Role-free, its predecessor is
begin; under R6 it names the thread’s cast-bearing root ([[SPEC-014]] REQ-623), which is not an act of the dialect. Several openers in one thread cannot verify, so the least address is a deterministic tie-break, never a semantic one. - opener_
verb - The opener of a protocol: the one performative whose only predecessor
is
begin, when exactly one exists. - render_
json - Render a whole state (R.3): an object in clause order.
- render_
schema - JSON rendering of a schema.
- root
- The thread’s R6 root: the act whose message carries the
with-roleswrapper (the cast) and no predecessor.Nonefor a role-free thread. - state_
schema state_schema(R.7): each field’s type from its rule and the shapes.- wire_
address - The content address of an act as a canonical multibase SHA2-256 multihash. The same symbol-safe spelling is used for native and state references. Act construction selects its identity subtree under SPEC-038 ADR-3807.