Title: Constructing Automata for UML 2'0 Interactions
1Constructing Automata for UML 2.0 Interactions
Masters Dissertation
Jochen Wuttke
Submitted May 10th, 2005 Presentation July
6th, 2005
2Agenda
- Motivation
- UML 2.0 Interactions
- Application in Hugo/RT
- Semantics as Finite State Automata
- Automata for BasicInteractions
- Composition through binary operators
- Modification through unary operators
- Prototype Implementation
- Current Research
3UML 2.0 Interactions
Basic interactions model communication behaviour
and can be composed into more complex models.
- Basic interactions are equivalent to UML 1.x
sequence diagrams. - Interactions can be composed into complex models
using operators. - Operators improve the expressiveness of the UML
interaction language.
4UML Semantics
The UML 2.0 semantics are not yet clearly defined
and need a formal foundation.
- The UML standard document defines the semantics
of interactions in natural language. - Any kind of verification needs clearly defined
semantics that allow formal reasoning over the
language. - Denotational semantics allow mathematical
reasoning over the language structure. - Automata define the semantics of a language in
terms of accepted words/runs.
5Hugo/RT
Hugo/RT is a UML model translator for model
checking, theorem proving and code generation.
- Focuses on proving the consistency of behavioural
systems specifications? state machines and
interactions - Translates UML models into
- PROMELA code for SPIN
- Code for UPPAAL
- Java Code
- and more
- Provides better output and trace information.
6Hugo/RT (2)
Hugo/RT uses interactions to describe the
behaviour to be verified.
? ?
Hugo/RT
SPIN
PROMELA
- Increased expressiveness of interactions
simplifies model checking. - not allows the explicit specification of
undesired behaviour.
7Agenda
- Motivation
- UML 2.0 Interactions
- Application in Hugo/RT
- Semantics as Finite State Automata
- Automata for BasicInteractions
- Composition through binary operators
- Modification through unary operators
- Prototype Implementation
- Current Research
8Semantics of Basic Interactions
Semantics of basic interactions can be expressed
by deterministic, acyclic automata.
snd(connect, obj1, obj2)
rcv(connect, obj1, obj2)
snd(ok, obj2, obj1)
rcv(ok, obj2, obj1)
9Composition through binary operators
Binary operators represent composition rules for
automata.
msg(connect, obj1, obj2)
ok
else
ok
else
snd(denied,obj2,obj1)
snd(ok,obj2,obj1)
rcv(ok,obj2,obj1)
rcv(denied,obj2,obj1)
10Modification through unary operators
Unary operators are modification rules for
automata.
Obj1
Obj2
loop lt2,3gt
a
b
11Prototype Implementation
The prototype supports most operators and output
formats.
- Uses a proprietary, text-based input file for
interactions. - Creates an internal representation of the
automaton comprising states and transitions. - Produces output in various formats for further
use, e.g. GraphViz and PROMELA never-claims.
12Results and open questions
The extended expressiveness of UML 2.0
Interactions improves ist usability significantly.
- Semantics in the form of automata are close to
the requirements of model checkers ? easy
translation into code. - Implementation shows practical problems that
might not be immediately obvious in a purely
mathematical analysis.
- Semantics of some operators are complicated
- neg Positive, negative and undecidable traces.
- loop Model Checking of infinite loops is
generally undecidable nested operators.
13Agenda
- Motivation
- UML 2.0 Interactions
- Application in Hugo/RT
- Semantics as Finite State Automata
- Automata for BasicInteractions
- Composition through binary operators
- Modification through unary operators
- Prototype Implementation
- Current Research
14Current research
Other approaches to express interactions as
automata are currently researched.
- Message Sequence Graphs (MSG) are another
approach to express interactions as automata.
15The MSG approach
The MSG approach tracks progress through a high
level control flow graph.
- Control flow operators, e.g. alt, loop, are
represented by the graph. - The nodes represent basic interactions and/or
semantical operators like not and ignore. - The events on each lifeline are represented in a
separate automaton for every node. - Progess inside the nodes follows the standard
algorithm. - Progress through the graph is tracked by a single
buffer.
16An example
Buffer
_Start
Obj1/2 ?
Obj2?
_Start Op_1
_Start Op_1 Op_1
Obj1?
17Summary
- The UML semantics specification in natural
language is not sufficient for applications. - Model Checking and other verification is a major
field in need for formal specifications. - Semantics as automata, based on formal analysis,
are a valuable approach for such applications. - There are various approaches to this, each having
its specific advantages and disadvantages.
18Questions?
Thank you for your attention.
19Modification through unary operators
Unary operators are modification rules for
automata.
Obj1
Obj2
loop lt2,3gt
a
b
20Modification through unary operators(2)
The loop operator can create undecidable problems.
21Modifikation durch unäre Operatoren
Unäre Operatoren stellen eine Modifikationsvorschr
ift für Automaten dar.
Obj1
Obj2
loop lt2,3gt
a
b
22Semantiken
Unterschiedliche Abstraktionsstufen erfordern
unterschiedliche Semantik-notationen.
Denotationelle SemantikMathematisch formale
Notation, dient zur Ableitung und zum Beweis von
Eigenschaften der Sprache. Operationelle
SemantikBeschreibung der Semantik einer Sprache
durch konkrete (induktive) Berechnungsanweisungen.
Semantik durch endliche AutomatenSehr
konkrete, anwendungsnahe Beschreibung der
Semantik durch akzeptierende Abläufe eines
endlichen Automaten.