Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/1297027.1297039acmconferencesArticle/Chapter ViewAbstractPublication PagessplashConference Proceedingsconference-collections
Article

Component nextgen: a sound and expressive component framework for java

Published: 21 October 2007 Publication History

Abstract

Developing a general component system for a statically typed, object-oriented language is a challenging design problem for two reasons. First, mutually recursive references across components are common in object-oriented programs-an issue that has proven troublesome in the context of component systems for functional and procedural languages. Second, inheritance across component boundaries can cause accidental method overrides. Our recent research shows that a component framework can be constructed for a nominally typed object-oriented language supporting first-class generic types simply by adding appropriate annotations, syntactic sugar, and component-level type-checking. The fundamental semantic building blocks for constructing, type-checking and manipulating components are provided by the underlying first-class generic type system. To demonstrate the simplicity and utility of this approach we have designed and implemented an extension of Java called Component NEXTGEN (CGEN). CGEN, which is based on the Sun Java 5.0 javac compiler, is backwards compatible with existing Java binary code and runs on current Java Virtual Machines.
The primary contribution of this paper is a technical analysis of the subtle design issues involved in building a component framework for a nominally typed object-oriented language supporting first-class generics. In contrast to component systems for structurally typed languages, mutual recursion among components is accommodated in the type system and semantics without incorporating any special machinery. Our analysis includes a presentation of Core CGEN (CCG), a small, core language modeling the CGEN framework. It is based on Featherweight GJ and incorporates some ideas from MIXGEN. CCG adds the essential features to support components, but nothing more. Our discussion includes the type rules and semantics for CCG, as well as a proof of type safety.

References

[1]
E. Allen, J. Bannet, and R. Cartwright. First-class genericity for Java. In OOPSLA, 2003.
[2]
E. Allen, J. Bannet, and R. Cartwright. Mixins in Generic Java are sound. Technical report, Rice University, 2003.
[3]
E. Allen and R. Cartwright. Safe instantiation in Generic Java. In PPPJ '04, pages 61--66, 2004. Available at http://www.cs.rice.edu/CS/PLT/Publications.
[4]
E. Allen, R. Cartwright, and B. Stoler. Efficient implementation of run-time generic types for Java. In IFIP WG2.1 Working Conference on Generic Programming, 2002.
[5]
D. Ancona, G. Lagorio, and E. Zucca. Smart modules for Java-like languages. In 7th Intl. Workshop on Formal Techniques for Java-like Programs, 2005.
[6]
D. Ancona and E. Zucca. True modules for java classes. In ECOOP, 2001.
[7]
G. Bracha. The Programming Language Jigsaw: Mixins, Modularity, and Multiple Inheritance. PhD thesis, University of Utah, 1992.
[8]
G. Bracha, M. Odersky, D. Stoutamire, and P. Wadler. Making the future safe for the past: Adding genericity to the Java programming language. In OOPSLA, 1998.
[9]
R. Cartwright and G. L. Steele, Jr. Compatible genericity with run-time types for the Java programming language. In OOPSLA, 1998.
[10]
K. Crary, R. Harper, and S. Puri. What is a recursive module? In PLDI, pages 50--63, New York, NY, USA, 1999. ACM Press.
[11]
D. Dreyer. Understanding and Evolving the ML Module System. PhD thesis, Carnegie Mellon University, 2005.
[12]
M. Flatt and M. Felleisen. Units: Cool modules for HOT languages. In SIGPLAN, pages 236--248, 1998.
[13]
M. Flatt, S. Krishnamurthi, and M. Felleisen. A programmer's reduction semantics for classes and mixins. In Formal Syntax and Semantics of Java, pages 241--269, 1999.
[14]
A. Igarashi, B. Pierce, and P. Wadler. Featherweight Java: A minimal core calculus for Java and GJ. In OOPSLA, 1999.
[15]
X. Leroy. The Objective Caml system: Documentation and user's manual., 2004. http://caml.inria.fr/pub/ docs/manual-ocaml/.
[16]
S. McDirmid, M. Flatt, and W. Hsieh. Jiazzi: New age components for old fashioned Java. In OOPSLA, 2001.
[17]
S. Microsystems. JSR 14: Adding generic types to the Java Programming Language, 2001.
[18]
S. Microsystems. JSR 277: Java Module System, 2005.
[19]
S. Microsystems. The Fortress language specification, Sept 2006.
[20]
S. Microsystems. JSR 294: Improved Modularity Support in the Java Programming Language, 2006.
[21]
R. Milner, M. Tofte, and D. Macqueen. The Definition of Standard ML. MIT Press, Cambridge, MA, USA, 1997.
[22]
A. Myers, J. Bank, and B. Liskov. Parameterized types for Java. In POPL, 1997.
[23]
M. Odersky. Programming in Scala, 2006. Draft.
[24]
M. Odersky and M. Zenger. Scalable component abstractions. In OOPSLA, pages 41--57, New York, NY, USA, 2005. ACM Press.
[25]
S. Owens and M. Flatt. From structures and functors to modules and units. In ICFP, volume 41, pages 87--98, New York, NY, USA, 2006. ACM Press.
[26]
C. V. Russo. Recursive structures for standard ML. In ICFP, pages 50--61, New York, NY, USA, 2001. ACM Press.
[27]
J. Sasitorn and R. Cartwright. Efficient first-class generics on stock Java virtual machines. In SAC, 2006.
[28]
J. Sasitorn and R. Cartwright. Deriving compnents from genericity. In SAC, 2007.
[29]
J. Sasitorn and R. Cartwright. The soundness of Component NextGen. Technical report, Rice University, 2007. http://www.cs.rice.edu/~javaplt/papers/.
[30]
C. Szyperski. Component Software. Addison-Wesley, 1998.
[31]
C. A. Szyperski. Import is not inheritance: Why we need both: modules and classes. In O. L. Madsen, editor, ECOOP, volume 615, pages 19--32, Berlin, Heidelberg, New York, Tokyo, 1992. Springer-Verlag.
[32]
M. Viroli. Parametric polymorphism in Java: an efficient implementation for parametric methods. In SAC, 2001.
[33]
M. Viroli and A. Natali. Parametric polymorphism in Java: an approach to translation based on reflective features. ACM SIGPLAN Notices, 35(10):146--165, 2000.

Cited By

View all

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
OOPSLA '07: Proceedings of the 22nd annual ACM SIGPLAN conference on Object-oriented programming systems, languages and applications
October 2007
728 pages
ISBN:9781595937865
DOI:10.1145/1297027
  • cover image ACM SIGPLAN Notices
    ACM SIGPLAN Notices  Volume 42, Issue 10
    Proceedings of the 2007 OOPSLA conference
    October 2007
    686 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/1297105
    Issue’s Table of Contents
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 21 October 2007

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. components
  2. custom class loader
  3. first-class generics
  4. java implementation
  5. modules
  6. signatures

Qualifiers

  • Article

Conference

OOPSLA07
Sponsor:

Acceptance Rates

OOPSLA '07 Paper Acceptance Rate 33 of 156 submissions, 21%;
Overall Acceptance Rate 268 of 1,244 submissions, 22%

Upcoming Conference

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)3
  • Downloads (Last 6 weeks)0
Reflects downloads up to 15 Oct 2024

Other Metrics

Citations

Cited By

View all

View Options

Get Access

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media