Loading...
Please wait, while we are loading the content...
Similar Documents
Region-Based Memory Management for the Logic Programming Language Mercury
| Content Provider | Semantic Scholar |
|---|---|
| Copyright Year | 2009 |
| Abstract | Region-based memory management (RBMM) is a form of compile-time memory management, well-known from the functional programming world. In this thesis we describe our work of investigating and developing RBMM for the logic programming language Mercury. Mercury 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 the language developers useful information for optimizations. The first challenge in realizing RBMM for a programming language is to divide program data into regions such that the regions can be reclaimed as soon as possible. In the thesis we have developed program analyses that determine the distribution of data over regions as well as their lifetimes in a Mercury program. The program then is transformed to a region-annotated program containing the necessary region constructs. We provide the correctness proofs of the related program analyses and transformation, which guarantee the safeness of memory accesses in annotated programs. We have implemented runtime support that tackles the special challenge posed by backtracking. Backtracking can require regions removed during forward execution to be “resurrected”, and any memory allocated during a computation that has been backtracked over must be recovered promptly, without waiting for the regions involved to come to the end of their life. We study the effects of RBMM for a selection of benchmark programs including well-known difficult cases for RBMM. Our RBMM-enabled Mercury system obtains clearly faster runtime for two third of the benchmarks compared to the Mercury system using the Boehm runtime garbage collector, with an average speedup of 20%. In terms of memory usage, the region system achieves optimal memory |
| File Format | PDF HTM / HTML |
| Alternate Webpage(s) | http://www.cs.kuleuven.be/publicaties/doctoraten/cw/CW2009_14.pdf |
| Alternate Webpage(s) | http://www.cs.kuleuven.ac.be/publicaties/doctoraten/cw/CW2009_15.pdf |
| Alternate Webpage(s) | http://www.cs.kuleuven.be/publicaties/doctoraten/cw/CW2009_15.pdf |
| Alternate Webpage(s) | http://www.mercury.cs.mu.oz.au/information/papers/quan_thesis.pdf |
| Alternate Webpage(s) | http://www.cs.kuleuven.ac.be/publicaties/doctoraten/cw/CW2009_14.pdf |
| Alternate Webpage(s) | http://www.mercurylang.org/documentation/papers/quan_thesis.pdf |
| Language | English |
| Access Restriction | Open |
| Content Type | Text |
| Resource Type | Article |