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

Flexible object layouts: enabling lightweight language extensions by intercepting slot access

Published: 22 October 2011 Publication History

Abstract

Programming idioms, design patterns and application libraries often introduce cumbersome and repetitive boilerplate code to a software system. Language extensions and external DSLs (domain specific languages) are sometimes introduced to reduce the need for boilerplate code, but they also complicate the system by introducing the need for language dialects and inter-language mediation. To address this, we propose to extend the structural reflective model of the language with object layouts, layout scopes and slots. Based on the new reflective language model we can 1) provide behavioral hooks to object layouts that are triggered when the fields of an object are accessed and 2) simplify the implementation of state-related language extensions such as stateful traits. By doing this we show how many idiomatic use cases that normally require boilerplate code can be more effectively supported.
We present an implementation in Smalltalk, and illustrate its usage through a series of extended examples.

References

[1]
le}Bak02aL. Bak, G. Bracha, S. Grarup, R. Griesemer, D. Griswold, and U. Hölzle. Mixins in Strongtalk. In ECOOP '02 Workshop on Inheritance, June 2002.
[2]
R. Barcia, G. Hambrick, K. Brown, R. Peterson, and K. Bhogal. Persistence in the enterprise: a guide to persistence technologies. IBM Press, first edition, 2008. ISBN 9780768680591.
[3]
K. Beck and E. Gamma. Test infected: Programmers love writing tests. Java Report, 3 (7): 51--56, 1998.
[4]
A. Bergel, S. Ducasse, O. Nierstrasz, and R. Wuyts. Stateful traits and their formalization. Journal of Computer Languages, Systems and Structures, 34 (2--3): 83--108, 2008. ISSN 1477--8424. 10.1016/j.cl.2007.05.003.
[5]
A. Bergel, S. Ducasse, and L. Renggli. Seaside -- advanced composition and control flow for dynamic web applications. ERCIM News, 72, Jan. 2008\natexlabb.
[6]
G. Bierman. First-class relationships in an object-oriented language. In ECOOP, pages 262--286. Springer-Verlag, 2005. 10.1007/11531142_12.
[7]
D. G. Bobrow, K. Kahn, G. Kiczales, L. Masinter, M. Stefik, and F. Zdybel. Commonloops: Merging lisp and object-oriented programming. In Proceedings OOPSLA '86, ACM SIGPLAN Notices, volume 21, pages 17--29, Nov. 1986.
[8]
G. Bracha. Executable grammars in Newspeak. Electron. Notes Theor. Comput. Sci., 193: 3--18, 2007. ISSN 1571-0661. 10.1016/j.entcs.2007.10.004.
[9]
G. Bracha and W. Cook. Mixin-based inheritance. In Proceedings OOPSLA/ECOOP '90, ACM SIGPLAN Notices, volume 25, pages 303--311, Oct. 1990.
[10]
Django. Django. http://www.djangoproject.com.
[11]
S. Ducasse, O. Nierstrasz, N. Scharli, R. Wuyts, and A. P. Black. Traits: A mechanism for fine-grained reuse. ACM Transactions on Programming Languages and Systems (TOPLAS), 28 (2): 331--388, Mar. 2006. ISSN 0164-0925. 10.1145/1119479.1119483.
[12]
G. Ferreira, E. Loureiro, and E. Oliveira. A java code annotation approach for model checking software systems. In Proceedings of the 2007 ACM symposium on Applied computing, SAC '07, pages 1536--1537, New York, NY, USA, 2007. ACM. ISBN 1--59593--480--4. 10.1145/1244002.1244330.
[13]
D. Flanagan. JavaScript: The Definitive Guide. O'Reilly & Associates, second edition, Jan. 1997. ISBN 1--56592--234--4.
[14]
M. Fowler. Language workbenches: The killer-app for domain-specific languages, June 2005. http://www.martinfowler.com/articles/languageWorkbench.html.
[15]
A. Goldberg and D. Robson. Smalltalk 80: the Language and its Implementation. Addison Wesley, Reading, Mass., May 1983. ISBN 0--201--13688-0.
[16]
P. Hudak. Modular domain specific languages and tools. In P. Devanbu and J. Poulin, editors, Proceedings: Fifth International Conference on Software Reuse, pages 134--142. IEEE Computer Society Press, 1998.
[17]
G. Kiczales, J. Lamping, A. Mendhekar, C. Maeda, C. Lopes, J.-M. Loingtier, and J. Irwin. Aspect-Oriented Programming. In M. Aksit and S. Matsuoka, editors, Proceedings ECOOP '97, volume 1241 of phLNCS, pages 220--242, Jyvaskyla, Finland, June 1997. Springer-Verlag.
[18]
E. Meijer, B. Beckman, and G. Bierman. LINQ: reconciling object, relations and XML in the .NET framework. In SIGMOD '06: Proceedings of the 2006 ACM SIGMOD international conference on Management of data, pages 706--706, New York, NY, USA, 2006. ACM. ISBN 1--59593--434-0. 10.1145/1142473.1142552.
[19]
A. Paepcke. PCLOS: Stress testing CLOS experiencing the metaobject protocol. In Proceedings OOPSLA/ECOOP '90, ACM SIGPLAN Notices, volume 25, pages 194--211, Oct. 1990.
[20]
A. Paepcke. User-level language crafting. In Object-Oriented Programming: the CLOS perspective, pages 66--99. MIT Press, 1993.
[21]
Pharo. Pharo. http://www.pharo-project.org.
[22]
Python. Python. http://www.python.org.
[23]
L. Renggli, S. Ducasse, and A. Kuhn. Magritte -- a meta-driven approach to empower developers and end users. In G. Engels, B. Opdyke, D. C. Schmidt, and F. Weil, editors, Model Driven Engineering Languages and Systems, volume 4735 of LNCS, pages 106--120. Springer, Sept. 2007. ISBN 978--3--540--75208-0. 10.1007/978--3--540--75209--7_8.
[24]
L. Renggli, T. Gîrba, and O. Nierstrasz. Embedding languages without breaking tools. In T. D'Hondt, editor, ECOOP'10: Proceedings of the 24th European Conference on Object-Oriented Programming, volume 6183 of LNCS, pages 380--404, Maribor, Slovenia, 2010. Springer-Verlag. ISBN 978--3--642--14106--5. 10.1007/978--3--642--14107--2_19.
[25]
M. Stiegler. The E language in a walnut, 2004. www.skyhunter.com/marcs/ewalnut.html.
[26]
D. Ungar and R. B. Smith. Self: The power of simplicity. In Proceedings OOPSLA '87, ACM SIGPLAN Notices, volume 22, pages 227--242, Dec. 1987. 10.1145/38765.38828.
[27]
T. Wrigstad, P. Eugster, J. Field, N. Nystrom, and J. Vitek. Software hardening: a research agenda. In Proceedings for the 1st workshop on Script to Program Evolution, STOP '09, pages 58--70, New York, NY, USA, 2009. ACM. ISBN 978--1--60558--543--7. 10.1145/1570506.1570513.

