skip to main content
10.1145/2889443.2889457acmotherconferencesArticle/Chapter ViewAbstractPublication PagesmodularityConference Proceedingsconference-collections
research-article

Matriona: class nesting with parameterization in Squeak/Smalltalk

Published: 14 March 2016 Publication History

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.

References

[1]
O. Agesen, S. N. Freund, and J. C. Mitchell. Adding Type Parameterization to the Java Language. OOPSLA ’97, pages 49–65. ACM, 1997.
[2]
E. Allen, J. Bannet, and R. Cartwright. A First-class Approach to Genericity. OOPSLA ’03, pages 96–114. ACM, 2003.
[3]
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.
[4]
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.
[5]
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.
[6]
D. Batory, R. Cardone, and Y. Smaragdakis. Object-oriented Framework and Product Lines. SPLC1, pages 227–247. Kluwer Academic Publishers, 2000.
[7]
K. Beck and W. Cunningham. A Laboratory for Teaching Object Oriented Thinking. OOPSLA ’89, pages 1–6. ACM.
[8]
J. Bloch. Effective Java (The Java Series). Prentice Hall PTR, Upper Saddle River, NJ, USA, 2nd edition, 2008.
[9]
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.
[10]
G. Bracha. Inheriting Class. http://gbracha.blogspot.jp/ 2013/01/inheriting-class.html. Accessed: 2015-08-09.
[11]
G. Bracha. The Programming Language Jigsaw: Mixins, Modularity and Multiple Inheritance. PhD thesis, The University of Utah, 1992.
[12]
G. Bracha. On the Interaction of Method Lookup and Scope with Inheritance and Nesting. DYLA ’07, 2007.
[13]
G. Bracha and W. Cook. Mixin-based Inheritance. OOPSLA/ECOOP ’90, pages 303–311. ACM, 1990.
[14]
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.
[15]
Cincom Systems Inc. Cincom Smalltalk – Application Developer’s Guide. 2009.
[16]
M. Dixon-Kennedy. Encyclopedia of Russian and Slavic Myth and Legend. ABC-CLIO, 1998.
[17]
E. Ernst, K. Ostermann, and W. R. Cook. A Virtual Class Calculus. POPL ’06, pages 270–282. ACM, 2006.
[18]
M. Flatt, S. Krishnamurthi, and M. Felleisen. Classes and Mixins. POPL ’98, pages 171–183. ACM, 1998.
[19]
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.
[20]
A. Goldberg and D. Robson. Smalltalk-80: The Language and Its Implementation. Addison-Wesley Longman Publishing Co., Inc., Boston, MA, USA, 1983.
[21]
M. J. Guzdial and K. M. Rose. Squeak: Open Personal Computing and Multimedia. Prentice Hall PTR, Upper Saddle River, NJ, USA, 1st edition, 2001.
[22]
R. Hirschfeld, P. Costanza, and O. Nierstrasz. Context-Oriented Programming. Journal of Object Technology, March-April 2008, ETH Zurich, 7(3):125–151, 2008.
[23]
D. H. Ingalls. Design Principles Behind Smalltalk. BYTE Magazine, 6(8):286–298, Aug. 1981.
[24]
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.
[25]
O. L. Madsen. Semantic Analysis of Virtual Classes and Nested Classes. OOPSLA ’99, pages 114–131. ACM, 1999.
[26]
O. L. Madsen, B. Mø-Pedersen, and K. Nygaard. Objectoriented Programming in the BETA Programming Language. ACM Press/ Addison-Wesley Publishing Co., 1993.
[27]
O. L. Madsen and B. Moller-Pedersen. Virtual Classes: A Powerful Mechanism in Object-oriented Programming. OOPSLA ’89, pages 397–406. ACM, 1989.
[28]
J. H. Maloney and R. B. Smith. Directness and Liveness in the Morphic User Interface Construction Environment. UIST ’95, pages 21–28. ACM, 1995.
[29]
B. Meyer. Object-Oriented Software Construction. Prentice-Hall, Inc., Upper Saddle River, NJ, USA, 1st edition, 1988.
[30]
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.
[31]
J. Niño. The Cost of Erasure in Java Generics Type System. Journal of Computing Sciences in Colleges, 22(5):2–11, 2007.
[32]
N. Nystrom, S. Chong, and A. C. Myers. Scalable Extensibility via Nested Inheritance. OOPSLA ’04, pages 99–115. ACM.
[33]
M. Odersky and al. An Overview of the Scala Programming Language. Technical Report IC/2004/64, EPFL Lausanne, Switzerland, 2004.
[34]
P. Pirkelbauer, S. Parent, M. Marcus, and B. Stroustrup. Runtime Concepts for the C++ Standard Template Library. SAC ’08, pages 171–177. ACM, 2008.
[35]
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.
[36]
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.
[37]
Y. Smaragdakis and D. S. Batory. Implementing Layered Designs with Mixin Layers. ECOOP ’98, pages 550–570. Springer, 1998.
[38]
B. Stroustrup. The C++ Programming Language. Addison-Wesley Longman Publishing Co., Inc., Boston, MA, USA, 3rd edition, 2000.
[39]
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.
[40]
D. Thomas, C. Fowler, and A. Hunt. Programming Ruby 1.9: The Pragmatic Programmers’ Guide. Pragmatic Bookshelf, 3rd edition, 2009.
[41]
K. Thorup. Genericity in Java with Virtual Types. In ECOOP ’97, volume 1241 of LNCS, pages 444–471. Springer, 1997.
[42]
T. L. Veldhuizen. C++ Templates as Partial Evaluation. PEPM ’98, pages 13–18. ACM, 1999.

Cited By

View all
  • (2018)-DSUComputer Languages, Systems and Structures10.1016/j.cl.2017.07.00351:C(71-89)Online publication date: 1-Jan-2018
  • (2017)A Layer-based Approach to Hierarchical Dynamically-scoped Open ClassesJournal of Information Processing10.2197/ipsjjip.25.29625(296-307)Online publication date: 2017

Index Terms

  1. Matriona: class nesting with parameterization in Squeak/Smalltalk

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image ACM Other conferences
    MODULARITY 2016: Proceedings of the 15th International Conference on Modularity
    March 2016
    145 pages
    ISBN:9781450339957
    DOI:10.1145/2889443
    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 the author(s) 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].

    In-Cooperation

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 14 March 2016

    Permissions

    Request permissions for this article.

    Check for updates

    Author Tags

    1. Class nesting
    2. class hierarchy inheritance
    3. class parameterization
    4. mixin modularity

    Qualifiers

    • Research-article

    Conference

    Modularity '16

    Acceptance Rates

    Overall Acceptance Rate 41 of 139 submissions, 29%

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)2
    • Downloads (Last 6 weeks)0
    Reflects downloads up to 20 Feb 2025

    Other Metrics

    Citations

    Cited By

    View all
    • (2018)-DSUComputer Languages, Systems and Structures10.1016/j.cl.2017.07.00351:C(71-89)Online publication date: 1-Jan-2018
    • (2017)A Layer-based Approach to Hierarchical Dynamically-scoped Open ClassesJournal of Information Processing10.2197/ipsjjip.25.29625(296-307)Online publication date: 2017

    View Options

    Login options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Figures

    Tables

    Media

    Share

    Share

    Share this Publication link

    Share on social media