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.

9 lines
22 KiB

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Errdesc (infer.InferModules.Errdesc)</title><link rel="stylesheet" href="../../../odoc.css"/><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><meta name="generator" content="doc-ock-html v1.0.0-1-g1fc9bf0"/></head><body><nav id="top"><a href="../index.html">Up</a> &mdash; <span class="package">package <a href="../../index.html">infer</a></span></nav><header><h1><span class="keyword">Module</span> <span class="module-path">InferModules.Errdesc</span></h1></header><p>Create descriptions of analysis errors</p><div class="spec val" id="val-vpath_find"><a href="#val-vpath_find" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>vpath_find : <a href="../../../InferIR/InferIR/Tenv/index.html#type-t">InferIR.Tenv.t</a> <span class="keyword">&#8209;&gt;</span> <span class="type-var">'a</span> <a href="../Prop/index.html#type-t">Prop.t</a> <span class="keyword">&#8209;&gt;</span> <a href="../../../InferIR/InferIR/Exp/index.html#type-t">InferIR.Exp.t</a> <span class="keyword">&#8209;&gt;</span> <a href="../../../InferIR/InferIR/DecompiledExp/index.html#type-vpath">InferIR.DecompiledExp.vpath</a><span class="keyword"> * </span><a href="../../../InferIR/InferIR/Typ/index.html#type-t">InferIR.Typ.t</a> option</code></div><div class="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><div class="spec val" id="val-hpred_is_open_resource"><a href="#val-hpred_is_open_resource" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>hpred_is_open_resource : <a href="../../../InferIR/InferIR/Tenv/index.html#type-t">InferIR.Tenv.t</a> <span class="keyword">&#8209;&gt;</span> <span class="type-var">'a</span> <a href="../Prop/index.html#type-t">Prop.t</a> <span class="keyword">&#8209;&gt;</span> <a href="../../../InferIR/InferIR/Sil/index.html#type-hpred">InferIR.Sil.hpred</a> <span class="keyword">&#8209;&gt;</span> <a href="../../../InferIR/InferIR/PredSymb/index.html#type-resource">InferIR.PredSymb.resource</a> option</code></div><div class="doc"><p>Check whether the hpred is a |-&gt; representing a resource in the Racquire state</p></div></div><div class="spec val" id="val-find_normal_variable_funcall"><a href="#val-find_normal_variable_funcall" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>find_normal_variable_funcall : <a href="../../../InferIR/InferIR/Procdesc/Node/index.html#type-t">InferIR.Procdesc.Node.t</a> <span class="keyword">&#8209;&gt;</span> <a href="../../../InferIR/InferIR/Ident/index.html#type-t">InferIR.Ident.t</a> <span class="keyword">&#8209;&gt;</span> (<a href="../../../InferIR/InferIR/Exp/index.html#type-t">InferIR.Exp.t</a><span class="keyword"> * </span><a href="../../../InferIR/InferIR/Exp/index.html#type-t">InferIR.Exp.t</a> list<span class="keyword"> * </span><a href="../../../InferBase/InferBase/Location/index.html#type-t">InferBase.Location.t</a><span class="keyword"> * </span><a href="../../../InferIR/InferIR/CallFlags/index.html#type-t">InferIR.CallFlags.t</a>) option</code></div><div class="doc"><p>Find the function call instruction used to initialize normal variable <code class="code">id</code>,
and return the function name and arguments</p></div></div><div class="spec val" id="val-find_program_variable_assignment"><a href="#val-find_program_variable_assignment" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>find_program_variable_assignment : <a href="../../../InferIR/InferIR/Procdesc/Node/index.html#type-t">InferIR.Procdesc.Node.t</a> <span class="keyword">&#8209;&gt;</span> <a href="../../../InferIR/InferIR/Pvar/index.html#type-t">InferIR.Pvar.t</a> <span class="keyword">&#8209;&gt;</span> (<a href="../../../InferIR/InferIR/Procdesc/Node/index.html#type-t">InferIR.Procdesc.Node.t</a><span class="keyword"> * </span><a href="../../../InferIR/InferIR/Ident/index.html#type-t">InferIR.Ident.t</a>) option</code></div><div class="doc"><p>Find a program variable assignment in the current node or straightline predecessor.</p></div></div><div class="spec val" id="val-find_ident_assignment"><a href="#val-find_ident_assignment" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>find_ident_assignment : <a href="../../../InferIR/InferIR/Procdesc/Node/index.html#type-t">InferIR.Procdesc.Node.t</a> <span class="keyword">&#8209;&gt;</span> <a href="../../../InferIR/InferIR/Ident/index.html#type-t">InferIR.Ident.t</a> <span class="keyword">&#8209;&gt;</span> (<a href="../../../InferIR/InferIR/Procdesc/Node/index.html#type-t">InferIR.Procdesc.Node.t</a><span class="keyword"> * </span><a href="../../../InferIR/InferIR/Exp/index.html#type-t">InferIR.Exp.t</a>) option</code></div><div class="doc"><p>Find a program variable assignment to id in the current node or predecessors.</p></div></div><div class="spec val" id="val-find_boolean_assignment"><a href="#val-find_boolean_assignment" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>find_boolean_assignment : <a href="../../../InferIR/InferIR/Procdesc/Node/index.html#type-t">InferIR.Procdesc.Node.t</a> <span class="keyword">&#8209;&gt;</span> <a href="../../../InferIR/InferIR/Pvar/index.html#type-t">InferIR.Pvar.t</a> <span class="keyword">&#8209;&gt;</span> bool <span class="keyword">&#8209;&gt;</span> <a href="../../../InferIR/InferIR/Procdesc/Node/index.html#type-t">InferIR.Procdesc.Node.t</a> option</code></div><div class="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><div class="spec val" id="val-exp_rv_dexp"><a href="#val-exp_rv_dexp" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>exp_rv_dexp : <a href="../../../InferIR/InferIR/Tenv/index.html#type-t">InferIR.Tenv.t</a> <span class="keyword">&#8209;&gt;</span> <a href="../../../InferIR/InferIR/Procdesc/Node/index.html#type-t">InferIR.Procdesc.Node.t</a> <span class="keyword">&#8209;&gt;</span> <a href="../../../InferIR/InferIR/Exp/index.html#type-t">InferIR.Exp.t</a> <span class="keyword">&#8209;&gt;</span> <a href="../../../InferIR/InferIR/DecompiledExp/index.html#type-t">InferIR.DecompiledExp.t</a> option</code></div><div class="doc"><p>describe rvalue <code class="code">e</code> as a dexp</p></div></div><div class="spec val" id="val-explain_allocation_mismatch"><a href="#val-explain_allocation_mismatch" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>explain_allocation_mismatch : <a href="../../../InferIR/InferIR/PredSymb/index.html#type-res_action">InferIR.PredSymb.res_action</a> <span class="keyword">&#8209;&gt;</span> <a href="../../../InferIR/InferIR/PredSymb/index.html#type-res_action">InferIR.PredSymb.res_action</a> <span class="keyword">&#8209;&gt;</span> <a href="../../../InferIR/InferIR/Localise/index.html#type-error_desc">InferIR.Localise.error_desc</a></code></div><div class="doc"><p>Produce a description of a mismatch between an allocation function and a deallocation function</p></div></div><div class="spec val" id="val-explain_array_access"><a href="#val-explain_array_access" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>explain_array_access : <a href="../../../InferIR/InferIR/Typ/Procname/index.html#type-t">InferIR.Typ.Procname.t</a> <span class="keyword">&#8209;&gt;</span> <a href="../../../InferIR/InferIR/Tenv/index.html#type-t">InferIR.Tenv.t</a> <span class="keyword">&#8209;&gt;</span> <a href="../../../InferIR/InferIR/Localise/index.html#type-deref_str">InferIR.Localise.deref_str</a> <span class="keyword">&#8209;&gt;</span> <span class="type-var">'a</span> <a href="../Prop/index.html#type-t">Prop.t</a> <span class="keyword">&#8209;&gt;</span> <a href="../../../InferBase/InferBase/Location/index.html#type-t">InferBase.Location.t</a> <span class="keyword">&#8209;&gt;</span> <a href="../../../InferIR/InferIR/Localise/index.html#type-error_desc">InferIR.Localise.error_desc</a></code></div><div class="doc"><p>Produce a description of the array access performed in the current instruction, if any.</p></div></div><div class="spec val" id="val-explain_class_cast_exception"><a href="#val-explain_class_cast_exception" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>explain_class_cast_exception : <a href="../../../InferIR/InferIR/Tenv/index.html#type-t">InferIR.Tenv.t</a> <span class="keyword">&#8209;&gt;</span> <a href="../../../InferIR/InferIR/Typ/Procname/index.html#type-t">InferIR.Typ.Procname.t</a> option <span class="keyword">&#8209;&gt;</span> <a href="../../../InferIR/InferIR/Exp/index.html#type-t">InferIR.Exp.t</a> <span class="keyword">&#8209;&gt;</span> <a href="../../../InferIR/InferIR/Exp/index.html#type-t">InferIR.Exp.t</a> <span class="keyword">&#8209;&gt;</span> <a href="../../../InferIR/InferIR/Exp/index.html#type-t">InferIR.Exp.t</a> <span class="keyword">&#8209;&gt;</span> <a href="../../../InferIR/InferIR/Procdesc/Node/index.html#type-t">InferIR.Procdesc.Node.t</a> <span class="keyword">&#8209;&gt;</span> <a href="../../../InferBase/InferBase/Location/index.html#type-t">InferBase.Location.t</a> <span class="keyword">&#8209;&gt;</span> <a href="../../../InferIR/InferIR/Localise/index.html#type-error_desc">InferIR.Localise.error_desc</a></code></div><div class="doc"><p>explain a class cast exception</p></div></div><div class="spec val" id="val-explain_deallocate_stack_var"><a href="#val-explain_deallocate_stack_var" class="anchor"></a><div class="def val"><code><span class="keyword">val <
using the formal parameters of the call</p></div></div><div class="spec val" id="val-explain_divide_by_zero"><a href="#val-explain_divide_by_zero" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>explain_divide_by_zero : <a href="../../../InferIR/InferIR/Tenv/index.html#type-t">InferIR.Tenv.t</a> <span class="keyword">&#8209;&gt;</span> <a href="../../../InferIR/InferIR/Exp/index.html#type-t">InferIR.Exp.t</a> <span class="keyword">&#8209;&gt;</span> <a href="../../../InferIR/InferIR/Procdesc/Node/index.html#type-t">InferIR.Procdesc.Node.t</a> <span class="keyword">&#8209;&gt;</span> <a href="../../../InferBase/InferBase/Location/index.html#type-t">InferBase.Location.t</a> <span class="keyword">&#8209;&gt;</span> <a href="../../../InferIR/InferIR/Localise/index.html#type-error_desc">InferIR.Localise.error_desc</a></code></div><div class="doc"><p>explain a division by zero</p></div></div><div class="spec val" id="val-explain_condition_always_true_false"><a href="#val-explain_condition_always_true_false" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>explain_condition_always_true_false : <a href="../../../InferIR/InferIR/Tenv/index.html#type-t">InferIR.Tenv.t</a> <span class="keyword">&#8209;&gt;</span> <a href="../../../InferIR/InferIR/IntLit/index.html#type-t">InferIR.IntLit.t</a> <span class="keyword">&#8209;&gt;</span> <a href="../../../InferIR/InferIR/Exp/index.html#type-t">InferIR.Exp.t</a> <span class="keyword">&#8209;&gt;</span> <a href="../../../InferIR/InferIR/Procdesc/Node/index.html#type-t">InferIR.Procdesc.Node.t</a> <span class="keyword">&#8209;&gt;</span> <a href="../../../InferBase/InferBase/Location/index.html#type-t">InferBase.Location.t</a> <span class="keyword">&#8209;&gt;</span> <a href="../../../InferIR/InferIR/Localise/index.html#type-error_desc">InferIR.Localise.error_desc</a></code></div><div class="doc"><p>explain a condition which is always true or false</p></div></div><div class="spec val" id="val-explain_unreachable_code_after"><a href="#val-explain_unreachable_code_after" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>explain_unreachable_code_after : <a href="../../../InferBase/InferBase/Location/index.html#type-t">InferBase.Location.t</a> <span class="keyword">&#8209;&gt;</span> <a href="../../../InferIR/InferIR/Localise/index.html#type-error_desc">InferIR.Localise.error_desc</a></code></div><div class="doc"></div></div><div class="spec val" id="val-explain_stack_variable_address_escape"><a href="#val-explain_stack_variable_address_escape" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>explain_stack_variable_address_escape : <a href="../../../InferBase/InferBase/Location/index.html#type-t">InferBase.Location.t</a> <span class="keyword">&#8209;&gt;</span> <a href="../../../InferIR/InferIR/Pvar/index.html#type-t">InferIR.Pvar.t</a> <span class="keyword">&#8209;&gt;</span> <a href="../../../InferIR/InferIR/DecompiledExp/index.html#type-t">InferIR.DecompiledExp.t</a> option <span class="keyword">&#8209;&gt;</span> <a href="../../../InferIR/InferIR/Localise/index.html#type-error_desc">InferIR.Localise.error_desc</a></code></div><div class="doc"><p>explain the escape of a stack variable address from its scope</p></div></div><div class="spec val" id="val-explain_frontend_warning"><a href="#val-explain_frontend_warning" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>explain_frontend_warning : string <span class="keyword">&#8209;&gt;</span> string option <span class="keyword">&#8209;&gt;</span> <a href="../../../InferBase/InferBase/Location/index.html#type-t">InferBase.Location.t</a> <span class="keyword">&#8209;&gt;</span> <a href="../../../InferIR/InferIR/Localise/index.html#type-error_desc">InferIR.Localise.error_desc</a></code></div><div class="doc"><p>explain frontend warning</p></div></div><div class="spec val" id="val-explain_unary_minus_applied_to_unsigned_expression"><a href="#val-explain_unary_minus_applied_to_unsigned_expression" clas
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><div class="spec val" id="val-explain_null_test_after_dereference"><a href="#val-explain_null_test_after_dereference" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>explain_null_test_after_dereference : <a href="../../../InferIR/InferIR/Tenv/index.html#type-t">InferIR.Tenv.t</a> <span class="keyword">&#8209;&gt;</span> <a href="../../../InferIR/InferIR/Exp/index.html#type-t">InferIR.Exp.t</a> <span class="keyword">&#8209;&gt;</span> <a href="../../../InferIR/InferIR/Procdesc/Node/index.html#type-t">InferIR.Procdesc.Node.t</a> <span class="keyword">&#8209;&gt;</span> int <span class="keyword">&#8209;&gt;</span> <a href="../../../InferBase/InferBase/Location/index.html#type-t">InferBase.Location.t</a> <span class="keyword">&#8209;&gt;</span> <a href="../../../InferIR/InferIR/Localise/index.html#type-error_desc">InferIR.Localise.error_desc</a></code></div><div class="doc"><p>explain a test for NULL of a dereferenced pointer</p></div></div><div class="spec val" id="val-warning_err"><a href="#val-warning_err" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>warning_err : <a href="../../../InferBase/InferBase/Location/index.html#type-t">InferBase.Location.t</a> <span class="keyword">&#8209;&gt;</span> (<span class="type-var">'a</span>, Format.formatter, unit) <a href="../../../InferStdlib/InferStdlib/index.html#module-IStd">InferStdlib.IStd</a>.format <span class="keyword">&#8209;&gt;</span> <span class="type-var">'a</span></code></div><div class="doc"><p>warn at the given location</p></div></div><div class="spec val" id="val-find_outermost_dereference"><a href="#val-find_outermost_dereference" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>find_outermost_dereference : <a href="../../../InferIR/InferIR/Tenv/index.html#type-t">InferIR.Tenv.t</a> <span class="keyword">&#8209;&gt;</span> <a href="../../../InferIR/InferIR/Procdesc/Node/index.html#type-t">InferIR.Procdesc.Node.t</a> <span class="keyword">&#8209;&gt;</span> <a href="../../../InferIR/InferIR/Exp/index.html#type-t">InferIR.Exp.t</a> <span class="keyword">&#8209;&gt;</span> <a href="../../../InferIR/InferIR/DecompiledExp/index.html#type-t">InferIR.DecompiledExp.t</a> option</code></div><div class="doc"></div></div><div class="spec val" id="val-access_opt"><a href="#val-access_opt" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>access_opt : ?&#8288;is_nullable:bool <span class="keyword">&#8209;&gt;</span> <a href="../../../InferIR/InferIR/Sil/index.html#type-inst">InferIR.Sil.inst</a> <span class="keyword">&#8209;&gt;</span> <a href="../../../InferIR/InferIR/Localise/index.html#type-access">InferIR.Localise.access</a> option</code></div><div class="doc"></div></div></body></html>