Skip to content

Support for Rocq/Coq 9.0 #547

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,18 @@ jobs:
target: ${{ matrix.target }}
os: linux
jobs: 4
opamroot: /home/coq/.opam
opamroot: /home/rocq/.opam
configopts: -ignore-coq-version
container:
image: coqorg/coq:latest-ocaml-4.14-flambda
image: rocq/rocq-prover:latest
options: --user root
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
- name: OPAM dependencies
run: tools/runner.sh opam_install menhir
run: tools/runner.sh opam_install coq menhir
- name: Configure
run: tools/runner.sh configure
- name: Build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/oldest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
opamroot: /home/coq/.opam
configopts: -ignore-coq-version
container:
image: coqorg/coq:8.13
image: coqorg/coq:8.15
options: --user root
steps:
- name: Checkout
Expand Down
14 changes: 10 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -61,29 +61,35 @@ endif
# deprecated-since-8.20
# renamings performed in Coq's standard library;
# using the new names would break compatibility with earlier Coq versions.
# deprecated-from-Coq
# Rocq wants "From Stdlib Require" while Coq wants "From Coq Require".

COQCOPTS ?= \
-w -unused-pattern-matching-variable \
-w -deprecated-since-8.19 \
-w -deprecated-since-8.20
-w -deprecated-since-8.20 \
-w -deprecated-from-Coq

cparser/Parser.vo: COQCOPTS += -w -deprecated-instance-without-locality
MenhirLib/Interpreter.vo: COQCOPTS += -w -undeclared-scope

# Flocq and Menhirlib run into other renaming issues.
# These warnings can only be addressed upstream.

flocq/%.vo: COQCOPTS+=-w -deprecated-syntactic-definition
MenhirLib/%.vo: COQCOPTS+=-w -deprecated-syntactic-definition
flocq/%.vo: COQCOPTS+=-w -deprecated-syntactic-definition -w -deprecated-since-9.0
MenhirLib/%.vo: COQCOPTS+=-w -deprecated-syntactic-definition -w -deprecated-since-9.0

# For the extraction phase, we silence other warnings:
# change-dir-deprecated:
# warning introduced in 8.20, no alternative before 8.20
# extraction-default-directory:
# warning introduced in 8.20, no alternative before 8.20
# deprecated-from-Coq:
# see above
COQEXTRACTOPTS ?= \
-w -change-dir-deprecated \
-w -extraction-default-directory
-w -extraction-default-directory \
-w -deprecated-from-Coq

ifneq ($(INSTALL_COQDEV),true)
# Disable costly generation of .cmx files, which are not used locally
Expand Down
1 change: 1 addition & 0 deletions Makefile.extr
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ EXTRWARNINGS=$(WARNINGS) \
-w -ambiguous-name \
-w -open-shadow-identifier \
-w -open-shadow-label-constructor \
-w -unreachable-case \
-w -unused-module \
-w -unused-functor-parameter

Expand Down
2 changes: 1 addition & 1 deletion aarch64/Archi.v
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

(** Architecture-dependent parameters for AArch64 *)

From Coq Require Import ZArith List.
From Flocq Require Import Binary Bits.
Require Import ZArith List.

Definition ptr64 := true.

Expand Down
4 changes: 2 additions & 2 deletions aarch64/Asmgen.v
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@

(** Translation from Mach to AArch64. *)

Require Import Recdef Coqlib Zwf Zbits.
Require Import Errors AST Integers Floats Op.
From Coq Require Import Recdef Zwf.
Require Import Zbits Coqlib Errors AST Integers Floats Op.
Require Import Locations Mach Asm.
Require SelectOp.

Expand Down
5 changes: 3 additions & 2 deletions aarch64/Asmgenproof1.v
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@

(** Correctness proof for AArch64 code generation: auxiliary results. *)

Require Import Recdef Coqlib Zwf Zbits.
Require Import Maps Errors AST Integers Floats Values Memory Globalenvs.
From Coq Require Import Recdef Zwf.
Require Import Zbits Coqlib Maps Errors.
Require Import AST Integers Floats Values Memory Globalenvs.
Require Import Op Locations Mach Asm Conventions.
Require Import Asmgen.
Require Import Asmgenproof0.
Expand Down
4 changes: 2 additions & 2 deletions aarch64/Builtins1.v
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

(** Platform-specific built-in functions *)

Require Import String Coqlib.
Require Import AST Integers Floats Values.
From Coq Require Import String.
Require Import Coqlib AST Integers Floats Values.
Require Import Builtins0.

Inductive platform_builtin : Type := .
Expand Down
2 changes: 1 addition & 1 deletion aarch64/CombineOpproof.v
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
(* *)
(* *********************************************************************)

