Kruger, Software Reuse
Total Page:16
File Type:pdf, Size:1020Kb
Software Reuse CHARLES W. KRUEGER School of Computer Science, G’arnegie Mellon University, Pittsburgh, Pennsylvania 15213 Software reuse is the process ofcreating software systems from existing software rather than building software systems from scratch. ‘l’his simple yet powerful vision was introduced in 1968. Software reuse has, however, failed to become a standard software engineering practice. In an attempt to understand why, researchers have renewed their interest in software reuse and in the obstacles to implementing it. This paper surveys the different approaches to software reuse found in the research literature. It uses a taxonomy to describe and compare the different approaches and make generalizations about the field of software reuse. The taxonomy characterizes each reuse approach interms of its reusable artifacts and the way these artifacts are abstracted, selected, speciahzed, and integrated. Abstraction plays a central role in software reuse. Concise and expressive abstractions are essential if software artifacts are to be effectively reused. The effectiveness of a reuse technique can be evaluatedin terms of cognztzue dwtance-an intuitive gauge of the intellectual effort required to use the technique. Cognitive distance isreduced in two ways: (l) Higher level abstractions ina reuse technique reduce the effort required to go from the initial concept of a software system to representations inthe reuse technique, and(2) automation reduces the effort required togo from abstractions inareuse technique to an executable implementation. This survey will help answer the following questions: What is software reuse? Why reuse software? What are the different approaches to reusing software? How effective are the different approaches? What is required to implement a software reuse technology? Why is software reuse difficult? What are the open areas for research in software reuse? Categories and Subject Descriptors: D.1.O [Programming Techniques]: General; D.2. 1 [Software Engineering]: Requirements\ Specifications-la rzguages, methodologies, tools; D.2.2 [Software Engineering]: Tools and Techniques—modules and interfaces, programmer workbench, software libraries; D .2.m [Software Engineering]: Miscellaneous-–reusable software; D.3.2 [Programming Languages]: Language Classifications-specialized application languages, very high-level languages; D.3.4 [Programming Languages]: Processors; F.3. 1 [Logics and Meanings of Programs]: Specifying and Verifying and Reasoning about Programs; H.3. 1 [Information Storage and Retrieval]: Content Analysis and Indexing—abstracting methods, indexing methods; H.3.3 [Information Storage and Retrieval]: Information Search and Retrieval—query formulation, retrieual models, search process, select~on process; 1.2.2 [Artificial Intelligence]: Automatic Programming--program synthesis, program transformation. This work was supported in part by the Hillman Fellowship for Software Engineering, in part by ZTI-SOF of Siemens Corporation, Munich, Germany, and in part by the Avionics Lab, Wright Research and Development Center, Aeronautical Systems Division (AFSC), U.S. Air Force, Wright-Patterson AFB, OH 45433-6543 under contract F33615-90-C-1465, ARPA Order 7597. Permission to copy without fee all or part of this material is granted provided that the copies are not made or distributed for direct commercial advantage, the ACM copyright notice and the title of the publication and its date appear, and notice is given that copying is by permission of the Association for Computing Machinery. To copy otherwise, or to republish, requires a fee and/or specific permission. CQACM 0360-0300/92/0600-0131 $01.50 132 “ Charles W. Krueger General Terms: Design, Economics, Languages Additional Key Words and Phrases: AbstractIon, cognitive distance, software reuse CONTENTS 9. TRANSFORMATIONAL SYSTEMS 9.1 AbstractIon m Transformational Systems 9.2 SelectIon 9.3 Speciahzatlon INTRODUCTION 9.4 Integratmn 1. ABSTRACTION 9.5 Appraisal of Reuse Techmques m Transfor- 1 1 Abstraction ]n Software Development mational Systems 12 Abstraction m Software Reuse 10 SOFTWARE ARCHITECTURES 13 Cognitive D]stance 10.1 AbstractIon m Software Architectures 2, ORGANIZATION OF THE SURVEY 10.2 Selection 3. HIGH-LEVEL LANGUAGES 10.3 Speclahzatlon 3.1 AbstractIon m High-Level Languages 10.4 Integration 3.2 SelectIon 10.5 Appraisal of Reuse Techniques in Software 3.3 Speclahzatlon Architectures 3.4 Integration 11 SUMMARY 35 ADcraisal. of Reuse Techmques m Hlgh- 11,1 Categories and Taxonomy Level Languages 11.2 Cogmtlve Distance 4. DESIGN AND CODE SCAVENGING 113 General Conclusions 41 Abstraction m Design and Code ACKNOWLEDGMENTS Scavenging REFERENCES 4.2 SelectIon 4.3 Speclalizatlon 4.4 Integration 4.5 Appramal of Reuse Techmques m Desgn INTRODUCTION and Code Scavenging 5. SOURCE CODE COMPONENTS The 1968 NATO Software Engineering 51 Abstraction ]n Source Code Components Conference is generally considered the 52 SelectIon birthplace of the software engineering 5.3 Specialization 5.4 Integration field [Naur and Randell 1968]. The con- 5.5 Object-Oriented Van ants to Component ference focused on the software Reuse crisis—the problem of building large, re- 5.6 Appraisal of Reuse Techniques m Source liable software systems in a controled, Code Components 6 SOFTWARE SCHEMAS cost-effective way (it was at this confer- 61 Abstraction in Software Schemas ence that the term soft ware crisis origi- 62 Selection nated). From the beginning, software 63 Specialization reuse has been touted as a means for 6.4 Integration overcoming the software crisis. The semi- 6.5 Appramal of Reuse Techniques in Software Schemas nal paper on software reuse was an in- 7. APPLICATION GENERATORS vited paper at the conference: Mass Pro- 71 Abstraction m Apphcatlon Generators duced Software Components by Mclh-oy 7,)- &lectiOn [ 1968]. McIlroy proposed a library of 7.3 Specialization 7.4 Integration reusable components and automated 7.5 Software Life Cycle with Application techniques for customizing components Generators to different degrees of precision and ro- 76 Appraisal of Reuse Techniques in bustness. McIlroy felt that component li- Apphcation Generators 8. VERY HIGH-LEVEL LANGUAGES braries could be effectively used for nu- 8.1 Abstraction m Very High-Level merical computation, 1/0 conversion, Languages text processing, and dynamic storage al- 8.2 Selectlon location. 8.3 Speclalizatlon Twenty-three years later, many com- 8.4 Integration 8.5 Appraisal of Reuse Techmques in Very puter scientists still see software reuse High-level Languages as potentially a powerful means of im- ACM Computing Surveys, Vol. 24, No. 2, June 1992 Software Reuse ● 133 proving the practice of software engi- developers would be forced to sift neering [Boehm 1987; Brooks 1987; through a collection of reusable arti- Standish 1984]. The advantage of amor- facts trying to figure out what each tizing software development efforts artifact did, when it could be reused, through reuse continues to be widely ac- and lhow to reuse it, knowledged, even though the tools, Selection. Most reuse approaches help methods, languages, and overall under- software developers locate, compare, standing of software engineering have and select reusable software artifacts. changed significantly since 1968 [Bi- For example, classification and cata- ggerstaff and Richter 1989]. loging schemes can be used to organize In spite of its promise, software reuse a library of reusable artifacts and to has failed to become standard practice guide software developers as they for software construction. In light of this search for artifacts in the library failure, the computer science community [Horowitz and Munson 1989]. has renewed its interest in understand- Specialization. With many reuse tech- ing how and where reuse can be effective nologies, similar artifacts are merged and why it has proven so difficult to into a single generalized (or generic) bring the seemingly simple idea of soft- artifact. After selecting a generalized ware reuse to the forefront of software artifact for reuse, the software devel- development technologies [Biggerstaff oper specializes it through parame- and Perlis 1989a, 1989b; Freeman 1987b; ters. transformations. constraints. or Tracz 1988]. some other form of refinement. For Simply stated, software reuse is using example, a reusable stack implemen- existing software artifacts during the tation might be parameterized for the construction of a new software system. maximum stack depth. A programmer The types of artifacts that can be reused using this generalized stack would are not limited to source code fragments specialize it by providing a value for but rather may include design struc- this parameter. tures, module-level implementation Integration. Reuse technologies typi- structures, specifications, documenta- cally have an integration framework. tion, transformations, and so on [Free- A software develo~er uses this frame- man 1983]. work. to combine a collection of se- There is great diversity in the software lected and specialized artifacts into a engineering technologies that involve complete software system. A module some form of software reuse. However, interconnection language is an exam- there is a commonality among the tech- ple of an integration framework [De- niques used. For example, software com- Remer and Krcm 1976; Prieto-Diaz and ponent libraries, application generators, Neighbors 1986]. With a module inter- source code compilers, and generic soft- connection language, functions are ex-