On the Description of Communications Between Software Components with UML

Similar documents
Dataflow Language Model. DataFlow Models. Applications of Dataflow. Dataflow Languages. Kahn process networks. A Kahn Process (1)

Math Circles Finite Automata Question Sheet 3 (Solutions)

& Y Connected resistors, Light emitting diode.

MAXIMUM FLOWS IN FUZZY NETWORKS WITH FUNNEL-SHAPED NODES

Sequential Logic (2) Synchronous vs Asynchronous Sequential Circuit. Clock Signal. Synchronous Sequential Circuits. FSM Overview 9/10/12

The Math Learning Center PO Box 12929, Salem, Oregon Math Learning Center

Digital Design. Sequential Logic Design -- Controllers. Copyright 2007 Frank Vahid

Multi-beam antennas in a broadband wireless access system

Geometric quantities for polar curves

Regular languages can be expressed as regular expressions.

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad

Specifying Data-Flow Requirements for the Automated Composition of Web Services

Mixed CMOS PTL Adders

Solutions to exercise 1 in ETS052 Computer Communication

Kirchhoff s Rules. Kirchhoff s Laws. Kirchhoff s Rules. Kirchhoff s Laws. Practice. Understanding SPH4UW. Kirchhoff s Voltage Rule (KVR):

Algorithms for Memory Hierarchies Lecture 14

CHAPTER 2 LITERATURE STUDY

(1) Non-linear system

Translate and Classify Conic Sections

Student Book SERIES. Fractions. Name

ABB STOTZ-KONTAKT. ABB i-bus EIB Current Module SM/S Intelligent Installation Systems. User Manual SM/S In = 16 A AC Un = 230 V AC

Homework #1 due Monday at 6pm. White drop box in Student Lounge on the second floor of Cory. Tuesday labs cancelled next week

Synchronous Generator Line Synchronization

Experiment 8 Series DC Motor (II)

CS 135: Computer Architecture I. Boolean Algebra. Basic Logic Gates

CHAPTER 3 AMPLIFIER DESIGN TECHNIQUES

SOLVING TRIANGLES USING THE SINE AND COSINE RULES

CS2204 DIGITAL LOGIC & STATE MACHINE DESIGN SPRING 2005

A COMPARISON OF CIRCUIT IMPLEMENTATIONS FROM A SECURITY PERSPECTIVE

Student Book SERIES. Patterns and Algebra. Name

Service Composition and Synthesis The Roman Model

Available online at ScienceDirect. Procedia Engineering 89 (2014 )

Asynchronous Data-Driven Circuit Synthesis

Discontinued AN6262N, AN6263N. (planed maintenance type, maintenance type, planed discontinued typed, discontinued type)

Implementation of Different Architectures of Forward 4x4 Integer DCT For H.264/AVC Encoder

CS2204 DIGITAL LOGIC & STATE MACHINE DESIGN fall 2008

arxiv: v1 [cs.cc] 29 Mar 2012

Three-Phase Synchronous Machines The synchronous machine can be used to operate as: 1. Synchronous motors 2. Synchronous generators (Alternator)

Analysis of circuits containing active elements by using modified T - graphs

Open Access A Novel Parallel Current-sharing Control Method of Switch Power Supply

Proceedings of Meetings on Acoustics

Understanding Basic Analog Ideal Op Amps

Algebra Practice. Dr. Barbara Sandall, Ed.D., and Travis Olson, M.S.

1 tray of toffee 1 bar of toffee. 10 In the decimal number, 0 7, the 7 refers to 7 tenths or

The Discussion of this exercise covers the following points:

Use of compiler optimization of software bypassing as a method to improve energy efficiency of exposed data path architectures

METHOD OF LOCATION USING SIGNALS OF UNKNOWN ORIGIN. Inventor: Brian L. Baskin

Patterns and Relationships

A Development of Earthing-Resistance-Estimation Instrument

University of North Carolina-Charlotte Department of Electrical and Computer Engineering ECGR 4143/5195 Electrical Machinery Fall 2009

FOMA M702iG Manual for Data Communication

(1) Primary Trigonometric Ratios (SOH CAH TOA): Given a right triangle OPQ with acute angle, we have the following trig ratios: ADJ

Synchronous Machine Parameter Measurement

Design and implementation of a high-speed bit-serial SFQ adder based on the binary decision diagram

