Concrete OpenTheory model backed by OpenProcess m #
This file provides the first concrete realization of UC.OpenTheory
using actual open processes (OpenProcess m Party Δ), i.e., processes
that carry a per-step nodewise-monadic sampler in the intermediate monad
m.
Implemented operations #
mapadapts boundary actions along aPortBoundary.Hom, with a provenIsLawfulMapinstance (functoriality). The per-step sampler is left unchanged; only the boundary-action decoration is pushed forward.parplaces two open processes side by side using binary-choice interleaving: a scheduling node chooses left or right, then runs the selected subprocess's step protocol. Emitted packets are injected into the appropriate summand of the tensor output interface. The scheduler move is resolved by the theory's sharedschedulerSampler : m (ULift Bool); per-branch samplers are assembled viaSpec.Sampler.interleave.wireconnects a shared internal boundary between two processes. Packets on the shared boundary are filtered out (deferred to runtime routing), while packets on the remaining external boundaries are preserved. Samplers are threaded the same way as forpar.plugcloses an open system against a matching context by internalizing all boundary traffic. Samplers are again threaded via the scheduler-interleaving pattern.
The concrete open-composition theory backed by OpenProcess m.
Obj ΔisOpenProcess m Party Δ, the boundary-indexed family of open concurrent processes carrying per-stepm-samplers.mapadapts boundary actions along aPortBoundary.Hom, preserving samplers verbatim.par,wire, andplugall useOpenProcess.interleavewith the appropriate context morphisms and thread the sharedschedulerSamplerthroughSpec.Sampler.interleave.
Instances For
Monoidal and compact closed laws up to bisimilarity #
Parallel composition of open processes is associative up to bisimilarity: reassociating the internal scheduler nesting does not change the observable boundary behavior.
Parallel composition of open processes is commutative up to bisimilarity.
The unit for parallel composition is the trivial process with no boundary
and PUnit state. The sampler is the trivial Decoration.done sampler.
Instances For
The monoidal unit is a left identity for parallel composition up to bisimilarity.
The monoidal unit is a right identity for parallel composition up to bisimilarity.
The identity wire (coevaluation) on boundary Γ: relays messages
bidirectionally between swap Γ and Γ.
Instances For
Left zig-zag: wiring the identity wire on the left is a no-op up to bisimilarity.
Right zig-zag: wiring the identity wire on the right is a no-op up to bisimilarity.
plug is derivable from wire plus boundary reshaping, up to
bisimilarity.
The monoidal unit equals the coevaluation at the trivial boundary, up to bisimilarity.