This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
<!DOCTYPE html>
<htmlxmlns="http://www.w3.org/1999/xhtml"><head><title>Concurrency__StarvationDomain (infer.Concurrency__StarvationDomain)</title><linkrel="stylesheet"href="../../odoc.css"/><metacharset="utf-8"/><metaname="generator"content="odoc 1.5.0"/><metaname="viewport"content="width=device-width,initial-scale=1.0"/><scriptsrc="../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><divclass="content"><header><nav><ahref="../index.html">Up</a>–<ahref="../index.html">infer</a>» Concurrency__StarvationDomain</nav><h1>Module <code>Concurrency__StarvationDomain</code></h1></header><divclass="spec module"id="module-F"><ahref="#module-F"class="anchor"></a><code><spanclass="keyword">module</span> F = Stdlib.Format</code></div><dl><dtclass="spec module"id="module-ThreadDomain"><ahref="#module-ThreadDomain"class="anchor"></a><code><spanclass="keyword">module</span><ahref="ThreadDomain/index.html">ThreadDomain</a> : <spanclass="keyword">sig</span> ... <spanclass="keyword">end</span></code></dt><dd><p>Domain for thread-type. The main goals are</p></dd></dl><dl><dtclass="spec module"id="module-Lock"><ahref="#module-Lock"class="anchor"></a><code><spanclass="keyword">module</span><ahref="Lock/index.html">Lock</a> : <spanclass="keyword">sig</span> ... <spanclass="keyword">end</span></code></dt><dd><p>Abstract address for a lock. There are two notions of equality:</p></dd></dl><divclass="spec module"id="module-Event"><ahref="#module-Event"class="anchor"></a><code><spanclass="keyword">module</span><ahref="Event/index.html">Event</a> : <spanclass="keyword">sig</span> ... <spanclass="keyword">end</span></code></div><divclass="spec module"id="module-LockState"><ahref="#module-LockState"class="anchor"></a><code><spanclass="keyword">module</span><ahref="LockState/index.html">LockState</a> : <ahref="../Absint/AbstractDomain/index.html#module-type-WithTop">Absint.AbstractDomain.WithTop</a></code></div><dl><dtclass="spec module"id="module-Acquisition"><ahref="#module-Acquisition"class="anchor"></a><code><spanclass="keyword">module</span><ahref="Acquisition/index.html">Acquisition</a> : <spanclass="keyword">sig</span> ... <spanclass="keyword">end</span></code></dt><dd><p>a lock acquisition with location information</p></dd></dl><dl><dtclass="spec module"id="module-Acquisitions"><ahref="#module-Acquisitions"class="anchor"></a><code><spanclass="keyword">module</span><ahref="Acquisitions/index.html">Acquisitions</a> : <spanclass="keyword">sig</span> ... <spanclass="keyword">end</span></code></dt><dd><p>A set of lock acquisitions with source locations and procnames.</p></dd></dl><dl><dtclass="spec module"id="module-CriticalPairElement"><ahref="#module-CriticalPairElement"class="anchor"></a><code><spanclass="keyword">module</span><ahref="CriticalPairElement/index.html">CriticalPairElement</a> : <spanclass="keyword">sig</span> ... <spanclass="keyword">end</span></code></dt><dd><p>An event and the currently-held locks at the time it occurred.</p></dd></dl><dl><dtclass="spec module"id="module-CriticalPair"><ahref="#module-CriticalPair"class="anchor"></a><code><spanclass="keyword">module</span><ahref="CriticalPair/index.html">CriticalPair</a> : <spanclass="keyword">sig</span> ... <spanclass="keyword">end</span></code></dt><dd><p>A <code>CriticalPairElement</code> 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.</p></dd></dl><divclass="spec module"id="module-CriticalPairs"><ahref="#module-CriticalPairs"class="anchor"></a><code><spanclass="keyword">module</span> CriticalPairs : <ahref="../Absint/AbstractDomain/index.html#module-type-FiniteSetS">Absint.AbstractDomain.FiniteSetS</a><spanclass="keyword">with</span><spanclass="keyword">type</span><ahref="../Absint/AbstractDomain/index.html#module-type-FiniteSetS">FiniteSetS</a>.elt = <ahref="CriticalPair/index.html#type-t">CriticalPair.t</a></code></div><divclass="spec module"id="module-GuardToLockMap"><ahref="#module-GuardToLockMap"class="anchor"></a><code><spanclass="keyword">module</span><ahref="GuardToLockMap/index.html">GuardToLockMap</a> : <ahref="../Absint/AbstractDomain/index.html#module-type-WithTop">Absint.AbstractDomain.WithTop</a></code></div><dl><dtclass="spec module"id="module-Attribute"><ahref="#module-Attribute"class="anchor"></a><code><spanclass="keyword">module</span><ahref="Attribute/index.html">Attribute</a> : <spanclass="keyword">sig</span> ... <spanclass="keyword">end</span></code></dt><dd><p>Tracks expression attributes</p></dd></dl><dl><dtclass="spec module"id="module-AttributeDomain"><ahref="#module-AttributeDomain"class="anchor"></a><code><spanclass="keyword">module</span><ahref="AttributeDomain/index.html">AttributeDomain</a> : <spanclass="keyword">sig</span> ... <spanclass="keyword">end</span></code></dt><dd><p>Tracks all expressions assigned values of <code>Attribute</code></p></dd></dl><dl><dtclass="spec module"id="module-ScheduledWorkItem"><ahref="#module-ScheduledWorkItem"class="anchor"></a><code><spanclass="keyword">module</span><ahref="ScheduledWorkItem/index.html">ScheduledWorkItem</a> : <spanclass="keyword">sig</span> ... <spanclass="keyword">end</span></code></dt><dd><p>A record of scheduled parallel work: the method scheduled to run, where, and on what thread.</p></dd></dl><divclass="spec module"id="module-ScheduledWorkDomain"><ahref="#module-ScheduledWorkDomain"class="anchor"></a><code><spanclass="keyword">module</span> ScheduledWorkDomain : <ahref="../Absint/AbstractDomain/index.html#module-type-FiniteSetS">Absint.AbstractDomain.FiniteSetS</a><spanclass="keyword">with</span><spanclass="keyword">type</span><ahref="../Absint/AbstractDomain/index.html#module-type-FiniteSetS">FiniteSetS</a>.elt = <ahref="ScheduledWorkItem/index.html#type-t">ScheduledWorkItem.t</a></code></div><dl><dtclass="spec type"id="type-t"><ahref="#type-t"class="anchor"></a><code><spanclass="keyword">type</span> t</code><code> = </code><code>{</code><tableclass="record"><trid="type-t.guard_map"class="anchored"><tdclass="def field"><ahref="#type-t.guard_map"class="anchor"></a><code>guard_map : <ahref="GuardToLockMap/index.html#type-t">GuardToLockMap.t</a>;</code></td></tr><trid="type-t.lock_state"class="anchored"><tdclass="def field"><ahref="#type-t.lock_state"class="anchor"></a><code>lock_state : <ahref="LockState/index.html#type-t">LockState.t</a>;</code></td></tr><trid="type-t.critical_pairs"class="anchored"><tdclass="def field"><ahref="#type-t.critical_pairs"class="anchor"></a><code>critical_pairs : <ahref="index.html#module-CriticalPairs">CriticalPairs</a>.t;</code></td></tr><trid="type-t.attributes"class="anchored"><tdclass="def field"><ahref="#type-t.attributes"class="anchor"></a><code>attributes : <ahref="AttributeDomain/index.html#type-t">AttributeDomain.t</a>;</code></td></tr><trid="type-t.thread"class="anchored"><tdclass="def field"><ahref="#type-t.thread"class="anchor"></a><code>thread : <ahref="ThreadDomain/index.html#type-t">ThreadDomain.t</a>;</code></td></tr><trid="type-t.scheduled_work"class="anchored"><tdclass="def field"><ahref="#type-t.scheduled_work"class="anchor"></a><code>scheduled_work : <ahref="index.html#module-ScheduledWorkDomain">ScheduledWorkDomain</a>.t;</code></td></tr></table><code>}</code></dt></dl><div><divclass="spec include"><divclass="doc"><detailsopen="open"><summary><spanclass="def"><code><spanclass="keyword">include</span><ahref="../Absint/AbstractDomain/index.html#module-type-WithBottom">Absint.AbstractDomain.WithBottom</a><spanclass="keyword">with</span><spanclass="keyword">type</span><ahref="../Absint/AbstractDomain/module-type-WithBottom/index.html#type-t">t</a> := <ahref="index.html#type-t">t</a></code></span></summary><div><divclass="spec include"><divclass="doc"><detailsopen="open"><summary><spanclass="def"><code><spanclass="keyword">include</span><ahref="../Absint/AbstractDomain/index.html#module-type-S">Absint.AbstractDomain.S</a></code></span></summary><div><divclass="spec include"><divclass="doc"><detailsopen="open"><summary><spanclass="def"><code><spanclass="keyword">include</span><ahref="../Absint/AbstractDomain/index.html#module-type-NoJoin">Absint.AbstractDomain.NoJoin</a></code></span></summary><div><divclass="spec include"><divclass="doc"><detailsopen="open"><summary><spanclass="def"><code><spanclass="keyword">include</span><ahref="../IStdlib/PrettyPrintable/index.html#module-type-PrintableType">IStdlib.PrettyPrintable.PrintableType</a></code></span></summary><dl><dtclass="spec type"id="type-t"><ahref="#type-t"class="anchor"></a><code><spanclass="keyword">type</span> t</code></dt></dl><dl><dtclass="spec value"id="val-pp"><ahref="#val-pp"class="anchor"></a><code><spanclass="keyword">val</span> pp : <ahref="../IStdlib/PrettyPrintable/index.html#module-F">IStdlib.PrettyPrintable.F</a>.formatter <span>-></span><ahref="index.html#type-t">t</a><span>-></span> unit</code></dt></dl></details></div></div></div><dl><dtclass="spec value"id="val-leq"><ahref="#val-leq"class="anchor"></a><code><spanclass="keyword">val</span> leq : <span>lhs:<ahref="index.html#type-t">t</a></span><span>-></span><span>rhs:<ahref="index.html#type-t">t</a></span><span>-></span> bool</code></dt><dd><p>the implication relation: <code>lhs <= rhs</code> means <code>lhs |- rhs</code></p></dd></dl></details></div></div></div><dl><dtclass="spec value"id="val-join"><ahref="#val-join"class="anchor"></a><code><spanclass="keyword">val</span> join : <ahref="index.html#type-t">t</a><span>-></span><ahref="index.html#type-t">t</a><span>-></span><ahref="index.html#type-t">t</a></code></dt><dtclass="spec value"id="val-widen"><ahref="#val-widen"class="anchor"></a><code><spanclass="keyword">val</span> widen : <span>prev:<ahref="index.html#type-t">t</a></span><span>-></span><span>next:<ahref="index.html#type-t">t</a></span><span>-></span><span>num_iters:int</span><span>-></span><ahref="index.html#type-t">t</a></code></dt></dl></details></div></div></div><dl><dtclass="spec value"id="val-bottom"><ahref="#val-bottom"class="anchor"></a><code><spanclass="keyword">val</span> bottom : <ahref="index.html#type-t">t</a></code></dt><dd><p>The bottom value of the domain.</p></dd></dl><dl><dtclass="spec value"id="val-is_bottom"><ahref="#val-is_bottom"class="anchor"></a><code><spanclass="keyword">val</span> is_bottom : <ahref="index.html#type-t">t</a><span>-></span> bool</code></dt><dd><p>Return true if this is the bottom value</p></dd></dl></details></div></div></div><dl><dtclass="spec value"id="val-acquire"><ahref="#val-acquire"class="anchor"></a><code><spanclass="keyword">val</span> acquire : <span>?⁠tenv:<ahref="../IR/Tenv/index.html#type-t">IR.Tenv.t</a></span><span>-></span><ahref="index.html#type-t">t</a><span>-></span><span>procname:<ahref="../IR/Procname/index.html#type-t">IR.Procname.t</a></span><span>-></span><span>loc:<ahref="../IBase/Location/index.html#type-t">IBase.Location.t</a></span><span>-></span><span><ahref="index.html#module-Lock">Lock</a>.t list</span><span>-></span><ahref="index.html#type-t">t</a></code></dt><dd><p>simultaneously acquire a number of locks, no-op if list is empty</p></dd></dl><dl><dtclass="spec value"id="val-release"><ahref="#val-release"class="anchor"></a><code><spanclass="keyword">val</span> release : <ahref="index.html#type-t">t</a><span>-></span><span><ahref="index.html#module-Lock">Lock</a>.t list</span><span>-></span><ahref="index.html#type-t">t</a></code></dt><dd><p>simultaneously release a number of locks, no-op if list is empty</p></dd></dl><dl><dtclass="spec value"id="val-blocking_call"><ahref="#val-blocking_call"class="anchor"></a><code><spanclass="keyword">val</span> blocking_call : <span>callee:<ahref="../IR/Procname/index.html#type-t">IR.Procname.t</a></span><span>-></span><ahref="../Concurrency/StarvationModels/index.html#type-severity">Concurrency.StarvationModels.severity</a><span>-></span><span>loc:<ahref="../IBase/Location/index.html#type-t">IBase.Location.t</a></span><span>-></span><ahref="index.html#type-t">t</a><span>-></span><ahref="index.html#type-t">t</a></code></dt><dtclass="spec value"id="val-wait_on_monitor"><ahref="#val-wait_on_monitor"class="anchor"></a><code><spanclass="keyword">val</span> wait_on_monitor : <span>loc:<ahref="../IBase/Location/index.html#type-t">IBase.Location.t</a></span><span>-></span><ahref="../Absint/FormalMap/index.html#type-t">Absint.FormalMap.t</a><span>-></span><span><ahref="../IR/HilExp/index.html#type-t">IR.HilExp.t</a> list</span><span>-></span><ahref="index.html#type-t">t</a><span>-></span><ahref="index.html#type-t">t</a></code></dt><dtclass="spec value"id="val-future_get"><ahref="#val-future_get"class="anchor"></a><code><spanclass="keyword">val</span> future_get : <span>callee:<ahref="../IR/Procname/index.html#type-t">IR.Procname.t</a></span><span>-></span><span>loc:<ahref="../IBase/Location/index.html#type-t">IBase.Location.t</a></span><span>-></span><span><ahref="../IR/HilExp/index.html#type-t">IR.HilExp.t</a> list</span><span>-></span><ahref="index.html#type-t">t</a><span>-></span><ahref="index.html#type-t">t</a></code></dt><dtclass="spec value"id="val-strict_mode_call"><ahref="#val-strict_mode_call"class="anchor"></a><code><spanclass="keyword">val</span> strict_mode_call : <span>callee:<ahref="../IR/Procname/index.html#type-t">IR.Procname.t</a></span><span>-></span><span>loc:<ahref="../IBase/Location/index.html#type-t">IBase.Location.t</a></span><span>-></span><ahref="index.html#type-t">t</a><span>-></span><ahref="index.html#type-t">t</a></code></dt><dtclass="spec value"id="val-add_guard"><ahref="#val-add_guard"class="anchor"></a><code><spanclass="keyword">val</span> add_guard : <span>acquire_now:bool</span><span>-></span><span>procname:<ahref="../IR/Procname/index.html#type-t">IR.Procname.t</a></span><span>-></span><span>loc:<ahref="../IBase/Location/index.html#type-t">IBase.Location.t</a></span><span>-></span><ahref="../IR/Tenv/index.html#type-t">IR.Tenv.t</a><span>-></span><ahref="index.html#type-t">t</a><span>-></span><ahref="../IR/HilExp/index.html#type-t">IR.HilExp.t</a><span>-></span><ahref="index.html#module-Lock">Lock</a>.t <span>-></span><ahref="index.html#type-t">t</a></code></dt><dd><p>Install a mapping from the guard expression to the lock provided, and optionally lock it.</p></dd></dl><dl><dtclass="spec value"id="val-lock_guard"><ahref="#val-lock_guard"class="anchor"></a><code><spanclass="keyword">val</span> lock_guard : <span>procname:<ahref="../IR/Procname/index.html#type-t">IR.Procname.t</a></span><span>-></span><span>loc:<ahref="../IBase/Location/index.html#type-t">IBase.Location.t</a></span><span>-></span><ahref="../IR/Tenv/index.html#type-t">IR.Tenv.t</a><span>-></span><ahref="index.html#type-t">t</a><span>-></span><ahref="../IR/HilExp/index.html#type-t">IR.HilExp.t</a><span>-></span><ahref="index.html#type-t">t</a></code></dt><dd><p>Acquire the lock the guard was constructed with.</p></dd></dl><dl><dtclass="spec value"id="val-remove_guard"><ahref="#val-remove_guard"class="anchor"></a><code><spanclass="keyword">val</span> remove_guard : <ahref="index.html#type-t">t</a><span>-></span><ahref="../IR/HilExp/index.html#type-t">IR.HilExp.t</a><span>-></span><ahref="index.html#type-t">t</a></code></dt><dd><p>Destroy the guard and release its lock.</p></dd></dl><dl><dtclass="spec value"id="val-unlock_guard"><ahref="#val-unlock_guard"class="anchor"></a><code><spanclass="keyword">val</span> unlock_guard : <ahref="index.html#type-t">t</a><span>-></span><ahref="../IR/HilExp/index.html#type-t">IR.HilExp.t</a><span>-></span><ahref="index.html#type-t">t</a></code></dt><dd><p>Release the lock the guard was constructed with.</p></dd></dl><dl><dtclass="spec value"id="val-schedule_work"><ahref="#val-schedule_work"class="anchor"></a><code><spanclass="keyword">val</span> schedule_work : <ahref="../IBase/Location/index.html#type-t">IBase.Location.t</a><span>-></span><ahref="../Concurrency/StarvationModels/index.html#type-scheduler_thread_constraint">Concurrency.StarvationModels.scheduler_thread_constraint</a><span>-></span><ahref="index.html#type-t">t</a><span>-></span><ahref="../IR/Procname/index.html#type-t">IR.Procname.t</a><span>-></span><ahref="index.html#type-t">t</a></code></dt><dd><p>record the fact that a method is scheduled to run on a certain thread/executor</p></dd></dl><dl><dtclass="spec type"id="type-summary"><ahref="#type-summary"class="anchor"></a><code><spanclass="keyword">type</span> summary</code><code> = </code><code>{</code><tableclass="record"><trid="type-summary.critical_pairs"class="anchored"><tdclass="def field"><ahref="#type-summary.critical_pairs"class="anchor"></a><code>critical_pairs : <ahref="index.html#module-CriticalPairs">CriticalPairs</a>.t;</code></td></tr><trid="type-summary.thread"class="anchored"><tdclass="def field"><ahref="#type-summary.thread"class="anchor"></a><code>thread : <ahref="ThreadDomain/index.html#type-t">ThreadDomain.t</a>;</code></td></tr><trid="type-summary.scheduled_work"class="anchored"><tdclass="def field"><ahref="#type-summary.scheduled_work"class="anchor"></a><code>scheduled_work : <ahref="index.html#module-ScheduledWorkDomain">ScheduledWorkDomain</a>.t;</code></td></tr><trid="type-summary.attributes"class="anchored"><tdclass="def field"><ahref="#type-summary.attributes"class="anchor"></a><code>attributes : <ahref="AttributeDomain/index.html#type-t">AttributeDomain.t</a>;</code></td><tdclass="doc"><p>final-state attributes that affect instance variables only</p></td></tr><trid="type-summary.return_attribute"class="anchored"><tdclass="def field"><ahref="#type-summary.return_attribute"class="anchor"></a><code>return_attribute : <ahref="Attribute/index.html#type-t">Attribute.t</a>;</code></td></tr></table><code>}</code></dt></dl><dl><dtclass="spec value"id="val-empty_summary"><ahref="#val-empty_summary"class="anchor"></a><code><spanclass="keyword">val</span> empty_summary : <ahref="index.html#type-summary">summary</a></code></dt><dtclass="spec value"id="val-pp_summary"><ahref="#val-pp_summary"class="anchor"></a><code><spanclass="keyword">val</span> pp_summary : <ahref="index.html#module-F">F</a>.formatter <span>-></span><ahref="index.html#type-summary">summary</a><span>-></span> unit</code></dt><dtclass="spec value"id="val-integrate_summary"><ahref="#val-integrate_summary"class="anchor"></a><code><spanclass="keyword">val</span> integrate_summary : <span>?⁠tenv:<ahref="../IR/Tenv/index.html#type-t">IR.Tenv.t</a></span><span>-></span><span>?⁠lhs:<ahref="../IR/HilExp/AccessExpression/index.html#type-t">IR.HilExp.AccessExpression.t</a></span><span>-></span><span>?⁠subst:<ahref="Lock/index.html#type-subst">Lock.subst</a></span><span>-></span><ahref="../IR/CallSite/index.html#type-t">IR.CallSite.t</a><span>-></span><ahref="index.html#type-t">t</a><span>-></span><ahref="index.html#type-summary">summary</a><span>-></span><ahref="index.html#type-t">t</a></code></dt><dd><p>apply a callee summary to the current abstract state; <code>lhs</code> is the expression assigned the returned value, if any</p></dd></dl><dl><dtclass="spec value"id="val-summary_of_astate"><ahref="#val-summary_of_astate"class="anchor"></a><code><spanclass="keyword">val</span> summary_of_astate : <ahref="../IR/Procdesc/index.html#type-t">IR.Procdesc.t</a><span>-></span><ahref="index.html#type-t">t</a><span>-></span><ahref="index.html#type-summary">summary</a></code></dt><dtclass="spec value"id="val-filter_blocking_calls"><ahref="#val-filter_blocking_calls"class="anchor"></a><code><spanclass="keyword">val</span> filter_blocking_calls : <ahref="index.html#type-t">t</a><span>-></span><ahref="index.html#type-t">t</a></code></dt></dl></div></body></html>