Require Import FunInd.
From Coq Require Import FunInd.
Require Import Coqlib.
Require Import AST Integers Values Memory.
Require Import Op Registers RTL.
Expand Down
2 changes: 1 addition & 1 deletion aarch64/Machregs.v
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
(* *)
(* *********************************************************************)

Require Import String.
From Coq Require Import String.
Require Import Coqlib Decidableplus Maps.
Require Import AST Op.

Expand Down
2 changes: 1 addition & 1 deletion arm/Archi.v
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@

(** Architecture-dependent parameters for ARM *)

From Coq Require Import ZArith List.
From Flocq Require Import Binary Bits.
Require Import ZArith List.

Definition ptr64 := false.

Expand Down
4 changes: 2 additions & 2 deletions arm/Builtins1.v
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

(** Platform-specific built-in functions *)

Require Import String Coqlib.
Require Import AST Integers Floats Values.
From Coq Require Import String.
Require Import Coqlib AST Integers Floats Values.
Require Import Builtins0.

Inductive platform_builtin : Type := .
Expand Down
12 changes: 3 additions & 9 deletions arm/CombineOpproof.v
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,9 @@
(** Recognition of combined operations, addressing modes and conditions
during the [CSE] phase. *)

Require Import FunInd.
Require Import Coqlib.
Require Import AST.
Require Import Integers.
Require Import Values.
Require Import Memory.
Require Import Op.
Require Import Registers.
Require Import RTL.
From Coq Require Import FunInd.
Require Import Coqlib AST Integers Values Memory.
Require Import Op Registers RTL.
Require Import CSEdomain.
Require Import CombineOp.

Expand Down
9 changes: 3 additions & 6 deletions arm/Machregs.v
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,9 @@
(* *)
(* *********************************************************************)

Require Import String.
Require Import Coqlib.
Require Import Decidableplus.
Require Import Maps.
Require Import AST.
Require Import Op.
From Coq Require Import String.
Require Import Coqlib Decidableplus Maps.
Require Import AST Op.

(** ** Machine registers *)

Expand Down
3 changes: 2 additions & 1 deletion arm/SelectLongproof.v
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@

(** Instruction selection for 64-bit integer operations *)

Require Import String Coqlib Maps Integers Floats Errors.
From Coq Require Import String.
Require Import Coqlib Maps Integers Floats Errors.
Require Archi.
Require Import AST Values Memory Globalenvs Events.
Require Import Cminor Op CminorSel.
Expand Down
3 changes: 2 additions & 1 deletion backend/Allocation.v
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@

(** Register allocation by external oracle and a posteriori validation. *)

Require Import FSets FSetAVLplus.
From Coq Require Import FSets.
Require Import FSetAVLplus.
Require Import Coqlib Ordered Maps Errors Integers Floats.
Require Import AST Lattice Kildall Memdata.
Require Archi.
Expand Down
3 changes: 1 addition & 2 deletions backend/Allocproof.v
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
(** Correctness proof for the [Allocation] pass (validated translation from
RTL to LTL). *)

Require Import FunInd.
Require Import FSets.
From Coq Require Import FunInd FSets.
Require Import Coqlib Ordered Maps Errors Integers Floats.
Require Import AST Linking Lattice Kildall.
Require Import Values Memory Globalenvs Events Smallstep.
Expand Down
2 changes: 1 addition & 1 deletion backend/Bounds.v
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

(** Computation of resource bounds for Linear code. *)

Require Import FSets FSetAVL.
From Coq Require Import FSets FSetAVL.
Require Import Coqlib Ordered.
Require Intv.
Require Import AST.
Expand Down
2 changes: 1 addition & 1 deletion backend/CleanupLabels.v
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
better-looking, the present pass removes labels that cannot be
branched to. *)

Require Import FSets FSetAVL.
From Coq Require Import FSets FSetAVL.
Require Import Coqlib Ordered.
Require Import Linear.

Expand Down
2 changes: 1 addition & 1 deletion backend/CleanupLabelsproof.v
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

(** Correctness proof for clean-up of labels *)

Require Import FSets.
From Coq Require Import FSets.
Require Import Coqlib Ordered Integers.
Require Import AST Linking.
Require Import Values Memory Events Globalenvs Smallstep.
Expand Down
2 changes: 1 addition & 1 deletion backend/Deadcodeproof.v
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

(** Elimination of unneeded computations over RTL: correctness proof. *)

Require Import FunInd.
From Coq Require Import FunInd.
Require Import Coqlib Maps Errors Integers Floats Lattice Kildall.
Require Import AST Linking.
Require Import Values Memory Builtins Globalenvs Events Smallstep.
Expand Down
19 changes: 19 additions & 0 deletions backend/Inliningaux.mli
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
(* *********************************************************************)
(* *)
(* The Compcert verified compiler *)
(* *)
(* Xavier Leroy, INRIA Paris-Rocquencourt *)
(* *)
(* Copyright Institut National de Recherche en Informatique et en *)
(* Automatique. All rights reserved. This file is distributed *)
(* under the terms of the INRIA Non-Commercial License Agreement. *)
(* *)
(* *********************************************************************)

