Integrated Software Reuse by Paul Walton Neil Maiden

Integrated Software Reuse by Paul Walton Neil Maiden

Author:Paul Walton, Neil Maiden [Paul Walton, Neil Maiden]
Language: eng
Format: epub
ISBN: 9781138316669
Barnesnoble:
Publisher: Taylor & Francis
Published: 2020-12-10T00:00:00+00:00


7 Formal Methods and Transformations in Software Reuse

Martin Ward

Centre for Software Maintenance

7.1 INTRODUCTION

Production of software is costly and error prone, and the most important means of production (good programmers) are scarce. Therefore there exists a need to circumvent this costly manual production process. Analogies from classical engineering suggest that by building up a catalogue of standard components and construction techniques, whose characteristics are well documented, the cost of new construction projects can be greatly reduced. The bridge builder knows under what conditions a ‘suspension bridge’ is the right approach and has a collection of standard girders, cables, nuts, bolts etc. which s/he can use in the design. This has lead to the notion of a component repository as a means to reduce the effort involved in constructing new software.

7.1.1 Current reuse technology

The desire to avoid writing the same section of code more than once led to the invention of macros and subroutines. These allow the reuse of common code sequences, but the reuse is confined to a single author, or at most a single project. This is too restricted to bring relief to the industry.

Standard subroutine libraries have proved a more powerful technique. Packages like SSP and SPSS have had high success because they not only relieve the programmer from the drudgery of coding but also (in their limited domain of application) relieve him from the need to develop an algorithm, or to understand in detail the theory behind it. Unfortunately, only limited progress has been made in this area since the early days.

We could conceive of a high-level language as an attempt at reusability: canonical structures which frequently occur in a program, such as looping constructs and methods of procedure call, have been encapsulated into a single command. In addition, common programming techniques such as register allocation, loop strength reduction and other optimisations are carried out automatically by the compiling system. In the case of the GNU C compiler [8] ‘function inlining’ can be carried out automatically: the compiler selects suitable procedures for inline expansion. This means that the distinction between macros and procedures has (for most practical cases) been removed. The further extension of this idea, to still higher-level languages, is restricted by the perceived need for compilation to be a totally automatic process.

The module or package concept in languages such as Modula-2 or ADA appears to provide even greater support for reuse. The programmer can define data or procedural abstractions and link code of a reasonably general nature into the code she is writing. However, the module implementations at hand are often incompatible with each other since they have been developed independently. They will also be incompatible with the new product under construction. The difficulties involved in re-writing and patching existing modules, without introducing bugs, can be greater than the cost of starting from scratch.

Certain operating system features, such as pipes, have been considered as a means of supporting reuse [5]. A new system is built up by combining programs, taken from a ‘toolkit’ of standard utilities, using these features.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.