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

A Virtual Machine for Higher-Order Reactors

Published: 09 July 2024 Publication History

Abstract

We present the design of a Remus, a virtual machine for reactive (RP) programs — signal-based programs that react automatically to changes — that is currently under development. The design of Remus been tailored specifically for reactive programs: it has a dedicated instruction set and memory model that is compatible with the model of reactive programming. The virtual machine allows reactive programs to be evaluated without needing to compile them to native code, nor by running them on an existing (general-purpose) virtual machine that is not specific to RP. The model of the virtual machine makes it possible to reason over the various behavioural aspects of a reactive program, such as memory consumption, in a language-agnostic way. As an example, we propose a static analysis that aims to eliminate dynamic allocations that occur in dynamic reactive programs: i.e., programs where the dependencies between the signals that make up a program changes at run-time. We show that our virtual machine, supplemented by the results of the analysis, allows for (well-behaved) reactive programs to be evaluated in constant space (i.e. in bounded memory) even when dependencies change or new signals are created programmatically.

References

[1]
Engineer Bainomugisha, Andoni Lombide Carreton, Tom Van Cutsem, Stijn Mostinckx, and Wolfgang De Meuter. 2013. A survey on reactive programming. ACM Comput. Surv. 45, 4 (2013), 52:1–52:34. https://doi.org/10.1145/2501654.2501666
[2]
Gregory H. Cooper and Shriram Krishnamurthi. 2006. Embedding Dynamic Dataflow in a Call-by-Value Language. In Programming Languages and Systems, 15th European Symposium on Programming, ESOP 2006, Held as Part of the Joint European Conferences on Theory and Practice of Software, ETAPS 2006, Vienna, Austria, March 27-28, 2006, Proceedings(Lecture Notes in Computer Science, Vol. 3924), Peter Sestoft (Ed.). Springer-Verlag, Berlin, Heidelberg, 294–308. https://doi.org/10.1007/11693024_20
[3]
Anders Møller and Michael I. Schwartzbach. 2018. Static Program Analysis. Department of Computer Science, Aarhus University, http://cs.au.dk/ amoeller/spa/.
[4]
Henrik Nilsson, Antony Courtney, and John Peterson. 2002. Functional reactive programming, continued. In Proceedings of the 2002 ACM SIGPLAN Workshop on Haskell, Haskell 2002, Pittsburgh, Pennsylvania, USA, October 3, 2002, Manuel M. T. Chakravarty (Ed.). Association for Computing Machinery, New York, NY, USA, 51–64. https://doi.org/10.1145/581690.581695
[5]
Bjarno Oeyen, Humberto Rodríguez-Avila, Sam Van den Vonder, and Wolfgang De Meuter. 2018. Composable higher-order reactors as the basis for a live reactive programming environment. In Proceedings of the 5th ACM SIGPLAN International Workshop on Reactive and Event-Based Languages and Systems, REBLS@SPLASH 2018, Boston, MA, USA, November 4, 2018, Guido Salvaneschi, Wolfgang De Meuter, Patrick Eugster, Lukasz Ziarek, and Francisco Sant’Anna (Eds.). Association for Computing Machinery, New York, NY, USA, 51–60. https://doi.org/10.1145/3281278.3281284
[6]
Xavier Rival and Kwangkeun Yi. 2020. Introduction to static analysis. MIT Press, London, England.
[7]
Guido Salvaneschi, Gerold Hintz, and Mira Mezini. 2014. REScala: bridging between object-oriented and functional style in reactive applications. In 13th International Conference on Modularity, MODULARITY ’14, Lugano, Switzerland, April 22-26, 2014, Walter Binder, Erik Ernst, Achille Peternier, and Robert Hirschfeld (Eds.). Association for Computing Machinery, New York, NY, USA, 25–36. https://doi.org/10.1145/2577080.2577083
[8]
Guido Salvaneschi and Mira Mezini. 2016. Debugging for reactive programming. In Proceedings of the 38th International Conference on Software Engineering, ICSE 2016, Austin, TX, USA, May 14-22, 2016, Laura K. Dillon, Willem Visser, and Laurie A. Williams (Eds.). Association for Computing Machinery, New York, NY, USA, 796–807. https://doi.org/10.1145/2884781.2884815
[9]
Kensuke Sawada and Takuo Watanabe. 2016. Emfrp: a functional reactive programming language for small-scale embedded systems. In Companion Proceedings of the 15th International Conference on Modularity, Málaga, Spain, March 14 - 18, 2016, Lidia Fuentes, Don S. Batory, and Krzysztof Czarnecki (Eds.). Association for Computing Machinery, New York, NY, USA, 36–44. https://doi.org/10.1145/2892664.2892670
[10]
Aleksey Shipilev. [n. d.]. JEP 318: Epsilon: A No-Op Garbage Collector (Experimental). https://web.archive.org/web/20240219141556/https://openjdk.org/jeps/318 Accessed on 2023-05-09.
[11]
Artur Sterz, Matthias Eichholz, Ragnar Mogk, Lars Baumgärtner, Pablo Graubner, Matthias Hollick, Mira Mezini, and Bernd Freisleben. 2021. ReactiFi: Reactive Programming of Wi-Fi Firmware on Mobile Devices. The Art, Science, and Engineering of Programming 5, 2 (2021), 4. https://doi.org/10.22152/programming-journal.org/2021/5/4
[12]
Sam Van den Vonder. 2022. On the Coexistence of Reactive Code and Imperative Code in Distributed Applications: A Language Design Approach. PhD thesis. Vrije Universiteit Brussel, Vrije Universiteit Brussel, Pleinlaan 2, 1050 Brussel. ISBN 978-94-6444-328-8, https://web.archive.org/web/20230509150202/https://cris.vub.be/ws/portalfiles/portal/86362735/Sam_Van_den_Vonder_PhD_thesis.pdf, accessed on 2023-05-09.
[13]
Sam Van den Vonder, Thierry Renaux, Bjarno Oeyen, Joeri De Koster, and Wolfgang De Meuter. 2020. Tackling the Awkward Squad for Reactive Programming: The Actor-Reactor Model. In 34th European Conference on Object-Oriented Programming, ECOOP 2020, November 15-17, 2020, Berlin, Germany (Virtual Conference)(LIPIcs Leibniz International Proceedings in Informatics, Vol. 166), Robert Hirschfeld and Tobias Pape (Eds.). Schloss Dagstuhl - Leibniz-Zentrum für Informatik, Wadern, Germany, 19:1–19:29. https://doi.org/10.4230/LIPIcs.ECOOP.2020.19

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
Programming '24: Companion Proceedings of the 8th International Conference on the Art, Science, and Engineering of Programming
March 2024
159 pages
ISBN:9798400706349
DOI:10.1145/3660829
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

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 09 July 2024

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. Higher-Order Programming
  2. Reactive Programming
  3. Static Compilation
  4. Virtual Machine

Qualifiers

  • Research-article
  • Research
  • Refereed limited

Funding Sources

Conference

‹Programming› '24
Sponsor:

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • 0
    Total Citations
  • 12
    Total Downloads
  • Downloads (Last 12 months)12
  • Downloads (Last 6 weeks)5
Reflects downloads up to 15 Oct 2024

Other Metrics

Citations

View Options

Get Access

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

HTML Format

View this article in HTML Format.

HTML Format

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media