ABSTRACT
We present Matriona, a module system for Squeak, a Smalltalk dialect. It supports class nesting and parameterization and is based on a hierarchical name lookup mechanism. Matriona solves a range of modularity issues in Squeak. Instead of a flat class organization, it provides a hierarchical namespace, that avoids name clashes and allows for shorter local names. Furthermore, it provides a way to share behavior among classes and modules using mixins and class hierarchy inheritance (a form of inheritance that subclasses an entire class family), respectively. Finally, it allows modules to be externally configurable, which is a form of dependency management decoupling a module from the actual implementation of its dependencies. Matriona is implemented on top of Squeak by introducing a new keyword for run-time name lookups through a reflective mechanism, without modifying the underlying virtual machine. We evaluate Matriona with a series of small applications and will demonstrate how its features can benefit modularity when porting a simple application written in plain Squeak to Matriona.
- O. Agesen, S. N. Freund, and J. C. Mitchell. Adding Type Parameterization to the Java Language. OOPSLA ’97, pages 49–65. ACM, 1997. Google ScholarDigital Library
- E. Allen, J. Bannet, and R. Cartwright. A First-class Approach to Genericity. OOPSLA ’03, pages 96–114. ACM, 2003. Google ScholarDigital Library
- D. Ancona, G. Lagorio, and E. Zucca. Jam - A Smooth Extension of Java with Mixins. In ECOOP ’00, volume 1850 of LNCS, pages 154–178. Springer, 2000. Google ScholarDigital Library
- I. Aracic, V. Gasiunas, M. Mezini, and K. Ostermann. An Overview of CaesarJ. In Transactions on Aspect-Oriented Software Development I, volume 3880 of LNCS, pages 135– 173. Springer, 2006. Google ScholarDigital Library
- K. Barrett, B. Cassels, P. Haahr, D. A. Moon, K. Playford, and P. T. Withington. A Monotonic Superclass Linearization for Dylan. OOPSLA ’96, pages 69–82. ACM, 1996. Google ScholarDigital Library
- D. Batory, R. Cardone, and Y. Smaragdakis. Object-oriented Framework and Product Lines. SPLC1, pages 227–247. Kluwer Academic Publishers, 2000. Google ScholarDigital Library
- K. Beck and W. Cunningham. A Laboratory for Teaching Object Oriented Thinking. OOPSLA ’89, pages 1–6. ACM. Google ScholarDigital Library
- J. Bloch. Effective Java (The Java Series). Prentice Hall PTR, Upper Saddle River, NJ, USA, 2nd edition, 2008. Google ScholarDigital Library
- V. Bono, A. Patel, and V. Shmatikov. A Core Calculus of Classes and Mixins. In ECOOP ’99, volume 1628 of LNCS, pages 43–66. Springer, 1999. Google ScholarDigital Library
- G. Bracha. Inheriting Class. http://gbracha.blogspot.jp/ 2013/01/inheriting-class.html. Accessed: 2015-08-09.Google Scholar
- G. Bracha. The Programming Language Jigsaw: Mixins, Modularity and Multiple Inheritance. PhD thesis, The University of Utah, 1992. Google ScholarDigital Library
- G. Bracha. On the Interaction of Method Lookup and Scope with Inheritance and Nesting. DYLA ’07, 2007.Google Scholar
- G. Bracha and W. Cook. Mixin-based Inheritance. OOPSLA/ECOOP ’90, pages 303–311. ACM, 1990. Google ScholarDigital Library
- G. Bracha, P. von der Ahé, V. Bykov, Y. Kashai, W. Maddox, and E. Miranda. Modules as Objects in Newspeak. In ECOOP ’10, volume 6183 of LNCS, pages 405–428. Springer, 2010. Google ScholarDigital Library
- Cincom Systems Inc. Cincom Smalltalk – Application Developer’s Guide. 2009.Google Scholar
- M. Dixon-Kennedy. Encyclopedia of Russian and Slavic Myth and Legend. ABC-CLIO, 1998.Google Scholar
- E. Ernst, K. Ostermann, and W. R. Cook. A Virtual Class Calculus. POPL ’06, pages 270–282. ACM, 2006. Google ScholarDigital Library
- M. Flatt, S. Krishnamurthi, and M. Felleisen. Classes and Mixins. POPL ’98, pages 171–183. ACM, 1998. Google ScholarDigital Library
- E. Gamma, R. Helm, R. Johnson, and J. Vlissides. Design Patterns: Elements of Reusable Object-oriented Software. Addison-Wesley Longman Publishing Co., Inc., Boston, MA, USA, 1995. Google ScholarDigital Library
- A. Goldberg and D. Robson. Smalltalk-80: The Language and Its Implementation. Addison-Wesley Longman Publishing Co., Inc., Boston, MA, USA, 1983. Google ScholarDigital Library
- M. J. Guzdial and K. M. Rose. Squeak: Open Personal Computing and Multimedia. Prentice Hall PTR, Upper Saddle River, NJ, USA, 1st edition, 2001. Google ScholarDigital Library
- R. Hirschfeld, P. Costanza, and O. Nierstrasz. Context-Oriented Programming. Journal of Object Technology, March-April 2008, ETH Zurich, 7(3):125–151, 2008.Google ScholarCross Ref
- D. H. Ingalls. Design Principles Behind Smalltalk. BYTE Magazine, 6(8):286–298, Aug. 1981.Google Scholar
- T. Kamina and T. Tamai. McJava – A Design and Implementation of Java with Mixin-Types. In Programming Languages and Systems, volume 3302 of LNCS, pages 398–414. Springer, 2004.Google Scholar
- O. L. Madsen. Semantic Analysis of Virtual Classes and Nested Classes. OOPSLA ’99, pages 114–131. ACM, 1999. Google ScholarDigital Library
- O. L. Madsen, B. Mø-Pedersen, and K. Nygaard. Objectoriented Programming in the BETA Programming Language. ACM Press/ Addison-Wesley Publishing Co., 1993. Google ScholarDigital Library
- O. L. Madsen and B. Moller-Pedersen. Virtual Classes: A Powerful Mechanism in Object-oriented Programming. OOPSLA ’89, pages 397–406. ACM, 1989. Google ScholarDigital Library
- J. H. Maloney and R. B. Smith. Directness and Liveness in the Morphic User Interface Construction Environment. UIST ’95, pages 21–28. ACM, 1995. Google ScholarDigital Library
- B. Meyer. Object-Oriented Software Construction. Prentice-Hall, Inc., Upper Saddle River, NJ, USA, 1st edition, 1988. Google ScholarDigital Library
- O. Nierstrasz and T. Gîrba. Lessons in Software Evolution Learned by Listening to Smalltalk. In SOFSEM 2010: Theory and Practice of Computer Science, volume 5901 of LNCS, pages 77–95. Springer, 2010. Google ScholarDigital Library
- J. Niño. The Cost of Erasure in Java Generics Type System. Journal of Computing Sciences in Colleges, 22(5):2–11, 2007. Google ScholarDigital Library
- N. Nystrom, S. Chong, and A. C. Myers. Scalable Extensibility via Nested Inheritance. OOPSLA ’04, pages 99–115. ACM. Google ScholarDigital Library
- M. Odersky and al. An Overview of the Scala Programming Language. Technical Report IC/2004/64, EPFL Lausanne, Switzerland, 2004.Google Scholar
- P. Pirkelbauer, S. Parent, M. Marcus, and B. Stroustrup. Runtime Concepts for the C++ Standard Template Library. SAC ’08, pages 171–177. ACM, 2008. Google ScholarDigital Library
- N. Schärli, S. Ducasse, O. Nierstrasz, and A. Black. Traits: Composable Units of Behaviour. In ECOOP ’03, volume 2743 of LNCS, pages 248–274. Springer, 2003.Google Scholar
- Y. Smaragdakis and D. Batory. Mixin-Based Programming in C++. In Generative and Component-Based Software Engineering, volume 2177 of LNCS, pages 164–178. Springer, 2001. Google ScholarDigital Library
- Y. Smaragdakis and D. S. Batory. Implementing Layered Designs with Mixin Layers. ECOOP ’98, pages 550–570. Springer, 1998. Google ScholarDigital Library
- B. Stroustrup. The C++ Programming Language. Addison-Wesley Longman Publishing Co., Inc., Boston, MA, USA, 3rd edition, 2000. Google ScholarDigital Library
- M. Taeumel, B. Steinert, and R. Hirschfeld. The VIVIDE Programming Environment: Connecting Run-time Information with Programmers’ System Knowledge. Onward! 2012, pages 117–126. ACM, 2012. Google ScholarDigital Library
- D. Thomas, C. Fowler, and A. Hunt. Programming Ruby 1.9: The Pragmatic Programmers’ Guide. Pragmatic Bookshelf, 3rd edition, 2009. Google ScholarDigital Library
- K. Thorup. Genericity in Java with Virtual Types. In ECOOP ’97, volume 1241 of LNCS, pages 444–471. Springer, 1997.Google Scholar
- T. L. Veldhuizen. C++ Templates as Partial Evaluation. PEPM ’98, pages 13–18. ACM, 1999.Google Scholar
Index Terms
- Matriona: class nesting with parameterization in Squeak/Smalltalk
Recommendations
The evolution of Smalltalk: from Smalltalk-72 through Squeak
This paper presents a personal view of the evolution of six generations of Smalltalk in which the author played a part, starting with Smalltalk-72 and progressing through Smalltalk-80 to Squeak and Etoys. It describes the forces that brought each ...
Hierarchical layer-based class extensions in Squeak/Smalltalk
MODULARITY Companion 2016: Companion Proceedings of the 15th International Conference on ModularityClass extensions are frequently used in programming languages such as Ruby and Smalltalk to add or change methods of a class that is defined in the same application or in a different one. They suffer from modularity issues if globally visible: Other ...
Object-oriented programming in Smalltalk and ADA
Though Ada and Modula-2 are not object-oriented languages, an object-oriented viewpoint is crucial for effective use of their module facilities. It is therefore instructive to compare the capabilities of a modular language such as Ada with an archetypal ...
Comments