ACM Home Page
Please provide us with feedback. Feedback
Associated types and constraint propagation for mainstream object-oriented generics
Full text PdfPdf (354 KB)
Source Conference on Object Oriented Programming Systems Languages and Applications archive
Proceedings of the 20th annual ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications table of contents
San Diego, CA, USA
SESSION: Type types table of contents
Pages: 1 - 19  
Year of Publication: 2005
ISBN:1-59593-031-0
Also published in ...
Authors
Jaakko Järvi  Texas A&M University, College Station, TX
Jeremiah Willcock  Indiana University, Bloomington, IN
Andrew Lumsdaine  Indiana University, Bloomington, IN
Sponsors
ACM: Association for Computing Machinery
SIGPLAN: ACM Special Interest Group on Programming Languages
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 6,   Downloads (12 Months): 49,   Citation Count: 5
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/1094811.1094813
What is a DOI?

ABSTRACT

Support for object-oriented programming has become an integral part of mainstream languages, and more recently generic programming has gained widespread acceptance as well. A natural question is how these two paradigms, and their underlying language mechanisms, should interact. One particular design option, that of using subtyping to constrain the type parameters of generic functions, has been chosen in the generics of Java and those planned for a future revision of C#.Certain shortcomings have previously been identified in using subtyping for constraining parametric polymorphism in the context of generic programming.To address these, we propose extending object-oriented interfaces and subtyping to include associated types and constraint propagation.Associated types are type members of interfaces and classes. Constraint propagation allows certain constraints on type parameters to be inferred from other constraints on those parameters and their use in base class type expressions.The paper demonstrates these extensions in the context of C# (with generics), describes a translation of the extended features to C#, and presents a formalism proving their safety. The formalism is applicable to other mainstream object-oriented languages supporting F-bounded polymorphism, such as Java.


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
Stepanov, A., Lee, M.: The Standard Template Library. Technical Report HPL-94-34(R.1), Hewlett-Packard Laboratories (1994) http://www.hpl.hp.com/techreports.
 
2
Stepanov, A.: The Standard Template Library --- how do you build an algorithm that is both generic and efficient? Byte Magazine 20 (1995)
 
3
An, P., Jula, A., Rus, S., Saunders, S., Smith, T., Tanase, G., Thomas, N., Amato, N., Rauchwerger, L.: STAPL: An adaptive, generic parallel C++ library. In: Languages and Compilers for Parallel Computing. Volume 2624 of Lecture Notes in Computer Science. Springer (2001) 193--208
 
4
 
5
Siek, J., Lumsdaine, A.: A modern framework for portable high performance numerical linear algebra. In: Modern Software Tools for Scientific Computing. Birkhäuser (1999)
 
6
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 (2001) 729--737
 
7
Microsoft Corporation: C# Version 2.0 Specification, March 2005 Draft. (2005) http://msdn.microsoft.com/vcsharp/programming/language.
8
9
 
10
Thorup, K.K.: Genericity in Java with virtual types. In: ECOOP '97. Volume 1241 of Lecture Notes in Computer Science. (1997) 444--471
11
12
 
13
 
14
 
15
Kapur, D., Musser, D.: Tecton: a framework for specifying and verifying generic system components. Technical Report RPI--92--20, Department of Computer Science, Rensselaer Polytechnic Institute, Troy, New York 12180 (1992)
 
16
Austern, M.H.: Generic Programming and the STL. Professional computing series. Addison-Wesley (1999)
 
17
Silicon Graphics, Inc.: SGI Implementation of the Standard Template Library. (2004) http://www.sgi.com/tech/stl/.
 
18
International Organization for Standardization: ISO/IEC 14882:1998: Programming languages --- C++, Geneva, Switzerland (1998)
 
19
Bruce, K.B., Fiech, A., Petersen, L.: Subtyping is not a good "match" for object-oriented languages. In: ECOOP '97. Volume 1241 of Lecture Notes in Computer Science., Springer-Verlag (1997) 104--127
 
20
21
 
22
Torgersen, M.: Virtual types are statically safe. In: FOOL 5: Workshop on Foundations of Object-Oriented Languages. (1998) http://pauillac.inria.fr/~remy/fool/.
 
23
 
24
 
25
Bruce, K.B., Vanderwaart, J.C.: Semantics-driven language design: Statically type-safe virtual types in object-oriented languages. In: Mathematical Foundations of Programming Semantics. Volume 20 of Electronic Notes in Theoretical Computer Science. (2000)
 
26
 
27
Odersky, M., Cremet, V., Röckl, C., Zenger, M.: A nominal theory of objects with dependent types. In: ECOOP '03. Volume 2743 of Lecture Notes in Computer Science., Springer-Verlag (2003) 201--224
 
28
Odersky, M., Altherr, P., Cremet, V., Emir, B., et al.: The Scala Language Specification. Programming Methods Laboratory, EPFL. Version 1.0 edn. (2005) http://scala.epfl.ch/docu/files/ScalaReference.pdf.
 
29
Odersky, M., Zenger, C.: Nested types. In: FOOL 8: Workshop on Foundations of Object-Oriented Languages. (2001)
 
30
Myers, N.: A new and useful technique: "traits". C++ Report 7 (1995) 32--35
 
31
 
32
33
34
 
35
Chambers, C., the Cecil Group: The Cecil Language: Specification and Rationale, Version 3.1. University of Washington, Computer Science and Engineering. (2002) http://www.cs.washington.edu/research/projects/cecil/.
36
 
37
Torgersen, M., Ernst, E., Hansen, C.P.: Wild FJ. In: FOOL 12: Workshop on Foundations of Object-Oriented Languages. (2005)
38
 
39


Collaborative Colleagues:
Jaakko Järvi: colleagues
Jeremiah Willcock: colleagues
Andrew Lumsdaine: colleagues