Cargando…

Fractional Types: Expressive and Safe Space Management for Ancilla Bits

In reversible computing, the management of space is subject to two broad classes of constraints. First, as with general-purpose computation, every allocation must be paired with a matching de-allocation. Second, space can only be safely de-allocated if its contents are restored to their initial valu...

Descripción completa

Detalles Bibliográficos
Autores principales: Chen, Chao-Hong, Choudhury, Vikraman, Carette, Jacques, Sabry, Amr
Formato: Online Artículo Texto
Lenguaje:English
Publicado: 2020
Materias:
Acceso en línea:https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7342179/
http://dx.doi.org/10.1007/978-3-030-52482-1_10
_version_ 1783555394089517056
author Chen, Chao-Hong
Choudhury, Vikraman
Carette, Jacques
Sabry, Amr
author_facet Chen, Chao-Hong
Choudhury, Vikraman
Carette, Jacques
Sabry, Amr
author_sort Chen, Chao-Hong
collection PubMed
description In reversible computing, the management of space is subject to two broad classes of constraints. First, as with general-purpose computation, every allocation must be paired with a matching de-allocation. Second, space can only be safely de-allocated if its contents are restored to their initial value from allocation time. Generally speaking, the state of the art provides limited partial solutions, either leaving both constraints to programmers’ assertions or imposing a stack discipline to address the first constraint and leaving the second constraint to programmers’ assertions. We propose a novel approach based on the idea of fractional types. As a simple intuitive example, allocation of a new boolean value initialized to [Image: see text] also creates a value [Image: see text] that can be thought of as a garbage collection (GC) process specialized to reclaim, and only reclaim, storage containing the value [Image: see text]. This GC process is a first-class entity that can be manipulated, decomposed into smaller processes and combined with other GC processes. We formalize this idea in the context of a reversible language founded on type isomorphisms, prove its fundamental correctness properties, and illustrate its expressiveness using a wide variety of examples. The development is backed by a fully-formalized Agda implementation (https://github.com/DreamLinuxer/FracAncilla).
format Online
Article
Text
id pubmed-7342179
institution National Center for Biotechnology Information
language English
publishDate 2020
record_format MEDLINE/PubMed
spelling pubmed-73421792020-07-09 Fractional Types: Expressive and Safe Space Management for Ancilla Bits Chen, Chao-Hong Choudhury, Vikraman Carette, Jacques Sabry, Amr Reversible Computation Article In reversible computing, the management of space is subject to two broad classes of constraints. First, as with general-purpose computation, every allocation must be paired with a matching de-allocation. Second, space can only be safely de-allocated if its contents are restored to their initial value from allocation time. Generally speaking, the state of the art provides limited partial solutions, either leaving both constraints to programmers’ assertions or imposing a stack discipline to address the first constraint and leaving the second constraint to programmers’ assertions. We propose a novel approach based on the idea of fractional types. As a simple intuitive example, allocation of a new boolean value initialized to [Image: see text] also creates a value [Image: see text] that can be thought of as a garbage collection (GC) process specialized to reclaim, and only reclaim, storage containing the value [Image: see text]. This GC process is a first-class entity that can be manipulated, decomposed into smaller processes and combined with other GC processes. We formalize this idea in the context of a reversible language founded on type isomorphisms, prove its fundamental correctness properties, and illustrate its expressiveness using a wide variety of examples. The development is backed by a fully-formalized Agda implementation (https://github.com/DreamLinuxer/FracAncilla). 2020-06-17 /pmc/articles/PMC7342179/ http://dx.doi.org/10.1007/978-3-030-52482-1_10 Text en © Springer Nature Switzerland AG 2020 This article is made available via the PMC Open Access Subset for unrestricted research re-use and secondary analysis in any form or by any means with acknowledgement of the original source. These permissions are granted for the duration of the World Health Organization (WHO) declaration of COVID-19 as a global pandemic.
spellingShingle Article
Chen, Chao-Hong
Choudhury, Vikraman
Carette, Jacques
Sabry, Amr
Fractional Types: Expressive and Safe Space Management for Ancilla Bits
title Fractional Types: Expressive and Safe Space Management for Ancilla Bits
title_full Fractional Types: Expressive and Safe Space Management for Ancilla Bits
title_fullStr Fractional Types: Expressive and Safe Space Management for Ancilla Bits
title_full_unstemmed Fractional Types: Expressive and Safe Space Management for Ancilla Bits
title_short Fractional Types: Expressive and Safe Space Management for Ancilla Bits
title_sort fractional types: expressive and safe space management for ancilla bits
topic Article
url https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7342179/
http://dx.doi.org/10.1007/978-3-030-52482-1_10
work_keys_str_mv AT chenchaohong fractionaltypesexpressiveandsafespacemanagementforancillabits
AT choudhuryvikraman fractionaltypesexpressiveandsafespacemanagementforancillabits
AT carettejacques fractionaltypesexpressiveandsafespacemanagementforancillabits
AT sabryamr fractionaltypesexpressiveandsafespacemanagementforancillabits