Abstract
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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Kapur, D., Musser, D.R., Stepanov, A.: Operators and algebraic structures. In: Proc. of the Conference on Functional Programming Languages and Computer Architecture. ACM Press, Portsmouth (1981)
Musser, D.R., Stepanov, A.A.: Generic programming. In: Gianni, P. (ed.) ISSAC 1988. LNCS, vol. 358, pp. 13–25. Springer, Heidelberg (1989)
Musser, D.R., Stepanov, A.A.: A library of generic algorithms in Ada. In: Using Ada (1987 International Ada Conference), pp. 216–225. ACM SIGAda, New York (1987)
Kershenbaum, A., Musser, D., Stepanov, A.: Higher order imperative programming. Technical Report 88-10, Rensselaer Polytechnic Institute (1988)
Stroustrup, B.: Parameterized types for C++. In: USENIX C++ Conference (1988)
Stepanov, A.A., Lee, M.: The Standard Template Library. Technical Report X3J16/94-0095, WG21/N0482, ISO Programming Language C++ Project (1994)
Austern, M.H.: Generic Programming and the STL. Professional computing series. Addison-Wesley, Reading (1999)
Köthe, U.: Reusable Software in Computer Vision. In: Handbook on Computer Vision and Applications, vol. 3. Academic Press, London (1999)
Siek, J., Lee, L.Q., Lumsdaine, A.: The Boost Graph Library: User Guide and Reference Manual. Addison-Wesley, Reading (2002)
Boissonnat, J.D., Cazals, F., Da, F., Devillers, O., Pion, S., Rebufat, F., Teillaud, M., Yvinec, M.: Programming with CGAL: the example of triangulations. In: Proceedings of the fifteenth annual symposium on Computational geometry, pp. 421–422. ACM Press, New York (1999)
Pitt, W.R., Williams, M.A., Steven, M., Sweeney, B., Bleasby, A.J., Moss, D.S.: The bioinformatics template library: generic components for biocomputing. Bioinformatics 17, 729–737 (2001)
Troyer, M., Todo, S., Trebst, S., Alet, F.: ALPS: Algorithms and Libraries for Physics Simulations, http://alps.comp-phys.org/
Garcia, R., Jarvi, J., Lumsdaine, A., Siek, J., Willcock, J.: A comparative study of language support for generic programming. In: OOPSLA 2003: Proceedings of the 18th annual ACM SIGPLAN conference on Object-oriented programing, systems, languages, and applications, pp. 115–134. ACM Press, New York (2003)
Siek, J., Lumsdaine, A.: Essential language support for generic programming. In: PLDI 2005: Proceedings of the ACM SIGPLAN 2005 conference on Programming language design and implementation, pp. 73–84. ACM Press, New York (2005)
Girard, J.Y.: Interprétation Fonctionnelle et Élimination des Coupures de l’Arithmétique d’Ordre Supérieur. Thèse de doctorat d’état, Université Paris VII, Paris, France (1972)
Reynolds, J.C.: Towards a theory of type structure. In: Robinet, B. (ed.) Programming Symposium. LNCS, vol. 19, pp. 408–425. Springer, Heidelberg (1974)
Boost (Boost C++ Libraries), http://www.boost.org/
International Organization for Standardization: ISO/ IEC 14882:1998: Programming languages — C++. International Organization for Standardization, Geneva, Switzerland (1998)
Liskov, B., Snyder, A., Atkinson, R., Schaffert, C.: Abstraction mechanisms in CLU. Communications of the ACM 20, 564–576 (1977)
Milner, R.: A theory of type polymorphism in programming. Journal of Computer and System Sciences 17, 348–375 (1978)
Bourbaki, N.: Elements of Mathematics. Theory of Sets. Springer, Heidelberg (1968)
Wadler, P., Blott, S.: How to make ad-hoc polymorphism less ad-hoc. In: ACM Symposium on Principles of Programming Languages, pp. 60–76. ACM, New York (1989)
Chakravarty, M.M.T., Keller, G., Peyton Jones, S., Marlow, S.: Associated types with class. In: POPL 2005: Proceedings of the 32nd ACM SIGPLAN-SIGACT symposium on Principles of programming languages, pp. 1–13. ACM Press, New York (2005)
Chakravarty, M.M.T., Keller, G., Jones, S.P.: Associated type synonyms. In: Proceedings of the ACM SIGPLAN International Conference on Functional Programming (ICFP 2005). ACM Press, New York (2005)
Canning, P., Cook, W., Hill, W., Olthoff, W., Mitchell, J.C.: F-bounded polymorphism for object-oriented programming. In: Proceedings of the fourth international conference on functional programming languages and computer architecture (1989)
Odersky, M., et al.: An overview of the scala programming language. Technical Report IC/2004/64, EPFL Lausanne, Switzerland (2004)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2005 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Siek, J., Lumsdaine, A. (2005). Language Requirements for Large-Scale Generic Libraries. In: Glück, R., Lowry, M. (eds) Generative Programming and Component Engineering. GPCE 2005. Lecture Notes in Computer Science, vol 3676. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11561347_27
Download citation
DOI: https://doi.org/10.1007/11561347_27
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-29138-1
Online ISBN: 978-3-540-31977-1
eBook Packages: Computer ScienceComputer Science (R0)