Rust Distilled: An Expressive Tower of Languages

06/07/2018
by   Aaron Weiss, et al.
0

Rust represents a major advancement in production programming languages because of its success in bridging the gap between high-level application programming and low-level systems programming. At the heart of its design lies a novel approach to ownership that remains highly programmable. In this talk, we will describe our ongoing work on designing a formal semantics for Rust that captures how programmers can understand ownership and borrowing without trying to grasp the details of lifetime analysis. Our model is close to source-level Rust (but with full type annotations) which differs from the recent RustBelt effort that essentially models MIR, a CPS-style IR used in the Rust compiler. Further, while RustBelt aims to verify the safety of unsafe code in Rust's standard library, we model standard library APIs as primitives, which is sufficient to capture their expressive power. This yields a simpler model of Rust and its type system that we think researchers will find easier to use as a starting point for investigating Rust extensions. Unlike RustBelt, we prove type soundness using progress and preservation instead of a Kripke logical relation. Finally, our semantics is a family of languages of increasing expressive power - where, following Felleisen, expressive power is defined in terms of observational equivalence. Separating the language into different levels of expressive power provides a framework for future work on Rust verification and compiler optimization.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
03/03/2019

Oxide: The Essence of Rust

Rust is a major advancement in industrial programming languages due in l...
research
06/23/2021

Fuel: A Compiler Framework for Safe Memory Management

Flow-sensitive type systems offer an elegant way to ensure memory-safety...
research
04/28/2018

KRust: A Formal Executable Semantics of Rust

Rust is a new and promising high-level system programming language. It p...
research
05/12/2018

π: Towards a Simple Formal Semantic Framework for Compiler Construction

This paper proposes π, a formal semantic framework for compiler construc...
research
01/30/2023

Type Theory as a Language Workbench

Language Workbenches offer language designers an expressive environment ...
research
09/17/2018

Verification of High-Level Transformations with Inductive Refinement Types

High-level transformation languages like Rascal include expressive featu...
research
11/27/2012

On the Use of Underspecified Data-Type Semantics for Type Safety in Low-Level Code

In recent projects on operating-system verification, C and C++ data type...

Please sign up or login with your details

Forgot password? Click here to reset