paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Trace contracts

轨迹契约
JFP vol.332023匹配度 3/10 · 论文属于程序语言与软件工程中的行为契约设计,涉及函数调用序列上的谓词约束,与形式化方法/程序分析有间接关联;但完全不涉及 LLM/Agent、静态分析、浮点程序分析或贝叶斯程序分析,因此与用户当前核心研究方向匹配度较低。引用 6 inbox
CAMERON MOY, MATTHIAS FELLEISEN
crossref: 2026-09-10

AI 速览

一句话:提出轨迹契约,用谓词约束多次函数调用与返回间的值序列,弥补传统行为契约表达力不足。

行为软件契约允许程序员用契约强化常规类型所表达的义务与承诺,但当不变量需要跨越多次函数调用时,传统契约的表达力不足。本文提出轨迹契约:它是对函数调用与返回过程中流经的值序列的谓词,可描述跨调用的时序性不变量。论文给出了轨迹契约的原则性设计、实现方案和评估。评估表明该机制在保持契约检查用途的同时,能表达并检查更广泛的跨调用性质,缩小了行为契约与需求之间的表达力差距。

问题
传统行为软件契约难以表达跨多次函数调用的不变量,存在表达力缺口。
方法
提出轨迹契约,将契约定义为对函数调用与返回值序列的谓词,并给出原则性设计与实现。
评估
通过实现与评估验证轨迹契约能表达并检查跨调用不变量,缩小行为契约的表达力差距。
原文摘要(Abstract)

Abstract Behavioral software contracts allow programmers to strengthen the obligations and promises that they express with conventional types. They lack expressive power, though, when it comes to invariants that hold across several function calls. Trace contracts narrow this expressiveness gap. A trace contract is a predicate over the sequence of values that flow through function calls and returns. This paper presents a principled design, an implementation, and an evaluation of trace contracts.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@article{paperbot2151,
  title = {Trace contracts},
  author = {CAMERON MOY and MATTHIAS FELLEISEN},
  journal = {Journal of Functional Programming},
  volume = {33},
  year = {2023},
  doi = {10.1017/s0956796823000096}
}