From d8f499d50c0e3a0fc07ce53dfcc91a4839da41ce Mon Sep 17 00:00:00 2001 From: Robbert Krebbers <mail@robbertkrebbers.nl> Date: Tue, 19 Apr 2016 12:44:19 +0200 Subject: [PATCH] =?UTF-8?q?Overload=20=E2=8A=A5=20in=20uPred=5Fscope.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- algebra/upred.v | 1 + heap_lang/lib/lock.v | 4 ++-- heap_lang/lib/spawn.v | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/algebra/upred.v b/algebra/upred.v index 8f53aca1e..e0a9e313f 100644 --- a/algebra/upred.v +++ b/algebra/upred.v @@ -276,6 +276,7 @@ Notation "(⊣⊢)" := (equiv (A:=uPred _)) (only parsing) : C_scope. Notation "■φ" := (uPred_const φ%C%type) (at level 20, right associativity) : uPred_scope. Notation "x = y" := (uPred_const (x%C%type = y%C%type)) : uPred_scope. +Notation "x ⊥ y" := (uPred_const (x%C%type ⊥ y%C%type)) : uPred_scope. Notation "'False'" := (uPred_const False) : uPred_scope. Notation "'True'" := (uPred_const True) : uPred_scope. Infix "∧" := uPred_and : uPred_scope. diff --git a/heap_lang/lib/lock.v b/heap_lang/lib/lock.v index a74e0ad5f..9de604041 100644 --- a/heap_lang/lib/lock.v +++ b/heap_lang/lib/lock.v @@ -24,10 +24,10 @@ Definition lock_inv (γ : gname) (l : loc) (R : iProp) : iProp := (∃ b : bool, l ↦ #b ★ if b then True else own γ (Excl ()) ★ R)%I. Definition is_lock (l : loc) (R : iProp) : iProp := - (∃ N γ, ■(heapN ⊥ N) ∧ heap_ctx heapN ∧ inv N (lock_inv γ l R))%I. + (∃ N γ, heapN ⊥ N ∧ heap_ctx heapN ∧ inv N (lock_inv γ l R))%I. Definition locked (l : loc) (R : iProp) : iProp := - (∃ N γ, ■(heapN ⊥ N) ∧ heap_ctx heapN ∧ + (∃ N γ, heapN ⊥ N ∧ heap_ctx heapN ∧ inv N (lock_inv γ l R) ∧ own γ (Excl ()))%I. Global Instance lock_inv_ne n γ l : Proper (dist n ==> dist n) (lock_inv γ l). diff --git a/heap_lang/lib/spawn.v b/heap_lang/lib/spawn.v index 52208d3af..5172ea364 100644 --- a/heap_lang/lib/spawn.v +++ b/heap_lang/lib/spawn.v @@ -37,8 +37,8 @@ Definition spawn_inv (γ : gname) (l : loc) (Ψ : val → iProp) : iProp := ∃ v, lv = InjRV v ★ (Ψ v ∨ own γ (Excl ()))))%I. Definition join_handle (l : loc) (Ψ : val → iProp) : iProp := - (■(heapN ⊥ N) ★ ∃ γ, heap_ctx heapN ★ own γ (Excl ()) ★ - inv N (spawn_inv γ l Ψ))%I. + (heapN ⊥ N ★ ∃ γ, heap_ctx heapN ★ own γ (Excl ()) ★ + inv N (spawn_inv γ l Ψ))%I. Typeclasses Opaque join_handle. -- GitLab