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>Procdesc (infer.IR.Procdesc)</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>»<ahref="../index.html">IR</a>» Procdesc</nav><h1>Module <code>IR.Procdesc</code></h1><navclass="toc"><ul><li><ahref="#per-procedure-cfg">Per-procedure CFG</a></li></ul></nav></header><section><header><h2id="per-procedure-cfg"><ahref="#per-procedure-cfg"class="anchor"></a>Per-procedure CFG</h2></header><divclass="spec module"id="module-NodeKey"><ahref="#module-NodeKey"class="anchor"></a><code><spanclass="keyword">module</span><ahref="NodeKey/index.html">NodeKey</a> : <spanclass="keyword">sig</span> ... <spanclass="keyword">end</span></code></div><dl><dtclass="spec module"id="module-Node"><ahref="#module-Node"class="anchor"></a><code><spanclass="keyword">module</span><ahref="Node/index.html">Node</a> : <spanclass="keyword">sig</span> ... <spanclass="keyword">end</span></code></dt><dd><p>node of the control flow graph</p></dd></dl><dl><dtclass="spec module"id="module-IdMap"><ahref="#module-IdMap"class="anchor"></a><code><spanclass="keyword">module</span> IdMap : <ahref="../../IStdlib/PrettyPrintable/index.html#module-type-PPMap">IStdlib.PrettyPrintable.PPMap</a><spanclass="keyword">with</span><spanclass="keyword">type</span><ahref="../../IStdlib/PrettyPrintable/index.html#module-type-PPMap">PPMap</a>.key = <ahref="Node/index.html#type-id">Node.id</a></code></dt><dd><p>Map with node id keys.</p></dd></dl><dl><dtclass="spec module"id="module-NodeHash"><ahref="#module-NodeHash"class="anchor"></a><code><spanclass="keyword">module</span> NodeHash : <ahref="../../IStdlib/index.html#module-IStd">IStdlib.IStd</a>.Caml.Hashtbl.S <spanclass="keyword">with</span><spanclass="keyword">type</span><ahref="index.html#module-NodeHash">NodeHash</a>.key = <ahref="Node/index.html#type-t">Node.t</a></code></dt><dd><p>Hash table with nodes as keys.</p></dd></dl><dl><dtclass="spec module"id="module-NodeMap"><ahref="#module-NodeMap"class="anchor"></a><code><spanclass="keyword">module</span> NodeMap : <ahref="../../IStdlib/index.html#module-IStd">IStdlib.IStd</a>.Caml.Map.S <spanclass="keyword">with</span><spanclass="keyword">type</span><ahref="index.html#module-NodeMap">NodeMap</a>.key = <ahref="Node/index.html#type-t">Node.t</a></code></dt><dd><p>Map over nodes.</p></dd></dl><dl><dtclass="spec module"id="module-NodeSet"><ahref="#module-NodeSet"class="anchor"></a><code><spanclass="keyword">module</span> NodeSet : <ahref="../../IStdlib/index.html#module-IStd">IStdlib.IStd</a>.Caml.Set.S <spanclass="keyword">with</span><spanclass="keyword">type</span><ahref="index.html#module-NodeSet">NodeSet</a>.elt = <ahref="Node/index.html#type-t">Node.t</a></code></dt><dd><p>Set of nodes.</p></dd></dl><aside><p>procedure descriptions</p></aside><dl><dtclass="spec type"id="type-t"><ahref="#type-t"class="anchor"></a><code><spanclass="keyword">type</span> t</code></dt><dd><p>proc description</p></dd></dl><dl><dtclass="spec value"id="val-append_locals"><ahref="#val-append_locals"class="anchor"></a><code><spanclass="keyword">val</span> append_locals : <ahref="index.html#type-t">t</a><span>-></span><span><ahref="../ProcAttributes/index.html#type-var_data">ProcAttributes.var_data</a> list</span><span>-></span> unit</code></dt><dd><p>append a list of new local variables to the existing list of local variables</p></dd></dl><dl><dtclass="spec value"id="val-compute_distance_to_exit_node"><ahref="#val-compute_distance_to_exit_node"class="anchor"></a><code><spanclass="keyword">val</span> compute_distance_to_exit_node : <ahref="index.html#type-t">t</a><span>-></span> unit</code></dt><dd><p>Compute the distance of each node to the exit node, if not computed 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="../../IBase/Location/index.html#type-t">IBase.Location.t</a><span>-></span><ahref="Node/index.html#type-nodekind">Node.nodekind</a><span>-></span><span><ahref="../Sil/index.html#type-instr">Sil.instr</a> list</span><span>-></span><ahref="Node/index.html#type-t">Node.t</a></code></dt><dd><p>Create a new cfg node with the given location, kind, list of instructions, and add it to the procdesc.</p></dd></dl><dl><dtclass="spec value"id="val-create_node_from_not_reversed"><ahref="#val-create_node_from_not_reversed"class="anchor"></a><code><spanclass="keyword">val</span> create_node_from_not_reversed : <ahref="index.html#type-t">t</a><span>-></span><ahref="../../IBase/Location/index.html#type-t">IBase.Location.t</a><span>-></span><ahref="Node/index.html#type-nodekind">Node.nodekind</a><span>-></span><ahref="../Instrs/index.html#type-not_reversed_t">Instrs.not_reversed_t</a><span>-></span><ahref="Node/index.html#type-t">Node.t</a></code></dt><dtclass="spec value"id="val-fold_instrs"><ahref="#val-fold_instrs"class="anchor"></a><code><spanclass="keyword">val</span> fold_instrs : <ahref="index.html#type-t">t</a><span>-></span><span>init:<spanclass="type-var">'accum</span></span><span>-></span><span>f:<span>(<spanclass="type-var">'accum</span><span>-></span><ahref="Node/index.html#type-t">Node.t</a><span>-></span><ahref="../Sil/index.html#type-instr">Sil.instr</a><span>-></span><spanclass="type-var">'accum</span>)</span></span><span>-></span><spanclass="type-var">'accum</span></code></dt><dd><p>fold over all nodes and their instructions</p></dd></dl><dl><dtclass="spec value"id="val-find_map_instrs"><ahref="#val-find_map_instrs"class="anchor"></a><code><spanclass="keyword">val</span> find_map_instrs : <ahref="index.html#type-t">t</a><span>-></span><span>f:<span>(<ahref="../Sil/index.html#type-instr">Sil.instr</a><span>-></span><span><spanclass="type-var">'a</span> option</span>)</span></span><span>-></span><span><spanclass="type-var">'a</span> option</span></code></dt><dtclass="spec value"id="val-from_proc_attributes"><ahref="#val-from_proc_attributes"class="anchor"></a><code><spanclass="keyword">val</span> from_proc_attributes : <ahref="../ProcAttributes/index.html#type-t">ProcAttributes.t</a><span>-></span><ahref="index.html#type-t">t</a></code></dt><dd><p>Use <code>Cfg.create_proc_desc</code> if you are adding a proc desc to a cfg</p></dd></dl><dl><dtclass="spec value"id="val-get_access"><ahref="#val-get_access"class="anchor"></a><code><spanclass="keyword">val</span> get_access : <ahref="index.html#type-t">t</a><span>-></span><ahref="../PredSymb/index.html#type-access">PredSymb.access</a></code></dt><dd><p>Return the visibility attribute</p></dd></dl><dl><dtclass="spec value"id="val-get_attributes"><ahref="#val-get_attributes"class="anchor"></a><code><spanclass="keyword">val</span> get_attributes : <ahref="index.html#type-t">t</a><span>-></span><ahref="../ProcAttributes/index.html#type-t">ProcAttributes.t</a></code></dt><dd><p>Get the attributes of the procedure.</p></dd></dl><dl><dtclass="spec value"id="val-set_attributes"><ahref="#val-set_attributes"class="anchor"></a><code><spanclass="keyword">val</span> set_attributes : <ahref="index.html#type-t">t</a><span>-></span><ahref="../ProcAttributes/index.html#type-t">ProcAttributes.t</a><span>-></span> unit</code></dt><dtclass="spec value"id="val-get_captured"><ahref="#val-get_captured"class="anchor"></a><code><spanclass="keyword">val</span> get_captured : <ahref="index.html#type-t">t</a><span>-></span><span><span>(<ahref="../Mangled/index.html#type-t">Mangled.t</a> * <ahref="../Typ/index.html#type-t">Typ.t</a>)</span> list</span></code></dt><dd><p>Return name and type of block's captured variables</p></dd></dl><dl><dtclass="spec value"id="val-get_exit_node"><ahref="#val-get_exit_node"class="anchor"></a><code><spanclass="keyword">val</span> get_exit_node : <ahref="index.html#type-t">t</a><span>-></span><ahref="Node/index.html#type-t">Node.t</a></code></dt><dtclass="spec value"id="val-get_formals"><ahref="#val-get_formals"class="anchor"></a><code><spanclass="keyword">val</span> get_formals : <ahref="index.html#type-t">t</a><span>-></span><span><span>(<ahref="../Mangled/index.html#type-t">Mangled.t</a> * <ahref="../Typ/index.html#type-t">Typ.t</a>)</span> list</span></code></dt><dd><p>Return name and type of formal parameters</p></dd></dl><dl><dtclass="spec value"id="val-get_pvar_formals"><ahref="#val-get_pvar_formals"class="anchor"></a><code><spanclass="keyword">val</span> get_pvar_formals : <ahref="index.html#type-t">t</a><span>-></span><span><span>(<ahref="../Pvar/index.html#type-t">Pvar.t</a> * <ahref="../Typ/index.html#type-t">Typ.t</a>)</span> list</span></code></dt><dd><p>Return pvar and type of formal parameters</p></dd></dl><dl><dtclass="spec value"id="val-get_loc"><ahref="#val-get_loc"class="anchor"></a><code><spanclass="keyword">val</span> get_loc : <ahref="index.html#type-t">t</a><span>-></span><ahref="../../IBase/Location/index.html#type-t">IBase.Location.t</a></code></dt><dd><p>Return loc information for the procedure</p></dd></dl><dl><dtclass="spec value"id="val-get_locals"><ahref="#val-get_locals"class="anchor"></a><code><spanclass="keyword">val</span> get_locals : <ahref="index.html#type-t">t</a><span>-></span><span><ahref="../ProcAttributes/index.html#type-var_data">ProcAttributes.var_data</a> list</span></code></dt><dd><p>Return name and type and attributes of local variables</p></dd></dl><dl><dtclass="spec value"id="val-get_nodes"><ahref="#val-get_nodes"class="anchor"></a><code><spanclass="keyword">val</span> get_nodes : <ahref="index.html#type-t">t</a><span>-></span><span><ahref="Node/index.html#type-t">Node.t</a> list</span></code></dt><dtclass="spec value"id="val-get_proc_name"><ahref="#val-get_proc_name"class="anchor"></a><code><spanclass="keyword">val</span> get_proc_name : <ahref="index.html#type-t">t</a><span>-></span><ahref="../Procname/index.html#type-t">Procname.t</a></code></dt><dtclass="spec value"id="val-get_ret_type"><ahref="#val-get_ret_type"class="anchor"></a><code><spanclass="keyword">val</span> get_ret_type : <ahref="index.html#type-t">t</a><span>-></span><ahref="../Typ/index.html#type-t">Typ.t</a></code></dt><dd><p>Return the return type of the procedure and type string</p></dd></dl><dl><dtclass="spec value"id="val-has_added_return_param"><ahref="#val-has_added_return_param"class="anchor"></a><code><spanclass="keyword">val</span> has_added_return_param : <ahref="index.html#type-t">t</a><span>-></span> bool</code></dt><dtclass="spec value"id="val-get_ret_var"><ahref="#val-get_ret_var"class="anchor"></a><code><spanclass="keyword">val</span> get_ret_var : <ahref="index.html#type-t">t</a><span>-></span><ahref="../Pvar/index.html#type-t">Pvar.t</a></code></dt><dtclass="spec value"id="val-get_start_node"><ahref="#val-get_start_node"class="anchor"></a><code><spanclass="keyword">val</span> get_start_node : <ahref="index.html#type-t">t</a><span>-></span><ahref="Node/index.html#type-t">Node.t</a></code></dt><dtclass="spec value"id="val-get_static_callees"><ahref="#val-get_static_callees"class="anchor"></a><code><spanclass="keyword">val</span> get_static_callees : <ahref="index.html#type-t">t</a><span>-></span><span><ahref="../Procname/index.html#type-t">Procname.t</a> list</span></code></dt><dd><p>get a list of unique static callees excluding self</p></dd></dl><dl><dtclass="spec value"id="val-is_defined"><ahref="#val-is_defined"class="anchor"></a><code><spanclass="keyword">val</span> is_defined : <ahref="index.html#type-t">t</a><span>-></span> bool</code></dt><dd><p>Return <code>true</code> iff the procedure is defined, and not just declared</p></dd></dl><dl><dtclass="spec value"id="val-is_java_synchronized"><ahref="#val-is_java_synchronized"class="anchor"></a><code><spanclass="keyword">val</span> is_java_synchronized : <ahref="index.html#type-t">t</a><span>-></span> bool</code></dt><dd><p>Return <code>true</code> if the procedure signature has the Java synchronized keyword</p></dd></dl><dl><dtclass="spec value"id="val-iter_instrs"><ahref="#val-iter_instrs"class="anchor"></a><code><spanclass="keyword">val</span> iter_instrs : <span>(<ahref="Node/index.html#type-t">Node.t</a><span>-></span><ahref="../Sil/index.html#type-instr">Sil.instr</a><span>-></span> unit)</span><span>-></span><ahref="index.html#type-t">t</a><span>-></span> unit</code></dt><dd><p>iterate over all nodes and their instructions</p></dd></dl><dl><dtclass="spec value"id="val-replace_instrs"><ahref="#val-replace_instrs"class="anchor"></a><code><spanclass="keyword">val</span> replace_instrs : <ahref="index.html#type-t">t</a><span>-></span><span>f:<span>(<ahref="Node/index.html#type-t">Node.t</a><span>-></span><ahref="../Sil/index.html#type-instr">Sil.instr</a><span>-></span><ahref="../Sil/index.html#type-instr">Sil.instr</a>)</span></span><span>-></span> bool</code></dt><dd><p>Map and replace the instructions to be executed. Returns true if at least one substitution occured.</p></dd></dl><dl><dtclass="spec value"id="val-replace_instrs_by"><ahref="#val-replace_instrs_by"class="anchor"></a><code><spanclass="keyword">val</span> replace_instrs_by : <ahref="index.html#type-t">t</a><span>-></span><span>f:<span>(<ahref="Node/index.html#type-t">Node.t</a><span>-></span><ahref="../Sil/index.html#type-instr">Sil.instr</a><span>-></span><span><ahref="../Sil/index.html#type-instr">Sil.instr</a> array</span>)</span></span><span>-></span> bool</code></dt><dd><p>Like <code>replace_instrs</code>, but slower, and each instruction may be replaced by 0, 1, or more instructions.</p></dd></dl><dl><dtclass="spec value"id="val-iter_nodes"><ahref="#val-iter_nodes"class="anchor"></a><code><spanclass="keyword">val</span> iter_nodes : <span>(<ahref="Node/index.html#type-t">Node.t</a><span>-></span> unit)</span><span>-></span><ahref="index.html#type-t">t</a><span>-></span> unit</code></dt><dd><p>iterate over all the nodes of a procedure</p></dd></dl><dl><dtclass="spec value"id="val-fold_nodes"><ahref="#val-fold_nodes"class="anchor"></a><code><spanclass="keyword">val</span> fold_nodes : <ahref="index.html#type-t">t</a><span>-></span><span>init:<spanclass="type-var">'accum</span></span><span>-></span><span>f:<span>(<spanclass="type-var">'accum</span><span>-></span><ahref="Node/index.html#type-t">Node.t</a><span>-></span><spanclass="type-var">'accum</span>)</span></span><span>-></span><spanclass="type-var">'accum</span></code></dt><dd><p>fold over all the nodes of a procedure</p></dd></dl><dl><dtclass="spec value"id="val-fold_slope_range"><ahref="#val-fold_slope_range"class="anchor"></a><code><spanclass="keyword">val</span> fold_slope_range : <ahref="Node/index.html#type-t">Node.t</a><span>-></span><ahref="Node/index.html#type-t">Node.t</a><span>-></span><span>init:<spanclass="type-var">'accum</span></span><span>-></span><span>f:<span>(<spanclass="type-var">'accum</span><span>-></span><ahref="Node/index.html#type-t">Node.t</a><span>-></span><spanclass="type-var">'accum</span>)</span></span><span>-></span><spanclass="type-var">'accum</span></code></dt><dd><p>fold between two nodes or until we reach a branching structure</p></dd></dl><dl><dtclass="spec value"id="val-set_succs"><ahref="#val-set_succs"class="anchor"></a><code><spanclass="keyword">val</span> set_succs : <ahref="Node/index.html#type-t">Node.t</a><span>-></span><span>normal:<span><span><ahref="Node/index.html#type-t">Node.t</a> list</span> option</span></span><span>-></span><span>exn:<span><span><ahref="Node/index.html#type-t">Node.t</a> list</span> option</span></span><span>-></span> unit</code></dt><dd><p>Set the successor nodes and exception nodes, if given, and update predecessor links</p></dd></dl><dl><dtclass="spec value"id="val-node_set_succs"><ahref="#val-node_set_succs"class="anchor"></a><code><spanclass="keyword">val</span> node_set_succs : <ahref="index.html#type-t">t</a><span>-></span><ahref="Node/index.html#type-t">Node.t</a><span>-></span><span>normal:<span><ahref="Node/index.html#type-t">Node.t</a> list</span></span><span>-></span><span>exn:<span><ahref="Node/index.html#type-t">Node.t</a> list</span></span><span>-></span> unit</code></dt><dd><p>Set the successor nodes and exception nodes, and update predecessor links</p></dd></dl><dl><dtclass="spec value"id="val-set_exit_node"><ahref="#val-set_exit_node"class="anchor"></a><code><spanclass="keyword">val</span> set_exit_node : <ahref="index.html#type-t">t</a><span>-></span><ahref="Node/index.html#type-t">Node.t</a><span>-></span> unit</code></dt><dd><p>Set the exit node of the procedure</p></dd></dl><dl><dtclass="spec value"id="val-set_start_node"><ahref="#val-set_start_node"class="anchor"></a><code><spanclass="keyword">val</span> set_start_node : <ahref="index.html#type-t">t</a><span>-></span><ahref="Node/index.html#type-t">Node.t</a><span>-></span> unit</code></dt><dtclass="spec value"id="val-get_wto"><ahref="#val-get_wto"class="anchor"></a><code><spanclass="keyword">val</span> get_wto : <ahref="index.html#type-t">t</a><span>-></span><span><ahref="Node/index.html#type-t">Node.t</a><ahref="../WeakTopologicalOrder/Partition/index.html#type-t">WeakTopologicalOrder.Partition.t</a></span></code></dt><dtclass="spec value"id="val-is_loop_head"><ahref="#val-is_loop_head"class="anchor"></a><code><spanclass="keyword">val</span> is_loop_head : <ahref="index.html#type-t">t</a><span>-></span><ahref="Node/index.html#type-t">Node.t</a><span>-></span> bool</code></dt><dtclass="spec value"id="val-pp_signature"><ahref="#val-pp_signature"class="anchor"></a><code><spanclass="keyword">val</span> pp_signature : Stdlib.Format.formatter <span>-></span><ahref="index.html#type-t">t</a><span>-></span> unit</code></dt><dtclass="spec value"id="val-pp_local"><ahref="#val-pp_local"class="anchor"></a><code><spanclass="keyword">val</span> pp_local : Stdlib.Format.formatter <span>-></span><ahref="../ProcAttributes/index.html#type-var_data">ProcAttributes.var_data</a><span>-></span> unit</code></dt><dtclass="spec value"id="val-is_specialized"><ahref="#val-is_specialized"class="anchor"></a><code><spanclass="keyword">val</span> is_specialized : <ahref="index.html#type-t">t</a><span>-></span> bool</code></dt><dtclass="spec value"id="val-is_captured_pvar"><ahref="#val-is_captured_pvar"class="anchor"></a><code><spanclass="keyword">val</span> is_captured_pvar : <ahref="index.html#type-t">t</a><span>-></span><ahref="../Pvar/index.html#type-t">Pvar.t</a><span>-></span> bool</code></dt><dd><p>true if pvar is a captured variable of a cpp lambda or obcj block</p></dd></dl><dl><dtclass="spec value"id="val-is_captured_var"><ahref="#val-is_captured_var"class="anchor"></a><code><spanclass="keyword">val</span> is_captured_var : <ahref="index.html#type-t">t</a><span>-></span><ahref="../Var/index.html#type-t">Var.t</a><span>-></span> bool</code></dt><dd><p>true if var is a captured variable of a cpp lambda or obcj block</p></dd></dl><dl><dtclass="spec value"id="val-has_modify_in_block_attr"><ahref="#val-has_modify_in_block_attr"class="anchor"></a><code><spanclass="keyword">val</span> has_modify_in_block_attr : <ahref="index.html#type-t">t</a><span>-></span><ahref="../Pvar/index.html#type-t">Pvar.t</a><span>-></span> bool</code></dt></dl><dl><dtclass="spec module"id="module-SQLite"><ahref="#module-SQLite"class="anchor"></a><code><spanclass="keyword">module</span><ahref="SQLite/index.html">SQLite</a> : <ahref="../../IBase/SqliteUtils/index.html#module-type-Data">IBase.SqliteUtils.Data</a><spanclass="keyword">with</span><spanclass="keyword">type</span><ahref="../../IBase/SqliteUtils/module-type-Data/index.html#type-t">t</a> = <span><ahref="index.html#type-t">t</a> option</span></code></dt><dd><p>per-procedure CFGs are stored in the SQLite "procedures" table as NULL if the procedure has no CFG</p></dd></dl><dl><dtclass="spec value"id="val-load"><ahref="#val-load"class="anchor"></a><code><spanclass="keyword">val</span> load : <ahref="../Procname/index.html#type-t">Procname.t</a><span>-></span><span><ahref="index.html#type-t">t</a> option</span></code></dt></dl></section></div></body></html>