Title: STATECHARTS
1STATECHARTS
- Visual Formalism for Complex Systems
Presented by Marjan Kotorcevik
David HAREL
2Important concepts
- Transformational system
- input/output system
- State diagram
- directed graph with nodes (states) and arrows
(transitions) -
- Reactive system
- event driven system (input/output,
condition/action, timing constraints) - Statechart
- visual way of describing states and transitions.
- allows modularity, concurrency, refinement and
zoom.
3State levels
State diagram
Statechart
-cluster superstate D -replace two B arrows with
one
-zoom out
-zoom out
-D is default state from D and B
-A is default state from A and C
4Citizen quartz multi-alarm III watch
- transitions made with pressing of a - display
date with pressing of d
History of the system
- enter state last visited from G and F
- enter state last visited from A, B, C, D and E
- if state in G (choose default state), if state
in F (choose last visited)
5Citizen quartz multi-alarm III watch
6Orthogonality independence and concurrency
orthogonate
- Y is orthogonal (AND) product of A and D
zoom out
7Orthogonality in citizen watch
2-minute return to time from all displays
other than the stopwatch
8Orthogonality in citizen watchview 2
P1, P2 alarm1 enabled (alarm2 disabled T1
T2)
P alarm1 enabled alarm2 enabled T1 T2)
9Additional statechart features
-condition and selection entrances
-delays and timeouts (lower/upper bound)
-unclustering
condition
selection
10Actions and activities
11Possible extensions to the basic statechart
formalism
-parameterized states
-overlapping states
-temporal logic, recursion and probabilistic
Assertion language for statecharts
12Semantics of Statecharts
- Difficult to provide formalism
- error (default contradiction)
- orthogonal components
- events generated by actions
- events generated by the dynamics of statecharts
- allow general, internal and simultaneous events
13Semantics of Statecharts
- State tree and set of transitions
-
- nextstep(X,C,E)
full basic configuration
set of external conditions
set of simultaneous external events
X
next possible set of full basic configurations
14Other solutions to behavioral description of
reactive systems
- Peri nets
- Milners CCS
- Zaves approach
- ESTEREL programming language
15Strengths of statechart approach
- Direct relevance to the embedded software systems
- Introduction of and-state
- Nearly a complete composition of well structured
tools and notations to describe multi behavioral
systems with concurrent internal/external events,
actions, and activities. - Possibly extensible.
- Similarity to state diagrams and availability of
direct reconstruction and reimplementation
16Weaknesses
- Still in area of research since 1986
- Difficulties in dealing with correctness and
semantics in particular cases - Out of box thinking without simultaneous support
of programming language or text notations - Do not include the notion of states taking a
measured amount of time compared to timed CSP - No notion of guards implemented by Douglass
(1999)