<htmlxmlns="http://www.w3.org/1999/xhtml"><head><title>IR__Pvar (infer.IR__Pvar)</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__Pvar</nav><h1>Module <code>IR__Pvar</code></h1><p>Program variables.</p></header><divclass="spec module"id="module-F"><ahref="#module-F"class="anchor"></a><code><spanclass="keyword">module</span> F = Stdlib.Format</code></div><dl><dtclass="spec type"id="type-translation_unit"><ahref="#type-translation_unit"class="anchor"></a><code><spanclass="keyword">type</span> translation_unit</code><code> = <span><ahref="../IBase/SourceFile/index.html#type-t">IBase.SourceFile.t</a> option</span></code></dt></dl><div><divclass="spec include"><divclass="doc"><dl><dtclass="spec value"id="val-compare_translation_unit"><ahref="#val-compare_translation_unit"class="anchor"></a><code><spanclass="keyword">val</span> compare_translation_unit : <ahref="index.html#type-translation_unit">translation_unit</a><span>-></span><ahref="index.html#type-translation_unit">translation_unit</a><span>-></span> int</code></dt></dl></div></div></div><dl><dtclass="spec type"id="type-t"><ahref="#type-t"class="anchor"></a><code><spanclass="keyword">type</span> t</code></dt><dd><p>Type for program variables. There are 4 kinds of variables:</p><ol><li>local variables, used for local variables and formal parameters</li><li>callee program variables, used to handle recursion (<code>x | callee</code> is distinguished from <code>x</code>)</li><li>global variables</li><li>seed variables, used to store the initial value of formal parameters</li></ol></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></dl></div></div></div><dl><dtclass="spec value"id="val-compare_modulo_this"><ahref="#val-compare_modulo_this"class="anchor"></a><code><spanclass="keyword">val</span> compare_modulo_this : <ahref="index.html#type-t">t</a><span>-></span><ahref="index.html#type-t">t</a><span>-></span> int</code></dt><dd><p>Comparison considering all pvars named 'this'/'self' to be equal</p></dd></dl><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 pvar's</p></dd></dl><dl><dtclass="spec value"id="val-get_declaring_function"><ahref="#val-get_declaring_function"class="anchor"></a><code><spanclass="keyword">val</span> get_declaring_function : <ahref="index.html#type-t">t</a><span>-></span><span><ahref="../IR/Procname/index.html#type-t">IR.Procname.t</a> option</span></code></dt><dd><p>if not a global, return function declaring var</p></dd></dl><dl><dtclass="spec value"id="val-d"><ahref="#val-d"class="anchor"></a><code><spanclass="keyword">val</span> d : <ahref="index.html#type-t">t</a><span>-></span> unit</code></dt><dd><p>Dump a program variable.</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="../IR/Mangled/index.html#type-t">IR.Mangled.t</a></code></dt><dd><p>Get the name component of a program variable.</p></dd></dl><dl><dtclass="spec value"id="val-get_ret_pvar"><ahref="#val-get_ret_pvar"class="anchor"></a><code><spanclass="keyword">val</span> get_ret_p