Generic local execution laws over interaction trees #
This file introduces the execution-side counterpart to SyntaxOver.
InteractionOver is a local operational law for agent-indexed node
objects. It says how a whole profile of local objects, one for each agent, is
combined at a single protocol node in order to choose the next move and
continue the interaction. The node-local information seen by those objects is
packaged as a realized node context.
Role-based prover/verifier runners are specializations of this notion, obtained by choosing suitable node contexts and syntax objects.
Just as SyntaxOver reindexes contravariantly along node-context morphisms,
InteractionOver.comap transports a local execution law along the same kind
of context change.
Naming note:
InteractionOver keeps the suffix form for the same reason as ShapeOver:
it is the generalized execution notion over node-local data, while
Interaction names the plain specialization with trivial node data.
InteractionOver l Agent Γ syn m is a one-step operational law for a
lens-executed polynomial interaction.
At each control node, every agent supplies a local syntax object. The interaction law chooses one runtime direction and passes each agent's matching continuation to the recursive runner.
- interact {pos : P.A} {γ : Γ pos} {Cont : Agent → Q.B (l.toFunA pos) → Type w} {Result : Type (max uB₂ a w)} : ((agent : Agent) → syn.Node agent pos γ (Cont agent)) → ((d : Q.B (l.toFunA pos)) → ((agent : Agent) → Cont agent d) → m Result) → m Result
The one-step operational law: given each agent's local node object at a control node, choose a runtime direction and pass each agent's matching continuation to the recursive runner in
m.
Instances For
Reindex a local execution law contravariantly along a node metadata map.
If f : Γ → Δ, then an execution law for Δ-metadata can be reused on
Γ-metadata by first viewing local syntax through SyntaxOver.comap f.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Run a whole lens-executed protocol from a profile of local participant objects, producing the runtime path and an output collected from all agents at that same path.
Equations
- One or more equations did not get rendered due to their size.
- Interaction.InteractionOver.run x profile_2 collect_2 I = pure ⟨PUnit.unit, collect_2 PUnit.unit profile_2⟩
Instances For
Execute a plain TypeTree tree using an identity-lens generic local one-step law.
The local execution structure is the generic InteractionOver; this facade only
keeps the plain-tree path recursion definitionally clean for computation
lemmas.
Equations
- One or more equations did not get rendered due to their size.
- Interaction.InteractionOver.runTypeTree x profile_2 collect_2 I = pure ⟨PUnit.unit, collect_2 PUnit.unit profile_2⟩