13.07.2015 Views

Modeling Software Architectures in the Unified Modeling Language

Modeling Software Architectures in the Unified Modeling Language

Modeling Software Architectures in the Unified Modeling Language

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Model<strong>in</strong>g</strong> <strong>Software</strong> <strong>Architectures</strong> <strong>in</strong> <strong>the</strong><strong>Unified</strong> <strong>Model<strong>in</strong>g</strong> <strong>Language</strong>NENAD MEDVIDOVICUniversity of Sou<strong>the</strong>rn CaliforniaDAVID S. ROSENBLUM and DAVID F. REDMILESUniversity of California, Irv<strong>in</strong>eandJASON E. ROBBINSCollabNet, Inc.The <strong>Unified</strong> <strong>Model<strong>in</strong>g</strong> <strong>Language</strong> (UML) is a family of design notations that is rapidly becom<strong>in</strong>ga de facto standard software design language. UML provides a variety of useful capabilities to<strong>the</strong> software designer, <strong>in</strong>clud<strong>in</strong>g multiple, <strong>in</strong>terrelated design views, a semiformal semantics expressedas a UML meta model, and an associated language for express<strong>in</strong>g formal logic constra<strong>in</strong>tson design elements. The primary goal of this work is an assessment of UML’s expressive powerfor model<strong>in</strong>g software architectures <strong>in</strong> <strong>the</strong> manner <strong>in</strong> which a number of exist<strong>in</strong>g software architecturedescription languages (ADLs) model architectures. This paper presents two strategies forsupport<strong>in</strong>g architectural concerns with<strong>in</strong> UML. One strategy <strong>in</strong>volves us<strong>in</strong>g UML “as is,” while <strong>the</strong>o<strong>the</strong>r <strong>in</strong>corporates useful features of exist<strong>in</strong>g ADLs as UML extensions. We discuss <strong>the</strong> applicability,strengths, and weaknesses of <strong>the</strong> two strategies. The strategies are applied on three ADLsthat, as a whole, represent a broad cross-section of present-day ADL capabilities. One conclusionof our work is that UML currently lacks support for captur<strong>in</strong>g and exploit<strong>in</strong>g certa<strong>in</strong> architecturalconcerns whose importance has been demonstrated through <strong>the</strong> research and practice of softwarearchitectures. In particular, UML lacks direct support for model<strong>in</strong>g and exploit<strong>in</strong>g architecturalstyles, explicit software connectors, and local and global architectural constra<strong>in</strong>ts.This material is based upon work supported by <strong>the</strong> National Science Foundation under GrantNo. CCR-9624846, Grant No. CCR-9701973, and Grant No. CCR-998441. Effort also sponsored by<strong>the</strong> Defense Advanced Research Projects Agency, Rome Laboratory, Air Force Materiel Command,USAF, under agreement numbers F30602-00-2-0615, F30602-97-2-0021, and F30602-94-C-0218,and <strong>the</strong> Air Force Office of Scientific Research under grant number F49620-98-1-0061. Additionalsupport is provided by Rockwell International and Northrop Grumman Corp. The U.S. Governmentis authorized to reproduce and distribute repr<strong>in</strong>ts for Government purposes notwithstand<strong>in</strong>g anycopyright annotation <strong>the</strong>reon. The views and conclusions conta<strong>in</strong>ed here<strong>in</strong> are those of <strong>the</strong> authorsand should not be <strong>in</strong>terpreted as necessarily represent<strong>in</strong>g <strong>the</strong> official policies or endorsements,ei<strong>the</strong>r expressed or implied, of <strong>the</strong> Defense Advanced Research Projects Agency, Rome Laboratory,or <strong>the</strong> U.S. Government.Authors’ addresses: N. Medvidovic, Computer Science Department, University of Sou<strong>the</strong>rnCalifornia, Los Angeles, CA 90089-0781; email: neno@usc.edu; D. S. Rosenblum and D. F. Redmiles,Department of Information and Computer Science, University of California, Irv<strong>in</strong>e, CA 92697-3425;email: dsr@ics.uci.edu; redmiles@ics.uci.edu; J. E. Robb<strong>in</strong>s, CollabNet, Inc., Brisbane, CA 94005-1865; email: jrobb<strong>in</strong>s@collabnet.net.Permission to make digital / hard copy of part or all of this work for personal or classroom use isgranted without fee provided that <strong>the</strong> copies are not made or distributed for profit or commercialadvantage, <strong>the</strong> copyright notice, <strong>the</strong> title of <strong>the</strong> publication, and its date appear, and notice is giventhat copy<strong>in</strong>g is by permission of ACM, Inc. To copy o<strong>the</strong>rwise, to republish, to post on servers, or toredistribute to lists, requires prior specific permission and/or fee.C○ 2002 ACM 1049-331X/02/0100–0002 $5.00ACM Transactions on <strong>Software</strong> Eng<strong>in</strong>eer<strong>in</strong>g and Methodology, Vol. 11, No. 1, January 2002, Pages 2–57.


<strong>Model<strong>in</strong>g</strong> <strong>Software</strong> <strong>Architectures</strong> <strong>in</strong> UML • 3Categories and Subject Descriptors: D.2.2 [<strong>Software</strong> Eng<strong>in</strong>eer<strong>in</strong>g]: Design Tools and Techniques;D.2.11 [<strong>Software</strong> Eng<strong>in</strong>eer<strong>in</strong>g]: <strong>Software</strong> <strong>Architectures</strong>General Terms: Design, <strong>Language</strong>s, StandardizationAdditional Key Words and Phrases: C2, formal model<strong>in</strong>g, Object Constra<strong>in</strong>t <strong>Language</strong>, objectorienteddesign, Rapide, software architecture, <strong>Unified</strong> <strong>Model<strong>in</strong>g</strong> <strong>Language</strong>, Wright1. INTRODUCTION<strong>Software</strong> architecture is an aspect of software eng<strong>in</strong>eer<strong>in</strong>g directed at develop<strong>in</strong>glarge, complex applications <strong>in</strong> a manner that reduces developmentcosts, <strong>in</strong>creases <strong>the</strong> potential for commonality among different members ofa closely related product family, and facilitates evolution, possibly at systemruntime [Garlan and Shaw 1993; Perry and Wolf 1992]. The primary focusof architecture-based software development is shifted from l<strong>in</strong>es-of-code tocoarser-gra<strong>in</strong>ed architectural elements, <strong>the</strong>ir high-level <strong>in</strong>teractions, and <strong>the</strong>iroverall <strong>in</strong>terconnection structure. This enables developers to abstract away unnecessarydetails and focus on <strong>the</strong> “big picture”—system structure, high-levelcommunication protocols, assignment of software components and connectorsto hosts, development process, and so on [Garlan and Shaw 1993; Kruchten1995; Luckham and Vera 1995; Perry and Wolf 1992; Soni et al. 1995; Tayloret al. 1996]. The basic promise of software architecture research is that bettersoftware systems can result from model<strong>in</strong>g <strong>the</strong>ir important architectural aspectsthroughout, and especially early <strong>in</strong>, <strong>the</strong> development lifecycle. Choos<strong>in</strong>gwhich aspects to model and how to evaluate <strong>the</strong>m are two decisions that framesoftware architecture research [Medvidovic and Rosenblum 1997].To date, <strong>the</strong> software architecture research community has focused predom<strong>in</strong>antlyon analytic evaluation of architectural descriptions. Many researchershave come to believe that, to obta<strong>in</strong> <strong>the</strong> benefits of an explicit architecturalfocus, software architecture must be provided with its own body of specificationlanguages and analysis techniques [Garlan 1995; Garlan et al. 1995; Mageeand Perry 1998; Wolf 1996]. Such languages are needed to def<strong>in</strong>e and analyzeproperties of a system upstream <strong>in</strong> its development, thus m<strong>in</strong>imiz<strong>in</strong>g <strong>the</strong> costsof detect<strong>in</strong>g and remov<strong>in</strong>g errors. The languages are also needed to provideabstractions that are adequate for model<strong>in</strong>g a large system, while ensur<strong>in</strong>gsufficient detail for establish<strong>in</strong>g properties of <strong>in</strong>terest. A large number of architecturedescription languages (ADLs) have been proposed [Allen and Garlan1997; Garlan et al. 1994; Luckham and Vera 1995; Magee and Kramer 1996;Medvidovic et al. 1999; Medvidovic et al. 1996; Moriconi et al. 1995; Shaw,De L<strong>in</strong>e et al. 1995; Vestal 1996].Each ADL embodies a particular approach to <strong>the</strong> specification and evolutionof an architecture. Answer<strong>in</strong>g specific evaluation questions demands powerful,specialized model<strong>in</strong>g and analysis techniques that address specific systemaspects <strong>in</strong> depth. However, <strong>the</strong> emphasis on depth over breadth of <strong>the</strong> modelcan make it difficult to <strong>in</strong>tegrate <strong>the</strong>se models with o<strong>the</strong>r development artifactsbecause <strong>the</strong> rigor of formal methods draws <strong>the</strong> modeler’s attention awayfrom day-to-day development concerns. The use of special-purpose model<strong>in</strong>gACM Transactions on <strong>Software</strong> Eng<strong>in</strong>eer<strong>in</strong>g and Methodology, Vol. 11, No. 1, January 2002.


4 • N. Medvidovic et al.Table I. <strong>Software</strong> Architecture Community FragmentationResearch CommunityPractitioner CommunityMajor Focus Analytic evaluation of architectural Wide range of development issuesmodelsArtifacts Individual models Families of models to span andrelate issuesRigor Formal model<strong>in</strong>g notations Practicality over formalityPrimary Goal Powerful analysis techniques Architecture as “big picture”<strong>in</strong> developmentScope Depth over breadth Breadth over depthOutcome Special-purpose solutions General-purpose solutionslanguages has made this part of <strong>the</strong> architecture community fairly fragmented,as revealed by a recent study of ADLs [Medvidovic and Taylor 2000].Ano<strong>the</strong>r community, primarily from <strong>in</strong>dustry, has focused on model<strong>in</strong>g a widerange of issues that arise <strong>in</strong> software development, perhaps with a family of(often less formal) models that span and relate <strong>the</strong> issues of concern. By pay<strong>in</strong>g<strong>the</strong> cost of mak<strong>in</strong>g such models, developers ga<strong>in</strong> <strong>the</strong> benefit of clarify<strong>in</strong>gand communicat<strong>in</strong>g <strong>the</strong>ir understand<strong>in</strong>g of <strong>the</strong> system. However, emphasiz<strong>in</strong>gbreadth over depth potentially allows many problems and errors to go undetectedbecause lack of rigor allows developers to ignore some important details.These two predom<strong>in</strong>ant perspectives on software architecture are summarized<strong>in</strong> Table I, which compares <strong>the</strong>m along a number of important dimensions.We acknowledge that <strong>the</strong> positions of <strong>the</strong> two communities are significantlymore complex than represented <strong>in</strong> <strong>the</strong> table. However, we believe that <strong>the</strong> tableprovides a useful, if simplified, overview of <strong>the</strong> relationship between <strong>the</strong> twocommunities and shows <strong>the</strong> need to bridge <strong>the</strong> chasm between <strong>the</strong>m.As <strong>in</strong> <strong>the</strong> case of <strong>the</strong> numerous ADLs produced by <strong>the</strong> research community,several compet<strong>in</strong>g notations have been used <strong>in</strong> <strong>the</strong> practitioner community.However, <strong>the</strong>re now exists a concerted effort to standardize on notationsand methods for software analysis and design. Standardization provides aneconomy of scale that results <strong>in</strong> more and better tools, better <strong>in</strong>teroperabilitybetween tools, a larger number of available developers skilled <strong>in</strong> us<strong>in</strong>g <strong>the</strong> standardnotation, and lower overall tra<strong>in</strong><strong>in</strong>g costs. One hypo<strong>the</strong>sis of this paper isthat <strong>the</strong> benefits of standardization need not be achieved at <strong>the</strong> expense of los<strong>in</strong>g<strong>the</strong> power afforded by specialized notations. Instead, when special-purpose notationsare needed, <strong>the</strong>y can often be based on, or related to, standard notations.Specifically, <strong>in</strong> this paper we <strong>in</strong>vestigate <strong>the</strong> possibility of us<strong>in</strong>g <strong>the</strong> <strong>Unified</strong><strong>Model<strong>in</strong>g</strong> <strong>Language</strong> (UML) [Booch et al. 1998], an emerg<strong>in</strong>g standard softwaredesign language, as a start<strong>in</strong>g po<strong>in</strong>t for br<strong>in</strong>g<strong>in</strong>g architectural model<strong>in</strong>g <strong>in</strong>towider, <strong>in</strong>dustrial use. At first glance, UML appears to be well suited for thisbecause it provides a large, useful, and extensible set of predef<strong>in</strong>ed constructs,is semiformally def<strong>in</strong>ed, has <strong>the</strong> potential for substantial tool support, and isbased on experience with ma<strong>in</strong>stream development methods. The primary goalof this work is an assessment of UML’s expressive power for model<strong>in</strong>g softwarearchitectures <strong>in</strong> <strong>the</strong> manner <strong>in</strong> which exist<strong>in</strong>g ADLs model architectures.To this end, we have conducted an extensive exam<strong>in</strong>ation of UML’s ability toACM Transactions on <strong>Software</strong> Eng<strong>in</strong>eer<strong>in</strong>g and Methodology, Vol. 11, No. 1, January 2002.


<strong>Model<strong>in</strong>g</strong> <strong>Software</strong> <strong>Architectures</strong> <strong>in</strong> UML • 5Fig. 1. (a) Leverag<strong>in</strong>g a comb<strong>in</strong>ation of a standard notation (<strong>the</strong> core model) and a set of specializednotations (model extensions) to address <strong>the</strong> multitude of issues that may arise dur<strong>in</strong>g softwaredevelopment. (b) Sketch of a correspond<strong>in</strong>g development process <strong>in</strong> which excursions from <strong>the</strong>“ma<strong>in</strong>” process are undertaken to address specific concerns us<strong>in</strong>g <strong>the</strong> specialized notations.model <strong>the</strong> architectural concepts provided by several ADLs. Our study formsa necessary foundation for fur<strong>the</strong>r <strong>in</strong>vestigat<strong>in</strong>g <strong>the</strong> possibility of provid<strong>in</strong>g abroadly applicable extension of UML for architecture model<strong>in</strong>g.Represent<strong>in</strong>g <strong>in</strong> UML <strong>the</strong> architectural build<strong>in</strong>g blocks supported by an ADL(e.g., Wright’s components, connectors, ports, roles, and styles [Allen and Garlan1997]) offers potential benefits both to practitioners who prefer <strong>the</strong> ADL as adesign notation and to those who are more familiar with UML. For example, if amapp<strong>in</strong>g were enabled from an architecture modeled <strong>in</strong> Wright to one <strong>in</strong> UML,a Wright user might be able to leverage a wide number of general-purposeUML tools for later stages of development, such as tools for code generation,simulation, analysis, reverse eng<strong>in</strong>eer<strong>in</strong>g, and so forth. Conversely, if UML wereextended to <strong>in</strong>clude Wright’s model<strong>in</strong>g capabilities, it would potentially enablea UML user to exploit <strong>the</strong> powerful analyses for which Wright is suited, suchas <strong>in</strong>terface compatibility check<strong>in</strong>g and deadlock detection.In order to evaluate UML’s suitability for model<strong>in</strong>g software architectures<strong>in</strong> <strong>the</strong> manner outl<strong>in</strong>ed above, we have placed no restrictions on <strong>the</strong> manner <strong>in</strong>which UML is used for this purpose, o<strong>the</strong>r than <strong>the</strong> requirement that <strong>the</strong> result<strong>in</strong>gapproach still <strong>in</strong>volve standard UML. The motivation for this requirementis clear: Alter<strong>in</strong>g UML <strong>in</strong> any way to better support <strong>the</strong> needs of software architectures<strong>in</strong>validates <strong>the</strong> argument for us<strong>in</strong>g a standard notation <strong>in</strong> <strong>the</strong> firstplace. We have identified three possible strategies for us<strong>in</strong>g UML to model architectures.S<strong>in</strong>ce a prelim<strong>in</strong>ary evaluation <strong>in</strong>dicated that one of <strong>the</strong> strategiesresults <strong>in</strong> a notation that is not legal UML, we have pursued only two strategies<strong>in</strong> depth.It is important to note that we envision <strong>the</strong> strategies discussed <strong>in</strong> this paperbe<strong>in</strong>g used by practitioners <strong>in</strong> <strong>the</strong> context of <strong>the</strong>ir exist<strong>in</strong>g software processesand have thus tried to refra<strong>in</strong> from prescrib<strong>in</strong>g a particular process for relat<strong>in</strong>gADLs and UML. But at least at a high level, our overall approach can bevisualized <strong>in</strong> <strong>the</strong> context of a modeled software system as shown <strong>in</strong> Figure 1a:Standard, “core” UML is constra<strong>in</strong>ed (ei<strong>the</strong>r implicitly <strong>in</strong> <strong>the</strong> way it is used,or explicitly via <strong>the</strong> mechanisms discussed below) to address specific architecturalconcerns identified by <strong>the</strong> architect. The conceptual view of <strong>the</strong> correspond<strong>in</strong>gprocess is given <strong>in</strong> Figure 1b: Occasional “excursions” from <strong>the</strong> ma<strong>in</strong>development process may be undertaken as needed to address <strong>the</strong> identifiedACM Transactions on <strong>Software</strong> Eng<strong>in</strong>eer<strong>in</strong>g and Methodology, Vol. 11, No. 1, January 2002.


6 • N. Medvidovic et al.architectural concerns. These model extensions (Figure 1a) and process excursions(Figure 1b) may <strong>in</strong>volve mapp<strong>in</strong>g between UML and ADLs that provideparticular k<strong>in</strong>ds of support, or <strong>the</strong>y may <strong>in</strong>volve us<strong>in</strong>g a particular UML extensionand correspond<strong>in</strong>g UML-compliant tools that have been developed toprovide <strong>the</strong> necessary support.We have def<strong>in</strong>ed a m<strong>in</strong>imum set of requirements for objectively evaluat<strong>in</strong>gUML’s ability to represent software architectures effectively. This set was derivedfrom our extensive studies of ADLs [Medvidovic and Taylor 2000] andsoftware system development concerns that have significant architectural relevance[Medvidovic and Rosenblum 1997; Medvidovic and Taylor 1998]. Whilecerta<strong>in</strong>ly not exhaustive, we have found <strong>the</strong>se requirements to be sufficientlybroad to highlight both <strong>the</strong> strengths and weaknesses of UML <strong>in</strong> this endeavor.The requirements are as follows:—UML should be well suited to model <strong>the</strong> structural concerns (i.e., <strong>the</strong> configurationor topology [Medvidovic and Taylor 2000]) of a system. This requirementis also advocated <strong>in</strong> a study of model<strong>in</strong>g <strong>the</strong> structural aspects ofarchitecture <strong>in</strong> UML by Garlan et al. [Garlan and Kompanek 2000].—UML should be able to capture a variety of stylistic issues addressed bo<strong>the</strong>xplicitly and implicitly by ADLs. These issues <strong>in</strong>clude a standard designvocabulary, recurr<strong>in</strong>g topologies, and, possibly, generic system behavior.—UML should be able to model <strong>the</strong> different behavioral aspects of a systemfocused upon by different ADLs. While this may appear to be an unfairrequirement, given <strong>the</strong> wide range of semantic models employed by exist<strong>in</strong>gADLs (e.g., CSP [Allen and Garlan 1997], partially ordered event sets[Luckham and Vera 1995], π-calculus [Magee and Kramer 1996], first-orderlogic [Medvidovic et al. 1999]), its primary goal is to highlight UML’s limitationsand suggest possible areas for improvement. Moreover, our studyhas shown UML to be surpris<strong>in</strong>gly flexible <strong>in</strong> represent<strong>in</strong>g a wide range ofsemantic concerns.—UML should be able to support model<strong>in</strong>g of a wide range of component <strong>in</strong>teractionparadigms (whe<strong>the</strong>r specific to or <strong>in</strong>dependent of a particular style). Thisrequirement stems from one of <strong>the</strong> key contributions of software architectureresearch—<strong>the</strong> focus on component <strong>in</strong>teractions (i.e., software connectors) asfirst-class system model<strong>in</strong>g concerns [Mehta et al. 2000; Shaw 1996].—F<strong>in</strong>ally, a requirement derived from <strong>the</strong> ones above is that UML should beable to capture any constra<strong>in</strong>ts aris<strong>in</strong>g from a system’s structure, behavior,<strong>in</strong>teractions, and style(s).The rema<strong>in</strong>der of <strong>the</strong> paper is organized as follows. Section 2 presents a briefoverview of UML. Section 3 identifies and briefly evaluates <strong>the</strong> three possiblestrategies to model<strong>in</strong>g architectures <strong>in</strong> UML. Sections 4 and 5 <strong>the</strong>n present<strong>in</strong>-depth evaluations of <strong>the</strong> two viable strategies based on model<strong>in</strong>g capabilitiesprovided by three ADLs: C2 [Medvidovic, Oreizy, et al. 1996], Wright [Allenand Garlan 1994], and Rapide [Luckham and Vera 1995]. Section 6 discusses relatedwork. Section 7 presents our conclusions, summariz<strong>in</strong>g <strong>the</strong> strengths andweaknesses of <strong>the</strong> presented strategies and outl<strong>in</strong><strong>in</strong>g plans for future research.ACM Transactions on <strong>Software</strong> Eng<strong>in</strong>eer<strong>in</strong>g and Methodology, Vol. 11, No. 1, January 2002.


<strong>Model<strong>in</strong>g</strong> <strong>Software</strong> <strong>Architectures</strong> <strong>in</strong> UML • 7Fig. 2. The four-layer metamodel<strong>in</strong>g architecture of UML. The diagram qualitatively depicts <strong>the</strong><strong>in</strong>crease <strong>in</strong> <strong>the</strong> sizes of <strong>the</strong> model<strong>in</strong>g spaces at each level. For example, <strong>the</strong> s<strong>in</strong>gle meta-meta modelcan be used to def<strong>in</strong>e a number of meta models, such as UML’s, which can, <strong>in</strong> turn, be used to modelcountless user objects.2. AN OVERVIEW OF UMLUML is a model<strong>in</strong>g language with a semiformal syntax and semantics. It is def<strong>in</strong>edwith<strong>in</strong> a general four-layer metamodel<strong>in</strong>g architecture shown <strong>in</strong> Figure 2.The meta-meta model layer def<strong>in</strong>es a language for specify<strong>in</strong>g <strong>the</strong> meta modellayer. The meta model layer, <strong>in</strong> turn, def<strong>in</strong>es legal specifications <strong>in</strong> a given model<strong>in</strong>glanguage; for example, <strong>the</strong> UML meta model def<strong>in</strong>es legal UML specifications.The model layer is used to def<strong>in</strong>e models of specific software systems. And<strong>the</strong> user objects layer is used to construct specific <strong>in</strong>stances of a given model.The model and meta model layers are most relevant for model<strong>in</strong>g softwarearchitectures <strong>in</strong> UML. They are summarized <strong>in</strong> <strong>the</strong> rema<strong>in</strong>der of this section.The section also presents a brief overview of UML’s associated constra<strong>in</strong>t language,<strong>the</strong> Object Constra<strong>in</strong>t <strong>Language</strong> (OCL). For more extensive details, <strong>the</strong>reader is referred to standard texts on UML and OCL [Booch et al. 1998;Rumbaugh et al. 1998; Warmer and Kleppe 1998] and to <strong>the</strong> draft specificationdeveloped by <strong>the</strong> Object Management Group (OMG) [Object ManagementGroup 2000].2.1 UML Design Models and DiagramsA UML model of a software system consists of several partial models, each ofwhich addresses a certa<strong>in</strong> set of issues at a certa<strong>in</strong> level of fidelity. UML modelsaddress a number of design issues through a variety of diagrams: (1) classesand <strong>the</strong>ir declared attributes, operations, and relationships; (2) <strong>the</strong> possiblestates and behavior of <strong>in</strong>dividual classes; (3) packages of classes and <strong>the</strong>ir dependencies;(4) example scenarios of system usage <strong>in</strong>clud<strong>in</strong>g k<strong>in</strong>ds of usersand relationships between user tasks; (5) <strong>the</strong> behavior of <strong>the</strong> overall system<strong>in</strong> <strong>the</strong> context of a usage scenario; (6) examples of object <strong>in</strong>stances with actualattributes and relationships <strong>in</strong> <strong>the</strong> context of a scenario; (7) examples of <strong>the</strong>actual behavior of <strong>in</strong>teract<strong>in</strong>g <strong>in</strong>stances <strong>in</strong> <strong>the</strong> context of a scenario; and (8) <strong>the</strong>deployment and communication of software components on distributed hosts.Fidelity refers to how closely <strong>the</strong> model will correspond to <strong>the</strong> eventual implementationof <strong>the</strong> system; low-fidelity models tend to be used early <strong>in</strong> <strong>the</strong> lifecycleand are more problem-oriented and generic, whereas high-fidelity models tendACM Transactions on <strong>Software</strong> Eng<strong>in</strong>eer<strong>in</strong>g and Methodology, Vol. 11, No. 1, January 2002.