ROBOTIC SYSTEMS FOR SURGICAL APPLICATIONS

Operation Manual. Addendum. Embroidery Machine. Product Code: 884-T13

Direct Current Circuits. Chapter Outline Electromotive Force 28.2 Resistors in Series and in Parallel 28.3 Kirchhoff s Rules 28.

mac profile Configuration Guide Adobe Photoshop CS/CC Sawgrass Virtuoso SG400/SG800 Macintosh v

Safety Relay Unit. Main contacts Auxiliary contact Number of input channels Rated voltage Model Category. possible 24 VAC/VDC G9SA-501.

Performance Monitoring Fundamentals: Demystifying Performance Assessment Techniques

Chapter 2 Literature Review

A New Algorithm to Compute Alternate Paths in Reliable OSPF (ROSPF)

Triangles and parallelograms of equal area in an ellipse

On the Effectivity of Different Pseudo-Noise and Orthogonal Sequences for Speech Encryption from Correlation Properties

PRACTICE NO. PT-TE-1414 RELIABILITY PAGE 1 OF 6 PRACTICES ELECTROSTATIC DISCHARGE (ESD) TEST PRACTICES

MATH 118 PROBLEM SET 6

To provide data transmission in indoor

EY-AM 300: novanet BACnet application master, modunet300

ABOUT THIS MANUAL ABOUT THIS MANUAL

EE Controls Lab #2: Implementing State-Transition Logic on a PLC

Area-Time Efficient Digit-Serial-Serial Two s Complement Multiplier

Color gamut reduction techniques for printing with custom inks

A Slot-Asynchronous MAC Protocol Design for Blind Rendezvous in Cognitive Radio Networks

Aquauno Select MINUTES. (duration) FREQUENCY LED. OFF 8h AQUAUNO SELECT 5 MIN FREQUENCY. the timer is being programmed;

Network Theorems. Objectives 9.1 INTRODUCTION 9.2 SUPERPOSITION THEOREM

Misty. Sudnow Dot Songs

Lecture 16: Four Quadrant operation of DC Drive (or) TYPE E Four Quadrant chopper Fed Drive: Operation

Spiral Tilings with C-curves

Synchronous Machine Parameter Measurement

Network-coded Cooperation for Multi-unicast with Non-Ideal Source-Relay Channels

S1 Only VEOG HEOG. S2 Only. S1 and S2. Computer. Subject. Computer

Efficient and Resilient Key Discovery based on Pseudo-Random Key Pre-Deployment

Buletinul Ştiinţific al Universităţii POLITEHNICA din Timişoara. Seria HIDROTEHNICA TRANSACTIONS on HYDROTECHNICS

PROGRAMMING MANUAL MTMA/01 MTMV/01 FB00329-EN

Analysis of Coding-aware MAC Protocols based on Reverse Direction Protocol for IEEE based Wireless Networks using Network Coding*

Section 6.1 Law of Sines. Notes. Oblique Triangles - triangles that have no right angles. A c. A is acute. A is obtuse

Interference Cancellation Method without Feedback Amount for Three Users Interference Channel

Research Article Efficient Integration of Pipelined IP Blocks into Automatically Compiled Datapaths

A Cluster-based TDMA System for Inter-Vehicle Communications *

Y9.ET1.3 Implementation of Secure Energy Management against Cyber/physical Attacks for FREEDM System

10.4 AREAS AND LENGTHS IN POLAR COORDINATES

Study on SLT calibration method of 2-port waveguide DUT

9.4. ; 65. A family of curves has polar equations. ; 66. The astronomer Giovanni Cassini ( ) studied the family of curves with polar equations

Make Your Math Super Powered

Alternating-Current Circuits

Intention reconsideration in theory and practice

Information-Coupled Turbo Codes for LTE Systems

A Novel Back EMF Zero Crossing Detection of Brushless DC Motor Based on PWM

MOS Transistors. Silicon Lattice

Design of UHF Fractal Antenna for Localized Near-Field RFID Application

Transcription:

