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>IR__PredSymb (infer.IR__PredSymb)</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__PredSymb</nav><h1>Module <code>IR__PredSymb</code></h1><p>The Smallfoot Intermediate Language: Predicate Symbols</p><navclass="toc"><ul><li><ahref="#programs-and-types">Programs and Types</a></li></ul></nav></header><section><header><h3id="programs-and-types"><ahref="#programs-and-types"class="anchor"></a>Programs and Types</h3></header><dl><dtclass="spec type"id="type-mem_kind"><ahref="#type-mem_kind"class="anchor"></a><code><spanclass="keyword">type</span> mem_kind</code><code> = </code><tableclass="variant"><trid="type-mem_kind.Mmalloc"class="anchored"><tdclass="def constructor"><ahref="#type-mem_kind.Mmalloc"class="anchor"></a><code>| </code><code><spanclass="constructor">Mmalloc</span></code></td><tdclass="doc"><p>memory allocated with malloc</p></td></tr><trid="type-mem_kind.Mnew"class="anchored"><tdclass="def constructor"><ahref="#type-mem_kind.Mnew"class="anchor"></a><code>| </code><code><spanclass="constructor">Mnew</span></code></td><tdclass="doc"><p>memory allocated with new</p></td></tr><trid="type-mem_kind.Mnew_array"class="anchored"><tdclass="def constructor"><ahref="#type-mem_kind.Mnew_array"class="anchor"></a><code>| </code><code><spanclass="constructor">Mnew_array</span></code></td><tdclass="doc"><p>memory allocated with new<code></code></p></td></tr><trid="type-mem_kind.Mobjc"class="anchored"><tdclass="def constructor"><ahref="#type-mem_kind.Mobjc"class="anchor"></a><code>| </code><code><spanclass="constructor">Mobjc</span></code></td><tdclass="doc"><p>memory allocated with objective-c alloc</p></td></tr></table></dt></dl><div><divclass="spec include"><divclass="doc"><dl><dtclass="spec value"id="val-compare_mem_kind"><ahref="#val-compare_mem_kind"class="anchor"></a><code><spanclass="keyword">val</span> compare_mem_kind : <ahref="index.html#type-mem_kind">mem_kind</a><span>-></span><ahref="index.html#type-mem_kind">mem_kind</a><span>-></span> int</code></dt></dl></div></div></div><dl><dtclass="spec type"id="type-resource"><ahref="#type-resource"class="anchor"></a><code><spanclass="keyword">type</span> resource</code><code> = </code><tableclass="variant"><trid="type-resource.Rmemory"class="anchored"><tdclass="def constructor"><ahref="#type-resource.Rmemory"class="anchor"></a><code>| </code><code><spanclass="constructor">Rmemory</span><spanclass="keyword">of</span><ahref="index.html#type-mem_kind">mem_kind</a></code></td></tr><trid="type-resource.Rfile"class="anchored"><tdclass="def constructor"><ahref="#type-resource.Rfile"class="anchor"></a><code>| </code><code><spanclass="constructor">Rfile</span></code></td></tr><trid="type-resource.Rignore"class="anchored"><tdclass="def constructor"><ahref="#type-resource.Rignore"class="anchor"></a><code>| </code><code><spanclass="constructor">Rignore</span></code></td></tr><trid="type-resource.Rlock"class="anchored"><tdclass="def constructor"><ahref="#type-resource.Rlock"class="anchor"></a><code>| </code><code><spanclass="constructor">Rlock</span></code></td></tr></table></dt><dd><p>resource that can be allocated</p></dd></dl><div><divclass="spec include"><divclass="doc"><dl><dtclass="spec value"id="val-compare_resource"><ahref="#val-compare_resource"class="anchor"></a><code><spanclass="keyword">val</span> compare_resource : <ahref="index.html#type-resource">resource</a><span>-></span><ahref="index.html#type-resource">resource</a><span>-></span> int</code></dt></dl></div></div></div><dl><dtclass="spec type"id="type-res_act_kind"><ahref="#type-res_act_kind"class="anchor"></a><code><spanclass="keyword">type</span> res_act_kind</code><code> = </code><tableclass="variant"><trid="type-res_act_kind.Racquire"class="anchored"><tdclass="def constructor"><ahref="#type-res_act_kind.Racquire"class="anchor"></a><code>| </code><code><spanclass="constructor">Racquire</span></code></td></tr><trid="type-res_act_kind.Rrelease"class="anchored"><tdclass="def constructor"><ahref="#type-res_act_kind.Rrelease"class="anchor"></a><code>| </code><code><spanclass="constructor">Rrelease</span></code></td></tr></table></dt><dd><p>kind of resource action</p></dd></dl><div><divclass="spec include"><divclass="doc"><dl><dtclass="spec value"id="val-compare_res_act_kind"><ahref="#val-compare_res_act_kind"class="anchor"></a><code><spanclass="keyword">val</span> compare_res_act_kind : <ahref="index.html#type-res_act_kind">res_act_kind</a><span>-></span><ahref="index.html#type-res_act_kind">res_act_kind</a><span>-></span> int</code></dt></dl></div></div></div><dl><dtclass="spec value"id="val-equal_res_act_kind"><ahref="#val-equal_res_act_kind"class="anchor"></a><code><spanclass="keyword">val</span> equal_res_act_kind : <ahref="index.html#type-res_act_kind">res_act_kind</a><span>-></span><ahref="index.html#type-res_act_kind">res_act_kind</a><span>-></span> bool</code></dt></dl><dl><dtclass="spec type"id="type-dangling_kind"><ahref="#type-dangling_kind"class="anchor"></a><code><spanclass="keyword">type</span> dangling_kind</code><code> = </code><tableclass="variant"><trid="type-dangling_kind.DAuninit"class="anchored"><tdclass="def constructor"><ahref="#type-dangling_kind.DAuninit"class="anchor"></a><code>| </code><code><spanclass="constructor">DAuninit</span></code></td><tdclass="doc"><p>pointer is dangling because it is uninitialized</p></td></tr><trid="type-dangling_kind.DAaddr_stack_var"class="anchored"><tdclass="def constructor"><ahref="#type-dangling_kind.DAaddr_stack_var"class="anchor"></a><code>| </code><code><spanclass="constructor">DAaddr_stack_var</span></code></td><tdclass="doc"><p>pointer is dangling because it is the address of a stack variable which went out of scope</p></td></tr><trid="type-dangling_kind.DAminusone"class="anchored"><tdclass="def constructor"><ahref="#type-dangling_kind.DAminusone"class="anchor"></a><code>| </code><code><spanclass="constructor">DAminusone</span></code></td><tdclass="doc"><p>pointer is -1</p></td></tr></table></dt><dd><p>kind of dangling pointers</p></dd></dl><dl><dtclass="spec type"id="type-path_pos"><ahref="#type-path_pos"class="anchor"></a><code><spanclass="keyword">type</span> path_pos</code><code> = <ahref="../IR/Procname/index.html#type-t">IR.Procname.t</a> * int</code></dt><dd><p>position in a path: proc name, node id</p></dd></dl><div><divclass="spec include"><divclass="doc"><dl><dtclass="spec value"id="val-compare_path_pos"><ahref="#val-compare_path_pos"class="anchor"></a><code><spanclass="keyword">val</span> compare_path_pos : <ahref="index.html#type-path_pos">path_pos</a><span>-></span><ahref="index.html#type-path_pos">path_pos</a><span>-></span> int</code></dt></dl></div></div></div><dl><dtclass="spec value"id="val-equal_path_pos"><ahref="#val-equal_path_pos"class="anchor"></a><code><spanclass="keyword">val</span> equal_path_pos : <ahref="index.html#type-path_pos">path_pos</a><span>-></span><ahref="index.html#type-path_pos">path_pos</a><span>-></span> bool</code></dt></dl><dl><dtclass="spec type"id="type-res_action"><ahref="#type-res_action"class="anchor"></a><code><spanclass="keyword">type</span> res_action</code><code> = </code><code>{</code><tableclass="record"><trid="type-res_action.ra_kind"class="anchored"><tdclass="def field"><ahref="#type-res_action.ra_kind"class="anchor"></a><code>ra_kind : <ahref="index.html#type-res_act_kind">res_act_kind</a>;</code></td><tdclass="doc"><p>kind of action</p></td></tr><trid="type-res_action.ra_res"class="anchored"><tdclass="def field"><ahref="#type-res_action.ra_res"class="anchor"></a><code>ra_res : <ahref="index.html#type-resource">resource</a>;</code></td><tdclass="doc"><p>kind of resource</p></td></tr><trid="type-res_action.ra_pname"class="anchored"><tdclass="def field"><ahref="#type-res_action.ra_pname"class="anchor"></a><code>ra_pname : <ahref="../IR/Procname/index.html#type-t">IR.Procname.t</a>;</code></td><tdclass="doc"><p>name of the procedure used to acquire/release the resource</p></td></tr><trid="type-res_action.ra_loc"class="anchored"><tdclass="def field"><ahref="#type-res_action.ra_loc"class="anchor"></a><code>ra_loc : <ahref="../IBase/Location/index.html#type-t">IBase.Location.t</a>;</code></td><tdclass="doc"><p>location of the acquire/release</p></td></tr><trid="type-res_action.ra_vpath"class="anchored"><tdclass="def field"><ahref="#type-res_action.ra_vpath"class="anchor"></a><code>ra_vpath : <ahref="../IR/DecompiledExp/index.html#type-vpath">IR.DecompiledExp.vpath</a>;</code></td><tdclass="doc"><p>vpath of the resource value</p></td></tr></table><code>}</code></dt><dd><p>acquire/release action on a resource</p></dd></dl><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.Aresource"class="anchored"><tdclass="def constructor"><ahref="#type-t.Aresource"class="anchor"></a><code>| </code><code><spanclass="constructor">Aresource</span><spanclass="keyword">of</span><ahref="index.html#type-res_action">res_action</a></code></td><tdclass="doc"><p>resource acquire/release</p></td></tr><trid="type-t.Aautorelease"class="anchored"><tdclass="def constructor"><ahref="#type-t.Aautorelease"class="anchor"></a><code>| </code><code><spanclass="constructor">Aautorelease</span></code></td></tr><trid="type-t.Adangling"class="anchored"><tdclass="def constructor"><ahref="#type-t.Adangling"class="anchor"></a><code>| </code><code><spanclass="constructor">Adangling</span><spanclass="keyword">of</span><ahref="index.html#type-dangling_kind">dangling_kind</a></code></td><tdclass="doc"><p>dangling pointer</p></td></tr><trid="type-t.Aundef"class="anchored"><tdclass="def constructor"><ahref="#type-t.Aundef"class="anchor"></a><code>| </code><code><spanclass="constructor">Aundef</span><spanclass="keyword">of</span><ahref="../IR/Procname/index.html#type-t">IR.Procname.t</a> * <ahref="../IR/Annot/Item/index.html#type-t">IR.Annot.Item.t</a> * <ahref="../IBase/Location/index.html#type-t">IBase.Location.t</a> * <ahref="index.html#type-path_pos">path_pos</a></code></td></tr><trid="type-t.Alocked"class="anchored"><tdclass="def constructor"><ahref="#type-t.Alocked"class="anchor"></a><code>| </code><code><spanclass="constructor">Alocked</span></code></td></tr><trid="type-t.Aunlocked"class="anchored"><tdclass="def constructor"><ahref="#type-t.Aunlocked"class="anchor"></a><code>| </code><code><spanclass="constructor">Aunlocked</span></code></td></tr><trid="type-t.Adiv0"class="anchored"><tdclass="def constructor"><ahref="#type-t.Adiv0"class="anchor"></a><code>| </code><code><spanclass="constructor">Adiv0</span><spanclass="keyword">of</span><ahref="index.html#type-path_pos">path_pos</a></code></td><tdclass="doc"><p>value appeared in second argument of division at given path position</p></td></tr><trid="type-t.Aobjc_null"class="anchored"><tdclass="def constructor"><ahref="#type-t.Aobjc_null"class="anchor"></a><code>| </code><code><spanclass="constructor">Aobjc_null</span></code></td><tdclass="doc"><p>attributed exp is null due to a call to a method with given path as null receiver</p></td></tr><trid="type-t.Aretval"class="anchored"><tdclass="def constructor"><ahref="#type-t.Aretval"class="anchor"></a><code>| </code><code><spanclass="constructor">Aretval</span><spanclass="keyword">of</span><ahref="../IR/Procname/index.html#type-t">IR.Procname.t</a> * <ahref="../IR/Annot/Item/index.html#type-t">IR.Annot.Item.t</a></code></td><tdclass="doc"><p>value was returned from a call to the given procedure, plus the annots of the return value</p></td></tr><trid="type-t.Aobserver"class="anchored"><tdclass="def constructor"><ahref="#type-t.Aobserver"class="anchor"></a><code>| </code><code><spanclass="constructor">Aobserver</span></code></td><tdclass="doc"><p>denotes an object registered as an observers to a notification center</p></td></tr><trid="type-t.Aunsubscribed_observer"class="anchored"><tdclass="def constructor"><ahref="#type-t.Aunsubscribed_observer"class="anchor"></a><code>| </code><code><spanclass="constructor">Aunsubscribed_observer</span></code></td><tdclass="doc"><p>denotes an object unsubscribed from observers of a notification center</p></td></tr><trid="type-t.Awont_leak"class="anchored"><tdclass="def constructor"><ahref="#type-t.Awont_leak"class="anchor"></a><code>| </code><code><spanclass="constructor">Awont_leak</span></code></td><tdclass="doc"><p>value do not participate in memory leak analysis</p></td></tr></table></dt><dd><p>Attributes are nary function symbols that are applied to expression arguments in Apred and Anpred atomic formulas. Many operations don't make much sense for nullary predicates, and are generally treated as no-ops. The first argument is treated specially, as the "anchor" of the predicate application. For example, adding or removing an attribute uses the anchor to identify the atom to operate on. Also, abstraction and normalization operations treat the anchor specially and maintain more information on it than other arguments. Therefore when attaching an attribute to an expression, that expression should be the first argument, optionally followed by additional related expressions.</p></dd></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></dl></div></div></div><dl><dtclass="spec value"id="val-equal"><ahref="#val-equal"class="anchor"></a><code><spanclass="keyword">val</span> equal : <ahref="index.html#type-t">t</a><span>-></span><ahref="index.html#type-t">t</a><span>-></span> bool</code></dt><dtclass="spec value"id="val-mem_alloc_pname"><ahref="#val-mem_alloc_pname"class="anchor"></a><code><spanclass="keyword">val</span> mem_alloc_pname : <ahref="index.html#type-mem_kind">mem_kind</a><span>-></span><ahref="../IR/Procname/index.html#type-t">IR.Procname.t</a></code></dt><dd><p>name of the allocation function for the given memory kind</p></dd></dl><dl><dtclass="spec value"id="val-mem_dealloc_pname"><ahref="#val-mem_dealloc_pname"class="anchor"></a><code><spanclass="keyword">val</span> mem_dealloc_pname : <ahref="index.html#type-mem_kind">mem_kind</a><span>-></span><ahref="../IR/Procname/index.html#type-t">IR.Procname.t</a></code></dt><dd><p>name of the deallocation function for the given memory kind</p></dd></dl><dl><dtclass="spec type"id="type-category"><ahref="#type-category"class="anchor"></a><code><spanclass="keyword">type</span> category</code><code> = </code><tableclass="variant"><trid="type-category.ACresource"class="anchored"><tdclass="def constructor"><ahref="#type-category.ACresource"class="anchor"></a><code>| </code><code><spanclass="constructor">ACresource</span></code></td></tr><trid="type-category.ACautorelease"class="anchored"><tdclass="def constructor"><ahref="#type-category.ACautorelease"class="anchor"></a><code>| </code><code><spanclass="constructor">ACautorelease</span></code></td></tr><trid="type-category.AClock"class="anchored"><tdclass="def constructor"><ahref="#type-category.AClock"class="anchor"></a><code>| </code><code><spanclass="constructor">AClock</span></code></td></tr><trid="type-category.ACdiv0"class="anchored"><tdclass="def constructor"><ahref="#type-category.ACdiv0"class="anchor"></a><code>| </code><code><spanclass="constructor">ACdiv0</span></code></td></tr><trid="type-category.ACobjc_null"class="anchored"><tdclass="def constructor"><ahref="#type-category.ACobjc_null"class="anchor"></a><code>| </code><code><spanclass="constructor">ACobjc_null</span></code></td></tr><trid="type-category.ACundef"class="anchored"><tdclass="def constructor"><ahref="#type-category.ACundef"class="anchor"></a><code>| </code><code><spanclass="constructor">ACundef</span></code></td></tr><trid="type-category.ACretval"class="anchored"><tdclass="def constructor"><ahref="#type-category.ACretval"class="anchor"></a><code>| </code><code><spanclass="constructor">ACretval</span></code></td></tr><trid="type-category.ACobserver"class="anchored"><tdclass="def constructor"><ahref="#type-category.ACobserver"class="anchor"></a><code>| </code><code><spanclass="constructor">ACobserver</span></code></td></tr><trid="type-category.ACwontleak"class="anchored"><tdclass="def constructor"><ahref="#type-category.ACwontleak"class="anchor"></a><code>| </code><code><spanclass="constructor">ACwontleak</span></code></td></tr></table></dt><dd><p>Categories of attributes</p></dd></dl><div><divclass="spec include"><divclass="doc"><dl><dtclass="spec value"id="val-compare_category"><ahref="#val-compare_category"class="anchor"></a><code><spanclass="keyword">val</span> compare_category : <ahref="index.html#type-category">category</a><span>-></span><ahref="index.html#type-category">category</a><span>-></span> int</code></dt></dl></div></div></div><dl><dtclass="spec value"id="val-equal_category"><ahref="#val-equal_category"class="anchor"></a><code><spanclass="keyword">val</span> equal_category : <ahref="index.html#type-category">category</a><span>-></span><ahref="index.html#type-category">category</a><span>-></span> bool</code></dt><dtclass="spec value"id="val-to_category"><ahref="#val-to_category"class="anchor"></a><code><spanclass="keyword">val</span> to_category : <ahref="index.html#type-t">t</a><span>-></span><ahref="index.html#type-category">category</a></code></dt><dd><p>Return the category to which the attribute belongs.</p></dd></dl><dl><dtclass="spec value"id="val-is_undef"><ahref="#val-is_undef"class="anchor"></a><code><spanclass="keyword">val</span> is_undef : <ahref="index.html#type-t">t</a><span>-></span> bool</code></dt><dtclass="spec value"id="val-to_string"><ahref="#val-to_string"class="anchor"></a><code><spanclass="keyword">val</span> to_string : <ahref="../IStdlib/Pp/index.html#type-env">IStdlib.Pp.env</a><span>-></span><ahref="index.html#type-t">t</a><span>-></span> string</code></dt><dd><p>convert the attribute to a string</p></dd></dl><dl><dtclass="spec value"id="val-d_attribute"><ahref="#val-d_attribute"class="anchor"></a><code><spanclass="keyword">val</span> d_attribute : <ahref="index.html#type-t">t</a><span>-></span> unit</code></dt><dd><p>Dump an attribute.</p></dd></dl></section></div></body></html>