8 • N. Medvidovic et al.Fig. 3.An example design expressed <strong>in</strong> UML.to be used later and are more solution-oriented and specific. Increas<strong>in</strong>g fidelitydemands effort and knowledge to build more detailed models, but results <strong>in</strong>more properties of <strong>the</strong> model hold<strong>in</strong>g true <strong>in</strong> <strong>the</strong> system.Figure 3 presents an example of a UML model <strong>in</strong> which a UML class diagramis used to model part of a human resources system. A Company employsmany Workers, offers many tra<strong>in</strong><strong>in</strong>g Courses, and owns many Robots. Robotsand Employees are Workers (i.e., <strong>the</strong>y <strong>in</strong>herit from Worker as subclasses). Laborunion contracts constra<strong>in</strong> Companies such that Robots may not make upmore than 10% of <strong>the</strong> work force. This is stated <strong>in</strong> a constra<strong>in</strong>t at <strong>the</strong> top of<strong>the</strong> class diagram; <strong>the</strong> details of this constra<strong>in</strong>t will be expla<strong>in</strong>ed shortly. Atra<strong>in</strong><strong>in</strong>g Course conta<strong>in</strong>s many Tra<strong>in</strong>ees, and each Tra<strong>in</strong>ee may take from oneto four Courses. In this example, Tra<strong>in</strong>ee is an <strong>in</strong>terface (a set of exported operations)ra<strong>the</strong>r than a full class. An Employee is capable of perform<strong>in</strong>g all <strong>the</strong>operations of Tra<strong>in</strong>ee. In UML, aggregation (white diamond) is an association<strong>in</strong>dicat<strong>in</strong>g that one object is temporarily subord<strong>in</strong>ate to one or more o<strong>the</strong>rs,whereas composition (black diamond), a stronger form of aggregation, is anassociation <strong>in</strong>dicat<strong>in</strong>g that an object is subord<strong>in</strong>ate to exactly one o<strong>the</strong>r objectthroughout its lifetime. The association between Company and Course <strong>in</strong>volvesno <strong>in</strong>heritance, aggregation, or composition.2.2 UML Extension Mechanisms and <strong>the</strong> Object Constra<strong>in</strong>t <strong>Language</strong>Designers periodically may need to extend UML <strong>in</strong> well-def<strong>in</strong>ed ways <strong>in</strong> order tocapture certa<strong>in</strong> k<strong>in</strong>ds of model<strong>in</strong>g concerns. UML provides a number of extensionmechanisms that allow designers to customize and extend <strong>the</strong> semanticsof model elements:(1) Constra<strong>in</strong>ts place added semantic restrictions on model elements. The possibilitiesfor constra<strong>in</strong>ts are numerous and <strong>in</strong>clude type constra<strong>in</strong>ts on classattribute values, constra<strong>in</strong>ts on <strong>the</strong> construction of associations betweenclasses, and so on.(2) Tagged values allow attributes to be associated with model elements. For<strong>in</strong>stance, a project may wish to associate “version” and “author” tags oro<strong>the</strong>r such metadata with certa<strong>in</strong> model elements.(3) Stereotypes allow groups of constra<strong>in</strong>ts and tagged values to be given descriptivenames (with <strong>the</strong> name specified <strong>in</strong> double angle brackets), andACM Transactions on <strong>Software</strong> Eng<strong>in</strong>eer<strong>in</strong>g and Methodology, Vol. 11, No. 1, January 2002.


<strong>Model<strong>in</strong>g</strong> <strong>Software</strong> <strong>Architectures</strong> <strong>in</strong> UML • 9applied to model elements, effectively creat<strong>in</strong>g a new yet restricted formof meta class for construct<strong>in</strong>g models. The semantic effect is as if <strong>the</strong> constra<strong>in</strong>tsand tagged values were attached directly to those elements. For<strong>in</strong>stance, <strong>in</strong>terfaces are identified <strong>in</strong> class diagrams by attach<strong>in</strong>g <strong>the</strong> stereotypename to class icons; among o<strong>the</strong>r th<strong>in</strong>gs, <strong>the</strong> stereotypeconstra<strong>in</strong>s an <strong>in</strong>terface to declare only operations and no attributes.(4) Profiles are predef<strong>in</strong>ed sets of stereotypes, tagged values, constra<strong>in</strong>ts, andicons to support model<strong>in</strong>g <strong>in</strong> specific doma<strong>in</strong>s. The UML specification currentlydef<strong>in</strong>es profiles for <strong>the</strong> <strong>Unified</strong> Process and for Bus<strong>in</strong>ess <strong>Model<strong>in</strong>g</strong>[Object management Group 2000].It is possible to express constra<strong>in</strong>ts on UML models us<strong>in</strong>g <strong>the</strong> Object Constra<strong>in</strong>t<strong>Language</strong>, which comb<strong>in</strong>es first-order predicate logic with a diagramnavigation language [Object Management Group 2000; Warmer and Kleppe1998]. Each OCL expression is specified and evaluated <strong>in</strong> <strong>the</strong> context of (<strong>the</strong> <strong>in</strong>stancesof) some model element (referred to as self) and may use attributes andrelationships of that element as terms. The self <strong>in</strong>stance may be a UML classifier(such as a class or an <strong>in</strong>terface), or an element used by a classifier (such asan attribute, an operation, or an end element of associations), or ano<strong>the</strong>r typeof model element. OCL also def<strong>in</strong>es operations on sets, bags, and sequences tosupport construction and manipulation of collections of model elements <strong>in</strong> OCLexpressions. For <strong>in</strong>stance, <strong>the</strong> operations def<strong>in</strong>ed with<strong>in</strong> a class form a set thatcan be traversed <strong>in</strong> order to apply a constra<strong>in</strong>t to each operation.The top of Figure 3 illustrates a simple OCL constra<strong>in</strong>t on <strong>the</strong> <strong>in</strong>stances ofclass Company (<strong>the</strong> self model element) expressed <strong>in</strong> terms of <strong>the</strong> card<strong>in</strong>alitiesof its associations with Robot and Worker classes. Each association is identifiedby <strong>the</strong> name of <strong>the</strong> role filled by <strong>the</strong> class at <strong>the</strong> o<strong>the</strong>r end of <strong>the</strong> association. Bydefault, <strong>the</strong> role name is <strong>the</strong> name of <strong>the</strong> class itself with <strong>the</strong> first letter changedto lower case, and <strong>the</strong> role name evaluates to <strong>the</strong> set of all <strong>in</strong>stances fill<strong>in</strong>g <strong>the</strong>role. Referr<strong>in</strong>g to associations and roles <strong>in</strong> this manner provides a means ofnavigat<strong>in</strong>g through <strong>the</strong> enclos<strong>in</strong>g diagram and is <strong>the</strong>refore a key technique forconstruct<strong>in</strong>g constra<strong>in</strong>ts <strong>in</strong> OCL. The predef<strong>in</strong>ed property size is used to obta<strong>in</strong>card<strong>in</strong>alities of collections of elements (<strong>in</strong> this case, <strong>the</strong> number of elementsfill<strong>in</strong>g <strong>the</strong> robot role and <strong>the</strong> number of elements fill<strong>in</strong>g <strong>the</strong> worker role). Thus,<strong>the</strong> constra<strong>in</strong>t says that <strong>the</strong> number of <strong>in</strong>stances of Robots aggregated to an<strong>in</strong>stance of Company divided by <strong>the</strong> number of <strong>in</strong>stances of Workers aggregatedto <strong>the</strong> <strong>in</strong>stance of Company must be less than one-tenth.We fur<strong>the</strong>r describe and illustrate OCL with constra<strong>in</strong>ts on <strong>the</strong> UML metamodel <strong>in</strong> <strong>the</strong> next section and <strong>in</strong> Section 5.2.3 The UML Meta ModelAs mentioned above, UML is a graphical language with semiformal syntaxand semantics, which are specified via a meta model, <strong>in</strong>formal descriptive text,and constra<strong>in</strong>ts [Object Management Group 2000]. The meta model is itself aUML model that specifies <strong>the</strong> abstract syntax of UML models. For example, <strong>the</strong>UML meta model states that a Class is one k<strong>in</strong>d of model element with certa<strong>in</strong>attributes, and that a Feature is ano<strong>the</strong>r k<strong>in</strong>d of model element with its ownACM Transactions on <strong>Software</strong> Eng<strong>in</strong>eer<strong>in</strong>g and Methodology, Vol. 11, No. 1, January 2002.


10 • N. Medvidovic et al.Fig. 4. Simplified UML meta model (adapted from Object Management Group [2000]). Italicizedclasses are abstract (i.e., non<strong>in</strong>stantiable) classes. All classes are subclasses of ModelElement (exceptModelElement itself); this relationship is not shown.attributes, and that <strong>the</strong>re is a one-to-many composition relationship between<strong>the</strong>m. Thus, <strong>in</strong> terms of Figure 2, <strong>the</strong> meta class Class is def<strong>in</strong>ed at <strong>the</strong> metamodel level, and <strong>in</strong>stances of Class are <strong>the</strong> classes def<strong>in</strong>ed <strong>in</strong> software systemmodels at <strong>the</strong> model level. Figure 4 depicts <strong>the</strong> parts of <strong>the</strong> UML meta modelused <strong>in</strong> this paper.A powerful application of <strong>the</strong> extension mechanisms described <strong>in</strong> Section 2.2is to constra<strong>in</strong> <strong>the</strong> way <strong>the</strong> meta model is used <strong>in</strong> construct<strong>in</strong>g system models.In particular, a stereotype can be def<strong>in</strong>ed for use with a particular meta modelelement and <strong>the</strong>n applied to <strong>in</strong>stances of that element <strong>in</strong> <strong>the</strong> model level(<strong>the</strong>reby constra<strong>in</strong><strong>in</strong>g all <strong>in</strong>stances of <strong>the</strong> stereotyped element at <strong>the</strong> user objectslevel of Figure 2). A stereotype thus essentially creates a new model<strong>in</strong>gconstruct, but one whose use still results <strong>in</strong> legal UML models. For example,suppose we wish to enhance <strong>the</strong> class diagram of Figure 3 to impose a designconstra<strong>in</strong>t that a person may not be a composite element of ano<strong>the</strong>r class—<strong>in</strong>o<strong>the</strong>r words, “a person must be <strong>the</strong> whole <strong>in</strong> any whole-part relationships.” Thisdoes not prevent a person from participat<strong>in</strong>g <strong>in</strong> conta<strong>in</strong>ment relationships, onlycomposite relationships. In this example, composition would mean that employeescould not participate <strong>in</strong> any o<strong>the</strong>r aggregates and never work for ano<strong>the</strong>rcompany. The constra<strong>in</strong>t may be stated formally <strong>in</strong> OCL as:Stereotype Person for <strong>in</strong>stances of meta class Class--1-- If a person is <strong>in</strong> any composite relationship, it must be <strong>the</strong> composite, not<strong>the</strong> composed.self.associationEnd.forAll(myEnd |myEnd.association.associationEnd->forAll(anyEnd |anyEnd.aggregation = composite impliesmyEnd.aggregation = composite))Note that <strong>the</strong> stereotype is def<strong>in</strong>ed for use with classes (i.e., <strong>in</strong>stances of <strong>the</strong>meta model element Class) <strong>in</strong> system models, and thus we could apply thisACM Transactions on <strong>Software</strong> Eng<strong>in</strong>eer<strong>in</strong>g and Methodology, Vol. 11, No. 1, January 2002.


<strong>Model<strong>in</strong>g</strong> <strong>Software</strong> <strong>Architectures</strong> <strong>in</strong> UML • 11stereotype to class Worker <strong>in</strong> Figure 3; to do so, <strong>the</strong> stereotype name would bespecified <strong>in</strong> double angle brackets (i.e., as ) above <strong>the</strong> name Worker<strong>in</strong> Worker’s class icon. Associat<strong>in</strong>g <strong>the</strong> stereotype with a meta model element<strong>in</strong> this way allows <strong>the</strong> stereotype to be def<strong>in</strong>ed <strong>in</strong> terms of attributes, roles, ando<strong>the</strong>r elements at <strong>the</strong> meta model level. The first l<strong>in</strong>e of <strong>the</strong> OCL constra<strong>in</strong>tdef<strong>in</strong>ed <strong>in</strong> <strong>the</strong> stereotype is a universal quantifier over all association endsof <strong>the</strong> stereotyped class. In particular, self is an <strong>in</strong>stance of <strong>the</strong> meta modelelement Class; Class has associations with <strong>in</strong>stances of <strong>the</strong> meta model elementAssociationEnd, which by default fills a role called associationEnd <strong>in</strong> each suchassociation (see Figure 4). For each such association end myEnd, <strong>the</strong> second l<strong>in</strong>e isa universal quantifier over all <strong>the</strong> association ends of <strong>the</strong> association to whichmyEnd is attached (and thus myEnd is <strong>in</strong>cluded <strong>in</strong> <strong>the</strong> quantification). Aga<strong>in</strong>,note that association and associationEnd <strong>in</strong> this l<strong>in</strong>e refer to roles def<strong>in</strong>ed forassociations <strong>in</strong> <strong>the</strong> meta model. For each such association end anyEnd, <strong>the</strong> thirdl<strong>in</strong>e checks to see if <strong>the</strong> aggregation attribute of anyEnd is composite, <strong>in</strong>dicat<strong>in</strong>gthat anyEnd is a composite of <strong>the</strong> association. If <strong>the</strong>re is a composite associationend, <strong>the</strong>n <strong>the</strong> fourth l<strong>in</strong>e states <strong>the</strong> requirement that myEnd also must be acomposite of <strong>the</strong> association. Because UML already constra<strong>in</strong>s associations tohave at most one composite end, this <strong>in</strong> effect constra<strong>in</strong>s myEnd to be <strong>the</strong> onlycomposite <strong>in</strong> <strong>the</strong> association.The labor union constra<strong>in</strong>t presented <strong>in</strong> Figure 3 and described <strong>in</strong> Section 2.2uses terms from <strong>the</strong> model to constra<strong>in</strong> <strong>the</strong> state of <strong>the</strong> system at run-time. Incontrast, <strong>the</strong> stereotype Person uses terms from <strong>the</strong> UML meta model to constra<strong>in</strong><strong>the</strong> model of <strong>the</strong> system. In addition, although not depicted <strong>in</strong> Figure 4,models <strong>the</strong>mselves are def<strong>in</strong>ed <strong>in</strong> <strong>the</strong> meta model through <strong>the</strong> meta class Model.This makes it possible to apply constra<strong>in</strong>ts to whole diagrams, which for exampleallows one to constra<strong>in</strong> all <strong>the</strong> elements of a diagram to uniformly use aparticular set of stereotypes. As described <strong>in</strong> <strong>the</strong> next section, we use <strong>the</strong>setechniques of constra<strong>in</strong><strong>in</strong>g <strong>the</strong> UML meta model <strong>in</strong> our second strategy forsupport<strong>in</strong>g architectural model<strong>in</strong>g <strong>in</strong> UML.3. MODELING SOFTWARE ARCHITECTURES IN UMLThe four-layer metamodel<strong>in</strong>g architecture of UML suggests three possiblestrategies for model<strong>in</strong>g software architectures us<strong>in</strong>g UML:1. Use UML “as is.”2. Constra<strong>in</strong> <strong>the</strong> UML meta model us<strong>in</strong>g UML’s built-<strong>in</strong> extension mechanisms.3. Extend <strong>the</strong> UML meta model to directly support <strong>the</strong> needed architecturalconcepts.Each approach has certa<strong>in</strong> potential advantages and disadvantages. Thissection presents a brief discussion and prelim<strong>in</strong>ary evaluation of <strong>the</strong> approaches.Recall from <strong>the</strong> <strong>in</strong>troduction that, <strong>in</strong> order to reap <strong>the</strong> benefits ofstandardization (e.g., understandability and manipulability by standard tools),we require that any result<strong>in</strong>g notation adhere to <strong>the</strong> syntax and semanticsof UML.ACM Transactions on <strong>Software</strong> Eng<strong>in</strong>eer<strong>in</strong>g and Methodology, Vol. 11, No. 1, January 2002.


12 • N. Medvidovic et al.Fig. 5.The UML model is explicitly constra<strong>in</strong>ed to support software architecture model<strong>in</strong>g needs.3.1 Strategy 1: Us<strong>in</strong>g UML “As Is”The simplest strategy is to use <strong>the</strong> exist<strong>in</strong>g UML notation to represent softwarearchitectures. Assess<strong>in</strong>g <strong>the</strong> practicality of this approach requires an evaluationof <strong>the</strong> suitability of UML’s model<strong>in</strong>g features for represent<strong>in</strong>g specificarchitectural concepts. A major advantage of <strong>the</strong> approach is that it wouldresult <strong>in</strong> architectural models that are immediately understandable by anyUML user and manipulable by UML-compliant tools. However, <strong>the</strong> approachwould provide no means for explicitly represent<strong>in</strong>g <strong>the</strong> relationship betweenexist<strong>in</strong>g UML constructs and architectural concepts for which <strong>the</strong>re is no directUML counterpart (such as software connectors and architectural stylerules). Ra<strong>the</strong>r, this relationship would have to be ma<strong>in</strong>ta<strong>in</strong>ed implicitly by <strong>the</strong>software architect.3.2 Strategy 2: Constra<strong>in</strong><strong>in</strong>g UMLThe space of software development situations and concerns for which UML is<strong>in</strong>tended exceeds that of ADLs (e.g., as reflected <strong>in</strong> UML’s support for requirementsanalysis and specification, and low-level design). Therefore, one possibleapproach to model<strong>in</strong>g architectures <strong>in</strong> UML is to constra<strong>in</strong> UML. UML is an extensiblelanguage <strong>in</strong> that new constructs may be added to address new concerns<strong>in</strong> software development. It provides a means for <strong>in</strong>corporat<strong>in</strong>g new model<strong>in</strong>gcapabilities and address<strong>in</strong>g new development concerns without chang<strong>in</strong>g <strong>the</strong>exist<strong>in</strong>g syntax or semantics of UML. This is accomplished via <strong>the</strong> extensionmechanisms described <strong>in</strong> Section 2.2. Conceptually, this approach can be representedus<strong>in</strong>g UML’s metamodel<strong>in</strong>g architecture from Figure 2. As depicted <strong>in</strong>Figure 5, only a relevant portion of <strong>the</strong> UML model<strong>in</strong>g space is made availableto <strong>the</strong> software architect.The major advantage of this approach is that it explicitly represents andenforces architectural constra<strong>in</strong>ts. Fur<strong>the</strong>rmore, an architecture specified <strong>in</strong>this manner would still be manipulable by standard UML tools and would beunderstandable to UML users (with some added effort <strong>in</strong> study<strong>in</strong>g <strong>the</strong> OCL constra<strong>in</strong>ts).A disadvantage of <strong>the</strong> approach is that it may be difficult to fully andcorrectly specify <strong>the</strong> boundaries of <strong>the</strong> model<strong>in</strong>g space <strong>in</strong> Figure 5. Additionally,as a practical concern, tools that enforce OCL constra<strong>in</strong>ts <strong>in</strong> UML specificationsare only beg<strong>in</strong>n<strong>in</strong>g to emerge [Tigris 2000].ACM Transactions on <strong>Software</strong> Eng<strong>in</strong>eer<strong>in</strong>g and Methodology, Vol. 11, No. 1, January 2002.


14 • N. Medvidovic et al.application nor <strong>the</strong> style are universally applicable, <strong>the</strong>y are sufficient to highlight<strong>the</strong> important similarities and differences between UML and ADLs. Thisexample is representative <strong>in</strong> that a number of issues we encountered are <strong>in</strong>dependentof C2 or <strong>the</strong> application’s characteristics, <strong>in</strong> particular represent<strong>in</strong>garchitectural structure and <strong>in</strong>dividual elements (components and connectors) <strong>in</strong>UML, model<strong>in</strong>g component and connector <strong>in</strong>terfaces <strong>in</strong> UML, identify<strong>in</strong>g differentroles that <strong>the</strong> elements of a UML doma<strong>in</strong> model play <strong>in</strong> <strong>the</strong> architecture, and<strong>the</strong> process of transform<strong>in</strong>g a UML doma<strong>in</strong> model <strong>in</strong>to an architectural model.4.1 Example ApplicationThe selected example application is a simplified version of <strong>the</strong> meet<strong>in</strong>g schedulerproblem, <strong>in</strong>itially described by van Lamsweerde and colleagues [Fea<strong>the</strong>ret al. 1997] and recently considered as a candidate model problem <strong>in</strong> softwarearchitectures [Shaw, Garlan et al. 1995]. In this application, meet<strong>in</strong>gs are typicallyarranged <strong>in</strong> <strong>the</strong> follow<strong>in</strong>g way. A meet<strong>in</strong>g <strong>in</strong>itiator asks all potential meet<strong>in</strong>gattendees for a set of dates on which <strong>the</strong>y cannot attend <strong>the</strong> meet<strong>in</strong>g (<strong>the</strong>ir“exclusion set”) and a set of dates on which <strong>the</strong>y would prefer <strong>the</strong> meet<strong>in</strong>g to takeplace (<strong>the</strong>ir “preference set”). The exclusion and preference sets are conta<strong>in</strong>ed<strong>in</strong> some time <strong>in</strong>terval prescribed by <strong>the</strong> meet<strong>in</strong>g <strong>in</strong>itiator (<strong>the</strong> “date range”). Themeet<strong>in</strong>g <strong>in</strong>itiator also asks active participants to provide any special equipmentrequirements on <strong>the</strong> meet<strong>in</strong>g location (e.g., projector, workstation, network connection,telephones). The meet<strong>in</strong>g <strong>in</strong>itiator may also ask important participantsto state preferences for <strong>the</strong> meet<strong>in</strong>g location.The proposed meet<strong>in</strong>g date should belong to <strong>the</strong> stated date range and tonone of <strong>the</strong> exclusion sets. It should also ideally belong to as many preferencesets as possible. A date conflict occurs when no such date can be found. Aconflict is strong when no date can be found with<strong>in</strong> <strong>the</strong> date range and outsideall exclusion sets; it is weak when dates can be found with<strong>in</strong> <strong>the</strong> date rangeand outside all exclusion sets, but no date can be found at <strong>the</strong> <strong>in</strong>tersection ofall preference sets. Conflicts can be resolved <strong>in</strong> several ways:—The meet<strong>in</strong>g <strong>in</strong>itiator extends <strong>the</strong> date range.—Some participants expand <strong>the</strong>ir preference set or narrow down <strong>the</strong>ir exclusionset.—Some participants withdraw from <strong>the</strong> meet<strong>in</strong>g.4.2 Overview of C2Before proceed<strong>in</strong>g with <strong>the</strong> architectural design of <strong>the</strong> application, we providea high-level overview of <strong>the</strong> C2 architectural style [Taylor et al. 1996], neededto understand this example. Section 5 conta<strong>in</strong>s a more detailed discussion of<strong>the</strong> style’s rules. C2 and its accompany<strong>in</strong>g ADL [Medvidovic, Oreizy et al. 1996;Medvidovic et al. 1999; Medvidovic, Taylor et al. 1996] are used for highly distributedsoftware systems. In a C2-style architecture, software connectors transmitmessages between components, while components ma<strong>in</strong>ta<strong>in</strong> state, performoperations, and exchange messages with o<strong>the</strong>r components via two <strong>in</strong>terfaces(named “top” and “bottom”). Each <strong>in</strong>terface consists of a set of messages thatACM Transactions on <strong>Software</strong> Eng<strong>in</strong>eer<strong>in</strong>g and Methodology, Vol. 11, No. 1, January 2002.


<strong>Model<strong>in</strong>g</strong> <strong>Software</strong> <strong>Architectures</strong> <strong>in</strong> UML • 15Fig. 7.A C2-style architecture for a meet<strong>in</strong>g scheduler system.may be sent and a set of messages that may be received. A component <strong>in</strong>terfacemay be attached to at most one connector. A connector may be attachedto any number of o<strong>the</strong>r components and connectors. Intercomponent messagesare ei<strong>the</strong>r requests for a component to perform an operation, or notificationsthat a given component has performed an operation or changed state. Requestmessages may only be sent “upward” through <strong>the</strong> architecture, and notificationmessages may only be sent “downward.”The C2 style fur<strong>the</strong>r demands that components communicate with each o<strong>the</strong>ronly through message-pass<strong>in</strong>g, never through shared memory. Also, C2 requiresthat notifications sent from a component correspond to its operations, ra<strong>the</strong>rthan <strong>the</strong> needs of any components that receive those notifications. This constra<strong>in</strong>ton notifications helps to ensure substrate <strong>in</strong>dependence, which is <strong>the</strong>ability to reuse a C2 component <strong>in</strong> architectures with differ<strong>in</strong>g substrate components(e.g., different GUI toolkits). The C2 style explicitly does not make anyassumptions about <strong>the</strong> language(s) <strong>in</strong> which <strong>the</strong> components or connectors areimplemented, whe<strong>the</strong>r or not components execute <strong>in</strong> <strong>the</strong>ir own threads of control,<strong>the</strong> deployment of components to hosts, or <strong>the</strong> communication protocol(s)used by connectors.4.3 <strong>Model<strong>in</strong>g</strong> <strong>the</strong> Meet<strong>in</strong>g Scheduler <strong>in</strong> C2This section presents a partial model of <strong>the</strong> meet<strong>in</strong>g scheduler application <strong>in</strong>C2 us<strong>in</strong>g its ADL. 1 The purpose of this model is to <strong>in</strong>troduce <strong>the</strong> reader to <strong>the</strong>nuances of architectural decomposition accord<strong>in</strong>g to <strong>the</strong> rules of C2, as wellas to serve as a basis for evaluat<strong>in</strong>g <strong>the</strong> correspond<strong>in</strong>g UML model, given <strong>in</strong>Section 4.4. Figure 7 shows a graphical depiction of a C2-style architecture for<strong>the</strong> meet<strong>in</strong>g scheduler system. The system consists of components support<strong>in</strong>g<strong>the</strong> functionality of a Meet<strong>in</strong>gInitiator and several potential meet<strong>in</strong>g Attendeesand ImportantAttendees. Three C2 connectors are used to route messagesamong <strong>the</strong> components. Certa<strong>in</strong> messages from <strong>the</strong> Meet<strong>in</strong>gInitiator are sentboth to Attendees and ImportantAttendees, while o<strong>the</strong>rs (e.g., to obta<strong>in</strong> meet<strong>in</strong>glocation preferences) are only routed to ImportantAttendees. S<strong>in</strong>ce a C2 componenthas only one communication port on its top and one on its bottom, and allmessage rout<strong>in</strong>g functionality is relegated to connectors, it is <strong>the</strong> responsibility1 A complete model of <strong>the</strong> application is given <strong>in</strong> Medvidovic and Rosenblum [1999].ACM Transactions on <strong>Software</strong> Eng<strong>in</strong>eer<strong>in</strong>g and Methodology, Vol. 11, No. 1, January 2002.


