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
15 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>Ident (infer.IR.Ident)</title><link rel="stylesheet" href="../../../odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 1.5.0"/><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; Ident</nav><h1>Module <code>IR.Ident</code></h1><nav class="toc"><ul><li><a href="#pretty-printing">Pretty Printing</a></li></ul></nav></header><aside><p>Identifiers: program variables and logical variables</p></aside><dl><dt class="spec type" id="type-t"><a href="#type-t" class="anchor"></a><code><span class="keyword">type</span> t</code></dt><dd><p>Program and logical variables.</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-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><dd><p>Equality for identifiers.</p></dd></dl><dl><dt class="spec type" id="type-name"><a href="#type-name" class="anchor"></a><code><span class="keyword">type</span> name</code></dt><dd><p>Names used to replace strings.</p></dd></dl><div><div class="spec include"><div class="doc"><dl><dt class="spec value" id="val-compare_name"><a href="#val-compare_name" class="anchor"></a><code><span class="keyword">val</span> compare_name : <a href="index.html#type-name">name</a> <span>&#45;&gt;</span> <a href="index.html#type-name">name</a> <span>&#45;&gt;</span> int</code></dt></dl></div></div></div><dl><dt class="spec value" id="val-equal_name"><a href="#val-equal_name" class="anchor"></a><code><span class="keyword">val</span> equal_name : <a href="index.html#type-name">name</a> <span>&#45;&gt;</span> <a href="index.html#type-name">name</a> <span>&#45;&gt;</span> bool</code></dt><dd><p>Equality for names.</p></dd></dl><dl><dt class="spec type" id="type-kind"><a href="#type-kind" class="anchor"></a><code><span class="keyword">type</span> kind</code></dt><dd><p>Kind of identifiers.</p></dd></dl><div><div class="spec include"><div class="doc"><dl><dt class="spec value" id="val-compare_kind"><a href="#val-compare_kind" class="anchor"></a><code><span class="keyword">val</span> compare_kind : <a href="index.html#type-kind">kind</a> <span>&#45;&gt;</span> <a href="index.html#type-kind">kind</a> <span>&#45;&gt;</span> int</code></dt></dl></div></div></div><dl><dt class="spec value" id="val-equal_kind"><a href="#val-equal_kind" class="anchor"></a><code><span class="keyword">val</span> equal_kind : <a href="index.html#type-kind">kind</a> <span>&#45;&gt;</span> <a href="index.html#type-kind">kind</a> <span>&#45;&gt;</span> bool</code></dt><dd><p>Equality for kind.</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/index.html#module-IStd">IStdlib.IStd</a>.Caml.Set.S <span class="keyword">with</span> <span class="keyword">type</span> <a href="index.html#module-Set">Set</a>.elt = <a href="index.html#type-t">t</a></code></dt><dd><p>Set for identifiers.</p></dd></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 table with ident as key.</p></dd></dl><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/index.html#module-IStd">IStdlib.IStd</a>.Caml.Map.S <span class="keyword">with</span> <span class="keyword">type</span> <a href="index.html#module-Map">Map</a>.key = <a href="index.html#type-t">t</a></code></dt><dd><p>Map with ident as key.</p></dd></dl><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><div class="spec module" id="module-NameGenerator"><a href="#module-NameGenerator" class="anchor"></a><code><span class="keyword">module</span> <a href="NameGenerator/index.html">NameGenerator</a> : <span class="keyword">sig</span> ... <span class="keyword">end</span></code></div><dl><dt class="spec value" id="val-idlist_to_idset"><a href="#val-idlist_to_idset" class="anchor"></a><code><span class="keyword">val</span> idlist_to_idset : <span><a href="index.html#type-t">t</a> list</span> <span>&#45;&gt;</span> <a href="index.html#module-Set">Set</a>.t</code></dt><dd><p>Convert an identifier list to an identifier set</p></dd></dl><dl><dt class="spec value" id="val-kprimed"><a href="#val-kprimed" class="anchor"></a><code><span class="keyword">val</span> kprimed : <a href="index.html#type-kind">kind</a></code></dt><dt class="spec value" id="val-knormal"><a href="#val-knormal" class="anchor"></a><code><span class="keyword">val</span> knormal : <a href="index.html#type-kind">kind</a></code></dt><dt class="spec value" id="val-kfootprint"><a href="#val-kfootprint" class="anchor"></a><code><span class="keyword">val</span> kfootprint : <a href="index.html#type-kind">kind</a></code></dt><dt class="spec value" id="val-name_spec"><a href="#val-name_spec" class="anchor"></a><code><span class="keyword">val</span> name_spec : <a href="index.html#type-name">name</a></code></dt><dd><p>Name used for spec variables</p></dd></dl><dl><dt class="spec value" id="val-name_return"><a href="#val-name_return" class="anchor"></a><code><span class="keyword">val</span> name_return : <a href="../Mangled/index.html#type-t">Mangled.t</a></code></dt><dd><p>Name used for the return variable</p></dd></dl><dl><dt class="spec value" id="val-name_return_param"><a href="#val-name_return_param" class="anchor"></a><code><span class="keyword">val</span> name_return_param : <a href="../Mangled/index.html#type-t">Mangled.t</a></code></dt><dd><p>Name used for the return param variable</p></dd></dl><dl><dt class="spec value" id="val-string_to_name"><a href="#val-string_to_name" class="anchor"></a><code><span class="keyword">val</span> string_to_name : string <span>&#45;&gt;</span> <a href="index.html#type-name">name</a></code></dt><dd><p>Convert a string to a name.</p></dd></dl><dl><dt class="spec value" id="val-name_to_string"><a href="#val-name_to_string" class="anchor"></a><code><span class="keyword">val</span> name_to_string : <a href="index.html#type-name">name</a> <span>&#45;&gt;</span> string</code></dt><dd><p>Convert a name to a string.</p></dd></dl><dl><dt class="spec value" id="val-get_name"><a href="#val-get_name" class="anchor"></a><code><span class="keyword">val</span> get_name : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="index.html#type-name">name</a></code></dt><dd><p>Name of the identifier.</p></dd></dl><dl><dt class="spec value" id="val-create"><a href="#val-create" class="anchor"></a><code><span class="keyword">val</span> create : <a href="index.html#type-kind">kind</a> <span>&#45;&gt;</span> int <span>&#45;&gt;</span> <a href="index.html#type-t">t</a></code></dt><dd><p>Create an identifier with default name for the given kind</p></dd></dl><dl><dt class="spec value" id="val-create_normal"><a href="#val-create_normal" class="anchor"></a><code><span class="keyword">val</span> create_normal : <a href="index.html#type-name">name</a> <span>&#45;&gt;</span> int <span>&#45;&gt;</span> <a href="index.html#type-t">t</a></code></dt><dd><p>Generate a normal identifier with the given name and stamp.</p></dd></dl><dl><dt class="spec value" id="val-create_none"><a href="#val-create_none" class="anchor"></a><code><span class="keyword">val</span> create_none : unit <span>&#45;&gt;</span> <a href="index.html#type-t">t</a></code></dt><dd><p>Create a &quot;null&quot; identifier for situations where the IR requires an id that will never be read</p></dd></dl><dl><dt class="spec value" id="val-create_footprint"><a href="#val-create_footprint" class="anchor"></a><code><span class="keyword">val</span> create_footprint : <a href="index.html#type-name">name</a> <span>&#45;&gt;</span> int <span>&#45;&gt;</span> <a href="index.html#type-t">t</a></code></dt><dd><p>Generate a footprint identifier with the given name and stamp.</p></dd></dl><dl><dt class="spec value" id="val-update_name_generator"><a href="#val-update_name_generator" class="anchor"></a><code><span class="keyword">val</span> update_name_generator : <span><a href="index.html#type-t">t</a> list</span> <span>&#45;&gt;</span> unit</code></dt><dd><p>Update the name generator so that the given id's are not generated again</p></dd></dl><dl><dt class="spec value" id="val-create_fresh"><a href="#val-create_fresh" class="anchor"></a><code><span class="keyword">val</span> create_fresh : <a href="index.html#type-kind">kind</a> <span>&#45;&gt;</span> <a href="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><dt class="spec value" id="val-create_fresh_specialized_with_blocks"><a href="#val-create_fresh_specialized_with_blocks" class="anchor"></a><code><span class="keyword">val</span> create_fresh_specialized_with_blocks : <a href="index.html#type-kind">kind</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a></code></dt><dd><p>Create a fresh identifier with default name for the given kind, with a non-clashing id for objc block specialization</p></dd></dl><dl><dt class="spec value" id="val-create_path"><a href="#val-create_path" class="anchor"></a><code><span class="keyword">val</span> create_path : string <span>&#45;&gt;</span> <a href="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><dt class="spec value" id="val-is_primed"><a href="#val-is_primed" class="anchor"></a><code><span class="keyword">val</span> is_primed : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> bool</code></dt><dd><p>Check whether an identifier is primed or not.</p></dd></dl><dl><dt class="spec value" id="val-is_normal"><a href="#val-is_normal" class="anchor"></a><code><span class="keyword">val</span> is_normal : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> bool</code></dt><dd><p>Check whether an identifier is normal or not.</p></dd></dl><dl><dt class="spec value" id="val-is_footprint"><a href="#val-is_footprint" class="anchor"></a><code><span class="keyword">val</span> is_footprint : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> bool</code></dt><dd><p>Check whether an identifier is footprint or not.</p></dd></dl><dl><dt class="spec value" id="val-is_path"><a href="#val-is_path" class="anchor"></a><code><span class="keyword">val</span> is_path : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> bool</code></dt><dd><p>Check whether an identifier represents a path or not.</p></dd></dl><dl><dt class="spec value" id="val-is_none"><a href="#val-is_none" class="anchor"></a><code><span class="keyword">val</span> is_none : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> bool</code></dt><dd><p>Check whether an identifier is the special &quot;none&quot; identifier</p></dd></dl><dl><dt class="spec value" id="val-get_stamp"><a href="#val-get_stamp" class="anchor"></a><code><span class="keyword">val</span> get_stamp : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> int</code></dt><dd><p>Get the stamp of the identifier</p></dd></dl><dl><dt class="spec value" id="val-set_stamp"><a href="#val-set_stamp" class="anchor"></a><code><span class="keyword">val</span> set_stamp : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> int <span>&#45;&gt;</span> <a href="index.html#type-t">t</a></code></dt><dd><p>Set the stamp of the identifier</p></dd></dl><section><header><h3 id="pretty-printing"><a href="#pretty-printing" class="anchor"></a>Pretty Printing</h3></header><dl><dt class="spec value" id="val-pp_name"><a href="#val-pp_name" class="anchor"></a><code><span class="keyword">val</span> pp_name : Stdlib.Format.formatter <span>&#45;&gt;</span> <a href="index.html#type-name">name</a> <span>&#45;&gt;</span> unit</code></dt><dd><p>Pretty print a name.</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 an identifier.</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 an identifier to a string.</p></dd></dl><dl><dt class="spec value" id="val-hashqueue_of_sequence"><a href="#val-hashqueue_of_sequence" class="anchor"></a><code><span class="keyword">val</span> hashqueue_of_sequence : <span>?&#8288;init:<span>unit <a href="index.html#module-HashQueue">HashQueue</a>.t</span></span> <span>&#45;&gt;</span> <span><a href="index.html#type-t">t</a> <a href="../../IStdlib/index.html#module-IStd">IStdlib.IStd</a>.Sequence.t</span> <span>&#45;&gt;</span> <span>unit <a href="index.html#module-HashQueue">HashQueue</a>.t</span></code></dt><dt class="spec value" id="val-set_of_sequence"><a href="#val-set_of_sequence" class="anchor"></a><code><span class="keyword">val</span> set_of_sequence : <span>?&#8288;init:<a href="index.html#module-Set">Set</a>.t</span> <span>&#45;&gt;</span> <span><a href="index.html#type-t">t</a> <a href="../../IStdlib/index.html#module-IStd">IStdlib.IStd</a>.Sequence.t</span> <span>&#45;&gt;</span> <a href="index.html#module-Set">Set</a>.t</code></dt><dt class="spec value" id="val-counts_of_sequence"><a href="#val-counts_of_sequence" class="anchor"></a><code><span class="keyword">val</span> counts_of_sequence : <span><a href="index.html#type-t">t</a> <a href="../../IStdlib/index.html#module-IStd">IStdlib.IStd</a>.Sequence.t</span> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> int</code></dt></dl></section></div></body></html>