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>PulsePathCondition (infer.Pulselib.PulsePathCondition)</title><linkrel="stylesheet"href="../../../odoc.css"/><metacharset="utf-8"/><metaname="generator"content="odoc 1.5.0"/><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">Pulselib</a>» PulsePathCondition</nav><h1>Module <code>Pulselib.PulsePathCondition</code></h1><navclass="toc"><ul><li><ahref="#building-arithmetic-constraints">Building arithmetic constraints</a></li><li><ahref="#operations">Operations</a></li><li><ahref="#queries">Queries</a></li></ul></nav></header><divclass="spec module"id="module-F"><ahref="#module-F"class="anchor"></a><code><spanclass="keyword">module</span> F = Stdlib.Format</code></div><divclass="spec module"id="module-AbstractValue"><ahref="#module-AbstractValue"class="anchor"></a><code><spanclass="keyword">module</span> AbstractValue = <ahref="../index.html#module-PulseAbstractValue">PulseAbstractValue</a></code></div><divclass="spec module"id="module-ValueHistory"><ahref="#module-ValueHistory"class="anchor"></a><code><spanclass="keyword">module</span> ValueHistory = <ahref="../index.html#module-PulseValueHistory">PulseValueHistory</a></code></div><dl><dtclass="spec type"id="type-t"><ahref="#type-t"class="anchor"></a><code><spanclass="keyword">type</span> t</code></dt></dl><dl><dtclass="spec value"id="val-true_"><ahref="#val-true_"class="anchor"></a><code><spanclass="keyword">val</span> true_ : <ahref="index.html#type-t">t</a></code></dt><dtclass="spec value"id="val-pp"><ahref="#val-pp"class="anchor"></a><code><spanclass="keyword">val</span> pp : <ahref="index.html#module-F">F</a>.formatter <span>-></span><ahref="index.html#type-t">t</a><span>-></span> unit</code></dt></dl><section><header><h3id="building-arithmetic-constraints"><ahref="#building-arithmetic-constraints"class="anchor"></a>Building arithmetic constraints</h3></header><dl><dtclass="spec value"id="val-and_nonnegative"><ahref="#val-and_nonnegative"class="anchor"></a><code><spanclass="keyword">val</span> and_nonnegative : <ahref="../PulseAbstractValue/index.html#type-t">AbstractValue.t</a><span>-></span><ahref="index.html#type-t">t</a><span>-></span><ahref="index.html#type-t">t</a></code></dt><dd><p><code>and_nonnegative v phi</code> is <code>phi ∧ v≥0</code></p></dd></dl><dl><dtclass="spec value"id="val-and_positive"><ahref="#val-and_positive"class="anchor"></a><code><spanclass="keyword">val</span> and_positive : <ahref="../PulseAbstractValue/index.html#type-t">AbstractValue.t</a><span>-></span><ahref="index.html#type-t">t</a><span>-></span><ahref="index.html#type-t">t</a></code></dt><dd><p><code>and_positive v phi</code> is <code>phi ∧ v>0</code></p></dd></dl><dl><dtclass="spec value"id="val-and_eq_int"><ahref="#val-and_eq_int"class="anchor"></a><code><spanclass="keyword">val</span> and_eq_int : <ahref="../PulseAbstractValue/index.html#type-t">AbstractValue.t</a><span>-></span><ahref="../../IR/IntLit/index.html#type-t">IR.IntLit.t</a><span>-></span><ahref="index.html#type-t">t</a><span>-></span><ahref="index.html#type-t">t</a></code></dt><dd><p><code>and_eq_int v i phi</code> is <code>phi ∧ v=i</code></p></dd></dl><dl><dtclass="spec value"id="val-simplify"><ahref="#val-simplify"class="anchor"></a><code><spanclass="keyword">val</span> simplify : <span>keep:<ahref="../../Pulselib__PulseAbstractValue/index.html#module-Set">AbstractValue.Set</a>.t</span><span>-></span><ahref="index.html#type-t">t</a><span>-></span><ahref="index.html#type-t">t</a></code></dt><dd><p><code>simplify ~keep phi</code> attempts to get rid of as many variables in <code>fv phi</code> but not in <code>keep</code> as possible</p></dd></dl><dl><dtclass="spec value"id="val-and_callee"><ahref="#val-and_callee"class="anchor"></a><code><spanclass="keyword">val</span> and_callee : <span><span>(<ahref="../PulseAbstractValue/index.html#type-t">AbstractValue.t</a> * <ahref="../PulseValueHistory/index.html#type-t">ValueHistory.t</a>)</span><ahref="../../Pulselib__PulseAbstractValue/index.html#module-Map">AbstractValue.Map</a>.t</span><span>-></span><ahref="index.html#type-t">t</a><span>-></span><span>callee:<ahref="index.html#type-t">t</a></span><span>-></span><span><span>(<ahref="../PulseAbstractValue/index.html#type-t">AbstractValue.t</a> * <ahref="../PulseValueHistory/index.html#type-t">ValueHistory.t</a>)</span><ahref="../../Pulselib__PulseAbstractValue/index.html#module-Map">AbstractValue.Map</a>.t</span> * <ahref="index.html#type-t">t</a></code></dt></dl></section><section><header><h3id="operations"><ahref="#operations"class="anchor"></a>Operations</h3></header><dl><dtclass="spec type"id="type-operand"><ahref="#type-operand"class="anchor"></a><code><spanclass="keyword">type</span> operand</code><code> = </code><tableclass="variant"><trid="type-operand.LiteralOperand"class="anchored"><tdclass="def constructor"><ahref="#type-operand.LiteralOperand"class="anchor"></a><code>| </code><code><spanclass="constructor">LiteralOperand</span><spanclass="keyword">of</span><ahref="../../IR/IntLit/index.html#type-t">IR.IntLit.t</a></code></td></tr><trid="type-operand.AbstractValueOperand"class="anchored"><tdclass="def constructor"><ahref="#type-operand.AbstractValueOperand"class="anchor"></a><code>| </code><code><spanclass="constructor">AbstractValueOperand</span><spanclass="keyword">of</span><ahref="../PulseAbstractValue/index.html#type-t">AbstractValue.t</a></code></td></tr></table></dt></dl><dl><dtclass="spec value"id="val-eval_binop"><ahref="#val-eval_binop"class="anchor"></a><code><spanclass="keyword">val</span> eval_binop : <ahref="../PulseAbstractValue/index.html#type-t">AbstractValue.t</a><span>-></span><ahref="../../IR/Binop/index.html#type-t">IR.Binop.t</a><span>-></span><ahref="index.html#type-operand">operand</a><span>-></span><ahref="index.html#type-operand">operand</a><span>-></span><ahref="index.html#type-t">t</a><span>-></span><ahref="index.html#type-t">t</a></code></dt><dtclass="spec value"id="val-eval_unop"><ahref="#val-eval_unop"class="anchor"></a><code><spanclass="keyword">val</span> eval_unop : <ahref="../PulseAbstractValue/index.html#type-t">AbstractValue.t</a><span>-></span><ahref="../../IR/Unop/index.html#type-t">IR.Unop.t</a><span>-></span><ahref="../PulseAbstractValue/index.html#type-t">AbstractValue.t</a><span>-></span><ahref="index.html#type-t">t</a><span>-></span><ahref="index.html#type-t">t</a></code></dt><dtclass="spec value"id="val-prune_binop"><ahref="#val-prune_binop"class="anchor"></a><code><spanclass="keyword">val</span> prune_binop : <span>negated:bool</span><span>-></span><ahref="../../IR/Binop/index.html#type-t">IR.Binop.t</a><span>-></span><ahref="index.html#type-operand">operand</a><span>-></span><ahref="index.html#type-operand">operand</a><span>-></span><ahref="index.html#type-t">t</a><span>-></span><ahref="index.html#type-t">t</a></code></dt></dl></section><section><header><h3id="queries"><ahref="#queries"class="anchor"></a>Queries</h3></header><dl><dtclass="spec value"id="val-is_known_zero"><ahref="#val-is_known_zero"class="anchor"></a><code><spanclass="keyword">val</span> is_known_zero : <ahref="index.html#type-t">t</a><span>-></span><ahref="../PulseAbstractValue/index.html#type-t">AbstractValue.t</a><span>-></span> bool</code></dt><dd><p><code>is_known_zero phi t</code> returns <code>true</code> if <code>phi |- t = 0</code>, <code>false</code> if we don't know for sure</p></dd></dl><dl><dtclass="spec value"id="val-is_unsat_cheap"><ahref="#val-is_unsat_cheap"class="anchor"></a><code><spanclass="keyword">val</span> is_unsat_cheap : <ahref="index.html#type-t">t</a><span>-></span> bool</code></dt><dd><p>whether the state contains a contradiction, call this as often as you want</p></dd></dl><dl><dtclass="spec value"id="val-is_unsat_expensive"><ahref="#val-is_unsat_expensive"class="anchor"></a><code><spanclass="keyword">val</span> is_unsat_expensive : <ahref="index.html#type-t">t</a><span>-></span> bool</code></dt><dd><p>whether the state contains a contradiction, only call this when you absolutely have to</p></dd></dl></section></div></body></html>