Module BufferOverrunDomain.Val
type t={itv : Itv.t;Interval
itv_thresholds : ItvThresholds.t;itv_updated_by : ItvUpdatedBy.t;modeled_range : ModeledRange.t;powloc : AbsLoc.PowLoc.t;Simple pointers
arrayblk : ArrayBlk.t;Array blocks
func_ptrs : BO.FuncPtr.Set.t;Function pointers
traces : BufferOverrunTrace.Set.t;}
include Absint.AbstractDomain.S with type t := t
include Absint.AbstractDomain.NoJoin
include IStdlib.PrettyPrintable.PrintableType
val pp : IStdlib.PrettyPrintable.F.formatter -> t -> unit
val bot : tval of_big_int : ItvThresholds.elt -> tval of_c_array_alloc : AbsLoc.Allocsite.t -> stride:int option -> offset:Itv.t -> size:Itv.t -> traces:BufferOverrunTrace.Set.t -> tConstruct C array allocation.
strideis a byte size of cell,offsetis initial offset of pointer which is usually zero, andsizeis a total number of cells.
val of_java_array_alloc : AbsLoc.Allocsite.t -> length:Itv.t -> traces:BufferOverrunTrace.Set.t -> tConstruct Java array allocation.
sizeis a total number of cells
val of_int : int -> tval of_int_lit : IR.IntLit.t -> tval of_itv : ?traces:BufferOverrunTrace.Set.t -> Itv.t -> tval of_literal_string : IR.Typ.IntegerWidths.t -> string -> tval of_loc : ?traces:BufferOverrunTrace.Set.t -> AbsLoc.Loc.t -> tval of_pow_loc : traces:BufferOverrunTrace.Set.t -> AbsLoc.PowLoc.t -> tval of_func_ptrs : BO.FuncPtr.Set.t -> tval unknown_locs : tval unknown_from : IR.Typ.t -> callee_pname:IR.Procname.t option -> location:IBase.Location.t -> tUnknown return value of
callee_pname
val is_bot : t -> boolCheck if the value is bottom
val is_mone : t -> boolCheck if the value is
[-1,-1]
val get_all_locs : t -> AbsLoc.PowLoc.tGet all locations, including pointers and array blocks
val get_array_locs : t -> AbsLoc.PowLoc.tGet locations of array blocks
val get_array_blk : t -> ArrayBlk.tval get_range_of_iterator : t -> tGet a range of an iterator value, for example, if iterator value is
[lb,ub], it returns[0,ub].
val get_itv : t -> Itv.tval get_modeled_range : t -> ModeledRange.tval get_pow_loc : t -> AbsLoc.PowLoc.tval get_func_ptrs : t -> BO.FuncPtr.Set.tval get_traces : t -> BufferOverrunTrace.Set.tval set_array_length : IBase.Location.t -> length:t -> t -> tval set_array_offset : IBase.Location.t -> Itv.t -> t -> tval set_array_stride : Z.t -> t -> tval set_itv_updated_by_addition : t -> tval set_itv_updated_by_multiplication : t -> tval set_itv_updated_by_unknown : t -> tval set_modeled_range : ModeledRange.t -> t -> tval (lnot) : t -> tval neg : t -> tval plus_a : ?f_trace:(BufferOverrunTrace.Set.t -> BufferOverrunTrace.Set.t -> BufferOverrunTrace.Set.t) -> t -> t -> tSemantics of
Binop.PlusA.f_tracemerges traces of the operands. Iff_traceis not given, it uses a default heuristic merge function.
val plus_pi : t -> t -> tval minus_a : ?f_trace:(BufferOverrunTrace.Set.t -> BufferOverrunTrace.Set.t -> BufferOverrunTrace.Set.t) -> t -> t -> tval minus_pi : t -> t -> tval minus_pp : t -> t -> tval mult : ?f_trace:(BufferOverrunTrace.Set.t -> BufferOverrunTrace.Set.t -> BufferOverrunTrace.Set.t) -> t -> t -> tval div : ?f_trace:(BufferOverrunTrace.Set.t -> BufferOverrunTrace.Set.t -> BufferOverrunTrace.Set.t) -> t -> t -> tval mod_sem : ?f_trace:(BufferOverrunTrace.Set.t -> BufferOverrunTrace.Set.t -> BufferOverrunTrace.Set.t) -> t -> t -> tval shiftlt : ?f_trace:(BufferOverrunTrace.Set.t -> BufferOverrunTrace.Set.t -> BufferOverrunTrace.Set.t) -> t -> t -> tval shiftrt : ?f_trace:(BufferOverrunTrace.Set.t -> BufferOverrunTrace.Set.t -> BufferOverrunTrace.Set.t) -> t -> t -> tval lt_sem : t -> t -> tval gt_sem : t -> t -> tval le_sem : t -> t -> tval ge_sem : t -> t -> tval eq_sem : t -> t -> tval ne_sem : t -> t -> tval band_sem : ?f_trace:(BufferOverrunTrace.Set.t -> BufferOverrunTrace.Set.t -> BufferOverrunTrace.Set.t) -> t -> t -> tval land_sem : t -> t -> tval lor_sem : t -> t -> tval unknown_bit : t -> tSemantic function for some bit operators which are hard to express in the domain, e.g.,
Unop.BNot.
val prune_eq : t -> t -> tPruning semantics for
Binop.Eq. This prunes value ofxwhen givenx == y, i.e.,prune_eq x y.
val prune_ne : t -> t -> tPruning semantics for
Binop.Ne. This prunes value ofxwhen givenx != y, i.e.,prune_ne x y.
val prune_lt : t -> t -> tPruning semantics for
Binop.Lt. This prunes value ofxwhen givenx < y, i.e.,prune_lt x y.
val prune_binop : IR.Binop.t -> t -> t -> tPrune value of
xwhen givenx bop y, i.e.,prune_binop bop x y
val add_assign_trace_elem : IBase.Location.t -> AbsLoc.PowLoc.t -> t -> tAdd assign trace for given abstract locations
val cast : IR.Typ.t -> t -> tSemantics of cast. This updates type information in pointer values, rather than re-calculating sizes of array blocks.
val subst : t -> eval_sym_trace -> IBase.Location.t -> tSubstitution of symbols in the value
val transform_array_length : IBase.Location.t -> f:(Itv.t -> Itv.t) -> t -> tApply
fon array lengths in the value
module Itv : sig ... end