Language requirements for large-scale generic libraries

The past decade of experience has demonstrated that the generic programming methodology is highly effective for the design, implementation, and use of large-scale software libraries. The fundamental principle of generic programming is the realization of interfaces for entire sets of components, based on their essential syntactic and semantic requirements, rather than for any particular components. Many programming languages have features for describing interfaces between software components, but none completely support the approach used in generic programming. We have recently developed $\mathcal{G}$, a language designed to provide first-class language support for generic programming and large-scale libraries. In this paper, we present an overview of $\mathcal{G}$ and analyze the interdependence between language features and library design in light of a complete implementation of the Standard Template Library using $\mathcal{G}$. In addition, we discuss important issues related to modularity and encapsulation in large-scale libraries and how language support for validation of components in isolation can prevent many common problems in component integration.

[1]  Jeremy G. Siek,et al.  The Boost Graph Library - User Guide and Reference Manual , 2001, C++ in-depth series.

[2]  Simon L. Peyton Jones,et al.  Imperative functional programming , 1993, POPL '93.

[3]  Martin Odersky,et al.  An Overview of the Scala Programming Language , 2004 .

[4]  Craig Schaffert,et al.  Abstraction mechanisms in CLU , 1977, Commun. ACM.

[5]  Robin Milner,et al.  A Theory of Type Polymorphism in Programming , 1978, J. Comput. Syst. Sci..

[6]  Bjarne Stroustrup,et al.  Parameterized Types for C++ , 1989, C++ Conference.

[7]  Mariette Yvinec,et al.  Programming with CGAL: the example of triangulations , 1999, SCG '99.

[8]  Jeremy G. Siek,et al.  Essential language support for generic programming , 2005, PLDI '05.

[9]  John C. Reynolds,et al.  Towards a theory of type structure , 1974, Symposium on Programming.

[10]  .. I,et al.  OPERATORS AND ALGEBRAIC STRUCTURES , 1981 .

[11]  Alexander A. Stepanov,et al.  Higher Order Imperative Programming , 2004 .

[12]  Robin Milner,et al.  Definition of standard ML , 1990 .

[13]  Simon L. Peyton Jones,et al.  Associated types with class , 2005, POPL '05.

[14]  Jaakko Järvi,et al.  A comparative study of language support for generic programming , 2003, OOPSLA '03.

[15]  Nicolas Bourbaki,et al.  Theory of sets , 1968 .

[16]  John C. Mitchell,et al.  F-bounded polymorphism for object-oriented programming , 1989, FPCA.

[17]  Jim Law,et al.  Review of "The boost graph library: user guide and reference manual by Jeremy G. Siek, Lie-Quan Lee, and Andrew Lumsdaine." Addison-Wesley 2002. , 2003, SOEN.

[18]  Alexander A. Stepanov,et al.  C++ Standard Template Library , 2000 .

[19]  Michael J. Vilot,et al.  Standard template library , 1996 .

[20]  Mark A. Williams,et al.  The Bioinformatics Template Library—generic Components for Biocomputing , 2001 .

[21]  Nicolas Bourbaki,et al.  Elements of mathematics , 2004 .

[22]  Luca Cardelli,et al.  On understanding types, data abstraction, and polymorphism , 1985, CSUR.

[23]  E. W. Ng Symbolic and Algebraic Computation , 1979, Lecture Notes in Computer Science.

[24]  Alexander A. Stepanov,et al.  Generic Programming , 1988, ISSAC.

[25]  Nicolas Bourbaki Elements of Mathematics: Theory of Sets , 1968 .

[26]  Alexander A. Stepanov,et al.  A library of generic algorithms in Ada , 1987, SIGAda '87.

[27]  Simon L. Peyton Jones,et al.  Associated type synonyms , 2005, ICFP '05.

[28]  Martin Odersky,et al.  A Nominal Theory of Objects with Dependent Types , 2003, ECOOP.

[29]  Matthew Harold Austern,et al.  Generic programming and the STL , 1998 .

[30]  Philip Wadler,et al.  How to make ad-hoc polymorphism less ad hoc , 1989, POPL '89.