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
16 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>Absint__Errlog (infer.Absint__Errlog)</title><link rel="stylesheet" href="../../odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 1.5.2"/><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; Absint__Errlog</nav><h1>Module <code>Absint__Errlog</code></h1></header><aside><p>Module for error logs.</p></aside><dl><dt class="spec type" id="type-node_tag"><a href="#type-node_tag" class="anchor"></a><code><span class="keyword">type</span> node_tag</code><code> = </code><table class="variant"><tr id="type-node_tag.Condition" class="anchored"><td class="def constructor"><a href="#type-node_tag.Condition" class="anchor"></a><code>| </code><code><span class="constructor">Condition</span> <span class="keyword">of</span> bool</code></td></tr><tr id="type-node_tag.Exception" class="anchored"><td class="def constructor"><a href="#type-node_tag.Exception" class="anchor"></a><code>| </code><code><span class="constructor">Exception</span> <span class="keyword">of</span> <a href="../IR/Typ/index.html#type-name">IR.Typ.name</a></code></td></tr><tr id="type-node_tag.Procedure_start" class="anchored"><td class="def constructor"><a href="#type-node_tag.Procedure_start" class="anchor"></a><code>| </code><code><span class="constructor">Procedure_start</span> <span class="keyword">of</span> <a href="../IR/Procname/index.html#type-t">IR.Procname.t</a></code></td></tr><tr id="type-node_tag.Procedure_end" class="anchored"><td class="def constructor"><a href="#type-node_tag.Procedure_end" class="anchor"></a><code>| </code><code><span class="constructor">Procedure_end</span> <span class="keyword">of</span> <a href="../IR/Procname/index.html#type-t">IR.Procname.t</a></code></td></tr></table></dt><dt class="spec type" id="type-loc_trace_elem"><a href="#type-loc_trace_elem" class="anchor"></a><code><span class="keyword">type</span> loc_trace_elem</code><code> = <span class="keyword">private</span> </code><code>{</code><table class="record"><tr id="type-loc_trace_elem.lt_level" class="anchored"><td class="def field"><a href="#type-loc_trace_elem.lt_level" class="anchor"></a><code>lt_level : int;</code></td><td class="doc"><p>nesting level of procedure calls</p></td></tr><tr id="type-loc_trace_elem.lt_loc" class="anchored"><td class="def field"><a href="#type-loc_trace_elem.lt_loc" class="anchor"></a><code>lt_loc : <a href="../IBase/Location/index.html#type-t">IBase.Location.t</a>;</code></td><td class="doc"><p>source location at the current step in the trace</p></td></tr><tr id="type-loc_trace_elem.lt_description" class="anchored"><td class="def field"><a href="#type-loc_trace_elem.lt_description" class="anchor"></a><code>lt_description : string;</code></td><td class="doc"><p>description of the current step in the trace</p></td></tr><tr id="type-loc_trace_elem.lt_node_tags" class="anchored"><td class="def field"><a href="#type-loc_trace_elem.lt_node_tags" class="anchor"></a><code>lt_node_tags : <span><a href="index.html#type-node_tag">node_tag</a> list</span>;</code></td><td class="doc"><p>tags describing the node at the current location</p></td></tr></table><code>}</code></dt><dd><p>Element of a loc trace</p></dd></dl><dl><dt class="spec value" id="val-make_trace_element"><a href="#val-make_trace_element" class="anchor"></a><code><span class="keyword">val</span> make_trace_element : int <span>&#45;&gt;</span> <a href="../IBase/Location/index.html#type-t">IBase.Location.t</a> <span>&#45;&gt;</span> string <span>&#45;&gt;</span> <span><a href="index.html#type-node_tag">node_tag</a> list</span> <span>&#45;&gt;</span> <a href="index.html#type-loc_trace_elem">loc_trace_elem</a></code></dt><dd><p>build a loc_trace_elem from its constituents (unambiguously identified by their types).</p></dd></dl><dl><dt class="spec type" id="type-loc_trace"><a href="#type-loc_trace" class="anchor"></a><code><span class="keyword">type</span> loc_trace</code><code> = <span><a href="index.html#type-loc_trace_elem">loc_trace_elem</a> list</span></code></dt><dd><p>Trace of locations</p></dd></dl><dl><dt class="spec value" id="val-concat_traces"><a href="#val-concat_traces" class="anchor"></a><code><span class="keyword">val</span> concat_traces : <span><span>(string * <a href="index.html#type-loc_trace">loc_trace</a>)</span> list</span> <span>&#45;&gt;</span> <a href="index.html#type-loc_trace">loc_trace</a></code></dt><dt class="spec value" id="val-compute_local_exception_line"><a href="#val-compute_local_exception_line" class="anchor"></a><code><span class="keyword">val</span> compute_local_exception_line : <a href="index.html#type-loc_trace">loc_trace</a> <span>&#45;&gt;</span> <span>int option</span></code></dt><dd><p>Look at all the trace steps and find those that are arising any exception, then bind them to the closest step at level 0. This extra information adds value to the report itself, and may avoid digging into the trace to understand the cause of the report.</p></dd></dl><dl><dt class="spec type" id="type-node"><a href="#type-node" class="anchor"></a><code><span class="keyword">type</span> node</code><code> = </code><table class="variant"><tr id="type-node.UnknownNode" class="anchored"><td class="def constructor"><a href="#type-node.UnknownNode" class="anchor"></a><code>| </code><code><span class="constructor">UnknownNode</span></code></td></tr><tr id="type-node.FrontendNode" class="anchored"><td class="def constructor"><a href="#type-node.FrontendNode" class="anchor"></a><code>| </code><code><span class="constructor">FrontendNode</span> <span class="keyword">of</span> </code><code>{</code><table class="record"><tr id="type-node.node_key" class="anchored"><td class="def field"><a href="#type-node.node_key" class="anchor"></a><code>node_key : <a href="../IR/Procdesc/NodeKey/index.html#type-t">IR.Procdesc.NodeKey.t</a>;</code></td></tr></table><code>}</code></td></tr><tr id="type-node.BackendNode" class="anchored"><td class="def constructor"><a href="#type-node.BackendNode" class="anchor"></a><code>| </code><code><span class="constructor">BackendNode</span> <span class="keyword">of</span> </code><code>{</code><table class="record"><tr id="type-node.node" class="anchored"><td class="def field"><a href="#type-node.node" class="anchor"></a><code>node : <a href="../IR/Procdesc/Node/index.html#type-t">IR.Procdesc.Node.t</a>;</code></td></tr></table><code>}</code></td></tr></table></dt><dt class="spec type" id="type-err_key"><a href="#type-err_key" class="anchor"></a><code><span class="keyword">type</span> err_key</code><code> = <span class="keyword">private</span> </code><code>{</code><table class="record"><tr id="type-err_key.severity" class="anchored"><td class="def field"><a href="#type-err_key.severity" class="anchor"></a><code>severity : <a href="../IBase/IssueType/index.html#type-severity">IBase.IssueType.severity</a>;</code></td></tr><tr id="type-err_key.issue_type" class="anchored"><td class="def field"><a href="#type-err_key.issue_type" class="anchor"></a><code>issue_type : <a href="../IBase/IssueType/index.html#type-t">IBase.IssueType.t</a>;</code></td></tr><tr id="type-err_key.err_desc" class="anchored"><td class="def field"><a href="#type-err_key.err_desc" class="anchor"></a><code>err_desc : <a href="../Absint/Localise/index.html#type-error_desc">Absint.Localise.error_desc</a>;</code></td></tr></table><code>}</code></dt></dl><div><div class="spec include"><div class="doc"><dl><dt class="spec value" id="val-compare_err_key"><a href="#val-compare_err_key" class="anchor"></a><code><span class="keyword">val</span> compare_err_key : <a href="index.html#type-err_key">err_key</a> <span>&#45;&gt;</span> <a href="index.html#type-err_key">err_key</a> <span>&#45;&gt;</span> int</code></dt></dl></div></div></div><dl><dt class="spec type" id="type-err_data"><a href="#type-err_data" class="anchor"></a><code><span class="keyword">type</span> err_data</code><code> = <span class="keyword">private</span> </code><code>{</code><table class="record"><tr id="type-err_data.node_id" class="anchored"><td class="def field"><a href="#type-err_data.node_id" class="anchor"></a><code>node_id : int;</code></td></tr><tr id="type-err_data.node_key" class="anchored"><td class="def field"><a href="#type-err_data.node_key" class="anchor"></a><code>node_key : <span><a href="../IR/Procdesc/NodeKey/index.html#type-t">IR.Procdesc.NodeKey.t</a> option</span>;</code></td></tr><tr id="type-err_data.session" class="anchored"><td class="def field"><a href="#type-err_data.session" class="anchor"></a><code>session : int;</code></td></tr><tr id="type-err_data.loc" class="anchored"><td class="def field"><a href="#type-err_data.loc" class="anchor"></a><code>loc : <a href="../IBase/Location/index.html#type-t">IBase.Location.t</a>;</code></td></tr><tr id="type-err_data.loc_in_ml_source" class="anchored"><td class="def field"><a href="#type-err_data.loc_in_ml_source" class="anchor"></a><code>loc_in_ml_source : <span><a href="../IBase/Logging/index.html#type-ocaml_pos">IBase.Logging.ocaml_pos</a> option</span>;</code></td></tr><tr id="type-err_data.loc_trace" class="anchored"><td class="def field"><a href="#type-err_data.loc_trace" class="anchor"></a><code>loc_trace : <a href="index.html#type-loc_trace">loc_trace</a>;</code></td></tr><tr id="type-err_data.visibility" class="anchored"><td class="def field"><a href="#type-err_data.visibility" class="anchor"></a><code>visibility : <a href="../IBase/IssueType/index.html#type-visibility">IBase.IssueType.visibility</a>;</code></td></tr><tr id="type-err_data.linters_def_file" class="anchored"><td class="def field"><a href="#type-err_data.linters_def_file" class="anchor"></a><code>linters_def_file : <span>string option</span>;</code></td></tr><tr id="type-err_data.doc_url" class="anchored"><td class="def field"><a href="#type-err_data.doc_url" class="anchor"></a><code>doc_url : <span>string option</span>;</code></td><td class="doc"><p>url to documentation of the issue type</p></td></tr><tr id="type-err_data.access" class="anchored"><td class="def field"><a href="#type-err_data.access" class="anchor"></a><code>access : <span>string option</span>;</code></td></tr><tr id="type-err_data.extras" class="anchored"><td class="def field"><a href="#type-err_data.extras" class="anchor"></a><code>extras : <span><a href="../ATDGenerated/Jsonbug_t/index.html#type-extra">ATDGenerated.Jsonbug_t.extra</a> option</span>;</code></td></tr></table><code>}</code></dt><dd><p>Data associated to a specific error</p></dd></dl><div><div class="spec include"><div class="doc"><dl><dt class="spec value" id="val-compare_err_data"><a href="#val-compare_err_data" class="anchor"></a><code><span class="keyword">val</span> compare_err_data : <a href="index.html#type-err_data">err_data</a> <span>&#45;&gt;</span> <a href="index.html#type-err_data">err_data</a> <span>&#45;&gt;</span> int</code></dt></dl></div></div></div><dl><dt class="spec type" id="type-t"><a href="#type-t" class="anchor"></a><code><span class="keyword">type</span> t</code></dt><dd><p>Type of the error log</p></dd></dl><dl><dt class="spec value" id="val-empty"><a href="#val-empty" class="anchor"></a><code><span class="keyword">val</span> empty : unit <span>&#45;&gt;</span> <a href="index.html#type-t">t</a></code></dt><dd><p>Empty error log</p></dd></dl><dl><dt class="spec type" id="type-iter_fun"><a href="#type-iter_fun" class="anchor"></a><code><span class="keyword">type</span> iter_fun</code><code> = <a href="index.html#type-err_key">err_key</a> <span>&#45;&gt;</span> <a href="index.html#type-err_data">err_data</a> <span>&#45;&gt;</span> unit</code></dt><dd><p>type of the function to be passed to iter</p></dd></dl><dl><dt class="spec value" id="val-iter"><a href="#val-iter" class="anchor"></a><code><span class="keyword">val</span> iter : <a href="index.html#type-iter_fun">iter_fun</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> unit</code></dt><dd><p>Apply f to nodes and error names</p></dd></dl><dl><dt class="spec value" id="val-fold"><a href="#val-fold" class="anchor"></a><code><span class="keyword">val</span> fold : <span>(<a href="index.html#type-err_key">err_key</a> <span>&#45;&gt;</span> <a href="index.html#type-err_data">err_data</a> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span class="type-var">'a</span>)</span> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span class="type-var">'a</span></code></dt><dt class="spec value" id="val-pp_loc_trace"><a href="#val-pp_loc_trace" class="anchor"></a><code><span class="keyword">val</span> pp_loc_trace : Stdlib.Format.formatter <span>&#45;&gt;</span> <a href="index.html#type-loc_trace">loc_trace</a> <span>&#45;&gt;</span> unit</code></dt><dt class="spec value" id="val-pp_errors"><a href="#val-pp_errors" class="anchor"></a><code><span class="keyword">val</span> pp_errors : Stdlib.Format.formatter <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> unit</code></dt><dd><p>Print errors from error log</p></dd></dl><dl><dt class="spec value" id="val-pp_warnings"><a href="#val-pp_warnings" class="anchor"></a><code><span class="keyword">val</span> pp_warnings : Stdlib.Format.formatter <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> unit</code></dt><dd><p>Print warnings from error log</p></dd></dl><dl><dt class="spec value" id="val-pp_html"><a href="#val-pp_html" class="anchor"></a><code><span class="keyword">val</span> pp_html : <a href="../IBase/SourceFile/index.html#type-t">IBase.SourceFile.t</a> <span>&#45;&gt;</span> <a href="../IBase/DB/Results_dir/index.html#type-path">IBase.DB.Results_dir.path</a> <span>&#45;&gt;</span> Stdlib.Format.formatter <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> unit</code></dt><dd><p>Print an error log in html format</p></dd></dl><dl><dt class="spec value" id="val-update"><a href="#val-update" class="anchor"></a><code><span class="keyword">val</span> update : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> unit</code></dt><dd><p>Update an old error log with a new one</p></dd></dl><dl><dt class="spec value" id="val-log_issue"><a href="#val-log_issue" class="anchor"></a><code><span class="keyword">val</span> log_issue : <span>?&#8288;severity_override:<a href="../IBase/IssueType/index.html#type-severity">IBase.IssueType.severity</a></span> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <span>loc:<a href="../IBase/Location/index.html#type-t">IBase.Location.t</a></span> <span>&#45;&gt;</span> <span>node:<a href="index.html#type-node">node</a></span> <span>&#45;&gt;</span> <span>session:int</span> <span>&#45;&gt;</span> <span>ltr:<a href="index.html#type-loc_trace">loc_trace</a></span> <span>&#45;&gt;</span> <span>linters_def_file:<span>string option</span></span> <span>&#45;&gt;</span> <span>doc_url:<span>string option</span></span> <span>&#45;&gt;</span> <span>access:<span>string option</span></span> <span>&#45;&gt;</span> <span>extras:<span><a href="../ATDGenerated/Jsonbug_t/index.html#type-extra">ATDGenerated.Jsonbug_t.extra</a> option</span></span> <span>&#45;&gt;</span> <a href="../IBase/Checker/index.html#type-t">IBase.Checker.t</a> <span>&#45;&gt;</span> <a href="../Absint/IssueToReport/index.html#type-t">Absint.IssueToReport.t</a> <span>&#45;&gt;</span> unit</code></dt></dl></div></body></html>