Module StackHeapModel.Heap

Heap is a mapping from locations to values.

include Datatype_sig.MONO_MAP with type key := Location.t and type data := Value.t
type t
include Datatype_sig.PRINTABLE with type t := t
include Datatype_sig.SHOW with type t := t
val pp : Stdlib.Format.formatter -> t -> unit

Output to formatter

val print : ?prefix:string -> t -> unit

Output to stdout.

val show_option : t option -> string
val print_option : ?prefix:string -> t option -> unit
val dump : string -> t -> unit

Dump to file given by filename

Lists of printable values

val show_list : ?separator:string -> t list -> string
val pp_list : Stdlib.Format.formatter -> t list -> unit
val print_list : ?separator:string -> ?prefix:string -> t list -> unit

Copy-pasted signature of classic polymorphic map

val empty : t
val is_empty : t -> bool
val add : Location.t -> Value.t -> t -> t
val mem : Location.t -> t -> bool
val find : Location.t -> t -> Value.t
val iter : (Location.t -> Value.t -> unit) -> t -> unit
val fold : (Location.t -> Value.t -> 'acc -> 'acc) -> t -> 'acc -> 'acc
val union : (Location.t -> Value.t -> Value.t -> Value.t option) -> t -> t -> t
val bindings : t -> (Location.t * Value.t) list
val cardinal : t -> int
val choose : t -> Location.t * Value.t
val filter : (Location.t -> Value.t -> bool) -> t -> t

Additional functions

val keys : t -> Location.t list
val values : t -> Value.t list
val of_list : (Location.t * Value.t) list -> t
val find_pred : (Location.t -> bool) -> t -> Location.t
val show : t -> string
val show_custom : (Location.t -> string) -> (Value.t -> string) -> t -> string
val disjoint_union : t list -> t
val find_field : MemoryModel.Field.t -> Location.t -> t -> Location.t
val to_smtlib : t -> string