Using UML for Modeling Complex Real Time System
- Slides: 42
Using UML for Modeling Complex Real Time System Architectures Bran Selic VP Advanced Technology Objec. Time Limited bran@objectime. com
Overview • The Unified Modeling Language (UML) • Complex real time systems • Requirements for modeling architectures of complex RT systems • Approach and method • Architectural modeling constructs • Summary 2 Bran Selic
The Unified Modeling Language • A general purpose OO modeling language » combines a number of proven methods OMT (Rumbaugh) UML 1. 4 Mar. 1999 1996 UML 0. 9 Booch UML 1. 1 Nov. 1997 OOSE (Jacobson) Catalysis ROOM 3 etc. Bran Selic
What is (in) the UML Standard? • Semi formal semantic meta model » defines basic modeling concepts object, class, etc. » includes well formedness rules expressed as formal constraints in Object Constraint Language (OCL) • Graphical notation for modeling concepts » 8 different diagram types • Two predefined domain extensions 4 Bran Selic
The UML Meta-Model–Example Generalizeable. Element (Meta)class is. Root: Boolean is. Leaf: Boolean is. Abstract: Boolean Generalization association * Classifier Feature visibility: {public, protected, private} Compostion association Class is. Active: Boolean not self. is. Abstract implies OCL constraint self. all. Operations->for. All(op | self. all. Methods->exists(m | m. specification includes (op))) 5 Bran Selic
• The Unified Modeling Language (UML) • Complex real time systems • Requirements for modeling architectures of complex RT systems • Approach and method • Architectural modeling constructs • Summary 6 Bran Selic
General Real-Time Systems • A system that maintains a continuous timely interaction with its environment inputs Real-Time System outputs (state) outputs = f (inputs, state) 7 Bran Selic
Complex Real-Time Systems • Complex real time systems characterized by: » extreme dependability (reliability, availability) » diverse and feature rich functionality » continuous feature upgrades (evolutionary requirements) » physical distribution • Encountered mostly in telecommunications, defense, aerospace, and industrial control 8 Bran Selic
Modeling Requirements for Complex RT Systems • This complexity requires focussed modeling support in at least the following areas: » Architectural modeling » Timeliness and performance modeling » Time aware communication models » Concurrency management » Resource modeling » Distributed system modeling » Fault tolerance techniques 9 Bran Selic
• The Unified Modeling Language (UML) • Complex real time systems • Requirements for modeling architectures of complex RT systems • Approach and method • Architectural modeling constructs • Summary 10 Bran Selic
Real-Time Software Architectures • Architecture: The organization of significant software components interacting through interfaces, those components being composed of successively smaller components and interfaces • It is the key to success in: » the initial construction of a system » system evolution 11 Bran Selic
Architectures and Evolution • Two functionally equivalent initial architectures: A A X X Mediator B C B 12 C Bran Selic
Real-Time Architectural Specifications • Example telecom system architecture Structure Channel 1 Terminal. A Terminal. B Application Layer Channel 2 Services Layer Behavior 13 Bran Selic
Architectural Component Design Library Channel 1 System 1 Terminal. A Terminal. B Channel 2 Channel System 2 Terminal Tester Terminal. A 14 Terminal Tester Bran Selic
Refining Architectures (Reuse) Channel 1 Terminal. A Terminal. B Channel 2 15 Bran Selic
Summary: Requirements for Architectural Modeling • The ability to model and enforce: » large grain (architectural) components and their interfaces » structural compositions of architectural components » dynamic interaction patterns between architectural components » refinement of architectures 16 Bran Selic
• The Unified Modeling Language (UML) • Complex real time systems • Requirements for modeling architectures of complex RT systems • Approach and method • Architectural modeling constructs • Summary 17 Bran Selic
Approach and Method • The necessary architectural modeling capabilities can be found in ROOM • Express the architectural modeling concepts of ROOM using standard UML • Domain specific library of UML “macros” Business Modeling Library Real-Time Modeling Library (UML-RT) . . . UML Modeling Concepts 18 Bran Selic
UML Extensibility Mechanisms • Stereotypes, constraints, tagged values Constraint (OCL) Class is. Active: Boolean not self. is. Abstract implies self. all. Operations->for. All(op | self. all. Methods->exists(m | m. specification includes (op))) stereotype Capsule <“ports” > required tag 19 Bran Selic
Real-Time Object-Oriented Modeling (ROOM) • Domain specific (real time) concepts » dynamic high level structures » reactive behavior (ROOMcharts) • Executable (formal) models • Full automatic code generation • Field proven in a large number (>100) of large scale industrial projects • Tool support available (Objec. Time Limited and Rational Software) 20 Bran Selic
Phasing • Basic modeling capabilities (UML 1. 1) » structural pattern modeling (collaboration diagrams) » state machine modeling • Real time specific constructs » architectural modeling (March ‘ 98) » other constructs ( June ‘ 99) » collaboration: Objec. Time & Rational • OMG standardization (1999/2000) » RT analysis and design WG 21 Bran Selic
• The Unified Modeling Language (UML) • Complex real time systems • Requirements for modeling architectures of complex RT systems • Approach and method • Architectural modeling constructs • Summary 22 Bran Selic
Capsules: Architectural Objects • Active objects Encapsulation shell Ports 23 Bran Selic
Capsules: Behavior • Optional hierarchical state machine (signal handler with run to completion semantics) transition. S 1 to. S 2: {int x; x = 0; p 2. send(s 1); p 3. send(s 2); … }; S 1 S 2 S 3 24 Bran Selic
Capsules: UML Modeling • Stereotype of Class concept ( «capsule» ) with specialized (executable) semantics • Class diagram representation: «capsule» Capsule. Class. X #counter : int #x : char ports +port. B : Protocol. A: : master #port. C : Protocol. B 25 Bran Selic
Protocols: Contractual Behavior Patterns • Interaction contracts between capsules » e. g. , operator assisted call Caller Operator Callee call ack number call ack transfer talk time 26 Bran Selic
Protocol Specifications • A special form of collaboration Alice Operator. Assisted Call caller callee Bob protocol state machine significant sequences caller operator callee operator initial Charlie Dexter connecting connected 27 Bran Selic
Protocol Roles • Specifies one party in a protocol significant sequences Incoming signals signal call source caller number ack caller callee caller operator callee Operator. Role Outgoing signals signal call target callee transfer ack caller role state machine initial connecting connected 28 Bran Selic
Protocol Refinement • Using inheritance Incoming signals signal call source caller number ack caller callee Operator. Role target callee transfer ack caller source caller number ack reply caller callee caller Outgoing signals signal call Extended Operator. Role 29 signal call transfer ack query target callee caller Bran Selic
Protocols: UML Modeling • Collaboration stereotype: «protocol» • Classifier Role stereotype: «protocol. Role» 1 «protocol. Role» caller «protocol» incoming Operator. Assisted Call ack transfer outgoing call number talk 1 1 «protocol. Role» operator callee 30 Bran Selic
Ports: Boundary Objects • Fully isolate a capsule’s implementation from its environment (in both directions) Capsule S 1 Environment S 2 Created and destroyed along with their capsule 31 Bran Selic
Ports and Protocols • Each port realizes a single protocol role (type) » Multiple ports with same type possible «capsule» Capsule. Class. X ports +port. A : Protocol. A: : master #port. B : Protocol. B +port. C : Protocol. B~ 32 Bran Selic
Ports: Collaboration Diagram Notation port. A : Protocol. A: : master «capsule» an. X: Capsule. Class. X 1 port. C : Protocol. B~ «port» port. A: Protocol. A: : master • Shorthand notation for capsule instances » iconified form 33 Bran Selic
Combining Capsules • Using connectors remote : Fax. Prot «capsule» sender : Fax «capsule» remote : Fax. Prot receiver : Fax Connectors model communication channels Each connector supports a single protocol Static typing rules apply (compatible protocols) Modeled as association classes in UML 34 Bran Selic
Composition: Structural Patterns as (Reusable) Dynamic Components Relay port send. Ctrl : Control receive. Ctrl : Control c : Control remote: Fax. Prot «capsule» sender: Fax «capsule» receiver: Fax Remote: Fax. Prot Fax. Call • The composite is also a first-class object! 35 Bran Selic
Composite Capsule Semantics • Architectural assertion mechanism: the static elements of the internal structure of a composite capsule are automatically created (and destroyed) along with the capsule » applies recursively down to the innermost leaf capsule level » only explicitly prescribed architectural structures can be instantiated • This also significantly reduces the complexity of the model since all the code used to establish these structures is eliminated 36 Bran Selic
End Ports: Where Structure and Behavior Meet • Ports directly connected to the state machine Implementation End Port c : System. Control sender. Ctrl : Control~ capsule state machine Public End Port receive. Ctrl : Control~ initial connecting c : Control connected «capsule» sender: Fax c : Control «capsule» receiver: Fax 37 Bran Selic
Decomposition: Class Diagram View • Alternative representation » More abstract 1 sender «capsule» Fax 1 «capsule» receiver Fax. Call 38 Bran Selic
• The Unified Modeling Language (UML) • Complex real time systems • Requirements for modeling architectures of complex RT systems • Approach and method • Architectural modeling constructs • Summary 39 Bran Selic
Summary (1) • Complex real time systems phenomena require specialized modeling support • The ROOM language has industry proven support for modeling complex real time architectures • The benefits of both UML and ROOM are gained by expressing the ROOM constructs as UML stereotypes » UML-RT : a UML extension for the complex real-time domain 40 Bran Selic
Summary (2) • Only four UML stereotypes are sufficient (include formally defined constraints that ensure consistency/executability) Stereotype UML Metaclass «protocol» Collaboration «protocol. Role» Classifier. Role «port» Class «capsule» Class Þ supplemented by an optional custom notation 41 Bran Selic
Bibliography • Real time architectural modeling whitepaper by B. Selic and J. Rumbaugh: » http: //www. objectime. com • OMG’s UML 1. 1 standard » http: //www. rational. com • ROOM » B. Selic, G. Gullekson, and P. Ward, “Real Time Object Oriented Modeling”, » John Wiley & Sons, NY, 1994. 42 Bran Selic
- Helen erickson biography
- Relational modeling vs dimensional modeling
- Using system.collections
- Superstruture
- Structural modeling in uml
- Uml modeling tutorial
- Use case outline
- Mda uml
- Compare embedded system and real time system
- Sensor and (tiempo real or real time)
- Modeling using variation calculator
- Data modeling using entity relationship model
- Lesson 12 modeling using similarity
- Modeling of digital communication systems using simulink
- Modeling of digital communication systems using simulink
- Er model diagram
- Real world phenomena
- Bruno dislikes sitting on the beach
- Droplet infection
- Simple, compound-complex rules
- Electra complex vs oedipus complex
- Psychodynamic theory of personality
- Type a and type b personality theory
- Uml ooad
- Erd using uml notation
- Object-oriented systems analysis and design using uml
- Object oriented analysis and design using uml
- What is elapsed time
- Arya88 link alternatif
- Real time operating system definition
- Example of real time system
- Ee498
- Characteristics of embedded system
- The definition of a real-time system.
- Qnx real time operating system
- Dynamic multiprocessor systems.
- Real time system example
- Real time operating system
- Real time operating system concepts
- Real time operating system
- Preemptivity
- Kontinuitetshantering i praktiken
- Typiska drag för en novell