Giter Club home page Giter Club logo

pure's Introduction

PureCake

A verified compiler for a lazy functional language

PureCake is a verified implementation of a small, Haskell-like language known as PureLang. It targets CakeML, a verified implementation of a significant subset of Standard ML. PureCake is developed within the HOL4 interactive theorem prover.

Quick start

docker run -it ghcr.io/cakeml/pure:master

This Docker image contains a pre-built version of the PureCake compiler.

Quick start without Docker

git clone https://github.com/cakeml/pure
cd pure/examples && make download

This downloads the latest pre-built version of the PureCake compiler from GitHub. You can now compile PureLang programs without building the compiler yourself, as described in examples/README.md.

Slow start

Follow the build process described by our Dockerfile. In summary: install PolyML; build HOL4; clone the PureCake and CakeML repositories; run Holmake in the top-level of the PureCake repository. Building the entire PureCake project (including the bootstrapped compiler) will take several hours and require considerable compute resources.

Repository structure

COPYING: PureCake Copyright Notice, License, and Disclaimer.

compiler: A verified compiler from PureLang to CakeML, with the components below.

  • backend: the compiler backend, with the following subdirectories.
    • languages: intermediate languages, their semantics, and derived properties.
    • passes: compilation passes and their proofs of correctness.
  • binary: verified (in-logic) bootstrapping of a compiler binary.
  • parsing: lexing and parsing expression grammar (PEG) parsing.
  • proofs overall proofs of correctness.
  • pure_compilerScript.sml: the compiler's top-level definition.

examples: Examples of PureLang code, how to invoke the PureCake compiler on them, and how to measure their performance.

language: Definitions concerning PureLang and its semantics, including built-in operations.

meta-theory: PureLang's meta-theory. In particular, PureLang's equational theory and associated proofs (e.g. soundness of alpha- and beta-equivalence, and coincidence with contextual equivalence), and a formalisation of strictness (demands).

misc: Miscellaneous lemmas.

typing: PureCake's type system: proof of type soundness and a verified type inferencer.

pure's People

Contributors

myreen avatar hrutvik avatar oskarabrahamsson avatar mn200 avatar samsa1 avatar ilmarireissumies avatar kacperfkorban avatar riccardo-zanetti avatar talsewell 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.