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>Attribute (infer.Biabduction.Attribute)</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>»<ahref="../index.html">Biabduction</a>» Attribute</nav><h1>Module <code>Biabduction.Attribute</code></h1></header><aside><p>Attribute manipulation in Propositions (i.e., Symbolic Heaps)</p></aside><dl><dtclass="spec value"id="val-is_pred"><ahref="#val-is_pred"class="anchor"></a><code><spanclass="keyword">val</span> is_pred : <ahref="../Predicates/index.html#type-atom">Predicates.atom</a><span>-></span> bool</code></dt><dd><p>Check whether an atom is used to mark an attribute</p></dd></dl><dl><dtclass="spec value"id="val-add"><ahref="#val-add"class="anchor"></a><code><spanclass="keyword">val</span> add : <ahref="../../IR/Tenv/index.html#type-t">IR.Tenv.t</a><span>-></span><span>?⁠footprint:bool</span><span>-></span><span>?⁠polarity:bool</span><span>-></span><span><ahref="../Prop/index.html#type-normal">Prop.normal</a><ahref="../Prop/index.html#type-t">Prop.t</a></span><span>-></span><ahref="../../IR/PredSymb/index.html#type-t">IR.PredSymb.t</a><span>-></span><span><ahref="../../IR/Exp/index.html#type-t">IR.Exp.t</a> list</span><span>-></span><span><ahref="../Prop/index.html#type-normal">Prop.normal</a><ahref="../Prop/index.html#type-t">Prop.t</a></span></code></dt><dd><p>Add an attribute associated to the argument expressions</p></dd></dl><dl><dtclass="spec value"id="val-add_or_replace"><ahref="#val-add_or_replace"class="anchor"></a><code><spanclass="keyword">val</span> add_or_replace : <ahref="../../IR/Tenv/index.html#type-t">IR.Tenv.t</a><span>-></span><span><ahref="../Prop/index.html#type-normal">Prop.normal</a><ahref="../Prop/index.html#type-t">Prop.t</a></span><span>-></span><ahref="../Predicates/index.html#type-atom">Predicates.atom</a><span>-></span><span><ahref="../Prop/index.html#type-normal">Prop.normal</a><ahref="../Prop/index.html#type-t">Prop.t</a></span></code></dt><dd><p>Replace an attribute associated to the expression</p></dd></dl><dl><dtclass="spec value"id="val-add_or_replace_check_changed"><ahref="#val-add_or_replace_check_changed"class="anchor"></a><code><spanclass="keyword">val</span> add_or_replace_check_changed : <ahref="../../IR/Tenv/index.html#type-t">IR.Tenv.t</a><span>-></span><span><ahref="../Prop/index.html#type-normal">Prop.normal</a><ahref="../Prop/index.html#type-t">Prop.t</a></span><span>-></span><ahref="../Predicates/index.html#type-atom">Predicates.atom</a><span>-></span><span><ahref="../Prop/index.html#type-normal">Prop.normal</a><ahref="../Prop/index.html#type-t">Prop.t</a></span></code></dt><dd><p>Replace an attribute associated to the expression, and call the given function with new and old attributes if they changed.</p></dd></dl><dl><dtclass="spec value"id="val-get_all"><ahref="#val-get_all"class="anchor"></a><code><spanclass="keyword">val</span> get_all : <span><spanclass="type-var">'a</span><ahref="../Prop/index.html#type-t">Prop.t</a></span><span>-></span><span><ahref="../Predicates/index.html#type-atom">Predicates.atom</a> list</span></code></dt><dd><p>Get all the attributes of the prop</p></dd></dl><dl><dtclass="spec value"id="val-get_for_exp"><ahref="#val-get_for_exp"class="anchor"></a><code><spanclass="keyword">val</span> get_for_exp : <ahref="../../IR/Tenv/index.html#type-t">IR.Tenv.t</a><span>-></span><span><spanclass="type-var">'a</span><ahref="../Prop/index.html#type-t">Prop.t</a></span><span>-></span><ahref="../../IR/Exp/index.html#type-t">IR.Exp.t</a><span>-></span><span><ahref="../Predicates/index.html#type-atom">Predicates.atom</a> list</span></code></dt><dd><p>Get the attributes associated to the expression, if any</p></dd></dl><dl><dtclass="spec value"id="val-get_objc_null"><ahref="#val-get_objc_null"class="anchor"></a><code><spanclass="keyword">val</span> get_objc_null : <ahref="../../IR/Tenv/index.html#type-t">IR.Tenv.t</a><span>-></span><span><spanclass="type-var">'a</span><ahref="../Prop/index.html#type-t">Prop.t</a></span><span>-></span><ahref="../../IR/Exp/index.html#type-t">IR.Exp.t</a><span>-></span><span><ahref="../Predicates/index.html#type-atom">Predicates.atom</a> option</span></code></dt><dd><p>Get the objc null attribute associated to the expression, if any</p></dd></dl><dl><dtclass="spec value"id="val-get_observer"><ahref="#val-get_observer"class="anchor"></a><code><spanclass="keyword">val</span> get_observer : <ahref="../../IR/Tenv/index.html#type-t">IR.Tenv.t</a><span>-></span><span><spanclass="type-var">'a</span><ahref="../Prop/index.html#type-t">Prop.t</a></span><span>-></span><ahref="../../IR/Exp/index.html#type-t">IR.Exp.t</a><span>-></span><span><ahref="../Predicates/index.html#type-atom">Predicates.atom</a> option</span></code></dt><dd><p>Get the observer attribute associated to the expression, if any</p></dd></dl><dl><dtclass="spec value"id="val-get_resource"><ahref="#val-get_resource"class="anchor"></a><code><spanclass="keyword">val</span> get_resource : <ahref="../../IR/Tenv/index.html#type-t">IR.Tenv.t</a><span>-></span><span><spanclass="type-var">'a</span><ahref="../Prop/index.html#type-t">Prop.t</a></span><span>-></span><ahref="../../IR/Exp/index.html#type-t">IR.Exp.t</a><span>-></span><span><ahref="../Predicates/index.html#type-atom">Predicates.atom</a> option</span></code></dt><dd><p>Get the resource attribute associated to the expression, if any</p></dd></dl><dl><dtclass="spec value"id="val-get_undef"><ahref="#val-get_undef"class="anchor"></a><code><spanclass="keyword">val</span> get_undef : <ahref="../../IR/Tenv/index.html#type-t">IR.Tenv.t</a><span>-></span><span><spanclass="type-var">'a</span><ahref="../Prop/index.html#type-t">Prop.t</a></span><span>-></span><ahref="../../IR/Exp/index.html#type-t">IR.Exp.t</a><span>-></span><span><ahref="../Predicates/index.html#type-atom">Predicates.atom</a> option</span></code></dt><dd><p>Get the undef attribute associated to the expression, if any</p></dd></dl><dl><dtclass="spec value"id="val-get_wontleak"><ahref="#val-get_wontleak"class="anchor"></a><code><spanclass="keyword">val</span> get_wontleak : <ahref="../../IR/Tenv/index.html#type-t">IR.Tenv.t</a><span>-></span><span><spanclass="type-var">'a</span><ahref="../Prop/index.html#type-t">Prop.t</a></span><span>-></span><ahref="../../IR/Exp/index.html#type-t">IR.Exp.t</a><span>-></span><span><ahref="../Predicates/index.html#type-atom">Predicates.atom</a> option</span></code></dt><dd><p>Get the wontleak attribute associated to the expression, if any</p></dd></dl><dl><dtclass="spec value"id="val-has_dangling_uninit"><ahref="#val-has_dangling_uninit"class="anchor"></a><code><spanclass="keyword">val</span> has_dangling_uninit : <ahref="../../IR/Tenv/index.html#type-t">IR.Tenv.t</a><span>-></span><span><spanclass="type-var">'a</span><ahref="../Prop/index.html#type-t">Prop.t</a></span><span>-></span><ahref="../../IR/Exp/index.html#type-t">IR.Exp.t</a><span>-></span> bool</code></dt><dd><p>Test for existence of an Adangling DAuninit attribute associated to the exp</p></dd></dl><dl><dtclass="spec value"id="val-remove"><ahref="#val-remove"class="anchor"></a><code><spanclass="keyword">val</span> remove : <ahref="../../IR/Tenv/index.html#type-t">IR.Tenv.t</a><span>-></span><span><ahref="../Prop/index.html#type-normal">Prop.normal</a><ahref="../Prop/index.html#type-t">Prop.t</a></span><span>-></span><ahref="../Predicates/index.html#type-atom">Predicates.atom</a><span>-></span><span><ahref="../Prop/index.html#type-normal">Prop.normal</a><ahref="../Prop/index.html#type-t">Prop.t</a></span></code></dt><dd><p>Remove an attribute</p></dd></dl><dl><dtclass="spec value"id="val-remove_for_attr"><ahref="#val-remove_for_attr"class="anchor"></a><code><spanclass="keyword">val</span> remove_for_attr : <ahref="../../IR/Tenv/index.html#type-t">IR.Tenv.t</a><span>-></span><span><ahref="../Prop/index.html#type-normal">Prop.normal</a><ahref="../Prop/index.html#type-t">Prop.t</a></span><span>-></span><ahref="../../IR/PredSymb/index.html#type-t">IR.PredSymb.t</a><span>-></span><span><ahref="../Prop/index.html#type-normal">Prop.normal</a><ahref="../Prop/index.html#type-t">Prop.t</a></span></code></dt><dd><p>Remove all attributes for the given attr</p></dd></dl><dl><dtclass="spec value"id="val-remove_resource"><ahref="#val-remove_resource"class="anchor"></a><code><spanclass="keyword">val</span> remove_resource : <ahref="../../IR/Tenv/index.html#type-t">IR.Tenv.t</a><span>-></span><ahref="../../IR/PredSymb/index.html#type-res_act_kind">IR.PredSymb.res_act_kind</a><span>-></span><ahref="../../IR/PredSymb/index.html#type-resource">IR.PredSymb.resource</a><span>-></span><span><ahref="../Prop/index.html#type-normal">Prop.normal</a><ahref="../Prop/index.html#type-t">Prop.t</a></span><span>-></span><span><ahref="../Prop/index.html#type-normal">Prop.normal</a><ahref="../Prop/index.html#type-t">Prop.t</a></span></code></dt><dd><p>Remove all attributes for the given resource and kind</p></dd></dl><dl><dtclass="spec value"id="val-map_resource"><ahref="#val-map_resource"class="anchor"></a><code><spanclass="keyword">val</span> map_resource : <ahref="../../IR/Tenv/index.html#type-t">IR.Tenv.t</a><span>-></span><span><ahref="../Prop/index.html#type-normal">Prop.normal</a><ahref="../Prop/index.html#type-t">Prop.t</a></span><span>-></span><span>(<ahref="../../IR/Exp/index.html#type-t">IR.Exp.t</a><span>-></span><ahref="../../IR/PredSymb/index.html#type-res_action">IR.PredSymb.res_action</a><span>-></span><ahref="../../IR/PredSymb/index.html#type-res_action">IR.PredSymb.res_action</a>)</span><span>-></span><span><ahref="../Prop/index.html#type-normal">Prop.normal</a><ahref="../Prop/index.html#type-t">Prop.t</a></span></code></dt><dd><p>Apply f to every resource attribute in the prop</p></dd></dl><dl><dtclass="spec value"id="val-replace_objc_null"><ahref="#val-replace_objc_null"class="anchor"></a><code><spanclass="keyword">val</span> replace_objc_null : <ahref="../../IR/Tenv/index.html#type-t">IR.Tenv.t</a><span>-></span><span><ahref="../Prop/index.html#type-normal">Prop.normal</a><ahref="../Prop/index.html#type-t">Prop.t</a></span><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><span><ahref="../Prop/index.html#type-normal">Prop.normal</a><ahref="../Prop/index.html#type-t">Prop.t</a></span></code></dt><dd><p><code>replace_objc_null lhs rhs</code>. If rhs has the objc_null attribute, replace the attribute and set the lhs = 0</p></dd></dl><dl><dtclass="spec value"id="val-nullify_exp_with_objc_null"><ahref="#val-nullify_exp_with_objc_null"class="anchor"></a><code><spanclass="keyword">val</span> nullify_exp_with_objc_null : <ahref="../../IR/Tenv/index.html#type-t">IR.Tenv.t</a><span>-></span><span><ahref="../Prop/index.html#type-normal">Prop.normal</a><ahref="../Prop/index.html#type-t">Prop.t</a></span><span>-></span><ahref="../../IR/Exp/index.html#type-t">IR.Exp.t</a><span>-></span><span><ahref="../Prop/index.html#type-normal">Prop.normal</a><ahref="../Prop/index.html#type-t">Prop.t</a></span></code></dt><dd><p>For each Var subexp of the argument with an Aobjc_null attribute, remove the attribute and conjoin an equality to zero.</p></dd></dl><dl><dtclass="spec value"id="val-mark_vars_as_undefined"><ahref="#val-mark_vars_as_undefined"class="anchor"></a><code><spanclass="keyword">val</span> mark_vars_as_undefined : <ahref="../../IR/Tenv/index.html#type-t">IR.Tenv.t</a><span>-></span><span><ahref="../Prop/index.html#type-normal">Prop.normal</a><ahref="../Prop/index.html#type-t">Prop.t</a></span><span>-></span><span>ret_exp:<ahref="../../IR/Exp/index.html#type-t">IR.Exp.t</a></span><span>-></span><span>undefined_actuals_by_ref:<span><ahref="../../IR/Exp/index.html#type-t">IR.Exp.t</a> list</span></span><span>-></span><ahref="../../IR/Procname/index.html#type-t">IR.Procname.t</a><span>-></span><ahref="../../IR/Annot/Item/index.html#type-t">IR.Annot.Item.t</a><span>-></span><ahref="../../IBase/Location/index.html#type-t">IBase.Location.t</a><span>-></span><ahref="../../IR/PredSymb/index.html#type-path_pos">IR.PredSymb.path_pos</a><span>-></span><span><ahref="../Prop/index.html#type-normal">Prop.normal</a><ahref="../Prop/index.html#type-t">Prop.t</a></span></code></dt><dd><p>mark Exp.Var's or Exp.Lvar's as undefined</p></dd></dl><dl><dtclass="spec type"id="type-arith_problem"><ahref="#type-arith_problem"class="anchor"></a><code><spanclass="keyword">type</span> arith_problem</code><code> = </code><tableclass="variant"><trid="type-arith_problem.Div0"class="anchored"><tdclass="def constructor"><ahref="#type-arith_problem.Div0"class="anchor"></a><code>| </code><code><spanclass="constructor">Div0</span><spanclass="keyword">of</span><ahref="../../IR/Exp/index.html#type-t">IR.Exp.t</a></code></td></tr><trid="type-arith_problem.UminusUnsigned"class="anchored"><tdclass="def constructor"><ahref="#type-arith_problem.UminusUnsigned"class="anchor"></a><code>| </code><code><spanclass="constructor">UminusUnsigned</span><spanclass="keyword">of</span><ahref="../../IR/Exp/index.html#type-t">IR.Exp.t</a> * <ahref="../../IR/Typ/index.html#type-t">IR.Typ.t</a></code></td></tr></table></dt><dd><p>type for arithmetic problems</p></dd></dl><dl><dtclass="spec value"id="val-find_arithmetic_problem"><ahref="#val-find_arithmetic_problem"class="anchor"></a><code><spanclass="keyword">val</span> find_arithmetic_problem : <ahref="../../IR/Tenv/index.html#type-t">IR.Tenv.t</a><span>-></span><ahref="../../IR/PredSymb/index.html#type-path_pos">IR.PredSymb.path_pos</a><span>-></span><span><ahref="../Prop/index.html#type-normal">Prop.normal</a><ahref="../Prop/index.html#type-t">Prop.t</a></span><span>-></span><ahref="../../IR/Exp/index.html#type-t">IR.Exp.t</a><span>-></span><span><ahref="index.html#type-arith_problem">arith_problem</a> option</span> * <span><ahref="../Prop/index.html#type-normal">Prop.normal</a><ahref="../Prop/index.html#type-t">Prop.t</a></span></code></dt><dd><p>Look for an arithmetic problem in <code>exp</code></p></dd></dl><dl><dtclass="spec value"id="val-deallocate_stack_vars"><ahref="#val-deallocate_stack_vars"class="anchor"></a><code><spanclass="keyword">val</span> deallocate_stack_vars : <ahref="../../IR/Tenv/index.html#type-t">IR.Tenv.t</a><span>-></span><span><ahref="../Prop/index.html#type-normal">Prop.normal</a><ahref="../Prop/index.html#type-t">Prop.t</a></span><span>-></span><span><ahref="../../IR/Pvar/index.html#type-t">IR.Pvar.t</a> list</span><span>-></span><span><ahref="../../IR/Pvar/index.html#type-t">IR.Pvar.t</a> list</span> * <span><ahref="../Prop/index.html#type-normal">Prop.normal</a><ahref="../Prop/index.html#type-t">Prop.t</a></span></code></dt><dd><p>Deallocate the stack variables in <code>pvars</code>, and replace them by normal variables. Return the list of stack variables whose address was still present after deallocation.</p></dd></dl><dl><dtclass="spec value"id="val-find_equal_formal_path"><ahref="#val-find_equal_formal_path"class="anchor"></a><code><spanclass="keyword">val</span> find_equal_formal_path : <ahref="../../IR/Tenv/index.html#type-t">IR.Tenv.t</a><span>-></span><ahref="../../IR/Exp/index.html#type-t">IR.Exp.t</a><span>-></span><span><spanclass="type-var">'a</span><ahref="../Prop/index.html#type-t">Prop.t</a></span><span>-></span><span><ahref="../../IR/Exp/index.html#type-t">IR.Exp.t</a> option</span></code></dt></dl></div></body></html>