(* Inlining heuristics *)

type inlining_info

val inlining_analysis: RTL.program -> inlining_info

val should_inline: inlining_info -> AST.ident -> RTL.coq_function -> bool
2 changes: 1 addition & 1 deletion backend/Linearize.v
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

(** Linearization of the control-flow graph: translation from LTL to Linear *)

Require Import FSets FSetAVL.
From Coq Require Import FSets FSetAVL.
Require Import Coqlib Maps Ordered Errors Lattice Kildall.
Require Import AST Op Locations LTL Linear.

Expand Down
2 changes: 1 addition & 1 deletion backend/Linearizeproof.v
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

(** Correctness proof for code linearization *)

Require Import FSets.
From Coq Require Import FSets.
Require Import Coqlib Maps Ordered Errors Lattice Kildall Integers.
Require Import AST Linking.
Require Import Values Memory Events Globalenvs Smallstep.
Expand Down
9 changes: 3 additions & 6 deletions backend/Locations.v
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,9 @@
(** Locations are a refinement of RTL pseudo-registers, used to reflect
the results of register allocation (file [Allocation]). *)

Require Import OrderedType.
Require Import Coqlib.
Require Import Maps.
Require Import Ordered.
Require Import AST.
Require Import Values.
From Coq Require Import OrderedType.
Require Import Coqlib Maps Ordered.
Require Import AST Values.
Require Export Machregs.

(** * Representation of locations *)
Expand Down
3 changes: 2 additions & 1 deletion backend/RTLgenproof.v
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@

(** Correctness proof for RTL generation. *)

Require Import Wellfounded Coqlib Maps AST Linking.
From Coq Require Import Wellfounded.
Require Import Coqlib Maps AST Linking.
Require Import Integers Values Memory Events Smallstep Globalenvs.
Require Import Switch Registers Cminor Op CminorSel RTL.
Require Import RTLgen RTLgenspec.
Expand Down
9 changes: 3 additions & 6 deletions backend/Registers.v
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,9 @@
intermediate language. We also define finite sets and finite maps
over pseudo-registers. *)

Require Import Coqlib.
Require Import AST.
Require Import Maps.
Require Import Ordered.
Require FSetAVL.
Require Import Values.
From Coq Require FSetAVL.
Require Import Coqlib Maps Ordered.
Require Import AST Values.

Definition reg: Type := positive.

Expand Down
3 changes: 2 additions & 1 deletion backend/SelectDivproof.v
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@

(** Correctness of instruction selection for integer division *)

Require Import Zquot Coqlib Zbits.
From Coq Require Import Zquot.
Require Import Coqlib Zbits.
Require Import AST Integers Floats Values Memory Globalenvs Events.
Require Import Cminor Op CminorSel.
Require Import SelectOp SelectOpproof SplitLong SplitLongproof SelectLong SelectLongproof SelectDiv.
Expand Down
2 changes: 1 addition & 1 deletion backend/Selection.v
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
Instruction selection proceeds by bottom-up rewriting over expressions.
The source language is Cminor and the target language is CminorSel. *)

Require String.
From Coq Require String.
Require Import Coqlib Maps.
Require Import AST Errors Integers Globalenvs Builtins Switch.
Require Cminor.
Expand Down
2 changes: 1 addition & 1 deletion backend/Selectionproof.v
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

(** Correctness of instruction selection *)

Require Import FunInd.
From Coq Require Import FunInd.
Require Import Coqlib Maps.
Require Import AST Linking Errors Integers.
Require Import Values Memory Builtins Events Globalenvs Smallstep.
Expand Down
2 changes: 1 addition & 1 deletion backend/SplitLong.vp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

(** Instruction selection for 64-bit integer operations *)

Require String.
From Coq Require String.
Require Import Coqlib.
Require Import AST Integers Floats.
Require Import Op CminorSel.
Expand Down
2 changes: 1 addition & 1 deletion backend/SplitLongproof.v
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

(** Correctness of instruction selection for integer division *)

Require Import String.
From Coq Require Import String.
Require Import Coqlib Maps.
Require Import AST Errors Integers Floats.
Require Import Values Memory Globalenvs Builtins Events Cminor Op CminorSel.
Expand Down
2 changes: 1 addition & 1 deletion backend/Tunneling.v
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

(** Branch tunneling (optimization of branches to branches). *)

Require Import FunInd.
From Coq Require Import FunInd.
Require Import Coqlib Maps UnionFind.
Require Import AST.
Require Import LTL.
Expand Down
Loading