arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2408.02791cs.PL
收藏

高阶程序时序安全效应的抽象解释

Abstract Interpretation of Temporal Safety Effects of Higher Order Programs

Mihai Nicola, Chaitanya Agarwal, Eric Koskinen, Thomas Wies

AI总结:

提出基于抽象解释的自动机参数化依赖效应分析,用于递归高阶程序时序安全验证,原型 evDrift 在 23 个基准中验证 21 个并显著优于既有工具。

摘要:

本文描述了一种基于抽象解释的新方法,用于验证递归高阶程序的时序安全性质。尽管先前工作已产生理论影响并提供一定自动化,但其可扩展性有限。我们首先提出一种基于自动机的新型“抽象效应域”,用于总结上下文敏感的依赖效应,该效应域能够抽象程序环境与自动机控制状态之间的关系。我们的分析包含一个新的转换器,用于抽象事件前缀,以自动计算上下文敏感的效应摘要;该分析被实例化为一个以抽象解释为基础的类型与效应系统。由于该分析以自动机为参数,我们随后将其实例化到比有限状态自动机更广泛的一类历史/寄存器(或称“累加器”)自动机,以表达某些上下文无关性质、输入依赖性、事件求和、资源使用、成本、相等事件幅度等。我们实现了原型 evDrift,它为类 OCaml 的递归高阶程序计算依赖效应摘要(并验证断言)。作为比较基础,我们描述了到高阶但无效应程序断言检查的归约,并证明我们的方法优于先前工具 Drift、RCaml/Spacer、MoCHi 和 ReTHFL。总体而言,在一组 23 个基准测试中,Drift 验证了 12 个,RCaml/Spacer 验证了 6 个,MoCHi 验证了 11 个,ReTHFL 验证了 18 个,而 evDrift 验证了 21 个;在两个工具均可求解的基准测试上,evDrift 相比 Drift、RCaml/Spacer、MoCHi 和 ReTHFL 还分别取得了 6.3 倍、5.3 倍、16.8 倍和 6.4 倍的加速。

英文摘要:

This paper describes a new abstract interpretation-based approach to verify temporal safety properties of recursive, higher-order programs. While prior works have provided theoretical impact and some automation, they have had limited scalability. We begin with a new automata-based "abstract effect domain" for summarizing context-sensitive dependent effects, capable of abstracting relations between the program environment and the automaton control state. Our analysis includes a new transformer for abstracting event prefixes to automatically computed context-sensitive effect summaries, and is instantiated in a type-and-effect system grounded in abstract interpretation. Since the analysis is parametric on the automaton, we next instantiate it to a broader class of history/register (or "accumulator") automata, beyond finite state automata to express some context-free properties, input-dependency, event summation, resource usage, cost, equal event magnitude, etc. We implemented a prototype evDrift that computes dependent effect summaries (and validates assertions) for OCaml-like recursive higher-order programs. As a basis of comparison, we describe reductions to assertion checking for higher-order but effect-free programs, and demonstrate that our approach outperforms prior tools Drift, RCaml/Spacer, MoCHi, and ReTHFL. Overall, across a set of 23 benchmarks, Drift verified 12 benchmarks, RCaml/Spacer verified 6, MoCHi verified 11, ReTHFL verified 18, and evDrift verified 21; evDrift also achieved a 6.3x, 5.3x, 16.8x, and 6.4x speedup over Drift, RCaml/Spacer, MoCHi, and ReTHFL, respectively, on those benchmarks that both tools could solve.

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

↑