SC.Configuration (sc v1.0.2)
View SourceRepresents the current active states in an SCXML state chart.
Only stores leaf (atomic) states - parent states are considered active when any of their children are active. Use active_ancestors/2 to compute the full set of active states including ancestors.
Summary
Functions
Check if a specific leaf state is active.
Compute all active states including ancestors for the given document.
Get the set of active leaf states.
Add a leaf state to the active configuration.
Create a new configuration with the given active states.
Remove a leaf state from the active configuration.
Types
Functions
Check if a specific leaf state is active.
@spec active_ancestors(t(), SC.Document.t()) :: MapSet.t(String.t())
Compute all active states including ancestors for the given document.
Uses parent pointers for O(d) performance per state instead of O(n×d) tree traversal, where d is the maximum depth and n is the number of states. This optimization is critical since active configuration is computed frequently during interpretation.
Get the set of active leaf states.
Add a leaf state to the active configuration.
Create a new configuration with the given active states.
Remove a leaf state from the active configuration.