val lock_inv (r: ref bool) (v: vprop) : vprop
let lock_inv (r:ref bool) (v:vprop) : vprop = exists_ (lock_inv_pred r v)
val lock_inv (r: ref bool) (v: vprop) : vprop
let lock_inv (r: ref bool) (v: vprop) : vprop =
exists_ (lock_inv_pred r v)
Steel.ST.CancellableSpinLock.fst.checked
Steel.ST.Util.fsti.checked Steel.ST.SpinLock.fsti.checked Steel.ST.Reference.fsti.checked Steel.ST.Effect.fsti.checked Steel.FractionalPermission.fst.checked prims.fst.checked FStar.Pervasives.fsti.checked FStar.Ghost.fsti.checked
Steel.ST.CancellableSpinLock.fst
Steel.ST.Reference.ref Prims.bool Steel.Effect.Common.vprop Steel.ST.Util.exists_ Steel.ST.CancellableSpinLock.lock_inv_pred
(*
   Copyright 2021 Microsoft Research

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.

   Author: Aseem Rastogi
*)

module Steel.ST.CancellableSpinLock

open Steel.ST.Effect
open Steel.ST.Util
open Steel.FractionalPermission
open Steel.ST.Reference
open Steel.ST.SpinLock

module G = FStar.Ghost

[@@__reduce__]
let lock_inv_pred (r:ref bool) (v:vprop) : bool -> vprop =
  fun b -> pts_to r full_perm b `star` (if b then v else emp)
val lock_inv (r: ref bool) (v: vprop) : vprop
r: Steel.ST.Reference.ref Prims.bool -> v: Steel.Effect.Common.vprop -> Steel.Effect.Common.vprop