sidekick/dev/sidekick/Sidekick_cc/Plugin/Make/argument-1-M/index.html
2023-02-24 02:08:35 +00:00

15 lines
No EOL
5.7 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>M (sidekick.Sidekick_cc.Plugin.Make.M)</title><link rel="stylesheet" href="../../../../../_odoc_support/odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 2.2.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../../_odoc_support/highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> <a href="../../../../index.html">sidekick</a> &#x00BB; <a href="../../../index.html">Sidekick_cc</a> &#x00BB; <a href="../../index.html">Plugin</a> &#x00BB; <a href="../index.html">Make</a> &#x00BB; M</nav><header class="odoc-preamble"><h1>Parameter <code><span>Make.M</span></code></h1></header><div class="odoc-content"><div class="odoc-spec"><div class="spec type anchored" id="type-t"><a href="#type-t" class="anchor"></a><code><span><span class="keyword">type</span> t</span></code></div><div class="spec-doc"><p>Some type with a monoid structure</p></div></div><div class="odoc-include"><details open="open"><summary class="spec include"><code><span><span class="keyword">include</span> <a href="../../../../Sidekick_sigs/module-type-PRINT/index.html">Sidekick_sigs.PRINT</a> <span class="keyword">with</span> <span><span class="keyword">type</span> <a href="../../../../Sidekick_sigs/module-type-PRINT/index.html#type-t">t</a> := <a href="#type-t">t</a></span></span></code></summary><div class="odoc-spec"><div class="spec value anchored" id="val-pp"><a href="#val-pp" class="anchor"></a><code><span><span class="keyword">val</span> pp : <span><a href="#type-t">t</a> <a href="../../../../Sidekick_sigs/index.html#type-printer">Sidekick_sigs.printer</a></span></span></code></div></div></details></div><div class="odoc-spec"><div class="spec type anchored" id="type-state"><a href="#type-state" class="anchor"></a><code><span><span class="keyword">type</span> state</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-create"><a href="#val-create" class="anchor"></a><code><span><span class="keyword">val</span> create : <span><a href="../../../CC/index.html#type-t">CC.t</a> <span class="arrow">&#45;&gt;</span></span> <a href="#type-state">state</a></span></code></div><div class="spec-doc"><p>Initialize state from the congruence closure</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-name"><a href="#val-name" class="anchor"></a><code><span><span class="keyword">val</span> name : string</span></code></div><div class="spec-doc"><p>name of the monoid structure (short)</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-of_term"><a href="#val-of_term" class="anchor"></a><code><span><span class="keyword">val</span> of_term :
<span><a href="../../../CC/index.html#type-t">CC.t</a> <span class="arrow">&#45;&gt;</span></span>
<span><a href="#type-state">state</a> <span class="arrow">&#45;&gt;</span></span>
<span><a href="../../../E_node/index.html#type-t">E_node.t</a> <span class="arrow">&#45;&gt;</span></span>
<span><a href="../../../../Sidekick_core/Term/index.html#type-t">Sidekick_core.Term.t</a> <span class="arrow">&#45;&gt;</span></span>
<span><a href="#type-t">t</a> option</span> * <span><span>(<a href="../../../E_node/index.html#type-t">E_node.t</a> * <a href="#type-t">t</a>)</span> list</span></span></code></div><div class="spec-doc"><p><code>of_term n t</code>, where <code>t</code> is the Term.t annotating node <code>n</code>, must return <code>maybe_m, l</code>, where:</p><ul><li><code>maybe_m = Some m</code> if <code>t</code> has monoid value <code>m</code>; otherwise <code>maybe_m=None</code></li><li><code>l</code> is a list of <code>(u, m_u)</code> where each <code>u</code>'s Term.t is a direct subterm of <code>t</code> and <code>m_u</code> is the monoid value attached to <code>u</code>.</li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-merge"><a href="#val-merge" class="anchor"></a><code><span><span class="keyword">val</span> merge :
<span><a href="../../../CC/index.html#type-t">CC.t</a> <span class="arrow">&#45;&gt;</span></span>
<span><a href="#type-state">state</a> <span class="arrow">&#45;&gt;</span></span>
<span><a href="../../../E_node/index.html#type-t">E_node.t</a> <span class="arrow">&#45;&gt;</span></span>
<span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span>
<span><a href="../../../E_node/index.html#type-t">E_node.t</a> <span class="arrow">&#45;&gt;</span></span>
<span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span>
<span><a href="../../../Expl/index.html#type-t">Expl.t</a> <span class="arrow">&#45;&gt;</span></span>
<span><span>(<a href="#type-t">t</a> * <span><a href="../../../CC/Handler_action/index.html#type-t">CC.Handler_action.t</a> list</span>, <a href="../../../CC/Handler_action/index.html#type-conflict">CC.Handler_action.conflict</a>)</span> <span class="xref-unresolved">Stdlib</span>.result</span></span></code></div><div class="spec-doc"><p>Monoidal combination of two values.</p><p><code>merge cc n1 mon1 n2 mon2 expl</code> returns the result of merging monoid values <code>mon1</code> (for class <code>n1</code>) and <code>mon2</code> (for class <code>n2</code>) when <code>n1</code> and <code>n2</code> are merged with explanation <code>expl</code>.</p><ul class="at-tags"><li class="returns"><span class="at-tag">returns</span> <p><code>Ok mon</code> if the merge is acceptable, annotating the class of <code>n1 n2</code>; or <code>Error expl'</code> if the merge is unsatisfiable. <code>expl'</code> can then be used to trigger a conflict and undo the merge.</p></li></ul></div></div></div></body></html>