Skip to content

Commit 75e9327

Browse files
committed
Merge remote-tracking branch 'origin/8.9.1'
2 parents 8dd1448 + 9063feb commit 75e9327

File tree

6 files changed

+44
-42
lines changed

6 files changed

+44
-42
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ may also be helpful.
3131

3232
## Building PUMPKIN
3333

34-
The plugin works for Coq 8.8. There are branches for Coq 8.5 and 8.6, which we are no
34+
The plugin works for Coq 8.9.1. There are branches for Coq 8.5, 8.6, and 8.8, which we are no
3535
longer maintaining.
3636

3737
```

plugin/Makefile

+37-34
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
## \VV/ # ##
55
## // # ##
66
###############################################################################
7-
## GNUMakefile for Coq 8.8.0
7+
## GNUMakefile for Coq 8.9.1
88

99
# For debugging purposes (must stay here, don't move below)
1010
INITIAL_VARS := $(.VARIABLES)
@@ -65,28 +65,27 @@ VERBOSE ?=
6565
# Time the Coq process (set to non empty), and how (see default value)
6666
TIMED?=
6767
TIMECMD?=
68-
# Use /usr/bin/env time on linux, gtime on Mac OS
68+
# Use command time on linux, gtime on Mac OS
6969
TIMEFMT?="$* (real: %e, user: %U, sys: %S, mem: %M ko)"
7070
ifneq (,$(TIMED))
71-
ifeq (0,$(shell /usr/bin/env time -f $(TIMEFMT) true >/dev/null 2>/dev/null; echo $$?))
72-
STDTIME?=/usr/bin/env time -f $(TIMEFMT)
71+
ifeq (0,$(shell command time -f $(TIMEFMT) true >/dev/null 2>/dev/null; echo $$?))
72+
STDTIME?=command time -f $(TIMEFMT)
7373
else
7474
ifeq (0,$(shell gtime -f $(TIMEFMT) true >/dev/null 2>/dev/null; echo $$?))
7575
STDTIME?=gtime -f $(TIMEFMT)
7676
else
77-
STDTIME?=time
77+
STDTIME?=command time
7878
endif
7979
endif
8080
else
81-
STDTIME?=/usr/bin/env time -f $(TIMEFMT)
81+
STDTIME?=command time -f $(TIMEFMT)
8282
endif
8383

8484
# Coq binaries
8585
COQC ?= "$(COQBIN)coqc"
8686
COQTOP ?= "$(COQBIN)coqtop"
8787
COQCHK ?= "$(COQBIN)coqchk"
8888
COQDEP ?= "$(COQBIN)coqdep"
89-
GALLINA ?= "$(COQBIN)gallina"
9089
COQDOC ?= "$(COQBIN)coqdoc"
9190
COQMKFILE ?= "$(COQBIN)coq_makefile"
9291

@@ -148,7 +147,11 @@ TIME_OF_PRETTY_BUILD_EXTRA_FILES ?= - # also output to the command line
148147

149148
# Flags #######################################################################
150149
#
151-
# We define a bunch of variables combining the parameters
150+
# We define a bunch of variables combining the parameters.
151+
# To add additional flags to coq, coqchk or coqdoc, set the
152+
# {COQ,COQCHK,COQDOC}EXTRAFLAGS variable to whatever you want to add.
153+
# To overwrite the default choice and set your own flags entirely, set the
154+
# {COQ,COQCHK,COQDOC}FLAGS variable.
152155

153156
SHOW := $(if $(VERBOSE),@true "",@echo "")
154157
HIDE := $(if $(VERBOSE),,@)
@@ -168,15 +171,22 @@ DYNOBJ:=.cmxs
168171
DYNLIB:=.cmxs
169172
endif
170173

171-
COQFLAGS?=-q $(OPT) $(COQLIBS) $(OTHERFLAGS)
172-
COQCHKFLAGS?=-silent -o $(COQLIBS)
173-
COQDOCFLAGS?=-interpolate -utf8
174+
# these variables are meant to be overriden if you want to add *extra* flags
175+
COQEXTRAFLAGS?=
176+
COQCHKEXTRAFLAGS?=
177+
COQDOCEXTRAFLAGS?=
178+
179+
# these flags do NOT contain the libraries, to make them easier to overwrite
180+
COQFLAGS?=-q $(OPT) $(OTHERFLAGS) $(COQEXTRAFLAGS)
181+
COQCHKFLAGS?=-silent -o $(COQCHKEXTRAFLAGS)
182+
COQDOCFLAGS?=-interpolate -utf8 $(COQDOCEXTRAFLAGS)
183+
174184
COQDOCLIBS?=$(COQLIBS_NOML)
175185

176186
# The version of Coq being run and the version of coq_makefile that
177187
# generated this makefile
178188
COQ_VERSION:=$(shell $(COQC) --print-version | cut -d " " -f 1)
179-
COQMAKEFILE_VERSION:=8.8.0
189+
COQMAKEFILE_VERSION:=8.9.1
180190

181191
COQSRCLIBS?= $(foreach d,$(COQ_SRC_SUBDIRS), -I "$(COQLIB)$(d)")
182192

@@ -216,7 +226,7 @@ ifdef DSTROOT
216226
DESTDIR := $(DSTROOT)
217227
endif
218228

219-
concat_path = $(if $(1),$(1)/$(subst $(COQMF_WINDRIVE),/,$(2)),$(2))
229+
concat_path = $(if $(1),$(1)/$(if $(COQMF_WINDRIVE),$(subst $(COQMF_WINDRIVE),/,$(2)),$(2)),$(2))
220230

221231
COQLIBINSTALL = $(call concat_path,$(DESTDIR),$(COQLIB)user-contrib)
222232
COQDOCINSTALL = $(call concat_path,$(DESTDIR),$(DOCDIR)user-contrib)
@@ -245,7 +255,6 @@ VO = vo
245255

246256
VOFILES = $(VFILES:.v=.$(VO))
247257
GLOBFILES = $(VFILES:.v=.glob)
248-
GFILES = $(VFILES:.v=.g)
249258
HTMLFILES = $(VFILES:.v=.html)
250259
GHTMLFILES = $(VFILES:.v=.g.html)
251260
BEAUTYFILES = $(addsuffix .beautified,$(VFILES))
@@ -334,19 +343,19 @@ make-pretty-timed make-pretty-timed-before make-pretty-timed-after::
334343
print-pretty-timed::
335344
$(HIDE)$(COQMAKE_ONE_TIME_FILE) $(TIME_OF_BUILD_FILE) $(TIME_OF_PRETTY_BUILD_FILE) $(TIME_OF_PRETTY_BUILD_EXTRA_FILES)
336345
print-pretty-timed-diff::
337-
$(HIDE)$(COQMAKE_BOTH_TIME_FILES) --sort-by=$(TIMING_SORT_BY) $(TIME_OF_BUILD_BEFORE_FILE) $(TIME_OF_BUILD_AFTER_FILE) $(TIME_OF_PRETTY_BOTH_BUILD_FILE) $(TIME_OF_PRETTY_BUILD_EXTRA_FILES)
346+
$(HIDE)$(COQMAKE_BOTH_TIME_FILES) --sort-by=$(TIMING_SORT_BY) $(TIME_OF_BUILD_AFTER_FILE) $(TIME_OF_BUILD_BEFORE_FILE) $(TIME_OF_PRETTY_BOTH_BUILD_FILE) $(TIME_OF_PRETTY_BUILD_EXTRA_FILES)
338347
ifeq (,$(BEFORE))
339348
print-pretty-single-time-diff::
340-
@echo 'Error: Usage: $(MAKE) print-pretty-single-time-diff BEFORE=path/to/file.v.before-timing AFTER=path/to/file.v.after-timing'
349+
@echo 'Error: Usage: $(MAKE) print-pretty-single-time-diff AFTER=path/to/file.v.after-timing BEFORE=path/to/file.v.before-timing'
341350
$(HIDE)false
342351
else
343352
ifeq (,$(AFTER))
344353
print-pretty-single-time-diff::
345-
@echo 'Error: Usage: $(MAKE) print-pretty-single-time-diff BEFORE=path/to/file.v.before-timing AFTER=path/to/file.v.after-timing'
354+
@echo 'Error: Usage: $(MAKE) print-pretty-single-time-diff AFTER=path/to/file.v.after-timing BEFORE=path/to/file.v.before-timing'
346355
$(HIDE)false
347356
else
348357
print-pretty-single-time-diff::
349-
$(HIDE)$(COQMAKE_BOTH_SINGLE_TIMING_FILES) --sort-by=$(TIMING_SORT_BY) $(BEFORE) $(AFTER) $(TIME_OF_PRETTY_BUILD_FILE) $(TIME_OF_PRETTY_BUILD_EXTRA_FILES)
358+
$(HIDE)$(COQMAKE_BOTH_SINGLE_TIMING_FILES) --sort-by=$(TIMING_SORT_BY) $(AFTER) $(BEFORE) $(TIME_OF_PRETTY_BUILD_FILE) $(TIME_OF_PRETTY_BUILD_EXTRA_FILES)
350359
endif
351360
endif
352361
pretty-timed:
@@ -371,7 +380,7 @@ real-all: $(VOFILES) $(if $(USEBYTE),bytefiles,optfiles)
371380
.PHONY: real-all
372381

373382
real-all.timing.diff: $(VOFILES:.vo=.v.timing.diff)
374-
.PHONE: real-all.timing.diff
383+
.PHONY: real-all.timing.diff
375384

376385
bytefiles: $(CMOFILES) $(CMAFILES)
377386
.PHONY: bytefiles
@@ -384,7 +393,7 @@ quick: $(VOFILES:.vo=.vio)
384393
.PHONY: quick
385394

386395
vio2vo:
387-
$(TIMER) $(COQC) $(COQDEBUG) $(COQFLAGS) \
396+
$(TIMER) $(COQC) $(COQDEBUG) $(COQFLAGS) $(COQLIBS) \
388397
-schedule-vio2vo $(J) $(VOFILES:%.vo=%.vio)
389398
.PHONY: vio2vo
390399

@@ -396,17 +405,17 @@ quick2vo:
396405
done); \
397406
echo "VIO2VO: $$VIOFILES"; \
398407
if [ -n "$$VIOFILES" ]; then \
399-
$(TIMER) $(COQC) $(COQDEBUG) $(COQFLAGS) -schedule-vio2vo $(J) $$VIOFILES; \
408+
$(TIMER) $(COQC) $(COQDEBUG) $(COQFLAGS) $(COQLIBS) -schedule-vio2vo $(J) $$VIOFILES; \
400409
fi
401410
.PHONY: quick2vo
402411

403412
checkproofs:
404-
$(TIMER) $(COQC) $(COQDEBUG) $(COQFLAGS) \
413+
$(TIMER) $(COQC) $(COQDEBUG) $(COQFLAGS) $(COQLIBS) \
405414
-schedule-vio-checking $(J) $(VOFILES:%.vo=%.vio)
406415
.PHONY: checkproofs
407416

408417
validate: $(VOFILES)
409-
$(TIMER) $(COQCHK) $(COQCHKFLAGS) $^
418+
$(TIMER) $(COQCHK) $(COQCHKFLAGS) $(COQLIBS) $^
410419
.PHONY: validate
411420

412421
only: $(TGTS)
@@ -431,8 +440,6 @@ all-mli.tex: $(MLIFILES:.mli=.cmi)
431440
$(HIDE)$(CAMLDOC) -latex \
432441
-o $@ -m A $(CAMLDEBUG) $(CAMLDOCFLAGS) $(MLIFILES)
433442

434-
gallina: $(GFILES)
435-
436443
all.ps: $(VFILES)
437444
$(SHOW)'COQDOC -ps $(GAL)'
438445
$(HIDE)$(COQDOC) \
@@ -553,7 +560,6 @@ clean::
553560
$(HIDE)find . -name .coq-native -type d -empty -delete
554561
$(HIDE)rm -f $(VOFILES)
555562
$(HIDE)rm -f $(VOFILES:.vo=.vio)
556-
$(HIDE)rm -f $(GFILES)
557563
$(HIDE)rm -f $(BEAUTYFILES) $(VFILES:=.old)
558564
$(HIDE)rm -f all.ps all-gal.ps all.pdf all-gal.pdf all.glob all-mli.tex
559565
$(HIDE)rm -f $(VFILES:.v=.glob)
@@ -654,27 +660,23 @@ endif
654660

655661
$(VOFILES): %.vo: %.v
656662
$(SHOW)COQC $<
657-
$(HIDE)$(TIMER) $(COQC) $(COQDEBUG) $(TIMING_ARG) $(COQFLAGS) $< $(TIMING_EXTRA)
663+
$(HIDE)$(TIMER) $(COQC) $(COQDEBUG) $(TIMING_ARG) $(COQFLAGS) $(COQLIBS) $< $(TIMING_EXTRA)
658664

659665
# FIXME ?merge with .vo / .vio ?
660666
$(GLOBFILES): %.glob: %.v
661-
$(TIMER) $(COQC) $(COQDEBUG) $(COQFLAGS) $<
667+
$(TIMER) $(COQC) $(COQDEBUG) $(COQFLAGS) $(COQLIBS) $<
662668

663669
$(VFILES:.v=.vio): %.vio: %.v
664670
$(SHOW)COQC -quick $<
665-
$(HIDE)$(TIMER) $(COQC) -quick $(COQDEBUG) $(COQFLAGS) $<
671+
$(HIDE)$(TIMER) $(COQC) -quick $(COQDEBUG) $(COQFLAGS) $(COQLIBS) $<
666672

667673
$(addsuffix .timing.diff,$(VFILES)): %.timing.diff : %.before-timing %.after-timing
668674
$(SHOW)PYTHON TIMING-DIFF $<
669675
$(HIDE)$(MAKE) --no-print-directory -f "$(SELF)" print-pretty-single-time-diff BEFORE=$*.before-timing AFTER=$*.after-timing TIME_OF_PRETTY_BUILD_FILE="$@"
670676

671677
$(BEAUTYFILES): %.v.beautified: %.v
672678
$(SHOW)'BEAUTIFY $<'
673-
$(HIDE)$(TIMER) $(COQC) $(COQDEBUG) $(COQFLAGS) -beautify $<
674-
675-
$(GFILES): %.g: %.v
676-
$(SHOW)'GALLINA $<'
677-
$(HIDE)$(GALLINA) $<
679+
$(HIDE)$(TIMER) $(COQC) $(COQDEBUG) $(COQFLAGS) $(COQLIBS) -beautify $<
678680

679681
$(TEXFILES): %.tex: %.v
680682
$(SHOW)'COQDOC -latex $<'
@@ -764,6 +766,7 @@ printenv::
764766
@echo 'OCAMLFIND = $(OCAMLFIND)'
765767
@echo 'PP = $(PP)'
766768
@echo 'COQFLAGS = $(COQFLAGS)'
769+
@echo 'COQLIB = $(COQLIBS)'
767770
@echo 'COQLIBINSTALL = $(COQLIBINSTALL)'
768771
@echo 'COQDOCINSTALL = $(COQDOCINSTALL)'
769772
.PHONY: printenv

plugin/coq/Axioms.v

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Require Import FunctionalExtensionality.
3939
(** We also assert propositional extensionality. *)
4040

4141
Axiom prop_ext: ClassicalFacts.prop_extensionality.
42-
Implicit Arguments prop_ext.
42+
Arguments prop_ext : default implicits.
4343

4444
(** * Proof irrelevance *)
4545

@@ -50,4 +50,4 @@ Lemma proof_irr: ClassicalFacts.proof_irrelevance.
5050
Proof.
5151
exact (ClassicalFacts.ext_prop_dep_proof_irrel_cic prop_ext).
5252
Qed.
53-
Implicit Arguments proof_irr.
53+
Arguments proof_irr : default implicits.

plugin/src/core/procedures/refactor.ml

+1-1
Original file line numberDiff line numberDiff line change
@@ -137,5 +137,5 @@ let do_replace_convertible_module n convs mod_ref : unit =
137137
let sigma, (sub, pf) = replace_convertible false env convs def sigma in
138138
sigma, sub
139139
in
140-
let m = lookup_module (locate_module (qualid_of_reference mod_ref)) in
140+
let m = lookup_module (locate_module mod_ref) in
141141
ignore (transform_module_structure n replace_in_term m)

plugin/src/core/procedures/refactor.mli

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,5 @@ val do_replace_convertible :
4444
val do_replace_convertible_module :
4545
Id.t -> (* name of new module *)
4646
constr_expr list -> (* what to replace *)
47-
reference -> (* reference to module to replace subterms of terms within *)
47+
qualid -> (* reference to module to replace subterms of terms within *)
4848
unit

plugin/src/patcher.ml4

+2-3
Original file line numberDiff line numberDiff line change
@@ -185,9 +185,8 @@ let no_path c =
185185
Constant.make2 (ModPath.MPfile (DirPath.empty)) l
186186

187187
(* Decompiles and prints every definition in a module. *)
188-
let decompile_module mod_ref =
189-
let qualid = qualid_of_reference mod_ref in
190-
let mod_name = Libnames.pr_reference mod_ref in
188+
let decompile_module qualid =
189+
let mod_name = Libnames.pr_qualid qualid in
191190
let mod_body = Global.lookup_module (Nametab.locate_module qualid) in
192191
let (sigma, env) = Pfedit.get_current_context () in
193192
(* let env = Modops.add_module mod_body env in *)

0 commit comments

Comments
 (0)