Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type StateMachine ¶
type StateMachine struct { States []State Transitions []Transition }
StateMachine models a finite state machine with a set of states and transitions.
func Parse ¶
func Parse(lines []string) (StateMachine, []string)
Parse parses a .fsm file (std-in) and creates and returns a StateMachine and a list of computations to be performed on the machine.
func (StateMachine) Satisfies ¶
func (fsm StateMachine) Satisfies(res *mtx.SparseMatrix) int
func (*StateMachine) ToMatrix ¶
func (sm *StateMachine) ToMatrix() *mtx.SparseMatrix
type Transition ¶
type Transition struct {
// contains filtered or unexported fields
}
Transition has a from state and a to state.
Click to show internal directories.
Click to hide internal directories.