You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2 lines
16 KiB

This file contains ambiguous Unicode characters!

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>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Attribute (infer.Biabduction.Attribute)</title><link rel="stylesheet" href="../../../odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 1.5.2"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div class="content"><header><nav><a href="../index.html">Up</a> <a href="../../index.html">infer</a> &#x00BB; <a href="../index.html">Biabduction</a> &#x00BB; Attribute</nav><h1>Module <code>Biabduction.Attribute</code></h1></header><aside><p>Attribute manipulation in Propositions (i.e., Symbolic Heaps)</p></aside><dl><dt class="spec value" id="val-is_pred"><a href="#val-is_pred" class="anchor"></a><code><span class="keyword">val</span> is_pred : <a href="../Predicates/index.html#type-atom">Predicates.atom</a> <span>&#45;&gt;</span> bool</code></dt><dd><p>Check whether an atom is used to mark an attribute</p></dd></dl><dl><dt class="spec value" id="val-add"><a href="#val-add" class="anchor"></a><code><span class="keyword">val</span> add : <a href="../../IR/Tenv/index.html#type-t">IR.Tenv.t</a> <span>&#45;&gt;</span> <span>?&#8288;footprint:bool</span> <span>&#45;&gt;</span> <span>?&#8288;polarity:bool</span> <span>&#45;&gt;</span> <span><a href="../Prop/index.html#type-normal">Prop.normal</a> <a href="../Prop/index.html#type-t">Prop.t</a></span> <span>&#45;&gt;</span> <a href="../../IR/PredSymb/index.html#type-t">IR.PredSymb.t</a> <span>&#45;&gt;</span> <span><a href="../../IR/Exp/index.html#type-t">IR.Exp.t</a> list</span> <span>&#45;&gt;</span> <span><a href="../Prop/index.html#type-normal">Prop.normal</a> <a href="../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><dt class="spec value" id="val-add_or_replace"><a href="#val-add_or_replace" class="anchor"></a><code><span class="keyword">val</span> add_or_replace : <a href="../../IR/Tenv/index.html#type-t">IR.Tenv.t</a> <span>&#45;&gt;</span> <span><a href="../Prop/index.html#type-normal">Prop.normal</a> <a href="../Prop/index.html#type-t">Prop.t</a></span> <span>&#45;&gt;</span> <a href="../Predicates/index.html#type-atom">Predicates.atom</a> <span>&#45;&gt;</span> <span><a href="../Prop/index.html#type-normal">Prop.normal</a> <a href="../Prop/index.html#type-t">Prop.t</a></span></code></dt><dd><p>Replace an attribute associated to the expression</p></dd></dl><dl><dt class="spec value" id="val-add_or_replace_check_changed"><a href="#val-add_or_replace_check_changed" class="anchor"></a><code><span class="keyword">val</span> add_or_replace_check_changed : <a href="../../IR/Tenv/index.html#type-t">IR.Tenv.t</a> <span>&#45;&gt;</span> <span><a href="../Prop/index.html#type-normal">Prop.normal</a> <a href="../Prop/index.html#type-t">Prop.t</a></span> <span>&#45;&gt;</span> <a href="../Predicates/index.html#type-atom">Predicates.atom</a> <span>&#45;&gt;</span> <span><a href="../Prop/index.html#type-normal">Prop.normal</a> <a href="../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><dt class="spec value" id="val-get_all"><a href="#val-get_all" class="anchor"></a><code><span class="keyword">val</span> get_all : <span><span class="type-var">'a</span> <a href="../Prop/index.html#type-t">Prop.t</a></span> <span>&#45;&gt;</span> <span><a href="../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><dt class="spec value" id="val-get_for_exp"><a href="#val-get_for_exp" class="anchor"></a><code><span class="keyword">val</span> get_for_exp : <a href="../../IR/Tenv/index.html#type-t">IR.Tenv.t</a> <span>&#45;&gt;</span> <span><span class="type-var">'a</span> <a href="../Prop/index.html#type-t">Prop.t</a></span> <span>&#45;&gt;</span> <a href="../../IR/Exp/index.html#type-t">IR.Exp.t</a> <span>&#45;&gt;</span> <span><a href="../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><dt class="spec value" id="val-get_objc_null"><a href="#val-get_objc_null" class="anchor"></a><code><span class="keyword">val</span> get_objc_null : <a href="../../IR/Tenv/index.html#type-t">IR.Tenv.t</a> <span>&#45;&gt;</span> <span><span class="type-var">'a</span> <a href="../Prop/index.html#type-t">Prop.t</a></span> <span>&#45;&gt;</span> <a href="../../IR/Exp/index.html#type-t">IR.Exp.t</a> <span>&#45;&gt;</span> <span><a href="../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><dt class="spec value" id="val-get_observer"><a href="#val-get_observer" class="anchor"></a><code><span class="keyword">val</span> get_observer : <a href="../../IR/Tenv/index.html#type-t">IR.Tenv.t</a> <span>&#45;&gt;</span> <span><span class="type-var">'a</span> <a href="../Prop/index.html#type-t">Prop.t</a></span> <span>&#45;&gt;</span> <a href="../../IR/Exp/index.html#type-t">IR.Exp.t</a> <span>&#45;&gt;</span> <span><a href="../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><dt class="spec value" id="val-get_resource"><a href="#val-get_resource" class="anchor"></a><code><span class="keyword">val</span> get_resource : <a href="../../IR/Tenv/index.html#type-t">IR.Tenv.t</a> <span>&#45;&gt;</span> <span><span class="type-var">'a</span> <a href="../Prop/index.html#type-t">Prop.t</a></span> <span>&#45;&gt;</span> <a href="../../IR/Exp/index.html#type-t">IR.Exp.t</a> <span>&#45;&gt;</span> <span><a href="../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><dt class="spec value" id="val-get_undef"><a href="#val-get_undef" class="anchor"></a><code><span class="keyword">val</span> get_undef : <a href="../../IR/Tenv/index.html#type-t">IR.Tenv.t</a> <span>&#45;&gt;</span> <span><span class="type-var">'a</span> <a href="../Prop/index.html#type-t">Prop.t</a></span> <span>&#45;&gt;</span> <a href="../../IR/Exp/index.html#type-t">IR.Exp.t</a> <span>&#45;&gt;</span> <span><a href="../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><dt class="spec value" id="val-get_wontleak"><a href="#val-get_wontleak" class="anchor"></a><code><span class="keyword">val</span> get_wontleak : <a href="../../IR/Tenv/index.html#type-t">IR.Tenv.t</a> <span>&#45;&gt;</span> <span><span class="type-var">'a</span> <a href="../Prop/index.html#type-t">Prop.t</a></span> <span>&#45;&gt;</span> <a href="../../IR/Exp/index.html#type-t">IR.Exp.t</a> <span>&#45;&gt;</span> <span><a href="../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><dt class="spec value" id="val-has_dangling_uninit"><a href="#val-has_dangling_uninit" class="anchor"></a><code><span class="keyword">val</span> has_dangling_uninit : <a href="../../IR/Tenv/index.html#type-t">IR.Tenv.t</a> <span>&#45;&gt;</span> <span><span class="type-var">'a</span> <a href="../Prop/index.html#type-t">Prop.t</a></span> <span>&#45;&gt;</span> <a href="../../IR/Exp/index.html#type-t">IR.Exp.t</a> <span>&#45;&gt;</span> bool</code></dt><dd><p>Test for existence of an Adangling DAuninit attribute associated to the exp</p></dd></dl><dl><dt class="spec value" id="val-remove"><a href="#val-remove" class="anchor"></a><code><span class="keyword">val</span> remove : <a href="../../IR/Tenv/index.html#type-t">IR.Tenv.t</a> <span>&#45;&gt;</span> <span><a href="../Prop/index.html#type-normal">Prop.normal</a> <a href="../Prop/index.html#type-t">Prop.t</a></span> <span>&#45;&gt;</span> <a href="../Predicates/index.html#type-atom">Predicates.atom</a> <span>&#45;&gt;</span> <span><a href="../Prop/index.html#type-normal">Prop.normal</a> <a href="../Prop/index.html#type-t">Prop.t</a></span></code></dt><dd><p>Remove an attribute</p></dd></dl><dl><dt class="spec value" id="val-remove_for_attr"><a href="#val-remove_for_attr" class="anchor"></a><code><span class="keyword">val</span> remove_for_attr : <a href="../../IR/Tenv/index.html#type-t">IR.Tenv.t</a> <span>&#45;&gt;</span> <span><a href="../Prop/index.html#type-normal">Prop.normal</a> <a href="../Prop/index.html#type-t">Prop.t</a></span> <span>&#45;&gt;</span> <a href="../../IR/PredSymb/index.html#type-t">IR.PredSymb.t</a> <span>&#45;&gt;</span> <span><a href="../Prop/index.html#type-normal">Prop.normal</a> <a href="../Prop/index.html#type-t">Prop.t</a></span></code></dt><dd><p>Remove all attributes for the given attr</p></dd></dl><dl><dt class="spec value" id="val-remove_resource"><a href="#val-remove_resource" class="anchor"></a><code><span class="keyword">val</span> remove_resource : <a href="../../IR/Tenv/index.html#type-t">IR.Tenv.t</a> <span>&#45;&gt;</span> <a href="../../IR/PredSymb/index.html#type-res_act_kind">IR.PredSymb.res_act_kind</a> <span>&#45;&gt;</span> <a href="../../IR/PredSymb/index.html#type-resource">IR.PredSymb.resource</a> <span>&#45;&gt;</span> <span><a href="../Prop/index.html#type-normal">Prop.normal</a> <a href="../Prop/index.html#type-t">Prop.t</a></span> <span>&#45;&gt;</span> <span><a href="../Prop/index.html#type-normal">Prop.normal</a> <a href="../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><dt class="spec value" id="val-map_resource"><a href="#val-map_resource" class="anchor"></a><code><span class="keyword">val</span> map_resource : <a href="../../IR/Tenv/index.html#type-t">IR.Tenv.t</a> <span>&#45;&gt;</span> <span><a href="../Prop/index.html#type-normal">Prop.normal</a> <a href="../Prop/index.html#type-t">Prop.t</a></span> <span>&#45;&gt;</span> <span>(<a href="../../IR/Exp/index.html#type-t">IR.Exp.t</a> <span>&#45;&gt;</span> <a href="../../IR/PredSymb/index.html#type-res_action">IR.PredSymb.res_action</a> <span>&#45;&gt;</span> <a href="../../IR/PredSymb/index.html#type-res_action">IR.PredSymb.res_action</a>)</span> <span>&#45;&gt;</span> <span><a href="../Prop/index.html#type-normal">Prop.normal</a> <a href="../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><dt class="spec value" id="val-replace_objc_null"><a href="#val-replace_objc_null" class="anchor"></a><code><span class="keyword">val</span> replace_objc_null : <a href="../../IR/Tenv/index.html#type-t">IR.Tenv.t</a> <span>&#45;&gt;</span> <span><a href="../Prop/index.html#type-normal">Prop.normal</a> <a href="../Prop/index.html#type-t">Prop.t</a></span> <span>&#45;&gt;</span> <a href="../../IR/Exp/index.html#type-t">IR.Exp.t</a> <span>&#45;&gt;</span> <a href="../../IR/Exp/index.html#type-t">IR.Exp.t</a> <span>&#45;&gt;</span> <span><a href="../Prop/index.html#type-normal">Prop.normal</a> <a href="../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><dt class="spec value" id="val-nullify_exp_with_objc_null"><a href="#val-nullify_exp_with_objc_null" class="anchor"></a><code><span class="keyword">val</span> nullify_exp_with_objc_null : <a href="../../IR/Tenv/index.html#type-t">IR.Tenv.t</a> <span>&#45;&gt;</span> <span><a href="../Prop/index.html#type-normal">Prop.normal</a> <a href="../Prop/index.html#type-t">Prop.t</a></span> <span>&#45;&gt;</span> <a href="../../IR/Exp/index.html#type-t">IR.Exp.t</a> <span>&#45;&gt;</span> <span><a href="../Prop/index.html#type-normal">Prop.normal</a> <a href="../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><dt class="spec value" id="val-mark_vars_as_undefined"><a href="#val-mark_vars_as_undefined" class="anchor"></a><code><span class="keyword">val</span> mark_vars_as_undefined : <a href="../../IR/Tenv/index.html#type-t">IR.Tenv.t</a> <span>&#45;&gt;</span> <span><a href="../Prop/index.html#type-normal">Prop.normal</a> <a href="../Prop/index.html#type-t">Prop.t</a></span> <span>&#45;&gt;</span> <span>ret_exp:<a href="../../IR/Exp/index.html#type-t">IR.Exp.t</a></span> <span>&#45;&gt;</span> <span>undefined_actuals_by_ref:<span><a href="../../IR/Exp/index.html#type-t">IR.Exp.t</a> list</span></span> <span>&#45;&gt;</span> <a href="../../IR/Procname/index.html#type-t">IR.Procname.t</a> <span>&#45;&gt;</span> <a href="../../IR/Annot/Item/index.html#type-t">IR.Annot.Item.t</a> <span>&#45;&gt;</span> <a href="../../IBase/Location/index.html#type-t">IBase.Location.t</a> <span>&#45;&gt;</span> <a href="../../IR/PredSymb/index.html#type-path_pos">IR.PredSymb.path_pos</a> <span>&#45;&gt;</span> <span><a href="../Prop/index.html#type-normal">Prop.normal</a> <a href="../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><dt class="spec type" id="type-arith_problem"><a href="#type-arith_problem" class="anchor"></a><code><span class="keyword">type</span> arith_problem</code><code> = </code><table class="variant"><tr id="type-arith_problem.Div0" class="anchored"><td class="def constructor"><a href="#type-arith_problem.Div0" class="anchor"></a><code>| </code><code><span class="constructor">Div0</span> <span class="keyword">of</span> <a href="../../IR/Exp/index.html#type-t">IR.Exp.t</a></code></td></tr><tr id="type-arith_problem.UminusUnsigned" class="anchored"><td class="def constructor"><a href="#type-arith_problem.UminusUnsigned" class="anchor"></a><code>| </code><code><span class="constructor">UminusUnsigned</span> <span class="keyword">of</span> <a href="../../IR/Exp/index.html#type-t">IR.Exp.t</a> * <a href="../../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><dt class="spec value" id="val-find_arithmetic_problem"><a href="#val-find_arithmetic_problem" class="anchor"></a><code><span class="keyword">val</span> find_arithmetic_problem : <a href="../../IR/Tenv/index.html#type-t">IR.Tenv.t</a> <span>&#45;&gt;</span> <a href="../../IR/PredSymb/index.html#type-path_pos">IR.PredSymb.path_pos</a> <span>&#45;&gt;</span> <span><a href="../Prop/index.html#type-normal">Prop.normal</a> <a href="../Prop/index.html#type-t">Prop.t</a></span> <span>&#45;&gt;</span> <a href="../../IR/Exp/index.html#type-t">IR.Exp.t</a> <span>&#45;&gt;</span> <span><a href="index.html#type-arith_problem">arith_problem</a> option</span> * <span><a href="../Prop/index.html#type-normal">Prop.normal</a> <a href="../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><dt class="spec value" id="val-deallocate_stack_vars"><a href="#val-deallocate_stack_vars" class="anchor"></a><code><span class="keyword">val</span> deallocate_stack_vars : <a href="../../IR/Tenv/index.html#type-t">IR.Tenv.t</a> <span>&#45;&gt;</span> <span><a href="../Prop/index.html#type-normal">Prop.normal</a> <a href="../Prop/index.html#type-t">Prop.t</a></span> <span>&#45;&gt;</span> <span><a href="../../IR/Pvar/index.html#type-t">IR.Pvar.t</a> list</span> <span>&#45;&gt;</span> <span><a href="../../IR/Pvar/index.html#type-t">IR.Pvar.t</a> list</span> * <span><a href="../Prop/index.html#type-normal">Prop.normal</a> <a href="../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><dt class="spec value" id="val-find_equal_formal_path"><a href="#val-find_equal_formal_path" class="anchor"></a><code><span class="keyword">val</span> find_equal_formal_path : <a href="../../IR/Tenv/index.html#type-t">IR.Tenv.t</a> <span>&#45;&gt;</span> <a href="../../IR/Exp/index.html#type-t">IR.Exp.t</a> <span>&#45;&gt;</span> <span><span class="type-var">'a</span> <a href="../Prop/index.html#type-t">Prop.t</a></span> <span>&#45;&gt;</span> <span><a href="../../IR/Exp/index.html#type-t">IR.Exp.t</a> option</span></code></dt></dl></div></body></html>