Concurrency.StarvationDomainmodule ThreadDomain : sig ... endDomain for thread-type. The main goals are
module Lock : sig ... endAbstract address for a lock. There are two notions of equality:
module AccessExpressionOrConst : sig ... endmodule VarDomain : sig ... endmodule Event : sig ... endmodule AcquisitionElem : sig ... enda lock acquisition with location information
module Acquisition : sig ... endmodule LockState : Absint.AbstractDomain.WithTopmodule Acquisitions : sig ... endA set of lock acquisitions with source locations and procnames.
module CriticalPairElement : sig ... endAn event and the currently-held locks at the time it occurred.
module CriticalPair : sig ... endA CriticalPairElement equipped with a call stack. The intuition is that if we have a critical pair `(locks, event)` in the summary of a method then there is a trace of that method where `event` occurs, and right before it occurs the locks held are exactly `locks` (no over/under approximation). We call it "critical" because the information here alone determines deadlock conditions.
module CriticalPairs :
Absint.AbstractDomain.FiniteSetS with type elt = CriticalPair.tmodule Attribute : sig ... endTracks expression attributes
module AttributeDomain : sig ... endTracks all expressions assigned values of Attribute
module ScheduledWorkItem : sig ... endA record of scheduled parallel work: the method scheduled to run, where, and on what thread.
module ScheduledWorkDomain :
Absint.AbstractDomain.FiniteSetS with type elt = ScheduledWorkItem.tmodule NullLocs :
Absint.AbstractDomain.InvertedSetS
with type elt = Absint.HilExp.AccessExpression.tmodule LazilyInitialized :
Absint.AbstractDomain.FiniteSetS
with type elt = Absint.HilExp.AccessExpression.ttype t = {ignore_blocking_calls : bool;guard_map : GuardToLockMap.t;lock_state : LockState.t;critical_pairs : NullLocsCriticalPairs.t;attributes : AttributeDomain.t;thread : ThreadDomain.t;scheduled_work : ScheduledWorkDomain.t;var_state : VarDomain.t;null_locs : NullLocs.t;lazily_initalized : LazilyInitialized.t;}include Absint.AbstractDomain.S with type t := tinclude Absint.AbstractDomain.Comparable with type t := tinclude IStdlib.PrettyPrintable.PrintableType with type t := tval pp : IStdlib.PrettyPrintable.F.formatter -> t -> unitval initial : tinitial domain state
val acquire :
tenv:IR.Tenv.t ->
t ->
procname:IR.Procname.t ->
loc:IBase.Location.t ->
Lock.t list ->
tsimultaneously acquire a number of locks, no-op if list is empty
val blocking_call : callee:IR.Procname.t -> loc:IBase.Location.t -> t -> tval ipc : callee:IR.Procname.t -> loc:IBase.Location.t -> t -> tval wait_on_monitor :
loc:IBase.Location.t ->
Absint.FormalMap.t ->
Absint.HilExp.t list ->
t ->
tval future_get :
callee:IR.Procname.t ->
loc:IBase.Location.t ->
Absint.HilExp.t list ->
t ->
tval regex_op : callee:IR.Procname.t -> loc:IBase.Location.t -> t -> tval strict_mode_call : callee:IR.Procname.t -> loc:IBase.Location.t -> t -> tval arbitrary_code_execution :
callee:IR.Procname.t ->
loc:IBase.Location.t ->
t ->
tval add_guard :
acquire_now:bool ->
procname:IR.Procname.t ->
loc:IBase.Location.t ->
IR.Tenv.t ->
t ->
Absint.HilExp.t ->
Lock.t ->
tInstall a mapping from the guard expression to the lock provided, and optionally lock it.
val lock_guard :
procname:IR.Procname.t ->
loc:IBase.Location.t ->
IR.Tenv.t ->
t ->
Absint.HilExp.t ->
tAcquire the lock the guard was constructed with.
val remove_guard : t -> Absint.HilExp.t -> tDestroy the guard and release its lock.
val unlock_guard : t -> Absint.HilExp.t -> tRelease the lock the guard was constructed with.
val schedule_work :
IBase.Location.t ->
StarvationModels.scheduler_thread_constraint ->
t ->
IR.Procname.t ->
trecord the fact that a method is scheduled to run on a certain thread/executor
type summary = {critical_pairs : CriticalPairs.t;thread : ThreadDomain.t;scheduled_work : ScheduledWorkDomain.t;lock_state : LockState.t;attributes : AttributeDomain.t;final-state attributes that affect instance variables only
*)return_attribute : Attribute.t;}val empty_summary : summaryval pp_summary : F.formatter -> summary -> unitval integrate_summary :
tenv:IR.Tenv.t ->
procname:IR.Procname.t ->
lhs:Absint.HilExp.AccessExpression.t ->
subst:Lock.subst ->
Absint.FormalMap.t ->
Absint.CallSite.t ->
t ->
summary ->
tapply a callee summary to the current abstract state; lhs is the expression assigned the returned value, if any
val summary_of_astate : IR.Procdesc.t -> t -> summaryval fold_critical_pairs_of_summary :
(CriticalPair.t -> 'a -> 'a) ->
summary ->
'a ->
'aval null_check : Absint.FormalMap.t -> Absint.HilExp.t -> t -> tif expression is a heap location, mark it as null in this branch
val set_non_null :
Absint.FormalMap.t ->
Absint.HilExp.AccessExpression.t ->
t ->
tif expression is a heap location, mark it as set to non-null in this branch