Transit.StateGraph
- Package
- purescript-transit
- Repository
- m-bock/purescript-transit
Conversion of transit specifications to graph data structures.
This module provides functions to convert transit cores into graph representations, enabling graph-based analysis of state machines (e.g., finding paths, cycles, etc.).
#EdgeStateTransition Source
type EdgeStateTransition = { guard :: Maybe GuardName, msg :: MsgName }Edge label type for state transitions in the graph.
Contains the message that triggers the transition and an optional guard condition name.
#StateGraph Source
type StateGraph = Graph EdgeStateTransition StateNodeGraph representation of a state machine.
Nodes represent states, and edges represent transitions with their associated messages and optional guard conditions.
#mkStateGraph Source
mkStateGraph :: TransitCore -> StateGraphConverts a transit core specification into a graph representation.
Each match in the transit core becomes one or more edges in the graph, with each return state creating a separate edge. Guard conditions are preserved in the edge labels.
- Modules
- Transit
- Transit.
Class. CheckReturn - Transit.
Class. CurryN - Transit.
Class. MkHandlerLookup - Transit.
Class. MkUpdate - Transit.
Core - Transit.
DSL - Transit.
Data. DotLang - Transit.
Data. Graph - Transit.
Data. Html - Transit.
Data. MaybeChurch - Transit.
Data. Table - Transit.
HandlerLookup - Transit.
Render. Graphviz - Transit.
Render. Theme - Transit.
Render. TransitionTable - Transit.
StateGraph - Transit.
VariantUtils