paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Specy: Learning Specifications for Distributed Systems from Event Traces

Specy:从事件轨迹中学习分布式系统规约
OOPSLA 10(OOPSLA1)2026匹配度 3/10 · 该论文属于规约/不变式自动推断与运行时监控这一形式化验证方向,与用户关注的静态分析、形式化验证有一定交集,且具备理论形式化与工业案例;但它面向分布式系统事件轨迹,未涉及 LLM/Agent、浮点程序分析或贝叶斯程序分析,与用户核心的 PL↔AI 交叉主题关联薄弱。引用 0 inbox
Mike He, Ankush Desai, Aishwarya Jagarapu, Doug Terry, Sharad Malik, Aarti Gupta
crossref: 2026-09-10

AI 速览

一句话:提出 Specy,从分布式系统事件轨迹中自动学习带事件量词的规约,并支持不变式推导与运行时监控。

分布式系统的正确性推理极具挑战,而精确的规约是验证的前提;然而开发者难以识别和形式化关键规约。Specy 通过从消息交换产生的可观测事件轨迹中自动学习规约来解决这一问题。它设计了面向事件规约的专用文法,支持事件量词以刻画分布式协议中的复杂行为模式;其学习过程结合了基于文法的枚举搜索与从事件轨迹中的动态学习,有效控制规约搜索空间。在经典分布式协议和工业案例上的评估表明,Specy 能成功学到重要协议规约,发现开发者遗漏的未知规约,自动导出原本需手工构造的归纳不变式,并通过生产系统的运行时监控揭示测试覆盖缺口。

问题
分布式系统验证依赖精确的规约,但开发者手工识别与形式化关键规约十分困难。
方法
Specy 设计支持事件量词的专用文法来描述事件规约,并采用结合文法枚举搜索与事件轨迹动态学习的学习过程,以控制规约搜索。
评估
在经典分布式协议和工业案例上评估,Specy 能学到重要协议规约、发现开发者遗漏的规约、自动导出归纳不变式,并通过生产环境运行时监控揭示测试覆盖缺口。
原文摘要(Abstract)

Reasoning about the correctness of distributed systems is a significant challenge, with precise correctness specifications serving as an essential prerequisite to verification. However, identifying and formulating specifications remains a major hurdle for developers in practice. Specy addresses this challenge by automatically learning specifications from observable event traces generated by message exchanges in distributed systems. The system employs a specialized grammar tailored for event-based specifications, incorporating support for quantifiers over events - a capability essential for capturing the complex behavioral patterns inherent in distributed protocols. Specy utilizes a novel learning procedure that combines grammar-based enumerative search with dynamic learning from event traces, providing effective control over the specification search. We evaluated Specy on established distributed protocols and industrial case studies, demonstrating its ability to successfully learn important protocol specifications. Specy can discover previously unidentified specifications overlooked by developers, automatically derive inductive invariants that were previously constructed manually for verification purposes, and, through run-time monitoring in production systems, reveal gaps in testing coverage - highlighting opportunities to leverage specifications in practice.

链接与引用

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

BibTeX
@article{paperbot3789,
  title = {Specy: Learning Specifications for Distributed Systems from Event Traces},
  author = {Mike He and Ankush Desai and Aishwarya Jagarapu and Doug Terry and Sharad Malik and Aarti Gupta},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {10},
  number = {OOPSLA1},
  year = {2026},
  doi = {10.1145/3798209}
}