|
|
|
|
<!DOCTYPE html>
|
|
|
|
|
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>InferIR__Sil (InferIR.InferIR__Sil)</title><link rel="stylesheet" href="../../odoc.css"/><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><meta name="generator" content="doc-ock-html v1.0.0-1-g1fc9bf0"/></head><body><nav id="top"><a href="../index.html">Up</a> — <span class="package">package <a href="../index.html">InferIR</a></span></nav><header><h1><span class="keyword">Module</span> <span class="module-path">InferIR__Sil</span></h1></header><div class="spec module" id="module-F"><a href="#module-F" class="anchor"></a><div class="def module"><code><span class="keyword">module </span>F = Format</code></div><div class="doc"></div></div><h3>Programs and Types</h3><div class="spec type" id="type-if_kind"><a href="#type-if_kind" class="anchor"></a><div class="def type"><code><span class="keyword">type </span>if_kind</code><code></code><code><span class="keyword"> = </span></code><table class="variant"><tr id="type-if_kind.Ik_bexp" class="anchored"><td class="def constructor"><a href="#type-if_kind.Ik_bexp" class="anchor"></a><code><span class="keyword">| </span></code><code><span class="constructor">Ik_bexp</span></code></td><td class="doc"><p>(** boolean expressions, and exp ? exp : exp *)</p></td></tr><tr id="type-if_kind.Ik_dowhile" class="anchored"><td class="def constructor"><a href="#type-if_kind.Ik_dowhile" class="anchor"></a><code><span class="keyword">| </span></code><code><span class="constructor">Ik_dowhile</span></code></td></tr><tr id="type-if_kind.Ik_for" class="anchored"><td class="def constructor"><a href="#type-if_kind.Ik_for" class="anchor"></a><code><span class="keyword">| </span></code><code><span class="constructor">Ik_for</span></code></td></tr><tr id="type-if_kind.Ik_if" class="anchored"><td class="def constructor"><a href="#type-if_kind.Ik_if" class="anchor"></a><code><span class="keyword">| </span></code><code><span class="constructor">Ik_if</span></code></td></tr><tr id="type-if_kind.Ik_land_lor" class="anchored"><td class="def constructor"><a href="#type-if_kind.Ik_land_lor" class="anchor"></a><code><span class="keyword">| </span></code><code><span class="constructor">Ik_land_lor</span></code></td><td class="doc"><p>(** obtained from translation of && or || *)</p></td></tr><tr id="type-if_kind.Ik_while" class="anchored"><td class="def constructor"><a href="#type-if_kind.Ik_while" class="anchor"></a><code><span class="keyword">| </span></code><code><span class="constructor">Ik_while</span></code></td></tr><tr id="type-if_kind.Ik_switch" class="anchored"><td class="def constructor"><a href="#type-if_kind.Ik_switch" class="anchor"></a><code><span class="keyword">| </span></code><code><span class="constructor">Ik_switch</span></code></td></tr></table><code></code></div><div class="doc"><p>Kind of prune instruction</p></div></div><div class="spec include"><div class="doc"></div><details open="open"><summary><span class="def"><code><span class="keyword">include </span><span class="keyword">sig</span> ... <span class="keyword">end</span></code></span></summary><div class="spec val" id="val-compare_if_kind"><a href="#val-compare_if_kind" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>compare_if_kind : <a href="index.html#type-if_kind">if_kind</a> <span class="keyword">‑></span> <a href="index.html#type-if_kind">if_kind</a> <span class="keyword">‑></span> int</code></div><div class="doc"></div></div></details></div><div class="spec val" id="val-is_loop"><a href="#val-is_loop" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>is_loop : <a href="index.html#type-if_kind">if_kind</a> <span class="keyword">‑></span> bool</code></div><div class="doc"></div></div><div class="spec type" id="type-instr"><a href="#type-instr" class="anchor"></a><div class="def type"><code><span class="keyword">type </span>instr</code><code></code><code><span class="keyword"> = </span></code><table class="variant"><tr id="type-instr.L
|
|
|
|
|
<code class="code">x = *lexp:typ</code> where
|
|
|
|
|
<code class="code">lexp</code> is an expression denoting a heap address
|
|
|
|
|
<code class="code">typ</code> is the root type of <code class="code">lexp</code>. *)</p></td></tr><tr id="type-instr.Store" class="anchored"><td class="def constructor"><a href="#type-instr.Store" class="anchor"></a><code><span class="keyword">| </span></code><code><span class="constructor">Store</span><span class="keyword"> of </span><a href="../InferIR/Exp/index.html#type-t">InferIR.Exp.t</a><span class="keyword"> * </span><a href="../InferIR/Typ/index.html#type-t">InferIR.Typ.t</a><span class="keyword"> * </span><a href="../InferIR/Exp/index.html#type-t">InferIR.Exp.t</a><span class="keyword"> * </span><a href="../../InferBase/InferBase/Location/index.html#type-t">InferBase.Location.t</a></code></td><td class="doc"><p>(** Store the value of an expression into the heap.
|
|
|
|
|
<code class="code">*lexp1:typ = exp2</code> where
|
|
|
|
|
<code class="code">lexp1</code> is an expression denoting a heap address
|
|
|
|
|
<code class="code">typ</code> is the root type of <code class="code">lexp1</code><code class="code">exp2</code> is the expression whose value is store. *)</p></td></tr><tr id="type-instr.Prune" class="anchored"><td class="def constructor"><a href="#type-instr.Prune" class="anchor"></a><code><span class="keyword">| </span></code><code><span class="constructor">Prune</span><span class="keyword"> of </span><a href="../InferIR/Exp/index.html#type-t">InferIR.Exp.t</a><span class="keyword"> * </span><a href="../../InferBase/InferBase/Location/index.html#type-t">InferBase.Location.t</a><span class="keyword"> * </span>bool<span class="keyword"> * </span><a href="index.html#type-if_kind">if_kind</a></code></td><td class="doc"><p>(** prune the state based on <code class="code">exp=1</code>, the boolean indicates whether true branch *)</p></td></tr><tr id="type-instr.Call" class="anchored"><td class="def constructor"><a href="#type-instr.Call" class="anchor"></a><code><span class="keyword">| </span></code><code><span class="constructor">Call</span><span class="keyword"> of </span><a href="../InferIR/Ident/index.html#type-t">InferIR.Ident.t</a><span class="keyword"> * </span><a href="../InferIR/Typ/index.html#type-t">InferIR.Typ.t</a><span class="keyword"> * </span><a href="../InferIR/Exp/index.html#type-t">InferIR.Exp.t</a><span class="keyword"> * </span>(<a href="../InferIR/Exp/index.html#type-t">InferIR.Exp.t</a><span class="keyword"> * </span><a href="../InferIR/Typ/index.html#type-t">InferIR.Typ.t</a>) list<span class="keyword"> * </span><a href="../../InferBase/InferBase/Location/index.html#type-t">InferBase.Location.t</a><span class="keyword"> * </span><a href="../InferIR/CallFlags/index.html#type-t">InferIR.CallFlags.t</a></code></td><td class="doc"><p>(** <code class="code">Call ((ret_id, ret_typ), e_fun, arg_ts, loc, call_flags)</code> represents an instruction
|
|
|
|
|
<code class="code">ret_id = e_fun(arg_ts);</code> *)</p></td></tr><tr id="type-instr.Nullify" class="anchored"><td class="def constructor"><a href="#type-instr.Nullify" class="anchor"></a><code><span class="keyword">| </span></code><code><span class="constructor">Nullify</span><span class="keyword"> of </span><a href="../InferIR/Pvar/index.html#type-t">InferIR.Pvar.t</a><span class="keyword"> * </span><a href="../../InferBase/InferBase/Location/index.html#type-t">InferBase.Location.t</a></code></td><td class="doc"><p>(** nullify stack variable *)</p></td></tr><tr id="type-instr.Abstract" class="anchored"><td class="def constructor"><a href="#type-instr.Abstract" class="anchor"></a><code><span class="keyword">| </span></code><code><span class="constructor">Abstract</span><span class="keyword"> of </span><a href="../../InferBase/InferBase/Location/index.html#type-t">InferBase.Location.t</a></code></td><td class="doc"><p>(** apply abstraction *)</p></td></tr><tr id="type-instr.Remove_temps" class="anchored"><td class="def constructor"><a href="#type-instr.Remove_temps" class="anchor"></a><code><span class="keyword">| </span></code><code><span class="constructor">Remove_temps</span><span class="keyword"> of </span><a href="../InferIR/Ident/index.html#type-t">InferIR.Ident.t</a> list<span class="keyword"> * </span><a href="../../InferBase/InferBase/Location/index.html#type-t">InferBase.Location.t</a></code></td><td class="doc"><p>(** remove temporaries *)</p></td></tr><tr id="type-instr.Declare_locals" class="anchored"><td class="def constructor"><a href="#type-instr.Declare_locals" class="anchor"></a><code><span class="keyword">| </span></code><code><span class="constructor">Declare_locals</span><span class="keyword"> of </span>(<a href="../InferIR/Pvar/index.html#type-t">InferIR.Pvar.t</a><span class="keyword"> * </span><a href="../InferIR/Typ/index.html#type-t">InferIR.Typ.t</a>) list<span class="keyword"> * </span><a href="../../InferBase/InferBase/Location/index.html#type-t">InferBase.Location.t</a></code></td><td class="doc"><p>(** declare local variables *)</p></td></tr></table><code></code></div><div class="doc"><p>An instruction.</p></div></div><div class="spec include"><div class="doc"></div><details open="open"><summary><span class="def"><code><span class="keyword">include </span><span class="keyword">sig</span> ... <span class="keyword">end</span></code></span></summary><div class="spec val" id="val-compare_instr"><a href="#val-compare_instr" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>compare_instr : <a href="index.html#type-instr">instr</a> <span class="keyword">‑></span> <a href="index.html#type-instr">instr</a> <span class="keyword">‑></span> int</code></div><div class="doc"></div></div></details></div><div class="spec val" id="val-equal_instr"><a href="#val-equal_instr" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>equal_instr : <a href="index.html#type-instr">instr</a> <span class="keyword">‑></span> <a href="index.html#type-instr">instr</a> <span class="keyword">‑></span> bool</code></div><div class="doc"></div></div><div class="spec val" id="val-skip_instr"><a href="#val-skip_instr" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>skip_instr : <a href="index.html#type-instr">instr</a></code></div><div class="doc"></div></div><div class="spec val" id="val-instr_is_auxiliary"><a href="#val-instr_is_auxiliary" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>instr_is_auxiliary : <a href="index.html#type-instr">instr</a> <span class="keyword">‑></span> bool</code></div><div class="doc"><p>Check if an instruction is auxiliary, or if it comes from source instructions.</p></div></div><div class="spec type" id="type-offset"><a href="#type-offset" class="anchor"></a><div class="def type"><code><span class="keyword">type </span>offset</code><code></code><code><span class="keyword"> = </span></code><table class="variant"><tr id="type-offset.Off_f
|
|
|
|
|
There are two conditions imposed / used in the array case.
|
|
|
|
|
First, if some index and value pair appears inside an array
|
|
|
|
|
in a strexp, then the index is less than the length of the array.
|
|
|
|
|
For instance, x |-><code class="code">10 | e1: v1</code> implies that e1 <= 9.
|
|
|
|
|
Second, if two indices appear in an array, they should be different.
|
|
|
|
|
For instance, x |-><code class="code">10 | e1: v1, e2: v2</code> implies that e1 != e2. *)</p></td></tr></table><code></code></div><div class="doc"><p>structured expressions represent a value of structured type, such as an array or a struct.</p></div></div><div class="spec include"><div class="doc"></div><details open="open"><summary><span class="def"><code><span class="keyword">include </span><span class="keyword">sig</span> ... <span class="keyword">end</span></code></span></summary><div class="spec val" id="val-compare_strexp0"><a href="#val-compare_strexp0" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>compare_strexp0 : (<span class="type-var">'inst</span> <span class="keyword">‑></span> <span class="type-var">'inst</span> <span class="keyword">‑></span> int) <span class="keyword">‑></span> <span class="type-var">'inst</span> <a href="index.html#type-strexp0">strexp0</a> <span class="keyword">‑></span> <span class="type-var">'inst</span> <a href="index.html#type-strexp0">strexp0</a> <span class="keyword">‑></span> int</code></div><div class="doc"></div></div></details></div><div class="spec type" id="type-strexp"><a href="#type-strexp" class="anchor"></a><div class="def type"><code><span class="keyword">type </span>strexp</code><code><span class="keyword"> = </span><a href="index.html#type-inst">inst</a> <a href="index.html#type-strexp0">strexp0</a></code><code></code></div><div class="doc"></div></div><div class="spec val" id="val-compare_strexp"><a href="#val-compare_strexp" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>compare_strexp : ?⁠inst:bool <span class="keyword">‑></span> <a href="index.html#type-strexp">strexp</a> <span class="keyword">‑></span> <a href="index.html#type-strexp">strexp</a> <span class="keyword">‑></span> int</code></div><div class="doc"><p>Comparison function for strexp.
|
|
|
|
|
The inst:: parameter specifies whether instumentations should also
|
|
|
|
|
be considered (false by default).</p></div></div><div class="spec val" id="val-equal_strexp"><a href="#val-equal_strexp" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>equal_strexp : ?⁠inst:bool <span class="keyword">‑></span> <a href="index.html#type-strexp">strexp</a> <span class="keyword">‑></span> <a href="index.html#type-strexp">strexp</a> <span class="keyword">‑></span> bool</code></div><div class="doc"><p>Equality function for strexp.
|
|
|
|
|
The inst:: parameter specifies whether instumentations should also
|
|
|
|
|
be considered (false by default).</p></div></div><div class="spec type" id="type-hpred0"><a href="#type-hpred0" class="anchor"></a><div class="def type"><code><span class="keyword">type </span>'inst hpred0</code><code></code><code><span class="keyword"> = </span></code><table class="variant"><tr id="type-hpred0.Hpointsto" class="anchored"><td class="def constructor"><a href="#type-hpred0.Hpointsto" class="anchor"></a><code><span class="keyword">| </span></code><code><span class="constructor">Hpointsto</span><span class="keyword"> of </span><a href="../InferIR/Exp/index.html#type-t">InferIR.Exp.t</a><span class="keyword"> * </span><span class="type-var">'inst</span> <a href="index.html#type-strexp0">strexp0</a><span class="keyword"> * </span><a href="../InferIR/Exp/index.html#type-t">InferIR.Exp.t</a></code></td><td class="doc"><p>(** represents <code class="code">exp|->strexp:typexp</code> where <code class="code">typexp</code>
|
|
|
|
|
is an expression representing a type, e.h. <code class="code">sizeof(t)</code>. *)</p></td></tr><tr id="type-hpred0.Hlseg" class="anchored"><td class="def constructor"><a href="#type-hpred0.Hlseg" class="anchor"></a><code><span class="keyword">| </span></code><code><span class="constructor">Hlseg</span><span class="keyword"> of </span><a href="index.html#type-lseg_kind">lseg_kind</a><span class="keyword"> * </span><span class="type-var">'inst</span> <a href="index.html#type-hpara0">hpara0</a><span class="keyword"> * </span><a href="../InferIR/Exp/index.html#type-t">InferIR.Exp.t</a><span class="keyword"> * </span><a href="../InferIR/Exp/index.html#type-t">InferIR.Exp.t</a><span class="keyword"> * </span><a href="../InferIR/Exp/index.html#type-t">InferIR.Exp.t</a> list</code></td><td class="doc"><p>(** higher - order predicate for singly - linked lists.
|
|
|
|
|
Should ensure that exp1!= exp2 implies that exp1 is allocated.
|
|
|
|
|
This assumption is used in the rearrangement. The last <code class="code">exp list</code> parameter
|
|
|
|
|
is used to denote the shared links by all the nodes in the list. *)</p></td></tr><tr id="type-hpred0.Hdllseg" class="anchored"><td class="def constructor"><a href="#type-hpred0.Hdllseg" class="anchor"></a><code><span class="keyword">| </span></code><code><span class="constructor">Hdllseg</span><span class="keyword"> of </span><a href="index.html#type-lseg_kind">lseg_kind</a><span class="keyword"> * </span><span class="type-var">'inst</span> <a href="index.html#type-hpara_dll0">hpara_dll0</a><span class="keyword"> * </span><a href="../InferIR/Exp/index.html#type-t">InferIR.Exp.t</a><span class="keyword"> * </span><a href="../InferIR/Exp/index.html#type-t">InferIR.Exp.t</a><span class="keyword"> * </span><a href="../InferIR/Exp/index.html#type-t">InferIR.Exp.t</a><span class="keyword"> * </span><a href="../InferIR/Exp/index.html#type-t">InferIR.Exp.t</a><span class="keyword"> * </span><a href="../InferIR/Exp/index.html#type-t">InferIR.Exp.t</a> list</code></td><td class="doc"><p>(** higher-order predicate for doubly-linked lists.
|
|
|
|
|
Parameter for the higher-order singly-linked list predicate.
|
|
|
|
|
Means "lambda (root,next,svars). Exists evars. body".
|
|
|
|
|
Assume that root, next, svars, evars are disjoint sets of
|
|
|
|
|
primed identifiers, and include all the free primed identifiers in body.
|
|
|
|
|
body should not contain any non - primed identifiers or program
|
|
|
|
|
variables (i.e. pvars). *)</p></td></tr></table><code></code></div><div class="doc"><p>an atomic heap predicate</p></div></div><div class="spec type" id="type-hpara0"><a href="#type-hpara0" class="anchor"></a><div class="def type"><code><span class="keyword">type </span>'inst hpara0</code><code></code><code><span class="keyword"> = </span></code><code>{</code><table class="record"><tr id="type-hpara0.root" class="anchored"><td class="def field"><a href="#type-hpara0.root" class="anchor"></a><code>root : <a href="../InferIR/Ident/index.html#type-t">InferIR.Ident.t</a>;</code></td></tr><tr id="type-hpara0.next" class="anchored"><td class="def field"><a href="#type-hpara0.next" class="anchor"></a><code>next : <a href="../InferIR/Ident/index.html#type-t">InferIR.Ident.t</a>;</code></td></tr><tr id="type-hpara0.svars" class="anchored"><td class="def field"><a href="#type-hpara0.svars" class="anchor"></a><code>svars : <a href="../InferIR/Ident/index.html#type-t">InferIR.Ident.t</a> list;</code></td></tr><tr id="type-hpara0.evars" class="anchored"><td class="def field"><a href="#type-hpara0.evars" class="anchor"></a><code>evars : <a href="../InferIR/Ident/index.html#type-t">InferIR.Ident.t</a> list;</code></td></tr><tr id="type-hpara0.body" class="anchored"><td class="def field"><a href="#type-hpara0.body" class="anchor"></a><code>body : <span class="type-var">'inst</span> <a href="index.html#type-hpred0">hpred0</a> list;</code></td></tr></table><code>}</code><code></code></div><div class="doc"></div></div><div class="spec type" id="type-hpara_dll0"><a href="#type-hpara_dll0" class="anchor"></a><div class="def type"><code><span class="keyword">type </span>'inst hpara_dll0</code><code></code><code><span class="keyword"> = </span></code><code>{</code><table class="record"><tr id="type-hpara_dll0.cell" class="anchored"><td class="def field"><a href="#type-hpara_dll0.cell" class="anchor"></a><code>cell : <a href="../InferIR/Ident/index.html#type-t">InferIR.Ident.t</a>;</code></td><td class="doc"><p>(** address cell *)</p></td></tr><tr id="type-hpara_dll0.blink" class="anchored"><td class="def field"><a href="#type-hpara_dll0.blink" class="anchor"></a><code>blink : <a href="../InferIR/Ident/index.html#type-t">InferIR.Ident.t</a>;</code></td><td class="doc"><p>(** backward link *)</p></td></tr><tr id="type-hpara_dll0.flink" class="anchored"><td class="def field"><a href="#type-hpara_dll0.flink" class="anchor"></a><code>flink : <a href="../InferIR/Ident/index.html#type-t">InferIR.Ident.t</a>;</code></td><td class="doc"><p>(** forward link *)</p></td></tr><tr id="type-hpara_dll0.svars_dll" class="anchored"><td class="def field"><a href="#type-hpara_dll0.svars_dll" class="anchor"></a><code>svars_dll : <a href="../InferIR/Ident/index.html#type-t">InferIR.Ident.t</a> list;</code></td></tr><tr id="type-hpara_dll0.evars_dll" class="anchored"><td class="def field"><a href="#type-hpara_dll0.evars_dll" class="anchor"></a><code>evars_dll : <a href="../InferIR/Ident/index.html#type-t">InferIR.Ident.t</a> list;</code></td></tr><tr id="type-hpara_dll0.body_dll" class="anchored"><td class="def field"><a href="#type-hpara_dll0.body_dll" class="anchor"></a><code>body_dll : <span class="type-var">'inst</span> <a href="index.html#type-hpred0">hpred0</a> list;</code></td></tr></table><code>}</code><code></code></div><div class="doc"><p>parameter for the higher-order doubly-linked list predicates.
|
|
|
|
|
Assume that all the free identifiers in body_dll should belong to
|
|
|
|
|
cell, blink, flink, svars_dll, evars_dll.</p></div></div><div class="spec include"><div class="doc"></div><details open="open"><summary><span class="def"><code><span class="keyword">include </span><span class="keyword">sig</span> ... <span class="keyword">end</span></code></span></summary><div class="spec val" id="val-compare_hpred0"><a href="#val-compare_hpred0" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>compare_hpred0 : (<span class="type-var">'inst</span> <span class="keyword">‑></span> <span class="type-var">'inst</span> <span class="keyword">‑></span> int) <span class="keyword">‑></span> <span class="type-var">'inst</span> <a href="index.html#type-hpred0">hpred0</a> <span class="keyword">‑></span> <span class="type-var">'inst</span> <a href="index.html#type-hpred0">hpred0</a> <span class="keyword">‑></span> int</code></div><div class="doc"></div></div><div class="spec val" id="val-compare_hpara0"><a href="#val-compare_hpara0" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>compare_hpara0 : (<span class="type-var">'inst</span> <span class="keyword">‑></span> <span class="type-var">'inst</span> <span class="keyword">‑></span> int) <span class="keyword">‑></span> <span class="type-var">'inst</span> <a href="index.html#type-hpara0">hpara0</a> <span class="keyword">‑></span> <span class="type-var">'inst</span> <a href="index.html#type-hpara0">hpara0</a> <span class="keyword">‑></span> int</code></div><div class="doc"></div></div><div class="spec val" id="val-compare_hpara_dll0"><a href="#val-compare_hpara_dll0" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>compare_hpara_dll0 : (<span class="type-var">'inst</span> <span class="keyword">‑></span> <span class="type-var">'inst</span> <span class="keyword">‑></span> int) <span class="keyword">‑></span> <span class="type-var">'inst</span> <a href="index.html#type-hpara_dll0">hpara_dll0</a> <span class="keyword">‑></span> <span class="type-var">'inst</span> <a href="index.html#type-hpara_dll0">hpara_dll0</a> <span class="keyword">‑></span> int</code></div><div class="doc"></div></div><div class="spec val" id="val-compare_hpred0"><a href="#val-compare_hpred0" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>compare_hpred0 : (<span class="type-var">'inst</span> <span class="keyword">‑></span> <span class="type-var">'inst</span> <span class="keyword">‑></span> int) <span class="keyword">‑></span> <span class="type-var">'inst</span> <a href="index.html#type-hpred0">hpred0</a> <span class="keyword">‑></span> <span class="type-var">'inst</span> <a href="index.html#type-hpred0">hpred0</a> <span class="keyword">‑></span> int</code></div><div class="doc"></div></div><div class="spec val" id="val-compare_hpara0"><a href="#val-compare_hpara0" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>compare_hpara0 : (<span class="type-var">'inst</span> <span class="keyword">‑></span> <span class="type-var">'inst</span> <span class="keyword">‑></span> int) <span class="keyword">‑></span> <span class="type-var">'inst</span> <a href="index.html#type-hpara0">hpara0</a> <span class="keyword">‑></span> <span class="type-var">'inst</span> <a href="index.html#type-hpara0">hpara0</a> <span class="keyword">‑></span> int</code></div><div class="doc"></div></div><div class="spec val" id="val-compare_hpara_dll0"><a href="#val-compare_hpara_dll0" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>compare_hpara_dll0 : (<span class="type-var">'inst</span> <span class="keyword">‑></span> <span class="type-var">'inst</span> <span class="keyword">‑></span> int) <span class="keyword">‑></span> <span class="type-var">'inst</span> <a href="index.html#type-hpara_dll0">hpara_dll0</a> <spa
|
|
|
|
|
The inst:: parameter specifies whether instumentations should also
|
|
|
|
|
be considered (false by default).</p></div></div><div class="spec val" id="val-equal_hpred"><a href="#val-equal_hpred" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>equal_hpred : ?⁠inst:bool <span class="keyword">‑></span> <a href="index.html#type-hpred">hpred</a> <span class="keyword">‑></span> <a href="index.html#type-hpred">hpred</a> <span class="keyword">‑></span> bool</code></div><div class="doc"><p>Equality function for hpred.
|
|
|
|
|
The inst:: parameter specifies whether instumentations should also
|
|
|
|
|
be considered (false by default).</p></div></div><div class="spec module" id="module-HpredSet"><a href="#module-HpredSet" class="anchor"></a><div class="def module"><code><span class="keyword">module </span>HpredSet : <a href="../../InferStdlib/InferStdlib/index.html#module-IStd">InferStdlib.IStd</a>.Caml.Set.S<span class="keyword"> with </span><span class="keyword">type </span><a href="index.html#module-HpredSet">HpredSet</a>.elt<span class="keyword"> = </span><a href="index.html#type-hpred">hpred</a></code></div><div class="doc"><p>Sets of heap predicates</p></div></div><h3>Compaction</h3><div class="spec type" id="type-sharing_env"><a href="#type-sharing_env" class="anchor"></a><div class="def type"><code><span class="keyword">type </span>sharing_env</code><code></code><code></code></div><div class="doc"></div></div><div class="spec val" id="val-create_sharing_env"><a href="#val-create_sharing_env" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>create_sharing_env : unit <span class="keyword">‑></span> <a href="index.html#type-sharing_env">sharing_env</a></code></div><div class="doc"><p>Create a sharing env to store canonical representations</p></div></div><div class="spec val" id="val-hpred_compact"><a href="#val-hpred_compact" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>hpred_compact : <a href="index.html#type-sharing_env">sharing_env</a> <span class="keyword">‑></span> <a href="index.html#type-hpred">hpred</a> <span class="keyword">‑></span> <a href="index.html#type-hpred">hpred</a></code></div><div class="doc"><p>Return a compact representation of the exp</p></div></div><div class="spec val" id="val-is_objc_object"><a href="#val-is_objc_object" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>is_objc_object : <a href="index.html#type-hpred">hpred</a> <span class="keyword">‑></span> bool</code></div><div class="doc"><h3>Comparision And Inspection Functions</h3></div></div><div class="spec val" id="val-is_static_local_name"><a href="#val-is_static_local_name" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>is_static_local_name : string <span class="keyword">‑></span> <a href="../InferIR/Pvar/index.html#type-t">InferIR.Pvar.t</a> <span class="keyword">‑></span> bool</code></div><div class="doc"><p>Check if a pvar is a local static in objc</p></div></div><div class="spec val" id="val-is_block_pvar"><a href="#val-is_block_pvar" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>is_block_pvar : <a href="../InferIR/Pvar/index.html#type-t">InferIR.Pvar.t</a> <span class="keyword">‑></span> bool</code></div><div class="doc"><p>Check if a pvar is a local pointing to a block in objc</p></div></div><div class="spec val" id="val-add_with_block_parameters_flag"><a href="#val-add_with_block_parameters_flag" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>add_with_block_parameters_flag : <a href="index.html#type-instr">instr</a> <span class="keyword">‑></span> <a href="index.html#type-instr">instr</a></code></div><div class="doc"><p>Adds a with_blocks_parameters flag to a method call, when the arguments
|
|
|
|
|
contain an Objective-C block, and the method is an Objective-C method
|
|
|
|
|
(to be extended to other methods)</p></div></div><h3>Pretty Printing</h3><div class="spec val" id="val-color_pre_wrapper"><a href="#val-color_pre_wrapper" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>color_pre_wrapper : <a href="../../InferStdlib/InferStdlib/Pp/index.html#type-env">InferStdlib.Pp.env</a> <span class="keyword">‑></span> <a href="index.html#module-F">F</a>.formatter <span class="keyword">‑></span> <span class="type-var">'a</span> <span class="keyword">‑></span> <a href="../../InferStdlib/InferStdlib/Pp/index.html#type-env">InferStdlib.Pp.env</a><span class="keyword"> * </span>bool</code></div><div class="doc"><p>Begin change color if using diff printing, return updated printenv and change status</p></div></div><div class="spec val" id="val-color_post_wrapper"><a href="#val-color_post_wrapper" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>color_post_wrapper : bool <span class="keyword">‑></span> <a href="index.html#module-F">F</a>.formatter <span class="keyword">‑></span> unit</code></div><div class="doc"><p>Close color annotation if changed</p></div></div><div class="spec val" id="val-pp_exp_printenv"><a href="#val-pp_exp_printenv" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>pp_exp_printenv : <a href="../../InferStdlib/InferStdlib/Pp/index.html#type-env">InferStdlib.Pp.env</a> <span class="keyword">‑></span> <a href="index.html#module-F">F</a>.formatter <span class="keyword">‑></span> <a href="../InferIR/Exp/index.html#type-t">InferIR.Exp.t</a> <span class="keyword">‑></span> unit</code></div><div class="doc"><p>Pretty print an expression.</p></div></div><div class="spec val" id="val-d_exp"><a href="#val-d_exp" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>d_exp : <a href="../InferIR/Exp/index.html#type-t">InferIR.Exp.t</a> <span class="keyword">‑></span> unit</code></div><div class="doc"><p>dump an expression.</p></div></div><div class="spec val" id="val-pp_texp"><a href="#val-pp_texp" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>pp_texp : <a href="../../InferStdlib/InferStdlib/Pp/index.html#type-env">InferStdlib.Pp.env</a> <span class="keyword">‑></span> <a href="index.html#module-F">F</a>.formatter <span class="keyword">‑></span> <a href="../InferIR/Exp/index.html#type-t">InferIR.Exp.t</a> <span class="keyword">‑></span> unit</code></div><div class="doc"><p>Pretty print a type.</p></div></div><div class="spec val" id="val-pp_texp_full"><a href="#val-pp_texp_full" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>pp_texp_full : <a href="../../InferStdlib/InferStdlib/Pp/index.html#type-env">InferStdlib.Pp.env</a> <span class="keyword">‑></span> <a href="index.html#module-F">F</a>.formatter <span class="keyword">‑></span> <a href="../InferIR/Exp/index.html#type-t">InferIR.Exp.t</a> <span class="keyword">‑></span> unit</code></div><div class="doc"><p>Pretty print a type with all the details.</p></div></div><div class="spec val" id="val-d_texp_full"><a href="#val-d_texp_full" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>d_texp_full : <a href="../InferIR/Exp/index.html#type-t">InferIR.Exp.t</a> <span class="keyword">‑></span> unit</code></div><div class="doc"><p>Dump a type expression with all the details.</p></div></div><div class="spec val" id="val-pp_exp_list"><a href="#val-pp_exp_list" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>pp_exp_list : <a href="../../InferStdlib/InferStdlib/Pp/index.html#type-env">InferStdlib.Pp.env</a> <span class="keyword">‑></span> <a href="index.html#module-F">F</a>.formatter <span class="keyword">‑></span> <a href="../InferIR/Exp/index.html#type-t">InferIR.Exp.t</a> list <span class="keyword">‑></span> unit</code></div><div class="doc"><p>Pretty
|
|
|
|
|
of (doubly -)linked lists and Epara.
|
|
|
|
|
Provides unique numbering for predicates and an iterator.</p></div></div><div class="spec val" id="val-pp_hpred_env"><a href="#val-pp_hpred_env" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>pp_hpred_env : <a href="../../InferStdlib/InferStdlib/Pp/index.html#type-env">InferStdlib.Pp.env</a> <span class="keyword">‑></span> <a href="Predicates/index.html#type-env">Predicates.env</a> option <span class="keyword">‑></span> <a href="index.html#module-F">F</a>.formatter <span class="keyword">‑></span> <a href="index.html#type-hpred">hpred</a> <span class="keyword">‑></span> unit</code></div><div class="doc"><p>Pretty print a hpred with optional predicate env</p></div></div><h3>Functions for traversing SIL data types</h3><div class="spec val" id="val-array_clean_new_index"><a href="#val-array_clean_new_index" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>array_clean_new_index : bool <span class="keyword">‑></span> <a href="../InferIR/Exp/index.html#type-t">InferIR.Exp.t</a> <span class="keyword">‑></span> <a href="../InferIR/Exp/index.html#type-t">InferIR.Exp.t</a></code></div><div class="doc"><p>This function should be used before adding a new
|
|
|
|
|
index to Earray. The <code class="code">exp</code> is the newly created
|
|
|
|
|
index. This function "cleans" <code class="code">exp</code> according to whether it is the
|
|
|
|
|
footprint or current part of the prop.
|
|
|
|
|
The function faults in the re - execution mode, as an internal check of the tool.</p></div></div><div class="spec val" id="val-strexp_expmap"><a href="#val-strexp_expmap" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>strexp_expmap : ((<a href="../InferIR/Exp/index.html#type-t">InferIR.Exp.t</a><span class="keyword"> * </span><a href="index.html#type-inst">inst</a> option) <span class="keyword">‑></span> <a href="../InferIR/Exp/index.html#type-t">InferIR.Exp.t</a><span class="keyword"> * </span><a href="index.html#type-inst">inst</a> option) <span class="keyword">‑></span> <a href="index.html#type-strexp">strexp</a> <span class="keyword">‑></span> <a href="index.html#type-strexp">strexp</a></code></div><div class="doc"><p>Change exps in strexp using <code class="code">f</code>.
|
|
|
|
|
WARNING: the result might not be normalized.</p></div></div><div class="spec val" id="val-hpred_expmap"><a href="#val-hpred_expmap" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>hpred_expmap : ((<a href="../InferIR/Exp/index.html#type-t">InferIR.Exp.t</a><span class="keyword"> * </span><a href="index.html#type-inst">inst</a> option) <span class="keyword">‑></span> <a href="../InferIR/Exp/index.html#type-t">InferIR.Exp.t</a><span class="keyword"> * </span><a href="index.html#type-inst">inst</a> option) <span class="keyword">‑></span> <a href="index.html#type-hpred">hpred</a> <span class="keyword">‑></span> <a href="index.html#type-hpred">hpred</a></code></div><div class="doc"><p>Change exps in hpred by <code class="code">f</code>.
|
|
|
|
|
WARNING: the result might not be normalized.</p></div></div><div class="spec val" id="val-hpred_instmap"><a href="#val-hpred_instmap" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>hpred_instmap : (<a href="index.html#type-inst">inst</a> <span class="keyword">‑></span> <a href="index.html#type-inst">inst</a>) <span class="keyword">‑></span> <a href="index.html#type-hpred">hpred</a> <span class="keyword">‑></span> <a href="index.html#type-hpred">hpred</a></code></div><div class="doc"><p>Change instrumentations in hpred using <code class="code">f</code>.</p></div></div><div class="spec val" id="val-hpred_list_expmap"><a href="#val-hpred_list_expmap" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>hpred_list_expmap : ((<a href="../InferIR/Exp/index.html#type-t">InferIR.Exp.t</a><span class="keyword"> * </span><a href="index.html#type-inst">inst</a> option) <span class="keyword">‑></span> <a href="../InferIR/Exp/index.html#type-t">InferIR.Exp.t</a><span class="keyword"> * </span><a href="index.html#type-inst">inst</a> option) <span class="keyword">‑></span> <a href="index.html#type-hpred">hpred</a> list <span class="keyword">‑></span> <a href="index.html#type-hpred">hpred</a> list</code></div><div class="doc"><p>Change exps in hpred list by <code class="code">f</code>.
|
|
|
|
|
WARNING: the result might not be normalized.</p></div></div><div class="spec val" id="val-atom_expmap"><a href="#val-atom_expmap" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>atom_expmap : (<a href="../InferIR/Exp/index.html#type-t">InferIR.Exp.t</a> <span class="keyword">‑></span> <a href="../InferIR/Exp/index.html#type-t">InferIR.Exp.t</a>) <span class="keyword">‑></span> <a href="index.html#type-atom">atom</a> <span class="keyword">‑></span> <a href="index.html#type-atom">atom</a></code></div><div class="doc"><p>Change exps in atom by <code class="code">f</code>.
|
|
|
|
|
WARNING: the result might not be normalized.</p></div></div><div class="spec val" id="val-hpred_list_get_lexps"><a href="#val-hpred_list_get_lexps" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>hpred_list_get_lexps : (<a href="../InferIR/Exp/index.html#type-t">InferIR.Exp.t</a> <span class="keyword">‑></span> bool) <span class="keyword">‑></span> <a href="index.html#type-hpred">hpred</a> list <span class="keyword">‑></span> <a href="../InferIR/Exp/index.html#type-t">InferIR.Exp.t</a> list</code></div><div class="doc"></div></div><div class="spec val" id="val-hpred_entries"><a href="#val-hpred_entries" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>hpred_entries : <a href="index.html#type-hpred">hpred</a> <span class="keyword">‑></span> <a href="../InferIR/Exp/index.html#type-t">InferIR.Exp.t</a> list</code></div><div class="doc"></div></div><div class="spec val" id="val-atom_free_vars"><a href="#val-atom_free_vars" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>atom_free_vars : <a href="index.html#type-atom">atom</a> <span class="keyword">‑></span> <a href="../InferIR/Ident/index.html#type-t">InferIR.Ident.t</a> <a href="../../InferStdlib/InferStdlib/index.html#module-IStd">InferStdlib.IStd</a>.Sequence.t</code></div><div class="doc"></div></div><div class="spec val" id="val-atom_gen_free_vars"><a href="#val-atom_gen_free_vars" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>atom_gen_free_vars : <a href="index.html#type-atom">atom</a> <span class="keyword">‑></span> (unit, <a href="../InferIR/Ident/index.html#type-t">InferIR.Ident.t</a>) <a href="../../InferStdlib/InferStdlib/index.html#module-IStd">InferStdlib.IStd</a>.Sequence.Generator.t</code></div><div class="doc"></div></div><div class="spec val" id="val-hpred_free_vars"><a href="#val-hpred_free_vars" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>hpred_free_vars : <a href="index.html#type-hpred">hpred</a> <span class="keyword">‑></span> <a href="../InferIR/Ident/index.html#type-t">InferIR.Ident.t</a> <a href="../../InferStdlib/InferStdlib/index.html#module-IStd">InferStdlib.IStd</a>.Sequence.t</code></div><div class="doc"></div></div><div class="spec val" id="val-hpred_gen_free_vars"><a href="#val-hpred_gen_free_vars" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>hpred_gen_free_vars : <a href="index.html#type-hpred">hpred</a> <span class="keyword">‑></span> (unit, <a href="../InferIR/Ident/index.html#type-t">InferIR.Ident.t</a>) <a href="../../InferStdlib/InferStdlib/index.html#module-IStd">InferStdlib.IStd</a>.Sequence.Generator.t</code></div><div class="doc"></div></div><div class="spec val" id="val-hpara_shallow_free_vars"><a href="#val-hpara_shallow_free_vars" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>hpara_shallow_free_vars : <a href="index.html#type-hpara">hpara</a> <span class="keyword">‑></span> <a href="../InferIR/Ident/index.html#type-t">InferIR.Ident.t</a> <a href="../../InferStdlib/InferStdlib/index.html#module-IStd">InferStdlib.IStd</a>.Sequence.t</code></div><div class="doc"></div></div><div class="spec val" id="val-hpara_dll_shallow_free_vars"><a href="#val-hpara_dll_shallow_free_vars" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>hpara_dll_shallow_free_vars : <a href="index.html#type-hpara_dll">hpara_dll</a> <span class="keyword">‑></span> <a href="../InferIR/Ident/index.html#type-t">InferIR.Ident.t</a> <a href="../../InferStdlib/InferStdlib/index.html#module-IStd">InferStdlib.IStd</a>.Sequence.t</code></div><div class="doc"><p>Variables in hpara_dll, excluding bound vars in the body</p></div></div><h3>Substitution</h3><div class="spec type" id="type-exp_subst"><a href="#type-exp_subst" class="anchor"></a><div class="def type"><code><span class="keyword">type </span>exp_subst</code><code><span cla
|
|
|
|
|
For all (id1, e1), (id2, e2) in the input list,
|
|
|
|
|
if id1 = id2, then e1 = e2.</p></div></div><div class="spec val" id="val-subst_of_list"><a href="#val-subst_of_list" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>subst_of_list : (<a href="../InferIR/Ident/index.html#type-t">InferIR.Ident.t</a><span class="keyword"> * </span><a href="../InferIR/Exp/index.html#type-t">InferIR.Exp.t</a>) list <span class="keyword">‑></span> <a href="index.html#type-subst">subst</a></code></div><div class="doc"></div></div><div class="spec val" id="val-exp_subst_of_list_duplicates"><a href="#val-exp_subst_of_list_duplicates" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>exp_subst_of_list_duplicates : (<a href="../InferIR/Ident/index.html#type-t">InferIR.Ident.t</a><span class="keyword"> * </span><a href="../InferIR/Exp/index.html#type-t">InferIR.Exp.t</a>) list <span class="keyword">‑></span> <a href="index.html#type-exp_subst">exp_subst</a></code></div><div class="doc"><p>like exp_subst_of_list, but allow duplicate ids and only keep the first occurrence</p></div></div><div class="spec val" id="val-sub_to_list"><a href="#val-sub_to_list" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>sub_to_list : <a href="index.html#type-exp_subst">exp_subst</a> <span class="keyword">‑></span> (<a href="../InferIR/Ident/index.html#type-t">InferIR.Ident.t</a><span class="keyword"> * </span><a href="../InferIR/Exp/index.html#type-t">InferIR.Exp.t</a>) list</code></div><div class="doc"><p>Convert a subst to a list of pairs.</p></div></div><div class="spec val" id="val-sub_empty"><a href="#val-sub_empty" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>sub_empty : <a href="index.html#type-subst">subst</a></code></div><div class="doc"><p>The empty substitution.</p></div></div><div class="spec val" id="val-exp_sub_empty"><a href="#val-exp_sub_empty" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>exp_sub_empty : <a href="index.html#type-exp_subst">exp_subst</a></code></div><div class="doc"></div></div><div class="spec val" id="val-is_sub_empty"><a href="#val-is_sub_empty" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>is_sub_empty : <a href="index.html#type-subst">subst</a> <span class="keyword">‑></span> bool</code></div><div class="doc"></div></div><div class="spec val" id="val-sub_join"><a href="#val-sub_join" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>sub_join : <a href="index.html#type-exp_subst">exp_subst</a> <span class="keyword">‑></span> <a href="index.html#type-exp_subst">exp_subst</a> <span class="keyword">‑></span> <a href="index.html#type-exp_subst">exp_subst</a></code></div><div class="doc"><p>Compute the common id-exp part of two inputs <code class="code">subst1</code> and <code class="code">subst2</code>.
|
|
|
|
|
The first component of the output is this common part.
|
|
|
|
|
The second and third components are the remainder of <code class="code">subst1</code>
|
|
|
|
|
and <code class="code">subst2</code>, respectively.</p></div></div><div class="spec val" id="val-sub_symmetric_difference"><a href="#val-sub_symmetric_difference" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>sub_symmetric_difference : <a href="index.html#type-exp_subst">exp_subst</a> <span class="keyword">‑></span> <a href="index.html#type-exp_subst">exp_subst</a> <span class="keyword">‑></span> <a href="index.html#type-exp_subst">exp_subst</a><span class="keyword"> * </span><a href="index.html#type-exp_subst">exp_subst</a><span class="keyword"> * </span><a href="index.html#type-exp_subst">exp_subst</a></code></div><div class="doc"><p>Compute the common id-exp part of two inputs <code class="code">subst1</code> and <code class="code">subst2</code>.
|
|
|
|
|
The first component of the output is this common part.
|
|
|
|
|
The second and third components are the remainder of <code class="code">subst1</code>
|
|
|
|
|
and <code class="code">subst2</code>, respectively.</p></div></div><div class="spec val" id="val-sub_find"><a href="#val-sub_find" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>sub_find : (<a href="../InferIR/Ident/index.html#type-t">InferIR.Ident.t</a> <span class="keyword">‑></span> bool) <span class="keyword">‑></span> <a href="index.html#type-exp_subst">exp_subst</a> <span class="keyword">‑></span> <a href="../InferIR/Exp/index.html#type-t">InferIR.Exp.t</a></code></div><div class="doc"><p><code class="code">sub_find filter sub</code> returns the expression associated to the first identifier
|
|
|
|
|
that satisfies <code class="code">filter</code>.
|
|
|
|
|
Raise <code class="code">Not_found</code> if there isn't one.</p></div></div><div class="spec val" id="val-sub_filter"><a href="#val-sub_filter" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>sub_filter : (<a href="../InferIR/Ident/index.html#type-t">InferIR.Ident.t</a> <span class="keyword">‑></span> bool) <span class="keyword">‑></span> <a href="index.html#type-exp_subst">exp_subst</a> <span class="keyword">‑></span> <a href="index.html#type-exp_subst">exp_subst</a></code></div><div class="doc"><p><code class="code">sub_filter filter sub</code> restricts the domain of <code class="code">sub</code> to the
|
|
|
|
|
identifiers satisfying <code class="code">filter</code>.</p></div></div><div class="spec val" id="val-sub_filter_pair"><a href="#val-sub_filter_pair" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>sub_filter_pair : <a href="index.html#type-exp_subst">exp_subst</a> <span class="keyword">‑></span> f:((<a href="../InferIR/Ident/index.html#type-t">InferIR.Ident.t</a><span class="keyword"> * </span><a href="../InferIR/Exp/index.html#type-t">InferIR.Exp.t</a>) <span class="keyword">‑></span> bool) <span class="keyword">‑></span> <a href="index.html#type-exp_subst">exp_subst</a></code></div><div class="doc"><p><code class="code">sub_filter_exp filter sub</code> restricts the domain of <code class="code">sub</code> to the
|
|
|
|
|
identifiers satisfying <code class="code">filter(id, sub(id))</code>.</p></div></div><div class="spec val" id="val-sub_range_partition"><a href="#val-sub_range_partition" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>sub_range_partition : (<a href="../InferIR/Exp/index.html#type-t">InferIR.Exp.t</a> <span class="keyword">‑></span> bool) <span class="keyword">‑></span> <a href="index.html#type-exp_subst">exp_subst</a> <span class="keyword">‑></span> <a href="index.html#type-exp_subst">exp_subst</a><span class="keyword"> * </span><a href="index.html#type-exp_subst">exp_subst</a></code></div><div class="doc"><p><code class="code">sub_range_partition filter sub</code> partitions <code class="code">sub</code> according to
|
|
|
|
|
whether range expressions satisfy <code class="code">filter</code>.</p></div></div><div class="spec val" id="val-sub_domain_partition"><a href="#val-sub_domain_partition" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>sub_domain_partition : (<a href="../InferIR/Ident/index.html#type-t">InferIR.Ident.t</a> <span class="keyword">‑></span> bool) <span class="keyword">‑></span> <a href="index.html#type-exp_subst">exp_subst</a> <span class="keyword">‑></span> <a href="index.html#type-exp_subst">exp_subst</a><span class="keyword"> * </span><a href="index.html#type-exp_subst">exp_subst</a></code></div><div class="doc"><p><code class="code">sub_domain_partition filter sub</code> partitions <code class="code">sub</code> according to
|
|
|
|
|
whether domain identifiers satisfy <code class="code">filter</code>.</p></div></div><div class="spec val" id="val-sub_domain"><a href="#val-sub_domain" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>sub_domain : <a href="index.html#type-exp_subst">exp_subst</a> <span class="keyword">‑></span> <a href="../InferIR/Ident/index.html#type-t">InferIR.Ident.t</a> list</code></div><div class="doc"><p>Return the list of identifiers in the domain of the substitution.</p></div></div><div class="spec val" id="val-sub_range"><a href="#val-sub_range" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>sub_range : <a href="index.html#type-exp_subst">exp_subst</a> <span class="keyword">‑></span> <a href="../InferIR/Exp/index.html#type-t">InferIR.Exp.t</a> list</code></div><div class="doc"><p>Return the list of expressions in the range of the substitution.</p></div></div><div class="spec val" id="val-sub_range_map"><a href="#val-sub_range_map" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>sub_range_map : (<a href="../InferIR/Exp/index.html#type-t">InferIR.Exp.t</a> <span class="keyword">‑></span> <a href="../InferIR/Exp/index.html#type-t">InferIR.Exp.t</a>) <span class="keyword">‑></span> <a href="index.html#type-exp_subst">exp_subst</a> <span class="keyword">‑></span> <a href="index.html#type-exp_subst">exp_subst</a></code></div><div class="doc"><p><code class="code">sub_range_map f sub</code> applies <code class="code">f</code> to the expressions in the range of <code class="code">sub</code>.</p></div></div><div class="spec val" id="val-sub_map"><a href="#val-sub_map" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>sub_map : (<a href="../InferIR/Ident/index.html#type-t">InferIR.Ident.t</a> <span class="keyword">‑></span> <a href="../InferIR/Ident/index.html#type-t">InferIR.Ident.t</a>) <span class="keyword">‑></span> (<a href="../InferIR/Exp/index.html#type-t">InferIR.Exp.t</a> <span class="keyword">‑></span> <a href="../InferIR/Exp/index.html#type-t">InferIR.Exp.t</a>) <span class="keyword">‑></span> <a href="index.html#type-exp_subst">exp_subst</a> <span class="keyword">‑></span> <a href="index.html#type-exp_subst">exp_subst</a></code></div><div class="doc"><p><code class="code">sub_map f g sub</code> applies the renaming <code class="code">f</code> to identifiers in the domain
|
|
|
|
|
of <code class="code">sub</code> and the substitution <code class="code">g</code> to the expressions in the range of <code class="code">sub</code>.</p></div></div><div class="spec val" id="val-extend_sub"><a href="#val-extend_sub" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>extend_sub : <a href="index.html#type-exp_subst">exp_subst</a> <span class="keyword">‑></span> <a href="../InferIR/Ident/index.html#type-t">InferIR.Ident.t</a> <span class="keyword">‑></span> <a href="../InferIR/Exp/index.html#type-t">InferIR.Exp.t</a> <span class="keyword">‑></span> <a href="index.html#type-exp_subst">exp_subst</a> option</code></div><div class="doc"><p>Extend substitution and return <code class="code">None</code> if not possible.</p></div></div><div class="spec val" id="val-exp_subst_free_vars"><a href="#val-exp_subst_free_vars" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>exp_subst_free_vars : <a href="index.html#type-exp_subst">exp_subst</a> <span class="keyword">‑></span> <a href="../InferIR/Ident/index.html#type-t">InferIR.Ident.t</a> <a href="../../InferStdlib/InferStdlib/index.html#module-IStd">InferStdlib.IStd</a>.Sequence.t</code></div><div class="doc"></div></div><div class="spec val" id="val-exp_subst_gen_free_vars"><a href="#val-exp_subst_gen_free_vars" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>exp_subst_gen_free_vars : <a href="index.html#type-exp_subst">exp_subst</a> <span class="keyword">‑></span> (unit, <a href="../InferIR/Ident/index.html#type-t">InferIR.Ident.t</a>) <a href="../../InferStdlib/InferStdlib/index.html#module-IStd">InferStdlib.IStd</a>.Sequence.Generator.t</code></div><div class="doc"></div></div><p>substitution functions
|
|
|
|
|
WARNING: these functions do not ensure that the results are normalized.</p><div class="spec val" id="val-exp_sub"><a href="#val-exp_sub" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>exp_sub : <a href="index.html#type-subst">subst</a> <span class="keyword">‑></span> <a href="../InferIR/Exp/index.html#type-t">InferIR.Exp.t</a> <span class="keyword">‑></span> <a href="../InferIR/Exp/index.html#type-t">InferIR.Exp.t</a></code></div><div class="doc"></div></div><div class="spec val" id="val-atom_sub"><a href="#val-atom_sub" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>atom_sub : <a href="index.html#type-subst">subst</a> <span class="keyword">‑></span> <a href="index.html#type-atom">atom</a> <span class="keyword">‑></span> <a href="index.html#type-atom">atom</a></code></div><div class="doc"></div></div><div class="spec val" id="val-instr_sub"><a href="#val-instr_sub" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>instr_sub : <a href="index.html#type-subst">subst</a> <span class="keyword">‑></span> <a href="index.html#type-instr">instr</a> <span class="keyword">‑></span> <a href="index.html#type-instr">instr</a></code></div><div class="doc"><p>apply <code class="code">subst</code> to all id's in <code class="code">instr</code>, including LHS id's</p></div></div><div class="spec val" id="val-hpred_sub"><a href="#val-hpred_sub" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>hpred_sub : <a href="index.html#type-subst">subst</a> <span class="keyword">‑></span> <a href="index.html#type-hpred">hpred</a> <span class="keyword">‑></span> <a href="index.html#type-hpred">hpred</a></code></div><div class="doc"></div></div><h3>Functions for replacing occurrences of expressions.</h3><div class="spec val" id="val-atom_replace_exp"><a href="#val-atom_replace_exp" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>atom_replace_exp : (<a href="../InferIR/Exp/index.html#type-t">InferIR.Exp.t</a><span class="keyword"> * </span><a href="../InferIR/Exp/index.html#type-t">InferIR.Exp.t</a>) list <span class="keyword">‑></span> <a href="index.html#type-atom">atom</a> <span class="keyword">‑></span> <a href="index.html#type-atom">atom</a></code></div><div class="doc"></div></div><div class="spec val" id="val-hpred_replace_exp"><a href="#val-hpred_replace_exp" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>hpred_replace_exp : (<a href="../InferIR/Exp/index.html#type-t">InferIR.Exp.t</a><span class="keyword"> * </span><a href="../InferIR/Exp/index.html#type-t">InferIR.Exp.t</a>) list <span class="keyword">‑></span> <a href="index.html#type-hpred">hpred</a> <span class="keyword">‑></span> <a href="index.html#type-hpred">hpred</a></code></div><div class="doc"></div></div><h3>Functions for constructing or destructing entities in this module</h3><div class="spec val" id="val-exp_get_offsets"><a href="#val-exp_get_offsets" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>exp_get_offsets : <a href="../InferIR/Exp/index.html#type-t">InferIR.Exp.t</a> <span class="keyword">‑></span> <a href="index.html#type-offset">offset</a> list</code></div><div class="doc"><p>Compute the offset list of an expression</p></div></div><div class="spec val" id="val-exp_add_offsets"><a href="#val-exp_add_offsets" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>exp_add_offsets : <a href="../InferIR/Exp/index.html#type-t">InferIR.Exp.t</a> <span class="keyword">‑></span> <a href="index.html#type-offset">offset</a> list <span class="keyword">‑></span> <a href="../InferIR/Exp/index.html#type-t">InferIR.Exp.t</a></code></div><div class="doc"><p>Add the offset list to an expression</p></div></div><div class="spec val" id="val-sigma_to_sigma_ne"><a href="#val-sigma_to_sigma_ne" class="anchor"></a><div class
|
|
|
|
|
<code class="code">e2</code> and <code class="code">elist</code>. If <code class="code">para = lambda (x, y, xs). exists zs. b</code>,
|
|
|
|
|
then the result of the instantiation is <code class="code">b[e1 / x, e2 / y, elist / xs, _zs'/ zs]</code>
|
|
|
|
|
for some fresh <code class="code">_zs'</code>.</p></div></div><div class="spec val" id="val-hpara_dll_instantiate"><a href="#val-hpara_dll_instantiate" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>hpara_dll_instantiate : <a href="index.html#type-hpara_dll">hpara_dll</a> <span class="keyword">‑></span> <a href="../InferIR/Exp/index.html#type-t">InferIR.Exp.t</a> <span class="keyword">‑></span> <a href="../InferIR/Exp/index.html#type-t">InferIR.Exp.t</a> <span class="keyword">‑></span> <a href="../InferIR/Exp/index.html#type-t">InferIR.Exp.t</a> <span class="keyword">‑></span> <a href="../InferIR/Exp/index.html#type-t">InferIR.Exp.t</a> list <span class="keyword">‑></span> <a href="../InferIR/Ident/index.html#type-t">InferIR.Ident.t</a> list<span class="keyword"> * </span><a href="index.html#type-hpred">hpred</a> list</code></div><div class="doc"><p><code class="code">hpara_dll_instantiate para cell blink flink elist</code> instantiates <code class="code">para</code> with <code class="code">cell</code>,
|
|
|
|
|
<code class="code">blink</code>, <code class="code">flink</code>, and <code class="code">elist</code>. If <code class="code">para = lambda (x, y, z, xs). exists zs. b</code>,
|
|
|
|
|
then the result of the instantiation is
|
|
|
|
|
<code class="code">b[cell / x, blink / y, flink / z, elist / xs, _zs'/ zs]</code>
|
|
|
|
|
for some fresh <code class="code">_zs'</code>.</p></div></div><div class="spec val" id="val-custom_error"><a href="#val-custom_error" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>custom_error : <a href="../InferIR/Pvar/index.html#type-t">InferIR.Pvar.t</a></code></div><div class="doc"></div></div></body></html>
|