Executable step policies for dynamic concurrent processes #
This file adds a lightweight policy layer on top of finite executions of
Concurrent.ProcessOver.
The point of a policy here is operational rather than semantic in the liveness sense: it describes which concrete step transcripts are allowed to occur in a finite execution. So this layer is useful for expressing scheduler rules, authorization filters, event allowlists, or ticket filters that can be checked step by step.
The closed-world Process API is recovered as a specialization of these
generic definitions.
StepPolicy process is an executable constraint on one complete process step.
A policy sees:
- the current residual process state
p; - the concrete sequential transcript
trchosen for the current step protocolprocess.step p.
It returns true when that step is allowed and false when it is forbidden.
Instances For
The permissive policy that allows every step transcript.
Instances For
Conjunction of two step policies. A step is allowed exactly when both component policies allow it.
Instances For
byController resolve allow constrains only the current controlling party of
the concrete step transcript, after projecting the generic context into
StepContext.
Instances For
byPath resolve allow constrains the full controller path of the concrete step
transcript, after projecting the generic context into StepContext.
Instances For
byEvent eventMap allow constrains the stable event label induced by the
transcript-level event map eventMap.
Instances For
byTicket ticketMap allow constrains the stable ticket attached to each step
transcript by ticketMap.
Instances For
respects policy trace checks whether every step of the finite process
execution trace satisfies the executable step policy policy.
Instances For
The closed-world specialization of ProcessOver.StepPolicy.
Instances For
The permissive closed-world step policy.
Instances For
Conjunction of closed-world step policies.
Instances For
byController allow constrains only the current controlling party of the
concrete closed-world step transcript.
Instances For
byPath allow constrains the full controller path of the concrete closed-world
step transcript.
Instances For
byEvent eventMap allow constrains the stable event label induced by the
transcript-level event map eventMap.
Instances For
byTicket ticketMap allow constrains the stable ticket attached to each
closed-world step transcript by ticketMap.
Instances For
respects policy trace checks whether every step of the finite closed-world
process execution trace satisfies the executable step policy policy.