Passer à la navigation principale Passer à la recherche Passer au contenu principal

A practical mode system for recursive definitions

  • Ecole Normale Supérieure de Lyon
  • University of Cambridge

Résultats de recherche: Contribution à un journalArticleRevue par des pairs

Résumé

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 source-level 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.

langue originaleAnglais
Numéro d'article45
journalProceedings of the ACM on Programming Languages
Volume5
Numéro de publicationPOPL
Les DOIs
étatPublié - 1 janv. 2021

Empreinte digitale

Examiner les sujets de recherche de « A practical mode system for recursive definitions ». Ensemble, ils forment une empreinte digitale unique.

Contient cette citation