Abstract
We describe a module mechanism, which we call difference-based modules, and an object-oriented language we call MixJuice. MixJuice is an enhancement to the Java language that adopts difference-based modules instead of Java’s original module mechanism. Modules are units of information hiding, reuse and separate compilation. We have completely separated the class mechanism and the module mechanism, and then unified the module mechanism and the differential programming mechanism. Although this module mechanism is simpler than that of Java, it enhances ease with which programs can be extended, reused and maintained. Collaborations that crosscut several classes can be separated into different modules. Modules are composable in the same way as mixins. The composition of modules sometimes causes name collision and an interesting phenomenon, which we call implementation defects. We describe solutions to these problems.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Modula-3 home page. http://research.compaq.com/SRC/modula-3/html/.
Hirotake Abe, Yuuji Ichisugi, and Kazuhiko Kato. An implementation scheme of mobile threads with a source code translation technique in Java. In IPSJ:PRO, volume 41, pages 29–40. IPSJ, March 2000. in Japanese.
Gilad Bracha and William Cook. Mixin-based inheritance. In Proc. of the OOPSLA/ECOOP’ 90, pages 303–311, October 1990. Published as ACM SIG-PLAN Notices, volume 25, number 10.
Craig Chambers and Gary T. Leavens. Typechecking and modules for multimethods. ACM Transactions on Programming Languages and Systems, 17(6):805–843, November 1995.
Curtis Clifton, Gary T. Leavens, Craig Chambers, and Todd Millstein. Multi-Java: modular open classes and symmetric multiple dispatch for Java. In Proc. of the OOPSLA2000, pages 130–145, October 2000. Published as ACM SIGPLAN Notices, volume 35, number 10.
Erik Ernst. Family polymorphism. In Proc. of the ECOOP’2001, LNCS 2072, 2001.
Martin Fowler, Kent Beck, John Brant, William Opdyke, and Don Roberts. Refactoring: Improving the Design of Existing Code. Addison-Wesley, 1999.
E. Gamma, R. Helm, R. Johnson, and J. Vlissides. Design Patterns. Addison-Welsley, 1995.
A. Goldberg and D. Robson. Smalltalk-80: The language and its implementation. Addison-Wesley, 1983.
James Gosling, Bill Joy, Guy L. Steele, and Gilad Bracha. The Java language specification. Java series. Addison-Wesley, second edition, 2000.
R. Helm, I. Holland, and D. Gangopadhyay. Contracts: Specifying behavioral compositions in object oriented systems. In Proc. of the ECOOP/OOPSLA’90, Ottawa, pages 169–180, October 1990. Published as ACM SIGPLAN Notices, volume 25, number 10.
Yuuji Ichisugi. EPP home page. http://staff.aist.go.jp/y-ichisugi/epp/.
Yuuji Ichisugi. MixJuice home page. http://staff.aist.go.jp/y-ichisugi/mj/.
Yuuji Ichisugi and Yves Roudier. The extensible Java preprocessor kit and a tiny data-parallel Java. In ISCOPE’97, California, LNCS 1343, pages 153–160, December 1997.
R. Keller and U. Höelzle. Binary component adaptation. In Proc. of the ECOOP’98, LNCS 1445, pages 307–329, 1998.
G. Kiczales, E. Hilsdale, J. Hugunin, M. Kersten, J. Palm, and W. Griswold. An overview of Aspect J. In Proc. of the ECOOP2001, 2001.
G. Kiczales, J. Lamping, A. Mendhekar, C. Maeda, C. V. Lopes, J.M. Loingtier, and J. Irwin. Aspect-oriented programming. In Proc. of the ECOOP’97, LNCS 1241, pages 220–242, 1997. Invited Talk.
Sheng Liang, Paul Hudak, and Mark Jones. Monad transformers and modular interpreters. In Proc. of the POPL’95, pages 333–343, January 1995.
Karl J. Lieberherr and Doug Orleans. Preventive program maintenance in Demeter/Java (research demonstration). In International Conference on Software Engineering, pages 604–605, 1997.
M. Löfgren, J. Lindskov Knudsen, B. Magnusson, and O. Lehrmann Madsen. Object-Oriented Environments-The Mjølner Approach. Prentice Hall, 1994.
Ole Lehrmann Madsen and Birger Møller-Pedersen. Virtual classes-a powerful mechanism in object-oriented programming. In Proc. of the OOPSLA’ 89, October 1989. Published as ACM SIGPLAN Notices, volume 24, number 10.
M. Mezini and K. Lieberherr. Adaptive plug-and-play components for evolutionary software development. In Proc. of the OOPSLA’98, pages 97–116, October 1998.
Mira Mezini, Linda Seiter, and Karl Lieberherr. Component integration with pluggable composite adapters. In Mehmet Aksit, editor, Software Architectures and Component Technology: The State of the Art in Research and Practice. Kluwer Academic Publishers, 2000. University of Twente, The Netherlands.
Todd Millstein and Craig Chambers. Modular statically typed multimethods. In Proc. of the ECOOP’99, LNCS 1628, pages 279–303, 1999.
Doug Orleans and Karl Lieberherr. DJ: Dynamic adaptive programming in Java. In Reflection 2001: Meta-level Architectures and Separation of Crosscutting Concerns, LNCS 2192, pages 73–80, Kyoto, Japan, September 2001.
H. Ossher and P. Tarr. Multi-dimensional separation of concerns and the hyperspace approach. In Proc. of the Symposium on Software Architectures and Component Technology: The State of the Art in Software Development, Kluwer, 2000.
Yannis Smaragdakis and Don Batory. Implementing layered designs with mixin layers. In Proc. of the ECOOP’98, LNCS 1445, pages 550–570, 1998.
G.L. Steele. Common Lisp the Language, 2nd edition. Digital Press, 1990.
Bjarne Stroustrup. The C++ programming language. Addison-Wesley, third edition, 1997.
C.A. Szyperski. Import is not inheritance-why we need both: Modules and classes. In Proc. of the ECOOP’92, LNCS 615, 1992.
Michael VanHilst and David Notkin. Using role components to implement collaboration-based designs. In Proc. of the OOPSLA’96, October 1996. Published as ACM SIGPLAN Notices, volume 31, number 10.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2002 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Ichisugi, Y., Tanaka, A. (2002). Difference-Based Modules: A Class-Independent Module Mechanism. In: Magnusson, B. (eds) ECOOP 2002 — Object-Oriented Programming. ECOOP 2002. Lecture Notes in Computer Science, vol 2374. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-47993-7_3
Download citation
DOI: https://doi.org/10.1007/3-540-47993-7_3
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-43759-8
Online ISBN: 978-3-540-47993-2
eBook Packages: Springer Book Archive