Skip to main content
Kent Academic Repository

Live Objects All The Way Down: Removing the Barriers between Applications and Virtual Machines

Pimás, Javier, Marr, Stefan, Garbervetsky, Diego (2023) Live Objects All The Way Down: Removing the Barriers between Applications and Virtual Machines. The Art, Science, and Engineering of Programming, 8 (2). ISSN 2473-7321. (doi:10.22152/programming-journal.org/2024/8/5) (Access to this publication is currently restricted. You may be able to access a copy if URLs are provided) (KAR id:103272)

PDF Pre-print
Language: English

Restricted to Repository staff only

Contact us about this Publication
[thumbnail of main.pdf]
Official URL:
https://doi.org/10.22152/programming-journal.org/2...

Abstract

Object-oriented languages often use virtual machines (VMs) that provide mechanisms such as just-in-time (JIT) compilation and garbage collection (GC). These VM components are typically implemented in a separate layer, isolating them from the application. While this approach brings the software engineering benefits of clear separation and decoupling, it introduces barriers for both understanding VM behavior and evolving the VM implementation. For example, the GC and JIT compiler are typically fixed at VM build time, limiting arbitrary adaptation at run time. Furthermore, because of this separation, the implementation of the VM cannot typically be inspected and debugged in the same way as application code, enshrining a distinction in easy-to-work-with application and hard-to-work-with VM code. These characteristics pose a barrier for application developers to understand the engine on top of which their own code runs, and fosters a knowledge gap that prevents application developers to change the VM.

We propose Live Metacircular Runtimes (LMRs) to overcome this problem. LMRs are language runtime systems that seamlessly integrate the VM into the application in live programming environments. Unlike classic metacircular approaches, we propose to completely remove the separation between application and VM. By systematically applying object-oriented design to VM components, we can build live runtime systems that are small and flexible enough, where VM engineers can benefit of live programming features such as short feedback loops, and application developers with fewer VM expertise can benefit of the stronger causal connections between their programs and the VM implementation.

To evaluate our proposal, we implemented Bee/LMR, a live VM for a Smalltalk-derivative environment in 22,057 lines of code. We analyze case studies on tuning the garbage collector, avoiding recompilations by the just-in-time compiler, and adding support to optimize code with vector instructions to demonstrate the trade-offs of extending exploratory programming to VM development in the context of an industrial application used in production. Based on the case studies, we illustrate how our approach facilitates the daily development work of a small team of application developers.

Our approach enables VM developers to gain access to live programming tools traditionally reserved for application developers, while application developers can interact with the VM and modify it using the high-level tools they use every day. Both application and VM developers can seamlessly inspect, debug, understand, and modify the different parts of the VM with shorter feedback loops and higher-level tools.

Item Type: Article
DOI/Identification number: 10.22152/programming-journal.org/2024/8/5
Additional information: For the purpose of open access, the author has applied a CC BY public copyright licence to any Author Accepted Manuscript version arising from this submission.
Uncontrolled keywords: live programming; virtual machines; object-oriented programming
Subjects: Q Science > QA Mathematics (inc Computing science) > QA 76 Software, computer programming,
T Technology > T Technology (General)
Divisions: Divisions > Division of Computing, Engineering and Mathematical Sciences > School of Computing
Funders: European Commission (https://ror.org/00k4n6c32)
Engineering and Physical Sciences Research Council (https://ror.org/0439y7842)
Royal Society (https://ror.org/03wnrjx87)
Depositing User: Stefan Marr
Date Deposited: 12 Oct 2023 13:52 UTC
Last Modified: 27 Feb 2024 10:39 UTC
Resource URI: https://kar.kent.ac.uk/id/eprint/103272 (The current URI for this page, for reference purposes)

University of Kent Author Information

  • Depositors only (login required):

Total unique views for this document in KAR since July 2020. For more details click on the image.