Skip to content

Commit 5ff733c

Browse files
committed
bump bedrock2 (do not use tuples in memory semantics
1 parent 41b6cca commit 5ff733c

4 files changed

Lines changed: 7 additions & 17 deletions

File tree

rupicola

src/Assembly/WithBedrock/Semantics.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ End Byte.
8585
Require Import coqutil.Word.Interface.
8686
Require Import coqutil.Map.Interface. (* coercions *)
8787
Require Import coqutil.Word.LittleEndianList.
88-
Require Import bedrock2.Memory. Import WithoutTuples.
88+
Require Import bedrock2.Memory. Import coqutil.Map.Memory.
8989
Require coqutil.Word.Naive coqutil.Map.SortedListWord.
9090
Definition mem_state := (SortedListWord.map (Naive.word 64) Byte.byte).
9191

src/Assembly/WithBedrock/SymbolicProofs.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Import Sorting.Permutation.
1919

2020
Require Import bedrock2.Map.Separation.
2121
Require Import bedrock2.Map.SeparationLogic.
22-
Require Import bedrock2.Memory. Import WithoutTuples.
22+
Require Import bedrock2.Memory. Import coqutil.Map.Memory.
2323
Require Import coqutil.Map.Interface. (* coercions *)
2424
Require Import coqutil.Word.Interface.
2525
Require Import coqutil.Word.LittleEndianList.

src/Bedrock/Field/Common/Util.v

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -809,20 +809,10 @@ Section WeakestPrecondition.
809809
forall s (m:mem) a post,
810810
load s map.empty a post -> load s m a post.
811811
Proof.
812-
intros *.
813-
cbv [load Memory.load Memory.load_Z Memory.load_bytes].
814-
rewrite getmany_of_tuple_empty; intros;
815-
repeat match goal with
816-
| H : exists _, _ |- _ => destruct H
817-
| H : _ /\ _ |- _ => destruct H
818-
| _ => congruence
819-
end.
820-
cbv [Memory.bytes_per]; break_match; try congruence.
821-
change 0%nat with (Z.to_nat 0).
822-
pose proof word.width_pos.
823-
rewrite Z2Nat.inj_iff by (try apply Z.div_pos; lia).
824-
rewrite Z.eq_sym_iff.
825-
apply Z.lt_neq, Z.div_str_pos; lia.
812+
cbv [load Memory.load Memory.load_Z Map.Memory.load_bytes]; intros *.
813+
destruct option_all eqn:E; [exfalso|intros (?&?&?); discriminate].
814+
destruct BW as [ [-> | ->] ], s in E;
815+
simpl map in E; rewrite ?map.get_empty in E; discriminate.
826816
Qed.
827817
End Load.
828818

0 commit comments

Comments
 (0)