mirror of
https://github.com/c-cube/sidekick.git
synced 2025-12-10 13:14:09 -05:00
2 lines
No EOL
8.3 KiB
HTML
2 lines
No EOL
8.3 KiB
HTML
<!DOCTYPE html>
|
||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Make (sidekick-arith.Sidekick_arith_lra__Simplex2.Make)</title><link rel="stylesheet" href="../../../odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 1.5.2"/><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">sidekick-arith</a> » <a href="../index.html">Sidekick_arith_lra__Simplex2</a> » Make</nav><h1>Module <code>Sidekick_arith_lra__Simplex2.Make</code></h1></header><h3 class="heading">Parameters</h3><ul><li><code><a href="argument-1-Var/index.html">Var</a> : <a href="../index.html#module-type-VAR">VAR</a></code></li></ul><h3 class="heading">Signature</h3><div class="spec module" id="module-V"><a href="#module-V" class="anchor"></a><code><span class="keyword">module</span> V = <a href="index.html#argument-1-Var">Var</a></code></div><div class="spec module" id="module-V_map"><a href="#module-V_map" class="anchor"></a><code><span class="keyword">module</span> V_map : CCMap.S <span class="keyword">with</span> <span class="keyword">type</span> <a href="index.html#module-V_map">V_map</a>.key = <a href="V/index.html#type-t">V.t</a></code></div><dl><dt class="spec type" id="type-num"><a href="#type-num" class="anchor"></a><code><span class="keyword">type</span> num</code><code> = Q.t</code></dt><dd><p>Numbers</p></dd></dl><div class="spec module" id="module-Constraint"><a href="#module-Constraint" class="anchor"></a><code><span class="keyword">module</span> <a href="Constraint/index.html">Constraint</a> : <span class="keyword">sig</span> ... <span class="keyword">end</span></code></div><div class="spec module" id="module-Subst"><a href="#module-Subst" class="anchor"></a><code><span class="keyword">module</span> <a href="Subst/index.html">Subst</a> : <span class="keyword">sig</span> ... <span class="keyword">end</span></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-create"><a href="#val-create" class="anchor"></a><code><span class="keyword">val</span> create : <span>?⁠stat:<a href="../../../sidekick/Sidekick_util/Stat/index.html#type-t">Sidekick_util.Stat.t</a></span> <span>-></span> unit <span>-></span> <a href="index.html#type-t">t</a></code></dt><dd><p>Create a new simplex.</p></dd></dl><dl><dt class="spec value" id="val-push_level"><a href="#val-push_level" class="anchor"></a><code><span class="keyword">val</span> push_level : <a href="index.html#type-t">t</a> <span>-></span> unit</code></dt><dt class="spec value" id="val-pop_levels"><a href="#val-pop_levels" class="anchor"></a><code><span class="keyword">val</span> pop_levels : <a href="index.html#type-t">t</a> <span>-></span> int <span>-></span> unit</code></dt><dt class="spec value" id="val-define"><a href="#val-define" class="anchor"></a><code><span class="keyword">val</span> define : <a href="index.html#type-t">t</a> <span>-></span> <a href="V/index.html#type-t">V.t</a> <span>-></span> <span><span>(<a href="index.html#type-num">num</a> * <a href="V/index.html#type-t">V.t</a>)</span> list</span> <span>-></span> unit</code></dt><dd><p>Define a basic variable in terms of other variables. This is useful to "name" a linear expression and get back a variable that can be used in a <a href="Constraint/index.html#type-t"><code>Constraint.t</code></a></p></dd></dl><dl><dt class="spec type" id="type-unsat_cert"><a href="#type-unsat_cert" class="anchor"></a><code><span class="keyword">type</span> unsat_cert</code></dt></dl><div class="spec module" id="module-Unsat_cert"><a href="#module-Unsat_cert" class="anchor"></a><code><span class="keyword">module</span> <a href="Unsat_cert/index.html">Unsat_cert</a> : <span class="keyword">sig</span> ... <span class="keyword">end</span></code></div><dl><dt class="spec exception" id="exception-E_unsat"><a href="#exception-E_unsat" class="anchor"></a><code><span class="keyword">exception</span> </code><code><span class="exception">E_unsat</span> <span class="keyword">of</span> <a href="Unsat_cert/index.html#type-t">Unsat_cert.t</a></code></dt></dl><dl><dt class="spec type" id="type-ev_on_propagate"><a href="#type-ev_on_propagate" class="anchor"></a><code><span class="keyword">type</span> ev_on_propagate</code><code> = <a href="V/index.html#type-lit">V.lit</a> <span>-></span> <span>reason:<span><a href="V/index.html#type-lit">V.lit</a> list</span></span> <span>-></span> unit</code></dt></dl><dl><dt class="spec value" id="val-add_var"><a href="#val-add_var" class="anchor"></a><code><span class="keyword">val</span> add_var : <a href="index.html#type-t">t</a> <span>-></span> <a href="V/index.html#type-t">V.t</a> <span>-></span> unit</code></dt><dd><p>Make sure the variable exists in the simplex.</p></dd></dl><dl><dt class="spec value" id="val-add_constraint"><a href="#val-add_constraint" class="anchor"></a><code><span class="keyword">val</span> add_constraint : <span>on_propagate:<a href="index.html#type-ev_on_propagate">ev_on_propagate</a></span> <span>-></span> <a href="index.html#type-t">t</a> <span>-></span> <a href="Constraint/index.html#type-t">Constraint.t</a> <span>-></span> <a href="V/index.html#type-lit">V.lit</a> <span>-></span> unit</code></dt><dd><p>Add a constraint to the simplex.</p><dl><dt>raises Unsat</dt><dd><p>if it's immediately obvious that this is not satisfiable.</p></dd></dl></dd></dl><dl><dt class="spec value" id="val-declare_bound"><a href="#val-declare_bound" class="anchor"></a><code><span class="keyword">val</span> declare_bound : <a href="index.html#type-t">t</a> <span>-></span> <a href="Constraint/index.html#type-t">Constraint.t</a> <span>-></span> <a href="V/index.html#type-lit">V.lit</a> <span>-></span> unit</code></dt><dd><p>Declare that this constraint exists, so we can possibly propagate it. Unlike <a href="index.html#val-add_constraint"><code>add_constraint</code></a> this does <b>NOT</b> assert that the constraint is true</p></dd></dl><dl><dt class="spec value" id="val-check_exn"><a href="#val-check_exn" class="anchor"></a><code><span class="keyword">val</span> check_exn : <span>on_propagate:<span>(<a href="V/index.html#type-lit">V.lit</a> <span>-></span> <span>reason:<span><a href="V/index.html#type-lit">V.lit</a> list</span></span> <span>-></span> unit)</span></span> <span>-></span> <a href="index.html#type-t">t</a> <span>-></span> unit</code></dt><dd><p>Check the whole simplex for satisfiability.</p><dl><dt>parameter on_propagate</dt><dd><p>is called with arguments <code>lit, reason</code> whenever <code>reason => lit</code> is found to be true by the simplex.</p></dd></dl><dl><dt>raises Unsat</dt><dd><p>if the constraints are not satisfiable.</p></dd></dl></dd></dl><dl><dt class="spec type" id="type-result"><a href="#type-result" class="anchor"></a><code><span class="keyword">type</span> result</code><code> = </code><table class="variant"><tr id="type-result.Sat" class="anchored"><td class="def constructor"><a href="#type-result.Sat" class="anchor"></a><code>| </code><code><span class="constructor">Sat</span> <span class="keyword">of</span> <a href="Subst/index.html#type-t">Subst.t</a></code></td></tr><tr id="type-result.Unsat" class="anchored"><td class="def constructor"><a href="#type-result.Unsat" class="anchor"></a><code>| </code><code><span class="constructor">Unsat</span> <span class="keyword">of</span> <a href="Unsat_cert/index.html#type-t">Unsat_cert.t</a></code></td></tr></table></dt></dl><dl><dt class="spec value" id="val-check"><a href="#val-check" class="anchor"></a><code><span class="keyword">val</span> check : <span>on_propagate:<span>(<a href="V/index.html#type-lit">V.lit</a> <span>-></span> <span>reason:<span><a href="V/index.html#type-lit">V.lit</a> list</span></span> <span>-></span> unit)</span></span> <span>-></span> <a href="index.html#type-t">t</a> <span>-></span> <a href="index.html#type-result">result</a></code></dt><dd><p>Call <a href="index.html#val-check_exn"><code>check_exn</code></a> and return a model or a proof of unsat.</p></dd></dl></div></body></html> |