Skip to content

Commit 48c068f

Browse files
authored
Merge pull request #60 from harp-project/feature/upgrade-rocq
Upgrade to Rocq 9.1
2 parents 2436896 + 8e0040e commit 48c068f

83 files changed

Lines changed: 9892 additions & 1864 deletions

Some content is hidden

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

.github/workflows/docker-action.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
strategy:
2020
matrix:
2121
image:
22-
- 'coqorg/coq:8.20'
22+
- 'rocq/rocq-prover:9.1'
2323
fail-fast: false
2424
steps:
2525
- uses: actions/checkout@v4
@@ -30,6 +30,8 @@ jobs:
3030
before_install: |
3131
startGroup "Setup and print opam config"
3232
opam repo -a --set-default add coq-extra-dev https://coq.inria.fr/opam/extra-dev
33+
opam repo add iris-dev https://gitlab.mpi-sws.org/iris/opam.git
34+
opam install rocq-stdpp
3335
opam config list; opam repo list; opam list
3436
endGroup
3537

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ KNOWNFILES := Makefile _CoqProject
99
.DEFAULT_GOAL := invoke-coqmakefile
1010

1111
CoqMakefile: Makefile _CoqProject
12-
$(COQBIN)coq_makefile -f _CoqProject -o CoqMakefile
12+
$(COQBIN)rocq makefile -f _CoqProject -o CoqMakefile
1313

1414
invoke-coqmakefile: CoqMakefile
1515
$(MAKE) --no-print-directory -f CoqMakefile $(filter-out $(KNOWNTARGETS),$(MAKECMDGOALS))

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Follow the instructions on https://github.com/coq-community/templates to regener
1212

1313

1414

