Abstract
Generic programming centers around the idea of abstracting from concrete, efficient algorithms to obtain generic algorithms that can be combined with different data representations to produce a wide variety of useful software. For example, a class of generic sorting algorithms can be defined which work with finite sequences but which can be instantiated in different ways to produce algorithms working on arrays or linked lists.
Four kinds of abstraction—data, algorithmic, structural, and representational—are discussed, with examples of their use in building an Ada library of software components. The main topic discussed is generic algorithms and an approach to their formal specification and verification, with illustration in terms of a partitioning algorithm such as is used in the quicksort algorithm. It is argued that generically programmed software component libraries offer important advantages for achieving software productivity and reliability.
The first author's work was sponsored in part through a subcontract from Computational Logic, Inc., which was sponsored in turn by the Defense Advanced Research Projects Agency, ARPA order 9151. The views and conclusions contained in this document are those of the authors and should not be interpreted as representing the official policies, either expressed or implied, of the Defense Advanced Research Projects Agency, the U.S. Government, or Computational Logic., Inc.
Preview
Unable to display preview. Download preview PDF.
References
G. Booch, Software Components in Ada. Benjamin/Cummings, 1987.
O.-J. Dahl, E. W. Dijkstra, and C. A. R. Hoare, Structured Programming, Academic Press, 1972.
E. W. Dijkstra, A Discipline of Programming, Prentice-Hall, Englewood Cliffs, New Jersey, 1976.
J. Goguen, “Parameterized Programming,” Transactions on Software Engineering, SE-10(5):528–543, September 1984.
A. Kershenbaum, D. R. Musser and A. A. Stepanov, “Higher Order imperative Programming,” Computer Science Dept. Rep. No. 88-10, Rensselaer Polytechnic Institute, Troy, New York, April 1988.
D. R. Musser and A. A. Stepanov, “A Library of Generic Algorithms in Ada,” Proc. of 1987 ACM SIGAda International Conference, Boston, December, 1987.
D. R. Musser and A. A. Stepanov, Ada Generic Library Linear Data Structure Packages, Volumes 1 and 2, General Electric Corporate Research and Development Reports 88CRD112 and 88CRD113, April 1988.
G. L. Steele, Common LISP: The Language, Digital Press, 1984.
N. Wirth, Algorithms + Data Structures = Programs, Prentice-Hall, 1976.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1989 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Musser, D.R., Stepanov, A.A. (1989). Generic programming. In: Gianni, P. (eds) Symbolic and Algebraic Computation. ISSAC 1988. Lecture Notes in Computer Science, vol 358. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-51084-2_2
Download citation
DOI: https://doi.org/10.1007/3-540-51084-2_2
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-51084-0
Online ISBN: 978-3-540-46153-1
eBook Packages: Springer Book Archive