![Page 1: An Introduction to Rational Rose Real-Time Abhishekh Padmanabhan CIS 798 Presentation 2](https://reader033.vdocuments.us/reader033/viewer/2022051619/56649da15503460f94a8ca20/html5/thumbnails/1.jpg)
An Introduction to Rational Rose Real-Time
Abhishekh Padmanabhan
CIS 798 Presentation 2
![Page 2: An Introduction to Rational Rose Real-Time Abhishekh Padmanabhan CIS 798 Presentation 2](https://reader033.vdocuments.us/reader033/viewer/2022051619/56649da15503460f94a8ca20/html5/thumbnails/2.jpg)
Overview
Rose RealTime is a software development environment tailored to the demands of real-time software.
Developers use Rose RealTime to create models of the software system based on the Unified Modeling Language constructs, to generate the implementation code, compile, then run and debug the application.
![Page 3: An Introduction to Rational Rose Real-Time Abhishekh Padmanabhan CIS 798 Presentation 2](https://reader033.vdocuments.us/reader033/viewer/2022051619/56649da15503460f94a8ca20/html5/thumbnails/3.jpg)
Rose RealTime Software Development Lifecycle
What dose user need?Use Case View
Logical View
Component ViewHow to build system?
How to design system?
Deployment ViewHow to deploy the products?
Views in Rational Rose Real-Time
Views in Real World
![Page 4: An Introduction to Rational Rose Real-Time Abhishekh Padmanabhan CIS 798 Presentation 2](https://reader033.vdocuments.us/reader033/viewer/2022051619/56649da15503460f94a8ca20/html5/thumbnails/4.jpg)
UML Views
Use-Case View: describes system functionality as perceived by external
actors which interact with the system (users or other systems)
Logical View: describes how system functionality is provided within
the system - mostly used by developers describe the static structure and dynamic behavior
and other properties such as persistence and concurrency.
static structure: described by class (object) diagrams dynamic behavior: described by state, sequence,
collaboration and activity diagrams.
![Page 5: An Introduction to Rational Rose Real-Time Abhishekh Padmanabhan CIS 798 Presentation 2](https://reader033.vdocuments.us/reader033/viewer/2022051619/56649da15503460f94a8ca20/html5/thumbnails/5.jpg)
UML Views
Component View: description of the implementation modules and their
dependencies (used mainly by developers) contains component, package diagrams
Deployment View: shows the physical deployment of the system (processors,
devices) and their interconnections contains deployment diagrams.
![Page 6: An Introduction to Rational Rose Real-Time Abhishekh Padmanabhan CIS 798 Presentation 2](https://reader033.vdocuments.us/reader033/viewer/2022051619/56649da15503460f94a8ca20/html5/thumbnails/6.jpg)
Rational Rose Real Time – User Interface
![Page 7: An Introduction to Rational Rose Real-Time Abhishekh Padmanabhan CIS 798 Presentation 2](https://reader033.vdocuments.us/reader033/viewer/2022051619/56649da15503460f94a8ca20/html5/thumbnails/7.jpg)
1. Use Case
Describe System functionality in horizontal way Actors System Use Cases (Services) Relationships
![Page 8: An Introduction to Rational Rose Real-Time Abhishekh Padmanabhan CIS 798 Presentation 2](https://reader033.vdocuments.us/reader033/viewer/2022051619/56649da15503460f94a8ca20/html5/thumbnails/8.jpg)
2. Logical View
Logical View involves various capsules, classes, and protocols to make up the design solution for the problem Capsules Classes Protocols
Notes: In this slide, we only introduce capsules.
![Page 9: An Introduction to Rational Rose Real-Time Abhishekh Padmanabhan CIS 798 Presentation 2](https://reader033.vdocuments.us/reader033/viewer/2022051619/56649da15503460f94a8ca20/html5/thumbnails/9.jpg)
Capsules
Capsules are the fundamental modeling element of real-time systems. A capsule represents an independent flow of control in a system.
Similarities of capsules to classes: Capsule can have attributes. Capsules may also participate in dependency, generalization, and
association relationships. Differences between capsules and classes:
Capsule structure: represented as a network of collaborating capsules (a specialized UML collaboration diagram).
Capsule behavior: triggered by the receipt of a signal event, not by the invocation of an operation.
![Page 10: An Introduction to Rational Rose Real-Time Abhishekh Padmanabhan CIS 798 Presentation 2](https://reader033.vdocuments.us/reader033/viewer/2022051619/56649da15503460f94a8ca20/html5/thumbnails/10.jpg)
Real-Time UML Constructs
For Modeling Structure capsules (capsule classes) ports connectors
For Modeling Behavior protocols state machines time service
![Page 11: An Introduction to Rational Rose Real-Time Abhishekh Padmanabhan CIS 798 Presentation 2](https://reader033.vdocuments.us/reader033/viewer/2022051619/56649da15503460f94a8ca20/html5/thumbnails/11.jpg)
Capsules (Cont’d)
Two viewpoints on capsules? Structure Diagram
The structure diagram captures the interface and internal structure of the capsule in terms of its contained capsules and ports.
State Diagram The state diagram captures the high-level behavior of
the capsule. (States can be hierarchical and nested).
![Page 12: An Introduction to Rational Rose Real-Time Abhishekh Padmanabhan CIS 798 Presentation 2](https://reader033.vdocuments.us/reader033/viewer/2022051619/56649da15503460f94a8ca20/html5/thumbnails/12.jpg)
Capsules: Active Objects
Ports
![Page 13: An Introduction to Rational Rose Real-Time Abhishekh Padmanabhan CIS 798 Presentation 2](https://reader033.vdocuments.us/reader033/viewer/2022051619/56649da15503460f94a8ca20/html5/thumbnails/13.jpg)
Structure Diagram
Three main elements in a structure diagram Capsules Ports
- Public | Protected- Wired | Not-wired- Relay | End
Connectors
![Page 14: An Introduction to Rational Rose Real-Time Abhishekh Padmanabhan CIS 798 Presentation 2](https://reader033.vdocuments.us/reader033/viewer/2022051619/56649da15503460f94a8ca20/html5/thumbnails/14.jpg)
Classification of ports Visibility
Public - Public ports are ports that are part of a capsule's interface. These ports may be visible both from outside the capsule and inside, e.g. interface ports
Protected - Protected ports are used to connect capsules to contained capsule roles. These ports are not visible from the outside of a capsule since they are not part of the capsule's interface, e.g. Timer Ports.
Connector type Wired - Wired ports must be connected via a connector to other
ports in order to send messages. Non-wired - Non-wired ports are used to model dynamic
communication channels. These ports cannot be connected with connectors to other ports. For example, in client/server models, some ports may be declared but only activated when needed.
![Page 15: An Introduction to Rational Rose Real-Time Abhishekh Padmanabhan CIS 798 Presentation 2](https://reader033.vdocuments.us/reader033/viewer/2022051619/56649da15503460f94a8ca20/html5/thumbnails/15.jpg)
Classification of ports (Cont’d)
Termination Relay - Relay ports are by nature implicitly public
and wired. They are used to model connections that funnel signal events directly to protected capsule components without being processed by the capsule itself.
End - End ports can be public or protected, wired or non-wired. Messages sent to an end port can be processed directly by the capsule's behavior (state machine).
![Page 16: An Introduction to Rational Rose Real-Time Abhishekh Padmanabhan CIS 798 Presentation 2](https://reader033.vdocuments.us/reader033/viewer/2022051619/56649da15503460f94a8ca20/html5/thumbnails/16.jpg)
Connectors
Connectors really capture the key communication relationships between capsule roles.
![Page 17: An Introduction to Rational Rose Real-Time Abhishekh Padmanabhan CIS 798 Presentation 2](https://reader033.vdocuments.us/reader033/viewer/2022051619/56649da15503460f94a8ca20/html5/thumbnails/17.jpg)
Capsules: Behavior Optional hierarchical state machine
S1
S2 S3
S1
S2
S1
transitionS1toS2: { port2.send(m1); port3.send(m2); … };
message arrival
on port1 triggers
transition S1 to S2
![Page 18: An Introduction to Rational Rose Real-Time Abhishekh Padmanabhan CIS 798 Presentation 2](https://reader033.vdocuments.us/reader033/viewer/2022051619/56649da15503460f94a8ca20/html5/thumbnails/18.jpg)
State Diagram
A state diagram shows the sequence of states that an object or an interaction goes through during its life in response to received messages, together with its responses and actions.
State diagrams use state machines. A state machine is a graph of states and transitions
States Transitions
![Page 19: An Introduction to Rational Rose Real-Time Abhishekh Padmanabhan CIS 798 Presentation 2](https://reader033.vdocuments.us/reader033/viewer/2022051619/56649da15503460f94a8ca20/html5/thumbnails/19.jpg)
States
A state has the following parts: Name Entry/Exit actions - Actions that are executed on
entering and exiting the state.
![Page 20: An Introduction to Rational Rose Real-Time Abhishekh Padmanabhan CIS 798 Presentation 2](https://reader033.vdocuments.us/reader033/viewer/2022051619/56649da15503460f94a8ca20/html5/thumbnails/20.jpg)
Transitions
A transition has the following parts: Trigger - With the exception of the initial transition all
behavior in a state machine is triggered by the arrival of events on one of an object's interfaces. Therefore, a trigger defines which events from which interfaces will cause the transition to be taken.
Guard Condition - Each trigger can have a boolean expression associated with it which will be evaluated before the transition is triggered. This is referred to as a guard condition.
Actions - The actions in a behavior are where an object does work.
![Page 21: An Introduction to Rational Rose Real-Time Abhishekh Padmanabhan CIS 798 Presentation 2](https://reader033.vdocuments.us/reader033/viewer/2022051619/56649da15503460f94a8ca20/html5/thumbnails/21.jpg)
3. Component View
A component diagram shows the dependencies among software components.
Some components exist at compile time, some exist at link time, some exist at run time, and some exist at more than one time. The run-time component in this case would be an executable program.
A component diagram has only a type form, not an instance form.
![Page 22: An Introduction to Rational Rose Real-Time Abhishekh Padmanabhan CIS 798 Presentation 2](https://reader033.vdocuments.us/reader033/viewer/2022051619/56649da15503460f94a8ca20/html5/thumbnails/22.jpg)
Component Diagram
Course CourseOffering
Student Professor
Course.dll
User.dll
KATS.exeBilling.exeBilling System
Course
User
![Page 23: An Introduction to Rational Rose Real-Time Abhishekh Padmanabhan CIS 798 Presentation 2](https://reader033.vdocuments.us/reader033/viewer/2022051619/56649da15503460f94a8ca20/html5/thumbnails/23.jpg)
4. Deployment View
Nodes may contain component instances, which indicates that the component runs on the node.
The deployment diagram provides a basis for understanding the physical distribution of the run-time processes across a set of processing nodes.
![Page 24: An Introduction to Rational Rose Real-Time Abhishekh Padmanabhan CIS 798 Presentation 2](https://reader033.vdocuments.us/reader033/viewer/2022051619/56649da15503460f94a8ca20/html5/thumbnails/24.jpg)
Deployment Diagram Notation
Package
Task
Task
Component
Node
Active Object
Nodes are of primary importance on a deployment diagram because they represent processors, sensors, actuators, displays, or any other physical object ofimportance to the software.
Connection
![Page 25: An Introduction to Rational Rose Real-Time Abhishekh Padmanabhan CIS 798 Presentation 2](https://reader033.vdocuments.us/reader033/viewer/2022051619/56649da15503460f94a8ca20/html5/thumbnails/25.jpg)
A Demo System TomJerry
Tom is a cat and Jerry is a mouse. They meet one day on Internet. Tom wants to know whether Jerry is a cat or not by asking him/her some questions.
Example from online resource.
SITE, University of Ottawa
![Page 26: An Introduction to Rational Rose Real-Time Abhishekh Padmanabhan CIS 798 Presentation 2](https://reader033.vdocuments.us/reader033/viewer/2022051619/56649da15503460f94a8ca20/html5/thumbnails/26.jpg)
A Demo System TomJerry (Cont’d)
The system behaviour is as follows: Initially, Tom sends message RUCat to Jerry Jerry replies with message No to Tom on
receiving RUCat. Tom then sends message RUMouse to Jerry
having received No. Jerry replies with message Yes to Tom having
received RUMouse. Then Tom knows whether or not Jerry is a cat.
![Page 27: An Introduction to Rational Rose Real-Time Abhishekh Padmanabhan CIS 798 Presentation 2](https://reader033.vdocuments.us/reader033/viewer/2022051619/56649da15503460f94a8ca20/html5/thumbnails/27.jpg)
A Demo System TomJerry (Cont’d)
We consider the simple communication system consisting two entities. Entity 1 is named as Tom. Entity 2 is named as Jerry.
The signals used in the common communication protocol between Tom and Jerry are: Tom->Jerry: RUCat and RUMouse Jerry->Tom: Yes and No
![Page 28: An Introduction to Rational Rose Real-Time Abhishekh Padmanabhan CIS 798 Presentation 2](https://reader033.vdocuments.us/reader033/viewer/2022051619/56649da15503460f94a8ca20/html5/thumbnails/28.jpg)
A Demo System TomJerry (Cont’d)
TomJerry<<Capsule>
Tom
+ / ToJerry : Query# / TomLog : Log# / timer : Timing
<<Capsule>>
/ tom / tom
Jerry
+ / ToTom : Query~# / JerryLog : Log
<<Capsule>>
/ jerry / jerry
Query
Yes (void)No (void)
RUCat (void)RUMouse (void)
<<Protocol>>
+ / ToJerry<<Port>>+ / ToJerry<<Port>> + / ToTom~
<<Port>>
+ / ToTom~
<<Port>>
Overall Logical View
Communication Protocol
Top Level Capsule
Second Level Capsule
![Page 29: An Introduction to Rational Rose Real-Time Abhishekh Padmanabhan CIS 798 Presentation 2](https://reader033.vdocuments.us/reader033/viewer/2022051619/56649da15503460f94a8ca20/html5/thumbnails/29.jpg)
A Demo System TomJerryTop level capsule contents
TomJerry Structure Diagram
/ jerry : Jerry / tom : Tom
+ / ToTom : Query~
+ / ToJerry : Query
/ jerry : Jerry
+ / ToTom : Query~ / tom : Tom
+ / ToJerry : Query
![Page 30: An Introduction to Rational Rose Real-Time Abhishekh Padmanabhan CIS 798 Presentation 2](https://reader033.vdocuments.us/reader033/viewer/2022051619/56649da15503460f94a8ca20/html5/thumbnails/30.jpg)
A Demo System TomJerryTom’s State Diagram
MeetOnNet
QuerryJerry
QuerryJerryAgain
Initial
IsCat TryCat
TryMouse
Dunno
IsMouse
Initial
IsCat TryCat
TryMouse
Dunno
IsMouse
Tom’s State Diagram
Initial:timer.informIn(RTTimespec(2,0));
![Page 31: An Introduction to Rational Rose Real-Time Abhishekh Padmanabhan CIS 798 Presentation 2](https://reader033.vdocuments.us/reader033/viewer/2022051619/56649da15503460f94a8ca20/html5/thumbnails/31.jpg)
A Demo System TomJerryJerry’s State Diagram
Jerry
InitialInitial
TryCatTryCat TryMouseTryMouse
Jerry’s State Diagram
![Page 32: An Introduction to Rational Rose Real-Time Abhishekh Padmanabhan CIS 798 Presentation 2](https://reader033.vdocuments.us/reader033/viewer/2022051619/56649da15503460f94a8ca20/html5/thumbnails/32.jpg)
A Demo System TomJerryExecution Result
Running the Model
![Page 33: An Introduction to Rational Rose Real-Time Abhishekh Padmanabhan CIS 798 Presentation 2](https://reader033.vdocuments.us/reader033/viewer/2022051619/56649da15503460f94a8ca20/html5/thumbnails/33.jpg)
References
CIS721 – Lecture 6 PPT – Dr. Neilsen
Example borrowed from SITE, University of Ottawa