Skip to content

Commit 00bc515

Browse files
authored
Fix deprecations for Rocq 9 (#826)
* Fix deprecations for Rocq 9 * Update CI * Use user-contrib [opam] for InteractionTrees, paco, ext-lib; adjust CI; update bundled CompCert * Put InteractionTree back as submodule * Tweak CI * closes #836 closes #839 closes #840 * Bring 32-bit tests up to date * Brought FCF submodule up to date * Improved a makefile dependency
1 parent 12921c5 commit 00bc515

301 files changed

Lines changed: 1251 additions & 952 deletions

File tree

Some content is hidden

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

.github/workflows/coq-action.yml

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,12 @@ jobs:
2121
# except for the "make_target" field and make_target related excludes
2222
coq_version:
2323
# See https://github.com/coq-community/docker-coq/wiki for supported images
24-
- '8.19'
25-
- '8.20'
2624
- 'dev'
2725
bit_size:
2826
- 32
2927
- 64
3028
make_target:
3129
- vst
32-
exclude:
33-
- coq_version: 8.19
34-
bit_size: 32
35-
- coq_version: dev
36-
bit_size: 32
3730
steps:
3831
- uses: actions/checkout@v4
3932
with:
@@ -53,6 +46,7 @@ jobs:
5346
opam install -y ${{ matrix.coq_version == 'dev' && 'coq-flocq' || matrix.bit_size == 32 && 'coq-compcert-32.3.13.1' || 'coq-compcert.3.13.1' }}
5447
# Required by test2
5548
opam install -y coq-ext-lib
49+
opam install -y coq-paco
5650
endGroup
5751
# See https://github.com/coq-community/docker-coq-action/tree/v1#permissions
5852
before_script: |
@@ -88,8 +82,6 @@ jobs:
8882
fail-fast: false
8983
matrix:
9084
coq_version:
91-
- '8.19'
92-
- '8.20'
9385
- 'dev'
9486
make_target:
9587
- assumptions.txt
@@ -102,10 +94,6 @@ jobs:
10294
- 32
10395
- 64
10496
exclude:
105-
- coq_version: 8.19
106-
bit_size: 32
107-
- coq_version: dev
108-
bit_size: 32
10997
- bit_size: 64
11098
make_target: test3
11199
- bit_size: 32

Makefile

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ COQLIB=$(shell $(COQC) -where | tr -d '\r' | tr '\\' '/')
2121

2222
# Check Coq version
2323

24-
COQVERSION= 8.19.1 or-else 8.19.2 or-else 8.20.0 or-else 8.20.1
24+
COQVERSION= 8.19.1 or-else 8.19.2 or-else 8.20.0 or-else 8.20.1 or-else 9.0.0 orelse 9.1.0 or-else 9.2+alpha
2525

2626
COQV=$(shell $(COQC) -v)
2727
ifneq ($(IGNORECOQVERSION),true)
@@ -303,6 +303,7 @@ CGFLAGS = -DCOMPCERT -short-idents
303303

304304
# ##### Interaction Trees Flags #####
305305

306+
# as of 1 July 2025, coq-itree package seems not compatible with rocq 9.2+alpha, so still using submodule
306307
ifneq ($(wildcard InteractionTrees/theories),)
307308
EXTFLAGS:=$(EXTFLAGS) -Q InteractionTrees/theories ITree
308309
endif
@@ -315,9 +316,10 @@ endif#
315316

316317
# ##### PaCo (Parameterized Coinduction) Flags #####
317318

318-
ifneq ($(wildcard paco/src),)
319-
EXTFLAGS:=$(EXTFLAGS) -Q paco/src Paco
320-
endif
319+
# the following commented out, because we get from opam instead of submodules
320+
# ifneq ($(wildcard paco/src),)
321+
# EXTFLAGS:=$(EXTFLAGS) -Q paco/src Paco
322+
# endif
321323

322324
# ##### SSReflect Flags #####
323325

@@ -327,7 +329,10 @@ endif
327329

328330
# ##### Flag summary #####
329331

330-
COQFLAGS=$(foreach d, $(VSTDIRS), $(if $(wildcard $(d)), -Q $(d) VST.$(d))) $(foreach d, $(OTHERDIRS), $(if $(wildcard $(d)), -Q $(d) $(d))) $(EXTFLAGS) $(SHIM) # -Q ../stdpp/theories stdpp -Q ../iris/iris iris -Q ../InteractionTrees/theories ITree -Q ../paco/src Paco -Q ../coq-ext-lib/theories ExtLib -Q ../fcf/src/fcf FCF
332+
COQFLAGS=$(foreach d, $(VSTDIRS), $(if $(wildcard $(d)), -Q $(d) VST.$(d))) $(foreach d, $(OTHERDIRS), $(if $(wildcard $(d)), -Q $(d) $(d))) $(EXTFLAGS) $(SHIM) # -Q ../stdpp/theories stdpp -Q ../iris/iris iris -Q ../InteractionTrees/theories ITree -Q ../fcf/src/fcf FCF
333+
334+
# old version with paco, coq-ext-lib; we now obtain these from opam environment instead of submodules
335+
# COQFLAGS=$(foreach d, $(VSTDIRS), $(if $(wildcard $(d)), -Q $(d) VST.$(d))) $(foreach d, $(OTHERDIRS), $(if $(wildcard $(d)), -Q $(d) $(d))) $(EXTFLAGS) $(SHIM) # -Q ../stdpp/theories stdpp -Q ../iris/iris iris -Q ../InteractionTrees/theories ITree -Q ../paco/src Paco -Q ../coq-ext-lib/theories ExtLib -Q ../fcf/src/fcf FCF
331336

332337

333338
DEPFLAGS:=$(COQFLAGS)
@@ -829,7 +834,7 @@ VST.config:
829834

830835
# Note: doc files are installed into the coq destination folder.
831836
# This is not ideal but otherwise it gets tricky to handle variants
832-
install: VST.config
837+
install: VST.config vst
833838
install -d "$(INSTALLDIR)"
834839
for d in $(sort $(dir $(INSTALL_FILES) $(EXTRA_INSTALL_FILES))); do install -d "$(INSTALLDIR)/$$d"; done
835840
for f in $(INSTALL_FILES); do install -m 0644 $$f "$(INSTALLDIR)/$$(dirname $$f)"; done
@@ -923,15 +928,16 @@ endif
923928
# ifneq ($(wildcard coq-ext-lib/theories),)
924929
# $(COQDEP) -Q coq-ext-lib/theories ExtLib coq-ext-lib/theories >>.depend
925930
# endif
931+
926932
ifneq ($(wildcard InteractionTrees/theories),)
927-
# $(COQDEP) -Q coq-ext-lib/theories ExtLib -Q paco/src Paco -Q InteractionTrees/theories ITree InteractionTrees/theories >>.depend
928-
$(COQDEP) -Q paco/src Paco -Q InteractionTrees/theories ITree InteractionTrees/theories >>.depend
933+
$(COQDEP) -Q InteractionTrees/theories ITree InteractionTrees/theories >>.depend
929934
endif
935+
# the following commented out, because we get from opam instead of submodules
936+
# ifneq ($(wildcard paco/src),)
937+
# $(COQDEP) -Q paco/src Paco paco/src/*.v >>.depend
938+
# endif
930939
ifneq ($(wildcard fcf/src/FCF),)
931940
$(COQDEP) -Q fcf/src/FCF FCF fcf/src/FCF/*.v >>.depend
932-
endif
933-
ifneq ($(wildcard paco/src),)
934-
$(COQDEP) -Q paco/src Paco paco/src/*.v >>.depend
935941
endif
936942
wc .depend
937943

Makefile.bundled

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ ifdef CLIGHTGEN
134134
VERSION1= $(lastword $(shell $(CLIGHTGEN) --version))
135135
VERSION2= $(subst version=,,$(shell grep version $(COMPCERT_SRC_DIR)/VERSION))
136136
ifneq ($(VERSION1),$(VERSION2))
137-
$(warning clightgen version $(VERSION1) does not match VST/compcert/VERSION $(VERSION2))
137+
$(warning $(CLIGHTGEN) version $(VERSION1) does not match VST/compcert/VERSION $(VERSION2))
138138
endif
139139
endif
140140

aes/list_utils.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Qed.
3737
Lemma repeat_op_table_nat_length: forall {T: Type} (i: nat) (x: T) (f: T -> T),
3838
length (repeat_op_table_nat i x f) = i.
3939
Proof.
40-
intros. induction i. reflexivity. simpl. rewrite app_length. simpl.
40+
intros. induction i. reflexivity. simpl. rewrite length_app. simpl.
4141
rewrite IHi. lia.
4242
Qed.
4343

atomics/SC_atomics_base.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
(* SC atomics without importing Iris *)
22

3-
Require Import Ensembles.
3+
From Stdlib Require Import Ensembles.
44
Require Import VST.veric.rmaps.
55
Require Import VST.veric.compcert_rmaps.
66
Require Import VST.concurrency.ghosts.

atomics/verif_hashtable1.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1098,7 +1098,7 @@ Proof.
10981098
rewrite Z2Nat.inj_add, repeat_plus by omega; simpl.
10991099
rewrite !combine_app, map_app, sepcon_app; simpl.
11001100
unfold atomic_entry, atomic_loc_hist; entailer!.
1101-
{ rewrite combine_length, repeat_length, Zlength_correct, Nat2Z.id, Nat.min_l; auto.
1101+
{ rewrite length_combine, repeat_length, Zlength_correct, Nat2Z.id, Nat.min_l; auto.
11021102
apply Nat2Z.inj_le; rewrite <- !Zlength_correct; omega. }
11031103
{ apply Nat2Z.inj; rewrite <- !Zlength_correct; omega. }
11041104
- Intros entries ghosts.

compcert/Makefile.config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ SHAREDIR=$(PREFIX)/share
66
COQDEVDIR=$(PREFIX)/lib/compcert/coq
77
OCAML_NATIVE_COMP=true
88
OCAML_OPT_COMP=true
9-
MENHIR_DIR=/Users/appel/.opam/coq8.19/lib/menhirLib
9+
MENHIR_DIR=/Users/appel/.opam/CP.2024.10.1~8.20~2025.01/lib/menhirLib
1010
COMPFLAGS=-bin-annot
1111
ABI=apple
1212
ARCH=aarch64
@@ -31,4 +31,4 @@ MODEL=default
3131
SYSTEM=macos
3232
RESPONSEFILE=gnu
3333
LIBRARY_FLOCQ=external
34-
LIBRARY_MENHIRLIB=local
34+
LIBRARY_MENHIRLIB=external

compcert/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version=3.15
1+
version=3.16
22
buildnr=
33
tag=
44
branch=

compcert/cfrontend/Clight.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ Variable e: env.
361361
Variable le: temp_env.
362362
Variable m: mem.
363363

364-
(** [eval_expr ge e m a v] defines the evaluation of expression [a]
364+
(** [eval_expr ge e le m a v] defines the evaluation of expression [a]
365365
in r-value position. [v] is the value of the expression.
366366
[e] is the current environment and [m] is the current memory state. *)
367367

0 commit comments

Comments
 (0)