Module for Pattern matching.
val get_this_type : InferIR.ProcAttributes.t ‑> InferIR.Typ.t option
Get the this type of a procedure
val get_vararg_type_names : InferIR.Tenv.t ‑> InferIR.Procdesc.Node.t ‑> InferIR.Pvar.t ‑> string list
Get the type names of a variable argument
val method_is_initializer : InferIR.Tenv.t ‑> InferIR.ProcAttributes.t ‑> bool
Check if the method is one of the known initializer methods.
val is_subtype : InferIR.Tenv.t ‑> InferIR.Typ.Name.t ‑> InferIR.Typ.Name.t ‑> bool
Is the type a transitive subtype of the typename?
val is_subtype_of_str : InferIR.Tenv.t ‑> InferIR.Typ.Name.t ‑> string ‑> bool
Resolve typ_str
in tenv
, then check typ
<: typ_str
val supertype_exists : InferIR.Tenv.t ‑> (InferIR.Typ.Name.t ‑> InferIR.Typ.Struct.t ‑> bool) ‑> InferIR.Typ.Name.t ‑> bool
Holds iff the predicate holds on a supertype of the named type, including the type itself
val supertype_find_map_opt : InferIR.Tenv.t ‑> (InferIR.Typ.Name.t ‑> 'a option) ‑> InferIR.Typ.Name.t ‑> 'a option
Return the first non-None result found when applying the given function to supertypes of the named type, including the type itself
val java_get_vararg_values : InferIR.Procdesc.Node.t ‑> InferIR.Pvar.t ‑> InferModules.Idenv.t ‑> InferIR.Exp.t list
Get the values of a vararg parameter given the pvar used to assign the elements.
val proc_calls : (InferIR.Typ.Procname.t ‑> InferIR.ProcAttributes.t option) ‑> InferIR.Procdesc.t ‑> (InferIR.Typ.Procname.t ‑> InferIR.ProcAttributes.t ‑> bool) ‑> (InferIR.Typ.Procname.t * InferIR.ProcAttributes.t) list
Return the callees that satisfy filter
.
val override_find : ?check_current_type:bool ‑> (InferIR.Typ.Procname.t ‑> bool) ‑> InferIR.Tenv.t ‑> InferIR.Typ.Procname.t ‑> InferIR.Typ.Procname.t option
Return a method which overrides procname
and satisfies f
(including procname
itself when check_current_type
is true, which it is by default).
val override_exists : ?check_current_type:bool ‑> (InferIR.Typ.Procname.t ‑> bool) ‑> InferIR.Tenv.t ‑> InferIR.Typ.Procname.t ‑> bool
Return true if applying the given predicate to an override of procname
(including procname
itself when check_current_type
is true, which it is by default) returns true.
val override_iter : (InferIR.Typ.Procname.t ‑> unit) ‑> InferIR.Tenv.t ‑> InferIR.Typ.Procname.t ‑> unit
Apply the given predicate to procname and each override of procname
. For the moment, this only
works for Java
val type_get_annotation : InferIR.Tenv.t ‑> InferIR.Typ.t ‑> InferIR.Annot.Item.t option
val get_fields_nullified : InferIR.Procdesc.t ‑> InferIR.Typ.Fieldname.Set.t
return the set of instance fields that are assigned to a null literal in procdesc
val is_throwable : InferIR.Tenv.t ‑> InferIR.Typ.Name.t ‑> bool
is_throwable tenv class_name
checks if class_name is of type java.lang.Throwable
val is_runtime_exception : InferIR.Tenv.t ‑> InferIR.Typ.Name.t ‑> bool
is_runtime_exception tenv class_name
checks if classname is
of type java.lang.RuntimeException
val check_class_attributes : (InferIR.Annot.Item.t ‑> bool) ‑> InferIR.Tenv.t ‑> InferIR.Typ.Procname.t ‑> bool
tests whether any class attributes (e.g.,
val check_current_class_attributes : (InferIR.Annot.Item.t ‑> bool) ‑> InferIR.Tenv.t ‑> InferIR.Typ.Procname.t ‑> bool
tests whether any class attributes (e.g.,
val find_superclasses_with_attributes : (InferIR.Annot.Item.t ‑> bool) ‑> InferIR.Tenv.t ‑> InferIR.Typ.Name.t ‑> InferIR.Typ.Name.t list
find superclasss with attributes (e.g.,