<htmlxmlns="http://www.w3.org/1999/xhtml"><head><title>IR__Exp (infer.IR__Exp)</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__Exp</nav><h1>Module <code>IR__Exp</code></h1><p>The Smallfoot Intermediate Language: Expressions</p><p>NOTE: For doing substitutionson expressions, there are some functions in <code>Sil</code>.</p><navclass="toc"><ul><li><ahref="#utility-functions-for-expressions">Utility Functions for Expressions</a></li></ul></nav></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-closure"><ahref="#type-closure"class="anchor"></a><code><spanclass="keyword">type</span> closure</code><code> = </code><code>{</code><tableclass="record"><trid="type-closure.name"class="anchored"><tdclass="def field"><ahref="#type-closure.name"class="anchor"></a><code>name : <ahref="../IR/Procname/index.html#type-t">IR.Procname.t</a>;</code></td></tr><trid="type-closure.captured_vars"class="anchored"><tdclass="def field"><ahref="#type-closure.captured_vars"class="anchor"></a><code>captured_vars : <span><span>(<ahref="index.html#type-t">t</a> * <ahref="../IR/Pvar/index.html#type-t">IR.Pvar.t</a> * <ahref="../IR/Typ/index.html#type-t">IR.Typ.t</a> * <ahref="../IR/CapturedVar/index.html#type-capture_mode">IR.CapturedVar.capture_mode</a>)</span> list</span>;</code></td></tr></table><code>}</code></dt><dtclass="spec type"id="type-sizeof_data"><ahref="#type-sizeof_data"class="anchor"></a><code><spanclass="keyword">and</span> sizeof_data</code><code> = </code><code>{</code><tableclass="record"><trid="type-sizeof_data.typ"class="anchored"><tdclass="def field"><ahref="#type-sizeof_data.typ"class="anchor"></a><code>typ : <ahref="../IR/Typ/index.html#type-t">IR.Typ.t</a>;</code></td></tr><trid="type-sizeof_data.nbytes"class="anchored"><tdclass="def field"><ahref="#type-sizeof_data.nbytes"class="anchor"></a><code>nbytes : <span>int option</span>;</code></td></tr><trid="type-sizeof_data.dynamic_length"class="anchored"><tdclass="def field"><ahref="#type-sizeof_data.dynamic_length"class="anchor"></a><code>dynamic_length : <span><ahref="index.html#type-t">t</a> option</span>;</code></td></tr><trid="type-sizeof_data.subtype"class="anchored"><tdclass="def field"><ahref="#type-sizeof_data.subtype"class="anchor"></a><code>subtype : <ahref="../IR/Subtype/index.html#type-t">IR.Subtype.t</a>;</code></td></tr></table><code>}</code></dt><dd><p>This records information about a <code>sizeof(typ)</code> expression.</p><p><code>nbytes</code> represents the result of the evaluation of <code>sizeof(typ)</code> if it is statically known.</p><p>If <code>typ</code> is of the form <code>Tarray elt (Some static_length)</code>, then <code>dynamic_length</code> is the number of elements of type <code>elt</code> in the array. The <code>dynamic_length</code>, tracked by symbolic execution, may differ from the <code>static_length</code> obtained from the type definition, e.g. when an array is over-allocated.</p><p>If <code>typ</code> is a struct type, the <code>dynamic_length</code> is that of the final extensible array, if any.</p></dd></dl><dl><dtclass="spec type"id="type-t"><ahref="#type-t"class="anchor"></a><code><spanclass="keyword">and</span> t</code><code> = </code><tableclass="variant"><trid="type-t.Var"class="anchored"><tdclass="def constructor"><ahref="#type-t.Var"class="anchor"></a><code>| </code><code><spanclass="constructor">Var</span><spanclass="keyword">of</span><ahref="../IR/Ident/index.html#type-t">IR.Ident.t</a></code></td><tdclass="doc"><p>Pure variable: it is not an lvalue</p></td></tr><t