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>ConcurrencyModels (infer.Absint.ConcurrencyModels)</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>»<ahref="../index.html">Absint</a>» ConcurrencyModels</nav><h1>Module <code>Absint.ConcurrencyModels</code></h1></header><dl><dtclass="spec type"id="type-lock_effect"><ahref="#type-lock_effect"class="anchor"></a><code><spanclass="keyword">type</span> lock_effect</code><code> = </code><tableclass="variant"><trid="type-lock_effect.Lock"class="anchored"><tdclass="def constructor"><ahref="#type-lock_effect.Lock"class="anchor"></a><code>| </code><code><spanclass="constructor">Lock</span><spanclass="keyword">of</span><span><ahref="../HilExp/index.html#type-t">HilExp.t</a> list</span></code></td><tdclass="doc"><p>simultaneously acquire a list of locks</p></td></tr><trid="type-lock_effect.Unlock"class="anchored"><tdclass="def constructor"><ahref="#type-lock_effect.Unlock"class="anchor"></a><code>| </code><code><spanclass="constructor">Unlock</span><spanclass="keyword">of</span><span><ahref="../HilExp/index.html#type-t">HilExp.t</a> list</span></code></td><tdclass="doc"><p>simultaneously release a list of locks</p></td></tr><trid="type-lock_effect.LockedIfTrue"class="anchored"><tdclass="def constructor"><ahref="#type-lock_effect.LockedIfTrue"class="anchor"></a><code>| </code><code><spanclass="constructor">LockedIfTrue</span><spanclass="keyword">of</span><span><ahref="../HilExp/index.html#type-t">HilExp.t</a> list</span></code></td><tdclass="doc"><p>simultaneously attempt to acquire a list of locks</p></td></tr><trid="type-lock_effect.GuardConstruct"class="anchored"><tdclass="def constructor"><ahref="#type-lock_effect.GuardConstruct"class="anchor"></a><code>| </code><code><spanclass="constructor">GuardConstruct</span><spanclass="keyword">of</span></code><code>{</code><tableclass="record"><trid="type-lock_effect.guard"class="anchored"><tdclass="def field"><ahref="#type-lock_effect.guard"class="anchor"></a><code>guard : <ahref="../HilExp/index.html#type-t">HilExp.t</a>;</code></td></tr><trid="type-lock_effect.lock"class="anchored"><tdclass="def field"><ahref="#type-lock_effect.lock"class="anchor"></a><code>lock : <ahref="../HilExp/index.html#type-t">HilExp.t</a>;</code></td></tr><trid="type-lock_effect.acquire_now"class="anchored"><tdclass="def field"><ahref="#type-lock_effect.acquire_now"class="anchor"></a><code>acquire_now : bool;</code></td></tr></table><code>}</code></td><tdclass="doc"><p>mutex guard construction - clang only</p></td></tr><trid="type-lock_effect.GuardLock"class="anchored"><tdclass="def constructor"><ahref="#type-lock_effect.GuardLock"class="anchor"></a><code>| </code><code><spanclass="constructor">GuardLock</span><spanclass="keyword">of</span><ahref="../HilExp/index.html#type-t">HilExp.t</a></code></td><tdclass="doc"><p>lock underlying mutex via guard - clang only</p></td></tr><trid="type-lock_effect.GuardLockedIfTrue"class="anchored"><tdclass="def constructor"><ahref="#type-lock_effect.GuardLockedIfTrue"class="anchor"></a><code>| </code><code><spanclass="constructor">GuardLockedIfTrue</span><spanclass="keyword">of</span><ahref="../HilExp/index.html#type-t">HilExp.t</a></code></td><tdclass="doc"><p>lock underlying mutex if true via guard - clang only</p></td></tr><trid="type-lock_effect.GuardUnlock"class="anchored"><tdclass="def constructor"><ahref="#type-lock_effect.GuardUnlock"class="anchor"></a><code>| </code><code><spanclass="constructor">GuardUnlock</span><spanclass="keyword">of</span><ahref="../HilExp/index.html#type-t">HilExp.t</a></code></td><tdclass="doc"><p>unlock underlying mutex via guard - clang only</p></td></tr><trid="type-lock_effect.GuardDestroy"class="anchored"><tdclass="def constructor"><ahref="#type-lock_effect.GuardDestroy"class="anchor"></a><code>| </code><code><spanclass="constructor">GuardDestroy</span><spanclass="keyword">of</span><ahref="../HilExp/index.html#type-t">HilExp.t</a></code></td><tdclass="doc"><p>destroy guard and unlock underlying mutex - clang only</p></td></tr><trid="type-lock_effect.NoEffect"class="anchored"><tdclass="def constructor"><ahref="#type-lock_effect.NoEffect"class="anchor"></a><code>| </code><code><spanclass="constructor">NoEffect</span></code></td><tdclass="doc"><p>function call has no lock-relevant effect</p></td></tr></table></dt><dd><p>effect of call plus Hil expressions being un/locked, if known</p></dd></dl><dl><dtclass="spec type"id="type-thread"><ahref="#type-thread"class="anchor"></a><code><spanclass="keyword">type</span> thread</code><code> = </code><tableclass="variant"><trid="type-thread.BackgroundThread"class="anchored"><tdclass="def constructor"><ahref="#type-thread.BackgroundThread"class="anchor"></a><code>| </code><code><spanclass="constructor">BackgroundThread</span></code></td></tr><trid="type-thread.MainThread"class="anchored"><tdclass="def constructor"><ahref="#type-thread.MainThread"class="anchor"></a><code>| </code><code><spanclass="constructor">MainThread</span></code></td></tr><trid="type-thread.MainThreadIfTrue"class="anchored"><tdclass="def constructor"><ahref="#type-thread.MainThreadIfTrue"class="anchor"></a><code>| </code><code><spanclass="constructor">MainThreadIfTrue</span></code></td></tr><trid="type-thread.UnknownThread"class="anchored"><tdclass="def constructor"><ahref="#type-thread.UnknownThread"class="anchor"></a><code>| </code><code><spanclass="constructor">UnknownThread</span></code></td></tr></table></dt></dl><dl><dtclass="spec value"id="val-is_thread_utils_method"><ahref="#val-is_thread_utils_method"class="anchor"></a><code><spanclass="keyword">val</span> is_thread_utils_method : string <span>-></span><ahref="../../IR/Procname/index.html#type-t">IR.Procname.t</a><span>-></span> bool</code></dt><dd><p>return 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</p></dd></dl><dl><dtclass="spec value"id="val-get_lock_effect"><ahref="#val-get_lock_effect"class="anchor"></a><code><spanclass="keyword">val</span> get_lock_effect : <ahref="../../IR/Procname/index.html#type-t">IR.Procname.t</a><span>-></span><span><ahref="../HilExp/index.html#type-t">HilExp.t</a> list</span><span>-></span><ahref="index.html#type-lock_effect">lock_effect</a></code></dt><dd><p>describe how this procedure behaves with respect to locking</p></dd></dl><dl><dtclass="spec value"id="val-get_thread_assert_effect"><ahref="#val-get_thread_assert_effect"class="anchor"></a><code><spanclass="keyword">val</span> get_thread_assert_effect : <ahref="../../IR/Procname/index.html#type-t">IR.Procname.t</a><span>-></span><ahref="index.html#type-thread">thread</a></code></dt><dd><p>In Java, certain methods can be used to assert execution on a specific kind of thread, or return a boolean equivalent to such a fact.</p></dd></dl><dl><dtclass="spec value"id="val-get_current_class_and_annotated_superclasses"><ahref="#val-get_current_class_and_annotated_superclasses"class="anchor"></a><code><spanclass="keyword">val</span> get_current_class_and_annotated_superclasses : <span>(<ahref="../../IR/Annot/Item/index.html#type-t">IR.Annot.Item.t</a><span>-></span> bool)</span><span>-></span><ahref="../../IR/Tenv/index.html#type-t">IR.Tenv.t</a><span>-></span><ahref="../../IR/Procname/index.html#type-t">IR.Procname.t</a><span>-></span><span><span>(<ahref="../../IR/Typ/index.html#type-name">IR.Typ.name</a> * <span><ahref="../../IR/Typ/index.html#type-name">IR.Typ.name</a> list</span>)</span> option</span></code></dt><dtclass="spec value"id="val-is_recursive_lock_type"><ahref="#val-is_recursive_lock_type"class="anchor"></a><code><spanclass="keyword">val</span> is_recursive_lock_type : <ahref="../../IR/Typ/index.html#type-name">IR.Typ.name</a><span>-></span> bool</code></dt></dl><dl><dtclass="spec type"id="type-annotation_trail"><ahref="#type-annotation_trail"class="anchor"></a><code><spanclass="keyword">type</span> annotation_trail</code><code> = </code><tableclass="variant"><trid="type-annotation_trail.DirectlyAnnotated"class="anchored"><tdclass="def constructor"><ahref="#type-annotation_trail.DirectlyAnnotated"class="anchor"></a><code>| </code><code><spanclass="constructor">DirectlyAnnotated</span></code></td><tdclass="doc"><p>the method is directly annotated as such</p></td></tr><trid="type-annotation_trail.Override"class="anchored"><tdclass="def constructor"><ahref="#type-annotation_trail.Override"class="anchor"></a><code>| </code><code><spanclass="constructor">Override</span><spanclass="keyword">of</span><ahref="../../IR/Procname/index.html#type-t">IR.Procname.t</a></code></td><tdclass="doc"><p>it overrides a method annotated in a super class</p></td></tr><trid="type-annotation_trail.SuperClass"class="anchored"><tdclass="def constructor"><ahref="#type-annotation_trail.SuperClass"class="anchor"></a><code>| </code><code><spanclass="constructor">SuperClass</span><spanclass="keyword">of</span><ahref="../../IR/Typ/index.html#type-name">IR.Typ.name</a></code></td><tdclass="doc"><p>the method's class or a super class of that is annotated as such</p></td></tr></table></dt><dd><p>Type documenting why a method is considered as annotated with a certain annotation</p></dd></dl><div><divclass="spec include"><divclass="doc"><dl><dtclass="spec value"id="val-compare_annotation_trail"><ahref="#val-compare_annotation_trail"class="anchor"></a><code><spanclass="keyword">val</span> compare_annotation_trail : <ahref="index.html#type-annotation_trail">annotation_trail</a><span>-></span><ahref="index.html#type-annotation_trail">annotation_trail</a><span>-></span> int</code></dt></dl></div></div></div><dl><dtclass="spec value"id="val-find_override_or_superclass_annotated"><ahref="#val-find_override_or_superclass_annotated"class="anchor"></a><code><spanclass="keyword">val</span> find_override_or_superclass_annotated : <span>(<ahref="../../IR/Annot/Item/index.html#type-t">IR.Annot.Item.t</a><span>-></span> bool)</span><span>-></span><ahref="../../IR/Tenv/index.html#type-t">IR.Tenv.t</a><span>-></span><ahref="../../IR/Procname/index.html#type-t">IR.Procname.t</a><span>-></span><span><ahref="index.html#type-annotation_trail">annotation_trail</a> option</span></code></dt><dd><p>check if a method's transitive annotations satisfy the given predicate</p></dd></dl><dl><dtclass="spec value"id="val-annotated_as_worker_thread"><ahref="#val-annotated_as_worker_thread"class="anchor"></a><code><spanclass="keyword">val</span> annotated_as_worker_thread : <ahref="../../IR/Tenv/index.html#type-t">IR.Tenv.t</a><span>-></span><ahref="../../IR/Procname/index.html#type-t">IR.Procname.t</a><span>-></span> bool</code></dt><dtclass="spec value"id="val-runs_on_ui_thread"><ahref="#val-runs_on_ui_thread"class="anchor"></a><code><spanclass="keyword">val</span> runs_on_ui_thread : <ahref="../../IR/Tenv/index.html#type-t">IR.Tenv.t</a><span>-></span><ahref="../../IR/Procname/index.html#type-t">IR.Procname.t</a><span>-></span> bool</code></dt><dd><p>is method not transitively annotated <code>@WorkerThread</code> and is modeled or annotated <code>@UIThread</code> or equivalent?</p></dd></dl><dl><dtclass="spec value"id="val-is_android_lifecycle_method"><ahref="#val-is_android_lifecycle_method"class="anchor"></a><code><spanclass="keyword">val</span> is_android_lifecycle_method : <ahref="../../IR/Tenv/index.html#type-t">IR.Tenv.t</a><span>-></span><ahref="../../IR/Procname/index.html#type-t">IR.Procname.t</a><span>-></span> bool</code></dt><dd><p>is method a known Android UI thread callback (eg <code>Activity.onCreate</code>)</p></dd></dl></div></body></html>