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
5.7 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>Models (infer.Nullsafe.Models)</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; <a href="../index.html">Nullsafe</a> &#x00BB; Models</nav><h1>Module <code>Nullsafe.Models</code></h1></header><aside><p>Methods dealing with specific knowledge about code in important third libraries, standard libraries, etc</p></aside><dl><dt class="spec value" id="val-get_modelled_annotated_signature"><a href="#val-get_modelled_annotated_signature" class="anchor"></a><code><span class="keyword">val</span> get_modelled_annotated_signature : <span>is_callee_in_trust_list:bool</span> <span>&#45;&gt;</span> <a href="../../IR/Tenv/index.html#type-t">IR.Tenv.t</a> <span>&#45;&gt;</span> <a href="../../IR/ProcAttributes/index.html#type-t">IR.ProcAttributes.t</a> <span>&#45;&gt;</span> <a href="../AnnotatedSignature/index.html#type-t">AnnotatedSignature.t</a></code></dt><dd><p>Return the annotated signature of the procedure, taking into account models. External models take precedence over internal ones.</p></dd></dl><dl><dt class="spec value" id="val-is_check_not_null"><a href="#val-is_check_not_null" class="anchor"></a><code><span class="keyword">val</span> is_check_not_null : <a href="../../IR/Procname/Java/index.html#type-t">IR.Procname.Java.t</a> <span>&#45;&gt;</span> bool</code></dt><dd><p>Check if the procedure is one of the known methods asserting nullability of the object. Nullsafe should understand that both the argument and return value are non-nullable after the call.</p></dd></dl><dl><dt class="spec value" id="val-get_check_not_null_parameter"><a href="#val-get_check_not_null_parameter" class="anchor"></a><code><span class="keyword">val</span> get_check_not_null_parameter : <a href="../../IR/Procname/Java/index.html#type-t">IR.Procname.Java.t</a> <span>&#45;&gt;</span> <span>int option</span></code></dt><dd><p>Parameter number (starting from 1) for a procedure known to produce a non-nullable assertion. <code>None</code> if the function is not known to be an aseertion OR the parameter number is not known</p></dd></dl><dl><dt class="spec value" id="val-is_check_state"><a href="#val-is_check_state" class="anchor"></a><code><span class="keyword">val</span> is_check_state : <a href="../../IR/Procname/Java/index.html#type-t">IR.Procname.Java.t</a> <span>&#45;&gt;</span> bool</code></dt><dd><p>Check if the procedure is one of the known Preconditions.checkState.</p></dd></dl><dl><dt class="spec value" id="val-is_check_argument"><a href="#val-is_check_argument" class="anchor"></a><code><span class="keyword">val</span> is_check_argument : <a href="../../IR/Procname/Java/index.html#type-t">IR.Procname.Java.t</a> <span>&#45;&gt;</span> bool</code></dt><dd><p>Check if the procedure is one of the known Preconditions.checkArgument.</p></dd></dl><dl><dt class="spec value" id="val-is_noreturn"><a href="#val-is_noreturn" class="anchor"></a><code><span class="keyword">val</span> is_noreturn : <a href="../../IR/Procname/Java/index.html#type-t">IR.Procname.Java.t</a> <span>&#45;&gt;</span> bool</code></dt><dd><p>Check if the procedure does not return.</p></dd></dl><dl><dt class="spec value" id="val-is_true_on_null"><a href="#val-is_true_on_null" class="anchor"></a><code><span class="keyword">val</span> is_true_on_null : <a href="../../IR/Procname/Java/index.html#type-t">IR.Procname.Java.t</a> <span>&#45;&gt;</span> bool</code></dt><dd><p>Check if the procedure returns true on null.</p></dd></dl><dl><dt class="spec value" id="val-is_false_on_null"><a href="#val-is_false_on_null" class="anchor"></a><code><span class="keyword">val</span> is_false_on_null : <a href="../../IR/Procname/Java/index.html#type-t">IR.Procname.Java.t</a> <span>&#45;&gt;</span> bool</code></dt><dd><p>Check if the procedure returns false on null.</p></dd></dl><dl><dt class="spec value" id="val-is_containsKey"><a href="#val-is_containsKey" class="anchor"></a><code><span class="keyword">val</span> is_containsKey : <a href="../../IR/Procname/Java/index.html#type-t">IR.Procname.Java.t</a> <span>&#45;&gt;</span> bool</code></dt><dd><p>Check if the procedure is Map.containsKey().</p></dd></dl><dl><dt class="spec value" id="val-is_mapPut"><a href="#val-is_mapPut" class="anchor"></a><code><span class="keyword">val</span> is_mapPut : <a href="../../IR/Procname/Java/index.html#type-t">IR.Procname.Java.t</a> <span>&#45;&gt;</span> bool</code></dt><dd><p>Check if the procedure is Map.put().</p></dd></dl><dl><dt class="spec value" id="val-find_nonnullable_alternative"><a href="#val-find_nonnullable_alternative" class="anchor"></a><code><span class="keyword">val</span> find_nonnullable_alternative : <a href="../../IR/Procname/Java/index.html#type-t">IR.Procname.Java.t</a> <span>&#45;&gt;</span> <span><a href="../ModelTables/index.html#type-nonnull_alternative_method">ModelTables.nonnull_alternative_method</a> option</span></code></dt><dd><p>Check if a (nullable) method has a non-nullable alternative: A method that does the same as <code>proc_name</code> but asserts the result is not null before returning to the caller.</p></dd></dl><dl><dt class="spec value" id="val-is_field_nonnullable"><a href="#val-is_field_nonnullable" class="anchor"></a><code><span class="keyword">val</span> is_field_nonnullable : <a href="../../IR/Fieldname/index.html#type-t">IR.Fieldname.t</a> <span>&#45;&gt;</span> bool</code></dt><dd><p>Check if a given field is known to be a non-nullable</p></dd></dl></div></body></html>