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>Binop (infer.IR.Binop)</title><link rel="stylesheet" href="../../../odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 1.5.1"/><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">IR</a> &#x00BB; Binop</nav><h1>Module <code>IR.Binop</code></h1></header><aside><p>The Smallfoot Intermediate Language: Binary Operators</p></aside><dl><dt class="spec type" id="type-t"><a href="#type-t" class="anchor"></a><code><span class="keyword">type</span> t</code><code> = </code><table class="variant"><tr id="type-t.PlusA" class="anchored"><td class="def constructor"><a href="#type-t.PlusA" class="anchor"></a><code>| </code><code><span class="constructor">PlusA</span> <span class="keyword">of</span> <span><a href="../Typ/index.html#type-ikind">Typ.ikind</a> option</span></code></td><td class="doc"><p>arithmetic +</p></td></tr><tr id="type-t.PlusPI" class="anchored"><td class="def constructor"><a href="#type-t.PlusPI" class="anchor"></a><code>| </code><code><span class="constructor">PlusPI</span></code></td><td class="doc"><p>pointer + integer</p></td></tr><tr id="type-t.MinusA" class="anchored"><td class="def constructor"><a href="#type-t.MinusA" class="anchor"></a><code>| </code><code><span class="constructor">MinusA</span> <span class="keyword">of</span> <span><a href="../Typ/index.html#type-ikind">Typ.ikind</a> option</span></code></td><td class="doc"><p>arithmetic -</p></td></tr><tr id="type-t.MinusPI" class="anchored"><td class="def constructor"><a href="#type-t.MinusPI" class="anchor"></a><code>| </code><code><span class="constructor">MinusPI</span></code></td><td class="doc"><p>pointer - integer</p></td></tr><tr id="type-t.MinusPP" class="anchored"><td class="def constructor"><a href="#type-t.MinusPP" class="anchor"></a><code>| </code><code><span class="constructor">MinusPP</span></code></td><td class="doc"><p>pointer - pointer</p></td></tr><tr id="type-t.Mult" class="anchored"><td class="def constructor"><a href="#type-t.Mult" class="anchor"></a><code>| </code><code><span class="constructor">Mult</span> <span class="keyword">of</span> <span><a href="../Typ/index.html#type-ikind">Typ.ikind</a> option</span></code></td><td class="doc"><p>*</p></td></tr><tr id="type-t.Div" class="anchored"><td class="def constructor"><a href="#type-t.Div" class="anchor"></a><code>| </code><code><span class="constructor">Div</span></code></td><td class="doc"><p>/</p></td></tr><tr id="type-t.Mod" class="anchored"><td class="def constructor"><a href="#type-t.Mod" class="anchor"></a><code>| </code><code><span class="constructor">Mod</span></code></td><td class="doc"><p>%</p></td></tr><tr id="type-t.Shiftlt" class="anchored"><td class="def constructor"><a href="#type-t.Shiftlt" class="anchor"></a><code>| </code><code><span class="constructor">Shiftlt</span></code></td><td class="doc"><p>shift left</p></td></tr><tr id="type-t.Shiftrt" class="anchored"><td class="def constructor"><a href="#type-t.Shiftrt" class="anchor"></a><code>| </code><code><span class="constructor">Shiftrt</span></code></td><td class="doc"><p>shift right</p></td></tr><tr id="type-t.Lt" class="anchored"><td class="def constructor"><a href="#type-t.Lt" class="anchor"></a><code>| </code><code><span class="constructor">Lt</span></code></td><td class="doc"><p>&lt; (arithmetic comparison)</p></td></tr><tr id="type-t.Gt" class="anchored"><td class="def constructor"><a href="#type-t.Gt" class="anchor"></a><code>| </code><code><span class="constructor">Gt</span></code></td><td class="doc"><p>&gt; (arithmetic comparison)</p></td></tr><tr id="type-t.Le" class="anchored"><td class="def constructor"><a href="#type-t.Le" class="anchor"></a><code>| </code><code><span class="constructor">Le</span></code></td><td class="doc"><p>&lt;= (arithmetic comparison)</p></td></tr><tr id="type-t.Ge" class="anchored"><td class="def constructor"><a href="#type-t.Ge" class="anchor"></a><code>| </code><code><span class="constructor">Ge</span></code></td><td class="doc"><p>&gt;= (arithmetic comparison)</p></td></tr><tr id="type-t.Eq" class="anchored"><td class="def constructor"><a href="#type-t.Eq" class="anchor"></a><code>| </code><code><span class="constructor">Eq</span></code></td><td class="doc"><p>== (arithmetic comparison)</p></td></tr><tr id="type-t.Ne" class="anchored"><td class="def constructor"><a href="#type-t.Ne" class="anchor"></a><code>| </code><code><span class="constructor">Ne</span></code></td><td class="doc"><p>!= (arithmetic comparison)</p></td></tr><tr id="type-t.BAnd" class="anchored"><td class="def constructor"><a href="#type-t.BAnd" class="anchor"></a><code>| </code><code><span class="constructor">BAnd</span></code></td><td class="doc"><p>bitwise and</p></td></tr><tr id="type-t.BXor" class="anchored"><td class="def constructor"><a href="#type-t.BXor" class="anchor"></a><code>| </code><code><span class="constructor">BXor</span></code></td><td class="doc"><p>exclusive-or</p></td></tr><tr id="type-t.BOr" class="anchored"><td class="def constructor"><a href="#type-t.BOr" class="anchor"></a><code>| </code><code><span class="constructor">BOr</span></code></td><td class="doc"><p>inclusive-or</p></td></tr><tr id="type-t.LAnd" class="anchored"><td class="def constructor"><a href="#type-t.LAnd" class="anchor"></a><code>| </code><code><span class="constructor">LAnd</span></code></td><td class="doc"><p>logical and. Does not always evaluate both operands.</p></td></tr><tr id="type-t.LOr" class="anchored"><td class="def constructor"><a href="#type-t.LOr" class="anchor"></a><code>| </code><code><span class="constructor">LOr</span></code></td><td class="doc"><p>logical or. Does not always evaluate both operands.</p></td></tr></table></dt><dd><p>Binary operations</p></dd></dl><div><div class="spec include"><div class="doc"><dl><dt class="spec value" id="val-compare"><a href="#val-compare" class="anchor"></a><code><span class="keyword">val</span> compare : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> int</code></dt></dl></div></div></div><dl><dt class="spec value" id="val-str"><a href="#val-str" class="anchor"></a><code><span class="keyword">val</span> str : <a href="../../IStdlib/Pp/index.html#type-env">IStdlib.Pp.env</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> string</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="../../IStdlib/index.html#module-IStd">IStdlib.IStd</a>.Formatter.t <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> unit</code></dt><dt class="spec value" id="val-equal"><a href="#val-equal" class="anchor"></a><code><span class="keyword">val</span> equal : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> bool</code></dt><dt class="spec value" id="val-injective"><a href="#val-injective" class="anchor"></a><code><span class="keyword">val</span> injective : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> bool</code></dt><dd><p>This function returns true if the operation is injective wrt. each argument: op(e,-) and op(-, e) is injective for all e. The return value false means &quot;don't know&quot;.</p></dd></dl><dl><dt class="spec value" id="val-is_zero_runit"><a href="#val-is_zero_runit" class="anchor"></a><code><span class="keyword">val</span> is_zero_runit : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> bool</code></dt><dd><p>This function returns true if 0 is the right unit of <code>binop</code>. The return value false means &quot;don't know&quot;.</p></dd></dl><dl><dt class="spec value" id="val-symmetric"><a href="#val-symmetric" class="anchor"></a><code><span class="keyword">val</span> symmetric : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <span><a href="index.html#type-t">t</a> option</span></code></dt><dd><p><code>symmetric bop</code> returns' <code>Some bop'</code> if <code>x bop y</code> if and only if <code>y bop' x</code> for all x, y, or <code>None</code> if no such <code>bop'</code> exists</p></dd></dl><dl><dt class="spec value" id="val-negate"><a href="#val-negate" class="anchor"></a><code><span class="keyword">val</span> negate : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <span><a href="index.html#type-t">t</a> option</span></code></dt><dd><p><code>negate bop</code> returns' <code>Some bop'</code> if <code>not (x bop y)</code> if and only if <code>x bop' y</code> for all x, y, or <code>None</code> if no such <code>bop'</code> exists</p></dd></dl></div></body></html>