TWAM: A Certifying Abstract Machine for Logic Programs

01/01/2018
by   Brandon Bohrer, et al.
0

Type-preserving (or typed) compilation uses typing derivations to certify correctness properties of compilation. We have designed and implemented a type-preserving compiler for a simply-typed dialect of Prolog we call T-Prolog. The crux of our approach is a new certifying abstract machine which we call the Typed Warren Abstract Machine (TWAM). The TWAM has a dependent type system strong enough to specify the semantics of a logic program in the logical framework LF. We present a soundness metatheorem which constitutes a partial correctness guarantee: well-typed programs implement the logic program specified by their type. This metatheorem justifies our design and implementation of a certifying compiler from T-Prolog to TWAM.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
08/18/2021

On correctness and completeness of an n queens program

Thom Frühwirth presented a short, elegant and efficient Prolog program f...
research
12/11/2020

Type-Centric Kotlin Compiler Fuzzing: Preserving Test Program Correctness by Preserving Types

Kotlin is a relatively new programming language from JetBrains: its deve...
research
08/12/2018

Typed Closure Conversion for the Calculus of Constructions

Dependently typed languages such as Coq are used to specify and verify t...
research
07/08/2022

Flux: Liquid Types for Rust

We introduce Flux, which shows how logical refinements can work hand in ...
research
12/13/2022

Data Layout from a Type-Theoretic Perspective

The specifics of data layout can be important for the efficiency of func...
research
05/12/2020

CapablePtrs: Securely Compiling Partial Programs using the Pointers-as-Capabilities Principle

Capability machines such as CHERI provide memory capabilities that can b...
research
09/06/2021

Lightweight, Multi-Stage, Compiler-Assisted Application Specialization

Program debloating aims to enhance the performance and reduce the attack...

Please sign up or login with your details

Forgot password? Click here to reset