val pts_to_not_null (#opened: _) (#t: Type) (#p: pcm t) (r: ref t p) (v: t)
    : STGhost unit opened (pts_to r v) (fun _ -> pts_to r v) True (fun _ -> r =!= null)
let pts_to_not_null
  (#opened: _)
  (#t: Type)
  (#p: pcm t)
  (r: ref t p)
  (v: t)
: STGhost unit opened
    (pts_to r v)
    (fun _ -> pts_to r v)
    True
    (fun _ -> r =!= null)
= extract_fact
    (pts_to r v)
    (r =!= null)
    (fun m -> pts_to_not_null r v m)
val pts_to_not_null (#opened: _) (#t: Type) (#p: pcm t) (r: ref t p) (v: t)
    : STGhost unit opened (pts_to r v) (fun _ -> pts_to r v) True (fun _ -> r =!= null)
let pts_to_not_null (#opened: _) (#t: Type) (#p: pcm t) (r: ref t p) (v: t)
    : STGhost unit opened (pts_to r v) (fun _ -> pts_to r v) True (fun _ -> r =!= null) =
extract_fact (pts_to r v) (r =!= null) (fun m -> pts_to_not_null r v m)
Steel.ST.PCMReference.fsti.checked
Steel.ST.Util.fsti.checked prims.fst.checked FStar.Pervasives.fsti.checked FStar.PCM.fst.checked FStar.Ghost.fsti.checked
Steel.ST.PCMReference.fsti
Steel.Memory.inames FStar.PCM.pcm Steel.Memory.ref Steel.ST.Effect.Ghost.extract_fact Steel.ST.PCMReference.pts_to Prims.l_not Prims.eq2 Steel.Memory.null Steel.Memory.mem Steel.Memory.pts_to_not_null Prims.unit Steel.Effect.Common.vprop Prims.l_True
(*
   Copyright 2020 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.
*)

module Steel.ST.PCMReference

open FStar.PCM
open FStar.Ghost

open Steel.ST.Util

/// This module exposes the core PCM-based memory model defined in Steel.Memory
/// as stateful Steel computations.

#set-options "--ide_id_info_off"

/// Lifting the pts_to separation logic, PCM-indexed predicate to a vprop.
/// Its selector is non-informative (it is unit)
[@@ __steel_reduce__]
unfold
let pts_to (#a:Type) (#pcm:pcm a) (r:ref a pcm) (v:a) = to_vprop (pts_to r v)

let pts_to_not_null
  (#opened: _)
  (#t: Type)
  (#p: pcm t)
  (r: ref t p)
  (v: t)
: STGhost unit opened
    (pts_to r v)
    (fun _ -> pts_to r v)
    True
val pts_to_not_null (#opened: _) (#t: Type) (#p: pcm t) (r: ref t p) (v: t)
    : STGhost unit opened (pts_to r v) (fun _ -> pts_to r v) True (fun _ -> r =!= null)
r: Steel.Memory.ref t p -> v: t -> Steel.ST.Effect.Ghost.STGhost Prims.unit