Skip to content

Commit 7b67453

Browse files
fix some deprecation warnings
1 parent 3cbd749 commit 7b67453

File tree

6 files changed

+20
-19
lines changed

6 files changed

+20
-19
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ To contribute, we recommend following these steps:
160160
For more detailed instructions, see [first-contributions](
161161
https://github.com/firstcontributions/first-contributions).
162162

163-
### RocqdocJS
163+
### CoqdocJS
164164
This tutorial uses [CoqdocJS](https://github.com/coq-community/coqdocjs), so please make sure to format your changes accordingly. To see what your changes will look like in the documentation, run
165165
```
166166
git submodule update --init

_CoqProject

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,13 @@ theories/structured_conc.v
1919
theories/counter.v
2020
theories/spin_lock.v
2121
theories/ticket_lock.v
22+
theories/array_lock.v
2223
theories/adequacy.v
2324
theories/merge_sort.v
2425
theories/custom_ra.v
2526
theories/ofe.v
2627

28+
2729
exercises/basics.v
2830
exercises/pure.v
2931
exercises/lang.v
@@ -40,7 +42,8 @@ exercises/structured_conc.v
4042
exercises/counter.v
4143
exercises/spin_lock.v
4244
exercises/ticket_lock.v
45+
exercises/array_lock.v
4346
exercises/adequacy.v
4447
exercises/merge_sort.v
4548
exercises/custom_ra.v
46-
exercises/ofe.v
49+
exercises/ofe.v

exercises/array_lock.v

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ Proof.
123123
- intros [[d ->]|[d ->]].
124124
all: rewrite (comm Nat.add) Nat.mul_comm.
125125
2: symmetry.
126-
all: by apply Nat.mod_add.
126+
all: by apply Nat.Div0.mod_add.
127127
Qed.
128128

129129
Lemma invitation_add (γ : name) (n m : nat) : invitation γ (n + m) ⊣⊢ invitation γ n ∗ invitation γ m.
@@ -171,9 +171,8 @@ Proof.
171171
iFrame "Ha Hn Hγ Hι".
172172
iLeft.
173173
iFrame.
174-
rewrite Nat2Z.id Nat.mod_0_l.
175-
- done.
176-
- by apply Nat.lt_neq in Hcap.
174+
rewrite Nat2Z.id Nat.Div0.mod_0_l.
175+
by apply Nat.lt_neq in Hcap.
177176
Qed.
178177

179178
Lemma wait_spec (γ : name) (l : val) (t cap : nat) (R : iProp Σ) :
@@ -196,7 +195,7 @@ Proof.
196195
+ iPoseProof (lookup_array _ _ _ (t `mod` cap) #true with "Ha") as "[Ht Ha]".
197196
{
198197
apply list_lookup_insert.
199-
rewrite replicate_length.
198+
rewrite length_replicate.
200199
apply Nat.mod_upper_bound.
201200
by apply Nat.lt_neq in Hcap.
202201
}
@@ -425,7 +424,7 @@ Proof.
425424
iPoseProof (update_array _ _ _ (o `mod` cap) #true with "Ha") as "[Ht Ha]".
426425
{
427426
apply list_lookup_insert.
428-
rewrite replicate_length.
427+
rewrite length_replicate.
429428
apply Nat.mod_upper_bound.
430429
by apply Nat.lt_neq in Hcap.
431430
}

theories/array_lock.v

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ Proof.
123123
- intros [[d ->]|[d ->]].
124124
all: rewrite (comm Nat.add) Nat.mul_comm.
125125
2: symmetry.
126-
all: by apply Nat.mod_add.
126+
all: by apply Nat.Div0.mod_add.
127127
Qed.
128128

129129
Lemma invitation_add (γ : name) (n m : nat) : invitation γ (n + m) ⊣⊢ invitation γ n ∗ invitation γ m.
@@ -171,9 +171,8 @@ Proof.
171171
iFrame "Ha Hn Hγ Hι".
172172
iLeft.
173173
iFrame.
174-
rewrite Nat2Z.id Nat.mod_0_l.
175-
- done.
176-
- by apply Nat.lt_neq in Hcap.
174+
rewrite Nat2Z.id Nat.Div0.mod_0_l.
175+
by apply Nat.lt_neq in Hcap.
177176
Qed.
178177

179178
Lemma wait_spec (γ : name) (l : val) (t cap : nat) (R : iProp Σ) :
@@ -196,7 +195,7 @@ Proof.
196195
+ iPoseProof (lookup_array _ _ _ (t `mod` cap) #true with "Ha") as "[Ht Ha]".
197196
{
198197
apply list_lookup_insert.
199-
rewrite replicate_length.
198+
rewrite length_replicate.
200199
apply Nat.mod_upper_bound.
201200
by apply Nat.lt_neq in Hcap.
202201
}
@@ -425,7 +424,7 @@ Proof.
425424
iPoseProof (update_array _ _ _ (o `mod` cap) #true with "Ha") as "[Ht Ha]".
426425
{
427426
apply list_lookup_insert.
428-
rewrite replicate_length.
427+
rewrite length_replicate.
429428
apply Nat.mod_upper_bound.
430429
by apply Nat.lt_neq in Hcap.
431430
}

theories/arrays.v

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,9 +201,9 @@ Lemma reverse_spec a l :
201201
destruct l as [|v1 l]; first done.
202202
clear H.
203203
change (v1 :: ?l) with ([v1] ++ l) at 2.
204-
rewrite !rev_app_distr app_length Nat2Z.inj_add /=.
204+
rewrite !rev_app_distr length_app Nat2Z.inj_add /=.
205205
rewrite !array_cons !array_app !array_singleton.
206-
rewrite rev_length Loc.add_assoc.
206+
rewrite length_rev Loc.add_assoc.
207207
iDestruct "Ha" as "(Hv1 & Hl & Hv2)".
208208
wp_pures.
209209
wp_load.

theories/merge_sort.v

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -255,8 +255,8 @@ Lemma merge_sort_inner_spec (a b : loc) (l : list Z) :
255255
- by apply firstn_length_le.
256256
}
257257
clear H.
258-
rewrite app_length in Hlen.
259-
rewrite app_length.
258+
rewrite length_app in Hlen.
259+
rewrite length_app.
260260
replace (length l1 + length l2 - length l1) with (length l2) by lia.
261261
rewrite fmap_app !array_app length_fmap.
262262
iDestruct "Ha" as "[Ha1 Ha2]".
@@ -288,7 +288,7 @@ Lemma merge_sort_inner_spec (a b : loc) (l : list Z) :
288288
{
289289
iPureIntro.
290290
split_and!; [done..|].
291-
rewrite app_length.
291+
rewrite length_app.
292292
by f_equal.
293293
}
294294
iIntros "%l (Hb1 & Hb2 & Ha & Hl & %Hl)".

0 commit comments

Comments
 (0)