Module IR.PredSymb
Programs and Types
type mem_kind=|Mmallocmemory allocated with malloc
|Mnewmemory allocated with new
|Mnew_arraymemory allocated with new
|Mobjcmemory allocated with objective-c alloc
type resource=|Rmemory of mem_kind|Rfile|Rignore|Rlockresource that can be allocated
val compare_res_act_kind : res_act_kind -> res_act_kind -> int
val equal_res_act_kind : res_act_kind -> res_act_kind -> bool
type dangling_kind=|DAuninitpointer is dangling because it is uninitialized
|DAaddr_stack_varpointer is dangling because it is the address of a stack variable which went out of scope
|DAminusonepointer is -1
kind of dangling pointers
type path_pos= Procname.t * intposition in a path: proc name, node id
type res_action={ra_kind : res_act_kind;kind of action
ra_res : resource;kind of resource
ra_pname : Procname.t;name of the procedure used to acquire/release the resource
ra_loc : IBase.Location.t;location of the acquire/release
ra_vpath : DecompiledExp.vpath;vpath of the resource value
}acquire/release action on a resource
type t=|Aresource of res_actionresource acquire/release
|Aautorelease|Adangling of dangling_kinddangling pointer
|Aundef of Procname.t * Annot.Item.t * IBase.Location.t * path_pos|Alocked|Aunlocked|Adiv0 of path_posvalue appeared in second argument of division at given path position
|Aobjc_nullattributed exp is null due to a call to a method with given path as null receiver
|Aretval of Procname.t * Annot.Item.tvalue was returned from a call to the given procedure, plus the annots of the return value
|Aobserverdenotes an object registered as an observers to a notification center
|Aunsubscribed_observerdenotes an object unsubscribed from observers of a notification center
|Awont_leakvalue do not participate in memory leak analysis
Attributes are nary function symbols that are applied to expression arguments in Apred and Anpred atomic formulas. Many operations don't make much sense for nullary predicates, and are generally treated as no-ops. The first argument is treated specially, as the "anchor" of the predicate application. For example, adding or removing an attribute uses the anchor to identify the atom to operate on. Also, abstraction and normalization operations treat the anchor specially and maintain more information on it than other arguments. Therefore when attaching an attribute to an expression, that expression should be the first argument, optionally followed by additional related expressions.
val equal : t -> t -> boolval mem_alloc_pname : mem_kind -> Procname.tname of the allocation function for the given memory kind
val mem_dealloc_pname : mem_kind -> Procname.tname of the deallocation function for the given memory kind
type category=|ACresource|ACautorelease|AClock|ACdiv0|ACobjc_null|ACundef|ACretval|ACobserver|ACwontleakCategories of attributes
val equal_category : category -> category -> boolval to_category : t -> categoryReturn the category to which the attribute belongs.
val is_undef : t -> boolval to_string : IStdlib.Pp.env -> t -> stringconvert the attribute to a string
val d_attribute : t -> unitDump an attribute.