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.
CCS Concepts: • Software and its engineering → General programming languages; Recursion.
问问这篇 Paper
智能体会读完全文。
Lune 把这篇 Paper 索引到了最后一个公式,引用它的顶会 Paper 也一样。你提问,回答直接引用原文。
引用它的顶会 Paper2
- flap: A Deterministic Parser with Fused LexingJeremy Yallop, Ningning Xie, Neel KrishnaswamiPLDI 2023 · 被引用 10 次
- A type-and-effect system for object initializationFengyun Liu, Ondrej Lhoták, Aggelos Biboudis, Paolo G. Giarrusso 等OOPSLA 2020 · 被引用 8 次
相关 Paper
- Unboxed Data Constructors: Or, How cpp Decides a Halting ProblemNicolas Chataing, Stephen Dolan, Gabriel Scherer, Jeremy YallopPOPL 2024 · 被引用 3 次
- Language-Agnostic Static Deadlock Detection for FuturesStefan K. MullerPPoPP 2024 · 被引用 1 次
- Predictable Verification using Intrinsic DefinitionsAdithya Murali, Cody Rivera, P. MadhusudanPLDI 2024 · 被引用 2 次
- A conceptual framework for safe object initialization: a principled and mechanized soundness proof of the Celsius modelClement Blaudeau, Fengyun LiuOOPSLA 2022 · 被引用 2 次
- Data-driven abductive inference of library specificationsZhe Zhou, Robert Dickerson, Benjamin Delaware, Suresh JagannathanOOPSLA 2021 · 被引用 15 次
