uds-psl / autosubst2 Goto Github PK
View Code? Open in Web Editor NEWOfficial repository of the Autosubst 2 project.
License: Other
Official repository of the Autosubst 2 project.
License: Other
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.
The Autosubst2 website at USL (https://www.ps.uni-saarland.de/extras/autosubst2/) currently does not link to the GitHub repository. This may lead people who find the USL page to believe that the project only had one release and is not maintained.
I was trying to follow the examples shown in
https://github.com/andreasabel/strong-normalization/tree/master/coq/well-scoped
When trying to compile the examples, in reduction.v, coq reports that is does not know how to interpret notation (_[_])
. From what I understand (_[_])
is the notation used for substitution. When checking its definition in stlc.v, the notation is set to printing only
. I was wondering what's the right way to use autosubst's notations?
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.