论文标题

分数类型:Ancilla位的表现力和安全空间管理

Fractional Types: Expressive and Safe Space Management for Ancilla Bits

论文作者

Chen, Chao-Hong, Choudhury, Vikraman, Carette, Jacques, Sabry, Amr

论文摘要

在可逆计算中,空间的管理受两种广泛的约束。首先,与通用计算一样,每个分配都必须与匹配的分配配对。其次,只有在分配时间从其初始值恢复到其初始值时,只有空间才能安全地分配。一般而言,艺术的状态提供了有限的部分解决方案,通过施加堆栈纪律并将第二个约束对程序员主张留下来解决第一个约束。我们根据分数类型的思想提出了一种新颖的方法。作为一个简单的直观示例,将新布尔值的分配初始化为$ \ texttt {false} $还创建了一个值$ 1/{\ texttt {fexttt {false}} $,可以将其视为垃圾收集(gc)过程,该过程专门用于收回,仅存储,仅包含该值$ \ textttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt。该GC过程是一个可以操纵的一流实体,将其分解为较小的过程,并与其他GC过程结合使用。我们在基于类型的同构,证明其基本正确性属性的可逆语言的背景下对这个想法进行了形式,并使用各种示例来说明其表现力。该开发得到了完全正态化的AGDA实施的支持。

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 $\texttt{false}$ also creates a value $1/{\texttt{false}}$ that can be thought of as a garbage collection (GC) process specialized to reclaim, and only reclaim, storage containing the value $\texttt{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.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源