Module InferModules__Attribute

Attribute manipulation in Propositions (i.e., Symbolic Heaps)

val is_pred : InferIR.Sil.atom -> bool

Check whether an atom is used to mark an attribute

val add : InferIR.Tenv.t -> ?⁠footprint:bool -> ?⁠polarity:bool -> InferModules.Prop.normal InferModules.Prop.t -> InferIR.PredSymb.t -> InferIR.Exp.t list -> InferModules.Prop.normal InferModules.Prop.t

Add an attribute associated to the argument expressions

val add_or_replace : InferIR.Tenv.t -> InferModules.Prop.normal InferModules.Prop.t -> InferIR.Sil.atom -> InferModules.Prop.normal InferModules.Prop.t

Replace an attribute associated to the expression

val add_or_replace_check_changed : InferIR.Tenv.t -> (InferIR.PredSymb.t -> InferIR.PredSymb.t -> unit) -> InferModules.Prop.normal InferModules.Prop.t -> InferIR.Sil.atom -> InferModules.Prop.normal InferModules.Prop.t

Replace an attribute associated to the expression, and call the given function with new and old attributes if they changed.

val get_all : 'a InferModules.Prop.t -> InferIR.Sil.atom list

Get all the attributes of the prop

val get_for_exp : InferIR.Tenv.t -> 'a InferModules.Prop.t -> InferIR.Exp.t -> InferIR.Sil.atom list

Get the attributes associated to the expression, if any

val get_objc_null : InferIR.Tenv.t -> 'a InferModules.Prop.t -> InferIR.Exp.t -> InferIR.Sil.atom option

Get the objc null attribute associated to the expression, if any

val get_observer : InferIR.Tenv.t -> 'a InferModules.Prop.t -> InferIR.Exp.t -> InferIR.Sil.atom option

Get the observer attribute associated to the expression, if any

val get_resource : InferIR.Tenv.t -> 'a InferModules.Prop.t -> InferIR.Exp.t -> InferIR.Sil.atom option

Get the resource attribute associated to the expression, if any

val get_undef : InferIR.Tenv.t -> 'a InferModules.Prop.t -> InferIR.Exp.t -> InferIR.Sil.atom option

Get the undef attribute associated to the expression, if any

val get_wontleak : InferIR.Tenv.t -> 'a InferModules.Prop.t -> InferIR.Exp.t -> InferIR.Sil.atom option

Get the wontleak attribute associated to the expression, if any

val has_dangling_uninit : InferIR.Tenv.t -> 'a InferModules.Prop.t -> InferIR.Exp.t -> bool

Test for existence of an Adangling DAuninit attribute associated to the exp

val remove : InferIR.Tenv.t -> InferModules.Prop.normal InferModules.Prop.t -> InferIR.Sil.atom -> InferModules.Prop.normal InferModules.Prop.t

Remove an attribute

val remove_for_attr : InferIR.Tenv.t -> InferModules.Prop.normal InferModules.Prop.t -> InferIR.PredSymb.t -> InferModules.Prop.normal InferModules.Prop.t

Remove all attributes for the given attr

val remove_resource : InferIR.Tenv.t -> InferIR.PredSymb.res_act_kind -> InferIR.PredSymb.resource -> InferModules.Prop.normal InferModules.Prop.t -> InferModules.Prop.normal InferModules.Prop.t

Remove all attributes for the given resource and kind

val map_resource : InferIR.Tenv.t -> InferModules.Prop.normal InferModules.Prop.t -> (InferIR.Exp.t -> InferIR.PredSymb.res_action -> InferIR.PredSymb.res_action) -> InferModules.Prop.normal InferModules.Prop.t

Apply f to every resource attribute in the prop

val replace_objc_null : InferIR.Tenv.t -> InferModules.Prop.normal InferModules.Prop.t -> InferIR.Exp.t -> InferIR.Exp.t -> InferModules.Prop.normal InferModules.Prop.t

replace_objc_null lhs rhs. If rhs has the objc_null attribute, replace the attribute and set the lhs = 0

val nullify_exp_with_objc_null : InferIR.Tenv.t -> InferModules.Prop.normal InferModules.Prop.t -> InferIR.Exp.t -> InferModules.Prop.normal InferModules.Prop.t

For each Var subexp of the argument with an Aobjc_null attribute, remove the attribute and conjoin an equality to zero.

val mark_vars_as_undefined : InferIR.Tenv.t -> InferModules.Prop.normal InferModules.Prop.t -> ret_exp:InferIR.Exp.t -> undefined_actuals_by_ref:InferIR.Exp.t list -> InferIR.Typ.Procname.t -> InferIR.Annot.Item.t -> InferBase.Location.t -> InferIR.PredSymb.path_pos -> InferModules.Prop.normal InferModules.Prop.t

mark Exp.Var's or Exp.Lvar's as undefined

type arith_problem =
| Div0 of InferIR.Exp.t
| UminusUnsigned of InferIR.Exp.t * InferIR.Typ.t

type for arithmetic problems

val find_arithmetic_problem : InferIR.Tenv.t -> InferIR.PredSymb.path_pos -> InferModules.Prop.normal InferModules.Prop.t -> InferIR.Exp.t -> arith_problem option * InferModules.Prop.normal InferModules.Prop.t

Look for an arithmetic problem in exp

val deallocate_stack_vars : InferIR.Tenv.t -> InferModules.Prop.normal InferModules.Prop.t -> InferIR.Pvar.t list -> InferIR.Pvar.t list * InferModules.Prop.normal InferModules.Prop.t

Deallocate the stack variables in pvars, and replace them by normal variables. Return the list of stack variables whose address was still present after deallocation.

val find_equal_formal_path : InferIR.Tenv.t -> InferIR.Exp.t -> 'a InferModules.Prop.t -> InferIR.Exp.t option