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
14 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>Concurrency__StarvationModels (infer.Concurrency__StarvationModels)</title><link rel="stylesheet" href="../../odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 1.5.1"/><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; Concurrency__StarvationModels</nav><h1>Module <code>Concurrency__StarvationModels</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-severity"><a href="#type-severity" class="anchor"></a><code><span class="keyword">type</span> severity</code><code> = </code><table class="variant"><tr id="type-severity.Low" class="anchored"><td class="def constructor"><a href="#type-severity.Low" class="anchor"></a><code>| </code><code><span class="constructor">Low</span></code></td></tr><tr id="type-severity.Medium" class="anchored"><td class="def constructor"><a href="#type-severity.Medium" class="anchor"></a><code>| </code><code><span class="constructor">Medium</span></code></td></tr><tr id="type-severity.High" class="anchored"><td class="def constructor"><a href="#type-severity.High" class="anchor"></a><code>| </code><code><span class="constructor">High</span></code></td></tr></table></dt></dl><div><div class="spec include"><div class="doc"><dl><dt class="spec value" id="val-compare_severity"><a href="#val-compare_severity" class="anchor"></a><code><span class="keyword">val</span> compare_severity : <a href="index.html#type-severity">severity</a> <span>&#45;&gt;</span> <a href="index.html#type-severity">severity</a> <span>&#45;&gt;</span> int</code></dt></dl></div></div></div><dl><dt class="spec value" id="val-pp_severity"><a href="#val-pp_severity" class="anchor"></a><code><span class="keyword">val</span> pp_severity : <a href="index.html#module-F">F</a>.formatter <span>&#45;&gt;</span> <a href="index.html#type-severity">severity</a> <span>&#45;&gt;</span> unit</code></dt><dt class="spec value" id="val-may_block"><a href="#val-may_block" class="anchor"></a><code><span class="keyword">val</span> may_block : <a href="../IR/Tenv/index.html#type-t">IR.Tenv.t</a> <span>&#45;&gt;</span> <a href="../IR/Procname/index.html#type-t">IR.Procname.t</a> <span>&#45;&gt;</span> <span><a href="../Absint/HilExp/index.html#type-t">Absint.HilExp.t</a> list</span> <span>&#45;&gt;</span> <span><a href="index.html#type-severity">severity</a> option</span></code></dt><dd><p>is the method call potentially blocking, given the actuals passed?</p></dd></dl><dl><dt class="spec value" id="val-is_strict_mode_violation"><a href="#val-is_strict_mode_violation" class="anchor"></a><code><span class="keyword">val</span> is_strict_mode_violation : <a href="../IR/Tenv/index.html#type-t">IR.Tenv.t</a> <span>&#45;&gt;</span> <a href="../IR/Procname/index.html#type-t">IR.Procname.t</a> <span>&#45;&gt;</span> <span><a href="../Absint/HilExp/index.html#type-t">Absint.HilExp.t</a> list</span> <span>&#45;&gt;</span> bool</code></dt><dt class="spec value" id="val-is_monitor_wait"><a href="#val-is_monitor_wait" class="anchor"></a><code><span class="keyword">val</span> is_monitor_wait : <a href="../IR/Tenv/index.html#type-t">IR.Tenv.t</a> <span>&#45;&gt;</span> <a href="../IR/Procname/index.html#type-t">IR.Procname.t</a> <span>&#45;&gt;</span> <span><a href="../Absint/HilExp/index.html#type-t">Absint.HilExp.t</a> list</span> <span>&#45;&gt;</span> bool</code></dt><dt class="spec value" id="val-is_synchronized_library_call"><a href="#val-is_synchronized_library_call" class="anchor"></a><code><span class="keyword">val</span> is_synchronized_library_call : <a href="../IR/Tenv/index.html#type-t">IR.Tenv.t</a> <span>&#45;&gt;</span> <a href="../IR/Procname/index.html#type-t">IR.Procname.t</a> <span>&#45;&gt;</span> bool</code></dt><dd><p>does the method call lock-then-unlock the underlying object? legacy Java containers like Vector do this, and can interact with explicit locking</p></dd></dl><dl><dt class="spec value" id="val-should_skip_analysis"><a href="#val-should_skip_analysis" class="anchor"></a><code><span class="keyword">val</span> should_skip_analysis : <a href="../IR/Tenv/index.html#type-t">IR.Tenv.t</a> <span>&#45;&gt;</span> <a href="../IR/Procname/index.html#type-t">IR.Procname.t</a> <span>&#45;&gt;</span> <span><a href="../Absint/HilExp/index.html#type-t">Absint.HilExp.t</a> list</span> <span>&#45;&gt;</span> bool</code></dt><dd><p>should we treat a method call as skip (eg library methods in guava) to avoid FPs?</p></dd></dl><dl><dt class="spec value" id="val-is_annotated_nonblocking"><a href="#val-is_annotated_nonblocking" class="anchor"></a><code><span class="keyword">val</span> is_annotated_nonblocking : <a href="../IR/Tenv/index.html#type-t">IR.Tenv.t</a> <span>&#45;&gt;</span> <a href="../IR/Procname/index.html#type-t">IR.Procname.t</a> <span>&#45;&gt;</span> bool</code></dt><dd><p>is procedure transitively annotated <code>@Nonblocking</code></p></dd></dl><dl><dt class="spec value" id="val-is_annotated_lockless"><a href="#val-is_annotated_lockless" class="anchor"></a><code><span class="keyword">val</span> is_annotated_lockless : <a href="../IR/Tenv/index.html#type-t">IR.Tenv.t</a> <span>&#45;&gt;</span> <a href="../IR/Procname/index.html#type-t">IR.Procname.t</a> <span>&#45;&gt;</span> bool</code></dt><dd><p>is procedure transitively annotated <code>@Lockless</code></p></dd></dl><dl><dt class="spec value" id="val-schedules_work"><a href="#val-schedules_work" class="anchor"></a><code><span class="keyword">val</span> schedules_work : <a href="../IR/Tenv/index.html#type-t">IR.Tenv.t</a> <span>&#45;&gt;</span> <a href="../IR/Procname/index.html#type-t">IR.Procname.t</a> <span>&#45;&gt;</span> bool</code></dt><dd><p>call known to schedule runnable first argument to some executor/handler or subclass</p></dd></dl><dl><dt class="spec type" id="type-scheduler_thread_constraint"><a href="#type-scheduler_thread_constraint" class="anchor"></a><code><span class="keyword">type</span> scheduler_thread_constraint</code><code> = </code><table class="variant"><tr id="type-scheduler_thread_constraint.ForUIThread" class="anchored"><td class="def constructor"><a href="#type-scheduler_thread_constraint.ForUIThread" class="anchor"></a><code>| </code><code><span class="constructor">ForUIThread</span></code></td></tr><tr id="type-scheduler_thread_constraint.ForNonUIThread" class="anchored"><td class="def constructor"><a href="#type-scheduler_thread_constraint.ForNonUIThread" class="anchor"></a><code>| </code><code><span class="constructor">ForNonUIThread</span></code></td></tr><tr id="type-scheduler_thread_constraint.ForUnknownThread" class="anchored"><td class="def constructor"><a href="#type-scheduler_thread_constraint.ForUnknownThread" class="anchor"></a><code>| </code><code><span class="constructor">ForUnknownThread</span></code></td></tr></table></dt><dd><p>an instance field holding a reference to an executor may be annotated as running on UI/non-UI thread</p></dd></dl><div><div class="spec include"><div class="doc"><dl><dt class="spec value" id="val-equal_scheduler_thread_constraint"><a href="#val-equal_scheduler_thread_constraint" class="anchor"></a><code><span class="keyword">val</span> equal_scheduler_thread_constraint : <a href="index.html#type-scheduler_thread_constraint">scheduler_thread_constraint</a> <span>&#45;&gt;</span> <a href="index.html#type-scheduler_thread_constraint">scheduler_thread_constraint</a> <span>&#45;&gt;</span> bool</code></dt></dl></div></div></div><dl><dt class="spec value" id="val-get_executor_thread_annotation_constraint"><a href="#val-get_executor_thread_annotation_constraint" class="anchor"></a><code><span class="keyword">val</span> get_executor_thread_annotation_constraint : <a href="../IR/Tenv/index.html#type-t">IR.Tenv.t</a> <span>&#45;&gt;</span> <a href="../Absint/HilExp/AccessExpression/index.html#type-t">Absint.HilExp.AccessExpression.t</a> <span>&#45;&gt;</span> <span><a href="index.html#type-scheduler_thread_constraint">scheduler_thread_constraint</a> option</span></code></dt><dd><p>given an executor receiver, get its thread constraint, if any. <code>None</code> means lookup somehow failed, whereas <code>Some UnknownThread</code> means the receiver is an unannotated executor.</p></dd></dl><dl><dt class="spec value" id="val-get_run_method_from_runnable"><a href="#val-get_run_method_from_runnable" class="anchor"></a><code><span class="keyword">val</span> get_run_method_from_runnable : <a href="../IR/Tenv/index.html#type-t">IR.Tenv.t</a> <span>&#45;&gt;</span> <a href="../Absint/HilExp/AccessExpression/index.html#type-t">Absint.HilExp.AccessExpression.t</a> <span>&#45;&gt;</span> <span><a href="../IR/Procname/index.html#type-t">IR.Procname.t</a> option</span></code></dt><dd><p>given a receiver, find the <code>run()</code> method in the appropriate class</p></dd></dl><dl><dt class="spec value" id="val-get_returned_executor"><a href="#val-get_returned_executor" class="anchor"></a><code><span class="keyword">val</span> get_returned_executor : <a href="../IR/Tenv/index.html#type-t">IR.Tenv.t</a> <span>&#45;&gt;</span> <a href="../IR/Procname/index.html#type-t">IR.Procname.t</a> <span>&#45;&gt;</span> <span><a href="../Absint/HilExp/index.html#type-t">Absint.HilExp.t</a> list</span> <span>&#45;&gt;</span> <span><a href="index.html#type-scheduler_thread_constraint">scheduler_thread_constraint</a> option</span></code></dt><dd><p>does the function return an executor and of which thread?</p></dd></dl><dl><dt class="spec value" id="val-schedules_first_arg_on_ui_thread"><a href="#val-schedules_first_arg_on_ui_thread" class="anchor"></a><code><span class="keyword">val</span> schedules_first_arg_on_ui_thread : <a href="../IR/Tenv/index.html#type-t">IR.Tenv.t</a> <span>&#45;&gt;</span> <a href="../IR/Procname/index.html#type-t">IR.Procname.t</a> <span>&#45;&gt;</span> bool</code></dt><dd><p>method call known to directly schedule the runnable object provided as first procedure argument on the UI thread</p></dd></dl><dl><dt class="spec value" id="val-schedules_second_arg_on_ui_thread"><a href="#val-schedules_second_arg_on_ui_thread" class="anchor"></a><code><span class="keyword">val</span> schedules_second_arg_on_ui_thread : <a href="../IR/Tenv/index.html#type-t">IR.Tenv.t</a> <span>&#45;&gt;</span> <a href="../IR/Procname/index.html#type-t">IR.Procname.t</a> <span>&#45;&gt;</span> bool</code></dt><dd><p>method call known to directly schedule the runnable object provided as second procedure argument on a background thread</p></dd></dl><dl><dt class="spec value" id="val-schedules_first_arg_on_bg_thread"><a href="#val-schedules_first_arg_on_bg_thread" class="anchor"></a><code><span class="keyword">val</span> schedules_first_arg_on_bg_thread : <a href="../IR/Tenv/index.html#type-t">IR.Tenv.t</a> <span>&#45;&gt;</span> <a href="../IR/Procname/index.html#type-t">IR.Procname.t</a> <span>&#45;&gt;</span> bool</code></dt><dd><p>method call known to directly the runnable object provided as first procedure argument on a background thread</p></dd></dl><dl><dt class="spec value" id="val-is_getMainLooper"><a href="#val-is_getMainLooper" class="anchor"></a><code><span class="keyword">val</span> is_getMainLooper : <a href="../IR/Tenv/index.html#type-t">IR.Tenv.t</a> <span>&#45;&gt;</span> <a href="../IR/Procname/index.html#type-t">IR.Procname.t</a> <span>&#45;&gt;</span> <span><a href="../Absint/HilExp/index.html#type-t">Absint.HilExp.t</a> list</span> <span>&#45;&gt;</span> bool</code></dt><dt class="spec value" id="val-is_handler_constructor"><a href="#val-is_handler_constructor" class="anchor"></a><code><span class="keyword">val</span> is_handler_constructor : <a href="../IR/Tenv/index.html#type-t">IR.Tenv.t</a> <span>&#45;&gt;</span> <a href="../IR/Procname/index.html#type-t">IR.Procname.t</a> <span>&#45;&gt;</span> <span><a href="../Absint/HilExp/index.html#type-t">Absint.HilExp.t</a> list</span> <span>&#45;&gt;</span> bool</code></dt><dt class="spec value" id="val-is_thread_constructor"><a href="#val-is_thread_constructor" class="anchor"></a><code><span class="keyword">val</span> is_thread_constructor : <a href="../IR/Tenv/index.html#type-t">IR.Tenv.t</a> <span>&#45;&gt;</span> <a href="../IR/Procname/index.html#type-t">IR.Procname.t</a> <span>&#45;&gt;</span> <span><a href="../Absint/HilExp/index.html#type-t">Absint.HilExp.t</a> list</span> <span>&#45;&gt;</span> bool</code></dt><dt class="spec value" id="val-is_future_get"><a href="#val-is_future_get" class="anchor"></a><code><span class="keyword">val</span> is_future_get : <a href="../IR/Tenv/index.html#type-t">IR.Tenv.t</a> <span>&#45;&gt;</span> <a href="../IR/Procname/index.html#type-t">IR.Procname.t</a> <span>&#45;&gt;</span> <span><a href="../Absint/HilExp/index.html#type-t">Absint.HilExp.t</a> list</span> <span>&#45;&gt;</span> bool</code></dt><dt class="spec value" id="val-is_future_is_done"><a href="#val-is_future_is_done" class="anchor"></a><code><span class="keyword">val</span> is_future_is_done : <a href="../IR/Tenv/index.html#type-t">IR.Tenv.t</a> <span>&#45;&gt;</span> <a href="../IR/Procname/index.html#type-t">IR.Procname.t</a> <span>&#45;&gt;</span> <span><a href="../Absint/HilExp/index.html#type-t">Absint.HilExp.t</a> list</span> <span>&#45;&gt;</span> bool</code></dt><dt class="spec value" id="val-is_assume_true"><a href="#val-is_assume_true" class="anchor"></a><code><span class="keyword">val</span> is_assume_true : <a href="../IR/Tenv/index.html#type-t">IR.Tenv.t</a> <span>&#45;&gt;</span> <a href="../IR/Procname/index.html#type-t">IR.Procname.t</a> <span>&#45;&gt;</span> <span><a href="../Absint/HilExp/index.html#type-t">Absint.HilExp.t</a> list</span> <span>&#45;&gt;</span> bool</code></dt><dd><p>is the callee equivalent to assuming its first argument true</p></dd></dl><dl><dt class="spec value" id="val-is_java_main_method"><a href="#val-is_java_main_method" class="anchor"></a><code><span class="keyword">val</span> is_java_main_method : <a href="../IR/Procname/index.html#type-t">IR.Procname.t</a> <span>&#45;&gt;</span> bool</code></dt><dd><p>does the method look like a Java <code>main</code></p></dd></dl></div></body></html>