paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Whip: higher-order contracts for modern services

Whip:面向现代服务的高阶契约
ICFP 1(ICFP)2017匹配度 2/10 · 该论文属于程序语言与运行时契约监控方向,关注服务接口的高阶契约与黑盒检测,但与用户核心方向(静态分析、LLM/Agent 与程序分析交叉、浮点程序分析、贝叶斯程序分析)没有直接关联。引用 20 inbox
Lucas Waye, Stephen Chong, Christos Dimoulas
dblp: 2026-09-10crossref: 2026-09-10

AI 速览

一句话:提出 Whip 高阶契约系统,用面向服务的高阶契约语言和本地运行时监控,检测服务是否遵守声明的接口。

现代面向服务的应用通过简单网络协议组合服务,以保持松耦合开发与部署。这些服务接口在语义上是高阶的,但协议简单,迫使程序员使用脆弱的底层编码和临时的防御性代码来弥补语义鸿沟。受契约式设计启发,作者提出 Whip:一种面向现代服务的高阶契约系统。Whip 提供适合服务需求的高阶契约语言,并在运行时监控服务,以发现未遵守所声明接口的服务。其监控是服务本地的,将服务视为黑盒,支持异构实现语言且无需修改服务代码。因此,Whip 在不破坏现代服务松耦合特性的前提下,提供了接口符合性检查。

问题
现代面向服务的应用用简单网络协议组合服务,以保持松耦合,但服务接口在语义上是高阶的,程序员只能依赖脆弱的底层编码与临时防御代码。
方法
受 Design by Contract 启发,Whip 提供面向现代服务的高阶契约语言,并在服务本地进行运行时监控,将服务视为黑盒,从而支持异构实现语言且无需修改服务代码。
评估
摘要未给出具体实验评估;其评估方式是运行时监控服务,检测未遵守所声明接口的服务,同时不干扰松耦合部署。
原文摘要(Abstract)

Modern service-oriented applications forgo semantically rich protocols and middleware when composing services. Instead, they embrace the loosely-coupled development and deployment of services that communicate via simple network protocols. Even though these applications do expose interfaces that are higher-order in spirit, the simplicity of the network protocols forces them to rely on brittle low-level encodings. To bridge the apparent semantic gap, programmers introduce ad-hoc and error-prone defensive code. Inspired by Design by Contract, we choose a different route to bridge this gap. We introduce Whip, a contract system for modern services. Whip (i) provides programmers with a higher-order contract language tailored to the needs of modern services; and (ii) monitors services at run time to detect services that do not live up to their advertised interfaces. Contract monitoring is local to a service. Services are treated as black boxes, allowing heterogeneous implementation languages without modification to services' code. Thus, Whip does not disturb the loosely coupled nature of modern services.

链接与引用

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

BibTeX
@article{WayeCD17,
  title = {Whip: higher-order contracts for modern services},
  author = {Lucas Waye and Stephen Chong and Christos Dimoulas},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {1},
  number = {ICFP},
  year = {2017},
  doi = {10.1145/3110280}
}