A practical mode system for recursive definitions
Alban Reynaud, Gabriel Scherer, Jeremy Yallop
摘要
In call-by-value languages, some mutually-recursive definitions can be safely evaluated to build recursive functions or cyclic data structures, but some definitions (let rec x = x + 1) contain vicious circles and their evaluation fails at runtime. We propose a new static analysis to check the absence of such runtime failures.
We present a set of declarative inference rules, prove its soundness with respect to the reference sourcelevel semantics of Nordlander, Carlsson, and Gill [2008], and show that it can be directed into an algorithmic backwards analysis check in a surprisingly simple way.
Our implementation of this new check replaced the existing check used by the OCaml programming language, a fragile syntactic criterion which let several subtle bugs slip through as the language kept evolving. We document some issues that arise when advanced features of a real-world functional language (exceptions in first-class modules, GADTs, etc.) interact with safety checking for recursive definitions.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 2 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
引用它的顶会 Paper2
相关 Paper
- Unboxed Data Constructors: Or, How cpp Decides a Halting ProblemNicolas Chataing, Stephen Dolan, Gabriel Scherer, Jeremy YallopPOPL 2024 · 3 次引用
- Predictable Verification using Intrinsic DefinitionsAdithya Murali, Cody Rivera, P. MadhusudanPLDI 2024 · 2 次引用
- Language-Agnostic Static Deadlock Detection for FuturesStefan K. MullerPPoPP 2024 · 1 次引用
- Data-driven abductive inference of library specificationsZhe Zhou, Robert Dickerson, Benjamin Delaware, Suresh JagannathanOOPSLA 2021 · 15 次引用
- Type Inference LogicsDenis Carnier, François Pottier, Steven KeuchelOOPSLA 2024 · 3 次引用
