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>InferModules__CallGraph (infer.InferModules__CallGraph)</title><linkrel="stylesheet"href="../../odoc.css"/><metacharset="utf-8"/><metaname="generator"content="odoc %%VERSION%%"/><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>» InferModules__CallGraph</nav><h1>Module <code>InferModules__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-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="../../InferIR/InferIR/Typ/Procname/index.html#type-t">InferIR.Typ.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-get_unflagged_leaves"><ahref="#val-get_unflagged_leaves"class="anchor"></a><code><spanclass="keyword">val</span> get_unflagged_leaves : <ahref="index.html#type-t">t</a><span>-></span><span><ahref="Node/index.html#type-t">Node.t</a> list</span></code></dt><dd><p>get all leaves that have their flag set to false</p></dd></dl><dl><dtclass="spec value"id="val-remove_reachable"><ahref="#val-remove_reachable"class="anchor"></a><code><spanclass="keyword">val</span> remove_reachable : <ahref="index.html#type-t">t</a><span>-></span><ahref="../../InferIR/InferIR/Typ/Procname/index.html#type-t">InferIR.Typ.Procname.t</a><span>-></span> unit</code></dt><dd><p>remove all nodes reachable from procname</p></dd></dl><dl><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-trim_id_map"><ahref="#val-trim_id_map"class="anchor"></a><code><spanclass="keyword">val</span> trim_id_map : <ahref="index.html#type-t">t</a><span>-></span> unit</code></dt><dd><p>remove all pnames that do not correspond to a defined procedure from id_map</p></dd></dl><dl><dtclass="spec value"id="val-remove_unflagged_and_unflag_all"><ahref="#val-remove_unflagged_and_unflag_all"class="anchor"></a><code><spanclass="keyword">val</span> remove_unflagged_and_unflag_all : <ahref="index.html#type-t">t</a><span>-></span> unit</code></dt><dd><p>remove all nodes with flag set to false, and set flag to false on all remaining nodes</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="../../InferIR/InferIR/Typ/Procname/index.html#type-t">InferIR.Typ.Procname.t</a></span><span>-></span><span>successor_pname:<ahref="../../InferIR/InferIR/Typ/Procname/index.html#type-t">InferIR.Typ.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="../../InferIR/InferIR/Typ/Procname/index.html#type-t">InferIR.Typ.Procname.t</a><span>-></span><span><ahref="../../InferIR/InferIR/Typ/Procname/index.html#type-t">InferIR.Typ.Procname.t</a><ahref="../../InferStdlib/InferStdlib/index.html#module-IStd">InferStdlib.IStd</a>.sexp_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-iter_flagged"><ahref="#val-iter_flagged"class="anchor"></a><code><spanclass="keyword">val</span> iter_flagged : <ahref="index.html#type-t">t</a><span>-></span><span>f:<span>(<ahref="Node/index.html#type-t">Node.t</a><span>-></span> unit)</span></span><span>-></span> unit</code></dt><dd><p>iterate 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>