skip to main content
10.1145/2989225.2989234acmconferencesArticle/Chapter ViewAbstractPublication PagessplashConference Proceedingsconference-collections
research-article

Building efficient and highly run-time adaptable virtual machines

Published: 01 November 2016 Publication History

Abstract

Programming language virtual machines (VMs) realize language semantics, enforce security properties, and execute applications efficiently. Fully Reflective Execution Environments (EEs) are VMs that additionally expose their whole structure and behavior to applications. This enables develop- ers to observe and adapt VMs at run time. However, there is a belief that reflective EEs are not viable for practical usages because such flexibility would incur a high performance overhead. To refute this belief, we built a reflective EE on top of a highly optimizing dynamic compiler. We introduced a new optimization model that, based on the conjecture that variability of low-level (EE-level) reflective behavior is low in many scenarios, mitigates the most significant sources of the performance overheads related to the reflective capabilities in the EE. Our experiments indicate that reflective EEs can reach peak performance in the order of standard VMs. Concretely, that a) if reflective mechanisms are not used the execution overhead is negligible compared to standard VMs, b) VM operations can be redefined at language-level without incurring in significant overheads, c) for several software adaptation tasks, applying the reflection at the VM level is not only lightweight in terms of engineering effort, but also competitive in terms of performance in comparison to other ad-hoc solutions.

References

[1]
Bridging the Gap between Machine and Language using First-Class Building Blocks. PhD thesis, University of Bern, 2012.
[2]
J.-B. Arnaud, M. Denker, S. Ducasse, D. Pollet, A. Bergel, and M. Suen. Read-only execution for dynamic languages. In TOOLS, pages 117–136. Springer, 2010.
[3]
K. Asai. Compiling a reflective language using metaocaml. In GPCE, pages 113–122. ACM, 2014.
[4]
C. Chambers, D. Ungar, and E. Lee. An efficient implementation of self a dynamically-typed object-oriented language based on prototypes. In OOPSLA, pages 49–70. ACM, October 1989.
[5]
G. Chari, D. Garbervetsky, S. Marr, and S. Ducasse. Towards fully reflective environments. In Onward! ACM, 2015.
[6]
L. P. Deutsch and A. M. Schiffman. Efficient implementation of the Smalltalk-80 system. In POPL, Jan. 1984.
[7]
Z. DeVito, D. Ritchie, M. Fisher, A. Aiken, and P. Hanrahan. First-class runtime generation of high-performance types using exotypes. In PLDI, pages 77–88. ACM, 2014.
[8]
A. Goldberg and D. Robson. Smalltalk-80: the language and its implementation. Addison-Wesley, 1983.
[9]
M. Haupt, R. Hirschfeld, T. Pape, G. Gabrysiak, S. Marr, A. Bergmann, A. Heise, M. Kleine, and R. Krahn. The som family: Virtual machines for teaching and research. In ITiCSE, pages 18–22. ACM, 2010.
[10]
U. Hölzle, C. Chambers, and D. Ungar. Optimizing dynamically-typed object-oriented languages with polymorphic inline caches. In ECOOP, pages 21–38. Springer, 1991.
[11]
G. Kiczales and J. D. Rivieres. The Art of the Metaobject Protocol. MIT Press, 1991.
[12]
S. Marr and S. Ducasse. Tracing vs. partial evaluation: Comparing meta-compilation approaches for self-optimizing interpreters. In OOPSLA, pages 821–839. ACM, 2015.
[13]
S. Marr, T. Pape, and W. De Meuter. Are We There Yet? Simple Language Implementation Techniques for the 21st Century. IEEE Software, 31(5):60–67, 2014.
[14]
S. Marr, C. Seaton, and S. Ducasse. Zero-Overhead Metaprogramming: Reflection and Metaobject Protocols Fast and Without Compromises. In PLDI, pages 545–554. ACM, 2015.
[15]
D. Rothlisberger, M. Harry, A. Villazon, D. Ansaloni, W. Binder, O. Nierstrasz, and P. Moret. Augmenting static source views in ides with dynamic metrics. In ICSM ’09, pages 253–262, Sept 2009.
[16]
G. Salvaneschi, C. Ghezzi, and M. Pradella. An analysis of language-level support for self-adaptive software. TAAS, 8(2):7, 2013.
[17]
C. Seaton, M. L. Van De Vanter, and M. Haupt. Debugging at full speed. In DLYA, pages 1–13. ACM, 2014.
[18]
A. Shali and W. R. Cook. Hybrid partial evaluation. In OOPSLA, pages 375–390. ACM, 2011.
[19]
D. Simon, C. Wimmer, B. Urban, G. Duboscq, L. Stadler, and T. Würthinger. Snippets: Taking the High Road to a Low Level. ACM Trans. Archit. Code Optim., 12(2):20:1–20:25, June 2015.
[20]
D. Ungar, A. Spitz, and A. Ausch. Constructing a metacircular virtual machine in an exploratory programming environment. In OOPSLA, pages 11–20. ACM, 2005.
[21]
T. Verwaest, C. Bruni, D. Gurtner, A. Lienhard, and O. Niestrasz. Pinocchio: Bringing reflection to life with first-class interpreters. In OOPSLA, pages 774–789. ACM, 2010.
[22]
E. Wernli, O. Nierstrasz, C. Teruel, and S. Ducasse. Delegation proxies: The power of propagation. In Modularity, pages 1–12. ACM, 2014.
[23]
A. Wöß, C. Wirth, D. Bonetta, C. Seaton, C. Humer, and H. Mössenböck. An object storage model for the truffle language implementation framework. In PPPJ, pages 133– 144. ACM, 2014.
[24]
T. Würthinger, C. Wimmer, A. Wöß, L. Stadler, G. Duboscq, C. Humer, G. Richards, D. Simon, and M. Wolczko. One vm to rule them all. In Onward!, pages 187–204. ACM, 2013.
[25]
T. Würthinger, A. Wöß, L. Stadler, G. Duboscq, D. Simon, and C. Wimmer. Self-optimizing ast interpreters. In DLS, pages 73–82. ACM, 2012.

