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>IR__Ident (infer.IR__Ident)</title><linkrel="stylesheet"href="../../odoc.css"/><metacharset="utf-8"/><metaname="generator"content="odoc 1.5.1"/><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>» IR__Ident</nav><h1>Module <code>IR__Ident</code></h1><p>Identifiers: program variables and logical variables</p><navclass="toc"><ul><li><ahref="#pretty-printing">Pretty Printing</a></li></ul></nav></header><dl><dtclass="spec type"id="type-t"><ahref="#type-t"class="anchor"></a><code><spanclass="keyword">type</span> t</code></dt><dd><p>Program and logical variables.</p></dd></dl><div><divclass="spec include"><divclass="doc"><dl><dtclass="spec value"id="val-compare"><ahref="#val-compare"class="anchor"></a><code><spanclass="keyword">val</span> compare : <ahref="index.html#type-t">t</a><span>-></span><ahref="index.html#type-t">t</a><span>-></span> int</code></dt><dtclass="spec value"id="val-yojson_of_t"><ahref="#val-yojson_of_t"class="anchor"></a><code><spanclass="keyword">val</span> yojson_of_t : <ahref="index.html#type-t">t</a><span>-></span> Ppx_yojson_conv_lib.Yojson.Safe.t</code></dt></dl></div></div></div><dl><dtclass="spec value"id="val-equal"><ahref="#val-equal"class="anchor"></a><code><spanclass="keyword">val</span> equal : <ahref="index.html#type-t">t</a><span>-></span><ahref="index.html#type-t">t</a><span>-></span> bool</code></dt><dd><p>Equality for identifiers.</p></dd></dl><dl><dtclass="spec type"id="type-name"><ahref="#type-name"class="anchor"></a><code><spanclass="keyword">type</span> name</code></dt><dd><p>Names used to replace strings.</p></dd></dl><div><divclass="spec include"><divclass="doc"><dl><dtclass="spec value"id="val-compare_name"><ahref="#val-compare_name"class="anchor"></a><code><spanclass="keyword">val</span> compare_name : <ahref="index.html#type-name">name</a><span>-></span><ahref="index.html#type-name">name</a><span>-></span> int</code></dt></dl></div></div></div><dl><dtclass="spec value"id="val-equal_name"><ahref="#val-equal_name"class="anchor"></a><code><spanclass="keyword">val</span> equal_name : <ahref="index.html#type-name">name</a><span>-></span><ahref="index.html#type-name">name</a><span>-></span> bool</code></dt><dd><p>Equality for names.</p></dd></dl><dl><dtclass="spec type"id="type-kind"><ahref="#type-kind"class="anchor"></a><code><spanclass="keyword">type</span> kind</code></dt><dd><p>Kind of identifiers.</p></dd></dl><div><divclass="spec include"><divclass="doc"><dl><dtclass="spec value"id="val-compare_kind"><ahref="#val-compare_kind"class="anchor"></a><code><spanclass="keyword">val</span> compare_kind : <ahref="index.html#type-kind">kind</a><span>-></span><ahref="index.html#type-kind">kind</a><span>-></span> int</code></dt></dl></div></div></div><dl><dtclass="spec value"id="val-equal_kind"><ahref="#val-equal_kind"class="anchor"></a><code><spanclass="keyword">val</span> equal_kind : <ahref="index.html#type-kind">kind</a><span>-></span><ahref="index.html#type-kind">kind</a><span>-></span> bool</code></dt><dd><p>Equality for kind.</p></dd></dl><dl><dtclass="spec module"id="module-Set"><ahref="#module-Set"class="anchor"></a><code><spanclass="keyword">module</span> Set : <ahref="../IStdlib/index.html#module-IStd">IStdlib.IStd</a>.Caml.Set.S <spanclass="keyword">with</span><spanclass="keyword">type</span><ahref="index.html#module-Set">Set</a>.elt = <ahref="index.html#type-t">t</a></code></dt><dd><p>Set for identifiers.</p></dd></dl><dl><dtclass="spec module"id="module-Hash"><ahref="#module-Hash"class="anchor"></a><code><spanclass="keyword">module</span> Hash : <ahref="../IStdlib/index.html#module-IStd">IStdlib.IStd</a>.Caml.Hashtbl.S <spanclass="keyword">with</span><spanclass="keyword">type</span><ahref="index.html#module-Hash">Hash</a>.key = <ahref="index.html#type-t">t</a></code></dt><dd><p>Hash table with ident as key.</p></dd></dl><dl><dtclass="spec module"id="module-Map"><ahref="#module-Map"class="anchor"></a><code><spanclass="keyword">module</span> Map : <ahref="../IStdlib/index.html#module-IStd">IStdlib.IStd</a>.Caml.Map.S <spanclass="keyword">with</span><spanclass="keyword">type</span><ahref="index.html#module-Map">Map</a>.key = <ahref="index.html#type-t">t</a></code></dt><dd><p>Map with ident as key.</p></dd></dl><divclass="spec module"id="module-HashQueue"><ahref="#module-HashQueue"class="anchor"></a><code><spanclass="keyword">module</span> HashQueue : <ahref="../IStdlib/index.html#module-IStd">IStdlib.IStd</a>.Hash_queue.S <spanclass="keyword">with</span><spanclass="keyword">type</span><ahref="index.html#module-HashQueue">HashQueue</a>.key = <ahref="index.html#type-t">t</a></code></div><divclass="spec module"id="module-NameGenerator"><ahref="#module-NameGenerator"class="anchor"></a><code><spanclass="keyword">module</span><ahref="NameGenerator/index.html">NameGenerator</a> : <spanclass="keyword">sig</span> ... <spanclass="keyword">end</span></code></div><dl><dtclass="spec value"id="val-idlist_to_idset"><ahref="#val-idlist_to_idset"class="anchor"></a><code><spanclass="keyword">val</span> idlist_to_idset : <span><ahref="index.html#type-t">t</a> list</span><span>-></span><ahref="index.html#module-Set">Set</a>.t</code></dt><dd><p>Convert an identifier list to an identifier set</p></dd></dl><dl><dtclass="spec value"id="val-kprimed"><ahref="#val-kprimed"class="anchor"></a><code><spanclass="keyword">val</span> kprimed : <ahref="index.html#type-kind">kind</a></code></dt><dtclass="spec value"id="val-knormal"><ahref="#val-knormal"class="anchor"></a><code><spanclass="keyword">val</span> knormal : <ahref="index.html#type-kind">kind</a></code></dt><dtclass="spec value"id="val-kfootprint"><ahref="#val-kfootprint"class="anchor"></a><code><spanclass="keyword">val</span> kfootprint : <ahref="index.html#type-kind">kind</a></code></dt><dtclass="spec value"id="val-knone"><ahref="#val-knone"class="anchor"></a><code><spanclass="keyword">val</span> knone : <ahref="index.html#type-kind">kind</a></code></dt><dtclass="spec value"id="val-name_spec"><ahref="#val-name_spec"class="anchor"></a><code><spanclass="keyword">val</span> name_spec : <ahref="index.html#type-name">name</a></code></dt><dd><p>Name used for spec variables</p></dd></dl><dl><dtclass="spec value"id="val-name_return"><ahref="#val-name_return"class="anchor"></a><code><spanclass="keyword">val</span> name_return : <ahref="../IR/Mangled/index.html#type-t">IR.Mangled.t</a></code></dt><dd><p>Name used for the return variable</p></dd></dl><dl><dtclass="spec value"id="val-string_to_name"><ahref="#val-string_to_name"class="anchor"></a><code><spanclass="keyword">val</span> string_to_name : string <span>-></span><ahref="index.html#type-name">name</a></code></dt><dd><p>Convert a string to a name.</p></dd></dl><dl><dtclass="spec value"id="val-name_to_string"><ahref="#val-name_to_string"class="anchor"></a><code><spanclass="keyword">val</span> name_to_string : <ahref="index.html#type-name">name</a><span>-></span> string</code></dt><dd><p>Convert a name to a string.</p></dd></dl><dl><dtclass="spec value"id="val-get_name"><ahref="#val-get_name"class="anchor"></a><code><spanclass="keyword">val</span> get_name : <ahref="index.html#type-t">t</a><span>-></span><ahref="index.html#type-name">name</a></code></dt><dd><p>Name of the identifier.</p></dd></dl><dl><dtclass="spec value"id="val-create_with_stamp"><ahref="#val-create_with_stamp"class="anchor"></a><code><spanclass="keyword">val</span> create_with_stamp : <ahref="index.html#type-kind">kind</a><span>-></span><ahref="index.html#type-name">name</a><span>-></span> int <span>-></span><ahref="index.html#type-t">t</a></code></dt><dtclass="spec value"id="val-create"><ahref="#val-create"class="anchor"></a><code><spanclass="keyword">val</span> create : <ahref="index.html#type-kind">kind</a><span>-></span> int <span>-></span><ahref="index.html#type-t">t</a></code></dt><dd><p>Create an identifier with default name for the given kind</p></dd></dl><dl><dtclass="spec value"id="val-create_normal"><ahref="#val-create_normal"class="anchor"></a><code><spanclass="keyword">val</span> create_normal : <ahref="index.html#type-name">name</a><span>-></span> int <span>-></span><ahref="index.html#type-t">t</a></code></dt><dd><p>Generate a normal identifier with the given name and stamp.</p></dd></dl><dl><dtclass="spec value"id="val-create_none"><ahref="#val-create_none"class="anchor"></a><code><spanclass="keyword">val</span> create_none : unit <span>-></span><ahref="index.html#type-t">t</a></code></dt><dd><p>Create a "null" identifier for situations where the IR requires an id that will never be read</p></dd></dl><dl><dtclass="spec value"id="val-create_footprint"><ahref="#val-create_footprint"class="anchor"></a><code><spanclass="keyword">val</span> create_footprint : <ahref="index.html#type-name">name</a><span>-></span> int <span>-></span><ahref="index.html#type-t">t</a></code></dt><dd><p>Generate a footprint identifier with the given name and stamp.</p></dd></dl><dl><dtclass="spec value"id="val-update_name_generator"><ahref="#val-update_name_generator"class="anchor"></a><code><spanclass="keyword">val</span> update_name_generator : <span><ahref="index.html#type-t">t</a> list</span><span>-></span> unit</code></dt><dd><p>Update the name generator so that the given id's are not generated again</p></dd></dl><dl><dtclass="spec value"id="val-create_fresh"><ahref="#val-create_fresh"class="anchor"></a><code><spanclass="keyword">val</span> create_fresh : <ahref="index.html#type-kind">kind</a><span>-></span><ahref="index.html#type-t">t</a></code></dt><dd><p>Create a fresh identifier with default name for the given kind.</p></dd></dl><dl><dtclass="spec value"id="val-create_path"><ahref="#val-create_path"class="anchor"></a><code><spanclass="keyword">val</span> create_path : string <span>-></span><ahref="index.html#type-t">t</a></code></dt><dd><p>Generate a normal identifier whose name encodes a path given as a string.</p></dd></dl><dl><dtclass="spec value"id="val-is_primed"><ahref="#val-is_primed"class="anchor"></a><code><spanclass="keyword">val</span> is_primed : <ahref="index.html#type-t">t</a><span>-></span> bool</code></dt><dd><p>Check whether an identifier is primed or not.</p></dd></dl><dl><dtclass="spec value"id="val-is_normal"><ahref="#val-is_normal"class="anchor"></a><code><spanclass="keyword">val</span> is_normal : <ahref="index.html#type-t">t</a><span>-></span> bool</code></dt><dd><p>Check whether an identifier is normal or not.</p></dd></dl><dl><dtclass="spec value"id="val-is_footprint"><ahref="#val-is_footprint"class="anchor"></a><code><spanclass="keyword">val</span> is_footprint : <ahref="index.html#type-t">t</a><span>-></span> bool</code></dt><dd><p>Check whether an identifier is footprint or not.</p></dd></dl><dl><dtclass="spec value"id="val-is_path"><ahref="#val-is_path"class="anchor"></a><code><spanclass="keyword">val</span> is_path : <ahref="index.html#type-t">t</a><span>-></span> bool</code></dt><dd><p>Check whether an identifier represents a path or not.</p></dd></dl><dl><dtclass="spec value"id="val-is_none"><ahref="#val-is_none"class="anchor"></a><code><spanclass="keyword">val</span> is_none : <ahref="index.html#type-t">t</a><span>-></span> bool</code></dt><dd><p>Check whether an identifier is the special "none" identifier</p></dd></dl><dl><dtclass="spec value"id="val-get_stamp"><ahref="#val-get_stamp"class="anchor"></a><code><spanclass="keyword">val</span> get_stamp : <ahref="index.html#type-t">t</a><span>-></span> int</code></dt><dd><p>Get the stamp of the identifier</p></dd></dl><dl><dtclass="spec value"id="val-set_stamp"><ahref="#val-set_stamp"class="anchor"></a><code><spanclass="keyword">val</span> set_stamp : <ahref="index.html#type-t">t</a><span>-></span> int <span>-></span><ahref="index.html#type-t">t</a></code></dt><dd><p>Set the stamp of the identifier</p></dd></dl><section><header><h3id="pretty-printing"><ahref="#pretty-printing"class="anchor"></a>Pretty Printing</h3></header><dl><dtclass="spec value"id="val-pp_name"><ahref="#val-pp_name"class="anchor"></a><code><spanclass="keyword">val</span> pp_name : Stdlib.Format.formatter <span>-></span><ahref="index.html#type-name">name</a><span>-></span> unit</code></dt><dd><p>Pretty print a name.</p></dd></dl><dl><dtclass="spec value"id="val-pp"><ahref="#val-pp"class="anchor"></a><code><spanclass="keyword">val</span> pp : Stdlib.Format.formatter <span>-></span><ahref="index.html#type-t">t</a><span>-></span> unit</code></dt><dd><p>Pretty print an identifier.</p></dd></dl><dl><dtclass="spec value"id="val-to_string"><ahref="#val-to_string"class="anchor"></a><code><spanclass="keyword">val</span> to_string : <ahref="index.html#type-t">t</a><span>-></span> string</code></dt><dd><p>Convert an identifier to a string.</p></dd></dl><dl><dtclass="spec value"id="val-hashqueue_of_sequence"><ahref="#val-hashqueue_of_sequence"class="anchor"></a><code><spanclass="keyword">val</span> hashqueue_of_sequence : <span>?⁠init:<span>unit <ahref="index.html#module-HashQueue">HashQueue</a>.t</span></span><span>-></span><span><ahref="index.html#type-t">t</a><ahref="../IStdlib/index.html#module-IStd">IStdlib.IStd</a>.Sequence.t</span><span>-></span><span>unit <ahref="index.html#module-HashQueue">HashQueue</a>.t</span></code></dt><dtclass="spec value"id="val-set_of_sequence"><ahref="#val-set_of_sequence"class="anchor"></a><code><spanclass="keyword">val</span> set_of_sequence : <span>?⁠init:<ahref="index.html#module-Set">Set</a>.t</span><span>-></span><span><ahref="index.html#type-t">t</a><ahref="../IStdlib/index.html#module-IStd">IStdlib.IStd</a>.Sequence.t</span><span>-></span><ahref="index.html#module-Set">Set</a>.t</code></dt><dtclass="spec value"id="val-counts_of_sequence"><ahref="#val-counts_of_sequence"class="anchor"></a><code><spanclass="keyword">val</span> counts_of_sequence : <span><ahref="index.html#type-t">t</a><ahref="../IStdlib/index.html#module-IStd">IStdlib.IStd</a>.Sequence.t</span><span>-></span><ahref="index.html#type-t">t</a><span>-></span> int</code></dt></dl></section></div></body></html>