GithubHelp home page GithubHelp logo

uds-psl / autosubst2 Goto Github PK

View Code? Open in Web Editor NEW
15.0 6.0 5.0 131 KB

Official repository of the Autosubst 2 project.

License: Other

Haskell 82.70% Coq 14.26% Standard ML 2.89% Makefile 0.16%
coq metatheory-language formalization

autosubst2's People

Contributors

blaisorblade avatar k4rtik avatar katstark avatar klauso avatar yforster avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

autosubst2's Issues

Notations conflict with stdlib.

My AS2-generated file contains the line:

Notation "[ sigmaval ]" := (subst_tm sigmaval) (at level 1, left associativity, only printing) : fscope.

Unfortunately, this notation conflicts with the definition from Coq.Lists.List.ListNotations:

Notation "[ x ]" := (cons x nil) : list_scope.

As a result, given an AS2-generated module syntax, the following code

Require Import Coq.Lists.List.
Import ListNotations.
Require Import syntax.

produces the error

Error: Notation "[ _ ]" is already defined at level 0
with arguments constr while it is now required to be at level 1
with arguments constr.

This is a problem for me because some libraries that I would like to use (namely Iris/stdpp) are incompatible with Autosubst since they export ListNotations. I would suggest that if Autosubst is going to define notations that clash with standard ones they should be hidden in a module so the user can decide whether to import them or not.

Slow compilation of fixpoints

Hi,
I tried around with pathological cases and it seems the bigger the strongly connected components of sorts get, Coq has a hard time of figuring out which arguments of a mutually recursive fixpoint are structurally decreasing (at least in wellscoped code since there are more arguments to check). That's why I added an annotation to all the fixpoints.
I tested it with the attached language that has components of size 6. The wellscoped code takes around 30s to compile and with the annotation only 3s.

    Time |  Peak Mem | File Name                    
----------------------------------------------------
0m37.21s | 486628 ko | Total Time / Peak Mem        
----------------------------------------------------
0m29.44s | 486628 ko | test_6_3_wellscoped.vo       
0m02.91s | 389764 ko | test_6_3_wellscoped_struct.vo
0m02.66s | 381540 ko | test_6_3_unscoped.vo         
0m01.81s | 377196 ko | test_6_3_unscoped_struct.vo  
0m00.19s | 272656 ko | fintype.vo                   
0m00.11s | 183916 ko | axioms.vo                    
0m00.10s | 161228 ko | unscoped.vo                  

As a quick fix I just added the "{struct s}" text when printing since the name is always the same. But you might want to extract the name based on its position in the binders.

It's only two lines so here is a small patchfile
struct.patch

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.