Given a simple recursive function, we show how to extract two interacting processes from it. The two processes can be described by means of iterative programs, one of which is intrinsically reversible, in a language that, up to minor details, belongs to the core of widely used imperative programming languages. We implement the two processes as interleaving synchronous JAVA threads whose interaction is equivalent to the recursive function they are extracted from.
翻译:鉴于一个简单的递归函数, 我们演示了如何从中提取两个交互进程。 这两个进程可以通过迭代程序来描述, 其中之一本质上是可逆的, 其语言最多只有少量细节, 属于广泛使用的必要编程语言的核心。 我们执行这两个进程作为连接同步的 JAVA 线条, 其互动相当于从中提取的循环函数 。