You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2 lines
15 KiB

This file contains ambiguous Unicode characters!

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>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>StarvationDomain (infer.InferModules.StarvationDomain)</title><link rel="stylesheet" href="../../../odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc %%VERSION%%"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div class="content"><header><nav><a href="../index.html">Up</a> <a href="../../index.html">infer</a> &#x00BB; <a href="../index.html">InferModules</a> &#x00BB; StarvationDomain</nav><h1>Module <code>InferModules.StarvationDomain</code></h1></header><div class="spec module" id="module-F"><a href="#module-F" class="anchor"></a><code><span class="keyword">module</span> F = Stdlib.Format</code></div><dl><dt class="spec module" id="module-Lock"><a href="#module-Lock" class="anchor"></a><code><span class="keyword">module</span> <a href="Lock/index.html">Lock</a> : <span class="keyword">sig</span> ... <span class="keyword">end</span></code></dt><dd><p>Abstraction of a path that represents a lock, special-casing equality and comparisons to work over type, base variable modulo this and access list</p></dd></dl><dl><dt class="spec module" id="module-Event"><a href="#module-Event" class="anchor"></a><code><span class="keyword">module</span> <a href="Event/index.html">Event</a> : <span class="keyword">sig</span> ... <span class="keyword">end</span></code></dt><dd><p>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.</p></dd></dl><div class="spec module" id="module-EventDomain"><a href="#module-EventDomain" class="anchor"></a><code><span class="keyword">module</span> EventDomain : <a href="../ExplicitTrace/index.html#module-type-FiniteSet">ExplicitTrace.FiniteSet</a> <span class="keyword">with</span> <span class="keyword">type</span> <a href="../ExplicitTrace/index.html#module-type-FiniteSet">FiniteSet</a>.elt = <a href="Event/index.html#type-t">Event.t</a></code></div><dl><dt class="spec module" id="module-Order"><a href="#module-Order" class="anchor"></a><code><span class="keyword">module</span> <a href="Order/index.html">Order</a> : <span class="keyword">sig</span> ... <span class="keyword">end</span></code></dt><dd><p>Represents the existence of a program path to the <code>first</code> lock being taken in the current method or, transitively, a callee *in the same class*, and, which continues (to potentially another class) until the <code>eventually</code> event, schematically --&gt;first--&gt;eventually. It is guaranteed that during the second part of the trace (first--&gt;eventually) the lock <code>first</code> is not released.</p></dd></dl><div class="spec module" id="module-OrderDomain"><a href="#module-OrderDomain" class="anchor"></a><code><span class="keyword">module</span> OrderDomain : <a href="../ExplicitTrace/index.html#module-type-FiniteSet">ExplicitTrace.FiniteSet</a> <span class="keyword">with</span> <span class="keyword">type</span> <a href="../ExplicitTrace/index.html#module-type-FiniteSet">FiniteSet</a>.elt = <a href="Order/index.html#type-t">Order.t</a></code></div><div class="spec module" id="module-LockState"><a href="#module-LockState" class="anchor"></a><code><span class="keyword">module</span> <a href="LockState/index.html">LockState</a> : <a href="../AbstractDomain/index.html#module-type-WithTop">AbstractDomain.WithTop</a></code></div><div class="spec module" id="module-UIThreadExplanationDomain"><a href="#module-UIThreadExplanationDomain" class="anchor"></a><code><span class="keyword">module</span> <a href="UIThreadExplanationDomain/index.html">UIThreadExplanationDomain</a> : <span class="keyword">sig</span> ... <span class="keyword">end</span></code></div><div class="spec module" id="module-UIThreadDomain"><a href="#module-UIThreadDomain" class="anchor"></a><code><span class="keyword">module</span> <a href="UIThreadDomain/index.html">UIThreadDomain</a> : <a href="../AbstractDomain/index.html#module-type-WithBottom">AbstractDomain.WithBottom</a> <span class="keyword">with</span> <span class="keyword">type</span> <a href="../AbstractDomain/module-type-WithBottom/index.html#type-t">t</a> = <span><a href="UIThreadExplanationDomain/index.html#type-t">UIThreadExplanationDomain.t</a> <a href="../AbstractDomain/Types/index.html#type-bottom_lifted">AbstractDomain.Types.bottom_lifted</a></span></code></div><div class="spec module" id="module-GuardToLockMap"><a href="#module-GuardToLockMap" class="anchor"></a><code><span class="keyword">module</span> <a href="GuardToLockMap/index.html">GuardToLockMap</a> : <a href="../AbstractDomain/index.html#module-type-WithTop">AbstractDomain.WithTop</a></code></div><dl><dt class="spec type" id="type-t"><a href="#type-t" class="anchor"></a><code><span class="keyword">type</span> t</code><code> = </code><code>{</code><table class="record"><tr id="type-t.events" class="anchored"><td class="def field"><a href="#type-t.events" class="anchor"></a><code>events : <a href="index.html#module-EventDomain">EventDomain</a>.t;</code></td></tr><tr id="type-t.guard_map" class="anchored"><td class="def field"><a href="#type-t.guard_map" class="anchor"></a><code>guard_map : <a href="GuardToLockMap/index.html#type-t">GuardToLockMap.t</a>;</code></td></tr><tr id="type-t.lock_state" class="anchored"><td class="def field"><a href="#type-t.lock_state" class="anchor"></a><code>lock_state : <a href="LockState/index.html#type-t">LockState.t</a>;</code></td></tr><tr id="type-t.order" class="anchored"><td class="def field"><a href="#type-t.order" class="anchor"></a><code>order : <a href="index.html#module-OrderDomain">OrderDomain</a>.t;</code></td></tr><tr id="type-t.ui" class="anchored"><td class="def field"><a href="#type-t.ui" class="anchor"></a><code>ui : <a href="UIThreadDomain/index.html#type-t">UIThreadDomain.t</a>;</code></td></tr></table><code>}</code></dt></dl><div><div class="spec include"><div class="doc"><details open="open"><summary><span class="def"><code><span class="keyword">include</span> <a href="../AbstractDomain/index.html#module-type-WithBottom">AbstractDomain.WithBottom</a> <span class="keyword">with</span> <span class="keyword">type</span> <a href="../AbstractDomain/module-type-WithBottom/index.html#type-t">t</a> := <a href="index.html#type-t">t</a></code></span></summary><div><div class="spec include"><div class="doc"><details open="open"><summary><span class="def"><code><span class="keyword">include</span> <a href="../AbstractDomain/index.html#module-type-S">AbstractDomain.S</a></code></span></summary><div><div class="spec include"><div class="doc"><details open="open"><summary><span class="def"><code><span class="keyword">include</span> <a href="../AbstractDomain/index.html#module-type-NoJoin">AbstractDomain.NoJoin</a></code></span></summary><div><div class="spec include"><div class="doc"><details open="open"><summary><span class="def"><code><span class="keyword">include</span> <a href="../../../InferStdlib/InferStdlib/PrettyPrintable/index.html#module-type-PrintableType">InferStdlib.PrettyPrintable.PrintableType</a></code></span></summary><dl><dt class="spec type" id="type-t"><a href="#type-t" class="anchor"></a><code><span class="keyword">type</span> t</code></dt></dl><dl><dt class="spec value" id="val-pp"><a href="#val-pp" class="anchor"></a><code><span class="keyword">val</span> pp : <a href="../../../InferStdlib/InferStdlib/PrettyPrintable/index.html#module-F">InferStdlib.PrettyPrintable.F</a>.formatter <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> unit</code></dt></dl></details></div></div></div><dl><dt class="spec value" id="val-(&lt;=)"><a href="#val-(&lt;=)" class="anchor"></a><code><span class="keyword">val</span> (&lt;=) : <span>lhs:<a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>rhs:<a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> bool</code></dt><dd><p>the implication relation: <code>lhs &lt;= rhs</code> means <code>lhs |- rhs</code></p></dd></dl></details></div></div></div><dl><dt class="spec value" id="val-join"><a href="#val-join" class="anchor"></a><code><span class="keyword">val</span> join : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a></code></dt><dt class="spec value" id="val-widen"><a href="#val-widen" class="anchor"></a><code><span class="keyword">val</span> widen : <span>prev:<a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>next:<a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>num_iters:int</span> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a></code></dt></dl></details></div></div></div><dl><dt class="spec value" id="val-bottom"><a href="#val-bottom" class="anchor"></a><code><span class="keyword">val</span> bottom : <a href="index.html#type-t">t</a></code></dt><dd><p>The bottom value of the domain.</p></dd></dl><dl><dt class="spec value" id="val-is_bottom"><a href="#val-is_bottom" class="anchor"></a><code><span class="keyword">val</span> is_bottom : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> bool</code></dt><dd><p>Return true if this is the bottom value</p></dd></dl></details></div></div></div><dl><dt class="spec value" id="val-acquire"><a href="#val-acquire" class="anchor"></a><code><span class="keyword">val</span> acquire : <a href="../../../InferIR/InferIR/Tenv/index.html#type-t">InferIR.Tenv.t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="../../../InferBase/InferBase/Location/index.html#type-t">InferBase.Location.t</a> <span>&#45;&gt;</span> <span><a href="index.html#module-Lock">Lock</a>.t list</span> <span>&#45;&gt;</span> <a href="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><dt class="spec value" id="val-release"><a href="#val-release" class="anchor"></a><code><span class="keyword">val</span> release : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <span><a href="index.html#module-Lock">Lock</a>.t list</span> <span>&#45;&gt;</span> <a href="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><dt class="spec value" id="val-blocking_call"><a href="#val-blocking_call" class="anchor"></a><code><span class="keyword">val</span> blocking_call : <a href="../../../InferIR/InferIR/Typ/Procname/index.html#type-t">InferIR.Typ.Procname.t</a> <span>&#45;&gt;</span> <a href="Event/index.html#type-severity_t">Event.severity_t</a> <span>&#45;&gt;</span> <a href="../../../InferBase/InferBase/Location/index.html#type-t">InferBase.Location.t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a></code></dt><dt class="spec value" id="val-strict_mode_call"><a href="#val-strict_mode_call" class="anchor"></a><code><span class="keyword">val</span> strict_mode_call : <a href="../../../InferIR/InferIR/Typ/Procname/index.html#type-t">InferIR.Typ.Procname.t</a> <span>&#45;&gt;</span> <a href="../../../InferBase/InferBase/Location/index.html#type-t">InferBase.Location.t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a></code></dt><dt class="spec value" id="val-set_on_ui_thread"><a href="#val-set_on_ui_thread" class="anchor"></a><code><span class="keyword">val</span> set_on_ui_thread : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="../../../InferBase/InferBase/Location/index.html#type-t">InferBase.Location.t</a> <span>&#45;&gt;</span> string <span>&#45;&gt;</span> <a href="index.html#type-t">t</a></code></dt><dd><p>set the property &quot;runs on UI thread&quot; to true by attaching the given explanation string as to why this method is thought to do so</p></dd></dl><dl><dt class="spec value" id="val-add_guard"><a href="#val-add_guard" class="anchor"></a><code><span class="keyword">val</span> add_guard : <a href="../../../InferIR/InferIR/Tenv/index.html#type-t">InferIR.Tenv.t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="../../../InferIR/InferIR/HilExp/index.html#type-t">InferIR.HilExp.t</a> <span>&#45;&gt;</span> <a href="index.html#module-Lock">Lock</a>.t <span>&#45;&gt;</span> <span>acquire_now:bool</span> <span>&#45;&gt;</span> <a href="../../../InferBase/InferBase/Location/index.html#type-t">InferBase.Location.t</a> <span>&#45;&gt;</span> <a href="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><dt class="spec value" id="val-lock_guard"><a href="#val-lock_guard" class="anchor"></a><code><span class="keyword">val</span> lock_guard : <a href="../../../InferIR/InferIR/Tenv/index.html#type-t">InferIR.Tenv.t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="../../../InferIR/InferIR/HilExp/index.html#type-t">InferIR.HilExp.t</a> <span>&#45;&gt;</span> <a href="../../../InferBase/InferBase/Location/index.html#type-t">InferBase.Location.t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a></code></dt><dd><p>Acquire the lock the guard was constructed with.</p></dd></dl><dl><dt class="spec value" id="val-remove_guard"><a href="#val-remove_guard" class="anchor"></a><code><span class="keyword">val</span> remove_guard : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="../../../InferIR/InferIR/HilExp/index.html#type-t">InferIR.HilExp.t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a></code></dt><dd><p>Destroy the guard and release its lock.</p></dd></dl><dl><dt class="spec value" id="val-unlock_guard"><a href="#val-unlock_guard" class="anchor"></a><code><span class="keyword">val</span> unlock_guard : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="../../../InferIR/InferIR/HilExp/index.html#type-t">InferIR.HilExp.t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a></code></dt><dd><p>Release the lock the guard was constructed with.</p></dd></dl><dl><dt class="spec type" id="type-summary"><a href="#type-summary" class="anchor"></a><code><span class="keyword">type</span> summary</code><code> = <a href="index.html#type-t">t</a></code></dt></dl><dl><dt class="spec value" id="val-pp_summary"><a href="#val-pp_summary" class="anchor"></a><code><span class="keyword">val</span> pp_summary : <a href="index.html#module-F">F</a>.formatter <span>&#45;&gt;</span> <a href="index.html#type-summary">summary</a> <span>&#45;&gt;</span> unit</code></dt><dt class="spec value" id="val-integrate_summary"><a href="#val-integrate_summary" class="anchor"></a><code><span class="keyword">val</span> integrate_summary : <a href="../../../InferIR/InferIR/Tenv/index.html#type-t">InferIR.Tenv.t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="../../../InferIR/InferIR/Typ/Procname/index.html#type-t">InferIR.Typ.Procname.t</a> <span>&#45;&gt;</span> <a href="../../../InferBase/InferBase/Location/index.html#type-t">InferBase.Location.t</a> <span>&#45;&gt;</span> <a href="index.html#type-summary">summary</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a></code></dt></dl></div></body></html>