<htmlxmlns="http://www.w3.org/1999/xhtml"><head><title>BufferOverrunSemantics (infer.BO.BufferOverrunSemantics)</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">BO</a>» BufferOverrunSemantics</nav><h1>Module <code>BO.BufferOverrunSemantics</code></h1></header><dl><dtclass="spec value"id="val-is_stack_exp"><ahref="#val-is_stack_exp"class="anchor"></a><code><spanclass="keyword">val</span> is_stack_exp : <ahref="../../IR/Exp/index.html#type-t">IR.Exp.t</a><span>-></span><ahref="../BufferOverrunDomain/Mem/index.html#type-t">BufferOverrunDomain.Mem.t</a><span>-></span> bool</code></dt><dd><p>Check if an expression is a stack variable such as <code>n$0</code> or local variable for C array</p></dd></dl><dl><dtclass="spec value"id="val-eval"><ahref="#val-eval"class="anchor"></a><code><spanclass="keyword">val</span> eval : <ahref="../../IR/Typ/IntegerWidths/index.html#type-t">IR.Typ.IntegerWidths.t</a><span>-></span><ahref="../../IR/Exp/index.html#type-t">IR.Exp.t</a><span>-></span><ahref="../BufferOverrunDomain/Mem/index.html#type-t">BufferOverrunDomain.Mem.t</a><span>-></span><ahref="../BufferOverrunDomain/Val/index.html#type-t">BufferOverrunDomain.Val.t</a></code></dt><dd><p>Evalute an expression</p></dd></dl><dl><dtclass="spec value"id="val-eval_locs"><ahref="#val-eval_locs"class="anchor"></a><code><spanclass="keyword">val</span> eval_locs : <ahref="../../IR/Exp/index.html#type-t">IR.Exp.t</a><span>-></span><ahref="../BufferOverrunDomain/Mem/index.html#type-t">BufferOverrunDomain.Mem.t</a><span>-></span><ahref="../AbsLoc/PowLoc/index.html#type-t">AbsLoc.PowLoc.t</a></code></dt><dd><p><code>eval_locs exp mem</code> is like <code>eval exp mem |> Val.get_all_locs</code> but takes some shortcuts to avoid computing useless and/or problematic intermediate values</p></dd></dl><dl><dtclass="spec value"id="val-eval_arr"><ahref="#val-eval_arr"class="anchor"></a><code><spanclass="keyword">val</span> eval_arr : <ahref="../../IR/Typ/IntegerWidths/index.html#type-t">IR.Typ.IntegerWidths.t</a><span>-></span><ahref="../../IR/Exp/index.html#type-t">IR.Exp.t</a><span>-></span><ahref="../BufferOverrunDomain/Mem/index.html#type-t">BufferOverrunDomain.Mem.t</a><span>-></span><ahref="../BufferOverrunDomain/Val/index.html#type-t">BufferOverrunDomain.Val.t</a></code></dt><dd><p>Return the array value of the input expression. For example, when <code>x</code> is a program variable, <code>eval_arr x</code> returns array blocks the <code>x</code> is pointing to, on the other hand, <code>eval x</code> returns the abstract location of <code>x</code>.</p></dd></dl><dl><dtclass="spec value"id="val-eval_lindex"><ahref="#val-eval_lindex"class="anchor"></a><code><spanclass="keyword">val</span> eval_lindex : <ahref="../../IR/Typ/IntegerWidths/index.html#type-t">IR.Typ.IntegerWidths.t</a><span>-></span><ahref="../../IR/Exp/index.html#type-t">IR.Exp.t</a><span>-></span><ahref="../../IR/Exp/index.html#type-t">IR.Exp.t</a><span>-></span><ahref="../BufferOverrunDomain/Mem/index.html#type-t">BufferOverrunDomain.Mem.t</a><span>-></span><ahref="../BufferOverrunDomain/Val/index.html#type-t">BufferOverrunDomain.Val.t</a></code></dt><dd><p>Evaluate array location with index, i.e., <code>eval_lindex integer_type_widths array_exp index_exp mem</code></p></dd></dl><dl><dtclass="spec value"id="val-eval_array_locs_length"><ahref="#val-eval_array_locs_length"class="anchor"></a><code><spanclass="keyword">val</span> eval_array_locs_length : <ahref="../AbsLoc/PowLoc/index.html#type-t">AbsLoc.PowLoc.t</a><span>