<htmlxmlns="http://www.w3.org/1999/xhtml"><head><title>CallGraph (infer.Backend.CallGraph)</title><linkrel="stylesheet"href="../../../odoc.css"/><metacharset="utf-8"/><metaname="generator"content="odoc 1.5.2"/><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>»<ahref="../index.html">Backend</a>» 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 le