一句话:通过相继式演算的计算解释,以对偶性统一控制流、求值顺序、严格/惰性语言及聚焦与类型安全。
本文是一篇教程,介绍计算经典逻辑与相继式演算。它从 Gentzen 的 LK 出发,说明 Curry–Howard 同构仍可给出不同的计算基础,并强调产生与消费之间的对偶与交互。该框架把变量绑定与程序控制流视为对偶,使对偶性、控制流和求值顺序成为一等概念。文章展示相继式演算中的计算困境如何导出严格语言与惰性语言的二元对偶;并讨论证明搜索中的聚焦概念如何关联到相继式演算中计算的类型安全。最后比较静态聚焦与动态聚焦,说明二者殊途同归。
Abstract We present a model of computation that heavily emphasizes the concept of duality and the interaction between opposites–production interacts with consumption. The symmetry of this framework naturally explains more complicated features of programming languages through relatively familiar concepts. For example, binding a value to a variable is dual to manipulating the flow of control in a program. By looking at the computational interpretation of the sequent calculus, we find a language that lets us speak about duality, control flow, and evaluation order in programs as first-class concepts. We begin by reviewing Gentzen's LK sequent calculus and show how the Curry–Howard isomorphism still applies to give us a different basis for expressing computation. We then illustrate how the fundamental dilemma of computation in the sequent calculus gives rise to a duality between evaluation strategies : strict languages are dual to lazy languages. Finally, we discuss how the concept of focusing , developed in the setting of proof search, is related to the idea of type safety for computation expressed in the sequent calculus. In this regard, we compare and contrast two different methods of focusing that have appeared in the literature, static and dynamic focusing, and illustrate how they are two means to the same end.