从迹到程序不正确性:一种类型论方法
From Traces to Program Incorrectness: A Type-Theoretic Approach
AI总结:
该研究提出类型论框架,以迹为核心、用符号正则表达式表示,通过新型类型推断算法实现基于迹的程序不正确性下近似推理,为函数式程序的组合分析提供新途径。
摘要:
我们提出了一个类型论框架,用于对与有副作用的不透明库API交互的函数式程序中的不正确性进行推理。我们的方法以迹(即按时间顺序排列的库API调用序列)为核心,迹能自然地刻画单个API的前置条件及其组合行为。我们使用符号正则表达式(SREs)来表示这些迹,从而能够跨函数边界对不正确的抽象数据类型(ADT)行为进行形式化规约。核心贡献是一种新颖的类型推断算法,该算法在指定的不正确性属性下运行,并利用正则表达式的符号有限自动机(SFAs)表示来对迹进行组合推理。当算法成功时,推断出的类型可证明ADT实现能够表现出指定不正确行为的某个子集。这是首个针对基于迹的不正确性规约进行下近似推理的系统化方法,催生了一种全新的迹引导组合分析形式。
英文摘要:
We present a type-theoretic framework for reasoning about incorrectness in functional programs that interact with effectful, opaque library APIs. Our approach centers on traces -- temporally-ordered sequences of library API invocations -- which naturally characterize both the preconditions of individual APIs and their composite behavior. We represent these traces using symbolic regular expressions (SREs), enabling formal specification of incorrect abstract data type (ADT) behaviors across function boundaries. The core contribution is a novel type inference algorithm that operates modulo specified incorrectness properties and leverages the symbolic finite automata (SFAs) representations of regexes for compositional reasoning of traces. When the algorithm succeeds, the inferred types witness that an ADT implementation can exhibit some subset of the specified incorrect behaviors. This represents the first systematic approach to underapproximate reasoning against trace-based incorrectness specifications, enabling a new form of trace-guided compositional analysis.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。