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.
<!DOCTYPE html>
<htmlxmlns="http://www.w3.org/1999/xhtml"><head><title>InferModules__Errdesc (infer.InferModules__Errdesc)</title><linkrel="stylesheet"href="../../odoc.css"/><metacharset="utf-8"/><metaname="viewport"content="width=device-width,initial-scale=1.0"/><metaname="generator"content="doc-ock-html v1.0.0-1-g1fc9bf0"/></head><body><navid="top"><ahref="../index.html">Up</a>—<spanclass="package">package <ahref="../index.html">infer</a></span></nav><header><h1><spanclass="keyword">Module</span><spanclass="module-path">InferModules__Errdesc</span></h1></header><p>Create descriptions of analysis errors</p><divclass="spec val"id="val-vpath_find"><ahref="#val-vpath_find"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>vpath_find : <ahref="../../InferIR/InferIR/Tenv/index.html#type-t">InferIR.Tenv.t</a><spanclass="keyword">‑></span><spanclass="type-var">'a</span><ahref="../InferModules/Prop/index.html#type-t">InferModules.Prop.t</a><spanclass="keyword">‑></span><ahref="../../InferIR/InferIR/Exp/index.html#type-t">InferIR.Exp.t</a><spanclass="keyword">‑></span><ahref="../../InferIR/InferIR/DecompiledExp/index.html#type-vpath">InferIR.DecompiledExp.vpath</a><spanclass="keyword"> * </span><ahref="../../InferIR/InferIR/Typ/index.html#type-t">InferIR.Typ.t</a> option</code></div><divclass="doc"><p>find the dexp, if any, where the given value is stored
also return the type of the value if found</p></div></div><divclass="spec val"id="val-hpred_is_open_resource"><ahref="#val-hpred_is_open_resource"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>hpred_is_open_resource : <ahref="../../InferIR/InferIR/Tenv/index.html#type-t">InferIR.Tenv.t</a><spanclass="keyword">‑></span><spanclass="type-var">'a</span><ahref="../InferModules/Prop/index.html#type-t">InferModules.Prop.t</a><spanclass="keyword">‑></span><ahref="../../InferIR/InferIR/Sil/index.html#type-hpred">InferIR.Sil.hpred</a><spanclass="keyword">‑></span><ahref="../../InferIR/InferIR/PredSymb/index.html#type-resource">InferIR.PredSymb.resource</a> option</code></div><divclass="doc"><p>Check whether the hpred is a |-> representing a resource in the Racquire state</p></div></div><divclass="spec val"id="val-find_normal_variable_funcall"><ahref="#val-find_normal_variable_funcall"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>find_normal_variable_funcall : <ahref="../../InferIR/InferIR/Procdesc/Node/index.html#type-t">InferIR.Procdesc.Node.t</a><spanclass="keyword">‑></span><ahref="../../InferIR/InferIR/Ident/index.html#type-t">InferIR.Ident.t</a><spanclass="keyword">‑></span> (<ahref="../../InferIR/InferIR/Exp/index.html#type-t">InferIR.Exp.t</a><spanclass="keyword"> * </span><ahref="../../InferIR/InferIR/Exp/index.html#type-t">InferIR.Exp.t</a> list<spanclass="keyword"> * </span><ahref="../../InferBase/InferBase/Location/index.html#type-t">InferBase.Location.t</a><spanclass="keyword"> * </span><ahref="../../InferIR/InferIR/CallFlags/index.html#type-t">InferIR.CallFlags.t</a>) option</code></div><divclass="doc"><p>Find the function call instruction used to initialize normal variable <codeclass="code">id</code>,
and return the function name and arguments</p></div></div><divclass="spec val"id="val-find_program_variable_assignment"><ahref="#val-find_program_variable_assignment"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>find_program_variable_assignment : <ahref="../../InferIR/InferIR/Procdesc/Node/index.html#type-t">InferIR.Procdesc.Node.t</a><spanclass="keyword">‑></span><ahref="../../InferIR/InferIR/Pvar/index.html#type-t">InferIR.Pvar.t</a><spanclass="keyword">‑></span> (<ahref="../../InferIR/InferIR/Procdesc/Node/index.html#type-t">InferIR.Procdesc.Node.t</a><spanclass="keyword"> * </span><ahref="../../InferIR/InferIR/Ident/index.html#type-t">InferIR.Ident.t</a>) option</code></div><divclass="doc"><p>Find a program variable assignment in the current node or straightline predecessor.</p></div></div><divclass="spec val"id="val-find_ident_assignment"><ahref="#val-find_ident_assignment"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>find_ident_assignment : <ahref="../../InferIR/InferIR/Procdesc/Node/index.html#type-t">InferIR.Procdesc.Node.t</a><spanclass="keyword">‑></span><ahref="../../InferIR/InferIR/Ident/index.html#type-t">InferIR.Ident.t</a><spanclass="keyword">‑></span> (<ahref="../../InferIR/InferIR/Procdesc/Node/index.html#type-t">InferIR.Procdesc.Node.t</a><spanclass="keyword"> * </span><ahref="../../InferIR/InferIR/Exp/index.html#type-t">InferIR.Exp.t</a>) option</code></div><divclass="doc"><p>Find a program variable assignment to id in the current node or predecessors.</p></div></div><divclass="spec val"id="val-find_boolean_assignment"><ahref="#val-find_boolean_assignment"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>find_boolean_assignment : <ahref="../../InferIR/InferIR/Procdesc/Node/index.html#type-t">InferIR.Procdesc.Node.t</a><spanclass="keyword">‑></span><ahref="../../InferIR/InferIR/Pvar/index.html#type-t">InferIR.Pvar.t</a><spanclass="keyword">‑></span> bool <spanclass="keyword">‑></span><ahref="../../InferIR/InferIR/Procdesc/Node/index.html#type-t">InferIR.Procdesc.Node.t</a> option</code></div><divclass="doc"><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></div></div><divclass="spec val"id="val-exp_rv_dexp"><ahref="#val-exp_rv_dexp"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>exp_rv_dexp : <ahref="../../InferIR/InferIR/Tenv/index.html#type-t">InferIR.Tenv.t</a><spanclass="keyword">‑></span><ahref="../../InferIR/InferIR/Procdesc/Node/index.html#type-t">InferIR.Procdesc.Node.t</a><spanclass="keyword">‑></span><ahref="../../InferIR/InferIR/Exp/index.html#type-t">InferIR.Exp.t</a><spanclass="keyword">‑></span><ahref="../../InferIR/InferIR/DecompiledExp/index.html#type-t">InferIR.DecompiledExp.t</a> option</code></div><divclass="doc"><p>describe rvalue <codeclass="code">e</code> as a dexp</p></div></div><divclass="spec val"id="val-explain_allocation_mismatch"><ahref="#val-explain_allocation_mismatch"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>explain_allocation_mismatch : <ahref="../../InferIR/InferIR/PredSymb/index.html#type-res_action">InferIR.PredSymb.res_action</a><spanclass="keyword">‑></span><ahref="../../InferIR/InferIR/PredSymb/index.html#type-res_action">InferIR.PredSymb.res_action</a><spanclass="keyword">‑></span><ahref="../../InferIR/InferIR/Localise/index.html#type-error_desc">InferIR.Localise.error_desc</a></code></div><divclass="doc"><p>Produce a description of a mismatch between an allocation function and a deallocation function</p></div></div><divclass="spec val"id="val-explain_array_access"><ahref="#val-explain_array_access"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>explain_array_access : <ahref="../../InferIR/InferIR/Typ/Procname/index.html#type-t">InferIR.Typ.Procname.t</a><spanclass="keyword">‑></span><ahref="../../InferIR/InferIR/Tenv/index.html#type-t">InferIR.Tenv.t</a><spanclass="keyword">‑></span><ahref="../../InferIR/InferIR/Localise/index.html#type-deref_str">InferIR.Localise.deref_str</a><spanclass="keyword">‑></span><spanclass="type-var">'a</span><ahref="../InferModules/Prop/index.html#type-t">InferModules.Prop.t</a><spanclass="keyword">‑></span><ahref="../../InferBase/InferBase/Location/index.html#type-t">InferBase.Location.t</a><spanclass="keyword">‑></span><ahref="../../InferIR/InferIR/Localise/index.html#type-error_desc">InferIR.Localise.error_desc</a></code></div><divclass="doc"><p>Produce a description of the array access performed in the current instruction, if any.</p></div></div><divclass="spec val"id="val-explain_class_cast_exception"><ahref="#val-explain_class_cast_exception"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>explain_class_cast_exception : <ahref="../../InferIR/InferIR/Tenv/index.html#type-t">InferIR.Tenv.t</a><spanclass="keyword">‑></span><ahref="../../InferIR/InferIR/Typ/Procname/index.html#type-t">InferIR.Typ.Procname.t</a> option <spanclass="keyword">‑></span><ahref="../../InferIR/InferIR/Exp/index.html#type-t">InferIR.Exp.t</a><spanclass="keyword">‑></span><ahref="../../InferIR/InferIR/Exp/index.html#type-t">InferIR.Exp.t</a><spanclass="keyword">‑></span><ahref="../../InferIR/InferIR/Exp/index.html#type-t">InferIR.Exp.t</a><spanclass="keyword">‑></span><ahref="../../InferIR/InferIR/Procdesc/Node/index.html#type-t">InferIR.Procdesc.Node.t</a><spanclass="keyword">‑></span><ahref="../../InferBase/InferBase/Location/index.html#type-t">InferBase.Location.t</a><spanclass="keyword">‑></span><ahref="../../InferIR/InferIR/Localise/index.html#type-error_desc">InferIR.Localise.error_desc</a></code></div><divclass="doc"><p>explain a class cast exception</p></div></div><divclass="spec val"id="val-explain_deallocate_stack_var"><ahref="#val-explain_deallocate_stack_var"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>explain_deallocate_stack_var : <ahref="../../InferIR/InferIR/Pvar/index.html#type-t">InferIR.Pvar.t</a><spanclass="keyword">‑></span><ahref="../../InferIR/InferIR/PredSymb/index.html#type-res_action">InferIR.PredSymb.res_action</a><spanclass="keyword">‑></span><ahref="../../InferIR/InferIR/Localise/index.html#type-error_desc">InferIR.Localise.error_desc</a></code></div><divclass="doc"><p>Explain a deallocate stack variable error</p></div></div><divclass="spec val"id="val-explain_deallocate_constant_string"><ahref="#val-explain_deallocate_constant_string"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>explain_deallocate_constant_string : string <spanclass="keyword">‑></span><ahref="../../InferIR/InferIR/PredSymb/index.html#type-res_action">InferIR.PredSymb.res_action</a><spanclass="keyword">‑></span><ahref="../../InferIR/InferIR/Localise/index.html#type-error_desc">InferIR.Localise.error_desc</a></code></div><divclass="doc"><p>Explain a deallocate constant string error</p></div></div><divclass="spec val"id="val-explain_dereference"><ahref="#val-explain_dereference"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>explain_dereference : <ahref="../../InferIR/InferIR/Typ/Procname/index.html#type-t">InferIR.Typ.Procname.t</a><spanclass="keyword">‑></span><ahref="../../InferIR/InferIR/Tenv/index.html#type-t">InferIR.Tenv.t</a><spanclass="keyword">‑></span> ?⁠use_buckets:bool <spanclass="keyword">‑></span> ?⁠is_nullable:bool <spanclass="keyword">‑></span> ?⁠is_premature_nil:bool <spanclass="keyword">‑></span><ahref="../../InferIR/InferIR/Localise/index.html#type-deref_str">InferIR.Localise.deref_str</a><spanclass="keyword">‑></span><spanclass="type-var">'a</span><ahref="../InferModules/Prop/index.html#type-t">InferModules.Prop.t</a><spanclass="keyword">‑></span><ahref="../../InferBase/InferBase/Location/index.html#type-t">InferBase.Location.t</a><spanclass="keyword">‑></span><ahref="../../InferIR/InferIR/Localise/index.html#type-error_desc">InferIR.Localise.error_desc</a></code></div><divclass="doc"><p>Produce a description of which expression is dereferenced in the current instruction, if any.</p></div></div><divclass="spec val"id="val-explain_dereference_as_caller_expression"><ahref="#val-explain_dereference_as_caller_expression"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>explain_dereference_as_caller_expression : <ahref="../../InferIR/InferIR/Typ/Procname/index.html#type-t">InferIR.Typ.Procname.t</a><spanclass="keyword">‑></span><ahref="../../InferIR/InferIR/Tenv/index.html#type-t">InferIR.Tenv.t</a><spanclass="keyword">‑></span> ?⁠use_buckets:bool <spanclass="keyword">‑></span><ahref="../../InferIR/InferIR/Localise/index.html#type-deref_str">InferIR.Localise.deref_str</a><spanclass="keyword">‑></span><spanclass="type-var">'a</span><ahref="../InferModules/Prop/index.html#type-t">InferModules.Prop.t</a><spanclass="keyword">‑></span><spanclass="type-var">'b</span><ahref="../InferModules/Prop/index.html#type-t">InferModules.Prop.t</a><spanclass="keyword">‑></span><ahref="../../InferIR/InferIR/Exp/index.html#type-t">InferIR.Exp.t</a><spanclass="keyword">‑></span><ahref="../../InferIR/InferIR/Procdesc/Node/index.html#type-t">InferIR.Procdesc.Node.t</a><spanclass="keyword">‑></span><ahref="../../InferBase/InferBase/Location/index.html#type-t">InferBase.Location.t</a><spanclass="keyword">‑></span><ahref="../../InferIR/InferIR/Pvar/index.html#type-t">InferIR.Pvar.t</a> list <spanclass="keyword">‑></span><ahref="../../InferIR/InferIR/Localise/index.html#type-error_desc">InferIR.Localise.error_desc</a></code></div><divclass="doc"><p>return a description explaining value <codeclass="code">exp</code> in <codeclass="code">prop</code> in terms of a source expression
using the formal parameters of the call</p></div></div><divclass="spec val"id="val-explain_divide_by_zero"><ahref="#val-explain_divide_by_zero"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>explain_divide_by_zero : <ahref="../../InferIR/InferIR/Tenv/index.html#type-t">InferIR.Tenv.t</a><spanclass="keyword">‑></span><ahref="../../InferIR/InferIR/Exp/index.html#type-t">InferIR.Exp.t</a><spanclass="keyword">‑></span><ahref="../../InferIR/InferIR/Procdesc/Node/index.html#type-t">InferIR.Procdesc.Node.t</a><spanclass="keyword">‑></span><ahref="../../InferBase/InferBase/Location/index.html#type-t">InferBase.Location.t</a><spanclass="keyword">‑></span><ahref="../../InferIR/InferIR/Localise/index.html#type-error_desc">InferIR.Localise.error_desc</a></code></div><divclass="doc"><p>explain a division by zero</p></div></div><divclass="spec val"id="val-explain_condition_always_true_false"><ahref="#val-explain_condition_always_true_false"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>explain_condition_always_true_false : <ahref="../../InferIR/InferIR/Tenv/index.html#type-t">InferIR.Tenv.t</a><spanclass="keyword">‑></span><ahref="../../InferIR/InferIR/IntLit/index.html#type-t">InferIR.IntLit.t</a><spanclass="keyword">‑></span><ahref="../../InferIR/InferIR/Exp/index.html#type-t">InferIR.Exp.t</a><spanclass="keyword">‑></span><ahref="../../InferIR/InferIR/Procdesc/Node/index.html#type-t">InferIR.Procdesc.Node.t</a><spanclass="keyword">‑></span><ahref="../../InferBase/InferBase/Location/index.html#type-t">InferBase.Location.t</a><spanclass="keyword">‑></span><ahref="../../InferIR/InferIR/Localise/index.html#type-error_desc">InferIR.Localise.error_desc</a></code></div><divclass="doc"><p>explain a condition which is always true or false</p></div></div><divclass="spec val"id="val-explain_unreachable_code_after"><ahref="#val-explain_unreachable_code_after"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>explain_unreachable_code_after : <ahref="../../InferBase/InferBase/Location/index.html#type-t">InferBase.Location.t</a><spanclass="keyword">‑></span><ahref="../../InferIR/InferIR/Localise/index.html#type-error_desc">InferIR.Localise.error_desc</a></code></div><divclass="doc"></div></div><divclass="spec val"id="val-explain_stack_variable_address_escape"><ahref="#val-explain_stack_variable_address_escape"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>explain_stack_variable_address_escape : <ahref="../../InferBase/InferBase/Location/index.html#type-t">InferBase.Location.t</a><spanclass="keyword">‑></span><ahref="../../InferIR/InferIR/Pvar/index.html#type-t">InferIR.Pvar.t</a><spanclass="keyword">‑></span><ahref="../../InferIR/InferIR/DecompiledExp/index.html#type-t">InferIR.DecompiledExp.t</a> option <spanclass="keyword">‑></span><ahref="../../InferIR/InferIR/Localise/index.html#type-error_desc">InferIR.Localise.error_desc</a></code></div><divclass="doc"><p>explain the escape of a stack variable address from its scope</p></div></div><divclass="spec val"id="val-explain_frontend_warning"><ahref="#val-explain_frontend_warning"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>explain_frontend_warning : string <spanclass="keyword">‑></span> string option <spanclass="keyword">‑></span><ahref="../../InferBase/InferBase/Location/index.html#type-t">InferBase.Location.t</a><spanclass="keyword">‑></span><ahref="../../InferIR/InferIR/Localise/index.html#type-error_desc">InferIR.Localise.error_desc</a></code></div><divclass="doc"><p>explain frontend warning</p></div></div><divclass="spec val"id="val-explain_unary_minus_applied_to_unsigned_expression"><ahref="#val-explain_unary_minus_applied_to_unsigned_expression"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>explain_unary_minus_applied_to_unsigned_expression : <ahref="../../InferIR/InferIR/Tenv/index.html#type-t">InferIR.Tenv.t</a><spanclass="keyword">‑></span><ahref="../../InferIR/InferIR/Exp/index.html#type-t">InferIR.Exp.t</a><spanclass="keyword">‑></span><ahref="../../InferIR/InferIR/Typ/index.html#type-t">InferIR.Typ.t</a><spanclass="keyword">‑></span><ahref="../../InferIR/InferIR/Procdesc/Node/index.html#type-t">InferIR.Procdesc.Node.t</a><spanclass="keyword">‑></span><ahref="../../InferBase/InferBase/Location/index.html#type-t">InferBase.Location.t</a><spanclass="keyword">‑></span><ahref="../../InferIR/InferIR/Localise/index.html#type-error_desc">InferIR.Localise.error_desc</a></code></div><divclass="doc"><p>explain unary minus applied to unsigned expression</p></div></div><divclass="spec val"id="val-explain_leak"><ahref="#val-explain_leak"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>explain_leak : <ahref="../../InferIR/InferIR/Tenv/index.html#type-t">InferIR.Tenv.t</a><spanclass="keyword">‑></span><ahref="../../InferIR/InferIR/Sil/index.html#type-hpred">InferIR.Sil.hpred</a><spanclass="keyword">‑></span><spanclass="type-var">'a</span><ahref="../InferModules/Prop/index.html#type-t">InferModules.Prop.t</a><spanclass="keyword">‑></span><ahref="../../InferIR/InferIR/PredSymb/index.html#type-t">InferIR.PredSymb.t</a> option <spanclass="keyword">‑></span> string option <spanclass="keyword">‑></span><ahref="../../InferIR/InferIR/Exceptions/index.html#type-visibility">InferIR.Exceptions.visibility</a><spanclass="keyword"> * </span><ahref="../../InferIR/InferIR/Localise/index.html#type-error_desc">InferIR.Localise.error_desc</a></code></div><divclass="doc"><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></div></div><divclass="spec val"id="val-explain_null_test_after_dereference"><ahref="#val-explain_null_test_after_dereference"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>explain_null_test_after_dereference : <ahref="../../InferIR/InferIR/Tenv/index.html#type-t">InferIR.Tenv.t</a><spanclass="keyword">‑></span><ahref="../../InferIR/InferIR/Exp/index.html#type-t">InferIR.Exp.t</a><spanclass="keyword">‑></span><ahref="../../InferIR/InferIR/Procdesc/Node/index.html#type-t">InferIR.Procdesc.Node.t</a><spanclass="keyword">‑></span> int <spanclass="keyword">‑></span><ahref="../../InferBase/InferBase/Location/index.html#type-t">InferBase.Location.t</a><spanclass="keyword">‑></span><ahref="../../InferIR/InferIR/Localise/index.html#type-error_desc">InferIR.Localise.error_desc</a></code></div><divclass="doc"><p>explain a test for NULL of a dereferenced pointer</p></div></div><divclass="spec val"id="val-warning_err"><ahref="#val-warning_err"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>warning_err : <ahref="../../InferBase/InferBase/Location/index.html#type-t">InferBase.Location.t</a><spanclass="keyword">‑></span> (<spanclass="type-var">'a</span>,Format.formatter,unit)<ahref="../../InferStdlib/InferStdlib/index.html#module-IStd">InferStdlib.IStd</a>.format <spanclass="keyword">‑></span><spanclass="type-var">'a</span></code></div><divclass="doc"><p>warn at the given location</p></div></div><divclass="spec val"id="val-find_outermost_dereference"><ahref="#val-find_outermost_dereference"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>find_outermost_dereference : <ahref="../../InferIR/InferIR/Tenv/index.html#type-t">InferIR.Tenv.t</a><spanclass="keyword">‑></span><ahref="../../InferIR/InferIR/Procdesc/Node/index.html#type-t">InferIR.Procdesc.Node.t</a><spanclass="keyword">‑></span><ahref="../../InferIR/InferIR/Exp/index.html#type-t">InferIR.Exp.t</a><spanclass="keyword">‑></span><ahref="../../InferIR/InferIR/DecompiledExp/index.html#type-t">InferIR.DecompiledExp.t</a> option</code></div><divclass="doc"></div></div><divclass="spec val"id="val-access_opt"><ahref="#val-access_opt"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>access_opt : ?⁠is_nullable:bool <spanclass="keyword">‑></span><ahref="../../InferIR/InferIR/Sil/index.html#type-inst">InferIR.Sil.inst</a><spanclass="keyword">‑></span><ahref="../../InferIR/InferIR/Localise/index.html#type-access">InferIR.Localise.access</a> option</code></div><divclass="doc"></div></div></body></html>