Cited By

View all
  • (2019)Fully Reflective Execution Environments: Virtual Machines for More Flexible SoftwareIEEE Transactions on Software Engineering10.1109/TSE.2018.281271545:9(858-876)Online publication date: 1-Sep-2019
  • (2017)Object equivalence: revisiting object equality profiling (an experience report)ACM SIGPLAN Notices10.1145/3170472.313384452:11(27-38)Online publication date: 24-Oct-2017
  • (2017)Object equivalence: revisiting object equality profiling (an experience report)Proceedings of the 13th ACM SIGPLAN International Symposium on on Dynamic Languages10.1145/3133841.3133844(27-38)Online publication date: 24-Oct-2017
  • Show More Cited By

Index Terms

  1. Flexible object layouts: enabling lightweight language extensions by intercepting slot access

        Recommendations

        Comments

        Information & Contributors

        Information

        Published In

        cover image ACM Conferences
        OOPSLA '11: Proceedings of the 2011 ACM international conference on Object oriented programming systems languages and applications
        October 2011
        1104 pages
        ISBN:9781450309400
        DOI:10.1145/2048066
        • cover image ACM SIGPLAN Notices
          ACM SIGPLAN Notices  Volume 46, Issue 10
          OOPSLA '11
          October 2011
          1063 pages
          ISSN:0362-1340
          EISSN:1558-1160
          DOI:10.1145/2076021
          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: 22 October 2011

        Permissions

        Request permissions for this article.

        Check for updates

        Author Tags

        1. metaobject protocol
        2. smalltalk
        3. structural reflection
        4. traits

        Qualifiers

        • Research-article

        Conference

        SPLASH '11
        Sponsor:

        Acceptance Rates

        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 17 Feb 2025

        Other Metrics

        Citations

        Cited By

        View all
        • (2019)Fully Reflective Execution Environments: Virtual Machines for More Flexible SoftwareIEEE Transactions on Software Engineering10.1109/TSE.2018.281271545:9(858-876)Online publication date: 1-Sep-2019
        • (2017)Object equivalence: revisiting object equality profiling (an experience report)ACM SIGPLAN Notices10.1145/3170472.313384452:11(27-38)Online publication date: 24-Oct-2017
        • (2017)Object equivalence: revisiting object equality profiling (an experience report)Proceedings of the 13th ACM SIGPLAN International Symposium on on Dynamic Languages10.1145/3133841.3133844(27-38)Online publication date: 24-Oct-2017
        • (2017)Moldable Tools for Object-Oriented DevelopmentPresent and Ulterior Software Engineering10.1007/978-3-319-67425-4_6(77-101)Online publication date: 6-Sep-2017
        • (2016)LowcodeProceedings of the 11th edition of the International Workshop on Smalltalk Technologies10.1145/2991041.2991064(1-10)Online publication date: 23-Aug-2016
        • (2016)Dynamic Round-Trip Engineering in the context of FOMDDProceedings of the 11th edition of the International Workshop on Smalltalk Technologies10.1145/2991041.2991056(1-7)Online publication date: 23-Aug-2016
        • (2016)ViennaTalk and AssertchProceedings of the 11th edition of the International Workshop on Smalltalk Technologies10.1145/2991041.2991045(1-7)Online publication date: 23-Aug-2016
        • (2016)Exemplifying Moldable DevelopmentProceedings of the Programming Experience 2016 (PX/16) Workshop10.1145/2984380.2984385(33-42)Online publication date: 18-Jul-2016
        • (2015)Towards fully reflective environments2015 ACM International Symposium on New Ideas, New Paradigms, and Reflections on Programming and Software (Onward!)10.1145/2814228.2814241(240-253)Online publication date: 21-Oct-2015
        • (2015)Untangling fine-grained code changes2015 IEEE 22nd International Conference on Software Analysis, Evolution, and Reengineering (SANER)10.1109/SANER.2015.7081844(341-350)Online publication date: Mar-2015
        • Show More Cited By

        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