当前位置: 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.)
Raising Expectations: Automating Expected Cost Analysis with Types
arXiv - CS - Programming Languages Pub Date : 2020-06-24 , DOI: arxiv-2006.14010
Di Wang, David M Kahn, Jan Hoffmann

This article presents a type-based analysis for deriving upper bounds on the expected execution cost of probabilistic programs. The analysis is naturally compositional, parametric in the cost model, and supports higher order functions and inductive data types. The derived bounds are multivariate polynomials that are functions of data structures. Bound inference is enabled by local type rules that reduce type inference to linear constraint solving. The type system is based on the potential method of amortized analysis and extends automatic amortized resource analysis (AARA) for deterministic programs. A main innovation is that bounds can contain symbolic probabilities, which may appear in data structures and function arguments. Another contribution is a novel soundness proof that establishes the correctness of the derived bounds with respect to a distribution-based operational cost semantics that also includes nontrivial diverging behavior. For cost models like time, derived bounds imply termination with probability one. To highlight the novel ideas, the presentation focuses on linear potential and a core language. However, the analysis is implemented as an extension of Resource Aware ML and supports polynomial bounds and user defined data structures. The effectiveness of the technique is evaluated by analyzing the sample complexity of discrete distributions and with a novel average-case estimation for deterministic programs that combines expected cost analysis with statistical methods.

中文翻译:

提高预期:使用类型自动进行预期成本分析

本文提出了一种基于类型的分析,用于推导概率程序的预期执行成本的上限。该分析在成本模型中自然是组合的、参数化的,并支持高阶函数和归纳数据类型。导出的边界是作为数据结构函数的多元多项式。绑定推理由局部类型规则启用,这些规则将类型推理简化为线性约束求解。类型系统基于摊销分析的潜在方法,并为确定性程序扩展了自动摊销资源分析 (AARA)。一个主要的创新是边界可以包含符号概率,它可能出现在数据结构和函数参数中。另一个贡献是一种新颖的健全性证明,它建立了基于分布的运营成本语义的派生边界的正确性,该语义还包括非平凡的发散行为。对于像时间这样的成本模型,派生边界意味着以概率 1 终止。为了突出新颖的想法,演示文稿侧重于线性潜力和核心语言。但是,该分析是作为 Resource Aware ML 的扩展实现的,并支持多项式边界和用户定义的数据结构。该技术的有效性是通过分析离散分布的样本复杂性和结合预期成本分析与统计方法的确定性程序的新型平均情况估计来评估的。该分析是作为 Resource Aware ML 的扩展实现的,并支持多项式边界和用户定义的数据结构。该技术的有效性是通过分析离散分布的样本复杂性和结合预期成本分析与统计方法的确定性程序的新型平均情况估计来评估的。该分析是作为 Resource Aware ML 的扩展实现的,并支持多项式边界和用户定义的数据结构。该技术的有效性是通过分析离散分布的样本复杂性和结合预期成本分析与统计方法的确定性程序的新型平均情况估计来评估的。
更新日期:2020-09-23
down
wechat
bug