Abstracting Definitional Interpreters

07/15/2017
by   David Darais, et al.
0

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.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
09/13/2023

Deriving Abstract Interpreters from Skeletal Semantics

This paper describes a methodology for defining an executable abstract i...
research
09/15/2020

Topos Semantics for a Higher-Order Temporal Logic of Actions

TLA is a popular temporal logic for writing stuttering-invariant specifi...
research
11/10/2020

Game Semantics: Easy as Pi

Game semantics has proven to be a robust method to give compositional se...
research
08/16/2021

Automating the Functional Correspondence between Higher-Order Evaluators and Abstract Machines

The functional correspondence is a manual derivation technique transform...
research
06/19/2014

Pushdown flow analysis with abstract garbage collection

In the static analysis of functional programs, pushdown flow analysis an...
research
02/04/2021

Operational Semantics with Hierarchical Abstract Syntax Graphs

This is a motivating tutorial introduction to a semantic analysis of pro...
research
06/30/2021

A Domain-Theoretic Approach to Statistical Programming Languages

We give a domain-theoretic semantics to a statistical programming langua...

Please sign up or login with your details

Forgot password? Click here to reset