skip to main content
article

Building efficient and highly run-time adaptable virtual machines

Published:01 November 2016Publication History
Skip Abstract Section

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.Google ScholarGoogle Scholar
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. K. Asai. Compiling a reflective language using metaocaml. In GPCE, pages 113–122. ACM, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. G. Chari, D. Garbervetsky, S. Marr, and S. Ducasse. Towards fully reflective environments. In Onward! ACM, 2015. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. L. P. Deutsch and A. M. Schiffman. Efficient implementation of the Smalltalk-80 system. In POPL, Jan. 1984. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. A. Goldberg and D. Robson. Smalltalk-80: the language and its implementation. Addison-Wesley, 1983. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. G. Kiczales and J. D. Rivieres. The Art of the Metaobject Protocol. MIT Press, 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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.Google ScholarGoogle ScholarCross RefCross Ref
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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.Google ScholarGoogle Scholar
  16. G. Salvaneschi, C. Ghezzi, and M. Pradella. An analysis of language-level support for self-adaptive software. TAAS, 8(2):7, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. C. Seaton, M. L. Van De Vanter, and M. Haupt. Debugging at full speed. In DLYA, pages 1–13. ACM, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. A. Shali and W. R. Cook. Hybrid partial evaluation. In OOPSLA, pages 375–390. ACM, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. E. Wernli, O. Nierstrasz, C. Teruel, and S. Ducasse. Delegation proxies: The power of propagation. In Modularity, pages 1–12. ACM, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarCross RefCross Ref
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

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

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in

    Full Access

    • Published in

      cover image ACM SIGPLAN Notices
      ACM SIGPLAN Notices  Volume 52, Issue 2
      DLS '16
      February 2017
      131 pages
      ISSN:0362-1340
      EISSN:1558-1160
      DOI:10.1145/3093334
      Issue’s Table of Contents
      • cover image ACM Conferences
        DLS 2016: Proceedings of the 12th Symposium on Dynamic Languages
        November 2016
        131 pages
        ISBN:9781450344456
        DOI:10.1145/2989225

      Copyright © 2016 ACM

      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].

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 1 November 2016

      Check for updates

      Qualifiers

      • article

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader