Generic programming

  • David R. Musser
  • Alexander A. Stepanov
Part of the Lecture Notes in Computer Science book series (LNCS, volume 358)


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.


Generic Algorithm Data Abstraction Path Segment Partition Algorithm Defense Advance Research Project Agency 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. [1]
    G. Booch, Software Components in Ada. Benjamin/Cummings, 1987.Google Scholar
  2. [2]
    O.-J. Dahl, E. W. Dijkstra, and C. A. R. Hoare, Structured Programming, Academic Press, 1972.Google Scholar
  3. [3]
    E. W. Dijkstra, A Discipline of Programming, Prentice-Hall, Englewood Cliffs, New Jersey, 1976.Google Scholar
  4. [4]
    J. Goguen, “Parameterized Programming,” Transactions on Software Engineering, SE-10(5):528–543, September 1984.Google Scholar
  5. [5]
    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.Google Scholar
  6. [6]
    D. R. Musser and A. A. Stepanov, “A Library of Generic Algorithms in Ada,” Proc. of 1987 ACM SIGAda International Conference, Boston, December, 1987.Google Scholar
  7. [7]
    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.Google Scholar
  8. [8]
    G. L. Steele, Common LISP: The Language, Digital Press, 1984.Google Scholar
  9. [9]
    N. Wirth, Algorithms + Data Structures = Programs, Prentice-Hall, 1976.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1989

Authors and Affiliations

  • David R. Musser
    • 1
  • Alexander A. Stepanov
    • 2
  1. 1.Computer Science DepartmentRensselaer Polytechnic InstituteTroy
  2. 2.Computer Science DepartmentPolytechnic UniversityBrooklyn

Personalised recommendations