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>Backend__CallGraph (infer.Backend__CallGraph)</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>» Backend__CallGraph</nav><h1>Module <code>Backend__CallGraph</code></h1></header><divclass="spec module"id="module-F"><ahref="#module-F"class="anchor"></a><code><spanclass="keyword">module</span> F = Stdlib.Format</code></div><divclass="spec module-type"id="module-type-NodeSig"><ahref="#module-type-NodeSig"class="anchor"></a><code><spanclass="keyword">module</span><spanclass="keyword">type</span><ahref="module-type-NodeSig/index.html">NodeSig</a> = <spanclass="keyword">sig</span> ... <spanclass="keyword">end</span></code></div><divclass="spec module"id="module-Node"><ahref="#module-Node"class="anchor"></a><code><spanclass="keyword">module</span><ahref="Node/index.html">Node</a> : <ahref="index.html#module-type-NodeSig">NodeSig</a></code></div><dl><dtclass="spec type"id="type-t"><ahref="#type-t"class="anchor"></a><code><spanclass="keyword">type</span> t</code></dt></dl><dl><dtclass="spec value"id="val-reset"><ahref="#val-reset"class="anchor"></a><code><spanclass="keyword">val</span> reset : <ahref="index.html#type-t">t</a><span>-></span> unit</code></dt><dd><p>empty the graph and shrink it to its initial size</p></dd></dl><dl><dtclass="spec value"id="val-create"><ahref="#val-create"class="anchor"></a><code><spanclass="keyword">val</span> create : int <span>-></span><ahref="index.html#type-t">t</a></code></dt><dd><p><code>create n</code> makes an empty graph with initial capacity <code>n</code> which grows as required</p></dd></dl><dl><dtclass="spec value"id="val-n_procs"><ahref="#val-n_procs"class="anchor"></a><code><spanclass="keyword">val</span> n_procs : <ahref="index.html#type-t">t</a><span>-></span> int</code></dt><dd><p>number of procedures in graph</p></dd></dl><dl><dtclass="spec value"id="val-mem"><ahref="#val-mem"class="anchor"></a><code><spanclass="keyword">val</span> mem : <ahref="index.html#type-t">t</a><span>-></span> int <span>-></span> bool</code></dt><dd><p>is an int <code>id</code> the index of a node in the graph?</p></dd></dl><dl><dtclass="spec value"id="val-mem_procname"><ahref="#val-mem_procname"class="anchor"></a><code><spanclass="keyword">val</span> mem_procname : <ahref="index.html#type-t">t</a><span>-></span><ahref="../IR/Procname/index.html#type-t">IR.Procname.t</a><span>-></span> bool</code></dt><dd><p>is there a node for <code>procname</code> in the graph?</p></dd></dl><dl><dtclass="spec value"id="val-flag"><ahref="#val-flag"class="anchor"></a><code><spanclass="keyword">val</span> flag : <ahref="index.html#type-t">t</a><span>-></span><ahref="../IR/Procname/index.html#type-t">IR.Procname.t</a><span>-></span> unit</code></dt><dtclass="spec value"id="val-flag_reachable"><ahref="#val-flag_reachable"class="anchor"></a><code><spanclass="keyword">val</span> flag_reachable : <ahref="index.html#type-t">t</a><span>-></span><ahref="../IR/Procname/index.html#type-t">IR.Procname.t</a><span>-></span> unit</code></dt><dd><p>flag all nodes reachable from the node of the given procname, if it exists</p></dd></dl><dl><dtclass="spec value"id="val-iter_unflagged_leaves"><ahref="#val-iter_unflagged_leaves"class="anchor"></a><code><spanclass="keyword">val</span> iter_unflagged_leaves : <span>f:<span>(<ahref="Node/index.html#type-t">Node.t</a><span>-></span> unit)</span></span><span>-></span><ahref="index.html#type-t">t</a><span>-></span> unit</code></dt><dd><p>iterate over all leaves that have their flag set to false</p></dd></dl><dl><dtclass="spec value"id="val-remove"><ahref="#val-remove"class="anchor"></a><code><spanclass="keyword">val</span> remove : <ahref="index.html#type-t">t</a><span>-></span><ahref="../IR/Procname/index.html#type-t">IR.Procname.t</a><span>-></span> unit</code></dt><dtclass="spec value"id="val-to_dotty"><ahref="#val-to_dotty"class="anchor"></a><code><spanclass="keyword">val</span> to_dotty : <ahref="index.html#type-t">t</a><span>-></span> string <span>-></span> unit</code></dt><dd><p>output call graph in dotty format with the given filename in results dir</p></dd></dl><dl><dtclass="spec value"id="val-add_edge"><ahref="#val-add_edge"class="anchor"></a><code><spanclass="keyword">val</span> add_edge : <ahref="index.html#type-t">t</a><span>-></span><span>pname:<ahref="../IR/Procname/index.html#type-t">IR.Procname.t</a></span><span>-></span><span>successor_pname:<ahref="../IR/Procname/index.html#type-t">IR.Procname.t</a></span><span>-></span> unit</code></dt><dd><p>add an edge from <code>pname</code> to <code>successor_pname</code> in the graph, creating a node for <code>pname</code> if there isn't one already</p></dd></dl><dl><dtclass="spec value"id="val-create_node"><ahref="#val-create_node"class="anchor"></a><code><spanclass="keyword">val</span> create_node : <ahref="index.html#type-t">t</a><span>-></span><ahref="../IR/Procname/index.html#type-t">IR.Procname.t</a><span>-></span><span><ahref="../IR/Procname/index.html#type-t">IR.Procname.t</a> list</span><span>-></span> unit</code></dt><dd><p>create a new node with edges from <code>pname</code> to <code>successor_pnames</code> in the graph</p></dd></dl><dl><dtclass="spec value"id="val-fold_flagged"><ahref="#val-fold_flagged"class="anchor"></a><code><spanclass="keyword">val</span> fold_flagged : <ahref="index.html#type-t">t</a><span>-></span><span>f:<span>(<ahref="Node/index.html#type-t">Node.t</a><span>-></span><spanclass="type-var">'a</span><span>-></span><spanclass="type-var">'a</span>)</span></span><span>-></span><spanclass="type-var">'a</span><span>-></span><spanclass="type-var">'a</span></code></dt><dd><p>perform a fold over the nodes in the graph with flag set to true</p></dd></dl><dl><dtclass="spec value"id="val-default_initial_capacity"><ahref="#val-default_initial_capacity"class="anchor"></a><code><spanclass="keyword">val</span> default_initial_capacity : int</code></dt><dd><p>reasonable minimum capacity for the graph that is prime</p></dd></dl></div></body></html>