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>IR__Errlog (infer.IR__Errlog)</title><linkrel="stylesheet"href="../../odoc.css"/><metacharset="utf-8"/><metaname="generator"content="odoc 1.5.0"/><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>» IR__Errlog</nav><h1>Module <code>IR__Errlog</code></h1></header><aside><p>Module for error logs.</p></aside><dl><dtclass="spec type"id="type-node_tag"><ahref="#type-node_tag"class="anchor"></a><code><spanclass="keyword">type</span> node_tag</code><code> = </code><tableclass="variant"><trid="type-node_tag.Condition"class="anchored"><tdclass="def constructor"><ahref="#type-node_tag.Condition"class="anchor"></a><code>| </code><code><spanclass="constructor">Condition</span><spanclass="keyword">of</span> bool</code></td></tr><trid="type-node_tag.Exception"class="anchored"><tdclass="def constructor"><ahref="#type-node_tag.Exception"class="anchor"></a><code>| </code><code><spanclass="constructor">Exception</span><spanclass="keyword">of</span><ahref="../IR/Typ/index.html#type-name">IR.Typ.name</a></code></td></tr><trid="type-node_tag.Procedure_start"class="anchored"><tdclass="def constructor"><ahref="#type-node_tag.Procedure_start"class="anchor"></a><code>| </code><code><spanclass="constructor">Procedure_start</span><spanclass="keyword">of</span><ahref="../IR/Procname/index.html#type-t">IR.Procname.t</a></code></td></tr><trid="type-node_tag.Procedure_end"class="anchored"><tdclass="def constructor"><ahref="#type-node_tag.Procedure_end"class="anchor"></a><code>| </code><code><spanclass="constructor">Procedure_end</span><spanclass="keyword">of</span><ahref="../IR/Procname/index.html#type-t">IR.Procname.t</a></code></td></tr></table></dt><dtclass="spec type"id="type-loc_trace_elem"><ahref="#type-loc_trace_elem"class="anchor"></a><code><spanclass="keyword">type</span> loc_trace_elem</code><code> = <spanclass="keyword">private</span></code><code>{</code><tableclass="record"><trid="type-loc_trace_elem.lt_level"class="anchored"><tdclass="def field"><ahref="#type-loc_trace_elem.lt_level"class="anchor"></a><code>lt_level : int;</code></td><tdclass="doc"><p>nesting level of procedure calls</p></td></tr><trid="type-loc_trace_elem.lt_loc"class="anchored"><tdclass="def field"><ahref="#type-loc_trace_elem.lt_loc"class="anchor"></a><code>lt_loc : <ahref="../IBase/Location/index.html#type-t">IBase.Location.t</a>;</code></td><tdclass="doc"><p>source location at the current step in the trace</p></td></tr><trid="type-loc_trace_elem.lt_description"class="anchored"><tdclass="def field"><ahref="#type-loc_trace_elem.lt_description"class="anchor"></a><code>lt_description : string;</code></td><tdclass="doc"><p>description of the current step in the trace</p></td></tr><trid="type-loc_trace_elem.lt_node_tags"class="anchored"><tdclass="def field"><ahref="#type-loc_trace_elem.lt_node_tags"class="anchor"></a><code>lt_node_tags : <span><ahref="index.html#type-node_tag">node_tag</a> list</span>;</code></td><tdclass="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><dtclass="spec value"id="val-make_trace_element"><ahref="#val-make_trace_element"class="anchor"></a><code><spanclass="keyword">val</span> make_trace_element : int <span>-></span><ahref="../IBase/Location/index.html#type-t">IBase.Location.t</a><span>-></span> string <span>-></span><span><ahref="index.html#type-node_tag">node_tag</a> list</span><span>-></span><ahref="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><dtclass="spec type"id="type-loc_trace"><ahref="#type-loc_trace"class="anchor"></a><code><spanclass="keyword">type</span> loc_trace</code><code> = <span><ahref="index.html#type-loc_trace_elem">loc_trace_elem</a> list</span></code></dt><dd><p>Trace of locations</p></dd></dl><dl><dtclass="spec value"id="val-concat_traces"><ahref="#val-concat_traces"class="anchor"></a><code><spanclass="keyword">val</span> concat_traces : <span><span>(string * <ahref="index.html#type-loc_trace">loc_trace</a>)</span> list</span><span>-></span><ahref="index.html#type-loc_trace">loc_trace</a></code></dt><dtclass="spec value"id="val-compute_local_exception_line"><ahref="#val-compute_local_exception_line"class="anchor"></a><code><spanclass="keyword">val</span> compute_local_exception_line : <ahref="index.html#type-loc_trace">loc_trace</a><span>-></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><dtclass="spec type"id="type-node"><ahref="#type-node"class="anchor"></a><code><spanclass="keyword">type</span> node</code><code> = </code><tableclass="variant"><trid="type-node.UnknownNode"class="anchored"><tdclass="def constructor"><ahref="#type-node.UnknownNode"class="anchor"></a><code>| </code><code><spanclass="constructor">UnknownNode</span></code></td></tr><trid="type-node.FrontendNode"class="anchored"><tdclass="def constructor"><ahref="#type-node.FrontendNode"class="anchor"></a><code>| </code><code><spanclass="constructor">FrontendNode</span><spanclass="keyword">of</span></code><code>{</code><tableclass="record"><trid="type-node.node_key"class="anchored"><tdclass="def field"><ahref="#type-node.node_key"class="anchor"></a><code>node_key : <ahref="../IR/Procdesc/NodeKey/index.html#type-t">IR.Procdesc.NodeKey.t</a>;</code></td></tr></table><code>}</code></td></tr><trid="type-node.BackendNode"class="anchored"><tdclass="def constructor"><ahref="#type-node.BackendNode"class="anchor"></a><code>| </code><code><spanclass="constructor">BackendNode</span><spanclass="keyword">of</span></code><code>{</code><tableclass="record"><trid="type-node.node"class="anchored"><tdclass="def field"><ahref="#type-node.node"class="anchor"></a><code>node : <ahref="../IR/Procdesc/Node/index.html#type-t">IR.Procdesc.Node.t</a>;</code></td></tr></table><code>}</code></td></tr></table></dt><dtclass="spec type"id="type-err_key"><ahref="#type-err_key"class="anchor"></a><code><spanclass="keyword">type</span> err_key</code><code> = <spanclass="keyword">private</span></code><code>{</code><tableclass="record"><trid="type-err_key.severity"class="anchored"><tdclass="def field"><ahref="#type-err_key.severity"class="anchor"></a><code>severity : <ahref="../IR/Exceptions/index.html#type-severity">IR.Exceptions.severity</a>;</code></td></tr><trid="type-err_key.err_name"class="anchored"><tdclass="def field"><ahref="#type-err_key.err_name"class="anchor"></a><code>err_name : <ahref="../IBase/IssueType/index.html#type-t">IBase.IssueType.t</a>;</code></td></tr><trid="type-err_key.err_desc"class="anchored"><tdclass="def field"><ahref="#type-err_key.err_desc"class="anchor"></a><code>err_desc : <ahref="../IR/Localise/index.html#type-error_desc">IR.Localise.error_desc</a>;</code></td></tr></table><code>}</code></dt></dl><div><divclass="spec include"><divclass="doc"><dl><dtclass="spec value"id="val-compare_err_key"><ahref="#val-compare_err_key"class="anchor"></a><code><spanclass="keyword">val</span> compare_err_key : <ahref="index.html#type-err_key">err_key</a><span>-></span><ahref="index.html#type-err_key">err_key</a><span>-></span> int</code></dt></dl></div></div></div><dl><dtclass="spec type"id="type-err_data"><ahref="#type-err_data"class="anchor"></a><code><spanclass="keyword">type</span> err_data</code><code> = <spanclass="keyword">private</span></code><code>{</code><tableclass="record"><trid="type-err_data.node_id"class="anchored"><tdclass="def field"><ahref="#type-err_data.node_id"class="anchor"></a><code>node_id : int;</code></td></tr><trid="type-err_data.node_key"class="anchored"><tdclass="def field"><ahref="#type-err_data.node_key"class="anchor"></a><code>node_key : <span><ahref="../IR/Procdesc/NodeKey/index.html#type-t">IR.Procdesc.NodeKey.t</a> option</span>;</code></td></tr><trid="type-err_data.session"class="anchored"><tdclass="def field"><ahref="#type-err_data.session"class="anchor"></a><code>session : int;</code></td></tr><trid="type-err_data.loc"class="anchored"><tdclass="def field"><ahref="#type-err_data.loc"class="anchor"></a><code>loc : <ahref="../IBase/Location/index.html#type-t">IBase.Location.t</a>;</code></td></tr><trid="type-err_data.loc_in_ml_source"class="anchored"><tdclass="def field"><ahref="#type-err_data.loc_in_ml_source"class="anchor"></a><code>loc_in_ml_source : <span><ahref="../IBase/Logging/index.html#type-ocaml_pos">IBase.Logging.ocaml_pos</a> option</span>;</code></td></tr><trid="type-err_data.loc_trace"class="anchored"><tdclass="def field"><ahref="#type-err_data.loc_trace"class="anchor"></a><code>loc_trace : <ahref="index.html#type-loc_trace">loc_trace</a>;</code></td></tr><trid="type-err_data.err_class"class="anchored"><tdclass="def field"><ahref="#type-err_data.err_class"class="anchor"></a><code>err_class : <ahref="../IR/Exceptions/index.html#type-err_class">IR.Exceptions.err_class</a>;</code></td></tr><trid="type-err_data.visibility"class="anchored"><tdclass="def field"><ahref="#type-err_data.visibility"class="anchor"></a><code>visibility : <ahref="../IR/Exceptions/index.html#type-visibility">IR.Exceptions.visibility</a>;</code></td></tr><trid="type-err_data.linters_def_file"class="anchored"><tdclass="def field"><ahref="#type-err_data.linters_def_file"class="anchor"></a><code>linters_def_file : <span>string option</span>;</code></td></tr><trid="type-err_data.doc_url"class="anchored"><tdclass="def field"><ahref="#type-err_data.doc_url"class="anchor"></a><code>doc_url : <span>string option</span>;</code></td><tdclass="doc"><p>url to documentation of the issue type</p></td></tr><trid="type-err_data.access"class="anchored"><tdclass="def field"><ahref="#type-err_data.access"class="anchor"></a><code>access : <span>string option</span>;</code></td></tr><trid="type-err_data.extras"class="anchored"><tdclass="def field"><ahref="#type-err_data.extras"class="anchor"></a><code>extras : <span><ahref="../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><divclass="spec include"><divclass="doc"><dl><dtclass="spec value"id="val-compare_err_data"><ahref="#val-compare_err_data"class="anchor"></a><code><spanclass="keyword">val</span> compare_err_data : <ahref="index.html#type-err_data">err_data</a><span>-></span><ahref="index.html#type-err_data">err_data</a><span>-></span> int</code></dt></dl></div></div></div><dl><dtclass="spec type"id="type-t"><ahref="#type-t"class="anchor"></a><code><spanclass="keyword">type</span> t</code></dt><dd><p>Type of the error log</p></dd></dl><dl><dtclass="spec value"id="val-empty"><ahref="#val-empty"class="anchor"></a><code><spanclass="keyword">val</span> empty : unit <span>-></span><ahref="index.html#type-t">t</a></code></dt><dd><p>Empty error log</p></dd></dl><dl><dtclass="spec type"id="type-iter_fun"><ahref="#type-iter_fun"class="anchor"></a><code><spanclass="keyword">type</span> iter_fun</code><code> = <ahref="index.html#type-err_key">err_key</a><span>-></span><ahref="index.html#type-err_data">err_data</a><span>-></span> unit</code></dt><dd><p>type of the function to be passed to iter</p></dd></dl><dl><dtclass="spec value"id="val-iter"><ahref="#val-iter"class="anchor"></a><code><spanclass="keyword">val</span> iter : <ahref="index.html#type-iter_fun">iter_fun</a><span>-></span><ahref="index.html#type-t">t</a><span>-></span> unit</code></dt><dd><p>Apply f to nodes and error names</p></dd></dl><dl><dtclass="spec value"id="val-fold"><ahref="#val-fold"class="anchor"></a><code><spanclass="keyword">val</span> fold : <span>(<ahref="index.html#type-err_key">err_key</a><span>-></span><ahref="index.html#type-err_data">err_data</a><span>-></span><spanclass="type-var">'a</span><span>-></span><spanclass="type-var">'a</span>)</span><span>-></span><ahref="index.html#type-t">t</a><span>-></span><spanclass="type-var">'a</span><span>-></span><spanclass="type-var">'a</span></code></dt><dtclass="spec value"id="val-pp_loc_trace_elem"><ahref="#val-pp_loc_trace_elem"class="anchor"></a><code><spanclass="keyword">val</span> pp_loc_trace_elem : Stdlib.Format.formatter <span>-></span><ahref="index.html#type-loc_trace_elem">loc_trace_elem</a><span>-></span> unit</code></dt><dtclass="spec value"id="val-pp_loc_trace"><ahref="#val-pp_loc_trace"class="anchor"></a><code><spanclass="keyword">val</span> pp_loc_trace : Stdlib.Format.formatter <span>-></span><ahref="index.html#type-loc_trace">loc_trace</a><span>-></span> unit</code></dt><dtclass="spec value"id="val-pp_errors"><ahref="#val-pp_errors"class="anchor"></a><code><spanclass="keyword">val</span> pp_errors : Stdlib.Format.formatter <span>-></span><ahref="index.html#type-t">t</a><span>-></span> unit</code></dt><dd><p>Print errors from error log</p></dd></dl><dl><dtclass="spec value"id="val-pp_warnings"><ahref="#val-pp_warnings"class="anchor"></a><code><spanclass="keyword">val</span> pp_warnings : Stdlib.Format.formatter <span>-></span><ahref="index.html#type-t">t</a><span>-></span> unit</code></dt><dd><p>Print warnings from error log</p></dd></dl><dl><dtclass="spec value"id="val-pp_html"><ahref="#val-pp_html"class="anchor"></a><code><spanclass="keyword">val</span> pp_html : <ahref="../IBase/SourceFile/index.html#type-t">IBase.SourceFile.t</a><span>-></span><ahref="../IBase/DB/Results_dir/index.html#type-path">IBase.DB.Results_dir.path</a><span>-></span> Stdlib.Format.formatter <span>-></span><ahref="index.html#type-t">t</a><span>-></span> unit</code></dt><dd><p>Print an error log in html format</p></dd></dl><dl><dtclass="spec value"id="val-update"><ahref="#val-update"class="anchor"></a><code><spanclass="keyword">val</span> update : <ahref="index.html#type-t">t</a><span>-></span><ahref="index.html#type-t">t</a><span>-></span> unit</code></dt><dd><p>Update an old error log with a new one</p></dd></dl><dl><dtclass="spec value"id="val-log_issue"><ahref="#val-log_issue"class="anchor"></a><code><spanclass="keyword">val</span> log_issue : <ahref="../IR/Exceptions/index.html#type-severity">IR.Exceptions.severity</a><span>-></span><ahref="index.html#type-t">t</a><span>-></span><span>loc:<ahref="../IBase/Location/index.html#type-t">IBase.Location.t</a></span><span>-></span><span>node:<ahref="index.html#type-node">node</a></span><span>-></span><span>session:int</span><span>-></span><span>ltr:<ahref="index.html#type-loc_trace">loc_trace</a></span><span>-></span><span>linters_def_file:<span>string option</span></span><span>-></span><span>doc_url:<span>string option</span></span><span>-></span><span>access:<span>string option</span></span><span>-></span><span>extras:<span><ahref="../ATDGenerated/Jsonbug_t/index.html#type-extra">ATDGenerated.Jsonbug_t.extra</a> option</span></span><span>-></span> exn <span>-></span> unit</code></dt></dl></div></body></html>