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