Cited By

View all
  • (2019)A Survey of Metaprogramming LanguagesACM Computing Surveys10.1145/335458452:6(1-39)Online publication date: 16-Oct-2019
  • (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)Garbage collection and efficiency in dynamic metacircular runtimes: an experience reportACM SIGPLAN Notices10.1145/3170472.313384552:11(39-50)Online publication date: 24-Oct-2017
  • Show More Cited By

Index Terms

  1. Building efficient and highly run-time adaptable virtual machines

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image ACM Conferences
    DLS 2016: Proceedings of the 12th Symposium on Dynamic Languages
    November 2016
    131 pages
    ISBN:9781450344456
    DOI:10.1145/2989225
    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].

    Sponsors

    In-Cooperation

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 01 November 2016

    Permissions

    Request permissions for this article.

    Check for updates

    Author Tags

    1. Metaobject Protocols
    2. Performance
    3. Reflection
    4. Virtual Machines

    Qualifiers

    • Research-article

    Conference

    SPLASH '16
    Sponsor:

    Acceptance Rates

    Overall Acceptance Rate 32 of 77 submissions, 42%

    Upcoming Conference

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)6
    • Downloads (Last 6 weeks)0
    Reflects downloads up to 08 Mar 2025

    Other Metrics

    Citations

    Cited By

    View all
    • (2019)A Survey of Metaprogramming LanguagesACM Computing Surveys10.1145/335458452:6(1-39)Online publication date: 16-Oct-2019
    • (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)Garbage collection and efficiency in dynamic metacircular runtimes: an experience reportACM SIGPLAN Notices10.1145/3170472.313384552:11(39-50)Online publication date: 24-Oct-2017
    • (2017)Garbage collection and efficiency in dynamic metacircular runtimes: an experience reportProceedings of the 13th ACM SIGPLAN International Symposium on on Dynamic Languages10.1145/3133841.3133845(39-50)Online publication date: 24-Oct-2017
    • (2017)A Metaobject Protocol for Optimizing Application-Specific Run-Time VariabilityProceedings of the 12th Workshop on Implementation, Compilation, Optimization of Object-Oriented Languages, Programs and Systems10.1145/3098572.3098577(1-5)Online publication date: 19-Jun-2017
    • (2017)Fully-reflective VMs for ruling software adaptationProceedings of the 39th International Conference on Software Engineering Companion10.1109/ICSE-C.2017.144(229-231)Online publication date: 20-May-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