Skip to content

Commit 90fef70

Browse files
authored
Merge pull request #319 from LPCIC/fast-eqb
Fast generation of Sound Equality Tests
2 parents 3111dac + ca46abf commit 90fef70

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+4005
-794
lines changed

Changelog.md

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,23 @@
22

33
## UNRELEASED
44

5-
- API:
6-
- Change `coq.env.module` and `coq.env.module-type` do not fail if the
7-
module (type) contains a mutual inductive. The resulting `gref` is going
8-
to me unusable with most APIs, though.
9-
- Change `coq.env.module` returns a ADT describing the module contents
10-
- Change `coq.gref->path` and `coq.gref->id` do work on `gref` which point
11-
to mutual inductives.
12-
- New `coq.env.term-dependencies` computing all the `grefs` occurring in a term.
13-
- New `coq.redflag` and `coq.redflags` types for `@redflags!` option understood
14-
by `coq.reduction.lazy.*` `and coq.reduction.cbv.norm`
5+
### API
6+
- Change `coq.env.module` and `coq.env.module-type` do not fail if the
7+
module (type) contains a mutual inductive. The resulting `gref` is going
8+
to me unusable with most APIs, though.
9+
- Change `coq.env.module` returns a ADT describing the module contents
10+
- Change `coq.gref->path` and `coq.gref->id` do work on `gref` which point
11+
to mutual inductives.
12+
- New `coq.env.term-dependencies` computing all the `grefs` occurring in a term.
13+
- New `coq.redflag` and `coq.redflags` types for `@redflags!` option understood
14+
by `coq.reduction.lazy.*` `and coq.reduction.cbv.norm`
15+
- New `coq.env.fresh-global-id`
16+
17+
### APPS
18+
- Change `derive` usage.
19+
One should now import `From elpi.apps Require Import derive.std`
20+
- Change derivations `eq` and `eqOK` move to `derive.legacy`
21+
- New derivations `eqb` and `eqbOK` subsuming the previous ones
1522

1623
## [1.15.6] - 27-08-2022
1724

apps/derive/Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ build: Makefile.coq
1717
test: Makefile.test.coq
1818
@$(MAKE) --no-print-directory -f Makefile.test.coq
1919

20+
coverage:
21+
@$(MAKE) --no-print-directory -f Makefile.coq coverage
22+
2023
theories/%.vo: force
2124
@$(MAKE) --no-print-directory -f Makefile.coq $@
2225
tests/%.vo: force build Makefile.test.coq

apps/derive/Makefile.coq.local

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,25 @@
11

22
coverage:
3+
@printf "====== %-10s\n" "test suite"
4+
@printf "inductives: %d\n" \
5+
`grep -E "^ *(Inductive|Variant)" tests/test_derive_stdlib.v 2>/dev/null| wc -l`
6+
@printf "records: %d\n" \
7+
`grep -E "^ *(Record|Structure)" tests/test_derive_stdlib.v 2>/dev/null| wc -l`
8+
@printf "definitions: %d\n" \
9+
`grep -E "^ *(Fixpoint|Definition)" tests/test_derive_stdlib.v 2>/dev/null| wc -l`
310
@for F in $(wildcard theories/derive/*.v); do\
411
D=`basename $$F .v`;\
5-
T="tests/test_$${D}.v";\
6-
N=`grep -E "^(Fail )?Elpi derive.$$D" $$T 2>/dev/null| wc -l`;\
7-
OK=`grep -E "^Elpi derive.$$D" $$T 2>/dev/null| wc -l`;\
8-
printf "====== %-10s (%2d/%-2d)\n" $$D $$OK $$N;\
9-
grep -E "^Fail Elpi derive.$$D" $$T 2>/dev/null;\
12+
D_=`echo $$D | sed 's/_/./'`;\
13+
F=`mktemp`;\
14+
if [ -e tests/test_$${D}.v ]; then\
15+
(cat tests/test_$${D}.v | awk ' /Module Coverage/ { p = 1 } /End Coverage/ { p = 0 } { if(p == 1) { print }} ' ) > $$F ;\
16+
N=`grep -E "^(Fail )?Elpi derive.$$D_" $$F 2>/dev/null| wc -l`;\
17+
OK=`grep -E "^Elpi derive.$$D_" $$F 2>/dev/null| wc -l`;\
18+
printf "====== %-10s (%2d/%-2d)\n" tests/test_$${D}.v $$OK $$N;\
19+
grep -E "^Fail Elpi derive.$$D_" $$F | grep -vi expected 2>/dev/null;\
20+
fi;\
1021
done || true
1122

23+
install-extra::
24+
df="`$(COQMKFILE) -destination-of theories/derive/std.vo $(COQLIBS)`";\
25+
install -m 0644 $(wildcard elpi/*.elpi) "$(COQLIBINSTALL)/$$df"

0 commit comments

Comments
 (0)