Coder Social home page Coder Social logo

a-mir-formality's Introduction

a-mir-formality

This repository is an early-stage experimental project that aims to be a complete, authoritative formal model of the Rust MIR. Presuming these experiments bear fruit, the intention is to bring this model into Rust as an RFC and develop it as an official part of the language definition.

Quickstart guide

Like any Rust project:

  • Clone
  • cargo test --all

Layers of formality

Formality is structured into several layers. These layers are meant to also map fairly closely onto chalk and the eventual Rust trait solver implementation. Ideally, one should be able to map back and forth between formality and the code with ease.

  • formality-check: Defines the top-level routines for checking Rust programs. check_all_crates is effectively the main, so it's a good place to start reading.
  • formality-core: Defines logging macros.
  • formality-macros: Defines procedural macros like #[term] as well as various derives. These are used to generate the boilerplate code for parsing, pretty printing, folding, etc.
  • formality-prove: Defines the rules for proving goals (e.g., is this trait implemented?)
  • formality-rust: This is the "Rust declarations" layer, defining Rust "top-level items" and their semantics. This includes crates, structs, traits, impls, but excludes function bodies.
  • formality-types: This is the "types" layer, defining Rust types and functions for equating/relating them. The representation is meant to cover all Rust types, but is optimized for extracting their "essential properties".

a-mir-formality's People

Contributors

nikomatsakis avatar voidc avatar pierwill avatar oli-obk avatar lqd avatar digama0 avatar spastorino avatar crlf0710 avatar jackh726 avatar mattheww avatar obeis avatar yoshuawuyts avatar ltentrup avatar compiler-errors avatar lcnr avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.