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
23 KiB

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>IR__Exp (infer.IR__Exp)</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; 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><nav class="toc"><ul><li><a href="#utility-functions-for-expressions">Utility Functions for Expressions</a></li></ul></nav></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><dl><dt class="spec type" id="type-closure"><a href="#type-closure" class="anchor"></a><code><span class="keyword">type</span> closure</code><code> = </code><code>{</code><table class="record"><tr id="type-closure.name" class="anchored"><td class="def field"><a href="#type-closure.name" class="anchor"></a><code>name : <a href="../IR/Procname/index.html#type-t">IR.Procname.t</a>;</code></td></tr><tr id="type-closure.captured_vars" class="anchored"><td class="def field"><a href="#type-closure.captured_vars" class="anchor"></a><code>captured_vars : <span><span>(<a href="index.html#type-t">t</a> * <a href="../IR/Pvar/index.html#type-t">IR.Pvar.t</a> * <a href="../IR/Typ/index.html#type-t">IR.Typ.t</a> * <a href="../IR/Pvar/index.html#type-capture_mode">IR.Pvar.capture_mode</a>)</span> list</span>;</code></td></tr></table><code>}</code></dt><dt class="spec type" id="type-sizeof_data"><a href="#type-sizeof_data" class="anchor"></a><code><span class="keyword">and</span> sizeof_data</code><code> = </code><code>{</code><table class="record"><tr id="type-sizeof_data.typ" class="anchored"><td class="def field"><a href="#type-sizeof_data.typ" class="anchor"></a><code>typ : <a href="../IR/Typ/index.html#type-t">IR.Typ.t</a>;</code></td></tr><tr id="type-sizeof_data.nbytes" class="anchored"><td class="def field"><a href="#type-sizeof_data.nbytes" class="anchor"></a><code>nbytes : <span>int option</span>;</code></td></tr><tr id="type-sizeof_data.dynamic_length" class="anchored"><td class="def field"><a href="#type-sizeof_data.dynamic_length" class="anchor"></a><code>dynamic_length : <span><a href="index.html#type-t">t</a> option</span>;</code></td></tr><tr id="type-sizeof_data.subtype" class="anchored"><td class="def field"><a href="#type-sizeof_data.subtype" class="anchor"></a><code>subtype : <a href="../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><dt class="spec type" id="type-t"><a href="#type-t" class="anchor"></a><code><span class="keyword">and</span> t</code><code> = </code><table class="variant"><tr id="type-t.Var" class="anchored"><td class="def constructor"><a href="#type-t.Var" class="anchor"></a><code>| </code><code><span class="constructor">Var</span> <span class="keyword">of</span> <a href="../IR/Ident/index.html#type-t">IR.Ident.t</a></code></td><td class="doc"><p>Pure variable: it is not an lvalue</p></td></tr><tr id="type-t.U