This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden 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>
<htmlxmlns="http://www.w3.org/1999/xhtml"><head><title>AbstractDomain (infer.Absint.AbstractDomain)</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">Absint</a>» AbstractDomain</nav><h1>Module <code>Absint.AbstractDomain</code></h1><navclass="toc"><ul><li><ahref="#abstract-domains-and-domain-combinators">Abstract domains and domain combinators</a></li></ul></nav></header><section><header><h2id="abstract-domains-and-domain-combinators"><ahref="#abstract-domains-and-domain-combinators"class="anchor"></a>Abstract domains and domain combinators</h2></header><divclass="spec module"id="module-Types"><ahref="#module-Types"class="anchor"></a><code><spanclass="keyword">module</span><ahref="Types/index.html">Types</a> : <spanclass="keyword">sig</span> ... <spanclass="keyword">end</span></code></div><divclass="spec module-type"id="module-type-NoJoin"><ahref="#module-type-NoJoin"class="anchor"></a><code><spanclass="keyword">module</span><spanclass="keyword">type</span><ahref="module-type-NoJoin/index.html">NoJoin</a> = <spanclass="keyword">sig</span> ... <spanclass="keyword">end</span></code></div><divclass="spec module-type"id="module-type-S"><ahref="#module-type-S"class="anchor"></a><code><spanclass="keyword">module</span><spanclass="keyword">type</span><ahref="module-type-S/index.html">S</a> = <spanclass="keyword">sig</span> ... <spanclass="keyword">end</span></code></div><div><divclass="spec include"><divclass="doc"><detailsopen="open"><summary><spanclass="def"><code><spanclass="keyword">include</span><spanclass="keyword">sig</span> ... <spanclass="keyword">end</span></code></span></summary><dl><dtclass="spec module"id="module-Empty"><ahref="#module-Empty"class="anchor"></a><code><spanclass="keyword">module</span><ahref="Empty/index.html">Empty</a> : <ahref="index.html#module-type-S">S</a><spanclass="keyword">with</span><spanclass="keyword">type</span><ahref="module-type-S/index.html#type-t">t</a> = unit</code></dt><dd><p>a trivial domain</p></dd></dl></details></div></div></div><dl><dtclass="spec module-type"id="module-type-WithBottom"><ahref="#module-type-WithBottom"class="anchor"></a><code><spanclass="keyword">module</span><spanclass="keyword">type</span><ahref="module-type-WithBottom/index.html">WithBottom</a> = <spanclass="keyword">sig</span> ... <spanclass="keyword">end</span></code></dt><dd><p>A domain with an explicit bottom value</p></dd></dl><dl><dtclass="spec module-type"id="module-type-WithTop"><ahref="#module-type-WithTop"class="anchor"></a><code><spanclass="keyword">module</span><spanclass="keyword">type</span><ahref="module-type-WithTop/index.html">WithTop</a> = <spanclass="keyword">sig</span> ... <spanclass="keyword">end</span></code></dt><dd><p>A domain with an explicit top value</p></dd></dl><dl><dtclass="spec module"id="module-BottomLifted"><ahref="#module-BottomLifted"class="anchor"></a><code><spanclass="keyword">module</span><ahref="BottomLifted/index.html">BottomLifted</a> : <spanclass="keyword">functor</span> (<ahref="BottomLifted/argument-1-Domain/index.html">Domain</a> : <ahref="index.html#module-type-S">S</a>) <span>-></span><spanclass="keyword">sig</span> ... <spanclass="keyword">end</span></code></dt><dd><p>Create a domain with Bottom element from a pre-domain</p></dd></dl><divclass="spec module"id="module-BottomLiftedUtils"><ahref="#module-BottomLiftedUtils"class="anchor"></a><code><spanclass="keyword">module</span><ahref="BottomLiftedUtils/index.html">BottomLiftedUtils</a> : <spanclass="keyword">sig</span> ... <spanclass="keyword">end</span></code></div><dl><dtclass="spec module"id="module-TopLifted"><ahref="#module-TopLifted"class="anchor"></a><code><spanclass="keyword">module</span><ahref="TopLifted/index.html">TopLifted</a> : <spanclass="keyword">functor</span> (<ahref="TopLifted/argument-1-Domain/index.html">Domain</a> : <ahref="index.html#module-type-S">S</a>) <span>-></span><ahref="index.html#module-type-WithTop">WithTop</a><spanclass="keyword">with</span><spanclass="keyword">type</span><ahref="TopLifted/index.html#type-t">t</a> = <span><ahref="TopLifted/argument-1-Domain/index.html#type-t">Domain.t</a><ahref="Types/index.html#type-top_lifted">Types.top_lifted</a></span></code></dt><dd><p>Create a domain with Top element from a pre-domain</p></dd></dl><divclass="spec module"id="module-TopLiftedUtils"><ahref="#module-TopLiftedUtils"class="anchor"></a><code><spanclass="keyword">module</span><ahref="TopLiftedUtils/index.html">TopLiftedUtils</a> : <spanclass="keyword">sig</span> ... <spanclass="keyword">end</span></code></div><dl><dtclass="spec module"id="module-Pair"><ahref="#module-Pair"class="anchor"></a><code><spanclass="keyword">module</span><ahref="Pair/index.html">Pair</a> : <spanclass="keyword">functor</span> (<ahref="Pair/argument-1-Domain1/index.html">Domain1</a> : <ahref="index.html#module-type-S">S</a>) <span>-></span><spanclass="keyword">functor</span> (<ahref="Pair/argument-2-Domain2/index.html">Domain2</a> : <ahref="index.html#module-type-S">S</a>) <span>-></span><ahref="index.html#module-type-S">S</a><spanclass="keyword">with</span><spanclass="keyword">type</span><ahref="Pair/index.html#type-t">t</a> = <ahref="Pair/argument-1-Domain1/index.html#type-t">Domain1.t</a> * <ahref="Pair/argument-2-Domain2/index.html#type-t">Domain2.t</a></code></dt><dd><p>Cartesian product of two domains.</p></dd></dl><dl><dtclass="spec module"id="module-Flat"><ahref="#module-Flat"class="anchor"></a><code><spanclass="keyword">module</span><ahref="Flat/index.html">Flat</a> : <spanclass="keyword">functor</span> (<ahref="Flat/argument-1-V/index.html">V</a> : <ahref="../../IStdlib/PrettyPrintable/index.html#module-type-PrintableEquatableType">IStdlib.PrettyPrintable.PrintableEquatableType</a>) <span>-></span><spanclass="keyword">sig</span> ... <spanclass="keyword">end</span></code></dt><dd><p>Flat abstract domain: Bottom, Top, and non-comparable elements in between</p></dd></dl><div><divclass="spec include"><divclass="doc"><detailsopen="open"><summary><spanclass="def"><code><spanclass="keyword">include</span><spanclass="keyword">sig</span> ... <spanclass="keyword">end</span></code></span></summary><dl><dtclass="spec module"id="module-Stacked"><ahref="#module-Stacked"class="anchor"></a><code><spanclass="keyword">module</span><ahref="Stacked/index.html">Stacked</a> : <spanclass="keyword">functor</span> (<ahref="Stacked/argument-1-Below/index.html">Below</a> : <ahref="index.html#module-type-S">S</a>) <span>-></span><spanclass="keyword">functor</span> (<ahref="Stacked/argument-2-Val/index.html">Val</a> : <ahref="index.html#module-type-S">S</a>) <span>-></span><spanclass="keyword">functor</span> (<ahref="Stacked/argument-3-Above/index.html">Above</a> : <ahref="index.html#module-type-S">S</a>) <span>-></span><ahref="index.html#module-type-S">S</a><spanclass="keyword">with</span><spanclass="keyword">type</span><ahref="Stacked/index.html#type-t">t</a> = <span><span>(<ahref="Stacked/argument-1-Below/index.html#type-t">Below.t</a>,<ahref="Stacked/argument-2-Val/index.html#type-t">Val.t</a>,<ahref="Stacked/argument-3-Above/index.html#type-t">Above.t</a>)</span><ahref="Types/index.html#type-below_above">Types.below_above</a></span></code></dt><dd><p>Stacked abstract domain: tagged union of <code>Below</code>, <code>Val</code>, and <code>Above</code> domains where all elements of <code>Below</code> are strictly smaller than all elements of <code>Val</code> which are strictly smaller than all elements of <code>Above</code></p></dd></dl></details></div></div></div><divclass="spec module"id="module-StackedUtils"><ahref="#module-StackedUtils"class="anchor"></a><code><spanclass="keyword">module</span><ahref="StackedUtils/index.html">StackedUtils</a> : <spanclass="keyword">sig</span> ... <spanclass="keyword">end</span></code></div><dl><dtclass="spec module"id="module-MinReprSet"><ahref="#module-MinReprSet"class="anchor"></a><code><spanclass="keyword">module</span><ahref="MinReprSet/index.html">MinReprSet</a> : <spanclass="keyword">functor</span> (<ahref="MinReprSet/argument-1-Element/index.html">Element</a> : <ahref="../../IStdlib/PrettyPrintable/index.html#module-type-PrintableOrderedType">IStdlib.PrettyPrintable.PrintableOrderedType</a>) <span>-></span><spanclass="keyword">sig</span> ... <spanclass="keyword">end</span></code></dt><dd><p>Abstracts a set of <code>Element</code>s by keeping its smallest representative only. The widening is terminating only if the order fulfills the descending chain condition.</p></dd></dl><divclass="spec module-type"id="module-type-FiniteSetS"><ahref="#module-type-FiniteSetS"class="anchor"></a><code><spanclass="keyword">module</span><spanclass="keyword">type</span><ahref="module-type-FiniteSetS/index.html">FiniteSetS</a> = <spanclass="keyword">sig</span> ... <spanclass="keyword">end</span></code></div><div><divclass="spec include"><divclass="doc"><detailsopen="open"><summary><spanclass="def"><code><spanclass="keyword">include</span><spanclass="keyword">sig</span> ... <spanclass="keyword">end</span></code></span></summary><dl><dtclass="spec module"id="module-FiniteSetOfPPSet"><ahref="#module-FiniteSetOfPPSet"class="anchor"></a><code><spanclass="keyword">module</span> FiniteSetOfPPSet : <spanclass="keyword">functor</span> (<ahref="FiniteSetOfPPSet/argument-1-PPSet/index.html">PPSet</a> : <ahref="../../IStdlib/PrettyPrintable/index.html#module-type-PPSet">IStdlib.PrettyPrintable.PPSet</a>) <span>-></span><ahref="index.html#module-type-FiniteSetS">FiniteSetS</a><spanclass="keyword">with</span><spanclass="keyword">type</span><ahref="index.html#module-FiniteSetOfPPSet">FiniteSetOfPPSet</a>.elt = <ahref="FiniteSetOfPPSet/index.html#argument-1-PPSet">PPSet</a>.elt</code></dt><dd><p>Lift a PPSet to a powerset domain ordered by subset. The elements of the set should be drawn from a *finite* collection of possible values, since the widening operator here is just union.</p></dd></dl></details></div></div></div><dl><dtclass="spec module"id="module-FiniteSet"><ahref="#module-FiniteSet"class="anchor"></a><code><spanclass="keyword">module</span> FiniteSet : <spanclass="keyword">functor</span> (<ahref="FiniteSet/argument-1-Element/index.html">Element</a> : <ahref="../../IStdlib/PrettyPrintable/index.html#module-type-PrintableOrderedType">IStdlib.PrettyPrintable.PrintableOrderedType</a>) <span>-></span><ahref="index.html#module-type-FiniteSetS">FiniteSetS</a><spanclass="keyword">with</span><spanclass="keyword">type</span><ahref="index.html#module-FiniteSet">FiniteSet</a>.elt = <ahref="FiniteSet/index.html#argument-1-Element">Element</a>.t</code></dt><dd><p>Lift a set to a powerset domain ordered by subset. The elements of the set should be drawn from a *finite* collection of possible values, since the widening operator here is just union.</p></dd></dl><divclass="spec module-type"id="module-type-InvertedSetS"><ahref="#module-type-InvertedSetS"class="anchor"></a><code><spanclass="keyword">module</span><spanclass="keyword">type</span><ahref="module-type-InvertedSetS/index.html">InvertedSetS</a> = <spanclass="keyword">sig</span> ... <spanclass="keyword">end</span></code></div><dl><dtclass="spec module"id="module-InvertedSet"><ahref="#module-InvertedSet"class="anchor"></a><code><spanclass="keyword">module</span> InvertedSet : <spanclass="keyword">functor</span> (<ahref="InvertedSet/argument-1-Element/index.html">Element</a> : <ahref="../../IStdlib/PrettyPrintable/index.html#module-type-PrintableOrderedType">IStdlib.PrettyPrintable.PrintableOrderedType</a>) <span>-></span><ahref="index.html#module-type-InvertedSetS">InvertedSetS</a><spanclass="keyword">with</span><spanclass="keyword">type</span><ahref="index.html#module-InvertedSet">InvertedSet</a>.elt = <ahref="InvertedSet/index.html#argument-1-Element">Element</a>.t</code></dt><dd><p>Lift a set to a powerset domain ordered by superset, so the join operator is intersection</p></dd></dl><divclass="spec module-type"id="module-type-MapS"><ahref="#module-type-MapS"class="anchor"></a><code><spanclass="keyword">module</span><spanclass="keyword">type</span><ahref="module-type-MapS/index.html">MapS</a> = <spanclass="keyword">sig</span> ... <spanclass="keyword">end</span></code></div><div><divclass="spec include"><divclass="doc"><detailsopen="open"><summary><spanclass="def"><code><spanclass="keyword">include</span><spanclass="keyword">sig</span> ... <spanclass="keyword">end</span></code></span></summary><dl><dtclass="spec module"id="module-MapOfPPMap"><ahref="#module-MapOfPPMap"class="anchor"></a><code><spanclass="keyword">module</span><ahref="MapOfPPMap/index.html">MapOfPPMap</a> : <spanclass="keyword">functor</span> (<ahref="MapOfPPMap/argument-1-PPMap/index.html">PPMap</a> : <ahref="../../IStdlib/PrettyPrintable/index.html#module-type-PPMap">IStdlib.PrettyPrintable.PPMap</a>) <span>-></span><spanclass="keyword">functor</span> (<ahref="MapOfPPMap/argument-2-ValueDomain/index.html">ValueDomain</a> : <ahref="index.html#module-type-S">S</a>) <span>-></span><ahref="index.html#module-type-MapS">MapS</a><spanclass="keyword">with</span><spanclass="keyword">type</span><ahref="MapOfPPMap/index.html#type-key">key</a> = <ahref="MapOfPPMap/index.html#argument-1-PPMap">PPMap</a>.key <spanclass="keyword">and</span><spanclass="keyword">type</span><ahref="MapOfPPMap/index.html#type-value">value</a> = <ahref="MapOfPPMap/argument-2-ValueDomain/index.html#type-t">ValueDomain.t</a><spanclass="keyword">and</span><spanclass="keyword">type</span><ahref="MapOfPPMap/index.html#type-t">t</a> = <span><ahref="MapOfPPMap/argument-2-ValueDomain/index.html#type-t">ValueDomain.t</a><ahref="MapOfPPMap/index.html#argument-1-PPMap">PPMap</a>.t</span></code></dt><dd><p>Map domain ordered by union over the set of bindings, so the bottom element is the empty map. Every element implicitly maps to bottom unless it is explicitly bound to something else. Uses PPMap as the underlying map</p></dd></dl></details></div></div></div><dl><dtclass="spec module"id="module-Map"><ahref="#module-Map"class="anchor"></a><code><spanclass="keyword">module</span><ahref="Map/index.html">Map</a> : <spanclass="keyword">functor</span> (<ahref="Map/argument-1-Key/index.html">Key</a> : <ahref="../../IStdlib/PrettyPrintable/index.html#module-type-PrintableOrderedType">IStdlib.PrettyPrintable.PrintableOrderedType</a>) <span>-></span><spanclass="keyword">functor</span> (<ahref="Map/argument-2-ValueDomain/index.html">ValueDomain</a> : <ahref="index.html#module-type-S">S</a>) <span>-></span><ahref="index.html#module-type-MapS">MapS</a><spanclass="keyword">with</span><spanclass="keyword">type</span><ahref="Map/index.html#type-key">key</a> = <ahref="Map/index.html#argument-1-Key">Key</a>.t <spanclass="keyword">and</span><spanclass="keyword">type</span><ahref="Map/index.html#type-value">value</a> = <ahref="Map/argument-2-ValueDomain/index.html#type-t">ValueDomain.t</a></code></dt><dd><p>Map domain ordered by union over the set of bindings, so the bottom element is the empty map. Every element implicitly maps to bottom unless it is explicitly bound to something else</p></dd></dl><divclass="spec module-type"id="module-type-InvertedMapS"><ahref="#module-type-InvertedMapS"class="anchor"></a><code><spanclass="keyword">module</span><spanclass="keyword">type</span><ahref="module-type-InvertedMapS/index.html">InvertedMapS</a> = <spanclass="keyword">sig</span> ... <spanclass="keyword">end</span></code></div><dl><dtclass="spec module"id="module-InvertedMap"><ahref="#module-InvertedMap"class="anchor"></a><code><spanclass="keyword">module</span><ahref="InvertedMap/index.html">InvertedMap</a> : <spanclass="keyword">functor</span> (<ahref="InvertedMap/argument-1-Key/index.html">Key</a> : <ahref="../../IStdlib/PrettyPrintable/index.html#module-type-PrintableOrderedType">IStdlib.PrettyPrintable.PrintableOrderedType</a>) <span>-></span><spanclass="keyword">functor</span> (<ahref="InvertedMap/argument-2-ValueDomain/index.html">ValueDomain</a> : <ahref="index.html#module-type-S">S</a>) <span>-></span><ahref="index.html#module-type-InvertedMapS">InvertedMapS</a><spanclass="keyword">with</span><spanclass="keyword">type</span><ahref="InvertedMap/index.html#type-key">key</a> = <ahref="InvertedMap/index.html#argument-1-Key">Key</a>.t <spanclass="keyword">and</span><spanclass="keyword">type</span><ahref="InvertedMap/index.html#type-value">value</a> = <ahref="InvertedMap/argument-2-ValueDomain/index.html#type-t">ValueDomain.t</a></code></dt><dd><p>Map domain ordered by intersection over the set of bindings, so the top element is the empty map. Every element implictly maps to top unless it is explicitly bound to something else</p></dd></dl><dl><dtclass="spec module"id="module-SafeInvertedMap"><ahref="#module-SafeInvertedMap"class="anchor"></a><code><spanclass="keyword">module</span><ahref="SafeInvertedMap/index.html">SafeInvertedMap</a> : <spanclass="keyword">functor</span> (<ahref="SafeInvertedMap/argument-1-Key/index.html">Key</a> : <ahref="../../IStdlib/PrettyPrintable/index.html#module-type-PrintableOrderedType">IStdlib.PrettyPrintable.PrintableOrderedType</a>) <span>-></span><spanclass="keyword">functor</span> (<ahref="SafeInvertedMap/argument-2-ValueDomain/index.html">ValueDomain</a> : <ahref="index.html#module-type-WithTop">WithTop</a>) <span>-></span><ahref="index.html#module-type-InvertedMapS">InvertedMapS</a><spanclass="keyword">with</span><spanclass="keyword">type</span><ahref="SafeInvertedMap/index.html#type-key">key</a> = <ahref="SafeInvertedMap/index.html#argument-1-Key">Key</a>.t <spanclass="keyword">and</span><spanclass="keyword">type</span><ahref="SafeInvertedMap/index.html#type-value">value</a> = <ahref="SafeInvertedMap/argument-2-ValueDomain/index.html#type-t">ValueDomain.t</a></code></dt><dd><p>Similar to <code>InvertedMap</code> but it guarantees that it has a canonical form. For example, both <code>{a -> top_v}</code> and <code>empty</code> represent the same abstract value <code>top</code> in <code>InvertedMap</code>, but in this implementation, <code>top</code> is always implemented as <code>empty</code> by not adding the <code>top_v</code> explicitly.</p></dd></dl><div><divclass="spec include"><divclass="doc"><detailsopen="open"><summary><spanclass="def"><code><spanclass="keyword">include</span><spanclass="keyword">sig</span> ... <spanclass="keyword">end</span></code></span></summary><divclass="spec module"id="module-FiniteMultiMap"><ahref="#module-FiniteMultiMap"class="anchor"></a><code><spanclass="keyword">module</span><ahref="FiniteMultiMap/index.html">FiniteMultiMap</a> : <spanclass="keyword">functor</span> (<ahref="FiniteMultiMap/argument-1-Key/index.html">Key</a> : <ahref="../../IStdlib/PrettyPrintable/index.html#module-type-PrintableOrderedType">IStdlib.PrettyPrintable.PrintableOrderedType</a>) <span>-></span><spanclass="keyword">functor</span> (<ahref="FiniteMultiMap/argument-2-Value/index.html">Value</a> : <ahref="../../IStdlib/PrettyPrintable/index.html#module-type-PrintableOrderedType">IStdlib.PrettyPrintable.PrintableOrderedType</a>) <span>-></span><spanclass="keyword">sig</span> ... <spanclass="keyword">end</span></code></div></details></div></div></div><dl><dtclass="spec module"id="module-BooleanAnd"><ahref="#module-BooleanAnd"class="anchor"></a><code><spanclass="keyword">module</span><ahref="BooleanAnd/index.html">BooleanAnd</a> : <ahref="index.html#module-type-S">S</a><spanclass="keyword">with</span><spanclass="keyword">type</span><ahref="module-type-S/index.html#type-t">t</a> = bool</code></dt><dd><p>Boolean domain ordered by p || ~q. Useful when you want a boolean that's true only when it's true in both conditional branches.</p></dd></dl><dl><dtclass="spec module"id="module-BooleanOr"><ahref="#module-BooleanOr"class="anchor"></a><code><spanclass="keyword">module</span><ahref="BooleanOr/index.html">BooleanOr</a> : <ahref="index.html#module-type-WithBottom">WithBottom</a><spanclass="keyword">with</span><spanclass="keyword">type</span><ahref="module-type-WithBottom/index.html#type-t">t</a> = bool</code></dt><dd><p>Boolean domain ordered by ~p || q. Useful when you want a boolean that's true only when it's true in one conditional branch.</p></dd></dl><divclass="spec module-type"id="module-type-MaxCount"><ahref="#module-type-MaxCount"class="anchor"></a><code><spanclass="keyword">module</span><spanclass="keyword">type</span><ahref="module-type-MaxCount/index.html">MaxCount</a> = <spanclass="keyword">sig</span> ... <spanclass="keyword">end</span></code></div><dl><dtclass="spec module"id="module-CountDomain"><ahref="#module-CountDomain"class="anchor"></a><code><spanclass="keyword">module</span><ahref="CountDomain/index.html">CountDomain</a> : <spanclass="keyword">functor</span> (<ahref="CountDomain/argument-1-MaxCount/index.html">MaxCount</a> : <ahref="index.html#module-type-MaxCount">MaxCount</a>) <span>-></span><spanclass="keyword">sig</span> ... <spanclass="keyword">end</span></code></dt><dd><p>Domain keeping a non-negative count with a bounded maximum value. The count can be only incremented and decremented.</p></dd></dl><dl><dtclass="spec module"id="module-DownwardIntDomain"><ahref="#module-DownwardIntDomain"class="anchor"></a><code><spanclass="keyword">module</span><ahref="DownwardIntDomain/index.html">DownwardIntDomain</a> : <spanclass="keyword">functor</span> (<ahref="DownwardIntDomain/argument-1-MaxCount/index.html">MaxCount</a> : <ahref="index.html#module-type-MaxCount">MaxCount</a>) <span>-></span><spanclass="keyword">sig</span> ... <spanclass="keyword">end</span></code></dt><dd><p>Domain keeping a non-negative count with a bounded maximum value. <code>join</code> is minimum and <code>top</code> is zero.</p></dd></dl></section></div></body></html>