This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden 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>
<htmlxmlns="http://www.w3.org/1999/xhtml"><head><title>Errdesc (infer.InferModules.Errdesc)</title><linkrel="stylesheet"href="../../../odoc.css"/><metacharset="utf-8"/><metaname="generator"content="odoc %%VERSION%%"/><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">InferModules</a>» Errdesc</nav><h1>Module <code>InferModules.Errdesc</code></h1></header><aside><p>Create descriptions of analysis errors</p></aside><dl><dtclass="spec value"id="val-vpath_find"><ahref="#val-vpath_find"class="anchor"></a><code><spanclass="keyword">val</span> vpath_find : <ahref="../../../InferIR/InferIR/Tenv/index.html#type-t">InferIR.Tenv.t</a><span>-></span><span><spanclass="type-var">'a</span><ahref="../Prop/index.html#type-t">Prop.t</a></span><span>-></span><ahref="../../../InferIR/InferIR/Exp/index.html#type-t">InferIR.Exp.t</a><span>-></span><ahref="../../../InferIR/InferIR/DecompiledExp/index.html#type-vpath">InferIR.DecompiledExp.vpath</a> * <span><ahref="../../../InferIR/InferIR/Typ/index.html#type-t">InferIR.Typ.t</a> option</span></code></dt><dd><p>find the dexp, if any, where the given value is stored also return the type of the value if found</p></dd></dl><dl><dtclass="spec value"id="val-hpred_is_open_resource"><ahref="#val-hpred_is_open_resource"class="anchor"></a><code><spanclass="keyword">val</span> hpred_is_open_resource : <ahref="../../../InferIR/InferIR/Tenv/index.html#type-t">InferIR.Tenv.t</a><span>-></span><span><spanclass="type-var">'a</span><ahref="../Prop/index.html#type-t">Prop.t</a></span><span>-></span><ahref="../../../InferIR/InferIR/Sil/index.html#type-hpred">InferIR.Sil.hpred</a><span>-></span><span><ahref="../../../InferIR/InferIR/PredSymb/index.html#type-resource">InferIR.PredSymb.resource</a> option</span></code></dt><dd><p>Check whether the hpred is a |-> representing a resource in the Racquire state</p></dd></dl><dl><dtclass="spec value"id="val-find_normal_variable_funcall"><ahref="#val-find_normal_variable_funcall"class="anchor"></a><code><spanclass="keyword">val</span> find_normal_variable_funcall : <ahref="../../../InferIR/InferIR/Procdesc/Node/index.html#type-t">InferIR.Procdesc.Node.t</a><span>-></span><ahref="../../../InferIR/InferIR/Ident/index.html#type-t">InferIR.Ident.t</a><span>-></span><span><span>(<ahref="../../../InferIR/InferIR/Exp/index.html#type-t">InferIR.Exp.t</a> * <span><ahref="../../../InferIR/InferIR/Exp/index.html#type-t">InferIR.Exp.t</a> list</span> * <ahref="../../../InferBase/InferBase/Location/index.html#type-t">InferBase.Location.t</a> * <ahref="../../../InferIR/InferIR/CallFlags/index.html#type-t">InferIR.CallFlags.t</a>)</span> option</span></code></dt><dd><p>Find the function call instruction used to initialize normal variable <code>id</code>, and return the function name and arguments</p></dd></dl><dl><dtclass="spec value"id="val-find_program_variable_assignment"><ahref="#val-find_program_variable_assignment"class="anchor"></a><code><spanclass="keyword">val</span> find_program_variable_assignment : <ahref="../../../InferIR/InferIR/Procdesc/Node/index.html#type-t">InferIR.Procdesc.Node.t</a><span>-></span><ahref="../../../InferIR/InferIR/Pvar/index.html#type-t">InferIR.Pvar.t</a><span>-></span><span><span>(<ahref="../../../InferIR/InferIR/Procdesc/Node/index.html#type-t">InferIR.Procdesc.Node.t</a> * <ahref="../../../InferIR/InferIR/Ident/index.html#type-t">InferIR.Ident.t</a>)</span> option</span></code></dt><dd><p>Find a program variable assignment in the current node or straightline predecessor.</p></dd></dl><dl><dtclass="spec value"id="val-find_ident_assignment"><ahref="#val-find_ident_assignment"class="anchor"></a><code><spanclass="keyword">val</span> find_ident_assignment : <ahref="../../../InferIR/InferIR/Procdesc/Node/index.html#type-t">InferIR.Procdesc.Node.t</a><span>-></span><ahref="../../../InferIR/InferIR/Ident/index.html#type-t">InferIR.Ident.t</a><span>-></span><span><span>(<ahref="../../../InferIR/InferIR/Procdesc/Node/index.html#type-t">InferIR.Procdesc.Node.t</a> * <ahref="../../../InferIR/InferIR/Exp/index.html#type-t">InferIR.Exp.t</a>)</span> option</span></code></dt><dd><p>Find a program variable assignment to id in the current node or predecessors.</p></dd></dl><dl><dtclass="spec value"id="val-find_boolean_assignment"><ahref="#val-find_boolean_assignment"class="anchor"></a><code><spanclass="keyword">val</span> find_boolean_assignment : <ahref="../../../InferIR/InferIR/Procdesc/Node/index.html#type-t">InferIR.Procdesc.Node.t</a><span>-></span><ahref="../../../InferIR/InferIR/Pvar/index.html#type-t">InferIR.Pvar.t</a><span>-></span> bool <span>-></span><span><ahref="../../../InferIR/InferIR/Procdesc/Node/index.html#type-t">InferIR.Procdesc.Node.t</a> option</span></code></dt><dd><p>Find a boolean assignment to a temporary variable holding a boolean condition. The boolean parameter indicates whether the true or false branch is required.</p></dd></dl><dl><dtclass="spec value"id="val-exp_rv_dexp"><ahref="#val-exp_rv_dexp"class="anchor"></a><code><spanclass="keyword">val</span> exp_rv_dexp : <ahref="../../../InferIR/InferIR/Tenv/index.html#type-t">InferIR.Tenv.t</a><span>-></span><ahref="../../../InferIR/InferIR/Procdesc/Node/index.html#type-t">InferIR.Procdesc.Node.t</a><span>-></span><ahref="../../../InferIR/InferIR/Exp/index.html#type-t">InferIR.Exp.t</a><span>-></span><span><ahref="../../../InferIR/InferIR/DecompiledExp/index.html#type-t">InferIR.DecompiledExp.t</a> option</span></code></dt><dd><p>describe rvalue <code>e</code> as a dexp</p></dd></dl><dl><dtclass="spec value"id="val-explain_allocation_mismatch"><ahref="#val-explain_allocation_mismatch"class="anchor"></a><code><spanclass="keyword">val</span> explain_allocation_mismatch : <ahref="../../../InferIR/InferIR/PredSymb/index.html#type-res_action">InferIR.PredSymb.res_action</a><span>-></span><ahref="../../../InferIR/InferIR/PredSymb/index.html#type-res_action">InferIR.PredSymb.res_action</a><span>-></span><ahref="../../../InferIR/InferIR/Localise/index.html#type-error_desc">InferIR.Localise.error_desc</a></code></dt><dd><p>Produce a description of a mismatch between an allocation function and a deallocation function</p></dd></dl><dl><dtclass="spec value"id="val-explain_array_access"><ahref="#val-explain_array_access"class="anchor"></a><code><spanclass="keyword">val</span> explain_array_access : <ahref="../../../InferIR/InferIR/Typ/Procname/index.html#type-t">InferIR.Typ.Procname.t</a><span>-></span><ahref="../../../InferIR/InferIR/Tenv/index.html#type-t">InferIR.Tenv.t</a><span>-></span><ahref="../../../InferIR/InferIR/Localise/index.html#type-deref_str">InferIR.Localise.deref_str</a><span>-></span><span><spanclass="type-var">'a</span><ahref="../Prop/index.html#type-t">Prop.t</a></span><span>-></span><ahref="../../../InferBase/InferBase/Location/index.html#type-t">InferBase.Location.t</a><span>-></span><ahref="../../../InferIR/InferIR/Localise/index.html#type-error_desc">InferIR.Localise.error_desc</a></code></dt><dd><p>Produce a description of the array access performed in the current instruction, if any.</p></dd></dl><dl><dtclass="spec value"id="val-explain_class_cast_exception"><ahref="#val-explain_class_cast_exception"class="anchor"></a><code><spanclass="keyword">val</span> explain_class_cast_exception : <ahref="../../../InferIR/InferIR/Tenv/index.html#type-t">InferIR.Tenv.t</a><span>-></span><span><ahref="../../../InferIR/InferIR/Typ/Procname/index.html#type-t">InferIR.Typ.Procname.t</a> option</span><span>-></span><ahref="../../../InferIR/InferIR/Exp/index.html#type-t">InferIR.Exp.t</a><span>-></span><ahref="../../../InferIR/InferIR/Exp/index.html#type-t">InferIR.Exp.t</a><span>-></span><ahref="../../../InferIR/InferIR/Exp/index.html#type-t">InferIR.Exp.t</a><span>-></span><ahref="../../../InferIR/InferIR/Procdesc/Node/index.html#type-t">InferIR.Procdesc.Node.t</a><span>-></span><ahref="../../../InferBase/InferBase/Location/index.html#type-t">InferBase.Location.t</a><span>-></span><ahref="../../../InferIR/InferIR/Localise/index.html#type-error_desc">InferIR.Localise.error_desc</a></code></dt><dd><p>explain a class cast exception</p></dd></dl><dl><dtclass="spec value"id="val-explain_deallocate_stack_var"><ahref="#val-explain_deallocate_stack_var"class="anchor"></a><code><spanclass="keyword">val</span> explain_deallocate_stack_var : <ahref="../../../InferIR/InferIR/Pvar/index.html#type-t">InferIR.Pvar.t</a><span>-></span><ahref="../../../InferIR/InferIR/PredSymb/index.html#type-res_action">InferIR.PredSymb.res_action</a><span>-></span><ahref="../../../InferIR/InferIR/Localise/index.html#type-error_desc">InferIR.Localise.error_desc</a></code></dt><dd><p>Explain a deallocate stack variable error</p></dd></dl><dl><dtclass="spec value"id="val-explain_deallocate_constant_string"><ahref="#val-explain_deallocate_constant_string"class="anchor"></a><code><spanclass="keyword">val</span> explain_deallocate_constant_string : string <span>-></span><ahref="../../../InferIR/InferIR/PredSymb/index.html#type-res_action">InferIR.PredSymb.res_action</a><span>-></span><ahref="../../../InferIR/InferIR/Localise/index.html#type-error_desc">InferIR.Localise.error_desc</a></code></dt><dd><p>Explain a deallocate constant string error</p></dd></dl><dl><dtclass="spec value"id="val-explain_dereference"><ahref="#val-explain_dereference"class="anchor"></a><code><spanclass="keyword">val</span> explain_dereference : <ahref="../../../InferIR/InferIR/Typ/Procname/index.html#type-t">InferIR.Typ.Procname.t</a><span>-></span><ahref="../../../InferIR/InferIR/Tenv/index.html#type-t">InferIR.Tenv.t</a><span>-></span><span>?⁠use_buckets:bool</span><span>-></span><span>?⁠is_nullable:bool</span><span>-></span><span>?⁠is_premature_nil:bool</span><span>-></span><ahref="../../../InferIR/InferIR/Localise/index.html#type-deref_str">InferIR.Localise.deref_str</a><span>-></span><span><spanclass="type-var">'a</span><ahref="../Prop/index.html#type-t">Prop.t</a></span><span>-></span><ahref="../../../InferBase/InferBase/Location/index.html#type-t">InferBase.Location.t</a><span>-></span><ahref="../../../InferIR/InferIR/Localise/index.html#type-error_desc">InferIR.Localise.error_desc</a></code></dt><dd><p>Produce a description of which expression is dereferenced in the current instruction, if any.</p></dd></dl><dl><dtclass="spec value"id="val-explain_dereference_as_caller_expression"><ahref="#val-explain_dereference_as_caller_expression"class="anchor"></a><code><spanclass="keyword">val</span> explain_dereference_as_caller_expression : <ahref="../../../InferIR/InferIR/Typ/Procname/index.html#type-t">InferIR.Typ.Procname.t</a><span>-></span><ahref="../../../InferIR/InferIR/Tenv/index.html#type-t">InferIR.Tenv.t</a><span>-></span><span>?⁠use_buckets:bool</span><span>-></span><ahref="../../../InferIR/InferIR/Localise/index.html#type-deref_str">InferIR.Localise.deref_str</a><span>-></span><span><spanclass="type-var">'a</span><ahref="../Prop/index.html#type-t">Prop.t</a></span><span>-></span><span><spanclass="type-var">'b</span><ahref="../Prop/index.html#type-t">Prop.t</a></span><span>-></span><ahref="../../../InferIR/InferIR/Exp/index.html#type-t">InferIR.Exp.t</a><span>-></span><ahref="../../../InferIR/InferIR/Procdesc/Node/index.html#type-t">InferIR.Procdesc.Node.t</a><span>-></span><ahref="../../../InferBase/InferBase/Location/index.html#type-t">InferBase.Location.t</a><span>-></span><span><ahref="../../../InferIR/InferIR/Pvar/index.html#type-t">InferIR.Pvar.t</a> list</span><span>-></span><ahref="../../../InferIR/InferIR/Localise/index.html#type-error_desc">InferIR.Localise.error_desc</a></code></dt><dd><p>return a description explaining value <code>exp</code> in <code>prop</code> in terms of a source expression using the formal parameters of the call</p></dd></dl><dl><dtclass="spec value"id="val-explain_divide_by_zero"><ahref="#val-explain_divide_by_zero"class="anchor"></a><code><spanclass="keyword">val</span> explain_divide_by_zero : <ahref="../../../InferIR/InferIR/Tenv/index.html#type-t">InferIR.Tenv.t</a><span>-></span><ahref="../../../InferIR/InferIR/Exp/index.html#type-t">InferIR.Exp.t</a><span>-></span><ahref="../../../InferIR/InferIR/Procdesc/Node/index.html#type-t">InferIR.Procdesc.Node.t</a><span>-></span><ahref="../../../InferBase/InferBase/Location/index.html#type-t">InferBase.Location.t</a><span>-></span><ahref="../../../InferIR/InferIR/Localise/index.html#type-error_desc">InferIR.Localise.error_desc</a></code></dt><dd><p>explain a division by zero</p></dd></dl><dl><dtclass="spec value"id="val-explain_condition_always_true_false"><ahref="#val-explain_condition_always_true_false"class="anchor"></a><code><spanclass="keyword">val</span> explain_condition_always_true_false : <ahref="../../../InferIR/InferIR/Tenv/index.html#type-t">InferIR.Tenv.t</a><span>-></span><ahref="../../../InferIR/InferIR/IntLit/index.html#type-t">InferIR.IntLit.t</a><span>-></span><ahref="../../../InferIR/InferIR/Exp/index.html#type-t">InferIR.Exp.t</a><span>-></span><ahref="../../../InferIR/InferIR/Procdesc/Node/index.html#type-t">InferIR.Procdesc.Node.t</a><span>-></span><ahref="../../../InferBase/InferBase/Location/index.html#type-t">InferBase.Location.t</a><span>-></span><ahref="../../../InferIR/InferIR/Localise/index.html#type-error_desc">InferIR.Localise.error_desc</a></code></dt><dd><p>explain a condition which is always true or false</p></dd></dl><dl><dtclass="spec value"id="val-explain_stack_variable_address_escape"><ahref="#val-explain_stack_variable_address_escape"class="anchor"></a><code><spanclass="keyword">val</span> explain_stack_variable_address_escape : <ahref="../../../InferBase/InferBase/Location/index.html#type-t">InferBase.Location.t</a><span>-></span><ahref="../../../InferIR/InferIR/Pvar/index.html#type-t">InferIR.Pvar.t</a><span>-></span><span><ahref="../../../InferIR/InferIR/DecompiledExp/index.html#type-t">InferIR.DecompiledExp.t</a> option</span><span>-></span><ahref="../../../InferIR/InferIR/Localise/index.html#type-error_desc">InferIR.Localise.error_desc</a></code></dt><dd><p>explain the escape of a stack variable address from its scope</p></dd></dl><dl><dtclass="spec value"id="val-explain_frontend_warning"><ahref="#val-explain_frontend_warning"class="anchor"></a><code><spanclass="keyword">val</span> explain_frontend_warning : string <span>-></span><span>string option</span><span>-></span><ahref="../../../InferBase/InferBase/Location/index.html#type-t">InferBase.Location.t</a><span>-></span><ahref="../../../InferIR/InferIR/Localise/index.html#type-error_desc">InferIR.Localise.error_desc</a></code></dt><dd><p>explain frontend warning</p></dd></dl><dl><dtclass="spec value"id="val-explain_unary_minus_applied_to_unsigned_expression"><ahref="#val-explain_unary_minus_applied_to_unsigned_expression"class="anchor"></a><code><spanclass="keyword">val</span> explain_unary_minus_applied_to_unsigned_expression : <ahref="../../../InferIR/InferIR/Tenv/index.html#type-t">InferIR.Tenv.t</a><span>-></span><ahref="../../../InferIR/InferIR/Exp/index.html#type-t">InferIR.Exp.t</a><span>-></span><ahref="../../../InferIR/InferIR/Typ/index.html#type-t">InferIR.Typ.t</a><span>-></span><ahref="../../../InferIR/InferIR/Procdesc/Node/index.html#type-t">InferIR.Procdesc.Node.t</a><span>-></span><ahref="../../../InferBase/InferBase/Location/index.html#type-t">InferBase.Location.t</a><span>-></span><ahref="../../../InferIR/InferIR/Localise/index.html#type-error_desc">InferIR.Localise.error_desc</a></code></dt><dd><p>explain unary minus applied to unsigned expression</p></dd></dl><dl><dtclass="spec value"id="val-explain_leak"><ahref="#val-explain_leak"class="anchor"></a><code><spanclass="keyword">val</span> explain_leak : <ahref="../../../InferIR/InferIR/Tenv/index.html#type-t">InferIR.Tenv.t</a><span>-></span><ahref="../../../InferIR/InferIR/Sil/index.html#type-hpred">InferIR.Sil.hpred</a><span>-></span><span><spanclass="type-var">'a</span><ahref="../Prop/index.html#type-t">Prop.t</a></span><span>-></span><span><ahref="../../../InferIR/InferIR/PredSymb/index.html#type-t">InferIR.PredSymb.t</a> option</span><span>-></span><span>string option</span><span>-></span><ahref="../../../InferIR/InferIR/Exceptions/index.html#type-visibility">InferIR.Exceptions.visibility</a> * <ahref="../../../InferIR/InferIR/Localise/index.html#type-error_desc">InferIR.Localise.error_desc</a></code></dt><dd><p>Produce a description of a leak by looking at the current state. If the current instruction is a variable nullify, blame the variable. If it is an abstraction, blame any variable nullify at the current node. If there is an alloc attribute, print the function call and line number.</p></dd></dl><dl><dtclass="spec value"id="val-explain_null_test_after_dereference"><ahref="#val-explain_null_test_after_dereference"class="anchor"></a><code><spanclass="keyword">val</span> explain_null_test_after_dereference : <ahref="../../../InferIR/InferIR/Tenv/index.html#type-t">InferIR.Tenv.t</a><span>-></span><ahref="../../../InferIR/InferIR/Exp/index.html#type-t">InferIR.Exp.t</a><span>-></span><ahref="../../../InferIR/InferIR/Procdesc/Node/index.html#type-t">InferIR.Procdesc.Node.t</a><span>-></span> int <span>-></span><ahref="../../../InferBase/InferBase/Location/index.html#type-t">InferBase.Location.t</a><span>-></span><ahref="../../../InferIR/InferIR/Localise/index.html#type-error_desc">InferIR.Localise.error_desc</a></code></dt><dd><p>explain a test for NULL of a dereferenced pointer</p></dd></dl><dl><dtclass="spec value"id="val-warning_err"><ahref="#val-warning_err"class="anchor"></a><code><spanclass="keyword">val</span> warning_err : <ahref="../../../InferBase/InferBase/Location/index.html#type-t">InferBase.Location.t</a><span>-></span><span><span>(<spanclass="type-var">'a</span>,Stdlib.Format.formatter,unit)</span><ahref="../../../InferStdlib/InferStdlib/index.html#module-IStd">InferStdlib.IStd</a>.format</span><span>-></span><spanclass="type-var">'a</span></code></dt><dd><p>warn at the given location</p></dd></dl><dl><dtclass="spec value"id="val-find_outermost_dereference"><ahref="#val-find_outermost_dereference"class="anchor"></a><code><spanclass="keyword">val</span> find_outermost_dereference : <ahref="../../../InferIR/InferIR/Tenv/index.html#type-t">InferIR.Tenv.t</a><span>-></span><ahref="../../../InferIR/InferIR/Procdesc/Node/index.html#type-t">InferIR.Procdesc.Node.t</a><span>-></span><ahref="../../../InferIR/InferIR/Exp/index.html#type-t">InferIR.Exp.t</a><span>-></span><span><ahref="../../../InferIR/InferIR/DecompiledExp/index.html#type-t">InferIR.DecompiledExp.t</a> option</span></code></dt><dtclass="spec value"id="val-access_opt"><ahref="#val-access_opt"class="anchor"></a><code><spanclass="keyword">val</span> access_opt : <span>?⁠is_nullable:bool</span><span>-></span><ahref="../../../InferIR/InferIR/Sil/index.html#type-inst">InferIR.Sil.inst</a><span>-></span><span><ahref="../../../InferIR/InferIR/Localise/index.html#type-access">InferIR.Localise.access</a> option</span></code></dt></dl></div></body></html>