This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.
<!DOCTYPE html>
<htmlxmlns="http://www.w3.org/1999/xhtml"><head><title>InferIR__Procdesc (InferIR.InferIR__Procdesc)</title><linkrel="stylesheet"href="../../odoc.css"/><metacharset="utf-8"/><metaname="viewport"content="width=device-width,initial-scale=1.0"/><metaname="generator"content="doc-ock-html v1.0.0-1-g1fc9bf0"/></head><body><navid="top"><ahref="../index.html">Up</a>—<spanclass="package">package <ahref="../index.html">InferIR</a></span></nav><header><h1><spanclass="keyword">Module</span><spanclass="module-path">InferIR__Procdesc</span></h1></header><divclass="spec module"id="module-Node"><ahref="#module-Node"class="anchor"></a><divclass="def module"><code><spanclass="keyword">module </span><ahref="Node/index.html">Node</a> : <spanclass="keyword">sig</span> ... <spanclass="keyword">end</span></code></div><divclass="doc"><p>node of the control flow graph</p></div></div><divclass="spec module"id="module-IdMap"><ahref="#module-IdMap"class="anchor"></a><divclass="def module"><code><spanclass="keyword">module </span>IdMap : <ahref="../../InferStdlib/InferStdlib/index.html#module-IStd">InferStdlib.IStd</a>.Caml.Map.S<spanclass="keyword"> with </span><spanclass="keyword">type </span><ahref="index.html#module-IdMap">IdMap</a>.key<spanclass="keyword"> = </span><ahref="Node/index.html#type-id">Node.id</a></code></div><divclass="doc"><p>Map with node id keys.</p></div></div><divclass="spec module"id="module-NodeHash"><ahref="#module-NodeHash"class="anchor"></a><divclass="def module"><code><spanclass="keyword">module </span>NodeHash : <ahref="../../InferStdlib/InferStdlib/index.html#module-IStd">InferStdlib.IStd</a>.Caml.Hashtbl.S<spanclass="keyword"> with </span><spanclass="keyword">type </span><ahref="index.html#module-NodeHash">NodeHash</a>.key<spanclass="keyword"> = </span><ahref="Node/index.html#type-t">Node.t</a></code></div><divclass="doc"><p>Hash table with nodes as keys.</p></div></div><divclass="spec module"id="module-NodeMap"><ahref="#module-NodeMap"class="anchor"></a><divclass="def module"><code><spanclass="keyword">module </span>NodeMap : <ahref="../../InferStdlib/InferStdlib/index.html#module-IStd">InferStdlib.IStd</a>.Caml.Map.S<spanclass="keyword"> with </span><spanclass="keyword">type </span><ahref="index.html#module-NodeMap">NodeMap</a>.key<spanclass="keyword"> = </span><ahref="Node/index.html#type-t">Node.t</a></code></div><divclass="doc"><p>Map over nodes.</p></div></div><divclass="spec module"id="module-NodeSet"><ahref="#module-NodeSet"class="anchor"></a><divclass="def module"><code><spanclass="keyword">module </span>NodeSet : <ahref="../../InferStdlib/InferStdlib/index.html#module-IStd">InferStdlib.IStd</a>.Caml.Set.S<spanclass="keyword"> with </span><spanclass="keyword">type </span><ahref="index.html#module-NodeSet">NodeSet</a>.elt<spanclass="keyword"> = </span><ahref="Node/index.html#type-t">Node.t</a></code></div><divclass="doc"><p>Set of nodes.</p></div></div><p>procedure descriptions</p><divclass="spec type"id="type-t"><ahref="#type-t"class="anchor"></a><divclass="def type"><code><spanclass="keyword">type </span>t</code><code></code><code></code></div><divclass="doc"><p>proc description</p></div></div><divclass="spec include"><divclass="doc"></div><detailsopen="open"><summary><spanclass="def"><code><spanclass="keyword">include </span><spanclass="keyword">sig</span> ... <spanclass="keyword">end</span></code></span></summary><divclass="spec val"id="val-compare"><ahref="#val-compare"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>compare : <ahref="index.html#type-t">t</a><spanclass="keyword">‑></span><ahref="index.html#type-t">t</a><spanclass="keyword">‑></span> int</code></div><divclass="doc"></div></div></details></div><divclass="spec val"id="val-append_locals"><ahref="#val-append_locals"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>append_locals : <ahref="index.html#type-t">t</a><spanclass="keyword">‑></span><ahref="../InferIR/ProcAttributes/index.html#type-var_data">InferIR.ProcAttributes.var_data</a> list <spanclass="keyword">‑></span> unit</code></div><divclass="doc"><p>append a list of new local variables to the existing list of local variables</p></div></div><divclass="spec val"id="val-compute_distance_to_exit_node"><ahref="#val-compute_distance_to_exit_node"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>compute_distance_to_exit_node : <ahref="index.html#type-t">t</a><spanclass="keyword">‑></span> unit</code></div><divclass="doc"><p>Compute the distance of each node to the exit node, if not computed already</p></div></div><divclass="spec val"id="val-create_node"><ahref="#val-create_node"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>create_node : <ahref="index.html#type-t">t</a><spanclass="keyword">‑></span><ahref="../../InferBase/InferBase/Location/index.html#type-t">InferBase.Location.t</a><spanclass="keyword">‑></span><ahref="Node/index.html#type-nodekind">Node.nodekind</a><spanclass="keyword">‑></span><ahref="../InferIR/Sil/index.html#type-instr">InferIR.Sil.instr</a> list <spanclass="keyword">‑></span><ahref="Node/index.html#type-t">Node.t</a></code></div><divclass="doc"><p>Create a new cfg node with the given location, kind, list of instructions,
and add it to the procdesc.</p></div></div><divclass="spec val"id="val-did_preanalysis"><ahref="#val-did_preanalysis"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>did_preanalysis : <ahref="index.html#type-t">t</a><spanclass="keyword">‑></span> bool</code></div><divclass="doc"><p>true if we ran the preanalysis on the CFG associated with <codeclass="code">t</code></p></div></div><divclass="spec val"id="val-fold_instrs"><ahref="#val-fold_instrs"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>fold_instrs : <ahref="index.html#type-t">t</a><spanclass="keyword">‑></span> init:<spanclass="type-var">'accum</span><spanclass="keyword">‑></span> f:(<spanclass="type-var">'accum</span><spanclass="keyword">‑></span><ahref="Node/index.html#type-t">Node.t</a><spanclass="keyword">‑></span><ahref="../InferIR/Sil/index.html#type-instr">InferIR.Sil.instr</a><spanclass="keyword">‑></span><spanclass="type-var">'accum</span>) <spanclass="keyword">‑></span><spanclass="type-var">'accum</span></code></div><divclass="doc"><p>fold over all nodes and their instructions</p></div></div><divclass="spec val"id="val-find_map_instrs"><ahref="#val-find_map_instrs"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>find_map_instrs : <ahref="index.html#type-t">t</a><spanclass="keyword">‑></span> f:(<ahref="../InferIR/Sil/index.html#type-instr">InferIR.Sil.instr</a><spanclass="keyword">‑></span><spanclass="type-var">'a</span> option) <spanclass="keyword">‑></span><spanclass="type-var">'a</span> option</code></div><divclass="doc"></div></div><divclass="spec val"id="val-from_proc_attributes"><ahref="#val-from_proc_attributes"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>from_proc_attributes : <ahref="../InferIR/ProcAttributes/index.html#type-t">InferIR.ProcAttributes.t</a><spanclass="keyword">‑></span><ahref="index.html#type-t">t</a></code></div><divclass="doc"><p>Use <codeclass="code">Cfg.create_proc_desc</code> if you are adding a proc desc to a cfg</p></div></div><divclass="spec val"id="val-get_access"><ahref="#val-get_access"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>get_access : <ahref="index.html#type-t">t</a><spanclass="keyword">‑></span><ahref="../InferIR/PredSymb/index.html#type-access">InferIR.PredSymb.access</a></code></div><divclass="doc"><p>Return the visibility attribute</p></div></div><divclass="spec val"id="val-get_attributes"><ahref="#val-get_attributes"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>get_attributes : <ahref="index.html#type-t">t</a><spanclass="keyword">‑></span><ahref="../InferIR/ProcAttributes/index.html#type-t">InferIR.ProcAttributes.t</a></code></div><divclass="doc"><p>Get the attributes of the procedure.</p></div></div><divclass="spec val"id="val-get_captured"><ahref="#val-get_captured"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>get_captured : <ahref="index.html#type-t">t</a><spanclass="keyword">‑></span> (<ahref="../InferIR/Mangled/index.html#type-t">InferIR.Mangled.t</a><spanclass="keyword"> * </span><ahref="../InferIR/Typ/index.html#type-t">InferIR.Typ.t</a>) list</code></div><divclass="doc"><p>Return name and type of block's captured variables</p></div></div><divclass="spec val"id="val-get_exit_node"><ahref="#val-get_exit_node"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>get_exit_node : <ahref="index.html#type-t">t</a><spanclass="keyword">‑></span><ahref="Node/index.html#type-t">Node.t</a></code></div><divclass="doc"></div></div><divclass="spec val"id="val-get_formals"><ahref="#val-get_formals"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>get_formals : <ahref="index.html#type-t">t</a><spanclass="keyword">‑></span> (<ahref="../InferIR/Mangled/index.html#type-t">InferIR.Mangled.t</a><spanclass="keyword"> * </span><ahref="../InferIR/Typ/index.html#type-t">InferIR.Typ.t</a>) list</code></div><divclass="doc"><p>Return name and type of formal parameters</p></div></div><divclass="spec val"id="val-get_loc"><ahref="#val-get_loc"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>get_loc : <ahref="index.html#type-t">t</a><spanclass="keyword">‑></span><ahref="../../InferBase/InferBase/Location/index.html#type-t">InferBase.Location.t</a></code></div><divclass="doc"><p>Return loc information for the procedure</p></div></div><divclass="spec val"id="val-get_locals"><ahref="#val-get_locals"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>get_locals : <ahref="index.html#type-t">t</a><spanclass="keyword">‑></span><ahref="../InferIR/ProcAttributes/index.html#type-var_data">InferIR.ProcAttributes.var_data</a> list</code></div><divclass="doc"><p>Return name and type and attributes of local variables</p></div></div><divclass="spec val"id="val-get_nodes"><ahref="#val-get_nodes"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>get_nodes : <ahref="index.html#type-t">t</a><spanclass="keyword">‑></span><ahref="Node/index.html#type-t">Node.t</a> list</code></div><divclass="doc"></div></div><divclass="spec val"id="val-get_nodes_num"><ahref="#val-get_nodes_num"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>get_nodes_num : <ahref="index.html#type-t">t</a><spanclass="keyword">‑></span> int</code></div><divclass="doc"></div></div><divclass="spec val"id="val-get_proc_name"><ahref="#val-get_proc_name"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>get_proc_name : <ahref="index.html#type-t">t</a><spanclass="keyword">‑></span><ahref="../InferIR/Typ/Procname/index.html#type-t">InferIR.Typ.Procname.t</a></code></div><divclass="doc"></div></div><divclass="spec val"id="val-get_ret_type"><ahref="#val-get_ret_type"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>get_ret_type : <ahref="index.html#type-t">t</a><spanclass="keyword">‑></span><ahref="../InferIR/Typ/index.html#type-t">InferIR.Typ.t</a></code></div><divclass="doc"><p>Return the return type of the procedure and type string</p></div></div><divclass="spec val"id="val-get_ret_var"><ahref="#val-get_ret_var"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>get_ret_var : <ahref="index.html#type-t">t</a><spanclass="keyword">‑></span><ahref="../InferIR/Pvar/index.html#type-t">InferIR.Pvar.t</a></code></div><divclass="doc"></div></div><divclass="spec val"id="val-get_start_node"><ahref="#val-get_start_node"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>get_start_node : <ahref="index.html#type-t">t</a><spanclass="keyword">‑></span><ahref="Node/index.html#type-t">Node.t</a></code></div><divclass="doc"></div></div><divclass="spec val"id="val-is_defined"><ahref="#val-is_defined"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>is_defined : <ahref="index.html#type-t">t</a><spanclass="keyword">‑></span> bool</code></div><divclass="doc"><p>Return <codeclass="code">true</code> iff the procedure is defined, and not just declared</p></div></div><divclass="spec val"id="val-is_java_synchronized"><ahref="#val-is_java_synchronized"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>is_java_synchronized : <ahref="index.html#type-t">t</a><spanclass="keyword">‑></span> bool</code></div><divclass="doc"><p>Return <codeclass="code">true</code> if the procedure signature has the Java synchronized keyword</p></div></div><divclass="spec val"id="val-iter_instrs"><ahref="#val-iter_instrs"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>iter_instrs : (<ahref="Node/index.html#type-t">Node.t</a><spanclass="keyword">‑></span><ahref="../InferIR/Sil/index.html#type-instr">InferIR.Sil.instr</a><spanclass="keyword">‑></span> unit) <spanclass="keyword">‑></span><ahref="index.html#type-t">t</a><spanclass="keyword">‑></span> unit</code></div><divclass="doc"><p>iterate over all nodes and their instructions</p></div></div><divclass="spec val"id="val-replace_instrs"><ahref="#val-replace_instrs"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>replace_instrs : <ahref="index.html#type-t">t</a><spanclass="keyword">‑></span> f:(<ahref="../InferIR/Sil/index.html#type-instr">InferIR.Sil.instr</a><spanclass="keyword">‑></span><ahref="../InferIR/Sil/index.html#type-instr">InferIR.Sil.instr</a>) <spanclass="keyword">‑></span> unit</code></div><divclass="doc"><p>Map and replace the instructions to be executed</p></div></div><divclass="spec val"id="val-iter_nodes"><ahref="#val-iter_nodes"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>iter_nodes : (<ahref="Node/index.html#type-t">Node.t</a><spanclass="keyword">‑></span> unit) <spanclass="keyword">‑></span><ahref="index.html#type-t">t</a><spanclass="keyword">‑></span> unit</code></div><divclass="doc"><p>iterate over all the nodes of a procedure</p></div></div><divclass="spec val"id="val-fold_nodes"><ahref="#val-fold_nodes"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>fold_nodes : <ahref="index.html#type-t">t</a><spanclass="keyword">‑></span> init:<spanclass="type-var">'accum</span><spanclass="keyword">‑></span> f:(<spanclass="type-var">'accum</span><spanclass="keyword">‑></span><ahref="Node/index.html#type-t">Node.t</a><spanclass="keyword">‑></span><spanclass="type-var">'accum</span>) <spanclass="keyword">‑></span><spanclass="type-var">'accum</span></code></div><divclass="doc"><p>fold over all the nodes of a procedure</p></div></div><divclass="spec val"id="val-fold_slope_range"><ahref="#val-fold_slope_range"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>fold_slope_range : <ahref="Node/index.html#type-t">Node.t</a><spanclass="keyword">‑></span><ahref="Node/index.html#type-t">Node.t</a><spanclass="keyword">‑></span> init:<spanclass="type-var">'accum</span><spanclass="keyword">‑></span> f:(<spanclass="type-var">'accum</span><spanclass="keyword">‑></span><ahref="Node/index.html#type-t">Node.t</a><spanclass="keyword">‑></span><spanclass="type-var">'accum</span>) <spanclass="keyword">‑></span><spanclass="type-var">'accum</span></code></div><divclass="doc"><p>fold between two nodes or until we reach a branching structure</p></div></div><divclass="spec val"id="val-set_succs_exn_only"><ahref="#val-set_succs_exn_only"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>set_succs_exn_only : <ahref="Node/index.html#type-t">Node.t</a><spanclass="keyword">‑></span><ahref="Node/index.html#type-t">Node.t</a> list <spanclass="keyword">‑></span> unit</code></div><divclass="doc"></div></div><divclass="spec val"id="val-node_set_succs_exn"><ahref="#val-node_set_succs_exn"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>node_set_succs_exn : <ahref="index.html#type-t">t</a><spanclass="keyword">‑></span><ahref="Node/index.html#type-t">Node.t</a><spanclass="keyword">‑></span><ahref="Node/index.html#type-t">Node.t</a> list <spanclass="keyword">‑></span><ahref="Node/index.html#type-t">Node.t</a> list <spanclass="keyword">‑></span> unit</code></div><divclass="doc"><p>Set the successor nodes and exception nodes, and build predecessor links</p></div></div><divclass="spec val"id="val-set_exit_node"><ahref="#val-set_exit_node"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>set_exit_node : <ahref="index.html#type-t">t</a><spanclass="keyword">‑></span><ahref="Node/index.html#type-t">Node.t</a><spanclass="keyword">‑></span> unit</code></div><divclass="doc"><p>Set the exit node of the procedure</p></div></div><divclass="spec val"id="val-set_start_node"><ahref="#val-set_start_node"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>set_start_node : <ahref="index.html#type-t">t</a><spanclass="keyword">‑></span><ahref="Node/index.html#type-t">Node.t</a><spanclass="keyword">‑></span> unit</code></div><divclass="doc"></div></div><divclass="spec val"id="val-signal_did_preanalysis"><ahref="#val-signal_did_preanalysis"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>signal_did_preanalysis : <ahref="index.html#type-t">t</a><spanclass="keyword">‑></span> unit</code></div><divclass="doc"><p>indicate that we have performed preanalysis on the CFG assoociated with <codeclass="code">t</code></p></div></div><divclass="spec val"id="val-is_loop_head"><ahref="#val-is_loop_head"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>is_loop_head : <ahref="index.html#type-t">t</a><spanclass="keyword">‑></span><ahref="Node/index.html#type-t">Node.t</a><spanclass="keyword">‑></span> bool</code></div><divclass="doc"></div></div><divclass="spec val"id="val-pp_signature"><ahref="#val-pp_signature"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>pp_signature : Format.formatter <spanclass="keyword">‑></span><ahref="index.html#type-t">t</a><spanclass="keyword">‑></span> unit</code></div><divclass="doc"></div></div><divclass="spec val"id="val-pp_local"><ahref="#val-pp_local"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>pp_local : Format.formatter <spanclass="keyword">‑></span><ahref="../InferIR/ProcAttributes/index.html#type-var_data">InferIR.ProcAttributes.var_data</a><spanclass="keyword">‑></span> unit</code></div><divclass="doc"></div></div><divclass="spec val"id="val-is_specialized"><ahref="#val-is_specialized"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>is_specialized : <ahref="index.html#type-t">t</a><spanclass="keyword">‑></span> bool</code></div><divclass="doc"></div></div><divclass="spec val"id="val-is_captured_var"><ahref="#val-is_captured_var"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>is_captured_var : <ahref="index.html#type-t">t</a><spanclass="keyword">‑></span><ahref="../InferIR/Pvar/index.html#type-t">InferIR.Pvar.t</a><spanclass="keyword">‑></span> bool</code></div><divclass="doc"><p>true if pvar is a captured variable of a cpp lambda or obcj block</p></div></div><divclass="spec val"id="val-has_modify_in_block_attr"><ahref="#val-has_modify_in_block_attr"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>has_modify_in_block_attr : <ahref="index.html#type-t">t</a><spanclass="keyword">‑></span><ahref="../InferIR/Pvar/index.html#type-t">InferIR.Pvar.t</a><spanclass="keyword">‑></span> bool</code></div><divclass="doc"></div></div><divclass="spec val"id="val-specialize_types"><ahref="#val-specialize_types"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>specialize_types : <ahref="index.html#type-t">t</a><spanclass="keyword">‑></span><ahref="../InferIR/Typ/Procname/index.html#type-t">InferIR.Typ.Procname.t</a><spanclass="keyword">‑></span> (<ahref="../InferIR/Exp/index.html#type-t">InferIR.Exp.t</a><spanclass="keyword"> * </span><ahref="../InferIR/Typ/index.html#type-t">InferIR.Typ.t</a>) list <spanclass="keyword">‑></span><ahref="index.html#type-t">t</a></code></div><divclass="doc"><p>Creates a copy of a procedure description and a list of type substitutions of the form
(name, typ) where name is a parameter. The resulting procdesc is isomorphic but
all the type of the parameters are replaced in the instructions according to the list.
The virtual calls are also replaced to match the parameter types</p></div></div><divclass="spec val"id="val-specialize_with_block_args"><ahref="#val-specialize_with_block_args"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>specialize_with_block_args : <ahref="index.html#type-t">t</a><spanclass="keyword">‑></span><ahref="../InferIR/Typ/Procname/index.html#type-t">InferIR.Typ.Procname.t</a><spanclass="keyword">‑></span><ahref="../InferIR/Exp/index.html#type-closure">InferIR.Exp.closure</a> option list <spanclass="keyword">‑></span><ahref="index.html#type-t">t</a></code></div><divclass="doc"><p>Creates a copy of a procedure description given a list of possible closures
that are passed as arguments to the method. The resulting procdesc is isomorphic but
a) the block parameters are replaces with the closures
b) the parameters of the method are extended with parameters for the captured variables
in the closures</p></div></div><divclass="spec val"id="val-is_connected"><ahref="#val-is_connected"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>is_connected : <ahref="index.html#type-t">t</a><spanclass="keyword">‑></span> (unit,[ `Join | `Other ])<ahref="../../InferStdlib/InferStdlib/index.html#module-IStd">InferStdlib.IStd</a>.Result.t</code></div><divclass="doc"><p>checks whether a cfg for the given procdesc is connected or not</p></div></div></body></html>