Garbage collection for reversible functional languages

Publikation: Bidrag til bog/antologi/rapportKonferencebidrag i proceedingsForskningfagfællebedømt

Reversible languages are programming languages where all programs can
run both forwards and backwards. Reversible functional languages have
been proposed that use symmetric pattern matching and data
construction. To be reversible, these languages require linearity:
Every variable must be used exactly once, so no references are copied
and all references are followed exactly once. Copying of values must
use deep copying. Similarly, equality testing requires deep
comparison of trees.

A previous paper describes reversible treatment of reference counts,
which allows sharing of structures without deep copying, but there are
limitations. Applying a constructor to arguments creates a new node
with reference count 1, so pattern matching is by symmetry restricted
to nodes with reference count 1. A variant pattern that does not
change the reference count of the root node is introduced to allow
manipulation of shared data. Having two distinct patterns for shared
and unshared data, however, adds a burden on the programmer.

We observe that we can allow pattern matching on nodes with arbitrary
reference count if we also allow constructor application to return
nodes with arbitrary reference counts. We do this by using maximal
sharing: If a newly constructed node is identical to an already
existing node, we return a pointer to the existing node (increasing
its reference count) instead of allocating a new node with reference
count 1.

To avoid searching the entire heap for an identical node, we use
hash-consing to restrict the search to a small segment of the heap.
We estimate how large this segment needs to be to give a very low
probability of allocation failure when the heap is less than half
full. Experimentally, we find that overlapping segments gives
dramatically better results than disjoint segments.
Bidragets oversatte titelSpildopsamling fot reversible funktionssprog
OriginalsprogEngelsk
TitelReversible computation : 7th International Conference, RC 2015, Grenoble, France, July 16-17, 2015, Proceedings
RedaktørerJean Krivine, Jean-Bernard Stefani
Antal sider16
ForlagSpringer
Publikationsdato2015
Sider79-94
Kapitel5
ISBN (Trykt)978-3-319-20859-6
ISBN (Elektronisk)978-3-319-20860-2
DOI
StatusUdgivet - 2015
BegivenhedInternational Conference, RC 2015 - Grenoble, Frankrig
Varighed: 16 jul. 201517 jul. 2015
Konferencens nummer: 7

Konference

KonferenceInternational Conference, RC 2015
Nummer7
LandFrankrig
ByGrenoble
Periode16/07/201517/07/2015
NavnLecture notes in computer science
Vol/bind9138
ISSN0302-9743

Bibliografisk note

@inproceedings{DBLP:conf/rc/Mogensen15,
author = {Torben {\AE}gidius Mogensen},
title = {Garbage Collection for Reversible Functional Languages},
booktitle = {Reversible Computation - 7th International Conference, {RC} 2015,
Grenoble, France, July 16-17, 2015, Proceedings},
pages = {79--94},
year = {2015},
crossref = {DBLP:conf/rc/2015},
url = {http://dx.doi.org/10.1007/978-3-319-20860-2_5},
doi = {10.1007/978-3-319-20860-2_5},
timestamp = {Mon, 22 Jun 2015 12:45:09 +0200},
biburl = {http://dblp.uni-trier.de/rec/bib/conf/rc/Mogensen15},
bibsource = {dblp computer science bibliography, http://dblp.org}
}

ID: 149085263