Real :digraph-backed reachability/cycle checks over a POWL-shaped process
model, expressed as Ex4pm.Standing-compatible outcomes.
Deliberately built on OTP's own :digraph/:digraph_utils (no new hex
dependency) rather than a third-party graph library -- the same real
collaborator Ex4pmDomain.ProcessGraphProjector uses, so both P0 modules
share one proven graph substrate.
Input shape: %{start: term, arcs: [{term, term}]} where arcs are
directed {from, to} pairs over process-model node identifiers.
Summary
Functions
Builds a real, temporary :digraph.graph() from a POWL-shaped arc list. Caller owns lifecycle.
Checks a POWL-shaped model for cycles and unreachable-from-start vertices,
returning a real Ex4pm.Standing-compatible {standing, detail} tuple.
Functions
@spec build(%{arcs: [{term(), term()}]}) :: :digraph.graph()
Builds a real, temporary :digraph.graph() from a POWL-shaped arc list. Caller owns lifecycle.
@spec check(%{start: term(), arcs: [{term(), term()}]}) :: {:alive, %{vertices: [term()]}} | {:blocked, {:cycle_detected, [term()]}} | {:blocked, {:unreachable_vertices, [term()]}}
Checks a POWL-shaped model for cycles and unreachable-from-start vertices,
returning a real Ex4pm.Standing-compatible {standing, detail} tuple.
{:alive, %{vertices: [...]}} when acyclic and every vertex is reachable
from start; {:blocked, {:cycle_detected, cycle}} when a real cycle
exists; {:blocked, {:unreachable_vertices, [...]}} when some vertex has no
path from start.