Wed 20 Oct 2021 18:50 - 19:05 at Zurich D - Functional Programming - Mirror Chair(s): Atsushi Igarashi
In this paper we present a novel simulation relation for
proving correctness of program transformations that combines
syntactic simulations and logical relations. In particular, we
establish a new kind of simulation diagram that uses a
small-step or big-step semantics in the source language and an
untyped, step-indexed logical relation in the target language.
Our technique provides a practical solution for proving
semantics preservation for transformations that do not preserve
reductions in the source language. This is common when
transformations generate new binder names, and hence
$\alpha$-conversion must be explicitly accounted for, or when
transformations introduce administrative redexes. Our
technique does not require reductions in the source language to
correspond directly to reductions in the target
language. Instead, we enforce a weaker notion of semantic
preorder, which suffices to show that semantics are preserved
for both whole-program and separate compilation. Because our
logical relation is transitive, we can transition between
intermediate program states in a small-step fashion and hence
the shape of the proof resembles that of a simple small-step
simulation.
We use this technique to revisit the semantic correctness of a
continuation-passing style (CPS) transformation and we
demonstrate how it allows us to overcome well-known
complications of this proof related to $\alpha$-conversion and
administrative reductions. In addition, by using a logical
relation that is indexed by invariants that relate the resource
consumption of two programs, we are able show that the
transformation preserves diverging behaviors and that our CPS
transformation asymptotically preserves the running time of the
source program. Our results are formalized in the Coq proof
assistant. Our continuation-passing style transformation is
part of the CertiCoq compiler for Gallina, the specification
language of Coq.
Wed 20 OctDisplayed time zone: Central Time (US & Canada) change
10:50 - 12:10 | |||
10:50 15mTalk | Compiling with Continuations, CorrectlyVirtual OOPSLA DOI | ||
11:05 15mTalk | Synbit: Synthesizing Bidirectional Programs using Unidirectional SketchesVirtual OOPSLA Masaomi Yamaguchi Tohoku University, Kazutaka Matsuda Tohoku University, Cristina David University of Bristol, Meng Wang University of Bristol DOI | ||
11:20 15mTalk | Reachability Types: Tracking Aliasing and Separation in Higher-Order Functional ProgramsVirtual OOPSLA Yuyan Bao University of Waterloo, Guannan Wei Purdue University, Oliver Bračevac Purdue University, Yuxuan Jiang Purdue University, Qiyang He Purdue University, Tiark Rompf Purdue University DOI | ||
11:35 15mTalk | Efficient Compilation of Algebraic Effect HandlersVirtual OOPSLA Georgios Karachalias Tweag, Filip Koprivec University of Ljubljana; Institute of Mathematics, Matija Pretnar University of Ljubljana; Institute of Mathematics, Tom Schrijvers KU Leuven DOI | ||
11:50 20mLive Q&A | Discussion, Questions and Answers OOPSLA |