Module Locations.Location_Bytes

module Location_Bytes: sig .. end
Association between varids and offsets in byte.
Consult the Plugin Development Guide for additional details.

module M: sig .. end
type z = 
| Top of Base.SetLattice.t * Origin.t
| Map of M.t
include Lattice_type.AI_Lattice_with_cardinal_one
Those locations have a lattice structure, including standard operations such as join, narrow, etc.
include Lattice_type.With_Error_Top
val singleton_zero : t
the set containing only the value for to the C expression 0
val singleton_one : t
the set containing only the value 1
val zero_or_one : t
val is_zero : t -> bool
val is_bottom : t -> bool
val top_int : t
val top_float : t
val top_single_precision_float : t
val inject : Base.t -> Ival.t -> t
val inject_ival : Ival.t -> t
val inject_float : Ival.F.t -> t
val add_or_bottom : Base.t ->
Ival.t -> M.t -> M.t
Non directly lattice-related operations
val diff : t -> t -> t
Over-approximation of difference. arg2 needs to be exact or an under_approximation.
val diff_if_one : t -> t -> t
Over-approximation of difference. arg2 can be an over-approximation.
val shift : Ival.t -> t -> t
val topify_arith_origin : t -> t
Topifying of values, in case of imprecise accesses
val topify_misaligned_read_origin : t -> t
val topify_merge_origin : t -> t
val topify_leaf_origin : t -> t
val topify_with_origin : Origin.t -> t -> t
val topify_with_origin_kind : Origin.kind -> t -> t
val inject_top_origin : Origin.t -> Base.SetLattice.O.t -> t
inject_top_origin origin p creates a top with origin origin and additional information param
val top_with_origin : Origin.t -> t
Completely imprecise value. Use only as last resort.
val fold_bases : (Base.t -> 'a -> 'a) -> t -> 'a -> 'a
Fold on all the bases of the location, including Top bases.
Raises Error_Top in the case Top Top.
val fold_i : (Base.t -> Ival.t -> 'a -> 'a) -> t -> 'a -> 'a
Fold with offsets.
Raises Error_Top in the cases Top Top, Top bases.
val fold_topset_ok : (Base.t -> Ival.t -> 'a -> 'a) -> t -> 'a -> 'a
Fold with offsets, including in the case Top bases. In this case, Ival.top is supplied to the iterator.
Raises Error_Top in the case Top Top.
val cached_fold : cache_name:string ->
temporary:bool ->
f:(Base.t -> Ival.t -> 'a) ->
projection:(Base.t -> Ival.t) ->
joiner:('a -> 'a -> 'a) -> empty:'a -> t -> 'a
Cached version of fold_i, for advanced users
val cardinal_zero_or_one : t -> bool
Number of locations
val cardinal_less_than : t -> int -> int
val cardinal : t -> Integer.t option
None if the cardinal is unbounded
val find_lonely_binding : t -> Base.t * Ival.t
val find_lonely_key : t -> Base.t * Ival.t
val fold_enum : (t -> 'a -> 'a) -> t -> 'a -> 'a
val find_or_bottom : Base.t -> M.t -> Ival.t
Destructuring
val split : Base.t -> t -> Ival.t * t
val get_bases : t -> Base.SetLattice.t
Returns the bases the location may point too. Never fail, but may return Base.SetLattice.Top.

Local variables inside locations
val contains_addresses_of_locals : (M.key -> bool) -> t -> bool
contains_addresses_of_locals is_local loc returns true if loc contains the adress of a variable for which is_local returns true
val remove_escaping_locals : (M.key -> bool) -> t -> Base.SetLattice.t * t
TODO: merge with above function remove_escaping_locals is_local v removes from v information associated with bases for which is_local returns true.
val contains_addresses_of_any_locals : t -> bool
contains_addresses_of_any_locals loc returns true iff loc contains the adress of a local variable or of a formal variable.

Other
val iter_on_strings : skip:Base.t option -> (Base.t -> string -> int -> int -> unit) -> t -> unit
val partially_overlaps : size:Abstract_interp.Int.t -> t -> t -> bool
Is there a possibly-non empty intersection between the two supplied locations, assuming they have size size
val is_relationable : t -> bool
val may_reach : Base.t -> t -> bool
may_reach base loc is true if base might be accessed from loc.