ABSTRACT
Java has no module system. Its packages only subdivide the class name space, allowing only a very limited form of component-level information hiding and reuse. Two Java Community Processes have started addressing this problem: one describes the runtime system and has reached an early draft stage, while the other considers the developer's view and only has a straw-man proposal. Both are natural language documents, which inevitably contain ambiguities.
In this work we design and formalize a core module system for Java. Where the JCP documents are complete, we follow them closely; elsewhere we make reasonable choices. We define the syntax, the type system, and the operational semantics of an LJAM language, defining these rigorously in the Isabelle/HOL automated proof assistant. Using this formalization, we identify various issues with the module system. We highlight the underlying design decisions, and discuss several alternatives and their benefits. Our Isabelle/HOL definitions should provide a basis for further consideration of the design alternatives, for reference implementations, and for proofs of soundness.
- Apache Felix. http://cwiki.apache.org/felix/.Google Scholar
- Eclipse Callisto. http://www.eclipse.org/callisto/.Google Scholar
- Equinox. http://www.eclipse.org/equinox/.Google Scholar
- Fusion. http://en.wikipedia.org/wiki/.NET_assembly#Fusion.Google Scholar
- Ancona, D., Damiani, F., Drossopoulou, S., and Zucca, E. Polymorphic Bytecode: Compositional Compilation for Java-like Languages. In Proc32nd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL'05 (Long Beach, CA, USA, Jan12-14, 2005), J. Palsberg and M. Abadi, Eds., ACM, pp. 26--37. Google ScholarDigital Library
- Ancona, D., Lagorio, G., and Zucca, E. Jam -a smooth extension of java with mixins. In ProcEuropean Conference on Object-Oriented Programming, ECOOP'00 (Sophia Antipolis and Cannes, France, June 12--16, 2000), E. Bertino, Ed., vol. 1850 of Lecture Notes in Computer Science, Springer, pp. 154--178. Google ScholarDigital Library
- Ancona, D., Lagorio, G., and Zucca, E. Smart Modules for Java-like Languages. In Proc7th Workshop on Formal Techniques for Java-like Programs, FTfJP'05 (Glasgow, Scotland, July 26, 2005).Google Scholar
- Ancona, D., and Zucca, E. True Modules for Java-like Languages. In ProcEuropean Conference on Object-Oriented Programming, ECOOP'01 (Budapest, Hungary, June18-22, 2001), JL. Knudsen, Ed., vol. 2072 of Lecture Notes in Computer Science, Springer, pp. 354--380. Google ScholarDigital Library
- Bierman, G., Parkinson, M., and Pitts, A. MJ: An imperative core calculus for Java and Java with Effects. Tech. Rep. 563, Cambridge University Computer Laboratory, Apr. 2003.Google Scholar
- Bracha, G. Developing Modules for Development. http://blogs.sun.com/gbracha/, Mar. 2006.Google Scholar
- Bracha, G. Superpackages: Development Modules in Dolphin. In ProcJavaOneSM Conference (2006), Sun Microsystems, Inc.Google Scholar
- Corwin, J., Bacon, D. F., Grove, D., and Murthy, C. MJ: a rational module system for Java and its applications. In ProcACM SIGPLAN Conference on Object-Oriented Programming Systems, Languages and Applications, OOPSLA'03(Anaheim, CA, USA, Oct. 26--30, 2003), RCrocker and GLS. Jr., Eds., ACM, pp. 241--254. Google ScholarDigital Library
- DevelopMentor. Assemblies Module -.NET: Building Applications and Components with C#, Jan. 2004.Google Scholar
- Flatt, M., Krishnamurthi, S., and Felleisen, M. A Programmer's reduction semantics for classes and mixins. Tech. Rep. TR-97-293, Rice University, 1997. Corrected June, 1999.Google Scholar
- Gosling, J., Joy, B., Stelle, G., and Bracha, G. The Java™ Language Specification, Third. ed. Sun Microsystems, Inc., May 2005.Google Scholar
- Igarashi, A., Pierce, B. C., and Wadler, P. Featherweight Java: a minimal core calculus for Java and GJ. ACM Trans. Program. Lang. Syst. 23, 3 (2001), 396--450. Google ScholarDigital Library
- Klein, G., and Nipkow, T. A Machine-Checked Model for a Java-Like Language, Virtual Machine and Compiler. ACM Transactions on Programming Languages and Systems, TOPLAS'06 28, 4 (July 2006), 619--695. Google ScholarDigital Library
- Liang, S., and Bracha, G. Dynamic Class Loading in the Java Virtual Machine. In ProcACM SIGPLAN Conference on Object-Oriented Programming Systems, Languages and Applications, OOPSLA'98 (Vancouver, British Columbia, Canada, Oct. 18--22, 1998), pp. 36--44. Google ScholarDigital Library
- McDirmid, S., Flatt, M., and Hsieh, W. Jiazzi: New Age Components for Old Fashioned Java. In ProcACM SIGPLAN Conference on Object-Oriented Programming Systems, Languages and Applications, OOPSLA'01 (Tampa, Florida, USA, Nov. 2001), vol. 36, pp. 211--222. Google ScholarDigital Library
- Microsoft. C# Specification, 2.0 ed., Sept. 2005.Google Scholar
- Nipkow, T., Paulson, L. C., and Wenzel, M. Isabelle/HOL -A Proof Assistant for Higher-Order Logic, vol. 2283 of Lecture Notes in Computer Science. Springer, 2002.Google Scholar
- OSGi™ Alliance. About the OSGi Service Platform, 4.1 ed., Nov. 2005.Google Scholar
- Robinson, R. Developing and Deploying Modular J2EE Applications with WebSphere Studio Application Developer and WebSphere Application Server. http://www-128.ibm.com/developerworks/websphere/library/techarticles/02%06_robinson/robinson.html, June 2002.Google Scholar
- Seco, J. C., and Caires, L. A Basic Model of Typed Components. In ProcEuropean Conference on Object-Oriented Programming, ECOOP'00 (Sophia Antipolis and Cannes, France, June 12--16, 2000), E. Bertino, Ed., vol. 1850 of Lecture Notes in Computer Science, Springer, pp. 108--128. Google ScholarDigital Library
- Sewell, P., Zappa Nardelli, F., Owens, S., Peskine, G., Ridge, T., Sarkar, S., and Strniša, R. Ott: Effective Tool Support for the Working Semanticist. In ProcICFP (Freiburg, Germany, Oct. 2007). To appear in ICFP'07. Google ScholarDigital Library
- Strniša, R. Lightweight Java Module System. http://www.cl.cam.ac.uk/~rs456/ljam, Feb. 2007.Google Scholar
- Strniša, R., and Parkinson, M. Lightweight Java. http://www.cl.cam.ac.uk/~rs456/lj, Sept. 2006.Google Scholar
- Sun Microsystems, Inc. Java™ SE 7. https://jdk7.dev.java.net/. In development.Google Scholar
- Sun Microsystems, Inc. JSR-294: Improved Modularity Support in the Java™ Programming Language. http://jcp.org/en/jsr/detail?id=294.Google Scholar
- Sun Microsystems, Inc. OpenJDK: Modules project. http://openjdk.java.net/projects/modules/.Google Scholar
- Sun Microsystems, Inc. JSR-277: Java™ Module System. http://jcp.org/en/jsr/detail?id=277, Oct. 2006. Early Draft.Google Scholar
- Zenger, M. Programming Language Abstractions for Extensible Software Components. PhD thesis, University of Lausanne, EPFL, 2003.Google Scholar
Index Terms
- The java module system: core design and semantic definition
Recommendations
The java module system: core design and semantic definition
Proceedings of the 2007 OOPSLA conferenceJava has no module system. Its packages only subdivide the class name space, allowing only a very limited form of component-level information hiding and reuse. Two Java Community Processes have started addressing this problem: one describes the runtime ...
Evaluating the Java Native Interface JNI: Leveraging Existing Native Code, Libraries and Threads to a Running Java Virtual Machine
This article aims to explore JNI features and to discover fundamental operations of the Java programming language, such as arrays, objects, classes, threads and exception handling, and to illustrate these by using various algorithms and code samples. ...
Evaluating the Java Native Interface JNI: Data Types and Strings
This article describes how the java native interface JNI is a powerful feature of the java platform that started to draw attention in the latter years as an efficient programming framework for building and delivering innovative technological ...
Comments