SysML State Machine Modeling (systems-engineering-safety/mbse/state-machine)
Use when the task is behavioral modeling with SysML state machines: states, transitions, events, guards, actions, and the reachability or conflict review of the resulting model.
Domain quick reference
- A state machine models behavior as states connected by transitions.
- A transition fires on an event when its guard condition is true; firing may run actions and moves the machine to a target state.
- The initial state is the entry point; a state is reachable when a chain of transitions leads to it from the initial state.
- A transition conflict exists when one event enables more than one transition from the same state and no priority resolves the choice.
- Review checks that every state is reachable and no event is ambiguous, per the behavioral model review in the ARP4754A development process.
Workflow
- Collect the states, initial state, and the transition list with events, guards, and actions.
- Validate the machine so every transition endpoint exists.
- Simulate the event sequence and record the firing trace.
- Compute the reachable state set from the initial state.
- List the unreachable states and any transition conflicts, then gate the behavioral model review.
Pitfalls
- Firing a transition without checking its guard; a false guard must leave the machine in its current state.
- Two enabled transitions on one event with no priority; the model is ambiguous and the conflict must be resolved.
- A guard missing from the evaluation context; treat an absent guard as blocking, not as enabled.
- Declaring a state that no transition chain can reach; the review must list it as unreachable.
Behavior contract (gate 3)
The firing, trace, and reachability logic is exercised by the gate 3 contract test: scripts/test_state_machine.py against scripts/state_machine_logic.py (stdlib unittest, offline). Run: python3 scripts/test_state_machine.py
Compliance
- Standards referenced, not reproduced: ARP4754A text is proprietary (SAE); summary-only per standards-map.yaml. SysML state machine semantics are common modeling methodology.
- compliance: STANDARDS-REF, gated: false.