ACM Home Page
Please provide us with feedback. Feedback
Algorithm specialization in generic programming: challenges of constrained generics in C++
Full text PdfPdf (153 KB)
Source Conference on Programming Language Design and Implementation archive
Proceedings of the 2006 ACM SIGPLAN conference on Programming language design and implementation table of contents
Ottawa, Ontario, Canada
SESSION: Language constructs table of contents
Pages: 272 - 282  
Year of Publication: 2006
ISBN:1-59593-320-4
Also published in ...
Authors
Jaakko Järvi  Texas A&M University
Douglas Gregor  Indiana University
Jeremiah Willcock  Indiana University
Andrew Lumsdaine  Indiana University
Jeremy Siek  Rice University
Sponsors
ACM: Association for Computing Machinery
SIGPLAN: ACM Special Interest Group on Programming Languages
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 11,   Downloads (12 Months): 85,   Citation Count: 4
Additional Information:

abstract   references   cited by   index terms   collaborative colleagues  

Tools and Actions: Request Permissions Request Permissions    Review this Article  
DOI Bookmark: Use this link to bookmark this Article: http://doi.acm.org/10.1145/1133981.1134014
What is a DOI?

ABSTRACT

Generic programming has recently emerged as a paradigm for developing highly reusable software libraries, most notably in C++. We have designed and implemented a constrained generics extension for C++ to support modular type checking of generic algorithms and to address other issues associated with unconstrained generics. To be as broadly applicable as possible, generic algorithms are defined with minimal requirements on their inputs. At the same time, to achieve a high degree of efficiency, generic algorithms may have multiple implementations that exploit features of specific classes of inputs. This process of algorithm specialization relies on non-local type information and conflicts directly with the local nature of modular type checking. In this paper, we review the design and implementation of our extensions for generic programming in C++, describe the issues of algorithm specialization and modular type checking in detail, and discuss the important design tradeoffs in trying to accomplish both.We present the particular design that we chose for our implementation, with the goal of hitting the sweet spot in this interesting design space.


REFERENCES

Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.

 
1
2
3
4
5
 
6
 
7
8
 
9
Craig Chambers and the Cecil Group. The Cecil Language: Specification and Rationale, Version 3.1. University of Washington, Computer Science and Engineering, December 2002. http://www.cs.washington.edu/research/projects/cecil/.
10
 
11
 
12
13
 
14
 
15
Douglas Gregor. ConceptGCC: Concept extensions for C++. http://www.osl.iu.edu/~dgregor/ConceptGCC, 2005.
 
16
Douglas Gregor, Jeremy Siek, Jeremiah Willcock, Jaakko Järvi, Ronald Garcia, and Andrew Lumsdaine. Concepts for C++0x (revision 1). Technical Report N1849=05-0109, ISO/IEC JTC 1, Information Technology, Subcommittee SC 22, Programming Language C++, August 2005.
 
17
International Organization for Standardization. ISO/IEC 14882:1998: Programming languages - C++. Geneva, Switzerland, September 1998.
 
18
19
 
20
Mark P. Jones. Dictionary-free overloading by partial evaluation. In Partial Evaluation and Semantics-Based Program Manipulation, Orlando, Florida, June 1994 (Technical Report 94/9, Department of Computer Science, University of Melbourne), pages 107--117, 1994.
 
21
 
22
Oleg Kiselyov. Dynamic dispatch on a class of a type. Haskell mailing list, March 2003. http://okmij.org/ftp/Haskell/types.html#class-based-dispatch.
23
 
24
Mark Lillibridge. Translucent Sums: A Foundation for Higher-Order Module Systems. PhD thesis, Pittsburgh, PA, May 1997.
 
25
Brian McNamara and Yannis Smaragdakis. Static interfaces in C++. In First Workshop on C++ Template Programming, October 2000.
 
26
 
27
Microsoft Corporation. Generics in C#, September 2002. Part of the Gyro distribution of generics for .NET available at http: //research.microsoft.com/projects/clrgen/.
 
28
Microsoft Corporation. C# Version 2.0 Specification, March 2005 Draft, March 2005. http://msdn.microsoft.com/vcsharp/-programming/language.
 
29
30
 
31
 
32
 
33
Martin Odersky and al. An overview of the Scala programming language. Technical Report IC/2004/64, EPFL Lausanne, Switzerland, 2004.
34
 
35
Simon Peyton Jones, Mark Jones, and Erik Meijer. Type classes: an exploration of the design space. In Proceedings of the Second Haskell Workshop, June 1997.
 
36
 
37
 
38
Jeremy Siek and Andrew Lumsdaine. A modern framework for portable high performance numerical linear algebra. In Modern Software Tools for Scientific Computing. Birkhäuser, 1999.
 
39
Jeremy Siek and Andrew Lumsdaine. Concept checking: Binding parametric polymorphism in C++. In First Workshop on C++ Template Programming, October 2000.
40
 
41
Silicon Graphics, Inc. SGI Implementation of the Standard Template Library, 2004. http://www.sgi.com/tech/stl/.
 
42
A. Stepanov and M. Lee. The Standard Template Library. Technical Report HPL-94-34(R.1), Hewlett-Packard Laboratories, April 1994. http://www.hpl.hp.com/techreports.
 
43
 
44
Bjarne Stroustrup. Concepts - a more abstract complement to type checking. Technical Report N1510=03-0093, ISO/IEC JTC 1, Information Technology, Subcommittee SC 22, Programming Language C++, October 2003. http://www.open-std.org/jtc1/sc22/wg21.
 
45
Bjarne Stroustrup and Gabriel Dos Reis. Concepts - design choices for template argument checking. Technical Report N1522=03-0105, ISO/IEC JTC 1, Information Technology, Subcommittee SC 22, Programming Language C++, October 2003. http://www.open-std.org/jtc1/sc22/wg21.
 
46
Bjarne Stroustrup and Gabriel Dos Reis. A concept design (rev. 1). Technical Report N1782=05-0042, ISO/IEC JTC 1, Information Technology, Subcommittee SC 22, Programming Language C++, May 2005.
 
47
The GHC Team. The Glorious Glasgow Haskell Compilation System User's Guide, version 6.4.1 edition. http://www.haskell.org/ghc/docs/latest/html/users guide/index.html.
48
 
49
Jörg Walter and Mathias Koch. Boost Basic Linear Algebra. Boost, 2002. www.boost.org/libs/numeric.


Collaborative Colleagues:
Jaakko Järvi: colleagues
Douglas Gregor: colleagues
Jeremiah Willcock: colleagues
Andrew Lumsdaine: colleagues
Jeremy Siek: colleagues