16 • N. Medvidovic et al.of Ma<strong>in</strong>Conn to ensure that AttConn and ImportantAttConn above it receiveonly those messages relevant to <strong>the</strong>ir respective attached components.The Meet<strong>in</strong>gInitiator component <strong>in</strong>itiates <strong>the</strong> computation by send<strong>in</strong>g requestsfor meet<strong>in</strong>g <strong>in</strong>formation to Attendees and ImportantAttendees. The twosets of components notify <strong>the</strong> Meet<strong>in</strong>gInitiator component, which attempts toschedule a meet<strong>in</strong>g and ei<strong>the</strong>r requests that each potential attendee mark it <strong>in</strong>his/her calendar (if <strong>the</strong> meet<strong>in</strong>g can be scheduled), or it sends o<strong>the</strong>r requests toattendees to extend <strong>the</strong> date range, remove a set of excluded dates, add preferreddates, or withdraw from <strong>the</strong> meet<strong>in</strong>g. Each Attendee and ImportantAttendeecomponent, <strong>in</strong> turn, notifies <strong>the</strong> Meet<strong>in</strong>gInitiator of its date, equipment, and locationpreferences, as well as excluded dates. Attendee and ImportantAttendeecomponents cannot make requests of <strong>the</strong> Meet<strong>in</strong>gInitiator component, s<strong>in</strong>ce<strong>the</strong>y are above it <strong>in</strong> <strong>the</strong> architecture.Most of this <strong>in</strong>formation is implicit <strong>in</strong> <strong>the</strong> graphical view of <strong>the</strong> architectureshown <strong>in</strong> Figure 7. For this reason, we specify <strong>the</strong> architecture <strong>in</strong> C2’stextual ADL [Medvidovic, Oreizy et al. 1996; Medvidovic, Taylor et al. 1996].For simplicity, we assume that all attendees’ equipment needs will be met, andthat a meet<strong>in</strong>g location will be available on <strong>the</strong> given date and that it will besatisfactory for all (or most) of <strong>the</strong> important attendees.The Meet<strong>in</strong>gInitiator component is specified below. The component only communicateswith o<strong>the</strong>r parts of <strong>the</strong> architecture through its top port. The requestsit sends to <strong>in</strong>itiate <strong>the</strong> computation <strong>in</strong> <strong>the</strong> system are specified <strong>in</strong> <strong>the</strong> startupsegment of its behavior. 2component Meet<strong>in</strong>gInitiator is<strong>in</strong>terfacetop doma<strong>in</strong> isoutGetPrefSet ();GetExclSet ();GetEquipReqts ();GetLocPrefs ();RemoveExclSet ();RequestWithdrawal (to Attendee);RequestWithdrawal (to ImportantAttendee);AddPrefDates ();MarkMtg (d : date; l:loctype);<strong>in</strong>PrefSet (p : date rng);ExclSet (e : date rng);EquipReqts (eq : equip type);LocPref (l : loc type);behaviorstartup always generate GetPrefSet, GetExclSet, GetEquipReqts,GetLocPrefs;2 Startup and cleanup are optional parts of a component’s specification that <strong>in</strong>dicate any specialprocess<strong>in</strong>g needed after <strong>the</strong> component is <strong>in</strong>stantiated and before it is removed from a system,respectively (see Medvidovic and Rosenblum [1999]). In an OO language, startup functionalityis typically provided as part of an object’s constructor, while proper cleanup is ensured by <strong>the</strong>destructor.ACM Transactions on <strong>Software</strong> Eng<strong>in</strong>eer<strong>in</strong>g and Methodology, Vol. 11, No. 1, January 2002.


<strong>Model<strong>in</strong>g</strong> <strong>Software</strong> <strong>Architectures</strong> <strong>in</strong> UML • 17received messages PrefSet may generate RemoveExclSet xorRequestWithdrawal xor MarkMtg;received messages ExclSet may generate AddPrefDatesxor RemoveExclSet xor RequestWithdrawal xor MarkMtg;received messages EquipReqts may generate AddPrefDates xorRemoveExclSet xor RequestWithdrawal xor MarkMtg;received messages LocPref always generate null;end Meet<strong>in</strong>gInitiator;The Attendee and ImportantAttendee components receive meet<strong>in</strong>g schedul<strong>in</strong>grequests from <strong>the</strong> Initiator and notify it of <strong>the</strong> appropriate <strong>in</strong>formation. Thetwo types of components only communicate with o<strong>the</strong>r parts of <strong>the</strong> architecturethrough <strong>the</strong>ir bottom ports.component Attendee is<strong>in</strong>terfacebottom doma<strong>in</strong> isoutPrefSet (p : date rng);ExclSet (e : date rng);EquipReqts (eq : equip type);<strong>in</strong>GetPrefSet ();GetExclSet ();GetEquipReqts ();RemoveExclSet ();RequestWithdrawal ();AddPrefDates ();MarkMtg (d : date; l:loctype);behaviorreceived messages GetPrefSet always generate PrefSet;received messages AddPrefDates always generate PrefSet;received messages GetExclSet always generate ExclSet;received messages GetEquipReqts always generate EquipReqts;received messages RemoveExclSet always generate ExclSet;received messages RequestWithdrawal always generate null;received messages MarkMtg always generate null;end Attendee;ImportantAttendee is a specialization of <strong>the</strong> Attendee component: It duplicatesall of Attendee’s functionality and adds specification of meet<strong>in</strong>g locationpreferences. ImportantAttendee is thus specified as a subtype of Attendee thatpreserves its <strong>in</strong>terface and behavior (though it can implement that behavior <strong>in</strong>a new manner).component ImportantAttendee is subtype Attendee (<strong>in</strong>t and beh)<strong>in</strong>terfacebottom doma<strong>in</strong> isoutLocPrefs (l : loc type);<strong>in</strong>GetLocPrefs ();behaviorreceived messages GetLocPrefs always generate LocPrefs;end ImportantAttendee;ACM Transactions on <strong>Software</strong> Eng<strong>in</strong>eer<strong>in</strong>g and Methodology, Vol. 11, No. 1, January 2002.


18 • N. Medvidovic et al.The Meet<strong>in</strong>gScheduler architecture depicted <strong>in</strong> Figure 7 is shown below. Thearchitecture is specified with <strong>the</strong> conceptual components (i.e., component types)def<strong>in</strong>ed above. Each conceptual component (e.g., Attendee) can be <strong>in</strong>stantiatedmultiple times <strong>in</strong> a system.architecture Meet<strong>in</strong>gScheduler isconceptual componentsAttendee; ImportantAttendee; Meet<strong>in</strong>gInitiator;connectorsconnector Ma<strong>in</strong>Conn is message filter no filter<strong>in</strong>g;connector AttConn is message filter no filter<strong>in</strong>g;connector ImportantAttConn is message filter no filter<strong>in</strong>g;architectural topologyconnector AttConn connectionstop ports Attendee;bottom ports Ma<strong>in</strong>Conn;connector ImportantAttConn connectionstop ports ImportantAttendee;bottom ports Ma<strong>in</strong>Conn;connector Ma<strong>in</strong>Conn connectionstop ports AttConn; ImportantAttConn;bottom ports Meet<strong>in</strong>gInitiator;end Meet<strong>in</strong>gScheduler;An <strong>in</strong>stance of <strong>the</strong> architecture (a system) is specified by <strong>in</strong>stantiat<strong>in</strong>g <strong>the</strong>components. For example, an <strong>in</strong>stance of <strong>the</strong> meet<strong>in</strong>g scheduler applicationwith three participants and two important participants is specified as follows:system Meet<strong>in</strong>gScheduler 1 isarchitecture Meet<strong>in</strong>gScheduler withAttendee <strong>in</strong>stance Att 1, Att 2, Att 3;ImportantAttendee <strong>in</strong>stance ImpAtt 1, ImpAtt 2;Meet<strong>in</strong>gInitiator <strong>in</strong>stance MtgInit 1;end Meet<strong>in</strong>gScheduler 1;4.4 <strong>Model<strong>in</strong>g</strong> <strong>the</strong> C2-Style Meet<strong>in</strong>g Scheduler <strong>in</strong> UMLUML provides constructs for model<strong>in</strong>g software components, <strong>the</strong>ir <strong>in</strong>terfaces,and <strong>the</strong>ir deployment on hosts. 3 However, <strong>the</strong>se built-<strong>in</strong> constructs are not suitablefor describ<strong>in</strong>g architecture-level components because <strong>the</strong>y assume both toomuch and too little. Components <strong>in</strong> UML are assumed to be concrete, executableartifacts that consume mach<strong>in</strong>e resources such as memory. In contrast, architecturalcomponents are conceptual artifacts that decompose <strong>the</strong> system’s stateand behavior. Although <strong>in</strong>stances of architectural components <strong>in</strong> a given systemmay be implemented by concrete UML component <strong>in</strong>stances, <strong>the</strong> architecturalcomponents are not <strong>the</strong>mselves concrete. Fur<strong>the</strong>rmore, components <strong>in</strong> UMLmay have any number of <strong>in</strong>terfaces and any <strong>in</strong>ternal structure, whereas architecturalcomponents must satisfy <strong>the</strong> rules or constra<strong>in</strong>ts imposed on <strong>the</strong>m3 Unless o<strong>the</strong>rwise noted, “component” <strong>in</strong> this discussion refers to a component type, as opposed toa specific <strong>in</strong>stance of that type. This is <strong>the</strong> case with both architectural components (modeled <strong>in</strong> anADL) and UML components.ACM Transactions on <strong>Software</strong> Eng<strong>in</strong>eer<strong>in</strong>g and Methodology, Vol. 11, No. 1, January 2002.


<strong>Model<strong>in</strong>g</strong> <strong>Software</strong> <strong>Architectures</strong> <strong>in</strong> UML • 19Fig. 8. UML class diagram for <strong>the</strong> meet<strong>in</strong>g scheduler application. Details (attributes and operations)of each <strong>in</strong>dividual class have been elided for clarity.(e.g., by an architectural style such as C2). For <strong>the</strong>se reasons, we have chosen<strong>in</strong>stead to use UML classes to model architectural components.The key to this strategy for relat<strong>in</strong>g UML and an ADL is ensur<strong>in</strong>g that <strong>the</strong>design of an application <strong>in</strong> UML be driven and constra<strong>in</strong>ed both by <strong>the</strong> model<strong>in</strong>gfeatures available <strong>in</strong> UML and <strong>the</strong> constra<strong>in</strong>ts imposed by <strong>the</strong> ADL (andpossibly its underly<strong>in</strong>g architectural style rules). The two must be consideredsimultaneously. For this reason, <strong>the</strong> <strong>in</strong>itial steps <strong>in</strong> this process are to develop(1) a doma<strong>in</strong> model for <strong>the</strong> application expressed <strong>in</strong> UML and (2) an <strong>in</strong>formalarchitectural diagram, such as <strong>the</strong> C2 diagram from Figure 7. The architecturaldiagram is key to mak<strong>in</strong>g <strong>the</strong> appropriate mapp<strong>in</strong>gs between classes <strong>in</strong><strong>the</strong> doma<strong>in</strong> model and components <strong>in</strong> <strong>the</strong> architectural diagram. This step issimilar to relat<strong>in</strong>g doma<strong>in</strong> models and reference architectures <strong>in</strong> <strong>the</strong> doma<strong>in</strong>specificsoftware architecture (DSSA) process [Tracz 1995]. One effect of <strong>the</strong>mapp<strong>in</strong>g is that it directly po<strong>in</strong>ts to <strong>the</strong> need to explicitly model architecturalconstructs that commonly are not found <strong>in</strong> UML designs, such as <strong>the</strong> connectorsand component message <strong>in</strong>terfaces found <strong>in</strong> a C2-style architecture.Our <strong>in</strong>itial attempt at a UML doma<strong>in</strong> model for <strong>the</strong> meet<strong>in</strong>g scheduler applicationis shown <strong>in</strong> <strong>the</strong> class diagram <strong>in</strong> Figure 8. The diagram depicts <strong>the</strong>doma<strong>in</strong> classes, <strong>the</strong>ir <strong>in</strong>heritance relationships, and <strong>the</strong>ir associations. Apartfrom limit<strong>in</strong>g Meet<strong>in</strong>gInitiator to a s<strong>in</strong>gle <strong>in</strong>stance and specify<strong>in</strong>g possible card<strong>in</strong>alitiesof <strong>the</strong> o<strong>the</strong>r components, <strong>the</strong> diagram abstracts away many architecturaldetails, such as <strong>the</strong> mapp<strong>in</strong>g of classes <strong>in</strong> <strong>the</strong> doma<strong>in</strong> to implementationcomponents, <strong>the</strong> order of <strong>in</strong>teractions among <strong>the</strong> different classes, and so forth.Fur<strong>the</strong>rmore, much of <strong>the</strong> semantics of class <strong>in</strong>teraction is miss<strong>in</strong>g from <strong>the</strong> diagram.For example, <strong>the</strong> association Invites associates two Meet<strong>in</strong>gs with oneor more Attendees and one Meet<strong>in</strong>gInitiator. However, <strong>the</strong> association does notmake clear <strong>the</strong> fact that <strong>the</strong> two Meet<strong>in</strong>gs are <strong>in</strong>tended to represent a range ofpossible meet<strong>in</strong>g dates, ra<strong>the</strong>r than a pair of related meet<strong>in</strong>gs.Message <strong>in</strong>terfaces are prom<strong>in</strong>ent elements of C2-style components (recallSection 4.3). This is reflected <strong>in</strong> a UML design by model<strong>in</strong>g <strong>in</strong>terfaces (i.e.,ACM Transactions on <strong>Software</strong> Eng<strong>in</strong>eer<strong>in</strong>g and Methodology, Vol. 11, No. 1, January 2002.


20 • N. Medvidovic et al.Fig. 9.Meet<strong>in</strong>g scheduler class <strong>in</strong>terfaces.Fig. 10.Application-specific UML classes represent<strong>in</strong>g C2 connectors.class icons stereotyped with ) explicitly and <strong>in</strong>dependently of<strong>the</strong> classes that will implement those <strong>in</strong>terfaces. Each class correspond<strong>in</strong>g toa component exports one or more of <strong>the</strong> <strong>in</strong>terfaces shown <strong>in</strong> Figure 9. The<strong>in</strong>terfaces ImportantMtgInit and ImportantMtgAttend <strong>in</strong>herit from <strong>the</strong> <strong>in</strong>terfacesMtgInit and MtgAttend, respectively. The only difference is <strong>the</strong> addedoperation to request and notify of location preferences. Note that every methodsignature (i.e., UML operation) <strong>in</strong> Figure 9 corresponds to a C2 message <strong>in</strong> <strong>the</strong>architecture specified <strong>in</strong> Section 4.3. All operations <strong>in</strong> <strong>the</strong> UML model will beimplemented as asynchronous message passes, as <strong>the</strong>y would <strong>in</strong> C2. For thisreason, <strong>the</strong> method signatures <strong>in</strong> Figure 9 lack return types.In order to model a C2 architecture <strong>in</strong> UML, connectors must be def<strong>in</strong>ed.Although connectors fulfill a role different from components, <strong>the</strong>y can be modeledalso with UML classes. However, a C2 connector is by def<strong>in</strong>ition genericand can accommodate connections to any number and type of C2 components;<strong>in</strong>formally, <strong>the</strong> <strong>in</strong>terface of a C2 connector is a union of <strong>the</strong> <strong>in</strong>terfaces of itsattached components. Fur<strong>the</strong>rmore, C2 connectors <strong>in</strong>herently support broadcastof messages to all <strong>the</strong> recepient components, <strong>in</strong> which case each componentdecides whe<strong>the</strong>r it is <strong>in</strong>terested <strong>in</strong> a given message. UML does not supportthis form of genericity; <strong>in</strong>stead, <strong>the</strong> connectors specified <strong>in</strong> UML must beapplication-specific, have fixed <strong>in</strong>terfaces, and support message unicast. To reflect<strong>the</strong> generic nature of C2 connectors, <strong>the</strong> connector classes for <strong>the</strong> meet<strong>in</strong>gscheduler application realize <strong>the</strong> same <strong>in</strong>terfaces as <strong>the</strong> components <strong>the</strong>y connect.Each connector can be thought of as a simple class that (possibly filtersand) forwards <strong>the</strong> messages it receives to <strong>the</strong> appropriate components. Therefore,while <strong>the</strong> component class <strong>in</strong>terface specifications, shown <strong>in</strong> Figure 9,correspond to <strong>the</strong> different C2 components’ outgo<strong>in</strong>g messages (i.e., <strong>the</strong>ir providedfunctionality), <strong>the</strong> connector <strong>in</strong>terfaces are routers of both <strong>the</strong> <strong>in</strong>com<strong>in</strong>gand outgo<strong>in</strong>g messages, as depicted <strong>in</strong> Figure 10. Connectors do not add anyACM Transactions on <strong>Software</strong> Eng<strong>in</strong>eer<strong>in</strong>g and Methodology, Vol. 11, No. 1, January 2002.


<strong>Model<strong>in</strong>g</strong> <strong>Software</strong> <strong>Architectures</strong> <strong>in</strong> UML • 21Fig. 11.style.UML class diagram for <strong>the</strong> meet<strong>in</strong>g scheduler application designed <strong>in</strong> <strong>the</strong> C2 architecturalfunctionality at <strong>the</strong> doma<strong>in</strong> model level; <strong>the</strong>y are thus absent from <strong>the</strong> classdiagram <strong>in</strong> Figure 8.A ref<strong>in</strong>ed class diagram for <strong>the</strong> meet<strong>in</strong>g scheduler application is shown <strong>in</strong>Figure 11, which depicts primarily <strong>the</strong> <strong>in</strong>terface relationships between <strong>the</strong>classes. In particular, each solid arc from a class to a circle labeled with an<strong>in</strong>terface name is a “lollipop” depict<strong>in</strong>g <strong>the</strong> realization of <strong>the</strong> <strong>in</strong>terface by <strong>the</strong>class, while each dashed arrow from a class to a lollipop depicts a dependency<strong>the</strong> class has on <strong>the</strong> <strong>in</strong>terface. The classes Attendee and ImportantAttendeeare related by <strong>in</strong>terface <strong>in</strong>heritance, which is depicted <strong>in</strong> Figure 9, but is onlyimplicit <strong>in</strong> Figure 11. We have omitted from Figure 11 <strong>the</strong> classes Location,Meet<strong>in</strong>g, and Date shown <strong>in</strong> Figure 8, s<strong>in</strong>ce <strong>the</strong>y represent <strong>the</strong> data exchangedby <strong>the</strong> components <strong>in</strong> <strong>the</strong> system and have not been impacted. We have alsoomitted <strong>the</strong> two superclasses for <strong>the</strong> components and connectors (Person andConn, respectively).The class diagram <strong>in</strong> Figure 11 has been deliberately structured to highlightits similarity with <strong>the</strong> C2 architecture depicted <strong>in</strong> Figure 7. One differenceis that <strong>the</strong> diagram <strong>in</strong> Figure 7 depicts <strong>in</strong>stances of <strong>the</strong> different componentsand connectors, while a UML class diagram depicts classes (i.e., types) and<strong>the</strong>ir associations (with multiplicities used to convey <strong>in</strong>formation about <strong>the</strong>number of possible <strong>in</strong>stances); <strong>in</strong> o<strong>the</strong>r words, <strong>the</strong> class diagram represents <strong>the</strong>possible relationships among <strong>in</strong>stances of <strong>the</strong> depicted classes. Fur<strong>the</strong>rmore,be<strong>in</strong>g a class diagram, it does not formally capture <strong>the</strong> topological constra<strong>in</strong>tsimplied by its layout. To both depict class <strong>in</strong>stances and more accurately conveytopological <strong>in</strong>tent, we use a collaboration diagram.Figure 12 depicts a collaboration between an <strong>in</strong>stance of <strong>the</strong> Meet<strong>in</strong>gInitiatorclass (MI) and <strong>in</strong>stances of Attendee and ImportantAttendee classes(with <strong>the</strong> collaboration represented by <strong>the</strong> numbered sequence of operationACM Transactions on <strong>Software</strong> Eng<strong>in</strong>eer<strong>in</strong>g and Methodology, Vol. 11, No. 1, January 2002.


22 • N. Medvidovic et al.Fig. 12. Collaboration diagram for <strong>the</strong> meet<strong>in</strong>g scheduler application show<strong>in</strong>g a response to arequest issued by <strong>the</strong> Meet<strong>in</strong>gInitiator to both Attendees and ImportantAttendees.<strong>in</strong>vocations). In particular, MI issues a request for a set of preferred meet<strong>in</strong>gdates; MC, an <strong>in</strong>stance of <strong>the</strong> Ma<strong>in</strong>Conn class, routes <strong>the</strong> request to <strong>in</strong>stances ofboth connectors above it, AC and IAC, which, <strong>in</strong> turn, route <strong>the</strong> requests to allcomponents attached on <strong>the</strong>ir top sides; each participant component choosesa preferred date and notifies any components below it of that choice; <strong>the</strong>senotification messages will eventually be routed to MI via <strong>the</strong> connectors. Notethat, if MI had sent <strong>the</strong> request to get meet<strong>in</strong>g location preferences (GetLocPrefs<strong>in</strong> <strong>the</strong> ImportantMtgInit <strong>in</strong>terface <strong>in</strong> Figure 9), MC would have routed it onlyto IAC and none of <strong>the</strong> <strong>in</strong>stances of <strong>the</strong> Attendee class would have receivedthat request.The above diagrams, and particularly Figure 11, differ from a C2 architecture<strong>in</strong> that <strong>the</strong>y explicitly specify only <strong>the</strong> messages a component receives (via<strong>in</strong>terface attachments to <strong>the</strong> class icon for a component). On <strong>the</strong> o<strong>the</strong>r hand, amodel of a C2-style architecture also specifies <strong>the</strong> messages sent by components,as well as structural and behavioral aspects of <strong>the</strong> architecture. The issue ofarchitectural structure and behavior is fur<strong>the</strong>r discussed below.4.5 DiscussionWe base our assessment of UML’s suitability for model<strong>in</strong>g software architecturesus<strong>in</strong>g this first strategy on <strong>the</strong> evaluation requirements <strong>in</strong>troduced <strong>in</strong>Section 1. The exercise described above demonstrated that, to a large extent,we can successfully model a C2-style architecture <strong>in</strong> UML. Part of <strong>the</strong> successcan be attributed to <strong>the</strong> fact that, as anticipated, many architectural conceptsare found <strong>in</strong> UML (e.g., <strong>in</strong>terfaces, components, component associations, andso forth). The same basic strategy can be used to model <strong>the</strong> structure of architecturesthat adhere to o<strong>the</strong>r styles and/or are modeled with o<strong>the</strong>r ADLs,e.g., ACME [Garlan et al. 1997], Darw<strong>in</strong> [Magee and Kramer 1996], or UniCon[Shaw, Del<strong>in</strong>e et al. 1995].It must be noted, however, that <strong>the</strong> model<strong>in</strong>g capabilities provided by UML“as is” do not fully satisfy <strong>the</strong> structural needs of architectural descriptionfor two key reasons. First, UML does not provide specialized constructs formodel<strong>in</strong>g architectural artifacts. For example, although <strong>the</strong>y are differentACM Transactions on <strong>Software</strong> Eng<strong>in</strong>eer<strong>in</strong>g and Methodology, Vol. 11, No. 1, January 2002.


<strong>Model<strong>in</strong>g</strong> <strong>Software</strong> <strong>Architectures</strong> <strong>in</strong> UML • 23architectural entities with very different responsibilities, connectors and componentsmust be modeled <strong>in</strong> UML us<strong>in</strong>g <strong>the</strong> same mechanism. Second, <strong>the</strong> rulesof a given architectural style are directly reflected <strong>in</strong> its correspond<strong>in</strong>g ADL andma<strong>in</strong>ta<strong>in</strong>ed by <strong>the</strong> accompany<strong>in</strong>g toolset, whereas those rules must be appliedmentally by <strong>the</strong> software architect who chooses to use UML. “Emulat<strong>in</strong>g” particularstructural constra<strong>in</strong>ts <strong>in</strong> UML, as was done <strong>in</strong> <strong>the</strong> example <strong>in</strong> Section4.4, is an error-prone approach. Fur<strong>the</strong>rmore, additional documentation mustaccompany such a UML model to ensure that no future modifications violate<strong>the</strong> desired constra<strong>in</strong>ts.Note that <strong>the</strong> purpose of this work is a general assessment of <strong>the</strong> ability ofUML “as is” to model software architectures. In order to more thoroughly evaluateUML <strong>in</strong> this regard and po<strong>in</strong>t out all of its strengths and shortcom<strong>in</strong>gs,one could extend <strong>the</strong> approach discussed above by represent<strong>in</strong>g <strong>the</strong> major structuralADL features us<strong>in</strong>g additional UML diagrams (e.g., package diagrams),as <strong>in</strong> [Garlan and Kompanek 2000]. While <strong>the</strong> specific details of such an evaluationare likely to vary from one chosen representation to ano<strong>the</strong>r, <strong>the</strong> twomajor shortcom<strong>in</strong>gs of UML discussed above will rema<strong>in</strong>.In addition to structural aspects of an architecture, a number of ADLs (e.g.,Rapide [Luckham and Vera 1995] and Wright [Allen and Garlan 1994; Allenand Garlan 1997]) also provide constructs for model<strong>in</strong>g <strong>the</strong> dynamic componentbehavior and <strong>in</strong>teractions <strong>in</strong> <strong>the</strong> architecture. UML’s features, such as sequence,collaboration, and statechart diagrams, can be used effectively to this end (seeSection 5). As with <strong>the</strong> structural constructs, however, it may be difficult toensure that <strong>the</strong> <strong>in</strong>tended behaviors or <strong>in</strong>teractions, as <strong>the</strong>y would be specified<strong>in</strong> an ADL (e.g., <strong>in</strong> Wright’s communicat<strong>in</strong>g sequential processes, or CSP[Hoare 1985]), are correctly modeled <strong>in</strong> UML (e.g., us<strong>in</strong>g statecharts). These potentialdifficulties motivate our exploration of <strong>the</strong> second strategy <strong>in</strong>troduced<strong>in</strong> Section 3.2.5. STRATEGY 2: CONSTRAINING UML TO MODEL SOFTWAREARCHITECTURESThe second strategy for model<strong>in</strong>g architectures <strong>in</strong> UML <strong>in</strong>volves us<strong>in</strong>g OCL tospecify additional constra<strong>in</strong>ts on exist<strong>in</strong>g meta classes of UML’s meta model. Inpr<strong>in</strong>ciple, this allows <strong>the</strong> use of exist<strong>in</strong>g UML-compliant tools to represent andanalyze <strong>the</strong> desired architectural models, and ensure architectural constra<strong>in</strong>ts.This strategy <strong>in</strong>volves—select<strong>in</strong>g one or more exist<strong>in</strong>g meta classes from <strong>the</strong> UML meta model <strong>in</strong>which to situate a given ADL model<strong>in</strong>g construct or capability, and—def<strong>in</strong><strong>in</strong>g a stereotype that can be applied to <strong>in</strong>stances of those meta classes<strong>in</strong> order to constra<strong>in</strong> <strong>the</strong>ir semantics to that of <strong>the</strong> associated ADL feature.This strategy treats UML as a core notation that is extended <strong>in</strong> order tosupport specific architectural concerns. Note that this notion of extension isdifferent from <strong>the</strong> one discussed <strong>in</strong> Section 3.3 and depicted <strong>in</strong> Figure 6: UML isconceptually extended to provide architects with additional model<strong>in</strong>g tools thatorig<strong>in</strong>ally did not exist <strong>in</strong> UML; however, <strong>the</strong> UML meta model rema<strong>in</strong>s <strong>in</strong>tactACM Transactions on <strong>Software</strong> Eng<strong>in</strong>eer<strong>in</strong>g and Methodology, Vol. 11, No. 1, January 2002.


