Skip to content

Commit d06ca90

Browse files
authored
Bump extraction dependencies (#269)
2 parents 5af6806 + 30d2a32 commit d06ca90

Some content is hidden

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

41 files changed

+931
-605
lines changed

.github/coq-concert.opam.locked

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,17 @@ depends: [
1919
"coq-metacoq-template" {= "1.3.4+8.20"}
2020
"coq-metacoq-template-pcuic" {= "1.3.4+8.20"}
2121
"coq-metacoq-utils" {= "1.3.4+8.20"}
22-
"coq-rust-extraction" {= "dev"}
23-
"coq-elm-extraction" {= "0.1.0"}
22+
"coq-rust-extraction" {= "0.1.1"}
23+
"coq-elm-extraction" {= "0.1.1"}
2424
"coq-quickchick" {= "2.0.4"}
2525
"coq-stdpp" {= "1.11.0"}
2626
]
27-
pin-depends: [
28-
["coq-rust-extraction.dev" "git+https://github.com/AU-COBRA/coq-rust-extraction.git#c5d9cbae417213fe25b42f08678f28507cc6b99e"]
29-
]
3027
build: [
3128
[make "core"]
3229
[make "examples"] {with-test}
3330
[make "html"] {with-doc}
3431
]
3532
install: [
3633
[make "install"]
37-
[make "-C" "examples" "install"] {with-test}
3834
]
3935
dev-repo: "git+https://github.com/AU-COBRA/ConCert.git"

.github/workflows/nix-action-8.20.yml

Lines changed: 81 additions & 74 deletions
Large diffs are not rendered by default.

.nix/config.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
coqPackages.metacoq.override.version = "1.3.4-8.20";
1414
coqPackages.stdpp.override.version = "1.11.0";
1515
coqPackages.QuickChick.override.version = "2.0.4";
16-
coqPackages.RustExtraction.override.version = "c5d9cbae417213fe25b42f08678f28507cc6b99e";
17-
coqPackages.ElmExtraction.override.version = "0.1.0";
16+
coqPackages.RustExtraction.override.version = "0.1.1";
17+
coqPackages.ElmExtraction.override.version = "0.1.1";
1818
};
1919

2020
cachix.coq = {};

.nix/coq-nix-toolbox.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
"a1f630a232a3e2c739df99d0a947bf7465d2f8bb"
1+
"944779fa54c48b734298bf78bd71a22eee0abe96"

coq-concert.opam

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,21 +24,16 @@ depends: [
2424
"coq-metacoq-pcuic" {>= "1.3.4" & < "1.4~"}
2525
"coq-metacoq-safechecker" {>= "1.3.4" & < "1.4~"}
2626
"coq-metacoq-erasure" {>= "1.3.4" & < "1.4~"}
27-
"coq-rust-extraction" {= "dev"}
28-
"coq-elm-extraction" {= "0.1.0"}
27+
"coq-rust-extraction" {= "0.1.1"}
28+
"coq-elm-extraction" {= "0.1.1"}
2929
"coq-stdpp" {>= "1.10.0" & < "1.12~"}
3030
]
3131

32-
pin-depends: [
33-
["coq-rust-extraction.dev" "git+https://github.com/AU-COBRA/coq-rust-extraction.git#c5d9cbae417213fe25b42f08678f28507cc6b99e"]
34-
]
35-
3632
build: [
3733
[make "core"]
3834
[make "examples"] {with-test}
3935
[make "html"] {with-doc}
4036
]
4137
install: [
4238
[make "install"]
43-
[make "-C" "examples" "install"] {with-test}
4439
]

examples/boardroomVoting/BoardroomVotingExtractionCameLIGO.v

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,9 @@ From ConCert.Execution Require OptionMonad.
1515
From ConCert.Execution.Test Require Import LocalBlockchain.
1616
From ConCert.Examples.BoardroomVoting Require Import BoardroomVotingZ.
1717
From Coq Require Import List.
18-
From Coq Require Import String.
1918
From Coq Require Import ZArith.
2019

2120

22-
Local Open Scope string_scope.
2321
Open Scope Z.
2422

2523
#[local]
@@ -47,7 +45,7 @@ End Params.
4745
Module BV := BoardroomVoting Params. Import BV.
4846

4947
(* Get string representation of modulus, and remap it. This way we avoid having the extraction compute the number. *)
50-
Definition modulus_ := StringExtra.string_of_Z modulus.
48+
Definition modulus_ := BytestringExtra.string_of_Z modulus.
5149

5250
Definition setupWchain := (BV.Setup × Chain).
5351

