Fractional Types: Expressive and Safe Space Management for Ancilla Bits

02/17/2020
by   Chao-Hong Chen, et al.
0

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 that address the first constraint by imposing a stack discipline and by 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 false also creates a value 1/false that can be thought of as a garbage collection (GC) process specialized to reclaim, and only reclaim, storage containing the value false. 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.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
10/30/2021

Non-reversible processes: GENERIC, Hypocoercivity and fluctuations

We consider two approaches to study non-reversible Markov processes, nam...
research
08/29/2023

Efficient Almost-Egalitarian Allocation of Goods and Bads

We consider the allocation of indivisible objects among agents with diff...
research
07/20/2022

Constraint-based type inference for FreezeML

FreezeML is a new approach to first-class polymorphic type inference tha...
research
11/22/2022

Reversible Programming: A Case Study of Two String-Matching Algorithms

String matching is a fundamental problem in algorithm. This study examin...
research
04/12/2018

Design and Implementation of Dynamic Memory Management in a Reversible Object-Oriented Programming Language

The reversible object-oriented programming language (ROOPL) was presente...
research
09/01/2011

Bayesian nonparametric multivariate convex regression

In many applications, such as economics, operations research and reinfor...

Please sign up or login with your details

Forgot password? Click here to reset