Jeopardy:一种可逆函数式程序设计语言
Jeopardy: An Invertible Functional Programming Language
摘要:
算法是将问题映射到解决方案的方法。一个算法是可逆的,当这个映射是单射的,这样的初始问题可以唯一地从它的解决方案。虽然可逆算法可以用通用语言描述,但这些语言通常不保证可逆性,因此确保可逆性需要额外的(通常是非平凡的)证明。另一方面,虽然可逆程序设计语言通过将可允许的操作限制为局部可逆的操作来保证它们的程序是可逆的,但是以可逆风格编写程序可能是麻烦的,并且即使当所实现的算法实际上是可逆的时,也可能与常规实现方式显著不同。在本文中,我们介绍了Jeopardy,一个功能性的程序设计语言,保证程序可逆性,而不施加本地可逆性。特别是,Jeopardy允许有限地使用不可逆-甚至不确定性!--操作,只要它们以可以静态地确定为可逆的方式使用。为此,我们概述了一个\emph{implicitly available arguments analysis}和三个进一步的方法,可以提供一个部分静态保证(一般困难)的问题,保证可逆性。
英文摘要:
Algorithms are ways of mapping problems to solutions. An algorithm is invertible precisely when this mapping is injective, such that the initial problem can be uniquely inferred from its solution. While invertible algorithms can be described in general-purpose languages, no guarantees are generally made by such languages as regards invertibility, so ensuring invertibility requires additional (and often non-trivial) proof. On the other hand, while reversible programming languages guarantee that their programs are invertible by restricting the permissible operations to those which are locally invertible, writing programs in the reversible style can be cumbersome, and may differ significantly from conventional implementations even when the implemented algorithm is, in fact, invertible. In this paper we introduce Jeopardy, a functional programming language that guarantees program invertibility without imposing local reversibility. In particular, Jeopardy allows the limited use of uninvertible -- and even nondeterministic! -- operations, provided that they are used in a way that can be statically determined to be invertible. To this end, we outline an \emph{implicitly available arguments analysis} and three further approaches that can give a partial static guarantee to the (generally difficult) problem of guaranteeing invertibility.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。