GithubHelp home page GithubHelp logo

dot-ott's Introduction

DOT in Ott

To run, ensure that the following are installed, then run ./build.sh

Ensure that you have Coq installed.

cd Metalib
make
make install

Metalib was modified in one place to fix a broken tactic.

Ensure that you have stack installed.

stack install

Lngen was only modified to replace Require Export Metatheory with Require Export Metalib.Metatheory as per the current naming conventions in metalib.

make world
ln -s $(pwd)/bin/ott /user/local/bin/

Ott was modified to properly handle non-recursive rules referencing metavariables.

Remaining Work

lngen does not know how to generate the correct code for multiple bind statements, which means that the production rule

val :: 'val_' ::=
  | nu ( x : T ) defs :: :: new (+ bind x in defs+)

is currently incorrect since x should also be bound in T. Adding a second (+ bind x in T +) clause will cause Ott to generate the correct code, but raises a warning saying that lngen does not support this. Indeed, lngen will fail when encountering a production rule with 2 binds. The main consequence of that judgements that look like

( G , x : T ) |- defs : T
------------------------------------- :: new_intro
G |- nu ( x : T ) defs : mu ( x : T )

will incorrectly translate, since x is not bound to T, as

 | ty_new_intro : forall (L:vars) (G:ctx) (T:typ) (defs5:defs),
      ( forall x , x \notin  L  -> ty_defs  ( x ~  ( open_typ_wrt_varref T (var_termvar_f x) )   ++  G )   ( open_defs_wrt_varref defs5 (var_termvar_f x) )   ( open_typ_wrt_varref T (var_termvar_f x) )  )  ->
      ( forall x , x \notin  L  -> ty_trm G (trm_val (val_new  ( open_typ_wrt_varref T (var_termvar_f x) )  defs5)) (typ_bnd T) ) 

note the unnecessary second cofinite quantification, which does not occur if we add (+ bind x in T +).

lngen will sometimes generate incorrect code code by silently failing on naming conflicts, for example in the production rule

v1 v2 :: :: app

changing this rule to be

vx vy :: :: app

while adding the appropriate aliases to varref will cause lngen to generate incorrect code.

dot-ott's People

Watchers

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