24 • N. Medvidovic et al.and <strong>the</strong> OCL facilities are actually used to constra<strong>in</strong> <strong>the</strong> notation to a specificUML-compliant subset. As new concerns arise <strong>in</strong> development, new extensionsmay be added to support those concerns. The semantics of <strong>the</strong> core notation arealways enforced by UML-compliant tools. The semantics of each extension areenforced by <strong>the</strong> constra<strong>in</strong>ts of that extension. Dependencies and conflicts mayarise between different extensions and must be handled by developers just as<strong>the</strong>y manage o<strong>the</strong>r development dependencies and conflicts. This situation isnot ideal, but it is practical: It uses available methods and tools that are well<strong>in</strong>tegrated <strong>in</strong>to day-to-day development, and it is <strong>in</strong>cremental. We feel that<strong>the</strong>se features are key to br<strong>in</strong>g<strong>in</strong>g <strong>the</strong> benefits of architectural model<strong>in</strong>g <strong>in</strong>toma<strong>in</strong>stream use.We demonstrate this approach by provid<strong>in</strong>g examples of UML extensionsfor three ADLs: C2, Wright, and Rapide. We selected <strong>the</strong>se languages becauseour extensive study of ADLs [Medvidovic and Taylor 2000] <strong>in</strong>dicates that <strong>the</strong>yconstitute a broadly representative set of capabilities found <strong>in</strong> current ADLs:—C2 provides guidance for structural decomposition and event-based <strong>in</strong>teractionaccord<strong>in</strong>g to a particular but fairly general architectural style;—Wright enables behavioral and <strong>in</strong>teraction model<strong>in</strong>g of <strong>in</strong>dividual architecturalelements; and—Rapide supports specification of local and global behavioral constra<strong>in</strong>ts.The extensions based on <strong>the</strong>se ADLs allow a broad assessment of UML’s suitabilityfor architecture model<strong>in</strong>g. Fur<strong>the</strong>rmore, <strong>the</strong>y provide several <strong>in</strong>sightsthat could <strong>in</strong>form <strong>the</strong> design of a UML profile for architectural model<strong>in</strong>g. Eachof <strong>the</strong> three extensions is discussed <strong>in</strong> more detail below and evaluated withrespect to <strong>the</strong> requirements established <strong>in</strong> Section 1.5.1 Extensions Based on C2The basic elements of <strong>the</strong> C2 style and its accompany<strong>in</strong>g ADL were discussed<strong>in</strong> Section 4. The ADL is tightly tied to <strong>the</strong> C2 style; its syntax and semanticsdirectly derive from <strong>the</strong> style. In this section we fur<strong>the</strong>r elaborate on <strong>the</strong>C2 ADL’s elements and model <strong>the</strong>ir semantics <strong>in</strong> UML via stereotypes. 4 Thekey elements of a C2 architectural description are components, connectors, and<strong>the</strong>ir architectures. Components and connectors <strong>in</strong>teract by exchang<strong>in</strong>g messages(also referred to as events); a message received by a component typicallyresults <strong>in</strong> one or more outgo<strong>in</strong>g messages. The style constra<strong>in</strong>ts thatdeterm<strong>in</strong>e legal architectural topologies were <strong>in</strong>formally discussed <strong>in</strong> Section4.2 and will be formally specified below. Note that <strong>the</strong> ADL also allows simplecausal relationships to be specified between <strong>in</strong>com<strong>in</strong>g and outgo<strong>in</strong>g messages<strong>in</strong> a component. However, we have chosen not to model this aspect of<strong>the</strong> ADL; <strong>in</strong>stead, we po<strong>in</strong>t <strong>the</strong> reader to Section 5.3, where a much more expressivemechanism for model<strong>in</strong>g event causality is discussed and represented<strong>in</strong> UML.4 In this section we present a representative sample of <strong>the</strong> stereotypes we have def<strong>in</strong>ed for C2. Fora full specification, see Robb<strong>in</strong>s et al. [1998].ACM Transactions on <strong>Software</strong> Eng<strong>in</strong>eer<strong>in</strong>g and Methodology, Vol. 11, No. 1, January 2002.


<strong>Model<strong>in</strong>g</strong> <strong>Software</strong> <strong>Architectures</strong> <strong>in</strong> UML • 255.1.1 C2 Messages <strong>in</strong> UML. The UML meta class Operation matches <strong>the</strong>C2 concept of a message specification. A UML operation consists of a name, aparameter list, and an optional return value. Operations may be public, private,or protected. To model C2 message specifications, we add a tag to differentiatenotifications from requests and to constra<strong>in</strong> Operation to have no return values.C2 messages are all public, but that property is built <strong>in</strong>to <strong>the</strong> UML meta classInterface, used <strong>in</strong> <strong>the</strong> def<strong>in</strong>ition of stereotype C2Interface below.Stereotype C2Operation for <strong>in</strong>stances of meta class Operation--1-- C2Operations are tagged as ei<strong>the</strong>r notifications or requests.c2MsgType : enum { notification, request }--2-- C2Operations are tagged as ei<strong>the</strong>r <strong>in</strong>com<strong>in</strong>g or outgo<strong>in</strong>g.c2MsgDir : enum { <strong>in</strong>, out }--3-- C2 messages do not have return values.self.parameter->forAll(p | p.k<strong>in</strong>d return)This stereotype is <strong>in</strong>tended for application to operations (which are def<strong>in</strong>edwith<strong>in</strong> classes and <strong>in</strong>terfaces). The stereotype conta<strong>in</strong>s both tagged values(c2MsgType and c2MsgDir) and a universally quantified constra<strong>in</strong>t on <strong>the</strong> parametersof <strong>the</strong> stereotyped operation (<strong>in</strong> particular, on <strong>the</strong> attribute k<strong>in</strong>d def<strong>in</strong>edfor meta class Parameter <strong>in</strong> <strong>the</strong> meta model, as shown <strong>in</strong> Figure 4).5.1.2 C2 Components <strong>in</strong> UML. The UML meta class Class is closest to C2’snotion of component. 5 Classes may provide multiple <strong>in</strong>terfaces with operations,may own <strong>in</strong>ternal parts, and may participate <strong>in</strong> associations with o<strong>the</strong>r classes.However, <strong>the</strong>re are aspects of Class that are not appropriate, namely, that aclass may have methods and attributes. In UML, an operation is a specificationof a procedural abstraction (i.e., a procedure signature with optional pre- andpost-conditions), while a method is a procedure body. Components <strong>in</strong> C2 provideonly operations, not methods, and those operations must be part of <strong>in</strong>terfacesprovided by <strong>the</strong> component, not directly part of <strong>the</strong> component.Stereotype C2Interface for <strong>in</strong>stances of meta class Interface--1-- A C2Interface has a tagged value identify<strong>in</strong>g its position.c2pos : enum { top, bottom }5 O<strong>the</strong>r researchers have explored us<strong>in</strong>g different UML constructs to model components. For example,Hofmeister et al. [2000] used UML Classes to model simple components (i.e., modules) andUML Packages to model composite components (i.e., subsystems), while Garlan and Kompanek[2000] explored <strong>the</strong> possibility of model<strong>in</strong>g components us<strong>in</strong>g several additional UML elements(see Section 6). We believe that no s<strong>in</strong>gle selection of UML constructs will be sufficient to fulfill everyone’sarchitecture needs. Fur<strong>the</strong>rmore, multiple options may be pursued even <strong>in</strong> a s<strong>in</strong>gle project.Although it may be possible to model C2 components with, say, UML packages <strong>in</strong>stead of classes,such an exercise is outside <strong>the</strong> scope of this paper.ACM Transactions on <strong>Software</strong> Eng<strong>in</strong>eer<strong>in</strong>g and Methodology, Vol. 11, No. 1, January 2002.


<strong>Model<strong>in</strong>g</strong> <strong>Software</strong> <strong>Architectures</strong> <strong>in</strong> UML • 27--2-- One end of <strong>the</strong> attachment must be a s<strong>in</strong>gle C2Component.let ends = self.associationEnd <strong>in</strong>ends[1].multiplicity.m<strong>in</strong> = 1 and ends[1].multiplicity.max = 1 andends[1].class.stereotype = C2Component--3-- The o<strong>the</strong>r end of <strong>the</strong> attachment must be a s<strong>in</strong>gle C2Connector.let ends = self.associationEnd <strong>in</strong>ends[2].multiplicity.m<strong>in</strong> = 1 and ends[2].multiplicity.max = 1 andends[2].class.stereotype = C2ConnectorStereotype C2AttachUnderComp for <strong>in</strong>stances of meta class Association.Same as C2AttachOverComp, but with <strong>the</strong> order reversed.Stereotype C2AttachConnConn for <strong>in</strong>stances of meta class Association--1-- C2 attachments are b<strong>in</strong>ary associations.self.associationEnd->size = 2--2-- Each end of <strong>the</strong> association must be on a C2 connector.self.associationEnd->forAll(ae |ae.multiplicity.m<strong>in</strong> = 1 and ae.multiplicity.max = 1 andae.class.stereotype = C2Connector)--3-- The two ends are not <strong>the</strong> same C2Connector.self.associationEnd[1].class self.associationEnd[2].classStereotype C2Connector for <strong>in</strong>stances of meta class Class--1 through 3-- Same as constra<strong>in</strong>ts 1–3 on C2Component.--4-- Each C2 connector has exactly one <strong>in</strong>stance <strong>in</strong> <strong>the</strong> runn<strong>in</strong>g system.self.allInstances->size = 1--5-- The top <strong>in</strong>terface of a connector is determ<strong>in</strong>ed by <strong>the</strong> components and-- connectors attached to its bottom.let topInt = self.<strong>in</strong>terface -> select(i | i.c2pos = top) <strong>in</strong>let downAttach = self.associationEnd.association -> select(a |a.associationEnd[2] = self) <strong>in</strong>let topsIntsBelow = downAttach.associationEnd[1].<strong>in</strong>terface->select(i|i.c2pos = top) <strong>in</strong> topsIntsBelow.operation->asSet =topInt.operation->asSet--6-- The bottom <strong>in</strong>terface of a connector is determ<strong>in</strong>ed by <strong>the</strong> components and-- connectors attached to its top. This is similar to <strong>the</strong> constra<strong>in</strong>t above.The above stereotypes use <strong>the</strong> attribute multiplicity of association ends.Note that because <strong>the</strong> meta-level association between an Association and anAssociationEnd is ordered, <strong>the</strong> associationEnd role evaluates to a sequence(which is <strong>in</strong>dexable) ra<strong>the</strong>r than to a set. While UML places no semantic significanceon this order<strong>in</strong>g, and while modelers usually do not concern <strong>the</strong>mselvesACM Transactions on <strong>Software</strong> Eng<strong>in</strong>eer<strong>in</strong>g and Methodology, Vol. 11, No. 1, January 2002.


