arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2310.14719cs.LO
收藏

一种用于自动化资源分析的可复用机器演算

A Reusable Machine-Calculus for Automated Resource Analyses

Hector Suzanne, Emmanuel Chailloux

AI总结:

本文提出一种针对 Call-By-Push-Value 抽象机的可复用机器演算,通过从头实现 AARA 框架进行自动化资源与内存分析,将资源访问建模为状态传递效应,导出多元多项式闭式界限,为函数式语言内存分析奠定基础。

摘要:

本文引入了一种自动化资源分析技术,针对 Call-By-Push-Value 抽象机,以内存预测为实际目标。该机器具有多态和线性类型系统,并通过一阶逻辑片段进行增强,该片段同时编码了资源操作的低级操作语义和算法复杂性的高级综合。资源分析必须涉及多种静态分析,如逃逸、别名、算法不变量等。考虑到这一点,我们在通用系统中从头实现了 Automated Amortized Resource Analysis 框架(AARA)。在此设置中,对资源的访问是一种状态传递效应,它产生了运行时资源使用情况的编译时近似。我们为该演算实现了类型推断约束生成,并针对具有 Call-by-Value 和 Call-By-Push-Value 语义的最小 ML 风格编程语言,对代数数据类型上的迭代器的界限进行了详细阐述。闭式界限被导出为整数上的多元多项式。这现在为开发用于函数式语言自动化内存分析的实验工具包奠定了基础。

英文摘要:

An automated resource analysis technique is introduced, targeting a Call-By-Push-Value abstract machine, with memory prediction as a practical goal. The machine has a polymorphic and linear type system enhanced with a first-order logical fragment, which encodes both low-level operational semantics of resource manipulations and high-level synthesis of algorithmic complexity. Resource analysis must involve a diversity of static analysis, for escape, aliasing, algorithmic invariants, and more. Knowing this, we implement the Automated Amortized Resource Analysis framework (AARA) from scratch in our generic system. In this setting, access to resources is a state-passing effect which produces a compile-time approximation of runtime resource usage. We implemented type inference constraint generation for our calculus, accompanied with an elaboration of bounds for iterators on algebraic datatypes, for minimal ML-style programming languages with Call-by-Value and Call-By-Push-Value semantics. The closed-formed bounds are derived as multivariate polynomials over the integers. This now serves as a base for the development of an experimental toolkit for automated memory analysis of functional languages.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