Title: Introduction to Software Engineering
1Introduction to Software Engineering Embedded
System Modeling
- Software Engineering Laboratory
- 2008.03
2Overview
Well cover these stages
Requirements Analysis
System Analysis
Requirements
System Design
System Integration Application Generation
Well show simulation and code generation
Verifiable Application
3Telelogic
- Software development tool company
- Top 10s company in computer industry
- Products
- Doors Requirement engineering tool
- Tau Modeling tool
- Synergy Configuration management tool
- Doc Expression Documentation tool
4Telelogic TAU
- UML development tool
- Model Editing
- Simulation / Verification
- Code generator
- Based on UML 2.0
5Basics of TAU (1/10)
6Basics of TAU (2/10)
7Basics of TAU (3/10)
8Basics of TAU (4/10)
9Basics of TAU (5/10)
10Basics of TAU (6/10)
Menu Bar
Tool Bar
Model Window
View Window
Message Window
11Basics of TAU (7/10)
12Basics of TAU (8/10)
13Basics of TAU (9/10)
14Basics of TAU (10/10)
15Coffee Machine
- Requirements
- Coffee Machine sell coffee and tea
- Coffee is sold by 10 coin
- Tea is sold by 5 coin
- Coffee Machine accept only 10 coin and 5 coin
- After putting coin into vending machine, Customer
can choose coffee or tea - If tea is ordered, Hot water is given to
Customer. - If coffee is ordered, a customer can choose
whether milk or no milk, and quantity of sugar
16Requirement analysis
Use Case Diagram
What is the functions of the system?
Sequence Diagram
What is the scenarios of the system?
Requirements
17Workspace Loading
18Use Case Diagram (1/16)
19Use Case Diagram (2/16)
20Use Case Diagram (3/16)
21Use Case Diagram (4/16)
- Creating Use Case Diagram
22Use Case Diagram (5/16)
- Creating Use Case Diagram
Press the button to maximize window
23Use Case Diagram (6/16)
- Creating Use Case Diagram
24Use Case Diagram (7/16)
25Use Case Diagram (8/16)
26Use Case Diagram (9/16)
27Use Case Diagram (10/16)
28Use Case Diagram (11/16)
29Use Case Diagram (12/16)
- Creating association between MakeCoffee and
Customer
Dependancy
Association
Generalization
30Use Case Diagram (13/16)
- Creating association between MakeCoffee and
Customer
Click
Move to actor
Click
31Use Case Diagram (14/16)
Drag and Drop
Click
32Use Case Diagram (15/16)
33Use Case Diagram (16/16)
- Exercise
- Create remained use case and its association
- Hint
- We created MakeCoffee use case
- Create use case related making tea and its
association
34Sequence Diagram (1/10)
- What is the scenarios of this system?
- Generally, we draw sequence diagram on each use
case - MakeCoffee
- Put 10 coin into CoffeeMachine
- Select Coffee and some additives
- CoffeeMachine make a cup of coffee and return it
- MakeTea
- Put 5 coin into CoffeeMachine
- Select Tea
- CoffeeMachine make a cup of tea and return it
35Sequence Diagram (2/10)
- Creating Interaction Implementation
36Sequence Diagram (3/10)
- Creating Sequence Diagram
37Sequence Diagram (4/10)
- Draw the entities in sequence diagram
We can draw additional entity
We already have entities of the model
38Sequence Diagram (5/10)
- Drag and drop Customer to sequence diagram
39Sequence Diagram (6/10)
- Drag and drop CoffeeMachine to sequence diagram
40Sequence Diagram (7/10)
- Draw message from Customer to CoffeeMachine
Message Type
41Sequence Diagram (8/10)
- Draw message from Customer to CoffeeMachine
Click
Click
Click and type a name of the message
42Sequence Diagram (9/10)
43Sequence Diagram (10/10)
- Exercise
- Create remained messages
- between Customer and CoffeeMachine
- Hint
- In MakeCoffee scenario,
- After putting coin, we must select coffee and
additives. - Then CoffeeMachine return a cup of coffee
44System Analysis
What are the classes that the system consist of ?
Use Case Diagram
What is the relationship between classes?
Class Diagram (Domain Model)
What are attributes and operations of each class?
What is detailed scenarios?
Sequence Diagram
Detailed Sequence Diagram
45Class Diagram (1/26)
- What is the entities in this system?
46Class Diagram (2/26)
47Class Diagram (3/26)
48Class Diagram (4/26)
49Class Diagram (5/26)
50Class Diagram (6/26)
- Renaming class and set to external class
Type Customer
Check
51Class Diagram (7/26)
- Exercise
- Create remained classes
- Hint
- We found out CoffeeMachine, Controller and
- Hardware in previous slide
52Class Diagram (8/26)
- Making relationship between classes
- CoffeeMachine is composite with Controller and
Hardware
Move to class and click
Click
53Class Diagram (9/26)
- Making relationship between classes
Drag and Drop to move connection point
54Class Diagram (10/26)
- Making composite relationship
55Class Diagram (11/26)
- Making composite relationship with Hardware
56Class Diagram (12/26)
- Identifying Active Class
- Customer and CoffeeMachine can simultaneously
act. - Controller and Hardware can simultaneosly act.
- Controller and Hardware is parts of CoffeeMachine
- Customer, CoffeeMachine, Controller, Hardware are
active classes - In the embedded system, many classes can be
identified to active class
57Class Diagram (13/26)
Check
Click a class
58Class Diagram (14/26)
- Completed identifying active class
59Class Diagram (15/26)
- We can define interfaces
- Between external and internal
- Between Customer and CoffeeMachine
- In embedded system, Interfaces frequently come
out - Between external system and internal system
- Between sub systems
- We define interfaces between Customer and
CoffeeMachine
60Class Diagram (16/26)
61Class Diagram (17/26)
Type ToUser
Click to create Interface
62Class Diagram (18/26)
Click
Click
63Class Diagram (19/26)
64Class Diagram (20/26)
65Class Diagram (21/26)
66Class Diagram (22/26)
- Creating Provided Interface
67Class Diagram (23/26)
- Creating Provided Interface
68Class Diagram (24/26)
- Creating Required Interface
69Class Diagram (25/26)
- Creating Required Interface
70Class Diagram (26/26)
71Workspace Loading
72System Internal Behavior
- In a case of Making Coffee
- Fill water
- Fill coffee
- Heat water
- In a case of Making Tea
- Fill water
- Heat water
73Sequence Diagram (1/2)
- Draw detailed sequence diagram
Double Click
74Sequence Diagram (2/2)
- Drawing detailed sequence diagram
75System Design (1/3)
What is the behavior of each class?
Detailed Sequence Diagram
State Chart Diagram
What is specific message and its type?
Class Diagram (Domain Model)
Refined Class Diagram
Class Diagram (Signal Model)
76System Design (2/3)
- Messages between Controller and Hardware
- FillWater, FillCoffee
- HeatWater
- WaterOK, CoffeeOK
- Warm
- Messages between Controller and Customer
- Coin
- ReturnChange
- Tea, Coffee
- CupOfWater, CupOfCoffee
77System Design (3/3)
- Every class of this system is active class.
- Between active classes, types of messages are
generally asynchronous message or signal. - We will design messages to be signal.
78Class Diagram of Signal Model (1/7)
- Open Signals class diagram
79Class Diagram of Signal Model (2/7)
- Defined signals as classes
80Class Diagram of Signal Model (3/7)
81Class Diagram of Signal Model (4/7)
Type Tea
82Class Diagram of Signal Model (5/7)
83Class Diagram of Signal Model (6/7)
Drag and Drop
84Class Diagram of Signal Model (7/7)
85Refined Class Diagram (1/3)
86Refined Class Diagram (2/3)
- Review Internal Communication on CoffeeMachine
Double Click
87Refined Class Diagram (3/3)
- Review Internal Communication on CoffeeMachine
88State chart diagram (1/3)
- Review state charts of Controller
Double Click
89State chart diagram (2/3)
- Review state charts of Controller ( NewOrder )
90State chart diagram (3/3)
- Review state charts of Controller (
MakingBeverage )
91System Integration Application Generation
Check Model
Model Simulation
Class Diagram
Simulation Result
Composite Diagram
Generated Code
State Chart Diagram
Code Generation
92Workspace Loading
93Model Check
94Simulation (1/10)
95Simulation (2/10)
96Simulation (3/10)
- Expand Message Window from Environment
At the bottom of TAU window, there is message
window
Click to expand
97Simulation (4/10)
Step over
Turn on trace function
98Simulation (5/10)
99Simulation (6/10)
- Send coin signal to simulator
And keep going by step over
100Simulation (7/10)
- Send coffee signal to simulator
And keep going by step over
101Simulation (8/10)
102Simulation (9/10)
103Simulation (10/10)
104Code Generation (1/9)
- Setting for code generation
105Code Generation (2/9)
- Setting for code generation
Select add-ins tab
Check
106Code Generation (3/9)
- Setting for code generation
107Code Generation (4/9)
- Setting for code generation
108Code Generation (5/9)
- Setting for code generation
109Code Generation (6/9)
110Code Generation (7/9)
111Code Generation (8/9)
112Code Generation (9/9)
113QA
114Thank you for listening !