15-
In this repository you can find the formalisation of a subset of Core Erlang in Coq Proof Assistant. The main features of the formalisation include:
15+
In this repository you can find the formalisation of a subset of Core Erlang in Rocq. The main features of the formalisation include:
1616
- The syntax of Core Erlang
1717
- A big-step, a functional big-step and a frame stack semantics of sequential Core Erlang
1818
- A frame stack semantics for a subset of concurrent Core Erlang
@@ -30,7 +30,7 @@ In this repository you can find the formalisation of a subset of Core Erlang in
3030
- Simon Thompson
3131
- M.Sc. students from Eötvös Loránd University
3232
- License: [GNU Lesser General Public License v3 or later](LICENSE)
33-
- Compatible Rocq/Coq versions: 8.20
33+
- Compatible Rocq/Coq versions: 9.1
3434
- Additional dependencies:
3535
- [Stdpp](https://gitlab.mpi-sws.org/iris/stdpp) 1.11.0 is required
3636
- Rocq/Coq namespace: `CoreErlang`
@@ -46,13 +46,13 @@ In this repository you can find the formalisation of a subset of Core Erlang in
4646

4747
## Compiling the project
4848

49-
Necessary requirements: Coq v8.20.0, stdpp v1.11.0 and Erlang/OTP v23.0 (not necessary for the Coq developments). The library is compilable by using `make`. In the following list, we give a brief description about the contents of the files.
49+
Necessary requirements: Rocq v9.1.0, stdpp v1.11.0 and Erlang/OTP v23.0 (not necessary for the Rocq developments). The library is compilable by using `make`. In the following list, we give a brief description about the contents of the files.
5050

5151
## Structure of the formalisation
5252

5353
The main module `CoreErlang` includes the common features for all semantics:
5454

55-
- `src/Basics.v`: fundamental types, and lemmas about them and the built-in features of Coq;
55+
- `src/Basics.v`: fundamental types, and lemmas about them and the built-in features of Rocq;
5656
- `src/Syntax.v`: the abstract syntax of Core Erlang;
5757
- `src/Induction.v`: induction principles for the syntax;
5858
- `src/Equalities.v`: decidable and boolean equalities and comparison based on the abstract syntax;
@@ -123,15 +123,15 @@ Concurrent semantics based on the sequential semantics of `FrameStack` is define
123123

124124
## Formally based interpreter for Core Erlang
125125

126-
The interpreter based on the formal semantics is implemented in `src/Interpreter`, which features function-based variants for the frame stack semantics defined in `src/FrameStack` and `src/Concurrent`. The interpreter is based on Coq's extraction mechanism.
126+
The interpreter based on the formal semantics is implemented in `src/Interpreter`, which features function-based variants for the frame stack semantics defined in `src/FrameStack` and `src/Concurrent`. The interpreter is based on Rocq's extraction mechanism.
127127

128128
- `src/Interpreter/Equivalences.v`: proves the equivalence of the frame stack semantics and its function-based variants (implemented in `StepFunctions.v`) for both the sequential and concurrent sublanguages.
129-
- `src/Interpreter/ExampleProgExtraction.v`: includes a Coq script to extract the (parsed Erlang) programs defined in `src/interpreter/ExampleASTs/coqAST`.
130-
- `src/Interpreter/HaskellExtraction.v`: includes a Coq script to extract the (functional) semantics to Haskell. This script also optimises the semantics in several aspects with extraction commands.
131-
- `src/Interpreter/HaskellExtractionQuickCheck.v`: includes a Coq script to extract the (functional) semantics to Haskell without optimisations.
129+
- `src/Interpreter/ExampleProgExtraction.v`: includes a Rocq script to extract the (parsed Erlang) programs defined in `src/interpreter/ExampleASTs/rocqAST`.
130+
- `src/Interpreter/HaskellExtraction.v`: includes a Rocq script to extract the (functional) semantics to Haskell. This script also optimises the semantics in several aspects with extraction commands.
131+
- `src/Interpreter/HaskellExtractionQuickCheck.v`: includes a Rocq script to extract the (functional) semantics to Haskell without optimisations.
132132
- `src/Interpreter/InterpreterAux.v`: defines a number of helper functions for the function-based semantics.
133133
- `src/Interpreter/InterpreterAuxLemmas.v`: proves a number of properties of the helper functions mentioned above.
134-
- `src/Interpreter/OCamlExtraction.v`: includes a Coq script to extract the (functional) semantics to OCaml without optimisations.
134+
- `src/Interpreter/OCamlExtraction.v`: includes a Rocq script to extract the (functional) semantics to OCaml without optimisations.
135135
- `src/Interpreter/Scheduler.v`: defines a number of helper functions used by the scheduler implemented in Haskell.
136136
- `src/Interpreter/StepFunctions.v`: defines the function-based variants of the frame stack semantics.
137137
- `src/Interpreter/Tests.v`: includes a number of unit tests for the function-based semantics.

coq-core-erlang-formalization.opam

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ dev-repo: "git+https://github.com/harp-project/core-erlang-formalization.git"
1010
bug-reports: "https://github.com/harp-project/core-erlang-formalization/issues"
1111
license: "LGPL-3.0-or-later"
1212

13-
synopsis: "Core Erlang Formalisation in Coq"
13+
synopsis: "Core Erlang Formalisation in Rocq"
1414
description: """
15-
In this repository you can find the formalisation of a subset of Core Erlang in Coq Proof Assistant. The main features of the formalisation include:
15+
In this repository you can find the formalisation of a subset of Core Erlang in Rocq. The main features of the formalisation include:
1616
- The syntax of Core Erlang
1717
- A big-step, a functional big-step and a frame stack semantics of sequential Core Erlang
1818
- A frame stack semantics for a subset of concurrent Core Erlang
@@ -25,8 +25,8 @@ In this repository you can find the formalisation of a subset of Core Erlang in
2525
build: [make "-j%{jobs}%"]
2626
install: [make "install"]
2727
depends: [
28-
"coq" { >= "8.20" }
29-
"coq-stdpp" { = "1.11.0"}
28+
"coq" { >= "9.1" }
29+
"rocq-stdpp" dev
3030
]
3131

3232
tags: [

meta.yml

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ action: true
77
# circleci: true
88
coqdoc: false
99

10-
synopsis: Core Erlang Formalisation in Coq
10+
synopsis: Core Erlang Formalisation in Rocq
1111

1212
description: |
13-
In this repository you can find the formalisation of a subset of Core Erlang in Coq Proof Assistant. The main features of the formalisation include:
13+
In this repository you can find the formalisation of a subset of Core Erlang in Rocq. The main features of the formalisation include:
1414
- The syntax of Core Erlang
1515
- A big-step, a functional big-step and a frame stack semantics of sequential Core Erlang
1616
- A frame stack semantics for a subset of concurrent Core Erlang
@@ -55,20 +55,21 @@ license:
5555
identifier: LGPL-3.0-or-later
5656

5757
supported_coq_versions:
58-
text: "8.20"
59-
opam: '{ >= "8.20" }'
58+
text: "9.1"
59+
opam: '{ >= "9.1" }'
6060

6161
opam-file-version: dev
6262

63-
tested_coq_opam_versions:
64-
#- version: dev
65-
- version: '8.20'
63+
tested_rocq_opam_versions:
64+
- version: '9.1'
6665

6766
ci_extra_dev: true
6867
dependencies:
6968
- opam:
70-
name: coq-stdpp
71-
version: '{ = "1.11.0"}'
69+
name: rocq-stdpp
70+
version: dev #'{ = "1.11.0"}'
71+
# TODO stdpp is not yet released in opam for Rocq 9.1
72+
# TODO: Manually added to docker-action.yml -> before-install: opam repo add iris-dev https://gitlab.mpi-sws.org/iris/opam.git & opam install rocq-stdpp
7273
description: |-
7374
[Stdpp](https://gitlab.mpi-sws.org/iris/stdpp) 1.11.0 is required
7475
@@ -89,14 +90,14 @@ keywords:
8990
build: |-
9091
## Compiling the project
9192
92-
Necessary requirements: Coq v8.20.0, stdpp v1.11.0 and Erlang/OTP v23.0 (not necessary for the Coq developments). The library is compilable by using `make`. In the following list, we give a brief description about the contents of the files.
93+
Necessary requirements: Rocq v9.1.0, stdpp v1.11.0 and Erlang/OTP v23.0 (not necessary for the Rocq developments). The library is compilable by using `make`. In the following list, we give a brief description about the contents of the files.
9394
9495
documentation: |-
9596
## Structure of the formalisation
9697
9798
The main module `CoreErlang` includes the common features for all semantics:
9899
99-
- `src/Basics.v`: fundamental types, and lemmas about them and the built-in features of Coq;
100+
- `src/Basics.v`: fundamental types, and lemmas about them and the built-in features of Rocq;
100101
- `src/Syntax.v`: the abstract syntax of Core Erlang;
101102
- `src/Induction.v`: induction principles for the syntax;
102103
- `src/Equalities.v`: decidable and boolean equalities and comparison based on the abstract syntax;
@@ -167,15 +168,15 @@ documentation: |-
167168
168169
## Formally based interpreter for Core Erlang
169170
170-
The interpreter based on the formal semantics is implemented in `src/Interpreter`, which features function-based variants for the frame stack semantics defined in `src/FrameStack` and `src/Concurrent`. The interpreter is based on Coq's extraction mechanism.
171+
The interpreter based on the formal semantics is implemented in `src/Interpreter`, which features function-based variants for the frame stack semantics defined in `src/FrameStack` and `src/Concurrent`. The interpreter is based on Rocq's extraction mechanism.
171172
172173
- `src/Interpreter/Equivalences.v`: proves the equivalence of the frame stack semantics and its function-based variants (implemented in `StepFunctions.v`) for both the sequential and concurrent sublanguages.
173-
- `src/Interpreter/ExampleProgExtraction.v`: includes a Coq script to extract the (parsed Erlang) programs defined in `src/interpreter/ExampleASTs/coqAST`.
174-
- `src/Interpreter/HaskellExtraction.v`: includes a Coq script to extract the (functional) semantics to Haskell. This script also optimises the semantics in several aspects with extraction commands.
175-
- `src/Interpreter/HaskellExtractionQuickCheck.v`: includes a Coq script to extract the (functional) semantics to Haskell without optimisations.
174+
- `src/Interpreter/ExampleProgExtraction.v`: includes a Rocq script to extract the (parsed Erlang) programs defined in `src/interpreter/ExampleASTs/rocqAST`.
175+
- `src/Interpreter/HaskellExtraction.v`: includes a Rocq script to extract the (functional) semantics to Haskell. This script also optimises the semantics in several aspects with extraction commands.
176+
- `src/Interpreter/HaskellExtractionQuickCheck.v`: includes a Rocq script to extract the (functional) semantics to Haskell without optimisations.
176177
- `src/Interpreter/InterpreterAux.v`: defines a number of helper functions for the function-based semantics.
177178
- `src/Interpreter/InterpreterAuxLemmas.v`: proves a number of properties of the helper functions mentioned above.
178-
- `src/Interpreter/OCamlExtraction.v`: includes a Coq script to extract the (functional) semantics to OCaml without optimisations.
179+
- `src/Interpreter/OCamlExtraction.v`: includes a Rocq script to extract the (functional) semantics to OCaml without optimisations.
179180
- `src/Interpreter/Scheduler.v`: defines a number of helper functions used by the scheduler implemented in Haskell.
180181
- `src/Interpreter/StepFunctions.v`: defines the function-based variants of the frame stack semantics.
181182
- `src/Interpreter/Tests.v`: includes a number of unit tests for the function-based semantics.

src/Auxiliaries.v

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
*)
1717

1818
From CoreErlang Require Export SideEffects ScopingLemmas Equalities.
19-
Require Export Coq.Sorting.Permutation.
20-
Require Export Ascii.
21-
Require Export Numbers.DecimalString Decimal.
19+
Require Export Stdlib.Sorting.Permutation.
20+
From Stdlib Require Export Ascii.
21+
From Stdlib Require Export Numbers.DecimalString Decimal.
2222

2323
Import ListNotations.
2424

@@ -639,7 +639,7 @@ Proof.
639639
now apply IHl2.
640640
Qed.
641641

642-
(** Scope of transforming a Core Erlang list to a Coq list *)
642+
(** Scope of transforming a Core Erlang list to a Rocq list *)
643643
Lemma mk_list_closed :
644644
forall l l' Γ,
645645
VAL Γ ⊢ l ->
@@ -653,7 +653,7 @@ Proof.
653653
reflexivity.
654654
Qed.
655655

656-
(** Scope of transforming a Coq list into a Core Erlang list *)
656+
(** Scope of transforming a Rocq list into a Core Erlang list *)
657657
Lemma meta_to_cons_closed :
658658
forall l Γ,
659659
Forall (ValScoped Γ) l ->

src/Basics.v

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
transform goals and hypotheses
55
*)
66

7-
Require Export Coq.micromega.Lia
8-
Coq.Lists.List
9-
Coq.Arith.PeanoNat.
7+
Require Export Stdlib.micromega.Lia
8+
Stdlib.Lists.List
9+
Stdlib.Arith.PeanoNat.
1010
Import ListNotations.
1111

1212
(**

src/BigStep/Auxiliaries.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*)
77

88
From CoreErlang.BigStep Require Export SideEffects.
9-
Require Export Coq.Sorting.Permutation.
9+
Require Export Stdlib.Sorting.Permutation.
1010

1111
Import ListNotations.
1212

src/BigStep/BigStep.v

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ From CoreErlang.BigStep Require Export ModuleAuxiliaries.
77
(** The Semantics of Core Erlang *)
88
Import ListNotations.
99

10+
Set Warnings "-closed-notation-not-level-0".
1011
Reserved Notation "| env , modules , own_module , id , e , eff | -e> | id' , e' , eff' |" (at level 70).
12+
Set Warnings "+closed-notation-not-level-0".
1113
(* Reserved Notation "| env , id , e , eff | -s> | id' , e' , eff' |" (at level 70). *)
1214
Inductive eval_expr : Environment -> list ErlModule -> string -> nat -> Expression -> SideEffectList -> nat ->
1315
(ValueSequence + Exception) -> SideEffectList -> Prop :=

src/BigStep/Coverage.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*)
55

66
From CoreErlang.BigStep Require Export ModuleAuxiliaries.
7-
(* From Coq Require FSets.FMapWeakList. *)
7+
(* From Stdlib Require FSets.FMapWeakList. *)
88
Require Import FunctionalBigStep.
99

1010
Import ListNotations.

0 commit comments

Comments
 (0)