Software Design, Modelling and Analysis in UML
Lecture 09: Class Diagrams IV
2012-11-27
- Prof. Dr. Andreas Podelski, Dr. Bernd Westphal
Albert-Ludwigs-Universit¨ at Freiburg, Germany
– 09 – 2012-11-27 – main –
Software Design, Modelling and Analysis in UML Lecture 09: Class - - PowerPoint PPT Presentation
Software Design, Modelling and Analysis in UML Lecture 09: Class Diagrams IV 2012-11-27 09 2012-11-27 main Prof. Dr. Andreas Podelski, Dr. Bernd Westphal Albert-Ludwigs-Universit at Freiburg, Germany Contents & Goals
– 09 – 2012-11-27 – main –
– 09 – 2012-11-27 – Sprelim –
2/42
– 09 – 2012-11-27 – main –
3/42
– 09 – 2012-11-27 – Sassocrest –
4/42
C D
x : Int
– 09 – 2012-11-27 – Sassocrest –
5/42
C D
x : Int
– 09 – 2012-11-27 – Sassocrest –
5/42
C
x : Int
D
– 09 – 2012-11-27 – Sassocrest –
6/42
C
x : Int
D
– 09 – 2012-11-27 – Sassocrest –
6/42
– 09 – 2012-11-27 – Sassocrest –
7/42
– 09 – 2012-11-27 – Sassocrest –
8/42
– 09 – 2012-11-27 – Sassocrest –
8/42
– 09 – 2012-11-27 – Sassocrest –
9/42
OCL(role) := context C inv :
OCL(role) := context C inv : not(oclIsUndefined(role))
– 09 – 2012-11-27 – Sassocrest –
9/42
OCL(role) = context C inv :
role1 0..1 role2 4, 17 role3 3..∗
– 09 – 2012-11-27 – Sassocrest –
10/42
– 09 – 2012-11-27 – Sassocrest –
11/42
– 09 – 2012-11-27 – Sassocrest –
11/42
– 09 – 2012-11-27 – Sassocrest –
11/42
– 09 – 2012-11-27 – Sassocrest –
11/42
– 09 – 2012-11-27 – Sassocrest –
11/42
– 09 – 2012-11-27 – Sassocrest –
12/42
C D = {CD1, . . . , CDn} signature S (C D) invariants Inv(C D) basic (classes and attributes) extended (visibility) · distinguish
OCL(role) |
– 09 – 2012-11-27 – Sassocrest –
13/42
– 09 – 2012-11-27 – Sassocrest –
14/42
– 09 – 2012-11-27 – Sassocrest –
14/42
C D
– 09 – 2012-11-27 – Sassocrest –
15/42
C D
– 09 – 2012-11-27 – Sassocrest –
15/42
C D
C1 C2 . . . Cn
role•
r
– 09 – 2012-11-27 – Sassocrest –
15/42
– 09 – 2012-11-27 – main –
16/42
C D
role ×
C D
role ×
– 09 – 2012-11-27 – Sback –
17/42
– 09 – 2012-11-27 – main –
18/42
– 09 – 2012-11-27 – Socldia –
19/42
– 09 – 2012-11-27 – Socldia –
19/42
– 09 – 2012-11-27 – Socldia –
20/42
– 09 – 2012-11-27 – Socldia –
21/42
– 09 – 2012-11-27 – Socldia –
21/42
– 09 – 2012-11-27 – Socldia –
22/42
CD∈C D Inv(CD).
– 09 – 2012-11-27 – Socldia –
22/42
C
v : τ {v > 3}
– 09 – 2012-11-27 – Socldia –
23/42
S . Of those, some satisfy Inv(C D) and some don’t.
S consistent if and only if σ |
C D = {CD1, . . . , CDn} signature S (C D) invariants Inv(C D) basic (classes and attributes) extended (visibility) (σ ∈) ΣD
S
· distinguish induce
– 09 – 2012-11-27 – Socldia –
24/42
(The exact meaning of “use” will become clear when we study behaviour — intuitively: the system states that are reachable from the initial system state(s) by calling methods or firing transitions in state-machines.)
– 09 – 2012-11-27 – Socldia –
25/42
(The exact meaning of “use” will become clear when we study behaviour — intuitively: the system states that are reachable from the initial system state(s) by calling methods or firing transitions in state-machines.)
TLCtrl
red : Bool green : Bool
not(red and green)
– 09 – 2012-11-27 – Socldia –
25/42
– 09 – 2012-11-27 – Socldia –
26/42
– 09 – 2012-11-27 – Socldia –
26/42
– 09 – 2012-11-27 – main –
27/42
– 09 – 2012-11-27 – Selements –
28/42
– 09 – 2012-11-27 – Selements –
28/42
– 09 – 2012-11-27 – Selements –
28/42
– 09 – 2012-11-27 – Selements –
29/42
– 09 – 2012-11-27 – Selements –
29/42
– 09 – 2012-11-27 – Selements –
29/42
– 09 – 2012-11-27 – Selements –
29/42
– 09 – 2012-11-27 – Selements –
29/42
– 09 – 2012-11-27 – Selements –
29/42
– 09 – 2012-11-27 – Selements –
29/42
– 09 – 2012-11-27 – Selements –
30/42
– 09 – 2012-11-27 – Selements –
30/42
– 09 – 2012-11-27 – Selements –
30/42
– 09 – 2012-11-27 – Selements –
30/42
– 09 – 2012-11-27 – Selements –
30/42
– 09 – 2012-11-27 – Selements –
31/42
– 09 – 2012-11-27 – Selements –
31/42
– 09 – 2012-11-27 – Selements –
31/42
– 09 – 2012-11-27 – Selements –
32/42
– 09 – 2012-11-27 – Selements –
32/42
– 09 – 2012-11-27 – Selements –
33/42
– 09 – 2012-11-27 – Selements –
34/42
– 09 – 2012-11-27 – Selements –
35/42
– 09 – 2012-11-27 – Selements –
35/42
– 09 – 2012-11-27 – main –
36/42
– 09 – 2012-11-27 – main –
37/42
– 09 – 2012-11-27 – Stron –
38/42
– 09 – 2012-11-27 – Stron –
38/42
Main External inputs
Game Logic
(Physics) Engine
Output
ASCII to bitmap; native or via API)
notify update ? ?
– 09 – 2012-11-27 – Stron –
39/42
Main External inputs Game Logic (Physics) Engine Output notify update ? ?
Tron Joystick? . . . Keyboard? Control Player
colour score direction speed
Gameplay Render OpenGL? . . . aalib? AI? Segment
x0, y0 x1, y1 colour
Engine
areawidth areaheight
1..∗ notify update 0..∗ head world 1..∗ Conventions:
– 09 – 2012-11-27 – Stron –
40/42
– 09 – 2012-11-27 – main –
41/42
– 09 – 2012-11-27 – main –
42/42