Giter VIP home page Giter VIP logo

semantic-preservation's Introduction

semantic-preservation

Introduction

The purpose of this repo is to give a minimal example of a compiler for which the forward simulation property is verified. The proof is located in src/Verification.v.

I considered an abstract machine using absolute addresses for Jump as a target, and one using a BF-like Jump / Ret, both jumping one instruction after the associated instruction, as a source. The small compiler used is defined in src/Compiler.v.

The proof of some lemmas is still missing, and those are admitted for the moment. This was my first real contact with Coq and dependent types, and it allowed me to make progress on the basics. Also, it makes extensive use of CoqHammer, which makes some proofs quite incomprehensible.

The first_attempt folder contains previous attempts to prove the property, in particular through an approach using vectors, in the belief that this would simplify the proof of certain lemmas. This was quite true, but it made it too complex to state certain theorems, and I preferred to give up on it.

It is globally a matter of proving that given two source states p and p' and a target state q, if

  • p compiles into q
  • p evaluates into p'

then there exist q' such as:

  • p' compiles into q'
  • q evaluates+ into q'

where "+" is the transitive closure.

Main reference: https://xavierleroy.org/publi/compcert-backend.pdf

Semantics

Simulation property

  • The aim of Leroy's paper is to describe how a source program S and a target program C retain the same semantics if the compilation process succeeds.
  • Several relations are defined to express semantic preservation. In src/Simulation.v are included the definitions to construct the lockstep, "plus", "option" and "star" simulation relations described in p. 16.

semantic-preservation's People

Contributors

thamugadi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  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.