@@ -147,7 +145,7 @@ Definition BV_MODULE : CameLIGOMod BV.Msg ContractCallContext (Address * Setup)
147145
lmd_module_name := "cameligo_boardroomvoting" ;
148146

149147
(* definitions of operations on pairs and ints *)
150-
lmd_prelude := concat nl [CameLIGOPretty.CameLIGOPrelude; extra_ops; hash_func_def];
148+
lmd_prelude := String.concat nl [CameLIGOPretty.CameLIGOPrelude; extra_ops; hash_func_def];
151149

152150
(* initial storage *)
153151
lmd_init := init;
@@ -160,7 +158,7 @@ Definition BV_MODULE : CameLIGOMod BV.Msg ContractCallContext (Address * Setup)
160158
lmd_receive := receive_wrapper;
161159

162160
(* code for the entry point *)
163-
lmd_entry_point := CameLIGOPretty.printMain (PREFIX ++ "receive_wrapper")
161+
lmd_entry_point := CameLIGOPretty.printMain (PREFIX ++ "receive_wrapper")%bs
164162
"msg"
165163
"state"
166164
|}.
@@ -302,7 +300,7 @@ Definition TT_rename : list (string * string) :=
302300
; ("true", "true")
303301
; ("false", "false")
304302
; ("hash", "hash_")
305-
; (String.to_string (string_of_kername <%% BV.State %%>), "state") (* we add [storage] so it is printed without the prefix *)
303+
; ((string_of_kername <%% BV.State %%>), "state") (* we add [storage] so it is printed without the prefix *)
306304
; ("tt", "()")
307305
].
308306

@@ -311,4 +309,4 @@ Time MetaCoq Run (CameLIGO_prepare_extraction to_inline TT_remap TT_rename [] "c
311309
Time Definition cameLIGO_boardroomvoting := Eval vm_compute in cameligo_boardroomvoting_prepared.
312310

313311
Redirect "cameligo-extract/BoardroomVoting.mligo"
314-
MetaCoq Run (tmMsg (String.of_string cameLIGO_boardroomvoting)).
312+
MetaCoq Run (tmMsg cameLIGO_boardroomvoting).

examples/boardroomVoting/BoardroomVotingExtractionLiquidity.v

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ From ConCert.Execution.Test Require Import LocalBlockchain.
1616
From ConCert.Examples.BoardroomVoting Require Import BoardroomVotingZ.
1717
From Coq Require Import ZArith.
1818
From Coq Require Import List.
19-
From Coq Require Import String.
2019

2120
Import MCMonadNotation.
2221

@@ -77,7 +76,7 @@ Definition svs : list bool :=
7776
(seq 0 (num_parties - votes_for)).
7877

7978
(* Get string representation of modulus, and remap it. This way we avoid having the extraction compute the number. *)
80-
Definition modulus_ := StringExtra.string_of_Z modulus.
79+
Definition modulus_ := BytestringExtra.string_of_Z modulus.
8180

8281
Definition init_ctx := (Chain × ContractCallContext).
8382

@@ -161,7 +160,7 @@ Definition BV_MODULE : LiquidityMod msg init_ctx BV.Setup BV.State ActionBody Er
161160
lmd_module_name := "liquidity_boardroomvoting" ;
162161

163162
(* definitions of operations on pairs and ints *)
164-
lmd_prelude := concat nl [LiquidityPrelude; extra_ops; hash_func_def];
163+
lmd_prelude := String.concat nl [LiquidityPrelude; extra_ops; hash_func_def];
165164

166165
(* initial storage *)
167166
lmd_init := dummy_init;
@@ -173,9 +172,9 @@ Definition BV_MODULE : LiquidityMod msg init_ctx BV.Setup BV.State ActionBody Er
173172
lmd_receive := dummy_receive;
174173

175174
(* code for the entry point *)
176-
lmd_entry_point := storage_alias ++ nl
175+
lmd_entry_point := (storage_alias ++ nl
177176
++ printWrapper (PREFIX ++ "receive_wrapper") ++ nl
178-
++ printMain |}.
177+
++ printMain)%bs |}.
179178

180179
Definition inline_boardroom_params : list kername :=
181180
[ <%% Params.H %%>
@@ -345,7 +344,7 @@ Definition TT_rename : list (string * string) :=
345344
; ("nil", "[]")
346345
; ("true", "true")
347346
; ("false", "false")
348-
; (String.to_string (string_of_kername <%% BV.State %%>), "state") (* we add [storage] so it is printed without the prefix *)
347+
; ((string_of_kername <%% BV.State %%>), "state") (* we add [storage] so it is printed without the prefix *)
349348
; ("tt", "()")
350349
].
351350

