← all environments 07 · Advanced · UML statechart · v0.6.0

Live State Machine

UML statechart

A traffic-signal controller drawn as a genuine UML state machine — initial pseudostate, three states, four guarded transitions. Firing an event (or letting the timer run) moves a live token: the active state glows, the taken transition pulses, and an event-trace log records the run. The diagram is not a picture of the machine; it is the machine.

4 components · 4 connections · event-driven finite-state executor

recommended lab 7 of 11

Predict guarded state transitions and identify a liveness failure.

Builds on: 8-Bit Digital Adder

predict · then test

An event arrives with no enabled transition from the current state. What must a deterministic machine do?

Commit before the explanation appears. This is a prediction, not a quiz score.

governing model
δ:S×ΣS    (s,e)snext if guard(e)\delta : S \times \Sigma \rightarrow S \;\cdot\; (s, e) \mapsto s_{\text{next}} \text{ if guard}(e)
structural inventory
  • initial pseudostate
  • Red / Green / Yellow states
  • 4 guarded transitions
  • event queue + trace log
boundaries
  • deterministic δ\delta
  • one active state
  • guarded, timed transitions
diagnosis challenge Fault identity withheld: infer it from the changed outputs first.
causal signal trace paused

Enter the machine Power-on follows the initial transition into Red.

step 1 / 4 Enter the machine

control console

The token sits on the active state. Let the guarded timers run, or fire the next event by hand — the diagram is the machine.

Auto-run uses the causal stage delay configured in the timeline above.

enabled transition RED  t > T  GREEN\htmlData{math-slot=from}{\text{RED}}\xrightarrow{\;\htmlData{math-slot=guard}{\text{t > T}}\;} \htmlData{math-slot=to}{\text{GREEN}}

switchboard · fault injection

test bed · mode=full

Live State Machine4 components and 4 connections.powert > Tredt > Tgreent > TyellowRedGreenYellow
Live State Machine

instrumentation rack

active state RED Auto-run paused.
state residency
RED
1
GREEN
0
YELLOW
0
event trace
  1. ▸ start → RED
diagnostic probe