Module StarvationDomain.Event

Represents the existence of a program path from the current method to the eventual acquisition of a lock or a blocking call. Equality/comparison disregards the call trace but includes location.

type severity_t =
| Low
| Medium
| High
val compare_severity_t : severity_t -> severity_t -> int
type event_t =
| LockAcquire of Lock.t
| MayBlock of string * severity_t
| StrictModeCall of string
val compare_event_t : event_t -> event_t -> int
include ExplicitTrace.TraceElem with type elem_t = event_t
type elem_t = event_t
type t = private {
elem : elem_t;
loc : InferBase.Location.t;
trace : InferIR.CallSite.t list;
}

An elem which occured at loc, after the chain of steps (usually calls) in trace.

Both pp and pp_human simply call the same function on the trace element.

include ExplicitTrace.Element with type Element.t := t
include InferStdlib.PrettyPrintable.PrintableOrderedType
include InferStdlib.IStd.Caml.Set.OrderedType
type t
val compare : t -> t -> int
include InferStdlib.PrettyPrintable.PrintableType with type t := t
type t
val pp : InferStdlib.PrettyPrintable.F.formatter -> t -> unit
val pp_human : Stdlib.Format.formatter -> t -> unit

Pretty printer used for trace construction; pp is used for debug output.

val pp_call : Stdlib.Format.formatter -> InferIR.CallSite.t -> unit
val make : elem_t -> InferBase.Location.t -> t
val map : f:(elem_t -> elem_t) -> t -> t
val get_loc : t -> InferBase.Location.t

Starting location of the trace: this is either loc if trace==[], or the head of trace.

val make_loc_trace : ?⁠nesting:int -> t -> InferIR.Errlog.loc_trace
val with_callsite : t -> InferIR.CallSite.t -> t

Push given callsite onto trace, extending the call chain by one.

module FiniteSet : ExplicitTrace.FiniteSet with type FiniteSet.elt = t

A powerset of traces.

val make_trace : ?⁠header:string -> InferIR.Typ.Procname.t -> t -> InferIR.Errlog.loc_trace