Module InferModules.ConcurrencyModels
type lock_effect=|Lock of InferIR.HilExp.t listsimultaneously acquire a list of locks
|Unlock of InferIR.HilExp.t listsimultaneously release a list of locks
|LockedIfTrue of InferIR.HilExp.t listsimultaneously attempt to acquire a list of locks
|GuardConstruct of{guard : InferIR.HilExp.t;lock : InferIR.HilExp.t;acquire_now : bool;}mutex guard construction - clang only
|GuardLock of InferIR.HilExp.tlock underlying mutex via guard - clang only
|GuardLockedIfTrue of InferIR.HilExp.tlock underlying mutex if true via guard - clang only
|GuardUnlock of InferIR.HilExp.tunlock underlying mutex via guard - clang only
|GuardDestroy of InferIR.HilExp.tdestroy guard and unlock underlying mutex - clang only
|NoEffectfunction call has no lock-relevant effect
effect of call plus Hil expressions being un/locked, if known
val is_thread_utils_method : string -> InferIR.Typ.Procname.t -> boolreturn true if the given method name is a utility class for checking what thread we're on TODO: clean this up so it takes only a procname
val get_lock_effect : InferIR.Typ.Procname.t -> InferIR.HilExp.t list -> lock_effectdescribe how this procedure behaves with respect to locking
val get_thread : InferIR.Typ.Procname.t -> threaddescribe how this procedure behaves with respect to thread access
val runs_on_ui_thread : attrs_of_pname:(InferIR.Typ.Procname.t -> InferIR.ProcAttributes.t option) -> InferIR.Tenv.t -> InferIR.Procdesc.t -> string optionWe don't want to warn on methods that run on the UI thread because they should always be single-threaded. Assume that methods annotated with @UiThread, @OnEvent, @OnBind, @OnMount, @OnUnbind, @OnUnmount always run on the UI thread. Also assume that any superclass marked @UiThread implies all methods are on UI thread. Return Some string explaining why this method is on the UI thread, else return None.
val get_current_class_and_annotated_superclasses : (InferIR.Annot.Item.t -> bool) -> InferIR.Tenv.t -> InferIR.Typ.Procname.t -> (InferIR.Typ.name * InferIR.Typ.name list) optionval find_method_or_override_annotated : attrs_of_pname:(InferIR.Typ.Procname.t -> InferIR.ProcAttributes.t option) -> (InferIR.Annot.Item.t -> bool) -> InferIR.Typ.Procname.t -> InferIR.Tenv.t -> InferIR.Typ.Procname.t InferStdlib.IStd.sexp_optionval cpp_lock_types_matcher : InferIR.QualifiedCppName.Match.quals_matcherval is_recursive_lock_type : InferIR.Typ.name -> bool