On the Description of Communictions Between Softwre Components with UML Zhiwei An Dennis Peters Fculty of Engineering nd Applied Science Memoril University of Newfoundlnd St. John s NL A1B 3X5 zhiwei@engr.mun.c Novemer 12, 2003 dpeters@engr.mun.c Astrct For the purpose of nlysis nd verifiction, in softwre design, rchitecture of the softwre system nd communictions etween softwre components should e specified. Unified Modeling Lnguge (UML) is stndrd softwre design nottion tht includes Sequence digrms nd Collortion digrms, which descrie the interction etween ojects. They lso cn e used to descrie communictions etween components. In this pper, we discuss wht should e modeled in the communiction nd how the elements in UML cn e dopted to model the communiction. A formlism of UML design models tht cn e used for design nlysis is lso proposed. 1 Introduction Softwre systems re often composed of severl components ech of which is computtionl entity tht relizes prticulr function. Components interct with ech other y communictions etween them. Documenting communictions is one prt of softwre design nd the design models should e verifile to ensure the correctness of the design. In softwre systems, synchronous nd synchronous communiction could exist. To descrie different types of communictions etween components, severl methodologies hve een proposed. Two kinds of methods re 1) Architecturl Description Lnguges (ADL) [1] nd 2) UML in rchitecture description [3, 4]. The Unified Modeling Lnguge (UML) [6] is stndrd modeling lnguge with rich digrms to model sttic nd dynmic spects of system. Sequence digrms nd collortion digrms re two types of UML digrms widely used in communiction description. In sequence digrm, the horizontl dimension represents different ojects nd the verticl dimension represents time. Ech oject hs lifeline with ctivtion rs. The r egins with the invoction of method nd stops when the method ends. Arrows represent messges trnsmitted etween the ojects. The life line could hve rnch t time point nd the two or more lines could merge t lter time. The rnch mens conditionl rnch or concurrency. Sequence digrms specify time explicitly. In sequence digrm, ojects interct with ech other vi messges. A messge my specify severl different time points such s sending time nd receiving time. One messge links two events nd the order of events is specified. A collortion digrm presents set of roles to e plyed y instnces s well s required reltionships etween them. It lso presents set of messges specifying the interction etween the instnces plying the roles to chieve the desired result. In collortion digrms, messge order is descried y dding numers to rrow lels. 1

To verify the UML design models, the ide of model checking [2] is proposed. Typiclly, model checking lgorithm checks properties of system description sed on (finite) stte mchine model with prllel composition. To generte the utomt sed model, sequence digrms should e nlyzed nd trnslted into stte mchines. A sequence digrm descries time explicitly so the timing reltion of the events cn e derived from it. In UML design models for softwre system there re usully severl sequence digrms. Anlysis of ll of these digrms could generte stte mchine sed model for model checking. The rest of this pper is orgnized s follows: In Section 2, we discuss types of communictions etween softwre components nd wht should e modeled in the communiction. Section 3 uses n simplified elevtor exmple to show how to use UML digrms to descrie interctions. In Section 4, we propose one ehvior model of the softwre system nd illustrte how informtion in Sequence digrms could e mpped to the ehvior model. In Section 5, we drw some conclusions. 2 Types of Communictions Communictions etween softwre components re either synchronous or synchronous. The difference etween these two clsses of communictions is tht synchronous communictions involves locking opertions in the communiction. In synchronous communiction, the component is suspended fter the send opertion until it is unlocked y the other prtner in the communiction. In synchronous communiction, nonlocking opertions re used which mens tht the components will proceed without witing for the completion of the communiction. The following clsses of communictions re possile. Shred Vrile A vrile tht cn e ccessed y more thn one component is mens of communiction. The sic opertions on shred vrile re red nd write so mutul exclusion is the min prolem in this type. Asynchronous Messge Pssing (AMP) In this type of communiction, there re two events 1) the sender sends out the messge nd continues running, 2) the receiver receives the messge. If the receiver is ville nd the processes re co-locted, 1 nd 2 hppen t essentilly the sme time nd could e considered s the sme event. If the receiver is not ville, the messge is stored in uffer until the receiver is ville. The sender is not locked t ny time. Synchronous Messge Pssing (SMP) In Synchronous Messge Pssing, the sender cnnot send the messge until the receiver is ville to receive it. There is no uffer in this type of communiction. Procedure Cll In Procedure Cll, there re four events 1) the cller clls n ccess progrm in the cllee, 2) the ccess progrm is invoked, 3) the ccess progrm finishes, nd 4) the cller knows tht the cllee finishes. In Procedure Cll 1 nd 2 hppen t the sme time nd they could e considered s one event. 3 nd 4 re lso the sme event. Between the events of 2 nd 3, the cller is locked. Remote Procedure Cll When there re more thn one process nd process clls function in nother process, this type of communiction is clled Remote Procedure Cll (RPC). The mechnism of RPC is lmost the sme s procedure cll except tht the function in nother process my e unville ecuse tht function is clled y nother component nd it cn not e clled twice t the sme time. Asynchronous communiction nd synchronous communiction hve the similr semntics nd cn e modeled in similr wy. For exmple, synchronous messge pssing is specil cse of synchronous messge pssing without uffer nd synchronous messge pssing etween two components could e modeled s two synchronous messges: from one component to uffer nd then from the uffer to the other component. 2

