sidekick/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/index.html
2019-06-07 18:06:37 -05:00

2 lines
No EOL
13 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>Solver (sidekick-bin.Sidekick_smtlib.Process.Solver)</title><link rel="stylesheet" href="../../../../odoc.css"/><meta charset="utf-8"/><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-bin</a> &#x00BB; <a href="../../index.html">Sidekick_smtlib</a> &#x00BB; <a href="../index.html">Process</a> &#x00BB; Solver</nav><h1>Module <code>Process.Solver</code></h1><nav class="toc"><ul><li><a href="#main-api">Main API</a></li></ul></nav></header><div class="spec module" id="module-A"><a href="#module-A" class="anchor"></a><code><span class="keyword">module</span> <a href="A/index.html">A</a> : <a href="../../../../sidekick/Sidekick_core/index.html#module-type-TERM_PROOF">Sidekick_core.TERM_PROOF</a> <span class="keyword">with</span> <span class="keyword">type</span> <a href="../../../../sidekick/Sidekick_core/module-type-TERM_PROOF/Term/index.html#type-t">Term.t</a> = <a href="../../../../sidekick/Sidekick_base_term__Base_types/Term/index.html#type-t">Sidekick_base_term.Term.t</a> <span class="keyword">and</span> <span class="keyword">type</span> <a href="../../../../sidekick/Sidekick_core/module-type-TERM_PROOF/Term/index.html#type-state">Term.state</a> = <a href="../../../../sidekick/Sidekick_base_term__Base_types/Term/index.html#type-state">Sidekick_base_term.Term.state</a> <span class="keyword">and</span> <span class="keyword">type</span> <a href="../../../../sidekick/Sidekick_core/module-type-TERM_PROOF/Ty/index.html#type-t">Ty.t</a> = <a href="../../../../sidekick/Sidekick_base_term__Base_types/Ty/index.html#type-t">Sidekick_base_term.Ty.t</a></code></div><div class="spec module" id="module-CC_A"><a href="#module-CC_A" class="anchor"></a><code><span class="keyword">module</span> <a href="CC_A/index.html">CC_A</a> : <a href="../../../../sidekick/Sidekick_core/index.html#module-type-CC_ARG">Sidekick_core.CC_ARG</a> <span class="keyword">with</span> <span class="keyword">module</span> <a href="../../../../sidekick/Sidekick_core/module-type-CC_ARG/A/index.html">A</a> = <a href="index.html#module-A">A</a></code></div><dl><dt class="spec module" id="module-Solver_internal"><a href="#module-Solver_internal" class="anchor"></a><code><span class="keyword">module</span> <a href="Solver_internal/index.html">Solver_internal</a> : <a href="../../../../sidekick/Sidekick_core/index.html#module-type-SOLVER_INTERNAL">Sidekick_core.SOLVER_INTERNAL</a> <span class="keyword">with</span> <span class="keyword">module</span> <a href="../../../../sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/A/index.html">A</a> = <a href="index.html#module-A">A</a> <span class="keyword">and</span> <span class="keyword">module</span> <a href="../../../../sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/CC_A/index.html">CC_A</a> = <a href="index.html#module-CC_A">CC_A</a></code></dt><dd><p>Internal solver, available to theories.</p></dd></dl><div class="spec module" id="module-Lit"><a href="#module-Lit" class="anchor"></a><code><span class="keyword">module</span> Lit = <a href="Solver_internal/index.html#module-Lit">Solver_internal.Lit</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><dt class="spec type" id="type-solver"><a href="#type-solver" class="anchor"></a><code><span class="keyword">type</span> solver</code><code> = <a href="index.html#type-t">t</a></code></dt><dt class="spec type" id="type-term"><a href="#type-term" class="anchor"></a><code><span class="keyword">type</span> term</code><code> = <a href="A/Term/index.html#type-t">A.Term.t</a></code></dt><dt class="spec type" id="type-ty"><a href="#type-ty" class="anchor"></a><code><span class="keyword">type</span> ty</code><code> = <a href="A/Ty/index.html#type-t">A.Ty.t</a></code></dt><dt class="spec type" id="type-lit"><a href="#type-lit" class="anchor"></a><code><span class="keyword">type</span> lit</code><code> = <a href="Solver_internal/Lit/index.html#type-t">Solver_internal.Lit.t</a></code></dt><dt class="spec type" id="type-lemma"><a href="#type-lemma" class="anchor"></a><code><span class="keyword">type</span> lemma</code><code> = <a href="A/Proof/index.html#type-t">A.Proof.t</a></code></dt></dl><dl><dt class="spec module-type" id="module-type-THEORY"><a href="#module-type-THEORY" class="anchor"></a><code><span class="keyword">module</span> <span class="keyword">type</span> <a href="module-type-THEORY/index.html">THEORY</a> = <span class="keyword">sig</span> ... <span class="keyword">end</span></code></dt><dd></dd></dl><dl><dt class="spec type" id="type-theory"><a href="#type-theory" class="anchor"></a><code><span class="keyword">type</span> theory</code><code> = (<span class="keyword">module</span> <a href="module-type-THEORY/index.html">THEORY</a>)</code></dt><dd><p>A theory that can be used for this particular solver.</p></dd></dl><dl><dt class="spec value" id="val-mk_theory"><a href="#val-mk_theory" class="anchor"></a><code><span class="keyword">val</span> mk_theory : name:string <span>&#45;&gt;</span> create_and_setup:(<a href="Solver_internal/index.html#type-t">Solver_internal.t</a> <span>&#45;&gt;</span> <span class="type-var">'th</span>) <span>&#45;&gt;</span> ?&#8288;push_level:(<span class="type-var">'th</span> <span>&#45;&gt;</span> unit) <span>&#45;&gt;</span> ?&#8288;pop_levels:(<span class="type-var">'th</span> <span>&#45;&gt;</span> int <span>&#45;&gt;</span> unit) <span>&#45;&gt;</span> unit <span>&#45;&gt;</span> <a href="index.html#type-theory">theory</a></code></dt><dd><p>Helper to create a theory</p></dd></dl><dl><dt class="spec module" id="module-Atom"><a href="#module-Atom" class="anchor"></a><code><span class="keyword">module</span> <a href="Atom/index.html">Atom</a> : <span class="keyword">sig</span> ... <span class="keyword">end</span></code></dt><dd></dd></dl><dl><dt class="spec module" id="module-Value"><a href="#module-Value" class="anchor"></a><code><span class="keyword">module</span> <a href="Value/index.html">Value</a> : <span class="keyword">sig</span> ... <span class="keyword">end</span></code></dt><dd></dd></dl><div class="spec module" id="module-Model"><a href="#module-Model" class="anchor"></a><code><span class="keyword">module</span> <a href="Model/index.html">Model</a> : <span class="keyword">sig</span> ... <span class="keyword">end</span></code></div><div class="spec module" id="module-Unknown"><a href="#module-Unknown" class="anchor"></a><code><span class="keyword">module</span> <a href="Unknown/index.html">Unknown</a> : <span class="keyword">sig</span> ... <span class="keyword">end</span></code></div><div class="spec module" id="module-Proof"><a href="#module-Proof" class="anchor"></a><code><span class="keyword">module</span> <a href="Proof/index.html">Proof</a> : <span class="keyword">sig</span> ... <span class="keyword">end</span></code></div><dl><dt class="spec type" id="type-proof"><a href="#type-proof" class="anchor"></a><code><span class="keyword">type</span> proof</code><code> = <a href="Proof/index.html#type-t">Proof.t</a></code></dt></dl><section><header><h4 id="main-api"><a href="#main-api" class="anchor"></a>Main API</h4></header><dl><dt class="spec value" id="val-stats"><a href="#val-stats" class="anchor"></a><code><span class="keyword">val</span> stats : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="../../../../sidekick/Sidekick_util/Stat/index.html#type-t">Sidekick_util.Stat.t</a></code></dt><dt class="spec value" id="val-tst"><a href="#val-tst" class="anchor"></a><code><span class="keyword">val</span> tst : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="A/Term/index.html#type-state">A.Term.state</a></code></dt><dt class="spec value" id="val-create"><a href="#val-create" class="anchor"></a><code><span class="keyword">val</span> create : ?&#8288;stat:<a href="../../../../sidekick/Sidekick_util/Stat/index.html#type-t">Sidekick_util.Stat.t</a> <span>&#45;&gt;</span> ?&#8288;size:[ `Big | `Tiny | `Small ] <span>&#45;&gt;</span> ?&#8288;store_proof:bool <span>&#45;&gt;</span> theories:<a href="index.html#type-theory">theory</a> list <span>&#45;&gt;</span> <a href="A/Term/index.html#type-state">A.Term.state</a> <span>&#45;&gt;</span> unit <span>&#45;&gt;</span> <a href="index.html#type-t">t</a></code></dt><dd><p>Create a new solver.</p><dl><dt>parameter theories</dt><dd><p>theories to load from the start.</p></dd></dl></dd></dl><dl><dt class="spec value" id="val-add_theory"><a href="#val-add_theory" class="anchor"></a><code><span class="keyword">val</span> add_theory : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="index.html#type-theory">theory</a> <span>&#45;&gt;</span> unit</code></dt><dd><p>Add a theory to the solver. This should be called before any call to <a href="index.html#val-solve"><code>solve</code></a> or to <a href="index.html#val-add_clause"><code>add_clause</code></a> and the likes (otherwise the theory will have a partial view of the problem).</p></dd></dl><dl><dt class="spec value" id="val-mk_atom_lit"><a href="#val-mk_atom_lit" class="anchor"></a><code><span class="keyword">val</span> mk_atom_lit : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="index.html#type-lit">lit</a> <span>&#45;&gt;</span> <a href="Atom/index.html#type-t">Atom.t</a></code></dt><dt class="spec value" id="val-mk_atom_t"><a href="#val-mk_atom_t" class="anchor"></a><code><span class="keyword">val</span> mk_atom_t : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> ?&#8288;sign:bool <span>&#45;&gt;</span> <a href="index.html#type-term">term</a> <span>&#45;&gt;</span> <a href="Atom/index.html#type-t">Atom.t</a></code></dt><dt class="spec value" id="val-add_clause"><a href="#val-add_clause" class="anchor"></a><code><span class="keyword">val</span> add_clause : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="Atom/index.html#type-t">Atom.t</a> <a href="../../../../sidekick/Sidekick_util/IArray/index.html#type-t">Sidekick_util.IArray.t</a> <span>&#45;&gt;</span> unit</code></dt><dt class="spec value" id="val-add_clause_l"><a href="#val-add_clause_l" class="anchor"></a><code><span class="keyword">val</span> add_clause_l : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="Atom/index.html#type-t">Atom.t</a> list <span>&#45;&gt;</span> unit</code></dt></dl><dl><dt class="spec type" id="type-res"><a href="#type-res" class="anchor"></a><code><span class="keyword">type</span> res</code><code> = </code><table class="variant"><tr id="type-res.Sat" class="anchored"><td class="def constructor"><a href="#type-res.Sat" class="anchor"></a><code>| </code><code><span class="constructor">Sat</span> <span class="keyword">of</span> <a href="Model/index.html#type-t">Model.t</a></code></td></tr><tr id="type-res.Unsat" class="anchored"><td class="def constructor"><a href="#type-res.Unsat" class="anchor"></a><code>| </code><code><span class="constructor">Unsat</span> <span class="keyword">of</span> </code><code>{</code><table class="record"><tr id="type-res.proof" class="anchored"><td class="def field"><a href="#type-res.proof" class="anchor"></a><code>proof : <a href="index.html#type-proof">proof</a> option;</code></td></tr><tr id="type-res.unsat_core" class="anchored"><td class="def field"><a href="#type-res.unsat_core" class="anchor"></a><code>unsat_core : <a href="Atom/index.html#type-t">Atom.t</a> list lazy_t;</code></td></tr></table><code>}</code></td></tr><tr id="type-res.Unknown" class="anchored"><td class="def constructor"><a href="#type-res.Unknown" class="anchor"></a><code>| </code><code><span class="constructor">Unknown</span> <span class="keyword">of</span> <a href="Unknown/index.html#type-t">Unknown.t</a></code></td><td class="doc"><p>Result of solving for the current set of clauses</p></td></tr></table></dt></dl><dl><dt class="spec value" id="val-solve"><a href="#val-solve" class="anchor"></a><code><span class="keyword">val</span> solve : ?&#8288;on_exit:(unit <span>&#45;&gt;</span> unit) list <span>&#45;&gt;</span> ?&#8288;check:bool <span>&#45;&gt;</span> assumptions:<a href="Atom/index.html#type-t">Atom.t</a> list <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="index.html#type-res">res</a></code></dt><dd><p><code>solve s</code> checks the satisfiability of the statement added so far to <code>s</code></p><dl><dt>parameter check</dt><dd><p>if true, the model is checked before returning</p></dd></dl><dl><dt>parameter assumptions</dt><dd><p>a set of atoms held to be true. The unsat core, if any, will be a subset of <code>assumptions</code>.</p></dd></dl><dl><dt>parameter on_exit</dt><dd><p>functions to be run before this returns</p></dd></dl></dd></dl><dl><dt class="spec value" id="val-pp_term_graph"><a href="#val-pp_term_graph" class="anchor"></a><code><span class="keyword">val</span> pp_term_graph : <a href="index.html#type-t">t</a> CCFormat.printer</code></dt><dt class="spec value" id="val-pp_stats"><a href="#val-pp_stats" class="anchor"></a><code><span class="keyword">val</span> pp_stats : <a href="index.html#type-t">t</a> CCFormat.printer</code></dt></dl></section></div></body></html>