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
8.7 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>Pulselib__PulsePathCondition (infer.Pulselib__PulsePathCondition)</title><link rel="stylesheet" href="../../odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 1.5.0"/><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; Pulselib__PulsePathCondition</nav><h1>Module <code>Pulselib__PulsePathCondition</code></h1><nav class="toc"><ul><li><a href="#building-arithmetic-constraints">Building arithmetic constraints</a></li><li><a href="#operations">Operations</a></li><li><a href="#queries">Queries</a></li></ul></nav></header><div class="spec module" id="module-F"><a href="#module-F" class="anchor"></a><code><span class="keyword">module</span> F = Stdlib.Format</code></div><div class="spec module" id="module-AbstractValue"><a href="#module-AbstractValue" class="anchor"></a><code><span class="keyword">module</span> AbstractValue = <a href="../Pulselib/index.html#module-PulseAbstractValue">Pulselib.PulseAbstractValue</a></code></div><div class="spec module" id="module-ValueHistory"><a href="#module-ValueHistory" class="anchor"></a><code><span class="keyword">module</span> ValueHistory = <a href="../Pulselib/index.html#module-PulseValueHistory">Pulselib.PulseValueHistory</a></code></div><dl><dt class="spec type" id="type-t"><a href="#type-t" class="anchor"></a><code><span class="keyword">type</span> t</code></dt></dl><dl><dt class="spec value" id="val-true_"><a href="#val-true_" class="anchor"></a><code><span class="keyword">val</span> true_ : <a href="index.html#type-t">t</a></code></dt><dt class="spec value" id="val-pp"><a href="#val-pp" class="anchor"></a><code><span class="keyword">val</span> pp : <a href="index.html#module-F">F</a>.formatter <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> unit</code></dt></dl><section><header><h3 id="building-arithmetic-constraints"><a href="#building-arithmetic-constraints" class="anchor"></a>Building arithmetic constraints</h3></header><dl><dt class="spec value" id="val-and_nonnegative"><a href="#val-and_nonnegative" class="anchor"></a><code><span class="keyword">val</span> and_nonnegative : <a href="../Pulselib/PulseAbstractValue/index.html#type-t">AbstractValue.t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="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><dt class="spec value" id="val-and_positive"><a href="#val-and_positive" class="anchor"></a><code><span class="keyword">val</span> and_positive : <a href="../Pulselib/PulseAbstractValue/index.html#type-t">AbstractValue.t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a></code></dt><dd><p><code>and_positive v phi</code> is <code>phi ∧ v&gt;0</code></p></dd></dl><dl><dt class="spec value" id="val-and_eq_int"><a href="#val-and_eq_int" class="anchor"></a><code><span class="keyword">val</span> and_eq_int : <a href="../Pulselib/PulseAbstractValue/index.html#type-t">AbstractValue.t</a> <span>&#45;&gt;</span> <a href="../IR/IntLit/index.html#type-t">IR.IntLit.t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="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><dt class="spec value" id="val-simplify"><a href="#val-simplify" class="anchor"></a><code><span class="keyword">val</span> simplify : <span>keep:<a href="../Pulselib__PulseAbstractValue/index.html#module-Set">AbstractValue.Set</a>.t</span> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="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><dt class="spec value" id="val-and_callee"><a href="#val-and_callee" class="anchor"></a><code><span class="keyword">val</span> and_callee : <span><span>(<a href="../Pulselib/PulseAbstractValue/index.html#type-t">AbstractValue.t</a> * <a href="../Pulselib/PulseValueHistory/index.html#type-t">ValueHistory.t</a>)</span> <a href="../Pulselib__PulseAbstractValue/index.html#module-Map">AbstractValue.Map</a>.t</span> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <span>callee:<a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<a href="../Pulselib/PulseAbstractValue/index.html#type-t">AbstractValue.t</a> * <a href="../Pulselib/PulseValueHistory/index.html#type-t">ValueHistory.t</a>)</span> <a href="../Pulselib__PulseAbstractValue/index.html#module-Map">AbstractValue.Map</a>.t</span> * <a href="index.html#type-t">t</a></code></dt></dl></section><section><header><h3 id="operations"><a href="#operations" class="anchor"></a>Operations</h3></header><dl><dt class="spec type" id="type-operand"><a href="#type-operand" class="anchor"></a><code><span class="keyword">type</span> operand</code><code> = </code><table class="variant"><tr id="type-operand.LiteralOperand" class="anchored"><td class="def constructor"><a href="#type-operand.LiteralOperand" class="anchor"></a><code>| </code><code><span class="constructor">LiteralOperand</span> <span class="keyword">of</span> <a href="../IR/IntLit/index.html#type-t">IR.IntLit.t</a></code></td></tr><tr id="type-operand.AbstractValueOperand" class="anchored"><td class="def constructor"><a href="#type-operand.AbstractValueOperand" class="anchor"></a><code>| </code><code><span class="constructor">AbstractValueOperand</span> <span class="keyword">of</span> <a href="../Pulselib/PulseAbstractValue/index.html#type-t">AbstractValue.t</a></code></td></tr></table></dt></dl><dl><dt class="spec value" id="val-eval_binop"><a href="#val-eval_binop" class="anchor"></a><code><span class="keyword">val</span> eval_binop : <a href="../Pulselib/PulseAbstractValue/index.html#type-t">AbstractValue.t</a> <span>&#45;&gt;</span> <a href="../IR/Binop/index.html#type-t">IR.Binop.t</a> <span>&#45;&gt;</span> <a href="index.html#type-operand">operand</a> <span>&#45;&gt;</span> <a href="index.html#type-operand">operand</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a></code></dt><dt class="spec value" id="val-eval_unop"><a href="#val-eval_unop" class="anchor"></a><code><span class="keyword">val</span> eval_unop : <a href="../Pulselib/PulseAbstractValue/index.html#type-t">AbstractValue.t</a> <span>&#45;&gt;</span> <a href="../IR/Unop/index.html#type-t">IR.Unop.t</a> <span>&#45;&gt;</span> <a href="../Pulselib/PulseAbstractValue/index.html#type-t">AbstractValue.t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a></code></dt><dt class="spec value" id="val-prune_binop"><a href="#val-prune_binop" class="anchor"></a><code><span class="keyword">val</span> prune_binop : <span>negated:bool</span> <span>&#45;&gt;</span> <a href="../IR/Binop/index.html#type-t">IR.Binop.t</a> <span>&#45;&gt;</span> <a href="index.html#type-operand">operand</a> <span>&#45;&gt;</span> <a href="index.html#type-operand">operand</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a></code></dt></dl></section><section><header><h3 id="queries"><a href="#queries" class="anchor"></a>Queries</h3></header><dl><dt class="spec value" id="val-is_known_zero"><a href="#val-is_known_zero" class="anchor"></a><code><span class="keyword">val</span> is_known_zero : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="../Pulselib/PulseAbstractValue/index.html#type-t">AbstractValue.t</a> <span>&#45;&gt;</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><dt class="spec value" id="val-is_unsat_cheap"><a href="#val-is_unsat_cheap" class="anchor"></a><code><span class="keyword">val</span> is_unsat_cheap : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> bool</code></dt><dd><p>whether the state contains a contradiction, call this as often as you want</p></dd></dl><dl><dt class="spec value" id="val-is_unsat_expensive"><a href="#val-is_unsat_expensive" class="anchor"></a><code><span class="keyword">val</span> is_unsat_expensive : <a href="index.html#type-t">t</a> <span>&#45;&gt;</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>