examples/counter/extraction/CounterCertifiedLiquidity.v

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ From ConCert.Utils Require Import Automation.
1010
From ConCert.Execution Require Import Serializable.
1111
From ConCert.Execution Require Import Blockchain.
1212
From ConCert.Execution Require Import ResultMonad.
13-
From Coq Require Import String.
1413
From Coq Require Import Lia.
1514
From Coq Require Import ZArith.
1615

@@ -180,7 +179,7 @@ Definition TT_rename :=
180179

181180
Time MetaCoq Run
182181
(t <- liquidity_extraction PREFIX TT_remap TT_rename [] COUNTER_MODULE ;;
183-
tmDefinition (String.of_string COUNTER_MODULE.(lmd_module_name)) t).
182+
tmDefinition COUNTER_MODULE.(lmd_module_name) t).
184183

185184
(* Print liquidity_counter. *)
186185

examples/counter/extraction/CounterDepCertifiedLiquidity.v

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ From ConCert.Extraction Require Import Common.
1616
From MetaCoq.Erasure.Typed Require Import CertifyingEta.
1717
From Coq Require Import ZArith.
1818
From Coq Require Import Bool.
19-
From Coq Require Import String.
2019

2120
Import MCMonadNotation.
2221

@@ -124,7 +123,7 @@ Definition TT_rename : list (string * string) :=
124123
; ("Z0" ,"0")
125124
; ("nil", "[]")
126125
; ("true", "true")
127-
; (String.to_string (string_of_kername <%% storage %%>), "storage") (* we add [storage] so it is printed without the prefix *) ].
126+
; ((string_of_kername <%% storage %%>), "storage") (* we add [storage] so it is printed without the prefix *) ].
128127

129128
Definition COUNTER_MODULE : LiquidityMod msg _ (Z × address) storage operation Error :=
130129
{| (* a name for the definition with the extracted code *)
@@ -153,7 +152,7 @@ Definition COUNTER_MODULE : LiquidityMod msg _ (Z × address) storage operation
153152

154153
Time MetaCoq Run
155154
(t <- liquidity_extraction PREFIX TT_remap TT_rename [] COUNTER_MODULE ;;
156-
tmDefinition (String.of_string COUNTER_MODULE.(lmd_module_name)) t
155+
tmDefinition COUNTER_MODULE.(lmd_module_name) t
157156
).
158157

159158
(* Print liquidity_counter. *)
@@ -244,7 +243,7 @@ Definition COUNTER_PARTIAL_EXPANDED_MODULE : LiquidityMod msg _ (Z × address) s
244243

245244
Time MetaCoq Run
246245
(t <- liquidity_extraction PREFIX TT_remap TT_rename [] COUNTER_PARTIAL_EXPANDED_MODULE ;;
247-
tmDefinition (String.of_string COUNTER_PARTIAL_EXPANDED_MODULE.(lmd_module_name)) t
246+
tmDefinition COUNTER_PARTIAL_EXPANDED_MODULE.(lmd_module_name) t
248247
).
249248

250249
(* Print liquidity_counter_partially_applied_expanded. *)

examples/counter/extraction/CounterLIGO.v

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
(** * Extraction of various contracts to CameLIGO *)
22

33
From Coq Require Import ZArith.
4-
From Coq Require Import String.
54
From MetaCoq.Template Require Import All.
65
From ConCert.Embedding Require Import Notations.
76
From ConCert.Embedding.Extraction Require Import PreludeExt.
@@ -14,9 +13,9 @@ From ConCert.Execution Require Import ResultMonad.
1413

1514
Import MCMonadNotation.
1615

17-
Local Open Scope string_scope.
1816
Open Scope Z.
1917

18+
2019
#[local]
2120
Existing Instance PrintConfShortNames.PrintWithShortNames.
2221

@@ -100,7 +99,7 @@ End Counter.
10099
Section CounterExtraction.
101100
Import Counter.
102101
(** A translation table for definitions we want to remap. The corresponding top-level definitions will be *ignored* *)
103-
Definition TT_remap_counter : list (kername * String.string) :=
102+
Definition TT_remap_counter : list (kername * string) :=
104103
[ remap <%% Z %%> "int"
105104
; remap <%% Z.add %%> "addInt"
106105
; remap <%% Z.sub %%> "subInt"
@@ -140,6 +139,6 @@ Section CounterExtraction.
140139

141140
(** We redirect the extraction result for later processing and compiling with the CameLIGO compiler *)
142141
Redirect "cameligo-extract/CounterCertified.mligo"
143-
MetaCoq Run (tmMsg (String.of_string cameLIGO_counter_1)).
142+
MetaCoq Run (tmMsg cameLIGO_counter_1).
144143

145144
End CounterExtraction.

0 commit comments

Comments
 (0)