【24h】

Multivariate Amortized Resource Analysis

机译:多元摊销资源分析

获取原文

摘要

We study the problem of automatically analyzing the worst-case resource usage of procedures with several arguments. Existing automatic analyses based on amortization, or sized types bound the resource usage or result size of such a procedure by a sum of unary functions of the sizes of the arguments. In this paper we generalize this to arbitrary multivariate polynomial functions thus allowing bounds of the form mn which had to be grossly overestimated by m~2 + n~2 before. Our framework even encompasses bounds like Σ_i,j≤n m_im_j where the m_i are the sizes of the entries of a list of length n. This allows us for the first time to derive useful resource bounds for operations on matrices that are represented as lists of lists and to considerably improve bounds on other super-linear operations on lists such as longest common subsequence and removal of duplicates from lists of lists. Furthermore, resource bounds are now closed under composition which improves accuracy of the analysis of composed programs when some or all of the components exhibit super-linear resource or size behavior. The analysis is based on a novel multivariate amortized resource analysis. We present it in form of a type system for a simple first-order functional language with lists and trees, prove soundness, and describe automatic type inference based on linear programming. We have experimentally validated the automatic analysis on a wide range of examples from functional programming with lists and trees. The obtained bounds were compared with actual resource consumption. All bounds were asymptotically tight, and the constants were close or even identical to the optimal ones.
机译:我们研究的几个参数的自动分析程序的最坏情况下的资源使用的问题。基于摊销现有的自动分析,或尺寸的类型通过的参数的大小的一元函数的和结合的这样的程序的资源使用或结果的大小。在本文中,我们概括本,从而任意的多元多项式函数允许形式MN从而不得不由米〜2 + N之前〜2被严重高估的边界。我们的框架,甚至包括像Σ_i,j≤nm_im_j范围,其中M_I是长度为n的列表项的大小。这让我们在第一时间为作业产生的有用资源界限上的矩阵被表示为列表的列表,并显着提高上列出了其他超线性操作范围,如最长公共子和列表的列表去除重复的。此外,资源界限现在下这改善当一些或所有部件的呈现超线性资源或大小行为组成的程序的解析精度组合物封闭。该分析是基于一种新的多元平摊资源分析。我们提出它在一个类型系统的形式用于列表和树一个简单的一阶函数式语言,证明稳健,并描述了基于线性规划的自动类型推断。我们已经实验验证了广泛的从列表和树木功能编程实例自动分析。所获得的范围与实际资源消耗进行了比较。所有的界限是渐近紧,常量均接近甚至等同于最佳的。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号