Role decorations and common role-based node contexts #
A RoleDecoration spec is a Spec.Decoration with fiber fun _ => Role: each internal node is
labeled sender or receiver. This replaces a separate two-party interaction inductive while reusing
all Spec infrastructure (Transcript, append, etc.).
This file also packages the most common role-based node contexts used by the two-party interaction layer:
RoleContext/RoleSchemafor plain sender/receiver metadata;RoleMonadContextfor one bundled monad over each role-labeled node;RolePairedMonadContextfor paired prover/verifier monads;RolePairedMonadContext.fst/RolePairedMonadContext.sndfor forgetting one side of the paired monadic context.
Only the plain role layer is exposed as a schema here. The monadic extensions are exported as
realized node contexts, because BundledMonad lives in a higher universe than Role, while
Spec.Node.Schema currently uses one fixed universe for all staged fields.
These are the outward-facing schema/context names used by Strategy.withRolesAndMonads,
Counterpart.withMonads, and the monadic execution layer.
The plain role-labeled node context.
Instances For
Role context extended by one bundled monad field.
Instances For
Role context extended by a pair of bundled monads.
Instances For
Forget the counterpart monad from a paired role/monad context.
Instances For
Forget the focal monad from a paired role/monad context.
Instances For
Per-node sender/receiver assignment on a Spec.
Instances For
Swap sender ↔ receiver at each node.
Because RoleDecoration is an abbrev of Decoration (fun _ => Role), dot notation on
roles : RoleDecoration spec resolves this Spec.Decoration.swap.
Instances For
View a plain monad decoration as one displayed layer over an existing role decoration.
Instances For
Pack roles together with one bundled monad per node into RoleMonadContext.
Instances For
View a pair of monad decorations as one displayed layer over an existing role decoration.
Instances For
Pack roles together with paired prover/counterpart monads into RolePairedMonadContext.