Title: UML Statechart semantics
1UML Statechart semantics
- Speaker Fei Mo
- Tutor Priv.-Doz. Dr. Thomas Noll
Lehrstuhl für Informatik 2 RWTH Aachen SS 07
2Contents
- Introduction
- Fundamentals
- Semantik of UML Statechart
- Extended Hierarchical Automata
- Statechart with STATEMATE
- Summary
3Introduction
- formulate the semantics of UML Statechart
- We show how the Extended hierarchical Automata
represent statecharts - We show the Statechart in STATEMATE
4Contents
- Introduction
- Fundamentals
- Semantik of UML Statechart
- Extended Hierarchical Automata
- Statechart with STATEMATE
- Summary
5Fundamentals
- HierarchyHumans not capable to understand
systems containing more than 5 objects. Most
actual systems require more objects - Behavioral hierarchy
- Structural hierarchy
- Timing behavior.
6Introducing hierarchy
super-state S
sub-states
7Contents
- Introduction
- Fundamentals
- Semantik of UML Statechart
- Extended Hierarchical Automata
- Statechart with STATEMATE
- Summary
8Semantik of UML Statechart
- State
- a condition during the life of an object or an
interaction - Simple State
- rectangle with rounded corners
- The name tab
- The action label
- entry
- exit
- do
- include
9Composite State
10Composite states
- Composite states
- concurrent substates - using -and-
relationship - each substate separated from others by dotted
line - disjoint substates - using -or- relationship
- transitions between substates
- Example of concurrent substates
11Configuration
- A maximum set of states (C) that the system can
be simultaneously in - C contains root state
- If C contains OR-state A, it must contain only
one of As substates - If C contains AND-state A, it must contain all of
As substates - Basic configuration is a maximal set of basic
states that the system can be in simultaneously - Subconfiguration
12Semantik of UML Statechart
- Event
- Triggers the transition
- Can be either internally or externally generated
- Conditions
- Guards the transition from being taken unless it
is true when event occurs
13Semantik of UML Statechart
- Transition
- Simple transition
- a relationship between two states
- source state of t1 is a directly or transitively
nested substate of the source state of t2 -gt t1
is higher than t2 - Start and end transitions
14Semantik of UML Statechart
- Transition
- The exact sequence of actions
- first the exit actions of all states left by
the transition are executed - starting the deepest one in the hierarchy
- next the action associated to the transition is
performed - finally the entry actions of states entered by
the transition - starting with the highest one in the hierarchy
-
15Semantik of UML Statechart
- Transition
- Transitions to and from Concurrent States
- multiple source states and target states
-
16Semantik of UML Statechart
- example
- s0 refined s1, s2, and s3
- composite state s0, s1, s4 s5 concurrent state
s1 - Configurations "System states s1 s6 s8
s2 s3
Transition fire source state is in the current
configuration trigger is offered by the external
environment the guard is satisfied
17Semantik of UML Statechart
- Initial subconfiguration n8, n6
- b -gt t6 next subconfiguration n5, n6
sequence ltd.egt - a -gt t3, t2 n9, n7 ltb, dgt if s8 active no
t1 (s8 lower than s4)
e ? ?\a, b, No transtion, configuration does
not change
18Contents
- Introduction
- Fundamentals
- Semantik of UML Statechart
- Extended Hierarchical Automata
- Statechart with STATEMATE
- Summary
19Extended hierarchical Automata
- Definition Sequential Automaton
- A sequential automaton A is a 4-tuple
- is a finite set of states
- is the initial state
- is a finite set of transition labels
(labels have a particular structure) - is the transition relation
20Extended hierarchical Automata
- Definition Extended hierarchical Automata
- An EHA consists of a set of sequential automata
- An EHA is a 5-tuple
- F is a finite set of sequential automaton
- E is a finite set of events
- V is the set of variables
- ? is refinement function
21Extended hierarchical Automata
22Extended hierarchical Automata
- Extended hierarchical Automata example
Extended Hierarchical Automata can represent
statecharts
23Extended hierarchical Automata
- the refinement function ?
- ?(S) TV, USER,
- ?(OFF) POWER,
- ?(ON) IMAGE,SOUND
- ?(s) Ø for any other state sin EHA dotted
arrows. - Initial states indicated by thick boxes.
- Non-inter-level transitions represented in the
obvious way.
24Extended hierarchical Automata
- The source restriction of transition on STB
- Join transitions a set of states
- target determinator (TD)
- transition from ON to STB -gt off 1
- TD of the transition off1 STB
- TD of the transition on SHW, SND.
25Contents
- Introduction
- Fundamentals
- Semantik of UML Statechart
- Extended Hierarchical Automata
- Statechart with STATEMATE
- Summary
26Statechart with STATEMATE
STATEMATE system
structure
function
Action
Module-charts
Activity-charts
Statecharts
27Statechart with STATEMATE
- In Conf. S,S1,A,B,D,E
- Event a trigers a/b
- Event b trigers b/c?
- what with Event d?
28Contents
- Introduction
- Fundamentals
- Semantik of UML Statechart
- Extended Hierarchical Automata
- Statechart with STATEMATE
- Summary
29UML Statechart Semantics
- Can describe the behavior of instances of a model
element. - Describe sequences of states (rounded boxes) and
transitions (arrows). - Can describe behavior of use cases and
subsystems. - Extended Hierarchical Automata can represent
statecharts - Can be used in STATEMATE to descript separated
actions as a more universal design methodology
30References
- 1 Unified Modeling Language Document Set.
Version1. 1, Rational Software Corporation, 1997. - 2 OMG Unified Modeling Language Specification,
version 2.1.1, Object Management Group, Inc.,
2005. - 3 Mikk E, Lakhnech Y, Petersohn C, Siegel M. On
formal semantics of Statecharts as supported by
STATEMATE. In Duke D, 1997 - 4 Evans A, eds. Proceedings of the 2nd BCS-FACS
Northern Formal Methods Workshop. London
Springer-Verlag, 1997. - 5 Harel D, Naamad A. The STATEMATE semantics of
statechartsJ. ACM Transactions on Software
Engineering and Methodology, 1996.
31Thanks!