GithubHelp home page GithubHelp logo

sigurdschneider / lvc Goto Github PK

View Code? Open in Web Editor NEW
57.0 6.0 2.0 5.77 MB

LVC verified compiler

License: MIT License

Coq 97.04% Makefile 0.27% Shell 0.06% OCaml 0.96% Ruby 0.46% HTML 0.59% JavaScript 0.35% CSS 0.27%
coq coq-formalization compiler compiler-design verified-compiler verification lvc lvc-compiler register-assignment register-allocation spilling constant-propagation ssa-construction

lvc's Introduction

LVC Compiler Project

LVC stands for Linear Verified Compiler. The compiler is based on the linear first-order language IL [1,2]. The goal of the project is to show that functional SSA, i.e. using a functional style lexical variable binding provides for a viable semantic foundation for static single assignment (SSA).

  • CoqDoc documentation is available here.

Dependencies

  • Coq

    Sources compile with Coq version 8.7.2 (March 2018). Other versions might work.

  • OCaml (including ocamlbuild)

    Sources compile with ocaml version 4.04.2, other versions might work. OCaml should include ocamlbuild.

  • menhir

    A parser generator mostly compatible with ocamlyacc (but better at explaining conflicts): http://gallium.inria.fr/~fpottier/menhir/ Sources compile with version 20171013. Other versions might work.

  • ruby [optional]

    If you want build times to be output, you need ruby.

Building LVC

Get the source code via

git clone https://github.com/sigurdschneider/lvc
git submodule update --init --recursive

After installing the dependencies, you can (but if you did not change anthring, you do not have to) use

./configure.sh

to generate _CoqProject from the sources. This step is strictly optional, as we also provide a _CoqProject in this distribution. Then build LVC using

make
make extraction

This will generate a OCaml bytecode, and the following symbolic link will point to it

extraction/lvcc.byte

There are some example files in extraction/examples. Run one by issuing the following command:

cd extraction
./lvcc.byte examples/dve.il
./lvcc.byte examples/dve+dce.il

The output after different compilation phases will be in files example/dve.il.$PHASE where $PHASE is the compilation phase.

Disclaimer

The sources incorporate ideas and code from various sources.

References

[1] Sigurd Schneider: Semantics of an Intermediate Language for Program Transformation. Master's Thesis. Saarland University, 2013. [2] Sigurd Schneider, Gert Smolka, Sebastian Hack: A Linear First-Order Functional Intermediate Language for Verified Compilers. ITP 2015 [3] Julian Rosemann, Sigurd Schneider, Sebastian Hack: Verified Spilling and Translation Validation with Repair. ITP 2017

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.