<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"><head><title>ConcurrencyModels (infer.Absint.ConcurrencyModels)</title><link rel="stylesheet" href="../../../odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 1.5.0"/><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> » <a href="../index.html">Absint</a> » ConcurrencyModels</nav><h1>Module <code>Absint.ConcurrencyModels</code></h1></header><dl><dt class="spec type" id="type-lock_effect"><a href="#type-lock_effect" class="anchor"></a><code><span class="keyword">type</span> lock_effect</code><code> = </code><table class="variant"><tr id="type-lock_effect.Lock" class="anchored"><td class="def constructor"><a href="#type-lock_effect.Lock" class="anchor"></a><code>| </code><code><span class="constructor">Lock</span> <span class="keyword">of</span> <span><a href="../HilExp/index.html#type-t">HilExp.t</a> list</span></code></td><td class="doc"><p>simultaneously acquire a list of locks</p></td></tr><tr id="type-lock_effect.Unlock" class="anchored"><td class="def constructor"><a href="#type-lock_effect.Unlock" class="anchor"></a><code>| </code><code><span class="constructor">Unlock</span> <span class="keyword">of</span> <span><a href="../HilExp/index.html#type-t">HilExp.t</a> list</span></code></td><td class="doc"><p>simultaneously release a list of locks</p></td></tr><tr id="type-lock_effect.LockedIfTrue" class="anchored"><td class="def constructor"><a href="#type-lock_effect.LockedIfTrue" class="anchor"></a><code>| </code><code><span class="constructor">LockedIfTrue</span> <span class="keyword">of</span> <span><a href="../HilExp/index.html#type-t">HilExp.t</a> list</span></code></td><td class="doc"><p>simultaneously attempt to acquire a list of locks</p></td></tr><tr id="type-lock_effect.GuardConstruct" class="anchored"><td class="def constructor"><a href="#type-lock_effect.GuardConstruct" class="anchor"></a><code>| </code><code><span class="constructor">GuardConstruct</span> <span class="keyword">of</span> </code><code>{</code><table class="record"><tr id="type-lock_effect.guard" class="anchored"><td class="def field"><a href="#type-lock_effect.guard" class="anchor"></a><code>guard : <a href="../HilExp/index.html#type-t">HilExp.t</a>;</code></td></tr><tr id="type-lock_effect.lock" class="anchored"><td class="def field"><a href="#type-lock_effect.lock" class="anchor"></a><code>lock : <a href="../HilExp/index.html#type-t">HilExp.t</a>;</code></td></tr><tr id="type-lock_effect.acquire_now" class="anchored"><td class="def field"><a href="#type-lock_effect.acquire_now" class="anchor"></a><code>acquire_now : bool;</code></td></tr></table><code>}</code></td><td class="doc"><p>mutex guard construction - clang only</p></td></tr><tr id="type-lock_effect.GuardLock" class="anchored"><td class="def constructor"><a href="#type-lock_effect.GuardLock" class="anchor"></a><code>| </code><code><span class="constructor">GuardLock</span> <span class="keyword">of</span> <a href="../HilExp/index.html#type-t">HilExp.t</a></code></td><td class="doc"><p>lock underlying mutex via guard - clang only</p></td></tr><tr id="type-lock_effect.GuardLockedIfTrue" class="anchored"><td class="def constructor"><a href="#type-lock_effect.GuardLockedIfTrue" class="anchor"></a><code>| </code><code><span class="constructor">GuardLockedIfTrue</span> <span class="keyword">of</span> <a href="../HilExp/index.html#type-t">HilExp.t</a></code></td><td class="doc"><p>lock underlying mutex if true via guard - clang only</p></td></tr><tr id="type-lock_effect.GuardUnlock" class="anchored"><td class="def constructor"><a href="#type-lock_effect.GuardUnlock" class="anchor"></a><code>| </code><code><span class="constructor">GuardUnlock</span> <span class="keyword">of</span> <a href="../HilExp/index.html#type-t">HilExp.t</a></code></td><td class="doc"><p>unlock underlying mutex via guard - clang only</p></td></tr><tr id="type-lock_effect.GuardDestroy" class="anchored"><td class="def constructor"><a href="#type-lock_effect.GuardDestroy" class="anchor"></a><code>| </code><code><span class="constructor">GuardDestroy</span> <span class="keyword">of</span> <a href="../HilExp/index.html#type-t">HilExp.t</a></code></td><td class="doc"><p>destroy guard and unlock underlying mutex - clang only</p></td></tr><tr id="type-lock_effect.NoEffect" class="anchored"><td class="def constructor"><a href="#type-lock_effect.NoEffect" class="anchor"></a><code>| </code><code><span class="constructor">NoEffect</span></code></td><td class="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><dt class="spec type" id="type-thread"><a href="#type-thread" class="anchor"></a><code><span class="keyword">type</span> thread</code><code> = </code><table class="variant"><tr id="type-thread.BackgroundThread" class="anchored"><td class="def constructor"><a href="#type-thread.BackgroundThread" class="anchor"></a><code>| </code><code><span class="constructor">BackgroundThread</span></code></td></tr><tr id="type-thread.MainThread" class="anchored"><td class="def constructor"><a href="#type-thread.MainThread" class="anchor"></a><code>| </code><code><span class="constructor">MainThread</span></code></td></tr><tr id="type-thread.MainThreadIfTrue" class="anchored"><td class="def constructor"><a href="#type-thread.MainThreadIfTrue" class="anchor"></a><code>| </code><code><span class="constructor">MainThreadIfTrue</span></code></td></tr><tr id="type-thread.UnknownThread" class="anchored"><td class="def constructor"><a href="#type-thread.UnknownThread" class="anchor"></a><code>| </code><code><span class="constructor">UnknownThread</span></code></td></tr></table></dt></dl><dl><dt class="spec value" id="val-is_thread_utils_method"><a href="#val-is_thread_utils_method" class="anchor"></a><code><span class="keyword">val</span> is_thread_utils_method : string <span>-></span> <a href="../../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><dt class="spec value" id="val-get_lock_effect"><a href="#val-get_lock_effect" class="anchor"></a><code><span class="keyword">val</span> get_lock_effect : <a href="../../IR/Procname/index.html#type-t">IR.Procname.t</a> <span>-></span> <span><a href="../HilExp/index.html#type-t">HilExp.t</a> list</span> <span>-></span> <a href="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><dt class="spec value" id="val-get_thread_assert_effect"><a href="#val-get_thread_assert_effect" class="anchor"></a><code><span class="keyword">val</span> get_thread_assert_effect : <a href="../../IR/Procname/index.html#type-t">IR.Procname.t</a> <span>-></span> <a href="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><dt class="spec value" id="val-get_current_class_and_annotated_superclasses"><a href="#val-get_current_class_and_annotated_superclasses" class="anchor"></a><code><span class="keyword">val</span> get_current_class_and_annotated_superclasses : <span>(<a href="../../IR/Annot/Item/index.html#type-t">IR.Annot.Item.t</a> <span>-></span> bool)</span> <span>-></span> <a href="../../IR/Tenv/index.html#type-t">IR.Tenv.t</a> <span>-></span> <a href="../../IR/Procname/index.html#type-t">IR.Procname.t</a> <span>-></span> <span><span>(<a href="../../IR/Typ/index.html#type-name">IR.Typ.name</a> * <span><a href="../../IR/Typ/index.html#type-name">IR.Typ.name</a> list</span>)</span> option</span></code></dt><dt class="spec value" id="val-is_recursive_lock_type"><a href="#val-is_recursive_lock_type" class="anchor"></a><code><span class="keyword">val</span> is_recursive_lock_type : <a href="../../IR/Typ/index.html#type-name">IR.Typ.name</a> <span>-></span> bool</code></dt></dl><dl><dt class="spec type" id="type-annotation_trail"><a href="#type-annotation_trail" class="anchor"></a><code><span class="keyword">type</span> annotation_trail</code><code> = </code><table class="variant"><tr id="type-annotation_trail.DirectlyAnnotated" class="anchored"><td class="def constructor"><a href="#type-annotation_trail.DirectlyAnnotated" class="anchor"></a><code>| </code><code><span class="constructor">DirectlyAnnotated</span></code></td><td class="doc"><p>the method is directly annotated as such</p></td></tr><tr id="type-annotation_trail.Override" class="anchored"><td class="def constructor"><a href="#type-annotation_trail.Override" class="anchor"></a><code>| </code><code><span class="constructor">Override</span> <span class="keyword">of</span> <a href="../../IR/Procname/index.html#type-t">IR.Procname.t</a></code></td><td class="doc"><p>it overrides a method annotated in a super class</p></td></tr><tr id="type-annotation_trail.SuperClass" class="anchored"><td class="def constructor"><a href="#type-annotation_trail.SuperClass" class="anchor"></a><code>| </code><code><span class="constructor">SuperClass</span> <span class="keyword">of</span> <a href="../../IR/Typ/index.html#type-name">IR.Typ.name</a></code></td><td class="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><div class="spec include"><div class="doc"><dl><dt class="spec value" id="val-compare_annotation_trail"><a href="#val-compare_annotation_trail" class="anchor"></a><code><span class="keyword">val</span> compare_annotation_trail : <a href="index.html#type-annotation_trail">annotation_trail</a> <span>-></span> <a href="index.html#type-annotation_trail">annotation_trail</a> <span>-></span> int</code></dt></dl></div></div></div><dl><dt class="spec value" id="val-find_override_or_superclass_annotated"><a href="#val-find_override_or_superclass_annotated" class="anchor"></a><code><span class="keyword">val</span> find_override_or_superclass_annotated : <span>(<a href="../../IR/Annot/Item/index.html#type-t">IR.Annot.Item.t</a> <span>-></span> bool)</span> <span>-></span> <a href="../../IR/Tenv/index.html#type-t">IR.Tenv.t</a> <span>-></span> <a href="../../IR/Procname/index.html#type-t">IR.Procname.t</a> <span>-></span> <span><a href="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><dt class="spec value" id="val-annotated_as_worker_thread"><a href="#val-annotated_as_worker_thread" class="anchor"></a><code><span class="keyword">val</span> annotated_as_worker_thread : <a href="../../IR/Tenv/index.html#type-t">IR.Tenv.t</a> <span>-></span> <a href="../../IR/Procname/index.html#type-t">IR.Procname.t</a> <span>-></span> bool</code></dt><dt class="spec value" id="val-runs_on_ui_thread"><a href="#val-runs_on_ui_thread" class="anchor"></a><code><span class="keyword">val</span> runs_on_ui_thread : <a href="../../IR/Tenv/index.html#type-t">IR.Tenv.t</a> <span>-></span> <a href="../../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><dt class="spec value" id="val-is_android_lifecycle_method"><a href="#val-is_android_lifecycle_method" class="anchor"></a><code><span class="keyword">val</span> is_android_lifecycle_method : <a href="../../IR/Tenv/index.html#type-t">IR.Tenv.t</a> <span>-></span> <a href="../../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>