28 • N. Medvidovic et al.with <strong>the</strong> underly<strong>in</strong>g order of an association, we never<strong>the</strong>less found it necessaryto exploit this order<strong>in</strong>g to encode topological <strong>in</strong>formation about <strong>the</strong> architecture.As will be seen later, this requires <strong>the</strong> architect to use a particular diagrammaticconvention allowed by UML to ensure that <strong>the</strong> required order is ma<strong>in</strong>ta<strong>in</strong>ed.This may seem somewhat <strong>in</strong>elegant; however, <strong>the</strong> only alternative we could conceiveis to encode such topological <strong>in</strong>formation <strong>in</strong> additional tagged values <strong>in</strong><strong>the</strong> relevant stereotypes. We have opted aga<strong>in</strong>st this second alternative (add<strong>in</strong>gtagged values) because it would complicate <strong>the</strong> model, while, at <strong>the</strong> same time,still requir<strong>in</strong>g <strong>the</strong> architect to explicitly select appropriate values for <strong>the</strong> tags.Note also that it is possible to specify constra<strong>in</strong>ts <strong>in</strong> terms of <strong>the</strong> stereotypesassociated with a model element. This is done above <strong>in</strong> <strong>the</strong> C2Attach stereotypes,as well as below <strong>in</strong> <strong>the</strong> C2Architecture stereotype, to ensure that <strong>the</strong> C2stereotypes are used consistently and completely when def<strong>in</strong><strong>in</strong>g <strong>the</strong> topology ofa C2 architecture.5.1.4 C2 <strong>Architectures</strong> <strong>in</strong> UML. We now turn our attention to <strong>the</strong> overallcomposition of components and connectors <strong>in</strong> <strong>the</strong> architecture of a system. Recallfrom Section 4.2 that well-formed C2 architectures consist of componentsand connectors, components may be attached to one connector on <strong>the</strong> top andone on <strong>the</strong> bottom, and <strong>the</strong> top (bottom) of a connector may be attached to anynumber of o<strong>the</strong>r connectors’ bottoms (tops). Below, we also add two new rulesthat guard aga<strong>in</strong>st degenerate cases (constra<strong>in</strong>ts 7 and 8).Stereotype C2Architecture for <strong>in</strong>stances of meta class Model--1-- The classes <strong>in</strong> a C2Architecture must all be C2 model elements.self.modelElement->select(me | me.oclIsK<strong>in</strong>dOf(Class))->forAll(c |c.stereotype = C2Component orc.stereotype = C2Connector)--2-- The associations <strong>in</strong> a C2Architecture must all be C2 model elements.self.modelElement->select(me | me.oclIsK<strong>in</strong>dOf(Association))->forAll(a | a.stereotype = C2AttachOverComp ora.stereotype = C2AttachUnderComp ora.stereotype = C2AttachConnConn)--3-- Each C2Component has at most one C2AttachOverComp.let comps = self.modelElement->select(me |me.stereotype = C2Component) <strong>in</strong>comps->forAll(c | c.associationEnd.association->select(a |a.stereotype = C2AttachOverComp)->size select(me |me.stereotype = C2Connector) <strong>in</strong>ACM Transactions on <strong>Software</strong> Eng<strong>in</strong>eer<strong>in</strong>g and Methodology, Vol. 11, No. 1, January 2002.


<strong>Model<strong>in</strong>g</strong> <strong>Software</strong> <strong>Architectures</strong> <strong>in</strong> UML • 29conns.associationEnd.association->forAll(a |a.stereotype = C2AttachOverComp ora.stereotype = C2AttachUnderComp ora.stereotype = C2AttachConnConn)--6-- C2Components do not participate <strong>in</strong> any non-C2 associations. Similar to-- <strong>the</strong> constra<strong>in</strong>t above, but without <strong>the</strong> third disjunct.--7-- Each C2Connector must be attached to some connector or component.let conns = self.modelElement->select(e |e.stereotype = C2Connector) <strong>in</strong>conns->forAll(c | c.associationEnd->size > 0)--8-- Each C2Component must be attached to some connector. Similar to <strong>the</strong>-- constra<strong>in</strong>t above.The operation oclIsK<strong>in</strong>dOf used <strong>in</strong> <strong>the</strong> above stereotypes is a predicate on<strong>the</strong> meta model class of <strong>the</strong> associated model <strong>in</strong>stance. It evaluates to true if <strong>the</strong><strong>in</strong>stance belongs to <strong>the</strong> specified class or one of its subclasses. This operationis used <strong>in</strong> situations where a class of <strong>in</strong>terest <strong>in</strong> <strong>the</strong> meta model is a subclassof some superclass that is directly accessible with<strong>in</strong> <strong>the</strong> enclos<strong>in</strong>g expression.This is <strong>the</strong> situation with Class and Association, which are two of <strong>the</strong> manysubclasses of ModelElement (recall Figure 4); <strong>in</strong> turn, ModelElement is directlyassociated with <strong>the</strong> class Model to which <strong>the</strong> stereotype applies.5.1.5 Discussion of C2 Extensions. Constra<strong>in</strong><strong>in</strong>g UML to enforce <strong>the</strong> rulesof <strong>the</strong> C2 style has been fairly straightforward, because many (mostly structural)C2 concepts are found <strong>in</strong> UML. Nei<strong>the</strong>r C2 nor UML constra<strong>in</strong> <strong>the</strong> choiceof implementation language or require that any two components be implemented<strong>in</strong> <strong>the</strong> same language. Nei<strong>the</strong>r UML (as we have used it <strong>in</strong> this section)nor C2 constra<strong>in</strong> <strong>the</strong> choice of <strong>in</strong>terprocess communication mechanisms,nor do <strong>the</strong>y assume that any two components run <strong>in</strong> <strong>the</strong> same thread of controlor on <strong>the</strong> same host. Both UML and C2 support <strong>in</strong>teractions via messagepass<strong>in</strong>g. However, it should be noted that UML only allows specification of <strong>the</strong>messages received (correspond<strong>in</strong>g to <strong>the</strong> operations provided) by a class, butnot messages sent by <strong>the</strong> class; call actions can be used <strong>in</strong> a state diagram associatedwith <strong>the</strong> class to <strong>in</strong>voke required operations <strong>in</strong> ano<strong>the</strong>r class, but <strong>the</strong>call actions are not explicitly declared as elements of <strong>the</strong> <strong>in</strong>vok<strong>in</strong>g class. Wesee this as a major shortcom<strong>in</strong>g of UML, and we were forced to build <strong>the</strong> dist<strong>in</strong>ctionbetween provided and required operations <strong>in</strong>to our model <strong>in</strong>directly byus<strong>in</strong>g <strong>the</strong> tagged values c2MsgType and c2MsgDir, which for required operationsmerely document <strong>the</strong> <strong>in</strong>tent that an operation be required. F<strong>in</strong>ally, althoughwe did not model details of <strong>the</strong> <strong>in</strong>ternal parts of a C2 component [Taylor et al.1996] or <strong>the</strong> behavior of any C2 constructs, such aspects can be modeled <strong>in</strong>UML, as demonstrated <strong>in</strong> <strong>the</strong> follow<strong>in</strong>g sections where we capture <strong>the</strong> <strong>in</strong>ternalbehavioral aspects of model elements expressed <strong>in</strong> Wright and Rapide.It is important to note that, while a majority of <strong>the</strong> concepts discussed aboveare implicit <strong>in</strong> <strong>the</strong> C2 ADL (recall <strong>the</strong> example <strong>in</strong> Section 4), each concept had tobe carefully, explicitly specified <strong>in</strong> UML. The reason, of course, is that C2 ADL’sACM Transactions on <strong>Software</strong> Eng<strong>in</strong>eer<strong>in</strong>g and Methodology, Vol. 11, No. 1, January 2002.


30 • N. Medvidovic et al.Fig. 13. The C2-style architecture depicted <strong>in</strong> Figures 7 and 11 expressed <strong>in</strong> “constra<strong>in</strong>ed” UML.Component <strong>in</strong>terfaces have been omitted to draw attention to <strong>the</strong> stereotypes def<strong>in</strong><strong>in</strong>g <strong>the</strong> differentarchitectural elements. For clarity, we show <strong>the</strong> result<strong>in</strong>g topology among classes (i.e., componenttypes) ra<strong>the</strong>r than <strong>the</strong>ir <strong>in</strong>stances.sole purpose is to model C2-style architectures and most of its semantics isdirectly derived from <strong>the</strong> style, while UML has a much broader <strong>in</strong>tended scope.This is also <strong>the</strong> major difference between our first strategy to model<strong>in</strong>g softwarearchitectures <strong>in</strong> UML, discussed <strong>in</strong> Section 4, and this strategy: Unlike<strong>the</strong> first strategy, where <strong>the</strong> different architectural concepts (e.g., components,connectors, messages) were implicit <strong>in</strong> <strong>the</strong> UML design, this approach explicitlydef<strong>in</strong>es and constra<strong>in</strong>s all relevant concepts. For example, <strong>the</strong> C2-style architecturerepresented <strong>in</strong> a UML class diagram <strong>in</strong> Figure 11 now appears as shown <strong>in</strong>Figure 13. This diagram clearly dist<strong>in</strong>guishes between components, connectors,and <strong>the</strong>ir different k<strong>in</strong>ds of associations. Although components and connectorsare derived by constra<strong>in</strong><strong>in</strong>g <strong>the</strong> same UML meta class, this has been abstractedaway <strong>in</strong> <strong>the</strong> diagram. In addition, as mentioned <strong>in</strong> Section 5.1.3, <strong>the</strong> formalizationof <strong>the</strong> semantics of attachments <strong>in</strong> C2 requires an explicit diagrammatic<strong>in</strong>dication (us<strong>in</strong>g a notation def<strong>in</strong>ed by UML) of <strong>the</strong> underly<strong>in</strong>g order of <strong>the</strong>attachment associations. This is <strong>the</strong> purpose of <strong>the</strong> upward-po<strong>in</strong>t<strong>in</strong>g triangleson all <strong>the</strong> attachment associations <strong>in</strong> Figure 13.It is also worth po<strong>in</strong>t<strong>in</strong>g out that some concepts of C2 are very different fromthose of UML and object-oriented design <strong>in</strong> general. For example, ma<strong>in</strong>streamobject-oriented design ma<strong>in</strong>ta<strong>in</strong>s a strict dichotomy between classes and <strong>in</strong>stanceswhere all <strong>the</strong> major traits (i.e., <strong>the</strong> “bluepr<strong>in</strong>t”) of an <strong>in</strong>stance are specified<strong>in</strong> its class def<strong>in</strong>ition. In contrast, as already discussed, <strong>the</strong> <strong>in</strong>terface of aC2 connector is determ<strong>in</strong>ed by context ra<strong>the</strong>r than declared; <strong>the</strong> addition of anew component <strong>in</strong>stance at run-time is considered an architectural change. Ifa system uses two C2 connectors, <strong>the</strong>y must each have <strong>the</strong>ir own class <strong>in</strong> <strong>the</strong> correspond<strong>in</strong>gUML design s<strong>in</strong>ce a different set of C2 component <strong>in</strong>stances will beattached to each connector. However, <strong>the</strong> two connectors may be implementedACM Transactions on <strong>Software</strong> Eng<strong>in</strong>eer<strong>in</strong>g and Methodology, Vol. 11, No. 1, January 2002.


<strong>Model<strong>in</strong>g</strong> <strong>Software</strong> <strong>Architectures</strong> <strong>in</strong> UML • 31by <strong>the</strong> same concrete module. Ano<strong>the</strong>r conceptual difference is that, strictlyspeak<strong>in</strong>g, it is legal for C2 messages to be sent and not received by any component,whereas UML assumes that every message sent will be received. We havedecl<strong>in</strong>ed to address this last difference s<strong>in</strong>ce it does not <strong>in</strong>volve a key propertyof C2 and would <strong>in</strong>troduce more complexity than we feel it merits.5.2 Extensions Based on WrightThe preced<strong>in</strong>g section demonstrates that an ADL that supports a specific architecturalstyle can be modeled <strong>in</strong> UML. This section demonstrates <strong>the</strong> applicabilityof our second strategy to a general-purpose ADL, Wright [Allen and Garlan1994; Allen and Garlan 1997]. In addition to <strong>the</strong> features modeled below, a morerecent version of Wright also supports system families, architectural styles, andhierarchical composition [Allen 1997]. We do not address <strong>the</strong>se newer featureshere; as mentioned, <strong>the</strong> preced<strong>in</strong>g section illustrates how support for architecturalstyles can be <strong>in</strong>corporated <strong>in</strong>to UML us<strong>in</strong>g our second strategy, whileHofmeister et al. [2000] have shown that a system family and hierarchical compositioncan be <strong>in</strong>corporated us<strong>in</strong>g an approach that is <strong>in</strong> essence an <strong>in</strong>stanceof our second strategy.An architecture <strong>in</strong> Wright is described <strong>in</strong> three parts:—component and connector types;—component and connector <strong>in</strong>stances; and—configurations of component and connector <strong>in</strong>stances.Unlike C2, Wright does not enforce <strong>the</strong> rules of a particular style, but isapplicable to multiple styles. However, it still places certa<strong>in</strong> topological constra<strong>in</strong>tson architectures. For example, as <strong>in</strong> C2, two components cannot bedirectly connected, but must communicate through a connector; on <strong>the</strong> o<strong>the</strong>rhand, unlike C2, Wright disallows two connectors from be<strong>in</strong>g directly attachedto one ano<strong>the</strong>r.The rema<strong>in</strong>der of <strong>the</strong> section describes an extension to UML for model<strong>in</strong>gWright architectures. Stereotypes and constra<strong>in</strong>ts are elided whenever <strong>the</strong>yare obvious from <strong>the</strong> discussion <strong>in</strong> this or <strong>the</strong> previous section.5.2.1 Behavioral Specification <strong>in</strong> Wright. Wright uses a subset of CSP[Hoare 1985] to provide a formal basis for specify<strong>in</strong>g <strong>the</strong> behavior of componentsand connectors, as well as <strong>the</strong> protocols supported by <strong>the</strong>ir <strong>in</strong>terfaceelements. Given that this subset “def<strong>in</strong>es processes that are essentially f<strong>in</strong>itestate” [Allen and Garlan 1994, p. 74] it is possible to model Wright’s behavioralspecifications us<strong>in</strong>g UML state mach<strong>in</strong>e diagrams.CSP processes are entities that engage <strong>in</strong> communication events. An event,e, can be primitive, or it can <strong>in</strong>put or output a data item x (denoted <strong>in</strong> CSP wi<strong>the</strong>?x or e!x, respectively). CSP events are modeled <strong>in</strong> state mach<strong>in</strong>es as shown<strong>in</strong> Figure 14.These two types of state transitions can be used <strong>in</strong> model<strong>in</strong>g more complexCSP expressions supported by Wright. Table II presents <strong>the</strong> mapp<strong>in</strong>g from CSPto state mach<strong>in</strong>es us<strong>in</strong>g events with no actions (Figure 14a); <strong>the</strong> mapp<strong>in</strong>g fornull events with actions (Figure 14b) is straightforward. It is possible for CSPACM Transactions on <strong>Software</strong> Eng<strong>in</strong>eer<strong>in</strong>g and Methodology, Vol. 11, No. 1, January 2002.


32 • N. Medvidovic et al.Table II. UML State Mach<strong>in</strong>e Templates for Wright’s CSP ConstructsCSP Concept CSP Notation UML State Mach<strong>in</strong>ePrefix<strong>in</strong>gP = a → QAlternative (determ<strong>in</strong>istic choice)P = b → Q[]c→RDecision (nonderm<strong>in</strong>istic choice)P = d → Q ⊓ e → RParallel CompositionP = Q ‖ RSuccess EventP = √Fig. 14. (a) A CSP event with <strong>in</strong>put data, e?x, is modeled <strong>in</strong> UML state mach<strong>in</strong>es as a statetransition event with no action. (b) A CSP event, e, with output data, e!x, is modeled as a null statetransition event that results <strong>in</strong> action e.events to have no associated data. In such a case, <strong>the</strong> semantics of state mach<strong>in</strong>esforces us to make a choice as to which entities generate events and whichobserve <strong>the</strong>m. We choose to model Wright ports and roles (described below) wi<strong>the</strong>vent-generat<strong>in</strong>g actions, and computation and glue with transitions that observethose events. The state mach<strong>in</strong>es <strong>in</strong> Table II can be used as templates fromwhich equivalents of more complex CSP expressions can be formed. 6 Therefore,a “Wright” state mach<strong>in</strong>e is described by <strong>the</strong> follow<strong>in</strong>g stereotypes.Stereotype WSMTransition for <strong>in</strong>stances of meta class Transition--1-- A transition is tagged as one of <strong>the</strong> two cases shown <strong>in</strong> Figure 14.WSMtransitionType : enum { event, action }--2-- An “event” transition consists of a call event only (Figure 14a).self.WSMtransitionType = event implies(self.event->notEmpty and self.event.oclIsK<strong>in</strong>dOf(CallEvent) andself.action->isEmpty)6 Note that operational models of CSP based on state mach<strong>in</strong>es and transition systems are wellknown; e.g., see Roscoe [1988] and Scattergood [1998]. Our approach is similar, but also leverages<strong>the</strong> advanced model<strong>in</strong>g features of UML state mach<strong>in</strong>es and aims at provid<strong>in</strong>g a notational aid tosoftware designers.ACM Transactions on <strong>Software</strong> Eng<strong>in</strong>eer<strong>in</strong>g and Methodology, Vol. 11, No. 1, January 2002.


<strong>Model<strong>in</strong>g</strong> <strong>Software</strong> <strong>Architectures</strong> <strong>in</strong> UML • 33--3-- An “action” transition consists of a null event and a s<strong>in</strong>gle action-- (Figure 14b).self.WSMtransitionType = action implies(self.event->isEmpty and self.action->size = 1)Stereotype WrightState for <strong>in</strong>stances of meta class State--1-- All Transitions <strong>in</strong> a composite WrightState must be WSMTransitionsself.oclIsK<strong>in</strong>dOf(CompositeState) impliesself.transition->forAll(t | t.stereotype = WSMTransition)--2-- WrightState applies recursively to its nested statesself.oclIsK<strong>in</strong>dOf(CompositeState) implies(self.oclAsType(CompositeState).state->forAll(s |s.stereotype = WrightState))Stereotype WrightStateMach<strong>in</strong>e for <strong>in</strong>stances of meta class StateMach<strong>in</strong>e--1-- A WrightStateMach<strong>in</strong>e consists of one of <strong>the</strong> composite states discussed-- above, and partially depicted <strong>in</strong> Table 2. This constra<strong>in</strong>t is elided <strong>in</strong> <strong>the</strong>-- <strong>in</strong>terest of space.--2-- All WrightStateMach<strong>in</strong>e transitions must be WSMTransitions.self.top.oclIsK<strong>in</strong>dOf(CompositeState) impliesself.top.transition->forAll(t | t.stereotype = WSMTransition)--3-- The nested states of <strong>the</strong> top state of a WrightStateMach<strong>in</strong>e must be-- WrightStatesself.top.oclIsK<strong>in</strong>dOf(CompositeState) implies(self.top.oclAsType(CompositeState).state->forAll(s |s.stereotype = WrightState))The stereotypes above use <strong>the</strong> operation oclAsType to coerce <strong>the</strong> associatedmodel element to <strong>the</strong> specified class of <strong>the</strong> meta model, <strong>the</strong>reby provid<strong>in</strong>g accessto <strong>the</strong> o<strong>the</strong>r meta model elements accessible from <strong>the</strong> specified meta class. Theyalso illustrate <strong>the</strong> basic pattern we use to constra<strong>in</strong> state mach<strong>in</strong>es, namely,express<strong>in</strong>g constra<strong>in</strong>ts <strong>in</strong> terms of model elements reachable from <strong>the</strong> s<strong>in</strong>gle,top-level state of a state mach<strong>in</strong>e (i.e., its attribute top).5.2.2 Wright Component and Connector Interfaces <strong>in</strong> UML. Each Wright<strong>in</strong>terface (a port <strong>in</strong> a component or a role <strong>in</strong> a connector) has one or moreoperations. In Wright, <strong>the</strong>se operations are modeled implicitly, as part ofa port or role’s CSP protocol. We choose to model <strong>the</strong> operations explicitly<strong>in</strong> UML. The CSP protocols associated with a port or role are modeled asWrightStateMach<strong>in</strong>es.Stereotype WrightOperation for <strong>in</strong>stances of meta class Operation--1-- WrightOperations do not have parameters; parameters are implicit <strong>in</strong> <strong>the</strong>-- CSP specification associated with each operation.ACM Transactions on <strong>Software</strong> Eng<strong>in</strong>eer<strong>in</strong>g and Methodology, Vol. 11, No. 1, January 2002.


34 • N. Medvidovic et al.self.parameter->isEmptyStereotype WrightInterface for <strong>in</strong>stances of meta class Interface--1-- WrightInterfaces are tagged as ei<strong>the</strong>r ports or roles.WrightInterfaceType : enum { port, role }--2-- All operations <strong>in</strong> a WrightInterface are WrightOperations.self.operation->forAll(o | o.stereotype = WrightOperation)--3-- Exactly one WrightStateMach<strong>in</strong>e is associated with each WrightInterface.self.stateMach<strong>in</strong>e->size = 1 andself.stateMach<strong>in</strong>e->forAll(sm | sm.stereotype = WrightStateMach<strong>in</strong>e)--4-- The WrightStateMach<strong>in</strong>e of a WrightInterface is expressed only <strong>in</strong> terms-- of that <strong>in</strong>terface’s operations, all of which must be operations associated-- with <strong>the</strong> call events on <strong>the</strong> transitions of <strong>the</strong> state mach<strong>in</strong>e.self.stateMach<strong>in</strong>e.transition->forAll(t |(t.event.oclIsK<strong>in</strong>dOf(CallEvent)) impliesself.operation->exists(o | o = t.event.operation))5.2.3 Wright Connectors <strong>in</strong> UML. A connector type <strong>in</strong> Wright is describedas a set of roles, which describe <strong>the</strong> expected behavior of <strong>the</strong> <strong>in</strong>teract<strong>in</strong>g components,and a glue, which def<strong>in</strong>es <strong>the</strong> connector’s behavior by specify<strong>in</strong>g howits roles <strong>in</strong>teract.We will model Wright connectors with <strong>the</strong> UML meta class Class. Wrightconnectors provide multiple <strong>in</strong>terfaces (roles) and participate <strong>in</strong> associationswith o<strong>the</strong>r classes (Wright components). Wright connector types are assumedto have no state o<strong>the</strong>r than <strong>the</strong> state of <strong>the</strong>ir <strong>in</strong>ternal parts, and thus may haveno direct attributes.Stereotype WrightGlue for <strong>in</strong>stances of meta class Operation--1-- WrightGlue conta<strong>in</strong>s a s<strong>in</strong>gle WrightStateMach<strong>in</strong>e.self.stateMach<strong>in</strong>e->size = 1 andself.stateMach<strong>in</strong>e->forAll(sm | sm.stereotype = WrightStateMach<strong>in</strong>e)Stereotype WrightConnector for <strong>in</strong>stances of meta class Class--1-- WrightConnectors must implement at least one WrightInterface, which-- must be a role.self.<strong>in</strong>terface->size >= 1 andself.<strong>in</strong>terface->forAll(i |i.stereotype = WrightInterface andi.WrightInterfaceType = role)--2-- A WrightConnector conta<strong>in</strong>s a s<strong>in</strong>gle glue.self.operation->size = 1 andself.operation->forAll(o | o.stereotype = WrightGlue)ACM Transactions on <strong>Software</strong> Eng<strong>in</strong>eer<strong>in</strong>g and Methodology, Vol. 11, No. 1, January 2002.


<strong>Model<strong>in</strong>g</strong> <strong>Software</strong> <strong>Architectures</strong> <strong>in</strong> UML • 35--3-- Operations with no data and with <strong>in</strong>put data that belong to <strong>the</strong> different-- <strong>in</strong>terface elements of a connector are <strong>the</strong> trigger events <strong>in</strong> <strong>the</strong> glue’s state-- mach<strong>in</strong>e.self.operation.stateMach<strong>in</strong>e.transition->forAll(t |(t.event.oclIsK<strong>in</strong>dOf(CallEvent)) impliesself.<strong>in</strong>terface.operation->exists(o | o = t.event.operation))--4-- Operations with output data that belong to <strong>the</strong> different <strong>in</strong>terface elements-- of a connector are <strong>the</strong> actions <strong>in</strong> glue’s state mach<strong>in</strong>e. Similar to <strong>the</strong> above-- constra<strong>in</strong>t.--5-- The semantics of a Wright connector can be described as <strong>the</strong> parallel-- <strong>in</strong>teraction of its glue and roles [Allen and Garlan 1994].let glueop = self.operation->select(o | o.stereotype = WrightGlue) <strong>in</strong>self.stateMach<strong>in</strong>e->size = 1 andself.stateMach<strong>in</strong>e->forAll(sm |sm.top.oclIsK<strong>in</strong>dOf(CompositeState) implies(sm.top.isConcurrent = true andsm.top.state->size = 1 + self.<strong>in</strong>terface->size andsm.top.state->exists (gs gs = glueop.stateMach<strong>in</strong>e.top) andself.<strong>in</strong>terface->forAll(ism.top.state->exists (rs | rs = i.stateMach<strong>in</strong>e.top)))--6-- A WrightConnector must have at least one <strong>in</strong>stance <strong>in</strong> <strong>the</strong> runn<strong>in</strong>g system.self.allInstances->size >= 1The fifth constra<strong>in</strong>t of stereotype WrightConnector is ra<strong>the</strong>r complex, s<strong>in</strong>ceit must specify a number of conditions aris<strong>in</strong>g from <strong>the</strong> semantics of connectors<strong>in</strong> Wright. In particular, for <strong>the</strong> state mach<strong>in</strong>e associated with a connector, itstop-level state must have concurrent substates. One of <strong>the</strong>se substates is <strong>the</strong> topstate of <strong>the</strong> glue’s state mach<strong>in</strong>e, and each of <strong>the</strong> rema<strong>in</strong><strong>in</strong>g substates is <strong>the</strong> topstate of <strong>the</strong> state mach<strong>in</strong>e of a (role) <strong>in</strong>terface. Thus, <strong>the</strong> number of substatesmust be one plus <strong>the</strong> number of roles, and <strong>the</strong> glue and all roles must have<strong>the</strong>ir top states represented as substates of <strong>the</strong> state mach<strong>in</strong>e of <strong>the</strong> connector.Every role plus <strong>the</strong> glue is represented exactly once <strong>in</strong> <strong>the</strong> state mach<strong>in</strong>e of <strong>the</strong>connector, and <strong>the</strong> states thus represented are concurrently composed to form<strong>the</strong> top state of <strong>the</strong> connector.5.2.4 Wright Components <strong>in</strong> UML. A component type is modeled by a set ofports, which export <strong>the</strong> component’s <strong>in</strong>terface, and a computation specification,which def<strong>in</strong>es <strong>the</strong> component’s behavior. We model Wright components <strong>in</strong> UMLwith a stereotype WrightComponent. This stereotype has much <strong>in</strong> common with<strong>the</strong> WrightConnector stereotype and is thus omitted.5.2.5 Wright <strong>Architectures</strong> <strong>in</strong> UML. We <strong>in</strong>troduce stereotypes for model<strong>in</strong>g<strong>the</strong> attachments of components to connectors and for Wright architectures.Unlike C2, which considers architectures to be networks of abstractACM Transactions on <strong>Software</strong> Eng<strong>in</strong>eer<strong>in</strong>g and Methodology, Vol. 11, No. 1, January 2002.


36 • N. Medvidovic et al.placeholders, Wright architectures are composed of component and connector<strong>in</strong>stances. One solution we considered was to def<strong>in</strong>e WrightConnectorInstanceand WrightComponentInstance stereotypes and express architectural topology<strong>in</strong> terms of <strong>the</strong>m. However, we believe it is undesirable to <strong>in</strong>troduce <strong>in</strong>stancesat this level, s<strong>in</strong>ce we are deal<strong>in</strong>g with design issues. Additionally, we havefound that most of <strong>the</strong> rules for composition of component and connector <strong>in</strong>stanceshold for <strong>the</strong>ir correspond<strong>in</strong>g types. Therefore, we refer to componentand connector types <strong>in</strong> <strong>the</strong> stereotypes below.Stereotype WrightAttachment for <strong>in</strong>stances of meta class Association--1-- Wright attachments are associations between two elements.self.associationEnd->size = 2--2-- One end of <strong>the</strong> association must be <strong>the</strong> port of a WrightComponent, and-- <strong>the</strong> o<strong>the</strong>r must be <strong>the</strong> role of a WrightConnector.let ends = self.associationEnd <strong>in</strong>ends[1].multiplicity.m<strong>in</strong> = 1 and ends[1].multiplicity.max = 1 andends[2].multiplicity.m<strong>in</strong> = 1 and ends[2].multiplicity.max = 1 and((ends[1].<strong>in</strong>terface.stereotype = WrightInterface andends[1].<strong>in</strong>terface.WrightInterfaceType = port andends[2].<strong>in</strong>terface.stereotype = WrightInterface andends[2].<strong>in</strong>terface.WrightInterfaceType = role) or(ends[2].<strong>in</strong>terface.stereotype = WrightInterface andends[2].<strong>in</strong>terface.WrightInterfaceType = port andends[1].<strong>in</strong>terface.stereotype = WrightInterface andends[1].<strong>in</strong>terface.WrightInterfaceType = role) orStereotype WrightArchitecture for <strong>in</strong>stances of meta class Model--1-- The classes <strong>in</strong> a WrightArchitecture must all be Wright model elements.self.modelElement->select(me | me.oclIsK<strong>in</strong>dOf(Class))->forAll(c |(c.stereotype = WrightComponent orc.stereotype = WrightConnector)--2-- The associations <strong>in</strong> a WrightArchitecture must all be Wright model-- elements.self.modelElement->select(me | me.oclIsK<strong>in</strong>dOf(Association))->forAll(a | a.stereotype = WrightAttachment)--3-- Each WrightComponent port participates <strong>in</strong> at most one association with-- a WrightConnector role, and vice versa.let comps = self.modelElement->select(e | e.stereotype =WrightInterface) <strong>in</strong> comps.associationEnd->size


<strong>Model<strong>in</strong>g</strong> <strong>Software</strong> <strong>Architectures</strong> <strong>in</strong> UML • 37Fig. 15. A connector specified <strong>in</strong> Wright (adapted from Allen and Garlan [1994]).The semantics of port-role attachments <strong>in</strong> Wright are formally def<strong>in</strong>ed [Allenand Garlan 1997]. However, Wright places no language-level constra<strong>in</strong>ts onport-role pairs. Instead, establish<strong>in</strong>g and enforc<strong>in</strong>g <strong>the</strong>se constra<strong>in</strong>ts is <strong>the</strong> taskof external analysis tools. Hence, we provide no port-role compatibility constra<strong>in</strong>ts.Fur<strong>the</strong>rmore, unlike <strong>the</strong> situation described <strong>in</strong> Section 5.1.3, wherewe found it necessary to exploit <strong>the</strong> underly<strong>in</strong>g order of constra<strong>in</strong>ed associations,<strong>in</strong> <strong>the</strong> case of WrightAttachment we found it unnecessary to account for<strong>the</strong> order<strong>in</strong>g, and so that stereotype allows <strong>the</strong> association to be specified <strong>in</strong>ei<strong>the</strong>r order.5.2.6 Discussion of Wright Extensions. We have def<strong>in</strong>ed <strong>the</strong> stereotypesfor Wright <strong>in</strong> much <strong>the</strong> same way we did for C2 <strong>in</strong> Section 5.1. Similar aspectsof <strong>the</strong> two ADLs were captured and constra<strong>in</strong>ed <strong>in</strong> similar ways. For example,components and connectors are modeled as stereotyped classes, and <strong>the</strong>ir validcompositions <strong>in</strong> an architecture (i.e., architectural structure) as stereotypedassociations. At <strong>the</strong> same time, model<strong>in</strong>g Wright’s component and connectorsemantics required a significant augmentation to what was done for C2.As an example, consider a Wright specification of a Pipe connector, adaptedfrom Allen and Garlan [1994] and shown <strong>in</strong> Figure 15. The connector is represented<strong>in</strong> UML by us<strong>in</strong>g <strong>the</strong> stereotyped class WrightConnector; it is analogousto one of <strong>the</strong> stereotyped C2Connector classes from Figure 13 and has beenomitted for brevity. However, unlike <strong>the</strong> UML model of C2, which was entirelycaptured by stereotyp<strong>in</strong>g classes and <strong>the</strong>ir associations, we model <strong>the</strong> complex<strong>in</strong>ternal behavior and <strong>in</strong>teractions of a Wright component or connector us<strong>in</strong>g<strong>the</strong> UML state mach<strong>in</strong>e diagrams. The state mach<strong>in</strong>e model of <strong>the</strong> Pipe connectoris shown <strong>in</strong> Figure 16. Wright’s scop<strong>in</strong>g of events is modeled <strong>in</strong> UMLby prefix<strong>in</strong>g every event’s name with <strong>the</strong> name of <strong>the</strong> role to which <strong>the</strong> eventbelongs.Figure 16 demonstrates how <strong>the</strong> state mach<strong>in</strong>es from Table II become atomicbuild<strong>in</strong>g blocks of a CSP specification modeled <strong>in</strong> UML. In that sense, Table IIserves <strong>the</strong> same purpose as OCL stereotypes: It places constra<strong>in</strong>ts on <strong>the</strong> alloweduses of a UML construct. Note, however, that while adherence to stereotypesmust be ensured by UML-compliant tools, this aspect of our approachdoes not: A standard UML tool may treat a particular state mach<strong>in</strong>e as valideven if it violates <strong>the</strong> mapp<strong>in</strong>g given <strong>in</strong> Table II. We do not consider this aproblem. UML state mach<strong>in</strong>es are a powerful model<strong>in</strong>g formalism <strong>in</strong> <strong>the</strong>ir ownright [Harel 1987; Harel and Naamad 1996] and we have shown how <strong>the</strong>y canmodel a useful subset of CSP. In do<strong>in</strong>g so, we have given practitioners <strong>the</strong> choiceof ei<strong>the</strong>r mapp<strong>in</strong>g architectural models between UML and Wright <strong>in</strong> order toACM Transactions on <strong>Software</strong> Eng<strong>in</strong>eer<strong>in</strong>g and Methodology, Vol. 11, No. 1, January 2002.


38 • N. Medvidovic et al.Fig. 16.UML state mach<strong>in</strong>e model of <strong>the</strong> Pipe connector.exploit Wright’s tool support or build<strong>in</strong>g comparable support <strong>in</strong> UML. Whilenei<strong>the</strong>r of <strong>the</strong> two tasks is trivial, <strong>the</strong> benefits of ei<strong>the</strong>r one may outweigh <strong>the</strong>difficulties.5.3 Extensions Based on RapideThis section describes <strong>the</strong> application of our second strategy to Rapide, an ADLthat has a particularly rich semantic basis and supports <strong>the</strong> specification ofarchitectural constra<strong>in</strong>ts [Luckham et al. 1995; Luckham and Vera 1995]. WithRapide we also beg<strong>in</strong> to encounter some of <strong>the</strong> limitations of <strong>the</strong> second strategy.As will be seen, <strong>the</strong>se limitations stem from weaknesses and ambiguities <strong>in</strong> <strong>the</strong>semantics of UML itself.The underly<strong>in</strong>g behavioral model of Rapide is partially ordered sets (or posets)of events. In particular, <strong>the</strong> behavior of components is characterized <strong>in</strong> Rapideprimarily <strong>in</strong> terms of events, which can be associated with typed parameters.Components observe events <strong>in</strong> <strong>the</strong> external environment of <strong>the</strong>ir execution, and<strong>the</strong>y declare <strong>the</strong>se events as <strong>in</strong> actions. Components generate events <strong>in</strong>to <strong>the</strong>irexternal environment, and <strong>the</strong>y declare <strong>the</strong>se events as out actions. Componentscan be multithreaded; as threads with<strong>in</strong> or across components synchronizewith each o<strong>the</strong>r, <strong>the</strong>y establish causal dependencies between <strong>the</strong>ir eventstreams. Hence, <strong>the</strong> behaviors of both <strong>in</strong>dividual components and a completearchitecture can be represented by an event poset, <strong>in</strong> which event order<strong>in</strong>gsACM Transactions on <strong>Software</strong> Eng<strong>in</strong>eer<strong>in</strong>g and Methodology, Vol. 11, No. 1, January 2002.


<strong>Model<strong>in</strong>g</strong> <strong>Software</strong> <strong>Architectures</strong> <strong>in</strong> UML • 39represent causal dependencies <strong>in</strong>troduced by thread synchronizations. Thestructural aspects of components and architectures <strong>in</strong> Rapide can be representedwith UML class diagrams <strong>in</strong> a manner similar to <strong>the</strong> approaches describedpreviously for C2 and Wright. In this section we focus our attention onrepresent<strong>in</strong>g <strong>the</strong> event-based behavioral model<strong>in</strong>g features of Rapide.Rapide supports two k<strong>in</strong>ds of event-based specifications. First, a componentbehavior can be specified <strong>in</strong> terms of state transition rules, <strong>in</strong> which a componentobserves a pattern of events and <strong>the</strong>n generates an associated pattern ofevents <strong>in</strong> response. Second, event pattern constra<strong>in</strong>ts can be used to specifyrestrictions on <strong>the</strong> content of <strong>the</strong> poset generated by a component or an architecture.The Rapide tools currently restrict <strong>the</strong> specification of constra<strong>in</strong>ts tonever constra<strong>in</strong>ts, which specify event patterns that should never occur with<strong>in</strong><strong>the</strong> behavior of <strong>the</strong> enclos<strong>in</strong>g component or architecture; our extensions forconstra<strong>in</strong>ts thus adhere to this restriction.Both k<strong>in</strong>ds of event-based specification <strong>in</strong> Rapide are expressed <strong>in</strong> termsof event patterns, compound patterns of events expressed us<strong>in</strong>g a variety ofcompositional operators. These operators can be used to specify when eventsshould happen <strong>in</strong> sequence <strong>in</strong> <strong>the</strong> causal order, when <strong>the</strong>y should happen <strong>in</strong>dependentlyof each o<strong>the</strong>r <strong>in</strong> <strong>the</strong> causal order, when one of a set should happen,when all of a set should happen, and so on.Analysis of Rapide specifications is carried out via runtime simulation ofan architectural model. The Rapide runtime system executes state transitionrules to drive <strong>the</strong> simulation, and it evaluates constra<strong>in</strong>ts aga<strong>in</strong>st <strong>the</strong>generated poset. In particular, <strong>the</strong> runtime system matches event patternsaga<strong>in</strong>st correspond<strong>in</strong>g events <strong>in</strong> <strong>the</strong> poset of an execution; <strong>the</strong> match<strong>in</strong>g ofany portion of event pattern can be constra<strong>in</strong>ed by a Boolean-valued guardassociated with <strong>the</strong> portion. Placeholders also can be used with<strong>in</strong> an eventpattern to achieve unification-style b<strong>in</strong>d<strong>in</strong>g to correspond<strong>in</strong>g values <strong>in</strong> <strong>the</strong>matched events.We use a simple Bank component for a bank<strong>in</strong>g system to illustrate some of<strong>the</strong> features of Rapide and to illustrate our approach to represent<strong>in</strong>g Rapide’sevent model<strong>in</strong>g features <strong>in</strong> UML:type Bank is <strong>in</strong>terfaceaction <strong>in</strong> Open Account (Customer : Integer),Deposit (Acct : Natural; Amt : Float),Withdraw (Acct : Natural; Amt: Float);out Assign Account (Customer : Integer; Acct : Natural),New Balance (Acct : Natural; Amt : Float);behaviortype Account Array is array [Natural] of ref (Float);Accounts : Account Array (1 .. 100, default is ref to (Float, 0.0));Last : var Natural := 0;beg<strong>in</strong>(?C : Integer)Open Account (?C) where $Last < 100 => Last := $Last + 1;Assign Account (?C, $Last);;(?A : Natural; ?D : Float)Deposit (?A, ?D) => Accounts[?A] := $(Accounts[?A]) + ?D;New Balance (?A, $(Accounts[?A]);;ACM Transactions on <strong>Software</strong> Eng<strong>in</strong>eer<strong>in</strong>g and Methodology, Vol. 11, No. 1, January 2002.


40 • N. Medvidovic et al.(?A : Natural; ?D : Float)Withdraw (?A, ?D) => Accounts[?A] := $(Accounts[?A]) − ?D;New Balance (?A, $(Accounts[?A]);;constra<strong>in</strong>tnever (?A : Natural; ?D : Float)New Balance (?A, ?D) where ?D < 0.0;never (?C1, ?C2 : Integer; ?A1, ?A2 : Natural)(Assign Account (?C1, ?A1) -> Assign Account (?C2, ?A2)) where ?A2 == ?A1;end Bank;As shown <strong>in</strong> <strong>the</strong> specification, a Rapide component is def<strong>in</strong>ed by an <strong>in</strong>terfacetype. The Bank component observes three k<strong>in</strong>ds of events (open<strong>in</strong>g an account,and deposit<strong>in</strong>g and withdraw<strong>in</strong>g money <strong>in</strong> an account), as specified <strong>in</strong> <strong>the</strong> declarationof its <strong>in</strong> actions. Its out actions specify that it generates two k<strong>in</strong>ds ofevents (assign<strong>in</strong>g an account number and report<strong>in</strong>g a new balance). Each of<strong>the</strong>se k<strong>in</strong>ds of events is parameterized with appropriate <strong>in</strong>formation (<strong>in</strong>tegercustomer numbers, natural account numbers, float<strong>in</strong>g-po<strong>in</strong>t dollar amounts).The behavior section of <strong>the</strong> component sets up an array of 100 accounts tohold account balances (with each account <strong>in</strong>itialized to zero, and <strong>the</strong> variableLast used to remember <strong>the</strong> most recently assigned account number). The component’sbehavior is specified by three state transition rules, each of which usesplaceholders (<strong>the</strong> variables denoted with “?”) to quantify over all possible occurrencesof <strong>the</strong> events mentioned <strong>in</strong> <strong>the</strong> rules. The portion of a rule to <strong>the</strong> leftof <strong>the</strong> “=>” symbol is <strong>the</strong> rule’s trigger, which, if matched, causes <strong>the</strong> portion to<strong>the</strong> right of <strong>the</strong> “=>” symbol, <strong>the</strong> rule’s body, to be executed. Note that <strong>the</strong> bodiesspecify both generated events and updates to local state variables. In general,<strong>the</strong> state transition rules of a Rapide component are unordered and are fired repeatedly;<strong>the</strong> choice of which rule to fire is nondeterm<strong>in</strong>istic, although <strong>the</strong> availabilityand unavailability of matches for <strong>the</strong> triggers helps narrow <strong>the</strong> choice.The first rule of <strong>the</strong> Bank component says that whenever a customer ?C opensan account (as signified by <strong>the</strong> occurrence of an Open Account event), <strong>the</strong>n <strong>the</strong>value of <strong>the</strong> variable Last is <strong>in</strong>cremented (us<strong>in</strong>g an assignment statement) and<strong>the</strong> same customer ?C is assigned <strong>the</strong> value of variable Last as <strong>the</strong> new accountnumber (through <strong>the</strong> generation of an Assign Account event). The read<strong>in</strong>g of <strong>the</strong>variable’s value is denoted with “$”. The use of <strong>the</strong> guard (<strong>the</strong> where clause)on <strong>the</strong> event <strong>in</strong> <strong>the</strong> trigger ensures that <strong>the</strong> rule is triggered only if <strong>the</strong> arrayof accounts has not been exhausted. The rule would fire for all occurrences ofan Open Account event for which <strong>the</strong> guard is true. The second rule says thatwhenever an amount ?D is deposited to an account ?A (via a Deposit event),<strong>the</strong>n <strong>the</strong> balance of <strong>the</strong> same account ?A is updated to reflect <strong>the</strong> deposit, and<strong>the</strong>n <strong>the</strong> new balance is reported (via a New Balance event). The third rulehandles withdrawals <strong>in</strong> a manner similar to <strong>the</strong> rule for deposits.The constra<strong>in</strong>t section of <strong>the</strong> component describes two patterns of events thatshould never happen dur<strong>in</strong>g <strong>the</strong> execution of <strong>the</strong> component. The first says that<strong>the</strong> component should never generate a New Balance event for any account ?Aand any amount ?D less than 0.0 (<strong>the</strong>reby disallow<strong>in</strong>g <strong>the</strong> report<strong>in</strong>g of negativebalances). The second says that <strong>the</strong>re should never be a compound sequence(as <strong>in</strong>dicated by <strong>the</strong> “->” operator) of two Assign Account events <strong>in</strong> which <strong>the</strong>ACM Transactions on <strong>Software</strong> Eng<strong>in</strong>eer<strong>in</strong>g and Methodology, Vol. 11, No. 1, January 2002.


<strong>Model<strong>in</strong>g</strong> <strong>Software</strong> <strong>Architectures</strong> <strong>in</strong> UML • 41first event assigns an account ?A1 to a customer ?C1 and <strong>the</strong> second assignsan account ?A2 to a customer ?C2, with ?A1 and ?A2 be<strong>in</strong>g equal (<strong>the</strong>rebydisallow<strong>in</strong>g <strong>the</strong> assignment of <strong>the</strong> same account to multiple customers).Additional component <strong>in</strong>terface types would be declared to complete <strong>the</strong> specificationof <strong>the</strong> bank<strong>in</strong>g system’s components, and <strong>the</strong>n <strong>in</strong>stances of <strong>the</strong> typeswould be declared <strong>in</strong> a Rapide architecture declaration to specify <strong>the</strong> configurationof <strong>the</strong> component <strong>in</strong>stances.For <strong>the</strong> rema<strong>in</strong>der of this section we focus <strong>in</strong> detail on <strong>the</strong> representationof Rapide component behaviors <strong>in</strong> UML. We will <strong>the</strong>n conclude with a briefdiscussion of o<strong>the</strong>r features of Rapide.5.3.1 Represent<strong>in</strong>g Rapide Event Patterns <strong>in</strong> UML. There is a natural correspondencebetween events <strong>in</strong> Rapide and signals <strong>in</strong> UML state diagrams.Hence we can use UML signals to model events <strong>in</strong> our extensions for Rapide.Like a Rapide event, a UML signal corresponds to an atomic occurrence <strong>in</strong>time, is associated with a set of parameters of arbitrary type, is associated witha s<strong>in</strong>gle component (i.e., UML class), is generated by a component (as a sendaction) as part of <strong>the</strong> execution of its state mach<strong>in</strong>e, and can be observed bya component (as a signal event) dur<strong>in</strong>g <strong>the</strong> execution of its state mach<strong>in</strong>e. Asignal is observed or sent by a component thread asynchronously with respectto <strong>the</strong> execution of o<strong>the</strong>r threads <strong>in</strong> <strong>the</strong> same or o<strong>the</strong>r components. A signal maybe broadcast to multiple components and hence is observable by multiple components(and possibly at multiple places with<strong>in</strong> a component state mach<strong>in</strong>e),although a particular <strong>in</strong>stance of a signal is observed at most once by any onestate mach<strong>in</strong>e thread.A signal event typically triggers a transition <strong>in</strong> <strong>the</strong> state mach<strong>in</strong>e of a component,and a send action is typically executed as a response. Therefore, we canmodel Rapide component behaviors (i.e., <strong>the</strong> set of state transition rules associatedwith a Rapide component) as UML state mach<strong>in</strong>es whose transitionsare associated with signal event triggers and send actions that correspond to<strong>in</strong>dividual Rapide events. The state mach<strong>in</strong>e notation <strong>in</strong> UML is rich enoughto model all of <strong>the</strong> compound event patterns that can be specified <strong>in</strong> Rapide,and thus we represent compound event patterns with correspond<strong>in</strong>g compositestates <strong>in</strong> <strong>the</strong> UML state mach<strong>in</strong>es. Fur<strong>the</strong>rmore, <strong>the</strong> trigger of a state mach<strong>in</strong>etransition can be constra<strong>in</strong>ed by a Boolean guard condition, and <strong>in</strong> this way wecan model <strong>the</strong> guards on Rapide event patterns.Figure 17 sketches a state mach<strong>in</strong>e illustrat<strong>in</strong>g <strong>the</strong> basic approach to model<strong>in</strong>gRapide component behaviors <strong>in</strong> UML. The figure shows a state mach<strong>in</strong>e fora component hav<strong>in</strong>g m state transition rules and n constra<strong>in</strong>ts, with <strong>the</strong> set ofrules form<strong>in</strong>g one substate and each constra<strong>in</strong>t form<strong>in</strong>g an additional parallelsubstate. Each parallel substate is designed as a loop<strong>in</strong>g mach<strong>in</strong>e, to reflect <strong>the</strong>fact that rules are selected and executed repeatedly (until <strong>the</strong> component term<strong>in</strong>ates),and <strong>the</strong> fact that constra<strong>in</strong>ts are checked repeatedly. Fur<strong>the</strong>rmore,each state represent<strong>in</strong>g a rule or constra<strong>in</strong>t <strong>in</strong> Figure 17 <strong>in</strong> actuality comprisesan appropriate composition of nested substates and transitions that models itsassociated pattern of events <strong>in</strong> a manner similar to <strong>the</strong> patterns def<strong>in</strong>ed forWright <strong>in</strong> Table II. With<strong>in</strong> <strong>the</strong> parallel substate for <strong>the</strong> rules, <strong>the</strong> mach<strong>in</strong>e isACM Transactions on <strong>Software</strong> Eng<strong>in</strong>eer<strong>in</strong>g and Methodology, Vol. 11, No. 1, January 2002.


42 • N. Medvidovic et al.Fig. 17. State mach<strong>in</strong>e template for model<strong>in</strong>g Rapide component behaviors and behavior constra<strong>in</strong>ts<strong>in</strong> UML.designed so that one rule at a time is fired, with <strong>the</strong> choice of rule be<strong>in</strong>g nondeterm<strong>in</strong>istic.With<strong>in</strong> <strong>the</strong> parallel substates for each constra<strong>in</strong>t, a special signalis used to represent <strong>the</strong> violation of <strong>the</strong> constra<strong>in</strong>t.Figure 18 shows how <strong>the</strong> general form of Figure 17 would be <strong>in</strong>stantiated for<strong>the</strong> Bank component described previously. The top parallel substate represents<strong>the</strong> three state transition rules of <strong>the</strong> Bank component. The middle and bottomparallel substates represent <strong>the</strong> first and second constra<strong>in</strong>ts, respectively, of <strong>the</strong>Bank component. Note that <strong>the</strong> updates to local state variables <strong>in</strong> <strong>the</strong> Rapidestate transition rules are represented by entry actions <strong>in</strong> <strong>in</strong>termediate states(i.e., <strong>the</strong> states between <strong>the</strong> transitions represent<strong>in</strong>g <strong>the</strong> rule triggers and <strong>the</strong>events of <strong>the</strong> rule bodies). As shown <strong>in</strong> <strong>the</strong> f<strong>in</strong>al transitions of <strong>the</strong> middle andbottom parallel substates, <strong>the</strong> signal Constra<strong>in</strong>t Violation is used to represent<strong>the</strong> violation of <strong>the</strong> associated constra<strong>in</strong>t. The bottom parallel substateillustrates <strong>the</strong> representation of a Rapide composite event pattern, <strong>in</strong> this case,a sequence of two events. The sequenc<strong>in</strong>g of <strong>the</strong> constra<strong>in</strong>t is reflected <strong>in</strong> <strong>the</strong>sequenc<strong>in</strong>g of <strong>the</strong> two UML transitions through an <strong>in</strong>termediate state.Construction of a state mach<strong>in</strong>e such as <strong>the</strong> one shown <strong>in</strong> Figure 18 raisesa number of additional problems that must be dealt with <strong>in</strong> <strong>the</strong> representationof Rapide event patterns <strong>in</strong> UML. We discuss <strong>the</strong>se problems next.5.3.2 Represent<strong>in</strong>g Rapide Variables and Placeholders <strong>in</strong> UML. The firstserious problem we encountered is how to represent variables and placeholdersdeclared <strong>in</strong> a Rapide component specification. Local variables declared <strong>in</strong>sidea component (such as Accounts and Last <strong>in</strong> <strong>the</strong> Bank component) can be represented<strong>in</strong> UML as private attributes of <strong>the</strong> associated class. Thus, Accountsand Last would be declared as private attributes of <strong>the</strong> UML class represent<strong>in</strong>g<strong>the</strong> Bank component, reduc<strong>in</strong>g <strong>the</strong> problem to representation of placeholdersdeclared with<strong>in</strong> Rapide state transition rules and constra<strong>in</strong>ts.In a UML state mach<strong>in</strong>e, a simple variable mentioned on a transition and noto<strong>the</strong>rwise declared as an attribute of <strong>the</strong> associated class is visible only to thattransition and its target state. However, <strong>the</strong> scope of <strong>the</strong> placeholders declared<strong>in</strong> <strong>the</strong> Rapide state transition rules and constra<strong>in</strong>ts extends throughout <strong>the</strong>associated rule or constra<strong>in</strong>t. To represent this larger scope of <strong>the</strong> placeholders<strong>in</strong> <strong>the</strong> UML state mach<strong>in</strong>e, <strong>the</strong> placeholder names must be qualified to clarifyACM Transactions on <strong>Software</strong> Eng<strong>in</strong>eer<strong>in</strong>g and Methodology, Vol. 11, No. 1, January 2002.


<strong>Model<strong>in</strong>g</strong> <strong>Software</strong> <strong>Architectures</strong> <strong>in</strong> UML • 43Fig. 18.UML state mach<strong>in</strong>e representation of Rapide Bank component.<strong>the</strong>ir scope. Fur<strong>the</strong>rmore, <strong>in</strong> order to segregate <strong>the</strong> scopes of <strong>the</strong> variables foreach state transition rule and constra<strong>in</strong>t, <strong>the</strong> portion of <strong>the</strong> UML state mach<strong>in</strong>erepresent<strong>in</strong>g each rule and constra<strong>in</strong>t must be represented by its own namedsubstate, as demonstrated <strong>in</strong> Figure 18.For <strong>in</strong>stance, <strong>the</strong> second state transition rule of <strong>the</strong> Bank component declaresa placeholder ?A and uses it <strong>in</strong> <strong>the</strong> Deposit event <strong>in</strong> <strong>the</strong> rule trigger, <strong>in</strong><strong>the</strong> New Balance event <strong>in</strong> <strong>the</strong> rule body, and <strong>in</strong> <strong>the</strong> update to <strong>the</strong> Accountsarray <strong>in</strong> <strong>the</strong> rule body. To achieve <strong>the</strong> desired effect <strong>in</strong> UML, <strong>the</strong> variablerepresent<strong>in</strong>g <strong>the</strong> placeholder ?A is named Rule2::A <strong>in</strong> all cases <strong>in</strong> substateACM Transactions on <strong>Software</strong> Eng<strong>in</strong>eer<strong>in</strong>g and Methodology, Vol. 11, No. 1, January 2002.


44 • N. Medvidovic et al.Rule2. Us<strong>in</strong>g <strong>the</strong> unqualified name A everywhere with<strong>in</strong> substate Rule2 wouldcause one variable named A to be associated with <strong>the</strong> Deposit transition anda different variable named A to be associated with <strong>the</strong> New Balance transition,<strong>the</strong>reby los<strong>in</strong>g <strong>the</strong> b<strong>in</strong>d<strong>in</strong>g of <strong>the</strong> A used <strong>in</strong> New Balance to <strong>the</strong> A used<strong>in</strong> Deposit.These subtleties <strong>in</strong>volv<strong>in</strong>g variables <strong>in</strong> UML are a consequence of UML’ssemantics of namespaces, which are associated with many different k<strong>in</strong>ds ofmodel elements. However, we were unable to determ<strong>in</strong>e from <strong>the</strong> UML specification[Object Management Group 2000] whe<strong>the</strong>r our use of variable nam<strong>in</strong>gdescribed here actually achieves <strong>the</strong> desired effect, <strong>in</strong>clud<strong>in</strong>g both <strong>the</strong> implicitdeclaration of variable A <strong>in</strong> Rule2’s namespace and <strong>the</strong> b<strong>in</strong>d<strong>in</strong>g behavior <strong>in</strong>ducedby <strong>the</strong> placeholder semantics of Rapide.5.3.3 Represent<strong>in</strong>g Multiple Matches of Rapide Event Patterns <strong>in</strong> UML.The framework described above for represent<strong>in</strong>g Rapide events and event patterns<strong>in</strong> UML is complicated fur<strong>the</strong>r by <strong>the</strong> fact that <strong>the</strong>re may be multiplecandidate sets of events that can form a partial match of a Rapide event pattern.All such sets must be ma<strong>in</strong>ta<strong>in</strong>ed until a complete match is found. Thisapplies both to <strong>the</strong> selection of a particular state transition rule to fire andto <strong>the</strong> detection of all possible constra<strong>in</strong>t violations. Hence, <strong>the</strong> UML statemach<strong>in</strong>e represent<strong>in</strong>g an event pattern must be constructed <strong>in</strong> such a waythat it is “re-entrant” <strong>in</strong> a manner correspond<strong>in</strong>g to <strong>the</strong> match<strong>in</strong>g semanticsof Rapide.We use recursive submach<strong>in</strong>e state references <strong>in</strong> a UML state diagram torepresent <strong>the</strong> re-entrant behavior of Rapide event patterns. A submach<strong>in</strong>e statereference is a pseudostate that references ano<strong>the</strong>r state mach<strong>in</strong>e by name, with<strong>the</strong> semantics be<strong>in</strong>g that <strong>the</strong> named state mach<strong>in</strong>e is expanded <strong>in</strong> place of <strong>the</strong>reference. 7 Essentially, once <strong>the</strong>re is a match for a s<strong>in</strong>gle event of a larger eventpattern, <strong>the</strong> state mach<strong>in</strong>e represent<strong>in</strong>g <strong>the</strong> pattern must be re-entered to allowsubsequent matches of <strong>the</strong> full pattern.Figure 19 illustrates how a submach<strong>in</strong>e state reference is used <strong>in</strong> <strong>the</strong>representation of a Rapide constra<strong>in</strong>t. The figure presents an improvedversion of substate Constra<strong>in</strong>t2 of Figure 18, which represents <strong>the</strong> secondconstra<strong>in</strong>t of <strong>the</strong> Bank component. The improved version uses a recursivereference to Constra<strong>in</strong>t2 (<strong>the</strong> <strong>in</strong>clude clause), <strong>the</strong>reby allow<strong>in</strong>g multipleparallel attempts to match <strong>the</strong> constra<strong>in</strong>t, one for every occurrence of anAssign Account event.Rapide state transition rules can be treated <strong>in</strong> a similar manner, except thata complete match of one rule’s trigger term<strong>in</strong>ates any partial matches for o<strong>the</strong>rrules. Although not shown here, <strong>the</strong> term<strong>in</strong>ation can be achieved with judicioususe of signals.5.3.4 Represent<strong>in</strong>g Rapide Event Causality <strong>in</strong> UML. Our representationalframework for Rapide events is complicated still fur<strong>the</strong>r by <strong>the</strong> need to ma<strong>in</strong>ta<strong>in</strong><strong>in</strong>formation about <strong>the</strong> causal order<strong>in</strong>g of events <strong>in</strong> Rapide. The problems <strong>in</strong>7 It is not clear whe<strong>the</strong>r <strong>the</strong> UML semantics [Object Management Group 2000] actually allowssubmach<strong>in</strong>e state references to be recursive, and we know of no UML tools that support <strong>the</strong>m.ACM Transactions on <strong>Software</strong> Eng<strong>in</strong>eer<strong>in</strong>g and Methodology, Vol. 11, No. 1, January 2002.


<strong>Model<strong>in</strong>g</strong> <strong>Software</strong> <strong>Architectures</strong> <strong>in</strong> UML • 45Fig. 19.Use of submach<strong>in</strong>e state reference <strong>in</strong> UML representation of Rapide constra<strong>in</strong>ts.ma<strong>in</strong>ta<strong>in</strong><strong>in</strong>g <strong>in</strong>formation about causality <strong>in</strong> distributed systems are well known[Lamport 1978]. The traditional solution for explicitly represent<strong>in</strong>g <strong>the</strong> partialorder of a set of events is to associate a vector timestamp with each event [Fidge1991]. In UML, many of <strong>the</strong> more subtle nuances of event order<strong>in</strong>g semanticsare left unspecified, or are specified very loosely [Object Management Group2000]. In particular, we <strong>in</strong>terpret <strong>the</strong> semantics of UML (especially <strong>the</strong> semanticsof event queues for state mach<strong>in</strong>es) as allow<strong>in</strong>g one component to sendsignals <strong>in</strong> one order and ano<strong>the</strong>r component to observe <strong>the</strong> signals <strong>in</strong> a completelydifferent order, with no means for avoid<strong>in</strong>g deadlock <strong>in</strong> <strong>the</strong> observ<strong>in</strong>gcomponent. Hence, signals <strong>in</strong> UML do not respect typical notions of causality. InRapide, however, an event pattern may specify that, say, a sequence of causallyordered events is to be matched, or that a set of events that are not causallyordered is to be matched; <strong>the</strong> Rapide runtime system will ga<strong>the</strong>r <strong>the</strong> necessary<strong>in</strong>formation about <strong>the</strong> generated events and <strong>the</strong>ir causal relationships <strong>in</strong> orderto perform <strong>the</strong> match as specified.There are a number of possible approaches to address<strong>in</strong>g causality <strong>in</strong> UML.One approach would be to ignore causality, forgo <strong>the</strong> possibility of constra<strong>in</strong><strong>in</strong>gcomponent behaviors with respect to causally related events, and simply acceptUML’s “looser” semantics for event order<strong>in</strong>g. A second approach would beto specify and use vector timestamps as additional model elements for encod<strong>in</strong>g<strong>the</strong> partial order with<strong>in</strong> <strong>the</strong> signals used <strong>in</strong> a UML model; OCL stereotypeswould be needed to formalize <strong>the</strong> semantics of <strong>the</strong> vector timestamps and to ensure<strong>the</strong>ir consistent and correct use across <strong>the</strong> model. A third approach wouldbe to specify an additional model element that is <strong>the</strong> equivalent of <strong>the</strong> Rapideruntime system; this would still require <strong>the</strong> declaration and use of additional<strong>in</strong>formation <strong>in</strong> <strong>the</strong> signals used <strong>in</strong> a UML model.Each of <strong>the</strong>se approaches has its strengths and weaknesses, but <strong>the</strong>y allshare <strong>the</strong> disadvantage of greatly complicat<strong>in</strong>g <strong>the</strong> result<strong>in</strong>g models. This suggeststhat causality among events is an architectural concern that simply cannotbe represented <strong>in</strong> UML <strong>in</strong> a straightforward manner at <strong>the</strong> present time.While we <strong>in</strong>tend to explore <strong>the</strong>se possibilities <strong>in</strong> greater detail <strong>in</strong> <strong>the</strong> future, weare hopeful that future versions of UML will <strong>in</strong>corporate a more precise andcomprehensive semantics for event order<strong>in</strong>g.5.3.5 Discussion of Rapide Extensions. This section has focused on represent<strong>in</strong>gRapide’s features for event-based behavioral model<strong>in</strong>g of architecturalACM Transactions on <strong>Software</strong> Eng<strong>in</strong>eer<strong>in</strong>g and Methodology, Vol. 11, No. 1, January 2002.


46 • N. Medvidovic et al.components. Rapide is a large language that conta<strong>in</strong>s a number of additionalfeatures, <strong>in</strong>clud<strong>in</strong>g features for encapsulat<strong>in</strong>g specifications <strong>in</strong> reusablemodules and for specify<strong>in</strong>g component behaviors with traditional proceduralstatements. Representation of <strong>the</strong>se features should be straightforward <strong>in</strong>UML, and hence we have ignored <strong>the</strong>m here.Rapide differs from o<strong>the</strong>r ADLs <strong>in</strong> a number of ways. First, Rapide does notsupport a notion of connectors as first class architectural elements. Instead,connection rules are used to specify <strong>in</strong>teractions between components. In particular,a connection rule is def<strong>in</strong>ed as part of a Rapide architecture declaration,and it specifies how events generated by one set of components are connectedto events observed by ano<strong>the</strong>r set of components. Hence, <strong>the</strong> configuration of anarchitecture <strong>in</strong> Rapide is implicit, aris<strong>in</strong>g as a result of <strong>the</strong> fir<strong>in</strong>g of <strong>the</strong> architecture’sconnection rules. Many of <strong>the</strong> concepts underly<strong>in</strong>g architectural connectionrules are similar to those underly<strong>in</strong>g component state transition rules.Hence, <strong>the</strong>ir representation <strong>in</strong> UML would be similar. The ma<strong>in</strong> difference isthat, with Rapide components represented as UML classes, and with Rapidecomponent behaviors represented as UML state mach<strong>in</strong>es, <strong>the</strong> representationof Rapide connection rules <strong>in</strong> UML requires <strong>the</strong> association of signals sent byone component’s state mach<strong>in</strong>e with <strong>the</strong> signals received by ano<strong>the</strong>r’s state mach<strong>in</strong>e.However, while UML provides syntactic mechanisms for achiev<strong>in</strong>g suchassociations, <strong>the</strong> semantics of <strong>the</strong> result<strong>in</strong>g composite behavior is problematic,as described <strong>in</strong> Section 5.3.4.As discussed above, Rapide’s model of events and event patterns has manynatural analogs <strong>in</strong> <strong>the</strong> features of UML state diagrams. This is not too surpris<strong>in</strong>gs<strong>in</strong>ce UML state diagrams are based on statecharts [Harel 1987]. BothRapide and statecharts are suited to specify<strong>in</strong>g <strong>the</strong> behavior of reactive systems,and both exploit <strong>the</strong> complementary functions provided by events and states <strong>in</strong>operational models of behavior. But <strong>in</strong> constra<strong>in</strong><strong>in</strong>g UML to represent Rapide,we were confronted by a number of semantic ambiguities and limitations ofUML, especially <strong>in</strong> its semantics for state diagrams. These problems suggestthat, <strong>in</strong> general, <strong>the</strong> semantics of UML will need to be made more precise <strong>in</strong>order to support model<strong>in</strong>g of certa<strong>in</strong> k<strong>in</strong>ds of architectural concerns.6. RELATED WORKUML represents a maturation <strong>in</strong> <strong>the</strong> development of object-oriented designnotations. It offers a diverse collection of notations for captur<strong>in</strong>g many aspectsof <strong>the</strong> software development lifecycle, <strong>in</strong>clud<strong>in</strong>g not only traditionaldesign concerns (such as functional decomposition), but also aspects of requirementsanalysis (particularly doma<strong>in</strong> model<strong>in</strong>g), implementation, andtest<strong>in</strong>g (particularly scenario-based functional test<strong>in</strong>g). This paper has describedapproaches to overcom<strong>in</strong>g a key weakness of UML, its lack of adequatesupport for model<strong>in</strong>g software architectural concerns. In this sectionwe discuss related work, <strong>in</strong>clud<strong>in</strong>g techniques for exploit<strong>in</strong>g <strong>the</strong> architecturalmodel<strong>in</strong>g capabilities of one language with<strong>in</strong> ano<strong>the</strong>r language, and work onimprov<strong>in</strong>g <strong>the</strong> semantic basis and model<strong>in</strong>g features of UML and o<strong>the</strong>r objectorientednotations.ACM Transactions on <strong>Software</strong> Eng<strong>in</strong>eer<strong>in</strong>g and Methodology, Vol. 11, No. 1, January 2002.


<strong>Model<strong>in</strong>g</strong> <strong>Software</strong> <strong>Architectures</strong> <strong>in</strong> UML • 476.1 Architectural InterchangeThis paper has described two strategies for provid<strong>in</strong>g software architects witha variety of architecture model<strong>in</strong>g capabilities <strong>in</strong> a s<strong>in</strong>gle, widely used notation.One common thread between <strong>the</strong> two strategies is <strong>the</strong>ir attempt at leverag<strong>in</strong>gstandardization—f<strong>in</strong>d<strong>in</strong>g and exploit<strong>in</strong>g a base notation (UML) that is generalenough to capture needed capabilities without provid<strong>in</strong>g too many opportunitiesfor <strong>in</strong>compatibilities or add<strong>in</strong>g too much complexity. The software architectureresearch community has attempted a different approach to support<strong>in</strong>g<strong>the</strong> diverse needs of architects, namely, architectural <strong>in</strong>terchange, asawayoftolerat<strong>in</strong>g <strong>the</strong> existence and use of multiple, <strong>in</strong>compatible notations. In particular,architectural <strong>in</strong>terchange is <strong>in</strong>tended to allow architects to move betweendifferent ADLs so that <strong>the</strong>y need not all agree to use a s<strong>in</strong>gle, standard ADL.ACME is an architecture <strong>in</strong>terchange language that is <strong>in</strong>tended to supportautomatic transformation of a system modeled <strong>in</strong> one ADL to an equivalentmodel <strong>in</strong> ano<strong>the</strong>r ADL [Garlan et al. 1997]. This allows architects to model andanalyze <strong>the</strong>ir system architecture <strong>in</strong> one ADL and <strong>the</strong>n translate <strong>the</strong> model toano<strong>the</strong>r ADL for fur<strong>the</strong>r analysis. ACME’s approach is easier than provid<strong>in</strong>g directmapp<strong>in</strong>gs between pairs of ADLs because <strong>the</strong> ACME language serves as an<strong>in</strong>termediate step and provides additional tool support. ACME’s architecturalontology plays a role analogous to UML’s meta model; however, ACME’s ontologyis smaller than UML’s meta model and focuses only on structural aspectsof architectures.Full realization of ACME’s goals presents a number of challenges. Complete,automated translation among a set of ADLs requires a set of semantic mapp<strong>in</strong>gsthat <strong>in</strong>volve every concept of every ADL <strong>in</strong> <strong>the</strong> set, which may not be possiblegiven that different ADLs address different system aspects and have differentsemantics. The translation approach depends on exploit<strong>in</strong>g constructs commonto every ADL. At this po<strong>in</strong>t, <strong>the</strong> evident commonalities are syntactic ra<strong>the</strong>rthan semantic [Medvidovic and Taylor 2000]. Fur<strong>the</strong>rmore, a study by Di Nittoand Rosenblum demonstrated wide variation and little overlap <strong>in</strong> <strong>the</strong> abilitiesof ADLs to support model<strong>in</strong>g of architectural styles <strong>in</strong>duced by common middleware<strong>in</strong>frastructures [Di Nitto and Rosenblum 1999], suggest<strong>in</strong>g that <strong>the</strong>reis little <strong>in</strong> <strong>the</strong> way of semantic commonality among ADLs to be <strong>in</strong>terchanged.For <strong>the</strong>se reasons, ACME emphasizes a partial and <strong>in</strong>cremental approach.The approach discussed <strong>in</strong> this paper does not use translation between notations,but ra<strong>the</strong>r is based on a core model (Strategies 1 and 2), possibly withseveral <strong>in</strong>dependent extensions (Strategy 2). In us<strong>in</strong>g a core model and extensions,<strong>the</strong> question arises of what should be <strong>in</strong> <strong>the</strong> core and what should beleft to extensions. Technical considerations play some role <strong>in</strong> this decision. Forexample, ACME’s simple architectural ontology has <strong>the</strong> potential to ease toolbuild<strong>in</strong>g, whereas UML’s larger meta-model presents a higher barrier. Developmentprocesses also <strong>in</strong>fluence <strong>the</strong> core model. For example, object-orienteddesign and use cases are widely used by practitioners and directly relate today-to-day development activities. We choose UML as our core model becauseit is grounded <strong>in</strong> ma<strong>in</strong>stream development practices, already has substantial(and grow<strong>in</strong>g) tool support, and provides explicit extension mechanisms.ACM Transactions on <strong>Software</strong> Eng<strong>in</strong>eer<strong>in</strong>g and Methodology, Vol. 11, No. 1, January 2002.


48 • N. Medvidovic et al.6.2 <strong>Architectures</strong> as Collections of ViewsThe work described <strong>in</strong> this paper focuses on a set of approaches to softwarearchitectures that has emerged from one part of <strong>the</strong> research community: specificationof structural and behavioral aspects of a software system centeredaround a (formal) notation, an ADL. Ano<strong>the</strong>r part of <strong>the</strong> community has triedto identify useful architectural perspectives, or views. A model expressed <strong>in</strong> anADL essentially provides a s<strong>in</strong>gle view of an architecture, which is typically formal.In contrast, <strong>the</strong> views constructed <strong>in</strong> multiple-view approaches are often<strong>in</strong>formal or semiformal. Two representative examples of work with multipleviews are provided by Kruchten [1995] and Soni et al. [1995].Kruchten [1995] presented <strong>the</strong> 4 + 1 view model of software architectures.The four ma<strong>in</strong> views are <strong>the</strong> conceptual, static, dynamic, and physical views.Toge<strong>the</strong>r, <strong>the</strong>se views capture a software system’s architecture. Kruchten [1995]provides system usage scenarios, similar to UML’s use cases, as <strong>the</strong> fifth viewto relate <strong>the</strong> o<strong>the</strong>r four.Similarly, Soni et al. [1995] identified four structural categories of softwarearchitectures—conceptual, module <strong>in</strong>terconnection, execution, and code. Themodule <strong>in</strong>terconnection view is a ref<strong>in</strong>ement of <strong>the</strong> conceptual view; it providesa functional and layered decomposition of <strong>the</strong> system. The executionand code views closely correspond to Kruchten’s [1995] dynamic and staticviews, respectively.Although <strong>the</strong>se approaches are <strong>in</strong> certa<strong>in</strong> ways more comprehensive thanADL-centered approaches, <strong>the</strong> strategies for model<strong>in</strong>g architectures <strong>in</strong> UMLdescribed <strong>in</strong> this paper are applicable to <strong>the</strong> multiple-view approaches aswell. Indeed, Soni et al. [1995] demonstrated how UML can be constra<strong>in</strong>ed tomodel <strong>the</strong>ir four architectural views [Hofmeister et al. 2000]. Their approachis an <strong>in</strong>stance of our Strategy 2, whereby UML constructs are stereotyped tomodel architectural constructs. The strategy and examples we presented <strong>in</strong>Section 5 go beyond <strong>the</strong>ir approach <strong>in</strong> that we also use OCL to formally specify<strong>the</strong> stereotypes.6.3 O<strong>the</strong>r Work with UML and Design NotationsIn addition to <strong>the</strong> work of Soni et al. [1995] with UML mentioned above, fouro<strong>the</strong>r related efforts with object-oriented design notations deserve mention.Recently, Garlan and Kompanek [2000] conducted a study whose goal wasto enumerate and evaluate different options an architect has <strong>in</strong> select<strong>in</strong>g UMLmodel<strong>in</strong>g constructs to represent architectural structure (i.e., components, connectors,systems, and styles). Unlike our choice of (stereotyped) UML classesand class <strong>in</strong>stances to represent architectural elements, Garlan and Kompanek[2000] <strong>in</strong>vestigated five possibilities: UML classes as architectural types andobjects as <strong>the</strong>ir <strong>in</strong>stances; UML stereotypes as types and classes as <strong>in</strong>stances;UML classes as both types and <strong>in</strong>stances; UML components; and UML subsystems(stereotyped UML packages). Their study shows that, while each of <strong>the</strong>five choices has its merits, none of <strong>the</strong>m is an ideal fit for <strong>the</strong> needs of softwarearchitectures <strong>in</strong> terms of semantic match, understandability, or completeness.ACM Transactions on <strong>Software</strong> Eng<strong>in</strong>eer<strong>in</strong>g and Methodology, Vol. 11, No. 1, January 2002.


<strong>Model<strong>in</strong>g</strong> <strong>Software</strong> <strong>Architectures</strong> <strong>in</strong> UML • 49While our work has also focused on nonstructural aspects of architectures (behaviors,<strong>in</strong>teractions, and constra<strong>in</strong>ts), we view Garlan and Kompanek’s [2000]study as a useful extension to <strong>the</strong> work presented <strong>in</strong> this paper.The work that is perhaps most similar to our own is <strong>the</strong> tailor<strong>in</strong>g of UML tosupport real-time systems development. Selic [1999] and Selic and Rumbaugh[2000] described <strong>the</strong> use of stereotypes to augment UML with architecture model<strong>in</strong>gconstructs borrowed from <strong>the</strong> Real-Time Object-Oriented Method (ROOM)[Selic et al. 1994]. The ma<strong>in</strong> architectural build<strong>in</strong>g block <strong>in</strong> this approach is<strong>the</strong> capsule (i.e., a simple or compound component), which provides one or moreports to support <strong>in</strong>teraction with o<strong>the</strong>r capsules (<strong>in</strong>clud<strong>in</strong>g nested subcapsules).Ports of different capsules are connected via connectors (which capture <strong>in</strong>teractionrelationships between capsules and which resemble simple attachmentsbetween architectural elements found <strong>in</strong> ADLs). UML collaboration diagramsare used to model an architecture as a configuration of capsules. Behavior ismodeled <strong>in</strong> this approach as protocols, which are specified by stereotypes thatidentify a protocol and its protocol roles. UML state mach<strong>in</strong>es are used to specifybehavioral models of capsule and protocol implementations, for which <strong>the</strong>UML state mach<strong>in</strong>e notation has been augmented with a stereotype for a cha<strong>in</strong>state construct (a degenerate form of state used to cha<strong>in</strong> transitions between<strong>in</strong>ternal states of different compound states). Instances of all <strong>the</strong>se newly <strong>in</strong>troducedarchitectural constructs are specified as stereotyped <strong>in</strong>stances of exist<strong>in</strong>gUML meta model elements, so that <strong>the</strong> result<strong>in</strong>g models are still valid UML.Hence, this approach is a successful <strong>in</strong>stance of our Strategy 2, and we view itas an <strong>in</strong>dependent confirmation of <strong>the</strong> utility of that strategy.Cheng and colleagues have worked on streng<strong>the</strong>n<strong>in</strong>g <strong>the</strong> formal underp<strong>in</strong>n<strong>in</strong>gsof OMT (<strong>the</strong> Object <strong>Model<strong>in</strong>g</strong> Technique), a precursor to UML [Bourdeauand Cheng 1995; Wang et al. 1997]. In particular, <strong>the</strong>y described an approach toderiv<strong>in</strong>g algebraic specifications from OMT models (<strong>in</strong> particular, Larch specificationsfrom OMT object models [Bourdeau and Cheng 1995] and LOTOS specificationsfrom OMT dynamic models [Wang et al. 1997]). The derived specificationscan <strong>the</strong>n be subjected to rigorous, automated analyses for design errors,<strong>in</strong>clud<strong>in</strong>g <strong>in</strong>consistencies between <strong>the</strong> associated object and dynamic views.While not specifically address<strong>in</strong>g architectural concerns, <strong>the</strong>ir research wasvery much <strong>in</strong> <strong>the</strong> spirit of research on ADLs, which has attempted to createlanguages with precise formal semantics to enable early analysis of architecturalmodels. However, while Cheng’s work <strong>in</strong>volved deriv<strong>in</strong>g separate formalmodels from an object-oriented notation, our work <strong>in</strong>volves enhanc<strong>in</strong>g such anotation with well-def<strong>in</strong>ed architecture model<strong>in</strong>g capabilities.The creators of UML have developed a process model, <strong>the</strong> <strong>Unified</strong> <strong>Software</strong>Process, for apply<strong>in</strong>g UML <strong>in</strong> object-oriented analysis and design [Jacobsonet al. 1999; Kruchten 1998]. The <strong>Unified</strong> <strong>Software</strong> Process is oriented towardearly development of an architecture from use cases. It is worth not<strong>in</strong>g that <strong>the</strong><strong>Unified</strong> <strong>Software</strong> Process is supported by a UML profile compris<strong>in</strong>g a number ofUML stereotypes and tagged values—much like <strong>the</strong> approach described <strong>in</strong> thispaper—but also requires additional graphical notation beyond what UML provides(along <strong>the</strong> l<strong>in</strong>es of our Strategy 3, described <strong>in</strong> Section 3.3). In <strong>the</strong> <strong>Unified</strong><strong>Software</strong> Process, <strong>the</strong> architecture description of a system is a cross-section ofACM Transactions on <strong>Software</strong> Eng<strong>in</strong>eer<strong>in</strong>g and Methodology, Vol. 11, No. 1, January 2002.


50 • N. Medvidovic et al.<strong>the</strong> “architecturally significant” elements of <strong>the</strong> models <strong>in</strong> <strong>the</strong> architecture basel<strong>in</strong>e.The architecture basel<strong>in</strong>e comprises early versions of <strong>the</strong> use-case model,analysis model, and design model developed as part of <strong>the</strong> elaboration phase[Jacobson et al. 1997] 8 . The architecture description is developed iteratively andis considered to be fundamentally important for analyz<strong>in</strong>g and understand<strong>in</strong>g<strong>the</strong> structure, behavior, performance, and o<strong>the</strong>r global characteristics of a softwaresystem under construction. Hence, <strong>the</strong> architecture description achieves<strong>the</strong> level of importance advocated by <strong>the</strong> software architecture research community.However, <strong>the</strong> fact that <strong>the</strong> <strong>Unified</strong> <strong>Software</strong> Process considers <strong>the</strong> architectureto be an implicit attribute of exist<strong>in</strong>g UML models ra<strong>the</strong>r than anexplicit model <strong>in</strong> its own right is at odds with <strong>the</strong> accepted orthodoxy of softwarearchitecture research.7. DISCUSSION AND CONCLUSIONSFrom our experience to date, adapt<strong>in</strong>g UML to address architectural concernsseems to require reasonable effort, to be a useful complement to ADLs (and,potentially, <strong>the</strong>ir analysis tools), and to be a practical step toward ma<strong>in</strong>streamarchitectural model<strong>in</strong>g. Us<strong>in</strong>g UML has <strong>the</strong> benefits of leverag<strong>in</strong>g ma<strong>in</strong>streamtools, skills, and processes. It may also aid <strong>in</strong> <strong>the</strong> comparison of ADLs becauseit forces some implicit assumptions to be explicitly stated <strong>in</strong> common terms.F<strong>in</strong>ally, <strong>the</strong> example ADL-specific extensions performed as illustrations of oursecond strategy (Section 5) can be looked at as a basis of an evolvable, broadlyapplicable extension of UML for architectural model<strong>in</strong>g.The two strategies we describe are not without drawbacks: For each architecturalapproach and ADL, we <strong>in</strong>troduced a somewhat specialized usage convention(Strategy 1) or semantic extension (Strategy 2). Fur<strong>the</strong>rmore, our secondstrategy relied heavily on OCL, whose formality may h<strong>in</strong>der wide adoption of<strong>the</strong> strategy even though end users of <strong>the</strong> constra<strong>in</strong>ed UML model typicallywill not need to write OCL constra<strong>in</strong>ts. OCL is a part of <strong>the</strong> standard UML def<strong>in</strong>ition,and it is expected that standardized UML tools will be able to processit. However, OCL is considered an un<strong>in</strong>terpreted part of UML, and UML toolsmay not support it to <strong>the</strong> extent needed for creat<strong>in</strong>g, manipulat<strong>in</strong>g, analyz<strong>in</strong>g,and evolv<strong>in</strong>g architectural models. As serious as <strong>the</strong>se drawbacks may be, webelieve <strong>the</strong>m to be eclipsed by <strong>the</strong> potential benefits that can accrue.This effort has thus fur<strong>the</strong>red our understand<strong>in</strong>g of UML and its suitabilityfor support<strong>in</strong>g architecture-based software development. While it may notrepresent an all-<strong>in</strong>clusive study of <strong>the</strong> relationship between UML and ADLs,it has given us valuable <strong>in</strong>sights on which we <strong>in</strong>tend to base our future work.These <strong>in</strong>sights and areas of future work are discussed below.7.1 Key Insights <strong>in</strong> Relat<strong>in</strong>g UML and ADLsThere are many <strong>in</strong>sights that could be drawn from <strong>the</strong> experiences reported<strong>in</strong> this paper. In this section, we highlight six that are important from our8 Roughly speak<strong>in</strong>g, <strong>the</strong> elaboration phase is <strong>the</strong> phase <strong>in</strong> which requirements are elaborated <strong>in</strong>toan <strong>in</strong>itial design.ACM Transactions on <strong>Software</strong> Eng<strong>in</strong>eer<strong>in</strong>g and Methodology, Vol. 11, No. 1, January 2002.


<strong>Model<strong>in</strong>g</strong> <strong>Software</strong> <strong>Architectures</strong> <strong>in</strong> UML • 51broader experience with software architectures. Where appropriate, we draw<strong>the</strong> reader’s attention to specific examples, figures, and sections that have ledto a given observation.7.1.1 <strong>Software</strong> <strong>Model<strong>in</strong>g</strong> Philosophies. Nei<strong>the</strong>r UML nor ADLs constra<strong>in</strong><strong>the</strong> choice of implementation language or require that any two components beimplemented <strong>in</strong> <strong>the</strong> same language or thread of control. ADLs or styles mayassume particular communication protocols, such as C2’s asynchronous messagepass<strong>in</strong>g, and UML typically supports such restrictions (e.g., see Sections4.4 and 5.1.1). Unlike some ADLs’ component specifications, UML classes onlysupport specifications of events that may be received, but not those that maybe sent.The behavior of architectural constructs (components, connectors, communicationports, and so forth) to a large degree can be modeled with UML’s sequence,collaboration, statechart, and activity diagrams (e.g., see Figure 12 <strong>in</strong>Section 4.4). Exist<strong>in</strong>g ADLs are typically able to support only a subset of <strong>the</strong>sek<strong>in</strong>ds of semantic models [Medvidovic and Taylor 2000].7.1.2 Assumptions about Intended Usage. Like any notation, UML embodiesits creators’ assumptions about its <strong>in</strong>tended usage. “Architect<strong>in</strong>g” a system<strong>in</strong> <strong>the</strong> sense it is used <strong>in</strong> <strong>the</strong> software architecture community and <strong>in</strong>this paper—by employ<strong>in</strong>g conceptual components, connectors, and <strong>the</strong>ir configurations,exploit<strong>in</strong>g rules of specific architectural styles, and model<strong>in</strong>g localand global architectural constra<strong>in</strong>ts—was not an <strong>in</strong>tended use of UML. UML’sgenesis and its primary strength is model<strong>in</strong>g software from an object-orientedperspective, where <strong>the</strong> major system elements (components), <strong>the</strong>ir constituentbuild<strong>in</strong>g blocks (subcomponents), <strong>the</strong>ir <strong>in</strong>teractions (connectors), and <strong>the</strong> dataexchanged among <strong>the</strong>m are all represented <strong>in</strong> <strong>the</strong> same way—as objects. Fur<strong>the</strong>rmore,UML embodies a philosophy of maximum flexibility <strong>in</strong> <strong>the</strong> use of <strong>the</strong>notation by designers and developers, which necessarily comes at a loss of someformality and rigor. This would appear to conflict with <strong>the</strong> expectations ADLpurveyors have about <strong>the</strong> level of formality desired or needed by practic<strong>in</strong>gsoftware designers. For <strong>the</strong>se reasons, while one can <strong>in</strong>deed focus on <strong>the</strong> differentarchitecturally relevant perspectives when model<strong>in</strong>g a system <strong>in</strong> UML,a software architect may f<strong>in</strong>d that <strong>the</strong> support for those perspectives providedby UML only partially satisfies his/her needs (as shown throughout <strong>the</strong> paper,but especially <strong>in</strong> Sections 4 and 5).7.1.3 Problem Doma<strong>in</strong> <strong>Model<strong>in</strong>g</strong>. UML provides extensive support formodel<strong>in</strong>g a problem doma<strong>in</strong> (e.g., see Figure 8 <strong>in</strong> Section 4.4). On <strong>the</strong> o<strong>the</strong>rhand, architectural models described <strong>in</strong> ADLs often hide much of <strong>the</strong> <strong>in</strong>formationpresent <strong>in</strong> a doma<strong>in</strong> model, as seen <strong>in</strong> Section 4. This can be considered ashortcom<strong>in</strong>g of ADLs given that a doma<strong>in</strong> model is considered to be a centerpieceof a large category of software architecture models, namely, doma<strong>in</strong>-specificsoftware architectures (DSSA) [Tracz 1995]. <strong>Model<strong>in</strong>g</strong> all <strong>the</strong> relevant <strong>in</strong>formationearly <strong>in</strong> <strong>the</strong> development lifecycle is crucial to <strong>the</strong> success of a softwareproject. Therefore, a doma<strong>in</strong> model should be considered a useful architecturalcomplement [Medvidovic and Rosenblum 1997; Tracz 1995].ACM Transactions on <strong>Software</strong> Eng<strong>in</strong>eer<strong>in</strong>g and Methodology, Vol. 11, No. 1, January 2002.


52 • N. Medvidovic et al.7.1.4 Architectural Abstractions. Some concepts of software architecturesare very different from those of UML (and of object-oriented design <strong>in</strong> general).Connectors are first-class entities <strong>in</strong> many ADLs. As demonstrated <strong>in</strong> this paper,<strong>the</strong> functionality of a connector can typically be abstracted by a class or component(e.g., see Figure 10 <strong>in</strong> Section 4.4, and Sections 5.1.3, 5.2.2, and 5.2.3).However, connectors may have properties that are not directly supported by aUML class. For example, <strong>the</strong> <strong>in</strong>terfaces of C2 connectors are context-reflective;our attempts to model such connectors <strong>in</strong> UML required specialized model<strong>in</strong>gof application-specific connector classes.The underly<strong>in</strong>g problem is even deeper. Although UML may provide model<strong>in</strong>gpower equivalent to or surpass<strong>in</strong>g that of an ADL, <strong>the</strong> abstractions itprovides may not match an architect’s mental model of <strong>the</strong> system as faithfullyas <strong>the</strong> architect’s ADL of choice. If <strong>the</strong> primary purpose of a languageis to provide a vehicle of expression that matches <strong>the</strong> <strong>in</strong>tentions and practicesof users, <strong>the</strong>n that language should aspire to reflect those <strong>in</strong>tentions andpractices [Shaw and Garlan 1995]. We believe this to be a key issue and onethat argues aga<strong>in</strong>st consider<strong>in</strong>g a notation like UML to be a “ma<strong>in</strong>stream”ADL: A given language (e.g., UML) offers a set of abstractions that an architectuses as design tools. If certa<strong>in</strong> abstractions (e.g., components and connectors)are buried <strong>in</strong> o<strong>the</strong>r abstractions (e.g., classes), <strong>the</strong> architect’s job ismade more (and unnecessarily) difficult; separat<strong>in</strong>g components from connectors,rais<strong>in</strong>g <strong>the</strong>m both to visibility as top-level abstractions, and endow<strong>in</strong>g <strong>the</strong>mwith certa<strong>in</strong> features and constra<strong>in</strong>ts also raises <strong>the</strong>m <strong>in</strong> <strong>the</strong> consciousness of<strong>the</strong> designer.7.1.5 Architectural Styles. Architecture is <strong>the</strong> appropriate level of abstractionat which rules of a compositional style (i.e., an architectural style) can beexploited and should be elaborated. Do<strong>in</strong>g so results <strong>in</strong> a set of heuristics that,if followed, will guarantee that a result<strong>in</strong>g system has certa<strong>in</strong> desirable propertiesor lacks undesirable properties.Standard UML provides no support for architectural styles; <strong>the</strong> rules of differentstyles somehow have to be “built <strong>in</strong>to” UML (e.g., with a style-specificprofile). Our second strategy (described <strong>in</strong> Section 5) demonstrated how this canbe done us<strong>in</strong>g stereotypes. On <strong>the</strong> o<strong>the</strong>r hand, us<strong>in</strong>g UML “as is” (as described<strong>in</strong> our first strategy <strong>in</strong> Section 4) <strong>in</strong>troduces a problem <strong>in</strong> this regard: Whileevery architecture designed this way adheres to <strong>the</strong> UML meta model, and canbe relatively easily understood by a typical UML user and manipulated withstandardized UML tools, <strong>the</strong>re is no guarantee that <strong>the</strong> designer will alwaysadhere to <strong>the</strong> rules of a given style.7.1.6 Implementation Support. An ADL is frequently accompanied bytools that generate (parts of) <strong>the</strong> <strong>in</strong>frastructure of systems modeled <strong>in</strong> <strong>the</strong> ADL.This <strong>in</strong>frastructure is often also referred to as “glue code” [Shaw, DeL<strong>in</strong>e et al.1995] and it enforces <strong>the</strong> desired topology, <strong>in</strong>terfaces, and <strong>in</strong>teractions amongsystem components. At <strong>the</strong> same time, ADL specifications do not supply enoughdetail to generate <strong>the</strong> entire system (e.g., <strong>the</strong> <strong>in</strong>ternal functionality of <strong>in</strong>dividualcomponents), leav<strong>in</strong>g a sizable task to external tools or human developers.ACM Transactions on <strong>Software</strong> Eng<strong>in</strong>eer<strong>in</strong>g and Methodology, Vol. 11, No. 1, January 2002.


<strong>Model<strong>in</strong>g</strong> <strong>Software</strong> <strong>Architectures</strong> <strong>in</strong> UML • 53Us<strong>in</strong>g UML <strong>in</strong> <strong>the</strong> manner discussed <strong>in</strong> this paper has <strong>the</strong> potential to augment<strong>the</strong> ADL-specific generation tools with similar tools provided to generateimplementations from UML models. For example, an implementation of a statechartmodel of a component, such as <strong>the</strong> one depicted <strong>in</strong> Figure 16, can begenerated by us<strong>in</strong>g <strong>the</strong> STATEMATE tool [Harel and Naamad 1996]. Giventhat <strong>the</strong> consistency between <strong>the</strong> ADL and UML models of <strong>the</strong> architectureis ensured by <strong>the</strong> OCL constra<strong>in</strong>ts provided <strong>in</strong> our mapp<strong>in</strong>g, it is reasonableto expect that <strong>the</strong> “<strong>in</strong>ternal” part of <strong>the</strong> implementation generated from <strong>the</strong>UML model will fit with <strong>the</strong> “external” part generated from <strong>the</strong> ADL. We arecurrently validat<strong>in</strong>g this hypo<strong>the</strong>sis <strong>in</strong> <strong>the</strong> context of our prototype environmentfor mapp<strong>in</strong>g ADL specifications to UML specifications [Abi-Antoun andMedvidovic 1999].7.2 Future WorkWe <strong>in</strong>tend to expand this work <strong>in</strong> several directions, <strong>in</strong>clud<strong>in</strong>g provid<strong>in</strong>g toolsupport for us<strong>in</strong>g UML <strong>in</strong> architecture model<strong>in</strong>g, ma<strong>in</strong>ta<strong>in</strong><strong>in</strong>g traceability andconsistency between architectural and design decisions, and comb<strong>in</strong><strong>in</strong>g <strong>the</strong> exist<strong>in</strong>gimplementation generation capabilities for ADLs and UML. We also <strong>in</strong>tendto draw upon our experience to date to suggest specific extensions needed<strong>in</strong> <strong>the</strong> UML meta model to better support software architectures.We have already begun to address several of <strong>the</strong>se issues. We have developedan <strong>in</strong>itial <strong>in</strong>tegration of DRADEL [Medvidovic et al. 1999], an environment for C2style architecture-based development, with Rational Rose [Rational <strong>Software</strong>Corp. 1998], an environment for software design and implementation withUML [Abi-Antoun and Medvidovic 1999]. The <strong>in</strong>tegration enables automatedmapp<strong>in</strong>g from an architecture described <strong>in</strong> C2’s ADL <strong>in</strong>to UML us<strong>in</strong>g bothStrategies 1 and 2. Currently, this mapp<strong>in</strong>g is unidirectional, and <strong>the</strong> UMLmodel is consistent with respect to <strong>the</strong> architecture only <strong>in</strong>itially; any subsequentref<strong>in</strong>ements of <strong>the</strong> UML model may violate architectural decisions.Also, as additional views are <strong>in</strong>troduced <strong>in</strong>to <strong>the</strong> design (e.g., activity anddeployment diagrams), <strong>the</strong>ir consistency with <strong>the</strong> exist<strong>in</strong>g views (e.g., state andclass diagrams) must be ensured. To this end, we are beg<strong>in</strong>n<strong>in</strong>g to develop a setof techniques and associated tools to ensure full <strong>in</strong>tegration of views <strong>in</strong> UML[Egyed and Medvidovic 1999; 2000]. The ultimate goal of this work is to applyand evaluate <strong>the</strong> two strategies described here <strong>in</strong> <strong>the</strong> context of large-scalecase studies.Ano<strong>the</strong>r, long-term goal is to augment exist<strong>in</strong>g capabilities for generat<strong>in</strong>g implementationsfrom architectures. Such capabilities have typically only dealtwith a system’s overall <strong>in</strong>terconnection and <strong>in</strong>teraction characteristics (recallSection 7.1.6). We <strong>in</strong>tend to augment <strong>the</strong>m with support for implement<strong>in</strong>g <strong>in</strong>dividualarchitectural elements that is already available or is emerg<strong>in</strong>g <strong>in</strong> <strong>the</strong>context of different UML model<strong>in</strong>g diagrams. Ensur<strong>in</strong>g that <strong>in</strong>dividual designelements are consistent with <strong>the</strong> overall architecture is a necessary first step<strong>in</strong> accomplish<strong>in</strong>g this task <strong>in</strong> a mean<strong>in</strong>gful way.F<strong>in</strong>ally, it is important to note that <strong>the</strong> relevant future work is not restrictedto our research, but also <strong>in</strong>cludes UML itself. In <strong>the</strong> process of revis<strong>in</strong>g andACM Transactions on <strong>Software</strong> Eng<strong>in</strong>eer<strong>in</strong>g and Methodology, Vol. 11, No. 1, January 2002.


54 • N. Medvidovic et al.complet<strong>in</strong>g this work over <strong>the</strong> past three years, UML has gone through severalrevisions (from UML 1.0 to <strong>the</strong> current 1.3). While advertised as “m<strong>in</strong>or,” <strong>the</strong>serevisions forced us to change several details of our mapp<strong>in</strong>gs from <strong>the</strong> threeADLs (e.g., <strong>the</strong> details concern<strong>in</strong>g <strong>the</strong> meta model and OCL). The revisions alsoresulted <strong>in</strong> a shortcom<strong>in</strong>g that was <strong>in</strong>troduced <strong>in</strong>to UML only with version 1.3:UML 1.1 was actually able to model both provided and required operations ofa class, while UML 1.3 is not. We hope that <strong>the</strong> major revision to UML, version2.0, which is currently <strong>in</strong> preparation, can remedy some of <strong>the</strong> shortcom<strong>in</strong>gsof UML as an architecture model<strong>in</strong>g notation that have been identified <strong>in</strong>this paper.ACKNOWLEDGMENTSThe authors wish to acknowledge Yuzo Kanomata and Roshanak Roshandelfor <strong>the</strong>ir help <strong>in</strong> prepar<strong>in</strong>g <strong>the</strong> f<strong>in</strong>al manuscript of this paper. We also thank<strong>the</strong> anonymous referees for <strong>the</strong>ir extremely thorough and helpful comments on<strong>the</strong> manuscript.REFERENCESABI-ANTOUN, M. AND MEDVIDOVIC, N. 1999. Enabl<strong>in</strong>g <strong>the</strong> ref<strong>in</strong>ement of a software architecture<strong>in</strong>to a design. In Proceed<strong>in</strong>gs of <strong>the</strong> Second International Conference on <strong>the</strong> <strong>Unified</strong> <strong>Model<strong>in</strong>g</strong><strong>Language</strong> (UML’99, Fort Coll<strong>in</strong>s, CO). IEEE Computer Society Press, Los Alamitos, CA, 17–31.ALLEN, R. J. 1997. A Formal Approach to <strong>Software</strong> Architecture. Ph.D. dissertation, CarnegieMellon University, Pittsburgh, PA.ALLEN, R.AND GARLAN, D. 1994. Formaliz<strong>in</strong>g architectural connection. In Proceed<strong>in</strong>gs of <strong>the</strong> 16thInternational Conference on <strong>Software</strong> Eng<strong>in</strong>eer<strong>in</strong>g (Sorrento, Italy, May). IEEE Computer SocietyPress, Los Alamitos, CA, 71–80.ALLEN, R.AND GARLAN, D. 1997. A Formal basis for architectural connection. ACM Trans. Softw.Eng. Methodol. 6, 3 (July), 213–249.BOOCH, G., JACOBSON, I., AND RUMBAUGH, J. 1998. The <strong>Unified</strong> <strong>Model<strong>in</strong>g</strong> <strong>Language</strong> User Guide,Addison-Wesley, Read<strong>in</strong>g, MA.BOURDEAU, R.H. AND CHENG, B. H. C. 1995. A formal semantics of object models. IEEE Trans.Softw. Eng. 21, 10 (Oct.), 799–821.DI NITTO, E.AND ROSENBLUM, D. S. 1999. Exploit<strong>in</strong>g ADLs to specify architectural styles <strong>in</strong>ducedby middleware <strong>in</strong>frastructures. In Proceed<strong>in</strong>gs of <strong>the</strong> 21st International Conference on <strong>Software</strong>Eng<strong>in</strong>eer<strong>in</strong>g (Los Angeles, CA). ACM Press, New York, NY, 13–22.EGYED, A.AND MEDVIDOVIC, N. 1999. Extend<strong>in</strong>g architectural representation <strong>in</strong> UML with view<strong>in</strong>tegration. In Proceed<strong>in</strong>gs of <strong>the</strong> Second International Conference on <strong>the</strong> <strong>Unified</strong> <strong>Model<strong>in</strong>g</strong> <strong>Language</strong>(UML’99, Fort Coll<strong>in</strong>s, CO). IEEE Computer Society Press, Los Alamitos, CA, 2–16.EGYED, A.AND MEDVIDOVIC, N. 2000. A formal approach to heterogeneous software model<strong>in</strong>g. InProceed<strong>in</strong>gs of <strong>the</strong> Third International Conference on <strong>the</strong> Fundamental Approaches to <strong>Software</strong>Eng<strong>in</strong>eer<strong>in</strong>g (FASE 2000, Berl<strong>in</strong>, Germany, March-April), Tom Mailbaum, Ed. Lecture Notes <strong>in</strong>Computer Science, No. 1783. Spr<strong>in</strong>ger-Verlag, Berl<strong>in</strong>/Heidelberg, Germany.FEATHER, M.S.,FICKAS, S.,AND VAN LAMSWEERDE, A. 1997. Requirements and specification exemplars.Automated Softw. Eng. 4, 4, 419–438.FIDGE, C. J. 1991. Logical time <strong>in</strong> distributed comput<strong>in</strong>g systems. IEEE Comp. 24, 8, 28–33.GARLAN, D. (Ed.). 1995. Proceed<strong>in</strong>gs of <strong>the</strong> First International Workshop on <strong>Architectures</strong> for<strong>Software</strong> Systems (Seattle, WA, Apr.). Published <strong>in</strong> ACM Softw. Eng. Notes.GARLAN, D., ALLEN, R., AND OCKERBLOOM, J. 1994. Exploit<strong>in</strong>g style <strong>in</strong> architectural design environments.In Proceed<strong>in</strong>gs of SIGSOFT ’94: Foundations of <strong>Software</strong> Eng<strong>in</strong>eer<strong>in</strong>g (New Orleans,LA, Dec.), ACM Press, New York, NY, 175–188.ACM Transactions on <strong>Software</strong> Eng<strong>in</strong>eer<strong>in</strong>g and Methodology, Vol. 11, No. 1, January 2002.


<strong>Model<strong>in</strong>g</strong> <strong>Software</strong> <strong>Architectures</strong> <strong>in</strong> UML • 55GARLAN,D.AND KOMPANEK, A. 2000. Reconcil<strong>in</strong>g <strong>the</strong> needs of architectural description with objectmodel<strong>in</strong>gnotations. In Proceed<strong>in</strong>gs of <strong>the</strong> Third International Conference on <strong>the</strong> <strong>Unified</strong> <strong>Model<strong>in</strong>g</strong><strong>Language</strong> (UML 2000, York, UK, October), Spr<strong>in</strong>ger-Verlag, Berl<strong>in</strong>, Germany.GARLAN, D., MONROE, R., AND WILE, D. 1997. ACME: An architectural <strong>in</strong>terconnection language.In Wile. Proceed<strong>in</strong>gs of CASCON ’97 (Toronto, Ont., Canada). IBM Canada Ltd., Toronto, Ont.,Canada.GARLAN, D., PAULISCH, F.N.,AND TICHY, W. F. (Eds.). 1995. Summary of <strong>the</strong> Dagstuhl Workshopon <strong>Software</strong> Architecture, February 1995. ACM Softw. Eng. Notes July, 63–83.GARLAN, D.AND SHAW, M. 1993. An Introduction to <strong>Software</strong> Architecture: Advances <strong>in</strong> <strong>Software</strong>Eng<strong>in</strong>eer<strong>in</strong>g and Knowledge Eng<strong>in</strong>eer<strong>in</strong>g, Vol. I. World Scientific Publish<strong>in</strong>g, S<strong>in</strong>gapore.HAREL, D. 1987. Statecharts: A visual formalism for complex systems. Sci. Comput. Program. 8,231–274.HAREL, D.AND NAAMAD, A. 1996. The STATEMATE semantics of statecharts. ACM Trans. Softw.Eng. Methodol. 5, 4 (Oct.), 293–333.HOARE, C. A. R. 1985. Communicat<strong>in</strong>g Sequential Processes. Prentice Hall, Englewood Califfs,NJ.HOFMEISTER, C., NORD, R.L.,AND SONI, D. 2000. Applied <strong>Software</strong> Architecture. Addison-Wesley,Read<strong>in</strong>g, MA.JACOBSON, I., BOOCH, G., AND RUMBAUGH, J. 1999. The <strong>Unified</strong> <strong>Software</strong> Development Process.Addison-Wesley, Read<strong>in</strong>g, MA.KRUCHTEN, P. B. 1995. The 4 + 1 view model of architecture. IEEE <strong>Software</strong>, 12, 6 (Nov.), 42–50.KRUCHTEN, P. B. 1998. The Rational <strong>Unified</strong> Process. Addison-Wesley, Read<strong>in</strong>g, MA.LAMPORT, L. 1978. Time, clocks and <strong>the</strong> order<strong>in</strong>g of events <strong>in</strong> a distributed system. Commun.ACM 21, 7, 558–565.LUCKHAM,D.C.,KENNEY,J.J.,AUGUSTIN, L. M., VERA, J., BRYAN,D.,AND MANN, W. 1995. Specificationand analysis of system architecture us<strong>in</strong>g rapide. IEEE Trans. Softw. Eng. 21, 4 (Apr.), 336–355.LUCKHAM,D.C.AND VERA, J. 1995. An event-based architecture def<strong>in</strong>ition language. IEEE Trans.Softw. Eng. 21, 9 (Sept.), 717–734.MAGEE, J.AND KRAMER, J. 1996. Dynamic structures <strong>in</strong> software architecture. In Proceed<strong>in</strong>gs ofACM SIGSOFT ’96: Fourth Symposium on <strong>the</strong> Foundations of <strong>Software</strong> Eng<strong>in</strong>eer<strong>in</strong>g (FSE4, SanFrancisco, CA). ACM Press, New York, NY, 3–14.MAGEE, J.AND PERRY, D. E. (Eds.). 1998. Proceed<strong>in</strong>gs of <strong>the</strong> Third International <strong>Software</strong> ArchitectureWorkshop (ISAW-3, Lake Buena Vista, FL, Nov.). ACM Press, New York, NY.MEDVIDOVIC, N., OREIZY, P., ROBBINS, J.E.,AND TAYLOR, R. N. 1996. Us<strong>in</strong>g object-oriented typ<strong>in</strong>gto support architectural design <strong>in</strong> <strong>the</strong> C2 style. In Proceed<strong>in</strong>gs of ACM SIGSOFT ’96: FourthSymposium on <strong>the</strong> Foundations of <strong>Software</strong> Eng<strong>in</strong>eer<strong>in</strong>g (FSE4, San Francisco, CA). ACM Press,New York, NY.MEDVIDOVIC, N., OREIZY, P.,AND TAYLOR, R. N. 1997. Reuse of off-<strong>the</strong>-shelf components <strong>in</strong> C2-stylearchitectures. In Proceed<strong>in</strong>gs of <strong>the</strong> 1997 Symposium on <strong>Software</strong> Reusability (SSR’97, Boston,MA). ACM Press New York, 190–198. Also <strong>in</strong> Proceed<strong>in</strong>gs of <strong>the</strong> 1997 International Conferenceon <strong>Software</strong> Eng<strong>in</strong>eer<strong>in</strong>g (ICSE’97, Boston, MA). ACM Press, New York, NY, 692–700.MEDVIDOVIC, N. AND ROSENBLUM, D. S. 1997. Doma<strong>in</strong>s of concern <strong>in</strong> software architectures andarchitecture description languages. In Proceed<strong>in</strong>gs of <strong>the</strong> USENIX Conference on Doma<strong>in</strong> Specific<strong>Language</strong>s (Santa Barbara, CA, Oct.), Usenix Association, Berkeley, CA, 199–212.MEDVIDOVIC,N.AND ROSENBLUM, D. S. 1999. Assess<strong>in</strong>g <strong>the</strong> suitability of a standard design methodfor model<strong>in</strong>g software architectures. In Proceed<strong>in</strong>gs of <strong>the</strong> First IFIP Work<strong>in</strong>g Conference on<strong>Software</strong> Architecture (WICSA1, San Antonio, TX, Feb.), 161–182.MEDVIDOVIC, N., ROSENBLUM, D.S., AND TAYLOR, R. N. 1999. A language and environment forarchitecture-based software development and evolution. In Proceed<strong>in</strong>gs of <strong>the</strong> 21st InternationalConference on <strong>Software</strong> Eng<strong>in</strong>eer<strong>in</strong>g (Los Angeles, CA, May). ACM Press, New York, NY,44–53.MEDVIDOVIC, N.AND TAYLOR, R. N. 1998. Separat<strong>in</strong>g fact from fiction <strong>in</strong> software architecture. InProceed<strong>in</strong>gs of <strong>the</strong> Third International <strong>Software</strong> Architecture Workshop (ISAW-3, Lake BuenaVista, FL, Nov.), ACM Press, New York, NY, 105–108.MEDVIDOVIC,N.AND TAYLOR, R. N. 2000. A Classification and Comparison Framework for <strong>Software</strong>Architecture Description <strong>Language</strong>s. IEEE Trans. Softw. Eng. 26, 1 (Jan.), 70–93.ACM Transactions on <strong>Software</strong> Eng<strong>in</strong>eer<strong>in</strong>g and Methodology, Vol. 11, No. 1, January 2002.


56 • N. Medvidovic et al.MEDVIDOVIC, N., TAYLOR,R.N.,AND WHITEHEAD,JR., E. J. 1996. Formal model<strong>in</strong>g of software architecturesat multiple levels of abstraction. In Proceed<strong>in</strong>gs of <strong>the</strong> California <strong>Software</strong> Symposium1996 (Los Angeles, CA, Apr.). University of Sou<strong>the</strong>rn California, Center for <strong>Software</strong> Eng<strong>in</strong>eer<strong>in</strong>gand University of California, Irv<strong>in</strong>e, Irv<strong>in</strong>e Research Unit <strong>in</strong> <strong>Software</strong>, Los Angels, 28–40.MEHTA, N., MEDVIDOVIC, N.,AND PHADKE, S. 2000. Towards a taxonomy of software connectors. InProceed<strong>in</strong>gs of <strong>the</strong> 22nd International Conference on <strong>Software</strong> Eng<strong>in</strong>eer<strong>in</strong>g (ICSE 2000, Limerick,Ireland, June). ACM Press, New York, NY, 178–187.MORICONI, M., QIAN, X., AND RIEMENSCHNEIDER, R. A. 1995. Correct architecture ref<strong>in</strong>ement. IEEETrans. Softw. Eng. 21, 4 (Apr.), 356–372.Rational <strong>Software</strong> Corporation. 1998. Rational Rose 98: Us<strong>in</strong>g Rational Rose. Rational <strong>Software</strong>Corp., Cupert<strong>in</strong>o, CA, and Lex<strong>in</strong>gton, MA.OBJECT MANAGEMENT GROUP. 2000. OMG UML Specification Version 1.3. Object ManagementGroup, Needham, MA.PERRY, D.E. AND WOLF, A. L. 1992. Foundations for <strong>the</strong> study of software architectures. ACMSIGSOFT Softw. Eng. Notes 17, 4 (Oct.), 40–52.ROBBINS, J. E., MEDVIDOVIC, N., REDMILES, D.F., AND ROSENBLUM, D. S. 1998. Integrat<strong>in</strong>g architecturedescription languages with a standard design method. In Proceed<strong>in</strong>gs of <strong>the</strong> 20th InternationalConference on <strong>Software</strong> Eng<strong>in</strong>eer<strong>in</strong>g (ICSE’98, Kyoto, Japan, Apr.). IEEE ComputerSociety, Los Alamitos, CA, 209–218.ROSCOE, A. W. 1998. Two Papers on CSP. Technical monograph PRG-67, Oxford University Comput<strong>in</strong>gLaboratory, Oxford, UK.RUMBAUGH, J., JACOBSON, I., AND BOOCH, G. 1998. The <strong>Unified</strong> <strong>Model<strong>in</strong>g</strong> <strong>Language</strong> Reference Manual.Addison-Wesley, Read<strong>in</strong>g, MA.SCATTERGOOD, B. 1998. The Semantics and Implementation of Mach<strong>in</strong>e-Readable CSP. Ph.D. dissertation,Oxford University, Oxford, UK.SELIC, B. 1999. Turn<strong>in</strong>g clockwise: Us<strong>in</strong>g UML <strong>in</strong> <strong>the</strong> real-time doma<strong>in</strong>. Commun. ACM 42, 10(Oct.), 46–54.SELIC, B., GULLEKSON, G., AND WARD, P. 1994. Real-Time Object-Oriented <strong>Model<strong>in</strong>g</strong>. Wiley,New York, NY.SELIC, B. AND RUMBAUGH, J. 1998. Us<strong>in</strong>g UML for <strong>Model<strong>in</strong>g</strong> Complex Real-Time Systems.ObjectTime white paper, March 11, 1998. Accessed June 2000 at Web site http://www.objectime.com/otl/technical/umlrt.pdf.SHAW, M. 1996. Procedure calls are <strong>the</strong> assembly language of software <strong>in</strong>terconnection: Connectorsdeserve first-class status. In Studies of <strong>Software</strong> Design, Proceed<strong>in</strong>gs of an ICSE’93 Workshop.Lecture Notes <strong>in</strong> Computer Science, No. 1078. Spr<strong>in</strong>ger-Verlag, Berl<strong>in</strong>, Germany, 17–32.SHAW, M., DELINE, R., KLEIN, D. V., ROSS, T. L., YOUNG, D.M., AND ZELESNIK, G. 1995. Abstractionsfor software architecture and tools to support <strong>the</strong>m. IEEE Trans. Softw. Eng. 21, 4 (Apr.),314-335.SHAW, M.AND GARLAN, D. 1995. Formulations and formalisms <strong>in</strong> software architecture. In ComputerScience Today: Recent Trends and Developments, J. van Leeuwen (Ed.), Lecture Notes <strong>in</strong>Computer Science, No. 1000. Spr<strong>in</strong>ger-Verlag, Berl<strong>in</strong>, Germany, 307–323.SHAW, M., GARLAN, D., ALLEN, R., KLEIN, D., OCKERBLOOM, J., SCOTT, C.,AND SCHUMACHER, M. 1995.Candidate model problems <strong>in</strong> software architecture. Unpublished manuscript. Available fromhttp://www.cs.cmu.edu/afs/cs/project/compose/www/html/ModProb/.SONI, D., NORD, R., AND HOFMEISTER, C. 1995. <strong>Software</strong> architecture <strong>in</strong> <strong>in</strong>dustrial applications. InProceed<strong>in</strong>gs of <strong>the</strong> 17th International Conference on <strong>Software</strong> Eng<strong>in</strong>eer<strong>in</strong>g (ICSE 17, Seattle, WA,Apr.). ACM Press, New York, NY, 196 1995.TAYLOR, R.N.,MEDVIDOVIC, N., ANDERSON, K. M., WHITEHEAD, JR., E. J., ROBBINS, J. E., NIES, K.A.,OREIZY, P.,AND DUBROW, D. L. 1996. A component- and message-based architectural style forGUI software. IEEE Trans. Softw. Eng. 22, 6 (June), 390–406.TIGRIS. 2000. Design your UML models with ArgoUML. http://argouml.tigris.org/v08/pressrelease.html.TRACZ, W. 1995. DSSA (doma<strong>in</strong>-specific software architecture): Pedagogical example. ACM SIG-SOFT Softw. Eng. Notes 20, 3 (July), 49–62.VESTAL, S. 1996. MetaH Programmer’s Manual, Version 1.09. Technical report, Honeywell TechnologyCenter.ACM Transactions on <strong>Software</strong> Eng<strong>in</strong>eer<strong>in</strong>g and Methodology, Vol. 11, No. 1, January 2002.


<strong>Model<strong>in</strong>g</strong> <strong>Software</strong> <strong>Architectures</strong> <strong>in</strong> UML • 57WANG, E.Y.,RICHTER, H.A.,AND CHENG, B. H. C. 1997. Formaliz<strong>in</strong>g and <strong>in</strong>tegrat<strong>in</strong>g <strong>the</strong> dynamicmodel with<strong>in</strong> OMT. In Proceed<strong>in</strong>gs of <strong>the</strong> 1997 International Conference on <strong>Software</strong> Eng<strong>in</strong>eer<strong>in</strong>g(Boston, MA, May), ACM Press, New York, NY, 45–55.WARMER, J.B.AND KLEPPE, A. G. 1998. The Object Constra<strong>in</strong>t <strong>Language</strong>: Precise <strong>Model<strong>in</strong>g</strong> withUML. Addison-Wesley, Read<strong>in</strong>g, MA.WOLF, A. L. (Ed.). 1996. Proceed<strong>in</strong>gs of <strong>the</strong> Second International <strong>Software</strong> Architecture Workshop(ISAW-2, San Francisco, CA, Oct.).Received July 1999; revised August 2000; accepted March 2001ACM Transactions on <strong>Software</strong> Eng<strong>in</strong>eer<strong>in</strong>g and Methodology, Vol. 11, No. 1, January 2002.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!