%!TEX root=./main.tex
Statecharts, introduced by Harel~\cite{Harel_Statecharts}, is used to specify complex, timed, reactive, autonomous discrete-event systems.
It is an extension of Timed Finite State Automata which adds depth, orthogonality, broadcast communication and history.
Its visual representation is based on higraphs, which combine graphs and Venn diagrams~\cite{Harel_VisualFormalisms}.
This representation is most suited to represent Statecharts models, and many tools offer visual editing and simulation support for the Statecharts formalism.
Examples include STATEMATE~\cite{Harel1996}, Rhapsody~\cite{Harel_Rhapsody}, Yakindu~\footnote{\url{https://www.itemis.com/en/yakindu/statechart-tools/}}, and Stateflow~\footnote{\url{https://www.mathworks.com/products/stateflow.html}}.

This tutorial introduces Statecharts modelling, simulation, and testing.
As a running example, the behaviour of a simple timed, autonomous, reactive system is modelled: a traffic light.
We start from the basic concepts of states and transitions and explain the more advanced concepts of Statecharts by extending the example incrementally.
We discuss several semantics options, such as STATEMATE and Rhapsody semantics.
We use Yakindu to model the example system.