Module BO__BufferOverrunDomain.Mem
type 'has_oenv t0=|UnreachableMemory of unreachable node
|ExcRaisedMemory of node that can be reachable only with exception raises that we want to ignore
|Reachable of 'has_oenv MemReach.t0type no_oenv_t= IStdlib.GOption.none t0Memory type without an environment for on-demand symbol evaluation
type t= IStdlib.GOption.some t0Memory type with an environment for on-demand symbol evaluation
include Absint.AbstractDomain.S with type t := t
include Absint.AbstractDomain.NoJoin
include IStdlib.PrettyPrintable.PrintableType
val pp : IStdlib.PrettyPrintable.F.formatter -> t -> unit
type get_summary= IR.Procname.t -> no_oenv_t option
val init : get_summary -> BO.BufferOverrunOndemandEnv.t -> tval exc_raised : tval is_rep_multi_loc : BO.AbsLoc.Loc.t -> _ t0 -> boolCheck if an abstract location represents multiple concrete locations.
val is_stack_loc : BO.AbsLoc.Loc.t -> _ t0 -> boolCheck if an abstract location is a stack variable, e.g.,
n$0.
val set_prune_pairs : PrunePairs.t -> t -> tval set_latest_prune : LatestPrune.t -> t -> tval set_first_idx_of_null : BO.AbsLoc.Loc.t -> Val.t -> t -> tIn C string, set the index of the first null character, i.e., end of string, when called by
set_first_idx_of_null loc_to_string index_value mem.
val unset_first_idx_of_null : BO.AbsLoc.Loc.t -> Val.t -> t -> tIn C string, unset the index of the first null character, i.e., end of string, when called by
unset_first_idx_of_null loc_to_string index_value mem. This is unsound because the index can be assigned asprevious index + 1that is a heuristic to keep string lengths in some loops.
val get_c_strlen : BO.AbsLoc.PowLoc.t -> _ t0 -> Val.tGet C string length that is set/unset by
set_first_idex_of_nullandunset_first_idex_of_null
val get_latest_prune : _ t0 -> LatestPrune.tval get_reachable_locs_from : (IR.Pvar.t * IR.Typ.t) list -> BO.AbsLoc.LocSet.t -> _ t0 -> BO.AbsLoc.LocSet.tGet reachable locations from
formalsandlocswhen calledget_reachable_locs_from formals locs mem
val add_stack : ?represents_multiple_values:bool -> BO.AbsLoc.Loc.t -> Val.t -> t -> tAdd an abstract value for stack variables such as
n$0
val add_stack_loc : BO.AbsLoc.Loc.t -> t -> tval add_heap : ?represents_multiple_values:bool -> BO.AbsLoc.Loc.t -> Val.t -> t -> tAdd an abstract value for non-stack variables
val add_heap_set : ?represents_multiple_values:bool -> BO.AbsLoc.PowLoc.t -> Val.t -> t -> tval add_unknown : (IR.Ident.t * IR.Typ.t) -> location:IBase.Location.t -> t -> tAdd an unknown value for stack variables
val add_unknown_from : (IR.Ident.t * IR.Typ.t) -> callee_pname:IR.Procname.t -> location:IBase.Location.t -> t -> tAdd an unknown return value of
callee_pnamefor stack variables
val remove_temps : IR.Ident.t list -> t -> tRemove given temporary variables from the abstract memory
val find : BO.AbsLoc.Loc.t -> _ t0 -> Val.tval find_opt : BO.AbsLoc.Loc.t -> _ t0 -> Val.t optionval find_set : ?typ:IR.Typ.t -> BO.AbsLoc.PowLoc.t -> _ t0 -> Val.tval find_stack : BO.AbsLoc.Loc.t -> _ t0 -> Val.tval find_alias_id : IR.Ident.t -> _ t0 -> AliasTargets.tFind aliases between given ident
val find_alias_loc : BO.AbsLoc.Loc.t -> _ t0 -> AliasTargets.tFind aliases between given abstract location
val find_simple_alias : IR.Ident.t -> _ t0 -> (BO.AbsLoc.Loc.t * IR.IntLit.t) listFind simple aliases between given ident. It returns a list of pairs of abstract locations and integer which represent aliases
id == x + i.
val find_size_alias : IR.Ident.t -> _ t0 -> (AliasTarget.alias_typ * BO.AbsLoc.Loc.t * IR.IntLit.t * BO.AbsLoc.Loc.t option) listFind size aliases between given ident. It returns a list of four elements, alias type
== or >=, locationx, integeri, java temporary variable$irvar0. This representsid == $irvar0 (== or >=) x.size() + i.
val find_ret_alias : _ t0 -> AliasRet.t Absint.AbstractDomain.Types.bottom_liftedFind aliases bound to the return variable
val fgets_alias : IR.Ident.t -> BO.AbsLoc.PowLoc.t -> t -> tSet
fgetsalias between an ident and an abstract location
val apply_latest_prune : IR.Exp.t -> t -> t * PrunePairs.tApply latest_prunes when given
e : Exp.tis true. It returns pruned memory and pairs of pruned locations and values.
val load_alias : IR.Ident.t -> BO.AbsLoc.Loc.t -> AliasTarget.t -> t -> tAdd an alias between ident and abstract location with given alias target
val load_empty_alias : IR.Ident.t -> BO.AbsLoc.Loc.t -> t -> tAdd an empty alias between ident and abstract location, i.e.,
ident == loc.empty()
val load_simple_alias : IR.Ident.t -> BO.AbsLoc.Loc.t -> t -> tAdd a simple alias between ident and abstract location, i.e.,
ident == loc
val load_size_alias : IR.Ident.t -> BO.AbsLoc.Loc.t -> t -> tAdd a size alias between ident and abstract location, i.e.,
ident == loc.size()
val store_simple_alias : BO.AbsLoc.Loc.t -> IR.Exp.t -> t -> tAdd a simple alias between abstract location and expression, i.e.,
loc == exp
val forget_size_alias : BO.AbsLoc.PowLoc.t -> t -> tForget size aliases of given
locs
val incr_size_alias : BO.AbsLoc.PowLoc.t -> t -> tUpdate size aliases when the size of
locis increased by one. For example if there was an aliasident == loc.size() + i, this changes it toident == loc.size() + i - 1, sinceloc.size()has been increased.
val incr_or_not_size_alias : BO.AbsLoc.PowLoc.t -> t -> tUpdate size aliases when the size of
locmay be increased by one. For example if there was an aliasident == loc.size() + i, this changes it toident >= loc.size() + i - 1
val add_iterator_has_next_alias : IR.Ident.t -> IR.Exp.t -> t -> tAdd an
AliasTarget.IteratorHasNextalias whenident = iterator.hasNext()is called
val add_iterator_next_object_alias : ret_id:IR.Ident.t -> iterator:IR.Ident.t -> t -> tAdd an
AliasTarget.IteratorNextObjectalias whenident = iterator.nextObject()is called
val incr_iterator_simple_alias_on_call : eval_sym_trace -> callee_exit_mem:no_oenv_t -> t -> tUpdate
AliasTarget.IteratorSimplealias at function calls
val add_iterator_alias : IR.Ident.t -> t -> tAdd
AliasTarget.IteratorSimpleandAliasTarget.IteratorOffsetaliases whenIteratable.iterator()is called
val incr_iterator_offset_alias : IR.Exp.t -> t -> tUpdate iterator offset alias when
iterator.next()is called
val update_mem : BO.AbsLoc.PowLoc.t -> Val.t -> t -> tAdd a map from locations to a value. If the given set of locations is a singleton set and the only element represents one concrete abstract location, it does strong update. Otherwise, weak update.
val strong_update : BO.AbsLoc.PowLoc.t -> Val.t -> t -> tval update_latest_prune : updated_locs:BO.AbsLoc.PowLoc.t -> IR.Exp.t -> IR.Exp.t -> t -> tUpdate latest prunes when
store(x,1)orstore(x,0)is called afterassumestatement
val forget_unreachable_locs : formals:(IR.Pvar.t * IR.Typ.t) list -> t -> tForget unreachable locations from
formals
val transform_mem : f:(Val.t -> Val.t) -> BO.AbsLoc.PowLoc.t -> t -> tApply
fto values bound to givenlocs