论文标题

提高期望:与类型的预期成本分析自动化

Raising Expectations: Automating Expected Cost Analysis with Types

论文作者

Wang, Di, Kahn, David M, Hoffmann, Jan

论文摘要

本文介绍了基于类型的分析,用于在概率计划的预期执行成本上得出上限。该分析是自然的组成,是成本模型中的参数,并支持高阶功能和电感数据类型。派生的边界是数据结构函数的多元多项式。通过本地类型规则来启用界限推理,该规则将类型推理减少到线性约束求解。该类型系统基于摊销分析的潜在方法,并扩展了确定性程序的自动摊销资源分析(AARA)。主要创新是界限可能包含符号概率,这些概率可能出现在数据结构和函数参数中。另一个贡献是一种新颖的稳健性证明,该证明是建立了基于分布的操作成本语义的衍生界限的正确性,该语义也包括非平凡的分歧行为。对于诸如时间之类的成本模型,派生的界限意味着终止概率。为了强调新颖的想法,演讲的重点是线性潜力和核心语言。但是,该分析是作为资源意识ML的扩展而实现的,并支持多项式界限和用户定义的数据结构。通过分析离散分布的样本复杂性以及确定性程序的新平均估计来评估该技术的有效性,该计划将预期的成本分析与统计方法相结合。

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.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源