Fundamentals of Generic Programming
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.
KeywordsGeneric programming operator semantics concept regular type
Unable to display preview. Download preview PDF.
- 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.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
- 6.Robert W. Scheifler and James Gettys, X Window System, 3rd Ed., Digital Press, 1992.Google Scholar
- 7.Alexander Stepanov and Meng Lee, The Standard Template Library, Tech. Report HPL-95-11, HP Laboratories, November 1995.Google Scholar