当前位置: X-MOL 学术arXiv.cs.PL › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
Denotational recurrence extraction for amortized analysis
arXiv - CS - Programming Languages Pub Date : 2020-06-26 , DOI: arxiv-2006.15036
Joseph W. Cutler, Daniel R. Licata, Norman Danner

A typical way of analyzing the time complexity of functional programs is to extract a recurrence expressing the running time of the program in terms of the size of its input, and then to solve the recurrence to obtain a big-O bound. For recurrence extraction to be compositional, it is also necessary to extract recurrences for the size of outputs of helper functions. Previous work has developed techniques for using logical relations to state a formal correctness theorem for a general recurrence extraction translation: a program is bounded by a recurrence when the operational cost is bounded by the extracted cost, and the output value is bounded, according to a value bounding relation defined by induction on types, by the extracted size. This previous work supports higher-order functions by viewing recurrences as programs in a lambda-calculus, or as mathematical entities in a denotational semantics thereof. In this paper, we extend these techniques to support amortized analysis, where costs are rearranged from one portion of a program to another to achieve more precise bounds. We give an intermediate language in which programs can be annotated according to the banker's method of amortized analysis; this language has an affine type system to ensure credits are not spent more than once. We give a recurrence extraction translation of this language into a recurrence language, a simply-typed lambda-calculus with a cost type, and state and prove a bounding logical relation expressing the correctness of this translation. The recurrence language has a denotational semantics in preorders, and we use this semantics to solve recurrences, e.g analyzing binary counters and splay trees.

中文翻译:

用于摊销分析的指称递归提取

分析函数式程序时间复杂度的一种典型方法是提取表示程序运行时间的递归,然后求解递归以获得大 O 界限。为了使递归提取具有组合性,还需要针对辅助函数的输出大小提取递归。先前的工作已经开发了使用逻辑关系来陈述一般递归提取翻译的形式正确性定理的技术:当操作成本受提取成本限制时,程序受递归限制,并且输出值是有界的,根据由类型归纳定义的值边界关系,由提取的大小。之前的这项工作通过将递归视为 lambda 演算中的程序来支持高阶函数,或作为其指称语义中的数学实体。在本文中,我们将这些技术扩展到支持摊销分析,其中成本从程序的一个部分重新排列到另一个部分,以实现更精确的界限。我们给出了一种中间语言,可以根据银行家的摊销分析方法对程序进行注释;这种语言有一个仿射类型系统,以确保积分不会花费超过一次。我们将这种语言的递归提取翻译成递归语言、具有成本类型的简单类型的 lambda 演算,并声明并证明了表达这种翻译正确性的有界逻辑关系。循环语言在预序中具有指称语义,我们使用这种语义来解决循环问题,例如分析二进制计数器和展开树。我们扩展这些技术以支持摊销分析,其中成本从程序的一个部分重新排列到另一个部分,以实现更精确的界限。我们给出了一种中间语言,可以根据银行家的摊销分析方法对程序进行注释;这种语言有一个仿射类型系统,以确保积分不会花费超过一次。我们将这种语言的递归提取翻译成递归语言、具有成本类型的简单类型的 lambda 演算,并声明并证明了表达这种翻译正确性的有界逻辑关系。循环语言在预序中具有指称语义,我们使用这种语义来解决循环问题,例如分析二进制计数器和展开树。我们扩展这些技术以支持摊销分析,其中成本从程序的一个部分重新排列到另一个部分,以实现更精确的界限。我们给出了一种中间语言,可以根据银行家的摊销分析方法对程序进行注释;这种语言有一个仿射类型系统,以确保积分不会花费超过一次。我们将这种语言的递归提取翻译成递归语言、具有成本类型的简单类型的 lambda 演算,并声明并证明了表达这种翻译正确性的有界逻辑关系。循环语言在预序中具有指称语义,我们使用这种语义来解决循环问题,例如分析二进制计数器和展开树。其中成本从程序的一个部分重新排列到另一个部分以实现更精确的界限。我们给出了一种中间语言,可以根据银行家的摊销分析方法对程序进行注释;这种语言有一个仿射类型系统,以确保积分不会花费超过一次。我们将这种语言的递归提取翻译成递归语言、具有成本类型的简单类型的 lambda 演算,并声明并证明了表达这种翻译正确性的有界逻辑关系。循环语言在预序中具有指称语义,我们使用这种语义来解决循环问题,例如分析二进制计数器和展开树。其中成本从程序的一个部分重新排列到另一个部分以实现更精确的界限。我们给出了一种中间语言,可以根据银行家的摊销分析方法对程序进行注释;这种语言有一个仿射类型系统,以确保积分不会花费超过一次。我们将这种语言的递归提取翻译成递归语言、具有成本类型的简单类型的 lambda 演算,并声明并证明了表达这种翻译正确性的有界逻辑关系。循环语言在预序中具有指称语义,我们使用这种语义来解决循环问题,例如分析二进制计数器和展开树。我们给出了一种中间语言,可以根据银行家的摊销分析方法对程序进行注释;这种语言有一个仿射类型系统,以确保积分不会花费超过一次。我们将这种语言的递归提取翻译成递归语言、具有成本类型的简单类型的 lambda 演算,并声明并证明了表达这种翻译正确性的有界逻辑关系。循环语言在预序中具有指称语义,我们使用这种语义来解决循环问题,例如分析二进制计数器和展开树。我们给出了一种中间语言,可以根据银行家的摊销分析方法对程序进行注释;这种语言有一个仿射类型系统,以确保积分不会花费超过一次。我们将这种语言的递归提取翻译成递归语言、具有成本类型的简单类型的 lambda 演算,并声明并证明了表达这种翻译正确性的有界逻辑关系。循环语言在预序中具有指称语义,我们使用这种语义来解决循环问题,例如分析二进制计数器和展开树。具有成本类型的简单类型的 lambda 演算,并声明并证明表示此翻译正确性的有界逻辑关系。循环语言在预序中具有指称语义,我们使用这种语义来解决循环问题,例如分析二进制计数器和展开树。具有成本类型的简单类型的 lambda 演算,并声明并证明表示此翻译正确性的有界逻辑关系。循环语言在预序中具有指称语义,我们使用这种语义来解决循环问题,例如分析二进制计数器和展开树。
更新日期:2020-08-03
down
wechat
bug