Fundamentals of Generic Programming

  • James C. Dehnert
  • Alexander Stepanov
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 1766)


Generic programming depends on the decomposition of programs into components which may be developed separately and combined arbitrarily, subject only to well-defined interfaces. Among the interfaces of interest, indeed the most pervasively and unconsciously used, are the fundamental operators common to all C++ built-in types, as extended to user-defined types; e.g., copy constructors, assignment, and equality. We investigate the relations which must hold among these operators to preserve consistency with their semantics for the built-in types and with the expectations of programmers. We can produce an axiomatization of these operators which yields the required consistency with built-in types, matches the intuitive expectations of programmers, and also reflects our underlying mathematical expectations.


Generic programming operator semantics concept regular type 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    J. Demmel, LAPACK: A portable linear algebra library for supercomputers, Proc. of the 1989 IEEE Control Systems Society Workshop on Computer-Aided Control System Design, December 1989.Google Scholar
  2. 2.
    Aaron Kershenbaum, David R. Musser, and Alexander A. Stepanov, Higher-Order Imperative Programming, Computer Science Technical Report 88-10, Rensselaer Polytechnic Institute, April 1988.Google Scholar
  3. 3.
    Brian W. Kernighan and John R. Mashey, The Unix Programming Environment, Computer 14(4), 1981, pp. 12–24.CrossRefzbMATHGoogle Scholar
  4. 4.
    Brian W. Kernighan and Dennis M. Ritchie, The C Programming Language, Prentice-Hall, Englewood Cliffs, NJ, 1978.zbMATHGoogle Scholar
  5. 5.
    David R. Musser and Alexander A. Stepanov, Generic Programming, in P. Gianni, ed., Symbolic and Algebraic Computation: International Symposium ISSAC 1988, Lecture Notes in Computer Science v. 38, Springer-Verlag, Berlin, 1989, pp. 13–25.CrossRefGoogle Scholar
  6. 6.
    Robert W. Scheifler and James Gettys, X Window System, 3rd Ed., Digital Press, 1992.Google Scholar
  7. 7.
    Alexander Stepanov and Meng Lee, The Standard Template Library, Tech. Report HPL-95-11, HP Laboratories, November 1995.Google Scholar
  8. 8.
    Bjarne Stroustrup, The C++ Programming Language, 3rd Ed., Addison-Wesley, Reading, MA, 1997.zbMATHGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2000

Authors and Affiliations

  • James C. Dehnert
    • 1
  • Alexander Stepanov
    • 1
  1. 1.Silicon Graphics, Inc.USA

Personalised recommendations