Software Design, Modelling and Analysis in UML
Lecture 1: Introduction
2013-10-21
- Prof. Dr. Andreas Podelski, Dr. Bernd Westphal
Albert-Ludwigs-Universit¨ at Freiburg, Germany
– 1 – 2013-10-21 – main –
Software Design, Modelling and Analysis in UML Lecture 1: - - PowerPoint PPT Presentation
Software Design, Modelling and Analysis in UML Lecture 1: Introduction 2013-10-21 1 2013-10-21 main Prof. Dr. Andreas Podelski, Dr. Bernd Westphal Albert-Ludwigs-Universit at Freiburg, Germany Contents & Goals This
– 1 – 2013-10-21 – main –
– 1 – 2013-10-21 – Sprelim –
2/40
– 1 – 2013-10-21 – main –
3/40
– 1 – 2013-10-21 – Smodel –
4/40
– 1 – 2013-10-21 – Smodel –
5/40
piece of land.
have a door.
into living room.
have a window.
budget.
http://wikimedia.org (CC nc-sa 3.0, Ottoklages)
http://wikimedia.org (CC nc-sa 3.0, Bobthebuilder82)
– 1 – 2013-10-21 – Smodel –
6/40
piece of land.
have a door.
into living room.
have a window.
budget.
http://wikimedia.org (CC nc-sa 3.0, Ottoklages)
http://wikimedia.org (CC nc-sa 3.0, Bobthebuilder82)
– 1 – 2013-10-21 – Smodel –
6/40
– 1 – 2013-10-21 – Smodel –
7/40
– 1 – 2013-10-21 – Smodel –
8/40
– 1 – 2013-10-21 – Smodel –
9/40
– 1 – 2013-10-21 – Smodel –
10/40
– 1 – 2013-10-21 – Smodel –
11/40
– 1 – 2013-10-21 – main –
12/40
– 1 – 2013-10-21 – Smbse –
13/40
Idea Structure Declarative Behaviour
Behaviour′
Constructive Behaviour
Constructive Behaviour′
– 1 – 2013-10-21 – Smbse –
14/40
Idea Structure Declarative Behaviour
Behaviour′
Constructive Behaviour
Constructive Behaviour′
elicit refine refine refine refine
requirements model requirements/ constraints design system model | =? | =?
generate/ program
– 1 – 2013-10-21 – Smbse –
15/40
Idea Class Diagram Sequence Diagram
Diagram′
Diagram′ State Machine
Diagram′′ State Machine′
– 1 – 2013-10-21 – Smbse –
17/40
Idea Class Diagram Sequence Diagram
Diagram′
Diagram′ State Machine
Diagram′′ State Machine′
ClassB id {redefines name} shape: Square height = 7 / width ClassA name: String shape: Rectangle + size: Integer [0..1] / area: Integer {readOnly} height: Integer= 5 width: Integer
[OMG, 2007a, 135]
Team Year Player PlayedInYear year * * season * * goalie team W
[OMG, 2007b, 44]
sd UserAccepted :User :ACSystem Code d=duration CardOut {0..13} OK Unlock {d..3*d} t=now {t..t+3} DurationConstraint TimeObservation TimeConstraint DurationObservation
[OMG, 2007b, 513]
DialTone Dialing Talking Ringing Busy dial digit(n) connected callee answers Idle busy lift receiver caller hangs up callee hangs up Active dial digit(n) /get dial tone do/ play busy tone do/ play ringing tone /enable speech /disconnect do/ play dial tone Pinned callee answers Connecting dial digit(n)[valid] Time-out do/ play message dial digit(n)[invalid] /connect Invalid do/ play message [incomplete] after (15 sec.) after (15 sec.) activeEntry aborted abort terminate
[OMG, 2007b, 567]
– 1 – 2013-10-21 – Smbse –
17/40
N S W E
CD, SM
S = (T, C, V, atr), SMM = (Σ
D S , A S , →SM )ϕ ∈ OCL expr CD, SD
S , SDB = (QSD, q0, A
S , →SD, FSD)π = (σ0, ε0)
(cons0,Snd0)
− − − − − − − − →
u0
(σ1, ε1)· · · wπ = ((σi, consi, Sndi))i∈N G = (N, E, f)
OD
– 1 – 2013-10-21 – Smbse –
18/40
– 1 – 2013-10-21 – main –
19/40
wiringplan
windows
... – 1 – 2013-10-21 – Sumlmode –
20/40
– 1 – 2013-10-21 – Sumlmode –
21/40
Sketch
In this UmlMode developers use the UML to help communicate some aspects
Sketches are also useful in documents, in which case the focus is communication ra- ther than completeness. [...] The tools used for sketching are lightweight drawing tools and often people aren’t too particular about keeping to every strict rule of the UML. Most UML diagrams shown in books, such as mine, are sketches. Their emphasis is on selective communication rather than complete specification. Hence my sound-bite “com- prehensiveness is the enemy
Blueprint
[...] In forward engineering the idea is that blueprints are developed by a designer whose job is to build a detailed design for a programmer to code up. That design should be sufficiently complete that all design decisions are laid out and the programming should follow as a pretty straightforward activity that requires little thought. [...] Blueprints require much more sophisticated tools than sketches in order to handle the details required for the
Forward engineering tools support diagram drawing and back it up with a repository to hold the information. [...]
ProgrammingLanguage
If you can detail the UML enough, and provide semantics for everything you need in software, you can make the UML be your programming language. Tools can take the UML diagrams you draw and compile them into executable code. The promise of this is that UML is a higher level language and thus more productive than current programming languages. The question, of course, is whether this promise is true. I don’t believe that graphical programming will succeed just because it’s graphical. [...]
– 1 – 2013-10-21 – Sumlmode –
21/40
– 1 – 2013-10-21 – Sumlmode –
22/40
– 1 – 2013-10-21 – Sumlmode –
22/40
– 1 – 2013-10-21 – Sumlmode –
22/40
– 1 – 2013-10-21 – main –
23/40
Idea Class Diagram Sequence Diagram
Diagram′
Diagram′ State Machine
Diagram′′ State Machine′
elicit refine refine refine refine
requirements model requirements/ constraints design system model | =? | =?
generate/ program
– 1 – 2013-10-21 – Scontent –
24/40
CD, SM
S = (T, C, V, atr), SMM = (Σ
D S , A S , →SM)ϕ ∈ OCL expr CD, SD
S , SDB = (QSD, q0, A
S , →SD, FSD)π = (σ0, ε0)
(cons0,Snd0)
− − − − − − − − →
u0
(σ1, ε1)· · · wπ = ((σi, consi, Sndi))i∈N G = (N, E, f)
OD
– 1 – 2013-10-21 – Scontent –
25/40
– 1 – 2013-10-21 – Scontent –
26/40
– 1 – 2013-10-21 – Scontent –
27/40
– 1 – 2013-10-21 – main –
28/40
– 1 – 2013-10-21 – Sformalia –
29/40
– 1 – 2013-10-21 – Sformalia –
30/40
– 1 – 2013-10-21 – Sformalia –
31/40
– 1 – 2013-10-21 – Sformalia –
32/40
– 1 – 2013-10-21 – Sformalia –
33/40
– 1 – 2013-10-21 – Sformalia –
34/40
– 1 – 2013-10-21 – Sformalia –
35/40
– 1 – 2013-10-21 – main –
36/40
– 1 – 2013-10-21 – Slit –
37/40
– 1 – 2013-10-21 – Slit –
38/40
– 1 – 2013-10-21 – main –
39/40
– 1 – 2013-10-21 – main –
40/40