Tle 1: Concepts in Communiction nd UML Communiction Concepts UML Nottions Component Component s Life Running Access Progrm Messges or Clls (Opertions) Messge Nme or Cll Nme Event Oject Lifeline Activtion Br Messge Arrow Arrow Lel Two Ends of n Arrow Two ends of n Activtion Br 3 Description of Communictions in UML The techniques for denoting communiction types in UML re defined in UML 1.4. To descrie communictions with UML, the first step is to mp concepts in communiction to the elements in UML digrm. Tle 1 illustrtes the reltions of UML nottions nd concepts of communiction in this work. Opertions nd events should e distinguished here: opertions hve time durtion nd they re often composed of severl events which re points in time. Some concepts in communiction cnnot e represented y UML nottions. For exmple, the dt stte is not in UML t ll nd control stte my e represented implicitly. After mpping concepts of communictions to elements of UML, we need to model communictions with the semntics of collortion digrms nd sequence digrms. To descrie the whole system, the first step is to use collortion digrms to descrie reltions etween ojects, the second step is to use sequence digrms to descrie interctions. 3.1 Collortion Digrms in Communiction Becuse collortion digrm presents collection of instnces nd their reltionships, we cn use it to descrie the reltions etween components, s illustrted in Figure 1. The rrows etween components represent messges nd clls. Since this digrm only illustrtes the sttic reltions etween components no numer is used in the rrow lel. elevtora:elevtor elevtorb:elevtor crarrived nextstop getfloor getdirection schedulera:scheduler coordintor:coordintor schedulerb:scheduler schedule remove schedule remove crreq destintionrequesta :destintionrequest schedule remove remove schedule crarrived nextstop destintionrequestb :destintionrequest getfloor getdirection destrequest crrequest: crrequest destrequest crrequest Figure 1: Elevtor System in Collortion Digrm 3.2 Sequence Digrms in Communiction A sequence digrms descries severl spects of the communiction. First, it cn descrie the phenomenon of when one ccess progrm is invoked, wht other events could e generted during the run time of the 3

ccess progrms. Second, it cn illustrte the mechnism of communiction. When one ccess progrm is invoked, it my send messges to or cll ccess progrms in other components. Messges nd clls re distinguished y different types of rrows. For exmple, Figure 2 shows tht when the ccess progrm schedule is invoked, three opertions, getfloor, getdirection nd nextstop hppen. Figure 3 illustrtes the order of the events in the cse of AMP. destntion RequestA schedulera elevtora crrequest coordintor schedulera schedulerb destrequest schedule getfloor crrequest crreq schdule schdule getdirection nextstop Figure 2: Stimulus in UML, I Figure 3: Stimulus in UML, II Since there re finite numer of ccess progrms in the system nd we cn drw one sequence digrm for ech ccess progrm, the numer of sequence digrms is equl to the numer of ccess progrms nd hence the numer of sequence digrms will not grow too rpidly s the system size increses. Figure 2 nd Figure 3 only illustrte the ehviour when one ccess progrm is invoked. More sequence digrms re needed to completely descrie the communictions etween components, including conflict resolution. Figure 4 illustrtes ll types of communictions discussed in Section 2. In I, procedure cll is illustrted: component P clls n ccess progrm in component Q (opertion ). The ccess progrm in Q is invoked t the sme time s the component P clls it nd P is locked. After the ccess progrm in Q ends, P is unlocked. In II, P clls Q (opertion ) first nd it is locked until the opertion. If Q is unville nd R wnts to cll Q, R is locked nd should wit until the opertion is over. R will e unlocked only fter the opertion d. In III, P sends messge (opertion ) to Q nd P is not locked. If Q is not ville efore it finishes serving the messge form P nd R sends messge to it (opertion ), uffer is used to store the messge nd re-send the messge to Q (opertion c) fter Q is ville. In this type of communiction, no component is locked. In IV, P sends messge to Q (opertion ), R sends messge to Q (opertion ) when Q is not ville nd R is locked, this opertion cn finish only fter Q finishes serving the messge from P. When the opertion ends, R is unlocked nd Q egins to serve the messge from R. In V, red nd write re two sic opertions nd they should oey the rules of mutul exclusion. P Q P Q R P Q uffer R c d c I. Procedure Cll II. Remote Procedure Cll III. Asynchronous Messge Pssing P Q R P vr R P,Q,R re components,, c, d re messges or clls vr is shred vrile c red write red write IV. Synchronous Messge Pssing V. Shred Vrile Figure 4: Types of Communiction in UML 4

