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
11 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>ConcurrencyModels (infer.InferModules.ConcurrencyModels)</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; ConcurrencyModels</nav><h1>Module <code>InferModules.ConcurrencyModels</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 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="../../../InferIR/InferIR/HilExp/index.html#type-t">InferIR.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="../../../InferIR/InferIR/HilExp/index.html#type-t">InferIR.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="../../../InferIR/InferIR/HilExp/index.html#type-t">InferIR.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="../../../InferIR/InferIR/HilExp/index.html#type-t">InferIR.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="../../../InferIR/InferIR/HilExp/index.html#type-t">InferIR.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="../../../InferIR/InferIR/HilExp/index.html#type-t">InferIR.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="../../../InferIR/InferIR/HilExp/index.html#type-t">InferIR.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="../../../InferIR/InferIR/HilExp/index.html#type-t">InferIR.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="../../../InferIR/InferIR/HilExp/index.html#type-t">InferIR.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>&#45;&gt;</span> <a href="../../../InferIR/InferIR/Typ/Procname/index.html#type-t">InferIR.Typ.Procname.t</a> <span>&#45;&gt;</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="../../../InferIR/InferIR/Typ/Procname/index.html#type-t">InferIR.Typ.Procname.t</a> <span>&#45;&gt;</span> <span><a href="../../../InferIR/InferIR/HilExp/index.html#type-t">InferIR.HilExp.t</a> list</span> <span>&#45;&gt;</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"><a href="#val-get_thread" class="anchor"></a><code><span class="keyword">val</span> get_thread : <a href="../../../InferIR/InferIR/Typ/Procname/index.html#type-t">InferIR.Typ.Procname.t</a> <span>&#45;&gt;</span> <a href="index.html#type-thread">thread</a></code></dt><dd><p>describe how this procedure behaves with respect to thread access</p></dd></dl><dl><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 : <span>attrs_of_pname:<span>(<a href="../../../InferIR/InferIR/Typ/Procname/index.html#type-t">InferIR.Typ.Procname.t</a> <span>&#45;&gt;</span> <span><a href="../../../InferIR/InferIR/ProcAttributes/index.html#type-t">InferIR.ProcAttributes.t</a> option</span>)</span></span> <span>&#45;&gt;</span> <a href="../../../InferIR/InferIR/Tenv/index.html#type-t">InferIR.Tenv.t</a> <span>&#45;&gt;</span> <a href="../../../InferIR/InferIR/Procdesc/index.html#type-t">InferIR.Procdesc.t</a> <span>&#45;&gt;</span> <span>string option</span></code></dt><dd><p>We don't want to warn on methods that run on the UI thread because they should always be single-threaded. Assume that methods annotated with @UiThread, @OnEvent, @OnBind, @OnMount, @OnUnbind, @OnUnmount always run on the UI thread. Also assume that any superclass marked @UiThread implies all methods are on UI thread. Return Some string explaining why this method is on the UI thread, else return None.</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="../../../InferIR/InferIR/Annot/Item/index.html#type-t">InferIR.Annot.Item.t</a> <span>&#45;&gt;</span> bool)</span> <span>&#45;&gt;</span> <a href="../../../InferIR/InferIR/Tenv/index.html#type-t">InferIR.Tenv.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> <span><span>(<a href="../../../InferIR/InferIR/Typ/index.html#type-name">InferIR.Typ.name</a> * <span><a href="../../../InferIR/InferIR/Typ/index.html#type-name">InferIR.Typ.name</a> list</span>)</span> option</span></code></dt><dt class="spec value" id="val-find_method_or_override_annotated"><a href="#val-find_method_or_override_annotated" class="anchor"></a><code><span class="keyword">val</span> find_method_or_override_annotated : <span>attrs_of_pname:<span>(<a href="../../../InferIR/InferIR/Typ/Procname/index.html#type-t">InferIR.Typ.Procname.t</a> <span>&#45;&gt;</span> <span><a href="../../../InferIR/InferIR/ProcAttributes/index.html#type-t">InferIR.ProcAttributes.t</a> option</span>)</span></span> <span>&#45;&gt;</span> <span>(<a href="../../../InferIR/InferIR/Annot/Item/index.html#type-t">InferIR.Annot.Item.t</a> <span>&#45;&gt;</span> bool)</span> <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="../../../InferIR/InferIR/Tenv/index.html#type-t">InferIR.Tenv.t</a> <span>&#45;&gt;</span> <span><a href="../../../InferIR/InferIR/Typ/Procname/index.html#type-t">InferIR.Typ.Procname.t</a> <a href="../../../InferStdlib/InferStdlib/index.html#module-IStd">InferStdlib.IStd</a>.sexp_option</span></code></dt><dt class="spec value" id="val-cpp_lock_types_matcher"><a href="#val-cpp_lock_types_matcher" class="anchor"></a><code><span class="keyword">val</span> cpp_lock_types_matcher : <a href="../../../InferIR/InferIR/QualifiedCppName/Match/index.html#type-quals_matcher">InferIR.QualifiedCppName.Match.quals_matcher</a></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="../../../InferIR/InferIR/Typ/index.html#type-name">InferIR.Typ.name</a> <span>&#45;&gt;</span> bool</code></dt></dl></div></body></html>