Documenting Component and Connector Views with UML 2.0

Documenting Component and Connector Views with UML 2.0

Documenting Component and Connector Views with UML 2.0 James Ivers Software Engineering Institute Paul Clements Software Engineering Institute David Garlan School of Computer Science, Carnegie Mellon University Robert Nord Software Engineering Institute Bradley Schmerl School of Computer Science, Carnegie Mellon University Jaime Rodrigo Oviedo Silva School of Computer Science, Carnegie Mellon University April 2004 TECHNICAL REPORT CMU/SEI-2004-TR-008 ESC-TR-2004-008 Pittsburgh, PA 15213-3890 Documenting Component and Connector Views with UML 2.0 CMU/SEI-2004-TR-008 ESC-TR-2004-008 James Ivers Software Engineering Institute Paul Clements Software Engineering Institute David Garlan School of Computer Science, Carnegie Mellon University Robert Nord Software Engineering Institute Bradley Schmerl School of Computer Science, Carnegie Mellon University Jaime Rodrigo Oviedo Silva School of Computer Science, Carnegie Mellon University April 2004 Software Architecture Technology Initiative Unlimited distribution subject to the copyright. This report was prepared for the SEI Joint Program Office HQ ESC/DIB 5 Eglin Street Hanscom AFB, MA 01731-2116 The ideas and findings in this report should not be construed as an official DoD position. It is published in the interest of scientific and technical information exchange. FOR THE COMMANDER Christos Scondras Chief of Programs, XPK This work is sponsored by the U.S. Department of Defense. The Software Engineering Institute is a federally funded research and development center sponsored by the U.S. Department of Defense. Copyright 2004 Carnegie Mellon University. Requests for permission to reproduce this document or to prepare derivative works of this document should be addressed to the SEI Licensing Agent. NO WARRANTY THIS CARNEGIE MELLON UNIVERSITY AND SOFTWARE ENGINEERING INSTITUTE MATERIAL IS FURNISHED ON AN “AS-IS” BASIS. CARNEGIE MELLON UNIVERSITY MAKES NO WARRANTIES OF ANY KIND, EITHER EXPRESSED OR IMPLIED, AS TO ANY MATTER INCLUDING, BUT NOT LIMITED TO, WARRANTY OF FITNESS FOR PURPOSE OR MERCHANTABILITY, EXCLUSIVITY, OR RESULTS OBTAINED FROM USE OF THE MATERIAL. CARNEGIE MELLON UNIVERSITY DOES NOT MAKE ANY WARRANTY OF ANY KIND WITH RESPECT TO FREEDOM FROM PATENT, TRADEMARK, OR COPYRIGHT INFRINGEMENT. This work was created in the performance of Federal Government Contract Number F19628-00-C- 0003 with Carnegie Mellon University for the operation of the Software Engineering Institute, a federally funded research and development center. The Government of the United States has a royalty- free government-purpose license to use, duplicate, or disclose the work, in whole or in part and in any manner, and to have or permit others to do so, for government purposes pursuant to the copyright license under the clause at 252.227-7013. Use of any trademarks in this report is not intended in any way to infringe on the rights of the trademark holder. For information about purchasing paper copies of SEI reports, please visit the publications portion of our Web site (http://www.sei.cmu.edu/publications/pubweb.html). Table of Contents Acknowledgements . vii Abstract . ix 1 Introduction . 1 1.1 Views and the “Views and Beyond” Approach . 1 1.2 UML and Software Architecture . 2 1.3 About This Report . 2 2 Documenting C&C Views with UML 1.4 . 5 2.1 Documenting Components and Connectors with UML 1.4 . 6 2.1.1 Strategy 1: Using Classes and Objects for C&C Components . 7 2.1.2 Strategy 2: Using Subsystems for C&C Components . 7 2.1.3 Strategy 3: Using the UML-RT Profile . 8 2.2 Shortcomings of Using UML 1.4 . 9 3 UML 2.0 Changes . 11 3.1 Interfaces . 12 3.2 Ports . 13 3.3 Structured Classifiers . 14 3.4 Components . 15 3.5 Connectors . 17 4 Documenting C&C Views with UML 2.0 . 19 4.1 Documenting Components . 20 4.1.1 Strategy 1: Using UML Classes . 20 4.1.2 Strategy 2: Using UML Components . 22 4.1.3 Choosing . 22 4.2 Documenting Ports . 23 4.3 Documenting Connectors . 24 4.3.1 Strategy 1: Using UML Associations . 25 4.3.2 Strategy 2: Using UML Association Classes . 26 4.3.3 Strategy 3: Using UML Classes . 28 4.3.4 Choosing . 29 CMU/SEI-2004-TR-008 i 4.4 Documenting Systems . 31 4.4.1 Component and Connector Types . 31 4.4.2 Topologies of Component and Connector Instances . 31 4.5 Documenting Properties . 32 4.5.1 Strategy 1: Using UML Tagged Values . 33 4.5.2 Strategy 2: Using UML Attributes . 34 4.5.3 Strategy 3: Using UML Stereotypes . 34 4.5.4 Choosing . 35 5 Conclusion . 37 Appendix A C&C View Examples . 39 A.1 Using Acme . 39 A.2 UML 2.0 Variation 1 . 40 A.3 UML 2.0 Variation 2 . 41 References. 43 ii CMU/SEI-2004-TR-008 List of Figures Figure 1: Interfaces as Stereotyped Classifiers . 12 Figure 2: Interfaces in a Classifier Compartment . 12 Figure 3: Interfaces Using Ball-and-Socket Notation . 13 Figure 4: Port Without Interfaces . 13 Figure 5: Port with Interfaces . 13 Figure 6: A Structured Class. 14 Figure 7: An Instance of a Structured Class. 15 Figure 8: Three Ways to Represent Components . 16 Figure 9: External View of a Component with Ports . 16 Figure 10: Internal View of a Component with Ports . 16 Figure 11: An Assembly Connector Between Ports . 17 Figure 12: An Assembly Connector Between Interfaces . 18 Figure 13: Delegation Connectors Between External and Internal Ports . 18 Figure 14: C&C Types as UML Classes and C&C Instances as UML Objects . 21 Figure 15: C&C Types as UML Component Types and C&C Instances as UML Component Instances . 22 Figure 16: C&C Ports as UML Ports. 24 Figure 17: A C&C Connector as a UML Association (Link) . 25 Figure 18: A C&C Connector as a UML Association Class (Link Object). 26 Figure 19: A C&C Connector as a UML Association Class with Ports . 27 Figure 20: Link Role Names Are Used to Represent Attachments. 27 CMU/SEI-2004-TR-008 iii Figure 21: Assembly Connectors Are Used to Represent Attachments. 28 Figure 22: A C&C Connector as a UML Class (Object) . 28 Figure 23: Using a UML Class for a C&C Connector and a UML Component for a C&C Component . 29 Figure 24: A C&C Connector as a UML Stereotyped Class with Custom Visualization . 29 Figure 25: Documentation of Component-Type Hierarchy. 31 Figure 26: Documentation of a System . 32 Figure 27: Architectural Properties as UML Tagged Values . 33 Figure 28: Architectural Properties as UML Attributes . 34 Figure 29: Architectural Properties as UML Stereotyped Attributes. 34 Figure 30: Architectural Property Captured in a UML Stereotype . 35 Figure 31: Stereotype Applied to an Instance . 35 Figure 32: System Documented Using AcmeStudio . 39 Figure 33: Style Key . 40 Figure 34: Component Types. 40 Figure 35: System . 41 Figure 36: Style Key . 41 Figure 37: Component Types. 42 Figure 38: System . 42 iv CMU/SEI-2004-TR-008 List of Tables Table 1: Mapping Between C&C Concepts and UML-RT Constructs . 9 Table 2: Summary of UML 2.0 Strategies Used in Variation 1 . 40 Table 3: Summary of UML 2.0 Strategies Used in Variation 2 . 41 CMU/SEI-2004-TR-008 v vi CMU/SEI-2004-TR-008 Acknowledgements We are indebted to those with whom we collaborated on earlier incarnations of this work. Andrew J. Kompanek, Shang-Wen Cheng, and David Garlan began with.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    60 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us