NATO UNCLASSIFIED NATO STANDARD FOR THE DEVELOPMENT OF REUSABLE SOFTWARE COMPONENTS yolume 1 (of 3 Documents) Development of Reusable Software Components Management of a Reusable Software Component Library Software Reuse Procedures Issued and Maintained by: NATO COMMUNICATIONS AND INFORMATION SYSTEMS AGENCY (Tel.Brussels(2).728.8490) This document may be copied and distributed without constraint,for use within NATO and NATO nations. NATO UNCLASSIFIED
N A T O U N C L A S S I F I E D NATO STANDARD FOR THE DEVELOPMENT OF REUSABLE SOFTWARE COMPONENTS Volume 1 (of 3 Documents) - Development of Reusable Software Components - Management of a Reusable Software Component Library - Software Reuse Procedures Issued and Maintained by: NATO COMMUNICATIONS AND INFORMATION SYSTEMS AGENCY (Tel. Brussels (2).728.8490) This document may be copied and distributed without constraint, for use within NATO and NATO nations. N A T O U N C L A S S I F I E D
Table of Contents Section Title Page Table of Contents ii List of Figures .iv List of Tables PARTI INTRODUCTION AND BACKGROUND Section 1 1.1 Purpose and Scope... 1-1 1.2 Guide to Using this Manual .1-1 Section 2 Applicable Documents...... .2-1 Section 3 Basic Reuse Concepts. …3-1 3.1 Definitions.. 3-1 32 Expected Benefits of Reuse 3-2 3.3 Dimensions of Reuse. .3-4 3.4 Forms of Reuse. 3-5 3.5 Issues in Achieving Reuse 3-6 PART II STANDARD Section4 Requirements Analysis.. 41 4.1 Requirements that Encourage Reuse .41 42 Requiring Reusability 42 4.3 The Role of Domain Analysis. .44 4.4 Requirements Specifications as RSCs. 46 Section5 Design Principles. 5-1 51 Transition from Requirements Analysis 5-1 5.2 Models,Architectures,and Interfaces. .5-2 5.3 Designing for Modification. .5-6 54 Design Methods 5-8 5.5 Designs as RSCs 5-11 5.6 Selecting CASE Tools .5-11 i
ii Table of Contents Section Title Page Table of Contents...................................................................................... ii List of Figures........................................................................................... iv List of Tables..............................................................................................v PART I INTRODUCTION AND BACKGROUND Section 1 Introduction............................................................................................ 1-1 1.1 Purpose and Scope ................................................................................... 1-1 1.2 Guide to Using this Manual ..................................................................... 1-1 Section 2 Applicable Documents........................................................................... 2-1 Section 3 Basic Reuse Concepts ............................................................................ 3-1 3.1 Definitions................................................................................................ 3-1 3.2 Expected Benefits of Reuse ..................................................................... 3-2 3.3 Dimensions of Reuse ............................................................................... 3-4 3.4 Forms of Reuse ........................................................................................ 3-5 3.5 Issues in Achieving Reuse ....................................................................... 3-6 PART II STANDARD Section 4 Requirements Analysis .......................................................................... 4-1 4.1 Requirements that Encourage Reuse ....................................................... 4-1 4.2 Requiring Reusability .............................................................................. 4-2 4.3 The Role of Domain Analysis.................................................................. 4-4 4.4 Requirements Specifications as RSCs ..................................................... 4-6 Section 5 Design Principles.................................................................................... 5-1 5.1 Transition from Requirements Analysis .................................................. 5-1 5.2 Models, Architectures, and Interfaces ..................................................... 5-2 5.3 Designing for Modification...................................................................... 5-6 5.4 Design Methods ....................................................................................... 5-8 5.5 Designs as RSCs .................................................................................... 5-11 5.6 Selecting CASE Tools ........................................................................... 5-11
Table of Contents(Continued) Section Title Page Section6 Detailed Design and- 6.1 Transition from Design to Code 61 6.2 Program Structuring. .6-3 6.3 Interfaces... .6-6 6.4 Parameterization 69 6.5 Handling Errors and Exceptional Conditions 6-11 6.6 Efficiency... .6-14 6.7 Detailed Coding Standard. 6-17 Section7 Quality Assurance and Test 71 71 Evaluation Activities. .7-1 7.2 Metrics .7-2 7.3 Test Procedures.. 4 7.4 Problem Resolution 44 7-5 Section 8 Documentation 81 8.1 Application of Conventional Documentation Standards 8-1 82 Documentation for the Reuse Library. .8-2 83 The Reuser's Manual. 8-4 8 Formal Specification .8-6 APPENDIX Appendix A Ada Coding StandardA-. Identifiers A-2 A.2 Format and Layout. A-5 A.3 Commentary... …A-8 A.4 Types and Subtypes... A-11 A.5 Named Numbers,Constants,and Literals. A-15 A.6 Expressions.. .A-16 A.7 Control Structures A-18 A.8 Exceptions.. A-20 A.9 Program Structure and Compilation Units. .A-22 A10 Parameters. A-24 A.11 Tasks A-26 A.12 Other Areas.. A-28
iii Table of Contents (Continued) Section Title Page Section 6 Detailed Design and Implementation................................................... 6-1 6.1 Transition from Design to Code .............................................................. 6-1 6.2 Program Structuring................................................................................. 6-3 6.3 Interfaces.................................................................................................. 6-6 6.4 Parameterization ...................................................................................... 6-9 6.5 Handling Errors and Exceptional Conditions ........................................ 6-11 6.6 Efficiency............................................................................................... 6-14 6.7 Detailed Coding Standard...................................................................... 6-17 Section 7 Quality Assurance and Test .................................................................. 7-1 7.1 Evaluation Activities................................................................................ 7-1 7.2 Metrics ..................................................................................................... 7-2 7.3 Test Procedures........................................................................................ 7-4 7.4 Problem Resolution.................................................................................. 7-5 Section 8 Documentation ....................................................................................... 8-1 8.1 Application of Conventional Documentation Standards ......................... 8-1 8.2 Documentation for the Reuse Library...................................................... 8-2 8.3 The Reuser’s Manual ............................................................................... 8-4 8.4 Formal Specification................................................................................ 8-6 APPENDIX Appendix A Ada Coding Standard........................................................................... A-1 A.1 Identifiers ................................................................................................ A-2 A.2 Format and Layout.................................................................................. A-5 A.3 Commentary............................................................................................ A-8 A.4 Types and Subtypes .............................................................................. A-11 A.5 Named Numbers, Constants, and Literals............................................. A-15 A.6 Expressions ........................................................................................... A-16 A.7 Control Structures ................................................................................. A-18 A.8 Exceptions............................................................................................. A-20 A.9 Program Structure and Compilation Units............................................ A-22 A.10 Parameters............................................................................................. A-24 A.11 Tasks ..................................................................................................... A-26 A.12 Other Areas ........................................................................................... A-28
List of Figures Figure Title Page Figure 5.1- Layered Data Base Management Architecture5-5 Figure 6.2-Using a Filter Routine to Localize Dependencies. .6-6 Figure 8.3- Example Outline for a Reuser's Manual8-5 iv
iv List of Figures Figure Title Page Figure 5.1 - Layered Data Base Management Architecture ........................................ 5-5 Figure 6.2 - Using a Filter Routine to Localize Dependencies.................................... 6-6 Figure 8.3 - Example Outline for a Reuser’s Manual.................................................. 8-5
List of Tables Table Title Page Table 6.1-A Taxonomy of RSC Interface Types....... 6-7
v List of Tables Table Title Page Table 6.1 - A Taxonomy of RSC Interface Types ..................................................... 6-7
PART I INTRODUCTION AND BACKGROUND
PART I INTRODUCTION AND BACKGROUND
Section 1 Introduction The Standard for the Development of Reusable Software Components is designed to provide guidance in the creation of software products with maximum potential for software reuse. The following subsections describe the purpose of this manual and explain how to use it effectively. 1.1 Purpose and Scope To achieve the benefits of software reuse,it is essential to have an understanding of the specific activities to be performed at each step in software development;this manual provides that guidance to NATO,host nation,and contractor personnel. Software reuse is an important aspect of controlling and reducing software cost and improving quality.The practice of software reuse can be significantly increased through the use of an appropriate standard in identifying software intended for reuse and developing that software The Standard for the Development of Reusable Software Components is a prescriptive document designed to provide concrete reuse guidance.It assist the user in structuring a software development process that leads to the development of reusable software components. The manual is intended for use by NATO,host nation,and contractor personnel.NATO and host nation program offices will use the guidance in establishing IFB requirements and in guiding contractors.Contractors will use it in establishing project-specific development practices. This is one of a set of three manuals developed by NACISA to provide guidance in software reuse.This manual specifically addresses the creation of reusable software components.The other two documents are standards for the management of a library of reusable components, and for carrying out a project that takes advantage of the library to reuse existing software. 1.2 Guide to Using this Manual uidance. nized by software life-cycle establishi g in dual project practice. The Standard for the Development of Reusable Soffware Components is organized in two parts. Part I provides an introduction to the manual and a brief discussion of general concepts of software reuse to provide a basic frame ofreference for the reader.Part II is the actual standard Its major sections address requirements analysis,design principles,detailed design and 11
1-1 Section 1 Introduction The Standard for the Development of Reusable Software Components is designed to provide guidance in the creation of software products with maximum potential for software reuse. The following subsections describe the purpose of this manual and explain how to use it effectively. 1.1 Purpose and Scope To achieve the benefits of software reuse, it is essential to have an understanding of the specific activities to be performed at each step in software development; this manual provides that guidance to NATO, host nation, and contractor personnel. Software reuse is an important aspect of controlling and reducing software cost and improving quality. The practice of software reuse can be significantly increased through the use of an appropriate standard in identifying software intended for reuse and developing that software. The Standard for the Development of Reusable Software Components is a prescriptive document designed to provide concrete reuse guidance. It assist the user in structuring a software development process that leads to the development of reusable software components. The manual is intended for use by NATO, host nation, and contractor personnel. NATO and host nation program offices will use the guidance in establishing IFB requirements and in guiding contractors. Contractors will use it in establishing project-specific development practices. This is one of a set of three manuals developed by NACISA to provide guidance in software reuse. This manual specifically addresses the creation of reusable software components. The other two documents are standards for the management of a library of reusable components, and for carrying out a project that takes advantage of the library to reuse existing software. 1.2 Guide to Using this Manual This manual provides specific guidance, organized by software life-cycle activity, to form a basis for establishing individual project practice. The Standard for the Development of Reusable Software Components is organized in two parts. Part I provides an introduction to the manual and a brief discussion of general concepts of software reuse to provide a basic frame of reference for the reader. Part II is the actual standard. Its major sections address requirements analysis, design principles, detailed design and
implementation,quality assurance and test,and documentation.Appendix A provides detailed reusability guidelines for the Ada programming language. Within Part II,each regularly-numbered paragraph forms part of the standard,and is considered mandatory in meeting the reuse objectives addressed by this manual:any deviation must be justified and approved.The standard is augmented by a number of guidelines (indicated by paragraph numbers beginning with the letterG").Guidelines support the standard,identifying specific(potentially alternative)approaches to meeting the standard.Compliance with specific guidelines is not considered mandatory;however some effective approach to meeting the standard must be selected. Because this manual offers alternative approaches,project managers should use this it as a basis for generating project-specific reuse guidance,for incorporation in other software development practices adopted for the project. 1-2
1-2 implementation, quality assurance and test, and documentation. Appendix A provides detailed reusability guidelines for the Ada programming language. Within Part II, each regularly-numbered paragraph forms part of the standard, and is considered mandatory in meeting the reuse objectives addressed by this manual; any deviation must be justified and approved. The standard is augmented by a number of guidelines (indicated by paragraph numbers beginning with the letter “G”). Guidelines support the standard, identifying specific (potentially alternative) approaches to meeting the standard. Compliance with specific guidelines is not considered mandatory; however some effective approach to meeting the standard must be selected. Because this manual offers alternative approaches, project managers should use this it as a basis for generating project-specific reuse guidance, for incorporation in other software development practices adopted for the project
Section 2 Applicable Documents Many existing materials provide valuable guidance that augments this standard. The following reference documents are cited in this manual Booch,G.Software Components with Ada.The Benjamin/Cummings Publishing Company,1987.ISBN0-8053-0610-12 Contel Corporation.Siandard for Management of a Reusable Software Component Library.NATO contract number CO-5957-ADA,1991. Contel Corporation.Standardfor Sofhvare Reuse Procedures.NATO contract number C0-5957-ADA,1991. Dynamics Research Corp.ADAMAT Reference Manual.1987 McCabe,Tho as AC。 lexity Measure."IEEE Transactions on Sofhware Engineering(Dec.1976):308-320. Nissen J.and(Eds)Syle in Ada.Cambridge University Press.Cambridge,United Kingdom,1984 Numerous other references were used in developing this standard,and provide additional guidance in developing reusable software.Some that may be valuable to the user ofthis manual are: The Software Productivity Consortium.Ada Ouality and Style:Guidelines for Professional Programmers.Van Nostr nd Reinhold,New York,USA,1989. SofTech,Incorporated.RAPID Center Standards for Reusable Software.Document number3451-4-012/6.4,1990. SofTech,Incorporated.RAPID Center Reusable Software Component (RSC) Procedures.Document number 3451-4-326/4,1990. SofTech,Incorporated.Ada Reusability Guidelines.Document number 3285-2-208/2, 1985. 2-1
2-1 Section 2 Applicable Documents Many existing materials provide valuable guidance that augments this standard. The following reference documents are cited in this manual: Booch, G. Software Components with Ada. The Benjamin/Cummings Publishing Company, 1987. ISBN 0-8053-0610-12. Contel Corporation. Standard for Management of a Reusable Software Component Library. NATO contract number CO-5957-ADA, 1991. Contel Corporation. Standard for Software Reuse Procedures. NATO contract number CO-5957-ADA, 1991. Dynamics Research Corp. ADAMAT Reference Manual. 1987. McCabe, Thomas J. “A Complexity Measure.” IEEE Transactions on Software Engineering (Dec. 1976): 308-320. Nissen, J. and P.J.L. Wallis (Eds). Portability and Style in Ada. Cambridge University Press, Cambridge, United Kingdom, 1984. Numerous other references were used in developing this standard, and provide additional guidance in developing reusable software. Some that may be valuable to the user of this manual are: Gautier, R.U. and P.J.L. Wallis (Eds). Software Reuse with Ada. Peter Peregrinus Ltd. on behalf of the Institution of Electrical Engineers, London, United Kingdom, 1990. The Software Productivity Consortium. Ada Quality and Style: Guidelines for Professional Programmers. Van Nostrand Reinhold, New York, USA, 1989. SofTech, Incorporated. RAPID Center Standards for Reusable Software. Document number 3451-4-012/6.4, 1990. SofTech, Incorporated. RAPID Center Reusable Software Component (RSC) Procedures. Document number 3451-4-326/4, 1990. SofTech, Incorporated. Ada Reusability Guidelines. Document number 3285-2-208/2, 1985
Section 3 Basic Reuse Concepts Software reuse offers tremendous benefits in cost savings and quality; however,it requires technical understanding,changed approaches,and an understanding of potential obstacles. This section provides a frame of reference for understanding the benefits and challenges of software reuse.It introduces the terminology and concepts used in the remainder of the manual and explains the goals underlying the guidance provided herein. 3.1 Definitions A consistent terminology is used throughout this and companion manuals. The following are definitions of the key terms used in this manual Reuse-the use of an existing software component in a new context,either elsewhere in the same system or in another system Reusability-the extent to which a software component is able to be reused Conformance to an appropriate design and coding standard increases a component's reusability. Reusable software component (RSC)-a software entity intended for reuse;may be design,code,or other product of the software development process.RSCs are sometimes called“software assets'”. Reuser-an individual or organization that reuses an RSC Portabilit-the extent to which a software component originally developed on one computer and operating system can be used on another computer and/or operating system.A component's reusability potential is greater if it is easily portable. Domaina class of related software applications.Domains are sometimes described as vertical- -addressing all levels of a single application area (e.g,command and control)and "horizontal"-addressing a particular kind of software processing (e.g., data structure manipulation)across applications.The potential for reuse is generally greater within a single domain. Domain analysis-the analysis of a selected domain to identify common structures and functions,with the objective of increasing reuse potential Library-a collection of reusable software components,together with the procedures and support functions required to provide the components to users Retrieval system-an automated tool that supports classification and retrieval of reusable software components,also called a"repository" 3-1
3-1 Section 3 Basic Reuse Concepts Software reuse offers tremendous benefits in cost savings and quality; however, it requires technical understanding, changed approaches, and an understanding of potential obstacles. This section provides a frame of reference for understanding the benefits and challenges of software reuse. It introduces the terminology and concepts used in the remainder of the manual and explains the goals underlying the guidance provided herein. 3.1 Definitions A consistent terminology is used throughout this and companion manuals. The following are definitions of the key terms used in this manual: Reuse—the use of an existing software component in a new context, either elsewhere in the same system or in another system Reusability—the extent to which a software component is able to be reused. Conformance to an appropriate design and coding standard increases a component’s reusability. Reusable software component (RSC)—a software entity intended for reuse; may be design, code, or other product of the software development process. RSCs are sometimes called “software assets”. Reuser—an individual or organization that reuses an RSC Portability—the extent to which a software component originally developed on one computer and operating system can be used on another computer and/or operating system. A component’s reusability potential is greater if it is easily portable. Domain—a class of related software applications. Domains are sometimes described as “vertical”—addressing all levels of a single application area (e.g., command and control) and “horizontal”—addressing a particular kind of software processing (e.g., data structure manipulation) across applications. The potential for reuse is generally greater within a single domain. Domain analysis—the analysis of a selected domain to identify common structures and functions, with the objective of increasing reuse potential Library—a collection of reusable software components, together with the procedures and support functions required to provide the components to users Retrieval system—an automated tool that supports classification and retrieval of reusable software components, also called a “repository