Typed Closure Conversion for the Calculus of Constructions

08/12/2018
by   William J. Bowman, et al.
0

Dependently typed languages such as Coq are used to specify and verify the full functional correctness of source programs. Type-preserving compilation can be used to preserve these specifications and proofs of correctness through compilation into the generated target-language programs. Unfortunately, type-preserving compilation of dependent types is hard. In essence, the problem is that dependent type systems are designed around high-level compositional abstractions to decide type checking, but compilation interferes with the type-system rules for reasoning about run-time terms. We develop a type-preserving closure-conversion translation from the Calculus of Constructions (CC) with strong dependent pairs (Σ types)---a subset of the core language of Coq---to a type-safe, dependently typed compiler intermediate language named CC-CC. The central challenge in this work is how to translate the source type-system rules for reasoning about functions into target type-system rules for reasoning about closures. To justify these rules, we prove soundness of CC-CC by giving a model in CC. In addition to type preservation, we prove correctness of separate compilation.

READ FULL TEXT
research
01/01/2018

TWAM: A Certifying Abstract Machine for Logic Programs

Type-preserving (or typed) compilation uses typing derivations to certif...
research
05/31/2019

A Role for Dependent Types in Haskell (Extended version)

Modern Haskell supports zero-cost coercions, a mechanism where types tha...
research
10/30/2020

Type safety of rewrite rules in dependent types

The expressiveness of dependent type theory can be extended by identifyi...
research
08/14/2019

Undecidability of D_<: and Its Decidable Fragments

Dependent Object Types (DOT) is a calculus with path dependent types, in...
research
08/17/2017

Towards Algorithmic Typing for DOT

The Dependent Object Types (DOT) calculus formalizes key features of Sca...
research
07/08/2018

Graduality from Embedding-projection Pairs (Extended Version)

Gradually typed languages allow statically typed and dynamically typed c...
research
10/12/2022

Specializing Scope Graph Resolution Queries: Extended Edition

To warrant programmer productivity, type checker results should be corre...

Please sign up or login with your details

Forgot password? Click here to reset