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>HilExp (infer.Absint.HilExp)</title><linkrel="stylesheet"href="../../../odoc.css"/><metacharset="utf-8"/><metaname="generator"content="odoc 1.5.2"/><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>»<ahref="../index.html">Absint</a>» HilExp</nav><h1>Module <code>Absint.HilExp</code></h1></header><divclass="spec module"id="module-F"><ahref="#module-F"class="anchor"></a><code><spanclass="keyword">module</span> F = Stdlib.Format</code></div><divclass="spec module"id="module-Access"><ahref="#module-Access"class="anchor"></a><code><spanclass="keyword">module</span><ahref="Access/index.html">Access</a> : <spanclass="keyword">sig</span> ... <spanclass="keyword">end</span></code></div><dl><dtclass="spec type"id="type-t"><ahref="#type-t"class="anchor"></a><code><spanclass="keyword">type</span> t</code><code> = </code><tableclass="variant"><trid="type-t.AccessExpression"class="anchored"><tdclass="def constructor"><ahref="#type-t.AccessExpression"class="anchor"></a><code>| </code><code><spanclass="constructor">AccessExpression</span><spanclass="keyword">of</span><ahref="index.html#type-access_expression">access_expression</a></code></td><tdclass="doc"><p>access path (e.g., x.f.g or x<code>i</code>)</p></td></tr><trid="type-t.UnaryOperator"class="anchored"><tdclass="def constructor"><ahref="#type-t.UnaryOperator"class="anchor"></a><code>| </code><code><spanclass="constructor">UnaryOperator</span><spanclass="keyword">of</span><ahref="../../IR/Unop/index.html#type-t">IR.Unop.t</a> * <ahref="index.html#type-t">t</a> * <span><ahref="../../IR/Typ/index.html#type-t">IR.Typ.t</a> option</span></code></td><tdclass="doc"><p>Unary operator with type of the result if known</p></td></tr><trid="type-t.BinaryOperator"class="anchored"><tdclass="def constructor"><ahref="#type-t.BinaryOperator"class="anchor"></a><code>| </code><code><spanclass="constructor">BinaryOperator</span><spanclass="keyword">of</span><ahref="../../IR/Binop/index.html#type-t">IR.Binop.t</a> * <ahref="index.html#type-t">t</a> * <ahref="index.html#type-t">t</a></code></td><tdclass="doc"><p>Binary operator</p></td></tr><trid="type-t.Exception"class="anchored"><tdclass="def constructor"><ahref="#type-t.Exception"class="anchor"></a><code>| </code><code><spanclass="constructor">Exception</span><spanclass="keyword">of</span><ahref="index.html#type-t">t</a></code></td><tdclass="doc"><p>Exception</p></td></tr><trid="type-t.Closure"class="anchored"><tdclass="def constructor"><ahref="#type-t.Closure"class="anchor"></a><code>| </code><code><spanclass="constructor">Closure</span><spanclass="keyword">of</span><ahref="../../IR/Procname/index.html#type-t">IR.Procname.t</a> * <span><span>(<ahref="../AccessPath/index.html#type-base">AccessPath.base</a> * <ahref="index.html#type-t">t</a>)</span> list</span></code></td><tdclass="doc"><p>Name of function + environment</p></td></tr><trid="type-t.Constant"class="anchored"><tdclass="def constructor"><ahref="#type-t.Constant"class="anchor"></a><code>| </code><code><spanclass="constructor">Constant</span><spanclass="keyword">of</span><ahref="../../IR/Const/index.html#type-t">IR.Const.t</a></code></td><tdclass="doc"><p>Constants</p></td></tr><trid="type-t.Cast"class="anchored"><tdclass="def constructor"><ahref="#type-t.Cast"class="anchor"></a><code>| </code><code><spanclass="constructor">Cast</span><spanclass="keyword">of</span><ahref="../../IR/Typ/index.html#type-t">IR.Typ.t</a> * <ahref="index.html#type-t">t</a></code></td><tdclass="doc"><p>Type cast</p></td></tr><trid="type-t.Sizeof"class="anchored"><tdclass="def constructor"><ahref="#type-t.Sizeof"class="anchor"></a><code>| </code><code><spanclass="constructor">Sizeof</span><spanclass="keyword">of</span><ahref="../../IR/Typ/index.html#type-t">IR.Typ.t</a> * <span><ahref="index.html#type-t">t</a> option</span></code></td><tdclass="doc"><p>C-style sizeof(), and also used to treate a type as an expression. Refer to <code>Exp</code> module for canonical documentation</p></td></tr></table></dt><dtclass="spec type"id="type-access_expression"><ahref="#type-access_expression"class="anchor"></a><code><spanclass="keyword">and</span> access_expression</code><code> = <spanclass="keyword">private</span></code><tableclass="variant"><trid="type-access_expression.Base"class="anchored"><tdclass="def constructor"><ahref="#type-access_expression.Base"class="anchor"></a><code>| </code><code><spanclass="constructor">Base</span><spanclass="keyword">of</span><ahref="../AccessPath/index.html#type-base">AccessPath.base</a></code></td></tr><trid="type-access_expression.FieldOffset"class="anchored"><tdclass="def constructor"><ahref="#type-access_expression.FieldOffset"class="anchor"></a><code>| </code><code><spanclass="constructor">FieldOffset</span><spanclass="keyword">of</span><ahref="index.html#type-access_expression">access_expression</a> * <ahref="../../IR/Fieldname/index.html#type-t">IR.Fieldname.t</a></code></td><tdclass="doc"><p>field access</p></td></tr><trid="type-access_expression.ArrayOffset"class="anchored"><tdclass="def constructor"><ahref="#type-access_expression.ArrayOffset"class="anchor"></a><code>| </code><code><spanclass="constructor">ArrayOffset</span><spanclass="keyword">of</span><ahref="index.html#type-access_expression">access_expression</a> * <ahref="../../IR/Typ/index.html#type-t">IR.Typ.t</a> * <span><ahref="index.html#type-t">t</a> option</span></code></td><tdclass="doc"><p>array access</p></td></tr><trid="type-access_expression.AddressOf"class="anchored"><tdclass="def constructor"><ahref="#type-access_expression.AddressOf"class="anchor"></a><code>| </code><code><spanclass="constructor">AddressOf</span><spanclass="keyword">of</span><ahref="index.html#type-access_expression">access_expression</a></code></td><tdclass="doc"><p>"address of" operator <code>&</code></p></td></tr><trid="type-access_expression.Dereference"class="anchored"><tdclass="def constructor"><ahref="#type-access_expression.Dereference"class="anchor"></a><code>| </code><code><spanclass="constructor">Dereference</span><spanclass="keyword">of</span><ahref="index.html#type-access_expression">access_expression</a></code></td><tdclass="doc"><p>"dereference" operator <code>*</code></p></td></tr></table></dt></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-compare_access_expression"><ahref="#val-compare_access_expression"class="anchor"></a><code><spanclass="keyword">val</span> compare_access_expression : <ahref="index.html#type-access_expression">access_expression</a><span>-></span><ahref="index.html#type-access_expression">access_expression</a><span>-></span> int</code></dt></dl></div></div></div><divclass="spec module"id="module-AccessExpression"><ahref="#module-AccessExpression"class="anchor"></a><code><spanclass="keyword">module</span><ahref="AccessExpression/index.html">AccessExpression</a> : <spanclass="keyword">sig</span> ... <spanclass="keyword">end</span></code></div><dl><dtclass="spec value"id="val-pp"><ahref="#val-pp"class="anchor"></a><code><spanclass="keyword">val</span> pp : <ahref="index.html#module-F">F</a>.formatter <span>-></span><ahref="index.html#type-t">t</a><span>-></span> unit</code></dt><dtclass="spec value"id="val-get_typ"><ahref="#val-get_typ"class="anchor"></a><code><spanclass="keyword">val</span> get_typ : <ahref="../../IR/Tenv/index.html#type-t">IR.Tenv.t</a><span>-></span><ahref="index.html#type-t">t</a><span>-></span><span><ahref="../../IR/Typ/index.html#type-t">IR.Typ.t</a> option</span></code></dt><dd><p>Get the type of the expression. Warning: not fully implemented</p></dd></dl><dl><dtclass="spec value"id="val-of_sil"><ahref="#val-of_sil"class="anchor"></a><code><spanclass="keyword">val</span> of_sil : <span>include_array_indexes:bool</span><span>-></span><span>f_resolve_id:<span>(<ahref="../../IR/Var/index.html#type-t">IR.Var.t</a><span>-></span><span><ahref="AccessExpression/index.html#type-t">AccessExpression.t</a> option</span>)</span></span><span>-></span><span>add_deref:bool</span><span>-></span><ahref="../../IR/Exp/index.html#type-t">IR.Exp.t</a><span>-></span><ahref="../../IR/Typ/index.html#type-t">IR.Typ.t</a><span>-></span><ahref="index.html#type-t">t</a></code></dt><dd><p>Convert SIL expression to HIL expression</p></dd></dl><dl><dtclass="spec value"id="val-get_access_exprs"><ahref="#val-get_access_exprs"class="anchor"></a><code><spanclass="keyword">val</span> get_access_exprs : <ahref="index.html#type-t">t</a><span>-></span><span><ahref="AccessExpression/index.html#type-t">AccessExpression.t</a> list</span></code></dt><dd><p>Get all the access paths used in the given HIL expression, including duplicates if a path is used more than once.</p></dd></dl><dl><dtclass="spec value"id="val-is_null_literal"><ahref="#val-is_null_literal"class="anchor"></a><code><spanclass="keyword">val</span> is_null_literal : <ahref="index.html#type-t">t</a><span>-></span> bool</code></dt><dtclass="spec value"id="val-is_int_zero"><ahref="#val-is_int_zero"class="anchor"></a><code><spanclass="keyword">val</span> is_int_zero : <ahref="index.html#type-t">t</a><span>-></span> bool</code></dt><dtclass="spec value"id="val-eval"><ahref="#val-eval"class="anchor"></a><code><spanclass="keyword">val</span> eval : <ahref="index.html#type-t">t</a><span>-></span><span><ahref="../../IR/Const/index.html#type-t">IR.Const.t</a> option</span></code></dt><dtclass="spec value"id="val-eval_boolean_exp"><ahref="#val-eval_boolean_exp"class="anchor"></a><code><spanclass="keyword">val</span> eval_boolean_exp : <ahref="AccessExpression/index.html#type-t">AccessExpression.t</a><span>-></span><ahref="index.html#type-t">t</a><span>-></span><span>bool option</span></code></dt><dd><p><code>eval_boolean_exp var exp</code> returns <code>Some bool_value</code> if the given boolean expression <code>exp</code> evaluates to <code>bool_value</code> when <code>var</code> is set to true. Return None if it has free variables that stop us from evaluating it, or is not a boolean expression.</p></dd></dl><dl><dtclass="spec value"id="val-ignore_cast"><ahref="#val-ignore_cast"class="anchor"></a><code><spanclass="keyword">val</span> ignore_cast : <ahref="index.html#type-t">t</a><span>-></span><ahref="index.html#type-t">t</a></code></dt><dtclass="spec value"id="val-access_expr_of_exp"><ahref="#val-access_expr_of_exp"class="anchor"></a><code><spanclass="keyword">val</span> access_expr_of_exp : <span>include_array_indexes:bool</span><span>-></span><span>f_resolve_id:<span>(<ahref="../../IR/Var/index.html#type-t">IR.Var.t</a><span>-></span><span><ahref="AccessExpression/index.html#type-t">AccessExpression.t</a> option</span>)</span></span><span>-></span><ahref="../../IR/Exp/index.html#type-t">IR.Exp.t</a><span>-></span><ahref="../../IR/Typ/index.html#type-t">IR.Typ.t</a><span>-></span><span><ahref="index.html#type-access_expression">access_expression</a> option</span></code></dt><dd><p>best effort translating a SIL expression to an access path, not semantics preserving in particular in the presence of pointer arithmetic</p></dd></dl></div></body></html>