Skip to content

Commit

Permalink
Consolidate =* and =*> to bedrock2.Map.Separation
Browse files Browse the repository at this point in the history
  • Loading branch information
andres-erbsen committed Jun 20, 2023
1 parent 8d146d9 commit 4929e1b
Show file tree
Hide file tree
Showing 10 changed files with 3 additions and 10 deletions.
2 changes: 2 additions & 0 deletions bedrock2/src/bedrock2/Map/Separation.v
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,5 @@ Declare Scope sep_scope.
Delimit Scope sep_scope with sep.
Infix "*" := sep (at level 40, left associativity) : sep_scope.
Infix "⋆" := sep (at level 40, left associativity) : sep_scope.
Notation "m =* P" := ((P%sep) m) (at level 70, only parsing).
Notation "m =*> P" := (exists R, (sep P R) m) (at level 70, only parsing).
1 change: 0 additions & 1 deletion bedrock2/src/bedrock2Examples/indirect_add.v
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ Section WithParameters.

Definition f (a b : word) := word.add (word.add a b) b.

Local Notation "m =* P" := (P%sep m) (at level 70, only parsing). (* experiment *)
Instance spec_of_indirect_add : spec_of "indirect_add" :=
fnspec! "indirect_add" a b c / va Ra vb Rb vc Rc,
{ requires t m := m =* scalar a va * Ra /\ m =* scalar b vb * Rb /\ m =* scalar c vc * Rc;
Expand Down
1 change: 0 additions & 1 deletion bedrock2/src/bedrock2Examples/indirect_add_heapletwise.v
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ Section WithParameters.

Definition f (a b : word) := word.add (word.add a b) b.

Local Notation "m =* P" := (P%sep m) (at level 70, only parsing). (* experiment *)
Instance spec_of_indirect_add : spec_of "indirect_add" :=
fnspec! "indirect_add" a b c / va Ra vb Rb vc Rc,
{ requires t m :=
Expand Down
1 change: 0 additions & 1 deletion bedrock2/src/bedrock2Examples/memconst.v
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ Local Notation string := String.string.

(*Require Import bedrock2.ptsto_bytes.*)
Local Notation "xs $@ a" := (Array.array ptsto (word.of_Z 1) a xs) (at level 10, format "xs $@ a").
Local Notation "m =* P" := ((P%sep) m) (at level 70, only parsing) (* experiment*).

Section WithParameters.
Context {width} {BW: Bitwidth width}.
Expand Down
1 change: 0 additions & 1 deletion bedrock2/src/bedrock2Examples/memequal.v
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ Local Notation string := String.string.

(*Require Import bedrock2.ptsto_bytes.*)
Local Notation "xs $@ a" := (Array.array ptsto (word.of_Z 1) a xs) (at level 10, format "xs $@ a").
Local Notation "m =* P" := ((P%sep) m) (at level 70, only parsing) (* experiment*).

Section WithParameters.
Context {width} {BW: Bitwidth width}.
Expand Down
1 change: 0 additions & 1 deletion bedrock2/src/bedrock2Examples/memmove.v
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ Local Notation string := String.string.
(*Require Import bedrock2.ptsto_bytes.*)
Require Import coqutil.Map.OfListWord.
Local Notation "xs $@ a" := (map.of_list_word_at a xs) (at level 10, format "xs $@ a").
Local Notation "m =* P" := ((P%sep) m) (at level 70, only parsing) (* experiment*).

Section WithParameters.
Context {width} {BW: Bitwidth width}.
Expand Down
1 change: 0 additions & 1 deletion bedrock2/src/bedrock2Examples/memswap.v
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ Local Notation string := String.string.

(*Require Import bedrock2.ptsto_bytes.*)
Local Notation "xs $@ a" := (Array.array ptsto (word.of_Z 1) a xs) (at level 10, format "xs $@ a").
Local Notation "m =* P" := ((P%sep) m) (at level 70, only parsing) (* experiment*).

Section WithParameters.
Context {width} {BW: Bitwidth width}.
Expand Down
1 change: 0 additions & 1 deletion bedrock2/src/bedrock2Examples/swap.v
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ Require Import coqutil.Tactics.rdelta.
Section WithParameters.
Context {word: word.word 32} {mem: map.map word Byte.byte}.
Context {word_ok: word.ok word} {mem_ok: map.ok mem}.
Local Notation "m =* P" := ((P%sep) m) (at level 70, only parsing) (* experiment*).

Instance spec_of_swap : spec_of "swap" :=
fnspec! "swap" a_addr b_addr / a b R,
Expand Down
2 changes: 1 addition & 1 deletion bedrock2/src/bedrock2Examples/swap_by_add.v
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Require Import coqutil.Tactics.eplace Coq.setoid_ring.Ring_tac.

Section WithParameters.
Context {mem: map.map word32 Byte.byte} {mem_ok: map.ok mem}.
Local Notation "m =* P" := ((P%sep) (m : mem)) (at level 70, only parsing) (* experiment*).
Implicit Types (R : mem -> Prop).

Instance spec_of_swap : spec_of "swap" :=
fnspec! "swap" a_addr b_addr / a b R,
Expand Down
2 changes: 0 additions & 2 deletions bedrock2/src/bedrock2Examples/uint128_32.v
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ Local Ltac invert H := inversion H; clear H.
Section WithParameters.
Context {word: word.word 32} {mem: map.map word Byte.byte}.
Context {word_ok: word.ok word} {mem_ok: map.ok mem}.
Local Notation "m =* P" := ((P%sep) m) (at level 70, only parsing) (* experiment*).
Local Notation "m =*> P" := (exists R, (sep P R) m) (at level 70, only parsing) (* experiment*).
Import ProgramLogic.Coercions.
Local Number Notation nat Nat.of_num_uint Nat.to_num_hex_uint (abstract after 5001) : core_scope.
Local Number Notation nat Nat.of_num_uint Nat.to_num_uint (abstract after 5001) : core_scope.
Expand Down

0 comments on commit 4929e1b

Please sign in to comment.