It is well-known that big-step semantics is not able to distinguish stuck and non-terminating computations. This is a strong limitation as it makes very difficult to reason about properties involving infinite computations, such as type soundness, which cannot even be expressed. To face this problem, we develop a systematic study of big-step semantics: we introduce an abstract definition of what a big-step semantics is, we formalise the evaluation algorithm implicitly associated with any big-step semantics and we identify computations with executions of such an algorithm, thus recovering the distinction between stuckness an non-termination. Then, we define constructions yielding an extended version of a given arbitrary big-step semantics, where such a difference is made explicit. Building on such constructions, we describe a general proof technique to show that a predicate is sound, that is, prevents stuck computation, with respect to a big-step semantics. The extended semantics are exploited in the meta-theory, notably they are necessary to show that the proof technique works. However, they remain transparent when using the proof technique, since it consists in checking three conditions on the original rules only. We illustrate the technique by several examples, showing that it is applicable also in cases where subject reduction does not hold, hence the standard technique for small-step semantics cannot be used.
翻译:众所周知, 大步语义无法区分被卡住的计算和非终止的计算。 这是一个很大的局限性, 因为它使得很难解释包含无限计算, 比如类型稳健性, 甚至无法表达。 面对这个问题, 我们对大步语义进行系统研究: 我们对大步语义进行抽象定义: 我们引入一个有关大步语义的抽象定义, 我们将评估算法与任何大步语义的隐含关联正式化, 我们将计算方法与执行这种算法相提并论, 从而恢复卡住性与非终止的区别。 然后, 我们定义建筑, 产生一个包含任意大步语义的扩展版本, 包括一个任意大步语义的计算, 从而让这种差异变得明确。 在这样的构造上, 我们描述一个一般性的证明方法, 以显示一个大步语义是声音的, 就是说, 防止被卡住的计算法, 与大步语义有关的任何大步语义。 扩展语义在元理中被利用, 特别是为了显示证据技术的原理是有效的。 但是, 当使用证据技术时, 它们仍然是透明的, 透明,, 但它包含三个应用的方法, 的路径, 用于 用来检查三个, 我们用的方法是用来 。