HackerPapers

arXiv:1707.04755cs.PL

Abstracting Definitional Interpreters

David Darais, Nicholas Labich, Phuc C. Nguyen, David Van Horn

Early discovery. Linked by one identifiable commenter. This paper is outside the main ranking; a mention is not an endorsement.

Abstract

In this functional pearl, we examine the use of definitional interpreters as a basis for abstract interpretation of higher-order programming languages. As it turns out, definitional interpreters, especially those written in monadic style, can provide a nice basis for a wide variety of collecting semantics, abstract interpretations, symbolic executions, and their intermixings. But the real insight of this story is a replaying of an insight from Reynold's landmark paper, Definitional Interpreters for Higher-Order Programming Languages, in which he observes definitional interpreters enable the defined-language to inherit properties of the defining-language. We show the same holds true for definitional abstract interpreters. Remarkably, we observe that abstract definitional interpreters can inherit the so-called "pushdown control flow" property, wherein function calls and returns are precisely matched in the abstract semantics, simply by virtue of the function call mechanism of the defining-language. The first approaches to achieve this property for higher-order languages appeared within the last ten years, and have since been the subject of many papers. These approaches start from a state-machine semantics and uniformly involve significant technical engineering to recover the precision of pushdown control flow. In contrast, starting from a definitional interpreter, the pushdown control flow property is inherent in the meta-language and requires no further technical mechanism to achieve.

arXiv comments
Journal reference
Proc. ACM Program. Lang. 1, ICFP, Article 12 (September 2017)
DOI
doi:10.1145/3110256
Subjects
cs.PLProgramming Languages

On Hacker News

Linked by 1 identifiable commenter in 1 comment across 1 thread, from Jun 2021 to Jun 2021. Found in 1 HN submission from Mar 2021 to Mar 2021. Open submission discussions.

Comments linking this paper, per year.

Discussed in comments1 thread

    • One practical use of "fix" is emulating Python-like decorators in Haskell: http://web.cecs.pdx.edu/~ntc2/haskell-decorator-paper.pdf Fixed points are also an important part of the technique described in the paper "Abstracting Definitional Interpreters"…

      danidiazView on HNParent context

Submitted to Hacker News

Connected through shared HN threads, not inferred similarity or a recommendation.