We study the interpretation of the lambda-calculus in a framework based on tropical mathematics, and we show that it provides a unifying framework for two well-developed quantitative approaches to program semantics: on the one hand program metrics, based on the analysis of program sensitivity via Lipschitz conditions, on the other hand resource analysis, based on linear logic and higher-order program differentiation. To do that we focus on the semantic arising from the relational model weighted over the tropical semiring, and we discuss its application to the study of "best case" program behavior for languages with probabilistic and non-deterministic effects. Finally, we show that a general foundation for this approach is provided by an abstract correspondence between tropical algebra and Lawvere's theory of generalized metric spaces.
翻译:我们研究了基于热带数学框架中lambda演算的解释,并表明它为程序语义的两种成熟定量方法提供了统一框架:一方面是基于Lipschitz条件分析程序敏感性的程序度量,另一方面是基于线性逻辑和高阶程序微分的资源分析。为此,我们聚焦于热带半环加权关系模型所衍生的语义,并探讨其在处理具有概率和非确定性效应的语言中"最佳情况"程序行为研究中的应用。最后,我们证明该方法的一般基础可由热带代数与Lawvere广义度量空间理论之间的抽象对应关系所提供。