val is_mm: #a:Type0 -> #rel:preorder a -> mref a rel -> GTot bool
let is_mm #a #rel r = r.mm
val is_mm: #a:Type0 -> #rel:preorder a -> mref a rel -> GTot bool
let is_mm #a #rel r =
r.mm
FStar.Monotonic.Heap.fst.checked
prims.fst.checked FStar.Squash.fsti.checked FStar.Set.fsti.checked FStar.Preorder.fst.checked FStar.Pervasives.Native.fst.checked FStar.Pervasives.fsti.checked FStar.FunctionalExtensionality.fsti.checked FStar.ErasedLogic.fst.checked FStar.Classical.fsti.checked
FStar.Monotonic.Heap.fst
FStar.Preorder.preorder FStar.Monotonic.Heap.mref FStar.Monotonic.Heap.__proj__Mkcore_mref__item__mm Prims.bool
(*
   Copyright 2008-2018 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 FStar.Monotonic.Heap

open FStar.Preorder
open FStar.Classical
module F = FStar.FunctionalExtensionality

private noeq type heap_rec = {
  next_addr: pos;
  memory   : F.restricted_t pos (fun (x:pos) 
             -> option (a:Type0 & rel:(option (preorder a)) & b:bool & a)) 
                      //type, preorder, mm flag, and value
}

let heap = h:heap_rec{(forall (n:nat). n >= h.next_addr ==> None? (h.memory n))}

let equal h1 h2 =
  let _ = () in
  h1.next_addr = h2.next_addr /\
  FStar.FunctionalExtensionality.feq h1.memory h2.memory

let equal_extensional h1 h2 = ()

let emp = {
  next_addr = 1;
  memory    = F.on_dom pos (fun r -> None)
}

let next_addr h = h.next_addr

noeq
type core_mref (a:Type0) : Type0 = {
  addr: (x: nat { x > 0 } );
  init: a;
  mm:   bool;  //manually managed flag
}

let addr_of #a #rel r = r.addr
val is_mm: #a:Type0 -> #rel:preorder a -> mref a rel -> GTot bool
r: FStar.Monotonic.Heap.mref a rel -> Prims.GTot Prims.bool