You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2 lines
21 KiB

This file contains ambiguous Unicode characters!

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>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Procname (infer.IR.Procname)</title><link rel="stylesheet" href="../../../odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 1.5.1"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div class="content"><header><nav><a href="../index.html">Up</a> <a href="../../index.html">infer</a> &#x00BB; <a href="../index.html">IR</a> &#x00BB; Procname</nav><h1>Module <code>IR.Procname</code></h1></header><div class="spec module" id="module-F"><a href="#module-F" class="anchor"></a><code><span class="keyword">module</span> F = Stdlib.Format</code></div><aside><p>Module for Procedure Names.</p></aside><dl><dt class="spec module" id="module-Java"><a href="#module-Java" class="anchor"></a><code><span class="keyword">module</span> <a href="Java/index.html">Java</a> : <span class="keyword">sig</span> ... <span class="keyword">end</span></code></dt><dd><p>Type of java procedure names.</p></dd></dl><div class="spec module" id="module-Parameter"><a href="#module-Parameter" class="anchor"></a><code><span class="keyword">module</span> <a href="Parameter/index.html">Parameter</a> : <span class="keyword">sig</span> ... <span class="keyword">end</span></code></div><div class="spec module" id="module-ObjC_Cpp"><a href="#module-ObjC_Cpp" class="anchor"></a><code><span class="keyword">module</span> <a href="ObjC_Cpp/index.html">ObjC_Cpp</a> : <span class="keyword">sig</span> ... <span class="keyword">end</span></code></div><div class="spec module" id="module-C"><a href="#module-C" class="anchor"></a><code><span class="keyword">module</span> <a href="C/index.html">C</a> : <span class="keyword">sig</span> ... <span class="keyword">end</span></code></div><div class="spec module" id="module-Block"><a href="#module-Block" class="anchor"></a><code><span class="keyword">module</span> <a href="Block/index.html">Block</a> : <span class="keyword">sig</span> ... <span class="keyword">end</span></code></div><dl><dt class="spec type" id="type-t"><a href="#type-t" class="anchor"></a><code><span class="keyword">type</span> t</code><code> = </code><table class="variant"><tr id="type-t.Java" class="anchored"><td class="def constructor"><a href="#type-t.Java" class="anchor"></a><code>| </code><code><span class="constructor">Java</span> <span class="keyword">of</span> <a href="Java/index.html#type-t">Java.t</a></code></td></tr><tr id="type-t.C" class="anchored"><td class="def constructor"><a href="#type-t.C" class="anchor"></a><code>| </code><code><span class="constructor">C</span> <span class="keyword">of</span> <a href="C/index.html#type-t">C.t</a></code></td></tr><tr id="type-t.Linters_dummy_method" class="anchored"><td class="def constructor"><a href="#type-t.Linters_dummy_method" class="anchor"></a><code>| </code><code><span class="constructor">Linters_dummy_method</span></code></td></tr><tr id="type-t.Block" class="anchored"><td class="def constructor"><a href="#type-t.Block" class="anchor"></a><code>| </code><code><span class="constructor">Block</span> <span class="keyword">of</span> <a href="Block/index.html#type-t">Block.t</a></code></td></tr><tr id="type-t.ObjC_Cpp" class="anchored"><td class="def constructor"><a href="#type-t.ObjC_Cpp" class="anchor"></a><code>| </code><code><span class="constructor">ObjC_Cpp</span> <span class="keyword">of</span> <a href="ObjC_Cpp/index.html#type-t">ObjC_Cpp.t</a></code></td></tr><tr id="type-t.WithBlockParameters" class="anchored"><td class="def constructor"><a href="#type-t.WithBlockParameters" class="anchor"></a><code>| </code><code><span class="constructor">WithBlockParameters</span> <span class="keyword">of</span> <a href="index.html#type-t">t</a> * <span><a href="Block/index.html#type-t">Block.t</a> list</span></code></td></tr></table></dt><dd><p>Type of procedure names. WithBlockParameters is used for creating an instantiation of a method that contains block parameters and it's called with concrete blocks. For example: <code>foo(Block block) {block();}</code> <code>bar() {foo(my_block)}</code> is executed as <code>foo_my_block() {my_block(); }</code> where foo_my_block is created with WithBlockParameters (foo, <code>my_block</code>)</p></dd></dl><div><div class="spec include"><div class="doc"><dl><dt class="spec value" id="val-compare"><a href="#val-compare" class="anchor"></a><code><span class="keyword">val</span> compare : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> int</code></dt></dl></div></div></div><dl><dt class="spec value" id="val-block_of_procname"><a href="#val-block_of_procname" class="anchor"></a><code><span class="keyword">val</span> block_of_procname : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="Block/index.html#type-t">Block.t</a></code></dt><dt class="spec value" id="val-equal"><a href="#val-equal" class="anchor"></a><code><span class="keyword">val</span> equal : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> bool</code></dt><dt class="spec value" id="val-get_class_type_name"><a href="#val-get_class_type_name" class="anchor"></a><code><span class="keyword">val</span> get_class_type_name : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <span><a href="../Typ/Name/index.html#type-t">Typ.Name.t</a> option</span></code></dt><dt class="spec value" id="val-get_class_name"><a href="#val-get_class_name" class="anchor"></a><code><span class="keyword">val</span> get_class_name : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <span>string option</span></code></dt><dt class="spec value" id="val-get_parameters"><a href="#val-get_parameters" class="anchor"></a><code><span class="keyword">val</span> get_parameters : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <span><a href="Parameter/index.html#type-t">Parameter.t</a> list</span></code></dt><dt class="spec value" id="val-replace_parameters"><a href="#val-replace_parameters" class="anchor"></a><code><span class="keyword">val</span> replace_parameters : <span><a href="Parameter/index.html#type-t">Parameter.t</a> list</span> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a></code></dt><dt class="spec value" id="val-parameter_of_name"><a href="#val-parameter_of_name" class="anchor"></a><code><span class="keyword">val</span> parameter_of_name : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="../Typ/Name/index.html#type-t">Typ.Name.t</a> <span>&#45;&gt;</span> <a href="Parameter/index.html#type-t">Parameter.t</a></code></dt><dt class="spec value" id="val-is_java_access_method"><a href="#val-is_java_access_method" class="anchor"></a><code><span class="keyword">val</span> is_java_access_method : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> bool</code></dt><dt class="spec value" id="val-is_java_class_initializer"><a href="#val-is_java_class_initializer" class="anchor"></a><code><span class="keyword">val</span> is_java_class_initializer : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> bool</code></dt><dt class="spec value" id="val-is_java_anonymous_inner_class_method"><a href="#val-is_java_anonymous_inner_class_method" class="anchor"></a><code><span class="keyword">val</span> is_java_anonymous_inner_class_method : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> bool</code></dt><dt class="spec value" id="val-is_java_autogen_method"><a href="#val-is_java_autogen_method" class="anchor"></a><code><span class="keyword">val</span> is_java_autogen_method : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> bool</code></dt><dt class="spec value" id="val-is_objc_method"><a href="#val-is_objc_method" class="anchor"></a><code><span class="keyword">val</span> is_objc_method : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> bool</code></dt></dl><dl><dt class="spec module" id="module-Hash"><a href="#module-Hash" class="anchor"></a><code><span class="keyword">module</span> Hash : <a href="../../IStdlib/index.html#module-IStd">IStdlib.IStd</a>.Caml.Hashtbl.S <span class="keyword">with</span> <span class="keyword">type</span> <a href="index.html#module-Hash">Hash</a>.key = <a href="index.html#type-t">t</a></code></dt><dd><p>Hash tables with proc names as keys.</p></dd></dl><div class="spec module" id="module-LRUHash"><a href="#module-LRUHash" class="anchor"></a><code><span class="keyword">module</span> <a href="LRUHash/index.html">LRUHash</a> : <a href="../../IStdlib/LRUHashtbl/index.html#module-type-S">IStdlib.LRUHashtbl.S</a> <span class="keyword">with</span> <span class="keyword">type</span> <a href="../../IStdlib/LRUHashtbl/module-type-S/index.html#type-key">key</a> = <a href="index.html#type-t">t</a></code></div><div class="spec module" id="module-HashQueue"><a href="#module-HashQueue" class="anchor"></a><code><span class="keyword">module</span> HashQueue : <a href="../../IStdlib/index.html#module-IStd">IStdlib.IStd</a>.Hash_queue.S <span class="keyword">with</span> <span class="keyword">type</span> <a href="index.html#module-HashQueue">HashQueue</a>.key = <a href="index.html#type-t">t</a></code></div><dl><dt class="spec module" id="module-Map"><a href="#module-Map" class="anchor"></a><code><span class="keyword">module</span> Map : <a href="../../IStdlib/PrettyPrintable/index.html#module-type-PPMap">IStdlib.PrettyPrintable.PPMap</a> <span class="keyword">with</span> <span class="keyword">type</span> <a href="../../IStdlib/PrettyPrintable/index.html#module-type-PPMap">PPMap</a>.key = <a href="index.html#type-t">t</a></code></dt><dd><p>Maps from proc names.</p></dd></dl><dl><dt class="spec module" id="module-Set"><a href="#module-Set" class="anchor"></a><code><span class="keyword">module</span> Set : <a href="../../IStdlib/PrettyPrintable/index.html#module-type-PPSet">IStdlib.PrettyPrintable.PPSet</a> <span class="keyword">with</span> <span class="keyword">type</span> <a href="../../IStdlib/PrettyPrintable/index.html#module-type-PPSet">PPSet</a>.elt = <a href="index.html#type-t">t</a></code></dt><dd><p>Sets of proc names.</p></dd></dl><div class="spec module" id="module-SQLite"><a href="#module-SQLite" class="anchor"></a><code><span class="keyword">module</span> <a href="SQLite/index.html">SQLite</a> : <span class="keyword">sig</span> ... <span class="keyword">end</span></code></div><div class="spec module" id="module-SQLiteList"><a href="#module-SQLiteList" class="anchor"></a><code><span class="keyword">module</span> <a href="SQLiteList/index.html">SQLiteList</a> : <a href="../../IBase/SqliteUtils/index.html#module-type-Data">IBase.SqliteUtils.Data</a> <span class="keyword">with</span> <span class="keyword">type</span> <a href="../../IBase/SqliteUtils/module-type-Data/index.html#type-t">t</a> = <span><a href="index.html#type-t">t</a> list</span></code></div><dl><dt class="spec module" id="module-UnitCache"><a href="#module-UnitCache" class="anchor"></a><code><span class="keyword">module</span> <a href="UnitCache/index.html">UnitCache</a> : <span class="keyword">sig</span> ... <span class="keyword">end</span></code></dt><dd><p>One-sized cache for one procedure at a time. Returns getter and setter.</p></dd></dl><dl><dt class="spec value" id="val-make_java"><a href="#val-make_java" class="anchor"></a><code><span class="keyword">val</span> make_java : <span>class_name:<a href="../Typ/Name/index.html#type-t">Typ.Name.t</a></span> <span>&#45;&gt;</span> <span>return_type:<span><a href="../Typ/index.html#type-t">Typ.t</a> option</span></span> <span>&#45;&gt;</span> <span>method_name:string</span> <span>&#45;&gt;</span> <span>parameters:<span><a href="../Typ/index.html#type-t">Typ.t</a> list</span></span> <span>&#45;&gt;</span> <span>kind:<a href="Java/index.html#type-kind">Java.kind</a></span> <span>&#45;&gt;</span> unit <span>&#45;&gt;</span> <a href="index.html#type-t">t</a></code></dt><dd><p>Create a Java procedure name.</p></dd></dl><dl><dt class="spec value" id="val-make_objc_dealloc"><a href="#val-make_objc_dealloc" class="anchor"></a><code><span class="keyword">val</span> make_objc_dealloc : <a href="../Typ/Name/index.html#type-t">Typ.Name.t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a></code></dt><dd><p>Create a Objective-C dealloc name. This is a destructor for an Objective-C class. This procname is given by the class name, since it is always an instance method with the name &quot;dealloc&quot;</p></dd></dl><dl><dt class="spec value" id="val-empty_block"><a href="#val-empty_block" class="anchor"></a><code><span class="keyword">val</span> empty_block : <a href="index.html#type-t">t</a></code></dt><dd><p>Empty block name.</p></dd></dl><dl><dt class="spec value" id="val-get_language"><a href="#val-get_language" class="anchor"></a><code><span class="keyword">val</span> get_language : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="../../IBase/Language/index.html#type-t">IBase.Language.t</a></code></dt><dd><p>Return the language of the procedure.</p></dd></dl><dl><dt class="spec value" id="val-get_method"><a href="#val-get_method" class="anchor"></a><code><span class="keyword">val</span> get_method : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> string</code></dt><dd><p>Return the method/function of a procname.</p></dd></dl><dl><dt class="spec value" id="val-is_objc_block"><a href="#val-is_objc_block" class="anchor"></a><code><span class="keyword">val</span> is_objc_block : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> bool</code></dt><dd><p>Return whether the procname is a block procname.</p></dd></dl><dl><dt class="spec value" id="val-is_objc_dealloc"><a href="#val-is_objc_dealloc" class="anchor"></a><code><span class="keyword">val</span> is_objc_dealloc : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> bool</code></dt><dd><p>Return whether the dealloc method of an Objective-C class.</p></dd></dl><dl><dt class="spec value" id="val-is_c_method"><a href="#val-is_c_method" class="anchor"></a><code><span class="keyword">val</span> is_c_method : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> bool</code></dt><dd><p>Return true this is an Objective-C/C++ method name.</p></dd></dl><dl><dt class="spec value" id="val-is_constructor"><a href="#val-is_constructor" class="anchor"></a><code><span class="keyword">val</span> is_constructor : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> bool</code></dt><dd><p>Check if this is a constructor.</p></dd></dl><dl><dt class="spec value" id="val-is_java"><a href="#val-is_java" class="anchor"></a><code><span class="keyword">val</span> is_java : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> bool</code></dt><dd><p>Check if this is a Java procedure name.</p></dd></dl><dl><dt class="spec value" id="val-as_java_exn"><a href="#val-as_java_exn" class="anchor"></a><code><span class="keyword">val</span> as_java_exn : <span>explanation:string</span> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="Java/index.html#type-t">Java.t</a></code></dt><dd><p>Converts to a Java.t. Throws if <code>is_java</code> is false</p></dd></dl><dl><dt class="spec value" id="val-with_block_parameters"><a href="#val-with_block_parameters" class="anchor"></a><code><span class="keyword">val</span> with_block_parameters : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <span><a href="Block/index.html#type-t">Block.t</a> list</span> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a></code></dt><dd><p>Create a procedure name instantiated with block parameters from a base procedure name and a list of block procedures.</p></dd></dl><dl><dt class="spec value" id="val-objc_cpp_replace_method_name"><a href="#val-objc_cpp_replace_method_name" class="anchor"></a><code><span class="keyword">val</span> objc_cpp_replace_method_name : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> string <span>&#45;&gt;</span> <a href="index.html#type-t">t</a></code></dt><dt class="spec value" id="val-is_infer_undefined"><a href="#val-is_infer_undefined" class="anchor"></a><code><span class="keyword">val</span> is_infer_undefined : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> bool</code></dt><dd><p>Check if this is a special Infer undefined procedure.</p></dd></dl><dl><dt class="spec value" id="val-get_global_name_of_initializer"><a href="#val-get_global_name_of_initializer" class="anchor"></a><code><span class="keyword">val</span> get_global_name_of_initializer : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <span>string option</span></code></dt><dd><p>Return the name of the global for which this procedure is the initializer if this is an initializer, None otherwise.</p></dd></dl><dl><dt class="spec value" id="val-pp"><a href="#val-pp" class="anchor"></a><code><span class="keyword">val</span> pp : Stdlib.Format.formatter <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> unit</code></dt><dd><p>Pretty print a proc name for the user to see.</p></dd></dl><dl><dt class="spec value" id="val-to_string"><a href="#val-to_string" class="anchor"></a><code><span class="keyword">val</span> to_string : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> string</code></dt><dd><p>Convert a proc name into a string for the user to see.</p></dd></dl><dl><dt class="spec value" id="val-describe"><a href="#val-describe" class="anchor"></a><code><span class="keyword">val</span> describe : Stdlib.Format.formatter <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> unit</code></dt><dd><p>to use in user messages</p></dd></dl><dl><dt class="spec value" id="val-replace_class"><a href="#val-replace_class" class="anchor"></a><code><span class="keyword">val</span> replace_class : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="../Typ/Name/index.html#type-t">Typ.Name.t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a></code></dt><dd><p>Replace the class name component of a procedure name. In case of Java, replace package and class name.</p></dd></dl><dl><dt class="spec value" id="val-is_method_in_objc_protocol"><a href="#val-is_method_in_objc_protocol" class="anchor"></a><code><span class="keyword">val</span> is_method_in_objc_protocol : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> bool</code></dt><dt class="spec value" id="val-pp_simplified_string"><a href="#val-pp_simplified_string" class="anchor"></a><code><span class="keyword">val</span> pp_simplified_string : <span>?&#8288;withclass:bool</span> <span>&#45;&gt;</span> <a href="index.html#module-F">F</a>.formatter <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> unit</code></dt><dd><p>Pretty print a proc name as an easy string for the user to see in an IDE.</p></dd></dl><dl><dt class="spec value" id="val-to_simplified_string"><a href="#val-to_simplified_string" class="anchor"></a><code><span class="keyword">val</span> to_simplified_string : <span>?&#8288;withclass:bool</span> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> string</code></dt><dd><p>Convert a proc name into an easy string for the user to see in an IDE.</p></dd></dl><dl><dt class="spec value" id="val-from_string_c_fun"><a href="#val-from_string_c_fun" class="anchor"></a><code><span class="keyword">val</span> from_string_c_fun : string <span>&#45;&gt;</span> <a href="index.html#type-t">t</a></code></dt><dd><p>Convert a string to a c function name.</p></dd></dl><dl><dt class="spec value" id="val-hashable_name"><a href="#val-hashable_name" class="anchor"></a><code><span class="keyword">val</span> hashable_name : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> string</code></dt><dd><p>Convert the procedure name in a format suitable for computing the bug hash.</p></dd></dl><dl><dt class="spec value" id="val-pp_unique_id"><a href="#val-pp_unique_id" class="anchor"></a><code><span class="keyword">val</span> pp_unique_id : <a href="index.html#module-F">F</a>.formatter <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> unit</code></dt><dd><p>Print a proc name as a unique identifier.</p></dd></dl><dl><dt class="spec value" id="val-to_unique_id"><a href="#val-to_unique_id" class="anchor"></a><code><span class="keyword">val</span> to_unique_id : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> string</code></dt><dd><p>Convert a proc name into a unique identifier.</p></dd></dl><dl><dt class="spec value" id="val-to_filename"><a href="#val-to_filename" class="anchor"></a><code><span class="keyword">val</span> to_filename : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> string</code></dt><dd><p>Convert a proc name to a filename.</p></dd></dl><dl><dt class="spec value" id="val-get_qualifiers"><a href="#val-get_qualifiers" class="anchor"></a><code><span class="keyword">val</span> get_qualifiers : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="../QualifiedCppName/index.html#type-t">QualifiedCppName.t</a></code></dt><dd><p>get qualifiers of C/objc/C++ method/function</p></dd></dl></div></body></html>