In this paper we are concerned with understanding the nature of program metrics for calculi with higher-order types, seen as natural generalizations of program equivalences. Some of the metrics we are interested in are well-known, such as those based on the interpretation of terms in metric spaces and those obtained by generalizing observational equivalence. We also introduce a new one, called the interactive metric, built by applying the well-known Int-Construction to the category of metric complete partial orders. Our aim is then to understand how these metrics relate to each other, i.e., whether and in which cases one such metric refines another, in analogy with corresponding well-studied problems about program equivalences. The results we obtain are twofold. We first show that the metrics of semantic origin, i.e., the denotational and interactive ones, lie \emph{in between} the observational and equational metrics and that in some cases, these inclusions are strict. Then, we give a result about the relationship between the denotational and interactive metrics, revealing that the former is less discriminating than the latter. All our results are given for a linear lambda-calculus, and some of them can be generalized to calculi with graded comonads, in the style of Fuzz.
翻译:在本文中,我们关心的是了解高阶类的微量计算程序指标的性质,认为它们是程序等同的自然概括性。我们感兴趣的一些指标众所周知,例如基于对计量空间术语的解释和通过一般观测等同获得的参数。我们还引入了一个新的指标,称为互动指标,这是通过对计量完全部分命令类别应用众所周知的解释而建立起来的。然后,我们的目的是了解这些指标彼此之间的关系,即,在哪些情况下,这种指标是否和在哪些情况下改进另一个指标,类似于对方案等同问题进行相当的认真研究。我们获得的结果是双重的。我们首先显示,语义起源的尺度,即记性与互动的尺度,在观察和等式完全部分命令类别之间,以及在某些情况下,这些包含是严格的。然后,我们给出了这些说明性指标与交互性指标之间的关系,在哪些情况下,我们给出的说明性指标与交互性指标之间的关系,与对方案等同性指标的风格,表明前者比后者的直线性结果要低。