Figure 4 only illustrtes some sic types of communictions. In relistic system mixtures nd vrints of these communictions exist. In Figure 5, the communiction re AMP. In this exmple, the coordintor cn ccess two messges from two schedulers so we cn drw two lifelines for coordintor. A uffer is necessry when messge cnnot e processed immeditely fter eing sent. schedulera:scheduler coordintor uffer schedulerb:scheduler Figure 5: Communiction Mechnism 4 Anlysis Technique To verify UML design models, we need formlism to ccept ll sequences of events descried y the model. In softwre systems, components re modeled s stte mchines nd most model checking lgorithms ccept utomt sed specifiction s the input, so prllel composition of stte mchines is the model in this reserch work. 4.1 From UML to Stte Mchine Model Sequence digrms descrie the reltive order of events. In communictions, there re severl possile orders of events so the events re not totlly ordered. The est description of the reltionship of events is prtil order. In [5], reltions of messges in Messge Sequence Chrts (MSC) re trnslted into prtil order. Becuse sequence digrms come from MSCs with extension, similr process cn e used to extrct the prtil order from sequence digrms. UML Sequence digrms do not hve stte vriles in them so they do not represent component stte precisely. UML Sttechrts hve the ility to descrie the ehvior of the component ut Module Interfce Specifictions (MIS)[7] mke etter use of strction nd re more menle to mchine processing. A discussion of the process for generting forml ehviour model from component MIS is eyond the scope of this pper. From the discussion ove, we cn propose tht the prolem of synthesizing concurrent utomt from Sequence digrms cn e divided into two steps. 1)Descrie prtil order reltion in sequence digrms formlly nd 2)synthesizing concurrent utomt model from the prtil order reltions nd component MIS. 5 Conclusion UML interction digrms hve the ility to descrie the communiction etween softwre components. Collortion digrms descrie the reltions etween components nd sequence digrms descrie two spects of the interction: 1) when one event hppens, wht other events could hppen, nd 2) wht communictions mechnisms represent the communiction types. To verify softwre design, n utomt sed ehvior model could e derived from the sequence digrms nd used for model checking. 5

References [1] Roert Allen nd Dvid Grln. A forml sis for rchitecturl connection. ACM Trns. Softwre Eng. nd Methodology, July 1997. [2] E. M. Clrk, O. Grumerg, nd D. Peled. Model Checking. MIT Press, 2000. [3] Hssn Gom. Designing Concurrent, Distriuted, nd Rel-Time Applictions with UML. Addison- Wesley, 2000. [4] Christine Hofmeister, Roert Nord, nd Dilip Soni. Applied Softwre Architecture. Addison-Wesley, 2000. [5] Mdhvn Mukund, K. Nryn Kumr, nd Milind Sohoni. Synthesizing distriuted finite-stte systems from MSCs. In Proc. Int l Conf. Concurrency Theory (CONCUR), numer 1877 in Lecture Notes in Computer Science, pges 521 535, University Prk, PA, 2000. Springer-Verlg. [6] Rtionl Softwre Inc., et l. OMG Unified Modelling Lnguge Specifiction, version 1.5 edition, Mrch 2003. [7] Yo Wng. Forml nd strct softwre module specifictions survey. CRL Report 238, Communictions Reserch Lortory, Hmilton, Ontrio, Cnd, Novemer 1991. 6