paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Specification and Verification for Unrestricted Algebraic Effects and Handling

面向无限制代数效应与效应处理的规约与验证
ICFP 8(ICFP)2024匹配度 4/10 · 论文是纯 PL 形式化验证工作(代数效应处理器规约逻辑 ESL),与用户核心的 PL↔AI/LLM 交叉(用 LLM 改进静态分析与形式化验证、分析 Agentic/LLM 程序)没有直接关系,也未涉及浮点分析;其理论+原型实现+可靠性证明的风格与「理论形式化与工程实现并重」的偏好相符,且多射处理器对概率/非确定性程序的支持与概率程序分析有较弱的间接关联,因此只算边缘相关。引用 1 inbox
Yahui Song, Darius Foo, Wei-Ngan Chin
dblp: 2026-09-10crossref: 2026-09-10

AI 速览

一句话:提出 ESL 规约逻辑,支持含命令式效应与高阶构造的零/单/多射效应处理器验证。

用户自定义效应与处理器常用于命令式效应,多射处理器还可支持非确定或概率程序中的回溯。现有验证工作受限:多射延续仅限纯设置、单射延续才可操作堆、或多射延续操作堆但帧规则受限。本文提出 Effectful Specification Logic(ESL),一种可支持无限制效应处理器的演算,使零射、单射、多射延续能与命令式效应及高阶构造共存。ESL 分阶段刻画行为,并为被调用效应、处理器与延续提供精确模型。作者实现了自动化验证原型,证明其可靠性,并通过案例研究与实验展示可行性。

问题
现有效应处理器的验证方法分别限制多射延续于纯环境、单射延续于堆操作,或多射延续操作堆时仅支持受限帧规则,难以统一处理带命令式效应的高阶程序。
方法
提出 Effectful Specification Logic(ESL)演算,以分阶段方式捕捉行为,并为被调用效应、处理器及零/单/多射延续建立精确模型,进而构建自动化验证系统。
评估
实现自动化验证原型,证明其可靠性,并通过有用案例研究与实验评估其可行性。
原文摘要(Abstract)

Programming with user-defined effects and effect handlers has many practical use cases involving imperative effects. Additionally, it is natural and powerful to use multi-shot effect handlers for non-deterministic or probabilistic programs that allow backtracking to compute a comprehensive outcome. Existing works for verifying effect handlers are restricted in one of three ways: i) permitting multi-shot continuations under pure setting; ii) allowing heap manipulation for only one-shot continuations; or iii) allowing multi-shot continuations with heap-manipulation but under a restricted frame rule. This work proposes a novel calculus called Effectful Specification Logic (ESL) to support unrestricted effect handlers, where zero-/one-/multi-shot continuations can co-exist with imperative effects and higher-order constructs. ESL captures behaviors in stages, and provides precise models to support invoked effects, handlers and continuations. To show its feasibility, we prototype an automated verification system for this novel specification logic, prove its soundness, report on useful case studies, and present experimental results. With this proposal, we have provided an extended specification logic that is capable of modeling arbitrary imperative higher-order programs with algebraic effects and continuation-enabled handlers.

链接与引用

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

BibTeX
@article{SongFC24,
  title = {Specification and Verification for Unrestricted Algebraic Effects and Handling},
  author = {Yahui Song and Darius Foo and Wei-Ngan Chin},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {8},
  number = {ICFP},
  year = {2024},
  doi = {10.1145/3674656}
}