Module type Memory_sig.Memory_Queries

type memory
type address
val should_focus : size:int -> Context.t -> memory -> address -> (address * int * int) option

should_focus ~size ctx mem addr asks the domain whether it is useful to "focus" (or "unfold", i.e. try to represent precisely the memory region pointed to by addr, as long as aliasing info ensures that it is sound) a loaded value. If the answer is yes, then the returned value should contain three things about the region to focus: its base, its size and the offset of addr in it.

val may_alias : ptr_size:int -> Context.t -> size1:int -> size2:int -> address -> address -> bool

may_alias ~ptr_size ~size1 ~size2 ctx addr1 addr2 should return whether the region starting at addr1 of size size1 and the region starting at addr2 of size size2 may have a non-empty intersection. This function is used by focusing abstractions to discard a focused region when writing in a possibly aliased address. ptr_size is only the size of bath addr1 and addr2.