Graph IRs for Impure Higher-Order Languages (Technical Report)

09/15/2023
by   Oliver Bračevac, et al.
0

This is a companion report for the OOPSLA 2023 paper of the same title, presenting a detailed end-to-end account of the λ^*_𝖦 graph IR, at a level of detail beyond a regular conference paper. Our first concern is adequacy and soundness of λ^*_𝖦, which we derive from a direct-style imperative functional language (a variant of Bao et al.'s λ^*-calculus with reachability types and a simple effect system) by a series of type-preserving translations into a calculus in monadic normalform (MNF). Static reachability types and effects entirely inform λ^*_𝖦's dependency synthesis. We argue for its adequacy by proving its functional properties along with dependency safety via progress and preservation lemmas with respect to a notion of call-by-value (CBV) reduction that checks the observed order of effects. Our second concern is establishing the correctness of λ^*_𝖦's equational rules that drive compiler optimizations (e.g., DCE, λ-hoisting, etc.), by proving contextual equivalence using logical relations. A key insight is that the functional properties of dependency synthesis permit a logical relation on λ^*_𝖦 in MNF in terms of previously developed logical relations for the direct-style λ^*-calculus. Finally, we also include a longer version of the conference paper's section on code generation and code motion for λ^*_𝖦 as implemented in Scala LMS.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
09/12/2023

Modeling Reachability Types with Logical Relations

Reachability types are a recent proposal to bring Rust-style reasoning a...
research
02/19/2020

On the Versatility of Open Logical Relations: Continuity, Automatic Differentiation, and a Containment Theorem

Logical relations are one of the most powerful techniques in the theory ...
research
11/23/2022

The Functional Machine Calculus II: Semantics

The Functional Machine Calculus (FMC), recently introduced by the author...
research
03/31/2021

A categorical framework for congruence of applicative bisimilarity in higher-order languages

Applicative bisimilarity is a coinductive characterisation of observatio...
research
01/26/2022

A Dependent Dependency Calculus (Extended Version)

Over twenty years ago, Abadi et al. established the Dependency Core Calc...
research
03/15/2018

Tracing sharing in an imperative pure calculus (Extended Version)

We introduce a type and effect system, for an imperative object calculus...
research
07/25/2023

Polymorphic Reachability Types: Tracking Freshness, Aliasing, and Separation in Higher-Order Generic Programs

Reachability types are a recent proposal that has shown promise in scali...

Please sign up or login with your details

Forgot password? Click here to reset