Region-based memory management for Mercury programs
Quan Phan, Gerda Janssens, Zoltan Somogyi

TL;DR
This paper presents a region-based memory management system for Mercury, a logic programming language, improving runtime speed and memory efficiency through compile-time analysis and specialized runtime support for backtracking.
Contribution
The work introduces a novel RBMM approach for Mercury, including program analyses, correctness proofs, and runtime solutions for backtracking challenges, leading to significant performance gains.
Findings
Faster runtimes in 15 out of 18 benchmarks
Average runtime speedup of 24%
Average memory reduction of 95%
Abstract
Region-based memory management (RBMM) is a form of compile time memory management, well-known from the functional programming world. In this paper we describe our work on implementing RBMM for the logic programming language Mercury. One interesting point about Mercury is that it is designed with strong type, mode, and determinism systems. These systems not only provide Mercury programmers with several direct software engineering benefits, such as self-documenting code and clear program logic, but also give language implementors a large amount of information that is useful for program analyses. In this work, we make use of this information to develop program analyses that determine the distribution of data into regions and transform Mercury programs by inserting into them the necessary region operations. We prove the correctness of our program analyses and transformation. To execute the…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsParallel Computing and Optimization Techniques · Logic, programming, and type systems · Distributed systems and fault tolerance
