Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Model ¶
type Model[S any] struct { // Key returns a dedup key. Two states with the same key are the same state. Key func(S) string // Successors returns every enabled action from s. An empty result means s // is terminal. Successors func(S) []S // Quiescent reports whether a terminal state is a legal stopping point. // A terminal state that is not quiescent is a deadlock. Quiescent func(S) bool // CheckTerminal validates one terminal state. Return an error to fail. CheckTerminal func(S) error }
Model describes one state machine to explore. S is the concrete state type, so every call below is a direct call.
Click to show internal directories.
Click to hide internal directories.