diff --git a/dev/highlight.pack.js b/dev/highlight.pack.js index 40370e82..2e55d491 100644 --- a/dev/highlight.pack.js +++ b/dev/highlight.pack.js @@ -1,2 +1,2 @@ -/*! highlight.js v9.12.0 | BSD3 License | git.io/hljslicense */ -!function(e){var n="object"==typeof window&&window||"object"==typeof self&&self;"undefined"!=typeof exports?e(exports):n&&(n.hljs=e({}),"function"==typeof define&&define.amd&&define([],function(){return n.hljs}))}(function(e){function n(e){return e.replace(/&/g,"&").replace(//g,">")}function t(e){return e.nodeName.toLowerCase()}function r(e,n){var t=e&&e.exec(n);return t&&0===t.index}function a(e){return k.test(e)}function i(e){var n,t,r,i,o=e.className+" ";if(o+=e.parentNode?e.parentNode.className:"",t=B.exec(o))return w(t[1])?t[1]:"no-highlight";for(o=o.split(/\s+/),n=0,r=o.length;r>n;n++)if(i=o[n],a(i)||w(i))return i}function o(e){var n,t={},r=Array.prototype.slice.call(arguments,1);for(n in e)t[n]=e[n];return r.forEach(function(e){for(n in e)t[n]=e[n]}),t}function u(e){var n=[];return function r(e,a){for(var i=e.firstChild;i;i=i.nextSibling)3===i.nodeType?a+=i.nodeValue.length:1===i.nodeType&&(n.push({event:"start",offset:a,node:i}),a=r(i,a),t(i).match(/br|hr|img|input/)||n.push({event:"stop",offset:a,node:i}));return a}(e,0),n}function c(e,r,a){function i(){return e.length&&r.length?e[0].offset!==r[0].offset?e[0].offset"}function u(e){s+=""}function c(e){("start"===e.event?o:u)(e.node)}for(var l=0,s="",f=[];e.length||r.length;){var g=i();if(s+=n(a.substring(l,g[0].offset)),l=g[0].offset,g===e){f.reverse().forEach(u);do c(g.splice(0,1)[0]),g=i();while(g===e&&g.length&&g[0].offset===l);f.reverse().forEach(o)}else"start"===g[0].event?f.push(g[0].node):f.pop(),c(g.splice(0,1)[0])}return s+n(a.substr(l))}function l(e){return e.v&&!e.cached_variants&&(e.cached_variants=e.v.map(function(n){return o(e,{v:null},n)})),e.cached_variants||e.eW&&[o(e)]||[e]}function s(e){function n(e){return e&&e.source||e}function t(t,r){return new RegExp(n(t),"m"+(e.cI?"i":"")+(r?"g":""))}function r(a,i){if(!a.compiled){if(a.compiled=!0,a.k=a.k||a.bK,a.k){var o={},u=function(n,t){e.cI&&(t=t.toLowerCase()),t.split(" ").forEach(function(e){var t=e.split("|");o[t[0]]=[n,t[1]?Number(t[1]):1]})};"string"==typeof a.k?u("keyword",a.k):x(a.k).forEach(function(e){u(e,a.k[e])}),a.k=o}a.lR=t(a.l||/\w+/,!0),i&&(a.bK&&(a.b="\\b("+a.bK.split(" ").join("|")+")\\b"),a.b||(a.b=/\B|\b/),a.bR=t(a.b),a.e||a.eW||(a.e=/\B|\b/),a.e&&(a.eR=t(a.e)),a.tE=n(a.e)||"",a.eW&&i.tE&&(a.tE+=(a.e?"|":"")+i.tE)),a.i&&(a.iR=t(a.i)),null==a.r&&(a.r=1),a.c||(a.c=[]),a.c=Array.prototype.concat.apply([],a.c.map(function(e){return l("self"===e?a:e)})),a.c.forEach(function(e){r(e,a)}),a.starts&&r(a.starts,i);var c=a.c.map(function(e){return e.bK?"\\.?("+e.b+")\\.?":e.b}).concat([a.tE,a.i]).map(n).filter(Boolean);a.t=c.length?t(c.join("|"),!0):{exec:function(){return null}}}}r(e)}function f(e,t,a,i){function o(e,n){var t,a;for(t=0,a=n.c.length;a>t;t++)if(r(n.c[t].bR,e))return n.c[t]}function u(e,n){if(r(e.eR,n)){for(;e.endsParent&&e.parent;)e=e.parent;return e}return e.eW?u(e.parent,n):void 0}function c(e,n){return!a&&r(n.iR,e)}function l(e,n){var t=N.cI?n[0].toLowerCase():n[0];return e.k.hasOwnProperty(t)&&e.k[t]}function p(e,n,t,r){var a=r?"":I.classPrefix,i='',i+n+o}function h(){var e,t,r,a;if(!E.k)return n(k);for(a="",t=0,E.lR.lastIndex=0,r=E.lR.exec(k);r;)a+=n(k.substring(t,r.index)),e=l(E,r),e?(B+=e[1],a+=p(e[0],n(r[0]))):a+=n(r[0]),t=E.lR.lastIndex,r=E.lR.exec(k);return a+n(k.substr(t))}function d(){var e="string"==typeof E.sL;if(e&&!y[E.sL])return n(k);var t=e?f(E.sL,k,!0,x[E.sL]):g(k,E.sL.length?E.sL:void 0);return E.r>0&&(B+=t.r),e&&(x[E.sL]=t.top),p(t.language,t.value,!1,!0)}function b(){L+=null!=E.sL?d():h(),k=""}function v(e){L+=e.cN?p(e.cN,"",!0):"",E=Object.create(e,{parent:{value:E}})}function m(e,n){if(k+=e,null==n)return b(),0;var t=o(n,E);if(t)return t.skip?k+=n:(t.eB&&(k+=n),b(),t.rB||t.eB||(k=n)),v(t,n),t.rB?0:n.length;var r=u(E,n);if(r){var a=E;a.skip?k+=n:(a.rE||a.eE||(k+=n),b(),a.eE&&(k=n));do E.cN&&(L+=C),E.skip||(B+=E.r),E=E.parent;while(E!==r.parent);return r.starts&&v(r.starts,""),a.rE?0:n.length}if(c(n,E))throw new Error('Illegal lexeme "'+n+'" for mode "'+(E.cN||"")+'"');return k+=n,n.length||1}var N=w(e);if(!N)throw new Error('Unknown language: "'+e+'"');s(N);var R,E=i||N,x={},L="";for(R=E;R!==N;R=R.parent)R.cN&&(L=p(R.cN,"",!0)+L);var k="",B=0;try{for(var M,j,O=0;;){if(E.t.lastIndex=O,M=E.t.exec(t),!M)break;j=m(t.substring(O,M.index),M[0]),O=M.index+j}for(m(t.substr(O)),R=E;R.parent;R=R.parent)R.cN&&(L+=C);return{r:B,value:L,language:e,top:E}}catch(T){if(T.message&&-1!==T.message.indexOf("Illegal"))return{r:0,value:n(t)};throw T}}function g(e,t){t=t||I.languages||x(y);var r={r:0,value:n(e)},a=r;return t.filter(w).forEach(function(n){var t=f(n,e,!1);t.language=n,t.r>a.r&&(a=t),t.r>r.r&&(a=r,r=t)}),a.language&&(r.second_best=a),r}function p(e){return I.tabReplace||I.useBR?e.replace(M,function(e,n){return I.useBR&&"\n"===e?"
":I.tabReplace?n.replace(/\t/g,I.tabReplace):""}):e}function h(e,n,t){var r=n?L[n]:t,a=[e.trim()];return e.match(/\bhljs\b/)||a.push("hljs"),-1===e.indexOf(r)&&a.push(r),a.join(" ").trim()}function d(e){var n,t,r,o,l,s=i(e);a(s)||(I.useBR?(n=document.createElementNS("http://www.w3.org/1999/xhtml","div"),n.innerHTML=e.innerHTML.replace(/\n/g,"").replace(//g,"\n")):n=e,l=n.textContent,r=s?f(s,l,!0):g(l),t=u(n),t.length&&(o=document.createElementNS("http://www.w3.org/1999/xhtml","div"),o.innerHTML=r.value,r.value=c(t,u(o),l)),r.value=p(r.value),e.innerHTML=r.value,e.className=h(e.className,s,r.language),e.result={language:r.language,re:r.r},r.second_best&&(e.second_best={language:r.second_best.language,re:r.second_best.r}))}function b(e){I=o(I,e)}function v(){if(!v.called){v.called=!0;var e=document.querySelectorAll("pre code");E.forEach.call(e,d)}}function m(){addEventListener("DOMContentLoaded",v,!1),addEventListener("load",v,!1)}function N(n,t){var r=y[n]=t(e);r.aliases&&r.aliases.forEach(function(e){L[e]=n})}function R(){return x(y)}function w(e){return e=(e||"").toLowerCase(),y[e]||y[L[e]]}var E=[],x=Object.keys,y={},L={},k=/^(no-?highlight|plain|text)$/i,B=/\blang(?:uage)?-([\w-]+)\b/i,M=/((^(<[^>]+>|\t|)+|(?:\n)))/gm,C="
",I={classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:void 0};return e.highlight=f,e.highlightAuto=g,e.fixMarkup=p,e.highlightBlock=d,e.configure=b,e.initHighlighting=v,e.initHighlightingOnLoad=m,e.registerLanguage=N,e.listLanguages=R,e.getLanguage=w,e.inherit=o,e.IR="[a-zA-Z]\\w*",e.UIR="[a-zA-Z_]\\w*",e.NR="\\b\\d+(\\.\\d+)?",e.CNR="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",e.BNR="\\b(0b[01]+)",e.RSR="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",e.BE={b:"\\\\[\\s\\S]",r:0},e.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[e.BE]},e.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[e.BE]},e.PWM={b:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},e.C=function(n,t,r){var a=e.inherit({cN:"comment",b:n,e:t,c:[]},r||{});return a.c.push(e.PWM),a.c.push({cN:"doctag",b:"(?:TODO|FIXME|NOTE|BUG|XXX):",r:0}),a},e.CLCM=e.C("//","$"),e.CBCM=e.C("/\\*","\\*/"),e.HCM=e.C("#","$"),e.NM={cN:"number",b:e.NR,r:0},e.CNM={cN:"number",b:e.CNR,r:0},e.BNM={cN:"number",b:e.BNR,r:0},e.CSSNM={cN:"number",b:e.NR+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",r:0},e.RM={cN:"regexp",b:/\//,e:/\/[gimuy]*/,i:/\n/,c:[e.BE,{b:/\[/,e:/\]/,r:0,c:[e.BE]}]},e.TM={cN:"title",b:e.IR,r:0},e.UTM={cN:"title",b:e.UIR,r:0},e.METHOD_GUARD={b:"\\.\\s*"+e.UIR,r:0},e});hljs.registerLanguage("ocaml",function(e){return{aliases:["ml"],k:{keyword:"and as assert asr begin class constraint do done downto else end exception external for fun function functor if in include inherit! inherit initializer land lazy let lor lsl lsr lxor match method!|10 method mod module mutable new object of open! open or private rec sig struct then to try type val! val virtual when while with parser value",built_in:"array bool bytes char exn|5 float int int32 int64 list lazy_t|5 nativeint|5 string unit in_channel out_channel ref",literal:"true false"},i:/\/\/|>>/,l:"[a-z_]\\w*!?",c:[{cN:"literal",b:"\\[(\\|\\|)?\\]|\\(\\)",r:0},e.C("\\(\\*","\\*\\)",{c:["self"]}),{cN:"symbol",b:"'[A-Za-z_](?!')[\\w']*"},{cN:"type",b:"`[A-Z][\\w']*"},{cN:"type",b:"\\b[A-Z][\\w']*",r:0},{b:"[a-z_]\\w*'[\\w']*",r:0},e.inherit(e.ASM,{cN:"string",r:0}),e.inherit(e.QSM,{i:null}),{cN:"number",b:"\\b(0[xX][a-fA-F0-9_]+[Lln]?|0[oO][0-7_]+[Lln]?|0[bB][01_]+[Lln]?|[0-9][0-9_]*([Lln]|(\\.[0-9_]*)?([eE][-+]?[0-9_]+)?)?)",r:0},{b:/[-=]>/}]}}); \ No newline at end of file +/*! highlight.js v9.15.8 | BSD3 License | git.io/hljslicense */ +!function(e){var n="object"==typeof window&&window||"object"==typeof self&&self;"undefined"!=typeof exports?e(exports):n&&(n.hljs=e({}),"function"==typeof define&&define.amd&&define([],function(){return n.hljs}))}(function(a){var f=[],u=Object.keys,N={},c={},n=/^(no-?highlight|plain|text)$/i,s=/\blang(?:uage)?-([\w-]+)\b/i,t=/((^(<[^>]+>|\t|)+|(?:\n)))/gm,r={case_insensitive:"cI",lexemes:"l",contains:"c",keywords:"k",subLanguage:"sL",className:"cN",begin:"b",beginKeywords:"bK",end:"e",endsWithParent:"eW",illegal:"i",excludeBegin:"eB",excludeEnd:"eE",returnBegin:"rB",returnEnd:"rE",relevance:"r",variants:"v",IDENT_RE:"IR",UNDERSCORE_IDENT_RE:"UIR",NUMBER_RE:"NR",C_NUMBER_RE:"CNR",BINARY_NUMBER_RE:"BNR",RE_STARTERS_RE:"RSR",BACKSLASH_ESCAPE:"BE",APOS_STRING_MODE:"ASM",QUOTE_STRING_MODE:"QSM",PHRASAL_WORDS_MODE:"PWM",C_LINE_COMMENT_MODE:"CLCM",C_BLOCK_COMMENT_MODE:"CBCM",HASH_COMMENT_MODE:"HCM",NUMBER_MODE:"NM",C_NUMBER_MODE:"CNM",BINARY_NUMBER_MODE:"BNM",CSS_NUMBER_MODE:"CSSNM",REGEXP_MODE:"RM",TITLE_MODE:"TM",UNDERSCORE_TITLE_MODE:"UTM",COMMENT:"C",beginRe:"bR",endRe:"eR",illegalRe:"iR",lexemesRe:"lR",terminators:"t",terminator_end:"tE"},b="",h={classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:void 0};function _(e){return e.replace(/&/g,"&").replace(//g,">")}function E(e){return e.nodeName.toLowerCase()}function v(e,n){var t=e&&e.exec(n);return t&&0===t.index}function l(e){return n.test(e)}function g(e){var n,t={},r=Array.prototype.slice.call(arguments,1);for(n in e)t[n]=e[n];return r.forEach(function(e){for(n in e)t[n]=e[n]}),t}function R(e){var a=[];return function e(n,t){for(var r=n.firstChild;r;r=r.nextSibling)3===r.nodeType?t+=r.nodeValue.length:1===r.nodeType&&(a.push({event:"start",offset:t,node:r}),t=e(r,t),E(r).match(/br|hr|img|input/)||a.push({event:"stop",offset:t,node:r}));return t}(e,0),a}function i(e){if(r&&!e.langApiRestored){for(var n in e.langApiRestored=!0,r)e[n]&&(e[r[n]]=e[n]);(e.c||[]).concat(e.v||[]).forEach(i)}}function m(o){function s(e){return e&&e.source||e}function c(e,n){return new RegExp(s(e),"m"+(o.cI?"i":"")+(n?"g":""))}!function n(t,e){if(!t.compiled){if(t.compiled=!0,t.k=t.k||t.bK,t.k){function r(t,e){o.cI&&(e=e.toLowerCase()),e.split(" ").forEach(function(e){var n=e.split("|");a[n[0]]=[t,n[1]?Number(n[1]):1]})}var a={};"string"==typeof t.k?r("keyword",t.k):u(t.k).forEach(function(e){r(e,t.k[e])}),t.k=a}t.lR=c(t.l||/\w+/,!0),e&&(t.bK&&(t.b="\\b("+t.bK.split(" ").join("|")+")\\b"),t.b||(t.b=/\B|\b/),t.bR=c(t.b),t.endSameAsBegin&&(t.e=t.b),t.e||t.eW||(t.e=/\B|\b/),t.e&&(t.eR=c(t.e)),t.tE=s(t.e)||"",t.eW&&e.tE&&(t.tE+=(t.e?"|":"")+e.tE)),t.i&&(t.iR=c(t.i)),null==t.r&&(t.r=1),t.c||(t.c=[]),t.c=Array.prototype.concat.apply([],t.c.map(function(e){return function(n){return n.v&&!n.cached_variants&&(n.cached_variants=n.v.map(function(e){return g(n,{v:null},e)})),n.cached_variants||n.eW&&[g(n)]||[n]}("self"===e?t:e)})),t.c.forEach(function(e){n(e,t)}),t.starts&&n(t.starts,e);var i=t.c.map(function(e){return e.bK?"\\.?(?:"+e.b+")\\.?":e.b}).concat([t.tE,t.i]).map(s).filter(Boolean);t.t=i.length?c(function(e,n){for(var t=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./,r=0,a="",i=0;i')+n+(t?"":b):n}function o(){E+=null!=l.sL?function(){var e="string"==typeof l.sL;if(e&&!N[l.sL])return _(g);var n=e?C(l.sL,g,!0,f[l.sL]):O(g,l.sL.length?l.sL:void 0);return 0")+'"');return g+=n,n.length||1}var s=B(e);if(!s)throw new Error('Unknown language: "'+e+'"');m(s);var a,l=t||s,f={},E="";for(a=l;a!==s;a=a.parent)a.cN&&(E=c(a.cN,"",!0)+E);var g="",R=0;try{for(var d,p,M=0;l.t.lastIndex=M,d=l.t.exec(n);)p=r(n.substring(M,d.index),d[0]),M=d.index+p;for(r(n.substr(M)),a=l;a.parent;a=a.parent)a.cN&&(E+=b);return{r:R,value:E,language:e,top:l}}catch(e){if(e.message&&-1!==e.message.indexOf("Illegal"))return{r:0,value:_(n)};throw e}}function O(t,e){e=e||h.languages||u(N);var r={r:0,value:_(t)},a=r;return e.filter(B).filter(M).forEach(function(e){var n=C(e,t,!1);n.language=e,n.r>a.r&&(a=n),n.r>r.r&&(a=r,r=n)}),a.language&&(r.second_best=a),r}function d(e){return h.tabReplace||h.useBR?e.replace(t,function(e,n){return h.useBR&&"\n"===e?"
":h.tabReplace?n.replace(/\t/g,h.tabReplace):""}):e}function o(e){var n,t,r,a,i,o=function(e){var n,t,r,a,i=e.className+" ";if(i+=e.parentNode?e.parentNode.className:"",t=s.exec(i))return B(t[1])?t[1]:"no-highlight";for(n=0,r=(i=i.split(/\s+/)).length;n/g,"\n"):n=e,i=n.textContent,r=o?C(o,i,!0):O(i),(t=R(n)).length&&((a=document.createElementNS("http://www.w3.org/1999/xhtml","div")).innerHTML=r.value,r.value=function(e,n,t){var r=0,a="",i=[];function o(){return e.length&&n.length?e[0].offset!==n[0].offset?e[0].offset"}function u(e){a+=""}function s(e){("start"===e.event?c:u)(e.node)}for(;e.length||n.length;){var l=o();if(a+=_(t.substring(r,l[0].offset)),r=l[0].offset,l===e){for(i.reverse().forEach(u);s(l.splice(0,1)[0]),(l=o())===e&&l.length&&l[0].offset===r;);i.reverse().forEach(c)}else"start"===l[0].event?i.push(l[0].node):i.pop(),s(l.splice(0,1)[0])}return a+_(t.substr(r))}(t,R(a),i)),r.value=d(r.value),e.innerHTML=r.value,e.className=function(e,n,t){var r=n?c[n]:t,a=[e.trim()];return e.match(/\bhljs\b/)||a.push("hljs"),-1===e.indexOf(r)&&a.push(r),a.join(" ").trim()}(e.className,o,r.language),e.result={language:r.language,re:r.r},r.second_best&&(e.second_best={language:r.second_best.language,re:r.second_best.r}))}function p(){if(!p.called){p.called=!0;var e=document.querySelectorAll("pre code");f.forEach.call(e,o)}}function B(e){return e=(e||"").toLowerCase(),N[e]||N[c[e]]}function M(e){var n=B(e);return n&&!n.disableAutodetect}return a.highlight=C,a.highlightAuto=O,a.fixMarkup=d,a.highlightBlock=o,a.configure=function(e){h=g(h,e)},a.initHighlighting=p,a.initHighlightingOnLoad=function(){addEventListener("DOMContentLoaded",p,!1),addEventListener("load",p,!1)},a.registerLanguage=function(n,e){var t=N[n]=e(a);i(t),t.aliases&&t.aliases.forEach(function(e){c[e]=n})},a.listLanguages=function(){return u(N)},a.getLanguage=B,a.autoDetection=M,a.inherit=g,a.IR=a.IDENT_RE="[a-zA-Z]\\w*",a.UIR=a.UNDERSCORE_IDENT_RE="[a-zA-Z_]\\w*",a.NR=a.NUMBER_RE="\\b\\d+(\\.\\d+)?",a.CNR=a.C_NUMBER_RE="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",a.BNR=a.BINARY_NUMBER_RE="\\b(0b[01]+)",a.RSR=a.RE_STARTERS_RE="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",a.BE=a.BACKSLASH_ESCAPE={b:"\\\\[\\s\\S]",r:0},a.ASM=a.APOS_STRING_MODE={cN:"string",b:"'",e:"'",i:"\\n",c:[a.BE]},a.QSM=a.QUOTE_STRING_MODE={cN:"string",b:'"',e:'"',i:"\\n",c:[a.BE]},a.PWM=a.PHRASAL_WORDS_MODE={b:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},a.C=a.COMMENT=function(e,n,t){var r=a.inherit({cN:"comment",b:e,e:n,c:[]},t||{});return r.c.push(a.PWM),r.c.push({cN:"doctag",b:"(?:TODO|FIXME|NOTE|BUG|XXX):",r:0}),r},a.CLCM=a.C_LINE_COMMENT_MODE=a.C("//","$"),a.CBCM=a.C_BLOCK_COMMENT_MODE=a.C("/\\*","\\*/"),a.HCM=a.HASH_COMMENT_MODE=a.C("#","$"),a.NM=a.NUMBER_MODE={cN:"number",b:a.NR,r:0},a.CNM=a.C_NUMBER_MODE={cN:"number",b:a.CNR,r:0},a.BNM=a.BINARY_NUMBER_MODE={cN:"number",b:a.BNR,r:0},a.CSSNM=a.CSS_NUMBER_MODE={cN:"number",b:a.NR+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",r:0},a.RM=a.REGEXP_MODE={cN:"regexp",b:/\//,e:/\/[gimuy]*/,i:/\n/,c:[a.BE,{b:/\[/,e:/\]/,r:0,c:[a.BE]}]},a.TM=a.TITLE_MODE={cN:"title",b:a.IR,r:0},a.UTM=a.UNDERSCORE_TITLE_MODE={cN:"title",b:a.UIR,r:0},a.METHOD_GUARD={b:"\\.\\s*"+a.UIR,r:0},a});hljs.registerLanguage("ocaml",function(e){return{aliases:["ml"],k:{keyword:"and as assert asr begin class constraint do done downto else end exception external for fun function functor if in include inherit! inherit initializer land lazy let lor lsl lsr lxor match method!|10 method mod module mutable new object of open! open or private rec sig struct then to try type val! val virtual when while with parser value",built_in:"array bool bytes char exn|5 float int int32 int64 list lazy_t|5 nativeint|5 string unit in_channel out_channel ref",literal:"true false"},i:/\/\/|>>/,l:"[a-z_]\\w*!?",c:[{cN:"literal",b:"\\[(\\|\\|)?\\]|\\(\\)",r:0},e.C("\\(\\*","\\*\\)",{c:["self"]}),{cN:"symbol",b:"'[A-Za-z_](?!')[\\w']*"},{cN:"type",b:"`[A-Z][\\w']*"},{cN:"type",b:"\\b[A-Z][\\w']*",r:0},{b:"[a-z_]\\w*'[\\w']*",r:0},e.inherit(e.ASM,{cN:"string",r:0}),e.inherit(e.QSM,{i:null}),{cN:"number",b:"\\b(0[xX][a-fA-F0-9_]+[Lln]?|0[oO][0-7_]+[Lln]?|0[bB][01_]+[Lln]?|[0-9][0-9_]*([Lln]|(\\.[0-9_]*)?([eE][-+]?[0-9_]+)?)?)",r:0},{b:/[-=]>/}]}});hljs.registerLanguage("reasonml",function(r){var e="~?[a-z$_][0-9a-zA-Z$_]*",a="`?[A-Z$_][0-9a-zA-Z$_]*",c="("+["||","&&","++","**","+.","*","/","*.","/.","...","|>"].map(function(r){return r.split("").map(function(r){return"\\"+r}).join("")}).join("|")+"|==|===)",n="\\s+"+c+"\\s+",t={keyword:"and as asr assert begin class constraint do done downto else end exception externalfor fun function functor if in include inherit initializerland lazy let lor lsl lsr lxor match method mod module mutable new nonrecobject of open or private rec sig struct then to try type val virtual when while with",built_in:"array bool bytes char exn|5 float int int32 int64 list lazy_t|5 nativeint|5 ref string unit ",literal:"true false"},i="\\b(0[xX][a-fA-F0-9_]+[Lln]?|0[oO][0-7_]+[Lln]?|0[bB][01_]+[Lln]?|[0-9][0-9_]*([Lln]|(\\.[0-9_]*)?([eE][-+]?[0-9_]+)?)?)",s={cN:"number",r:0,v:[{b:i},{b:"\\(\\-"+i+"\\)"}]},b={cN:"operator",r:0,b:c},o=[{cN:"identifier",r:0,b:e},b,s],l=[r.QSM,b,{cN:"module",b:"\\b"+a,rB:!0,e:".",c:[{cN:"identifier",b:a,r:0}]}],u=[{cN:"module",b:"\\b"+a,rB:!0,e:".",r:0,c:[{cN:"identifier",b:a,r:0}]}],_={cN:"function",r:0,k:t,v:[{b:"\\s(\\(\\.?.*?\\)|"+e+")\\s*=>",e:"\\s*=>",rB:!0,r:0,c:[{cN:"params",v:[{b:e},{b:"~?[a-z$_][0-9a-zA-Z$_]*(s*:s*[a-z$_][0-9a-z$_]*((s*('?[a-z$_][0-9a-z$_]*s*(,'?[a-z$_][0-9a-z$_]*)*)?s*))?)?(s*:s*[a-z$_][0-9a-z$_]*((s*('?[a-z$_][0-9a-z$_]*s*(,'?[a-z$_][0-9a-z$_]*)*)?s*))?)?"},{b:/\(\s*\)/}]}]},{b:"\\s\\(\\.?[^;\\|]*\\)\\s*=>",e:"\\s=>",rB:!0,r:0,c:[{cN:"params",r:0,v:[{b:e,e:"(,|\\n|\\))",r:0,c:[b,{cN:"typing",b:":",e:"(,|\\n)",rB:!0,r:0,c:u}]}]}]},{b:"\\(\\.\\s"+e+"\\)\\s*=>"}]};l.push(_);var N={cN:"constructor",b:a+"\\(",e:"\\)",i:"\\n",k:t,c:[r.QSM,b,{cN:"params",b:"\\b"+e}]},d={cN:"pattern-match",b:"\\|",rB:!0,k:t,e:"=>",r:0,c:[N,b,{r:0,cN:"constructor",b:a}]},z={cN:"module-access",k:t,rB:!0,v:[{b:"\\b("+a+"\\.)+"+e},{b:"\\b("+a+"\\.)+\\(",e:"\\)",rB:!0,c:[_,{b:"\\(",e:"\\)",skip:!0}].concat(l)},{b:"\\b("+a+"\\.)+{",e:"}"}],c:l};return u.push(z),{aliases:["re"],k:t,i:"(:\\-|:=|\\${|\\+=)",c:[r.C("/\\*","\\*/",{i:"^(\\#,\\/\\/)"}),{cN:"character",b:"'(\\\\[^']+|[^'])'",i:"\\n",r:0},r.QSM,{cN:"literal",b:"\\(\\)",r:0},{cN:"literal",b:"\\[\\|",e:"\\|\\]",r:0,c:o},{cN:"literal",b:"\\[",e:"\\]",r:0,c:o},N,{cN:"operator",b:n,i:"\\-\\->",r:0},s,r.CLCM,d,_,{cN:"module-def",b:"\\bmodule\\s+"+e+"\\s+"+a+"\\s+=\\s+{",e:"}",rB:!0,k:t,r:0,c:[{cN:"module",r:0,b:a},{b:"{",e:"}",skip:!0}].concat(l)},z]}}); \ No newline at end of file diff --git a/dev/index.html b/dev/index.html index 9081ad46..92cf2744 100644 --- a/dev/index.html +++ b/dev/index.html @@ -12,6 +12,7 @@

OCaml package documentation

  1. sidekick dev
  2. +
  3. sidekick-arith dev
  4. sidekick-bin dev
diff --git a/dev/odoc.css b/dev/odoc.css index c86c417e..9391118f 100644 --- a/dev/odoc.css +++ b/dev/odoc.css @@ -1,7 +1,7 @@ @charset "UTF-8"; /* Copyright (c) 2016 The odoc contributors. All rights reserved. Distributed under the ISC license, see terms at the end of the file. - odoc 1.4.0 */ + odoc 1.5.2 */ /* Fonts */ @import url('https://fonts.googleapis.com/css?family=Fira+Mono:400,500'); diff --git a/dev/sidekick-bin/Sidekick_smtlib__Ast/.dune-keep b/dev/sidekick-arith/Sidekick_arith_lra/.dune-keep similarity index 100% rename from dev/sidekick-bin/Sidekick_smtlib__Ast/.dune-keep rename to dev/sidekick-arith/Sidekick_arith_lra/.dune-keep diff --git a/dev/sidekick-arith/Sidekick_arith_lra/Linear_expr/Make/Comb/Infix/index.html b/dev/sidekick-arith/Sidekick_arith_lra/Linear_expr/Make/Comb/Infix/index.html new file mode 100644 index 00000000..0454fafa --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/Linear_expr/Make/Comb/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (sidekick-arith.Sidekick_arith_lra.Linear_expr.Make.Comb.Infix)

Module Comb.Infix

Infix operations on combinations

This module defines usual operations on linear combinations, as infix operators to ease reading of complex computations.

val (+) : t -> t -> t

Addition between combinations.

val (-) : t -> t -> t

Substraction between combinations.

val (*) : C.t -> t -> t

Multiplication by a constant.

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/Linear_expr/Make/Comb/index.html b/dev/sidekick-arith/Sidekick_arith_lra/Linear_expr/Make/Comb/index.html new file mode 100644 index 00000000..c910f185 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/Linear_expr/Make/Comb/index.html @@ -0,0 +1,2 @@ + +Comb (sidekick-arith.Sidekick_arith_lra.Linear_expr.Make.Comb)

Module Make.Comb

Combinations.

This module defines linear combnations as mapping from variables to coefficients. This allows for very fast computations.

type t

The type of linear combinations.

val compare : t -> t -> int

Comparisons on linear combinations.

val pp : t Sidekick_util.Fmt.printer

Printer for linear combinations.

val is_empty : t -> bool

Is the given expression empty ?

Creation
val empty : t

The empty linear combination.

val monomial : C.t -> var -> t

monome n v creates the linear combination n * v

val monomial1 : var -> t

monome1 v creates the linear combination 1 * v

val as_singleton : t -> (C.t * var) option

as_singleton l returns Some (c,x) if l = c * x, None otherwise

val add : C.t -> var -> t -> t

add n v t adds the monome n * v to the combination t.

module Infix : sig ... end

Infix operations on combinations

Include the previous module.

include module type of Infix
val (+) : t -> t -> t

Addition between combinations.

val (-) : t -> t -> t

Substraction between combinations.

val (*) : C.t -> t -> t

Multiplication by a constant.

val iter : (var -> C.t -> unit) -> t -> unit
val of_list : (C.t * var) list -> t
val to_list : t -> (C.t * var) list

Converters to and from lists of monomes.

val of_map : C.t Var_map.t -> t
val to_map : t -> C.t Var_map.t
Semantics
val eval : subst -> t -> C.t

Evaluate a linear combination given a substitution for its variables. TODO: document potential exceptions raised ?

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/Linear_expr/Make/Constr/index.html b/dev/sidekick-arith/Sidekick_arith_lra/Linear_expr/Make/Constr/index.html new file mode 100644 index 00000000..27ef1ee1 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/Linear_expr/Make/Constr/index.html @@ -0,0 +1,2 @@ + +Constr (sidekick-arith.Sidekick_arith_lra.Linear_expr.Make.Constr)

Module Make.Constr

Linear constraints.

Represents constraints on linear expressions.

type op = Sidekick_arith_lra__.Linear_expr_intf.bool_op

Arithmetic comparison operators.

type t = {
expr : Expr.t;
op : op;
}

Linear constraints. Expressions are implicitly compared to zero.

val compare : t -> t -> int

Standard comparison function.

val pp : t Sidekick_util.Fmt.printer

Standard printing function.

val of_expr : Expr.t -> Sidekick_arith_lra__.Linear_expr_intf.bool_op -> t
val make : Comb.t -> Sidekick_arith_lra__.Linear_expr_intf.bool_op -> C.t -> t

Create a constraint from a linear expression/combination and a constant.

val geq : Comb.t -> C.t -> t
val leq : Comb.t -> C.t -> t
val gt : Comb.t -> C.t -> t
val lt : Comb.t -> C.t -> t
val eq : Comb.t -> C.t -> t
val neq : Comb.t -> C.t -> t
val geq0 : Expr.t -> t
val leq0 : Expr.t -> t
val gt0 : Expr.t -> t
val lt0 : Expr.t -> t
val eq0 : Expr.t -> t
val neq0 : Expr.t -> t
val op : t -> Sidekick_arith_lra__.Linear_expr_intf.bool_op
val expr : t -> Expr.t

Extract the given part from a constraint.

val split : t -> Comb.t * Sidekick_arith_lra__.Linear_expr_intf.bool_op * C.t

Split the linear combinations from the constant

val eval : subst -> t -> bool

Evaluate the given constraint under a substitution.

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/Linear_expr/Make/Expr/Infix/index.html b/dev/sidekick-arith/Sidekick_arith_lra/Linear_expr/Make/Expr/Infix/index.html new file mode 100644 index 00000000..5f23c6e4 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/Linear_expr/Make/Expr/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (sidekick-arith.Sidekick_arith_lra.Linear_expr.Make.Expr.Infix)

Module Expr.Infix

Infix operations on expressions

This module defines usual operations on linear expressions, as infix operators to ease reading of complex computations.

val (+) : t -> t -> t

Addition between expressions.

val (-) : t -> t -> t

Substraction between expressions.

val (*) : C.t -> t -> t

Multiplication by a constant.

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/Linear_expr/Make/Expr/index.html b/dev/sidekick-arith/Sidekick_arith_lra/Linear_expr/Make/Expr/index.html new file mode 100644 index 00000000..253fc558 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/Linear_expr/Make/Expr/index.html @@ -0,0 +1,2 @@ + +Expr (sidekick-arith.Sidekick_arith_lra.Linear_expr.Make.Expr)

Module Make.Expr

Linear expressions represent linear arithmetic expressions as a linear combination and a constant.

type t

The type of linear expressions.

val comb : t -> Comb.t
val const : t -> C.t
val is_zero : t -> bool
val is_const : t -> bool
val compare : t -> t -> int

Standard comparison function on expressions.

val pp : t Sidekick_util.Fmt.printer

Standard printing function on expressions.

val zero : t

The expression 2.

val of_const : C.t -> t

The constant expression.

val of_comb : Comb.t -> t

Combination without constant

val of_list : C.t -> (C.t * Var.t) list -> t
val make : Comb.t -> C.t -> t

make c n makes the linear expression c + n.

val monomial : C.t -> var -> t
val monomial1 : var -> t
module Infix : sig ... end

Infix operations on expressions

Include the previous module.

include module type of Infix
val (+) : t -> t -> t

Addition between expressions.

val (-) : t -> t -> t

Substraction between expressions.

val (*) : C.t -> t -> t

Multiplication by a constant.

Semantics
val eval : subst -> t -> C.t

Evaluate a linear expression given a substitution for its variables. TODO: document potential exceptions raised ?

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/Linear_expr/Make/argument-1-C/index.html b/dev/sidekick-arith/Sidekick_arith_lra/Linear_expr/Make/argument-1-C/index.html new file mode 100644 index 00000000..a32563bf --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/Linear_expr/Make/argument-1-C/index.html @@ -0,0 +1,2 @@ + +1-C (sidekick-arith.Sidekick_arith_lra.Linear_expr.Make.1-C)

Parameter Make.1-C

type t
val equal : t -> t -> bool

Equality on coefficients.

val compare : t -> t -> int

Comparison on coefficients.

val pp : t Sidekick_util.Fmt.printer

Printer for coefficients.

val zero : t

The zero coefficient.

val one : t

The one coefficient (to rule them all, :p).

val neg : t -> t

Unary negation

val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t

Standard operations on coefficients.

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/Linear_expr/Make/argument-2-Var/index.html b/dev/sidekick-arith/Sidekick_arith_lra/Linear_expr/Make/argument-2-Var/index.html new file mode 100644 index 00000000..61aeff2d --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/Linear_expr/Make/argument-2-Var/index.html @@ -0,0 +1,2 @@ + +2-Var (sidekick-arith.Sidekick_arith_lra.Linear_expr.Make.2-Var)

Parameter Make.2-Var

type t

Variable type.

val compare : t -> t -> int

Standard comparison function on variables.

val pp : t Sidekick_util.Fmt.printer

Printer for variables.

type lit
val pp_lit : lit Sidekick_util.Fmt.printer
val not_lit : lit -> lit option
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/Linear_expr/Make/index.html b/dev/sidekick-arith/Sidekick_arith_lra/Linear_expr/Make/index.html new file mode 100644 index 00000000..e1a11b0d --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/Linear_expr/Make/index.html @@ -0,0 +1,2 @@ + +Make (sidekick-arith.Sidekick_arith_lra.Linear_expr.Make)

Module Linear_expr.Make

Parameters

Signature

module C = C

Coeficients used. Can be integers as well as rationals.

module Var = Var

Variables used in expressions.

type var = Var.t

The type of variables appearing in expressions.

module Var_map = CCMap.Make(Var)

Maps from variables, used for expressions as well as substitutions.

type subst = C.t Var_map.t

Type for substitutions.

module Comb : sig ... end

Combinations.

Linear expressions.

module Expr : sig ... end

Linear expressions represent linear arithmetic expressions as a linear combination and a constant.

module Constr : sig ... end
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/Linear_expr/index.html b/dev/sidekick-arith/Sidekick_arith_lra/Linear_expr/index.html new file mode 100644 index 00000000..868fbe3a --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/Linear_expr/index.html @@ -0,0 +1,2 @@ + +Linear_expr (sidekick-arith.Sidekick_arith_lra.Linear_expr)

Module Sidekick_arith_lra.Linear_expr

Arithmetic expressions

type nonrec bool_op = Sidekick_arith_lra__.Linear_expr_intf.bool_op =
| Leq
| Geq
| Lt
| Gt
| Eq
| Neq
module Make : functor (C : COEFF) -> functor (Var : VAR) -> S with module C = C and module Var = Var and module Var_map = CCMap.Make(Var)
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/Linear_expr/module-type-COEFF/index.html b/dev/sidekick-arith/Sidekick_arith_lra/Linear_expr/module-type-COEFF/index.html new file mode 100644 index 00000000..a460a233 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/Linear_expr/module-type-COEFF/index.html @@ -0,0 +1,2 @@ + +COEFF (sidekick-arith.Sidekick_arith_lra.Linear_expr.COEFF)

Module type Linear_expr.COEFF

type t
val equal : t -> t -> bool

Equality on coefficients.

val compare : t -> t -> int

Comparison on coefficients.

val pp : t Sidekick_util.Fmt.printer

Printer for coefficients.

val zero : t

The zero coefficient.

val one : t

The one coefficient (to rule them all, :p).

val neg : t -> t

Unary negation

val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t

Standard operations on coefficients.

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/Linear_expr/module-type-S/C/index.html b/dev/sidekick-arith/Sidekick_arith_lra/Linear_expr/module-type-S/C/index.html new file mode 100644 index 00000000..54f4003c --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/Linear_expr/module-type-S/C/index.html @@ -0,0 +1,2 @@ + +C (sidekick-arith.Sidekick_arith_lra.Linear_expr.S.C)

Module S.C

Coeficients used. Can be integers as well as rationals.

type t
val equal : t -> t -> bool

Equality on coefficients.

val compare : t -> t -> int

Comparison on coefficients.

val pp : t Sidekick_util.Fmt.printer

Printer for coefficients.

val zero : t

The zero coefficient.

val one : t

The one coefficient (to rule them all, :p).

val neg : t -> t

Unary negation

val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t

Standard operations on coefficients.

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/Linear_expr/module-type-S/Comb/Infix/index.html b/dev/sidekick-arith/Sidekick_arith_lra/Linear_expr/module-type-S/Comb/Infix/index.html new file mode 100644 index 00000000..93faf587 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/Linear_expr/module-type-S/Comb/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (sidekick-arith.Sidekick_arith_lra.Linear_expr.S.Comb.Infix)

Module Comb.Infix

Infix operations on combinations

This module defines usual operations on linear combinations, as infix operators to ease reading of complex computations.

val (+) : t -> t -> t

Addition between combinations.

val (-) : t -> t -> t

Substraction between combinations.

val (*) : C.t -> t -> t

Multiplication by a constant.

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/Linear_expr/module-type-S/Comb/index.html b/dev/sidekick-arith/Sidekick_arith_lra/Linear_expr/module-type-S/Comb/index.html new file mode 100644 index 00000000..821d94db --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/Linear_expr/module-type-S/Comb/index.html @@ -0,0 +1,2 @@ + +Comb (sidekick-arith.Sidekick_arith_lra.Linear_expr.S.Comb)

Module S.Comb

Combinations.

This module defines linear combnations as mapping from variables to coefficients. This allows for very fast computations.

type t

The type of linear combinations.

val compare : t -> t -> int

Comparisons on linear combinations.

val pp : t Sidekick_util.Fmt.printer

Printer for linear combinations.

val is_empty : t -> bool

Is the given expression empty ?

Creation
val empty : t

The empty linear combination.

val monomial : C.t -> var -> t

monome n v creates the linear combination n * v

val monomial1 : var -> t

monome1 v creates the linear combination 1 * v

val as_singleton : t -> (C.t * var) option

as_singleton l returns Some (c,x) if l = c * x, None otherwise

val add : C.t -> var -> t -> t

add n v t adds the monome n * v to the combination t.

module Infix : sig ... end

Infix operations on combinations

Include the previous module.

include module type of Infix
val (+) : t -> t -> t

Addition between combinations.

val (-) : t -> t -> t

Substraction between combinations.

val (*) : C.t -> t -> t

Multiplication by a constant.

val iter : (var -> C.t -> unit) -> t -> unit
val of_list : (C.t * var) list -> t
val to_list : t -> (C.t * var) list

Converters to and from lists of monomes.

val of_map : C.t Var_map.t -> t
val to_map : t -> C.t Var_map.t
Semantics
val eval : subst -> t -> C.t

Evaluate a linear combination given a substitution for its variables. TODO: document potential exceptions raised ?

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/Linear_expr/module-type-S/Constr/index.html b/dev/sidekick-arith/Sidekick_arith_lra/Linear_expr/module-type-S/Constr/index.html new file mode 100644 index 00000000..b0b2c71d --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/Linear_expr/module-type-S/Constr/index.html @@ -0,0 +1,2 @@ + +Constr (sidekick-arith.Sidekick_arith_lra.Linear_expr.S.Constr)

Module S.Constr

Linear constraints.

Represents constraints on linear expressions.

type op = Sidekick_arith_lra__.Linear_expr_intf.bool_op

Arithmetic comparison operators.

type t = {
expr : Expr.t;
op : op;
}

Linear constraints. Expressions are implicitly compared to zero.

val compare : t -> t -> int

Standard comparison function.

val pp : t Sidekick_util.Fmt.printer

Standard printing function.

val of_expr : Expr.t -> Sidekick_arith_lra__.Linear_expr_intf.bool_op -> t
val make : Comb.t -> Sidekick_arith_lra__.Linear_expr_intf.bool_op -> C.t -> t

Create a constraint from a linear expression/combination and a constant.

val geq : Comb.t -> C.t -> t
val leq : Comb.t -> C.t -> t
val gt : Comb.t -> C.t -> t
val lt : Comb.t -> C.t -> t
val eq : Comb.t -> C.t -> t
val neq : Comb.t -> C.t -> t
val geq0 : Expr.t -> t
val leq0 : Expr.t -> t
val gt0 : Expr.t -> t
val lt0 : Expr.t -> t
val eq0 : Expr.t -> t
val neq0 : Expr.t -> t
val op : t -> Sidekick_arith_lra__.Linear_expr_intf.bool_op
val expr : t -> Expr.t

Extract the given part from a constraint.

val split : t -> Comb.t * Sidekick_arith_lra__.Linear_expr_intf.bool_op * C.t

Split the linear combinations from the constant

val eval : subst -> t -> bool

Evaluate the given constraint under a substitution.

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/Linear_expr/module-type-S/Expr/Infix/index.html b/dev/sidekick-arith/Sidekick_arith_lra/Linear_expr/module-type-S/Expr/Infix/index.html new file mode 100644 index 00000000..627a8fc3 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/Linear_expr/module-type-S/Expr/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (sidekick-arith.Sidekick_arith_lra.Linear_expr.S.Expr.Infix)

Module Expr.Infix

Infix operations on expressions

This module defines usual operations on linear expressions, as infix operators to ease reading of complex computations.

val (+) : t -> t -> t

Addition between expressions.

val (-) : t -> t -> t

Substraction between expressions.

val (*) : C.t -> t -> t

Multiplication by a constant.

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/Linear_expr/module-type-S/Expr/index.html b/dev/sidekick-arith/Sidekick_arith_lra/Linear_expr/module-type-S/Expr/index.html new file mode 100644 index 00000000..6e39b116 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/Linear_expr/module-type-S/Expr/index.html @@ -0,0 +1,2 @@ + +Expr (sidekick-arith.Sidekick_arith_lra.Linear_expr.S.Expr)

Module S.Expr

Linear expressions represent linear arithmetic expressions as a linear combination and a constant.

type t

The type of linear expressions.

val comb : t -> Comb.t
val const : t -> C.t
val is_zero : t -> bool
val is_const : t -> bool
val compare : t -> t -> int

Standard comparison function on expressions.

val pp : t Sidekick_util.Fmt.printer

Standard printing function on expressions.

val zero : t

The expression 2.

val of_const : C.t -> t

The constant expression.

val of_comb : Comb.t -> t

Combination without constant

val of_list : C.t -> (C.t * Var.t) list -> t
val make : Comb.t -> C.t -> t

make c n makes the linear expression c + n.

val monomial : C.t -> var -> t
val monomial1 : var -> t
module Infix : sig ... end

Infix operations on expressions

Include the previous module.

include module type of Infix
val (+) : t -> t -> t

Addition between expressions.

val (-) : t -> t -> t

Substraction between expressions.

val (*) : C.t -> t -> t

Multiplication by a constant.

Semantics
val eval : subst -> t -> C.t

Evaluate a linear expression given a substitution for its variables. TODO: document potential exceptions raised ?

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/Linear_expr/module-type-S/Var/index.html b/dev/sidekick-arith/Sidekick_arith_lra/Linear_expr/module-type-S/Var/index.html new file mode 100644 index 00000000..dc9ac21c --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/Linear_expr/module-type-S/Var/index.html @@ -0,0 +1,2 @@ + +Var (sidekick-arith.Sidekick_arith_lra.Linear_expr.S.Var)

Module S.Var

Variables used in expressions.

type t

Variable type.

val compare : t -> t -> int

Standard comparison function on variables.

val pp : t Sidekick_util.Fmt.printer

Printer for variables.

type lit
val pp_lit : lit Sidekick_util.Fmt.printer
val not_lit : lit -> lit option
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/Linear_expr/module-type-S/index.html b/dev/sidekick-arith/Sidekick_arith_lra/Linear_expr/module-type-S/index.html new file mode 100644 index 00000000..d84ae8b3 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/Linear_expr/module-type-S/index.html @@ -0,0 +1,2 @@ + +S (sidekick-arith.Sidekick_arith_lra.Linear_expr.S)

Module type Linear_expr.S

module C : Sidekick_arith_lra__.Linear_expr_intf.COEFF

Coeficients used. Can be integers as well as rationals.

module Var : Sidekick_arith_lra__.Linear_expr_intf.VAR

Variables used in expressions.

type var = Var.t

The type of variables appearing in expressions.

module Var_map : CCMap.S with type Var_map.key = var

Maps from variables, used for expressions as well as substitutions.

type subst = C.t Var_map.t

Type for substitutions.

module Comb : sig ... end

Combinations.

Linear expressions.

module Expr : sig ... end

Linear expressions represent linear arithmetic expressions as a linear combination and a constant.

module Constr : sig ... end
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/Linear_expr/module-type-VAR/index.html b/dev/sidekick-arith/Sidekick_arith_lra/Linear_expr/module-type-VAR/index.html new file mode 100644 index 00000000..83aa7439 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/Linear_expr/module-type-VAR/index.html @@ -0,0 +1,2 @@ + +VAR (sidekick-arith.Sidekick_arith_lra.Linear_expr.VAR)

Module type Linear_expr.VAR

type t

Variable type.

val compare : t -> t -> int

Standard comparison function on variables.

val pp : t Sidekick_util.Fmt.printer

Printer for variables.

type lit
val pp_lit : lit Sidekick_util.Fmt.printer
val not_lit : lit -> lit option
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/Make/argument-1-A/Gensym/index.html b/dev/sidekick-arith/Sidekick_arith_lra/Make/argument-1-A/Gensym/index.html new file mode 100644 index 00000000..30ec4b92 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/Make/argument-1-A/Gensym/index.html @@ -0,0 +1,2 @@ + +Gensym (sidekick-arith.Sidekick_arith_lra.Make.1-A.Gensym)

Module 1-A.Gensym

type t
val create : S.T.Term.state -> t
val tst : t -> S.T.Term.state
val copy : t -> t
val fresh_term : t -> pre:string -> S.T.Ty.t -> term

Make a fresh term of the given type

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/Make/argument-1-A/S/Atom/index.html b/dev/sidekick-arith/Sidekick_arith_lra/Make/argument-1-A/S/Atom/index.html new file mode 100644 index 00000000..f5487505 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/Make/argument-1-A/S/Atom/index.html @@ -0,0 +1,2 @@ + +Atom (sidekick-arith.Sidekick_arith_lra.Make.1-A.S.Atom)

Module S.Atom

Boolean Atoms

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t CCFormat.printer
val neg : t -> t
val formula : t -> lit
val sign : t -> bool
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/Make/argument-1-A/S/Lit/index.html b/dev/sidekick-arith/Sidekick_arith_lra/Make/argument-1-A/S/Lit/index.html new file mode 100644 index 00000000..6b5bbf03 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/Make/argument-1-A/S/Lit/index.html @@ -0,0 +1,2 @@ + +Lit (sidekick-arith.Sidekick_arith_lra.Make.1-A.S.Lit)

Module S.Lit

module T = T
type t
val term : t -> T.Term.t
val sign : t -> bool
val neg : t -> t
val abs : t -> t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/Make/argument-1-A/S/Model/index.html b/dev/sidekick-arith/Sidekick_arith_lra/Make/argument-1-A/S/Model/index.html new file mode 100644 index 00000000..3175d876 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/Make/argument-1-A/S/Model/index.html @@ -0,0 +1,2 @@ + +Model (sidekick-arith.Sidekick_arith_lra.Make.1-A.S.Model)

Module S.Model

type t
val empty : t
val mem : t -> term -> bool
val find : t -> term -> term option
val eval : t -> term -> term option
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/Make/argument-1-A/S/P/index.html b/dev/sidekick-arith/Sidekick_arith_lra/Make/argument-1-A/S/P/index.html new file mode 100644 index 00000000..7537bd43 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/Make/argument-1-A/S/P/index.html @@ -0,0 +1,2 @@ + +P (sidekick-arith.Sidekick_arith_lra.Make.1-A.S.P)

Module S.P

type t
val pp : t Sidekick_core.Fmt.printer
val default : t
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/Make/argument-1-A/S/Proof/index.html b/dev/sidekick-arith/Sidekick_arith_lra/Make/argument-1-A/S/Proof/index.html new file mode 100644 index 00000000..567a3fa6 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/Make/argument-1-A/S/Proof/index.html @@ -0,0 +1,2 @@ + +Proof (sidekick-arith.Sidekick_arith_lra.Make.1-A.S.Proof)

Module S.Proof

type t
val check : t -> unit
val pp_dot : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/Make/argument-1-A/S/Solver_internal/CC/Actions/index.html b/dev/sidekick-arith/Sidekick_arith_lra/Make/argument-1-A/S/Solver_internal/CC/Actions/index.html new file mode 100644 index 00000000..094375be --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/Make/argument-1-A/S/Solver_internal/CC/Actions/index.html @@ -0,0 +1,2 @@ + +Actions (sidekick-arith.Sidekick_arith_lra.Make.1-A.S.Solver_internal.CC.Actions)

Module CC.Actions

module T = T
module P = P
module Lit = Lit
type t = actions
val raise_conflict : t -> Lit.t list -> P.t -> 'a
val propagate : t -> Lit.t -> reason:(unit -> Lit.t list) -> P.t -> unit
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/Make/argument-1-A/S/Solver_internal/CC/Expl/index.html b/dev/sidekick-arith/Sidekick_arith_lra/Make/argument-1-A/S/Solver_internal/CC/Expl/index.html new file mode 100644 index 00000000..9413fb7b --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/Make/argument-1-A/S/Solver_internal/CC/Expl/index.html @@ -0,0 +1,2 @@ + +Expl (sidekick-arith.Sidekick_arith_lra.Make.1-A.S.Solver_internal.CC.Expl)

Module CC.Expl

type t
val pp : t Sidekick_core.Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
val mk_theory : t -> t
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/Make/argument-1-A/S/Solver_internal/CC/N/index.html b/dev/sidekick-arith/Sidekick_arith_lra/Make/argument-1-A/S/Solver_internal/CC/N/index.html new file mode 100644 index 00000000..67db01cb --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/Make/argument-1-A/S/Solver_internal/CC/N/index.html @@ -0,0 +1,2 @@ + +N (sidekick-arith.Sidekick_arith_lra.Make.1-A.S.Solver_internal.CC.N)

Module CC.N

An equivalence class is a set of terms that are currently equal in the partial model built by the solver. The class is represented by a collection of nodes, one of which is distinguished and is called the "representative".

All information pertaining to the whole equivalence class is stored in this representative's node.

When two classes become equal (are "merged"), one of the two representatives is picked as the representative of the new class. The new class contains the union of the two old classes' nodes.

We also allow theories to store additional information in the representative. This information can be used when two classes are merged, to detect conflicts and solve equations à la Shostak.

type t
val term : t -> term
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
val is_root : t -> bool

Is the node a root (ie the representative of its class)?

val iter_class : t -> t Iter.t

Traverse the congruence class. Precondition: is_root n (see find below)

val iter_parents : t -> t Iter.t

Traverse the parents of the class. Precondition: is_root n (see find below)

type bitfield

A field in the bitfield of this node. This should only be allocated when a theory is initialized.

All fields are initially 0, are backtracked automatically, and are merged automatically when classes are merged.

val get_field : bitfield -> t -> bool
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/Make/argument-1-A/S/Solver_internal/CC/index.html b/dev/sidekick-arith/Sidekick_arith_lra/Make/argument-1-A/S/Solver_internal/CC/index.html new file mode 100644 index 00000000..c4037f59 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/Make/argument-1-A/S/Solver_internal/CC/index.html @@ -0,0 +1,2 @@ + +CC (sidekick-arith.Sidekick_arith_lra.Make.1-A.S.Solver_internal.CC)

Module Solver_internal.CC

module T = T
module P = P
module Lit = Lit
module Actions : Sidekick_core.CC_ACTIONS with module T = T and module Lit = Lit and module P = P and type t = actions
type term_state = T.Term.state
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type proof = P.t
type actions = Actions.t
type t

Global state of the congruence closure

module N : sig ... end

An equivalence class is a set of terms that are currently equal in the partial model built by the solver. The class is represented by a collection of nodes, one of which is distinguished and is called the "representative".

module Expl : sig ... end
type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t
val term_state : t -> term_state
val find : t -> node -> repr

Current representative

val add_term : t -> term -> node

Add the term to the congruence closure, if not present already. Will be backtracked.

val mem_term : t -> term -> bool

Returns true if the term is explicitly present in the congruence closure

type ev_on_pre_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit
type ev_on_post_merge = t -> actions -> N.t -> N.t -> unit
type ev_on_new_term = t -> N.t -> term -> unit
type ev_on_conflict = t -> th:bool -> lit list -> unit
type ev_on_propagate = t -> lit -> (unit -> lit list) -> unit
type ev_on_is_subterm = N.t -> term -> unit
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_pre_merge:ev_on_pre_merge list -> ?⁠on_post_merge:ev_on_post_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠on_is_subterm:ev_on_is_subterm list -> ?⁠size:[ `Small | `Big ] -> term_state -> t

Create a new congruence closure.

val allocate_bitfield : descr:string -> t -> N.bitfield

Allocate a new bitfield for the nodes. See N.bitfield.

val set_bitfield : t -> N.bitfield -> bool -> N.t -> unit

Set the bitfield for the node. This will be backtracked. See N.bitfield.

val on_pre_merge : t -> ev_on_pre_merge -> unit

Add a function to be called when two classes are merged

val on_post_merge : t -> ev_on_post_merge -> unit

Add a function to be called when two classes are merged

val on_new_term : t -> ev_on_new_term -> unit

Add a function to be called when a new node is created

val on_conflict : t -> ev_on_conflict -> unit

Called when the congruence closure finds a conflict

val on_propagate : t -> ev_on_propagate -> unit

Called when the congruence closure propagates a literal

val on_is_subterm : t -> ev_on_is_subterm -> unit

Called on terms that are subterms of function symbols

val set_as_lit : t -> N.t -> lit -> unit

map the given node to a literal.

val find_t : t -> term -> repr

Current representative of the term.

raises Not_found

if the term is not already add-ed.

val add_seq : t -> term Iter.t -> unit

Add a sequence of terms to the congruence closure

val all_classes : t -> repr Iter.t

All current classes. This is costly, only use if there is no other solution

val assert_lit : t -> lit -> unit

Given a literal, assume it in the congruence closure and propagate its consequences. Will be backtracked.

Useful for the theory combination or the SAT solver's functor

val assert_lits : t -> lit Iter.t -> unit

Addition of many literals

val explain_eq : t -> N.t -> N.t -> lit list

Explain why the two nodes are equal. Fails if they are not, in an unspecified way

val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given explanation it must be a theory tautology that expl ==> absurd. To be used in theories.

val n_true : t -> N.t
val n_false : t -> N.t
val n_bool : t -> bool -> N.t
val merge : t -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val merge_t : t -> term -> term -> Expl.t -> unit

Shortcut for adding + merging

val check : t -> actions -> unit

Perform all pending operations done via assert_eq, assert_lit, etc. Will use the actions to propagate literals, declare conflicts, etc.

val new_merges : t -> bool

Called after check, returns true if some pairs of classes were merged.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Restore to state n calls to push_level earlier. Used during backtracking.

val get_model : t -> N.t Iter.t Iter.t

get all the equivalence classes so they can be merged in the model

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/Make/argument-1-A/S/Solver_internal/Simplify/index.html b/dev/sidekick-arith/Sidekick_arith_lra/Make/argument-1-A/S/Solver_internal/Simplify/index.html new file mode 100644 index 00000000..857d87ce --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/Make/argument-1-A/S/Solver_internal/Simplify/index.html @@ -0,0 +1,2 @@ + +Simplify (sidekick-arith.Sidekick_arith_lra.Make.1-A.S.Solver_internal.Simplify)

Module Solver_internal.Simplify

type t
val tst : t -> term_state
val ty_st : t -> ty_state
val clear : t -> unit

Reset internal cache, etc.

type hook = t -> term -> term option

Given a term, try to simplify it. Return None if it didn't change.

val normalize : t -> term -> term

Normalize a term using all the hooks.

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/Make/argument-1-A/S/Solver_internal/index.html b/dev/sidekick-arith/Sidekick_arith_lra/Make/argument-1-A/S/Solver_internal/index.html new file mode 100644 index 00000000..23aad83b --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/Make/argument-1-A/S/Solver_internal/index.html @@ -0,0 +1,2 @@ + +Solver_internal (sidekick-arith.Sidekick_arith_lra.Make.1-A.S.Solver_internal)

Module S.Solver_internal

Internal solver, available to theories.

module T = T
module P = P
type ty = T.Ty.t
type term = T.Term.t
type term_state = T.Term.state
type ty_state = T.Ty.state
type proof = P.t
type t

Main type for a solver

type solver = t
val tst : t -> term_state
val ty_st : t -> ty_state
val stats : t -> Sidekick_util.Stat.t

Actions for the theories

type actions
module Lit = Lit
type lit = Lit.t

Congruence Closure

module CC : Sidekick_core.CC_S with module T = T and module P = P and module Lit = Lit and type Actions.t = actions
val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end
type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit
val simplifier : t -> Simplify.t
val simp_t : t -> term -> term

hooks for the theory

val propagate : t -> actions -> lit -> reason:(unit -> lit list) -> proof -> unit

Propagate a literal for a reason. This is similar to asserting the clause reason => lit, but more lightweight, and in a way that is backtrackable.

val raise_conflict : t -> actions -> lit list -> proof -> 'a

Give a conflict clause to the solver

val push_decision : t -> actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : t -> actions -> lit -> (unit -> lit list) -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> actions -> lit -> lit list -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> actions -> lit list -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : t -> actions -> lit list -> unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> actions -> ?⁠sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val preprocess_term : t -> add_clause:(Lit.t list -> unit) -> term -> term

Preprocess a term.

val add_lit : t -> actions -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value

val add_lit_t : t -> actions -> ?⁠sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit

Callback called on every CC conflict

val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list) -> unit) -> unit

Callback called on every CC propagation

val on_partial_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

type preprocess_hook = t -> mk_lit:(term -> lit) -> add_clause:(lit list -> unit) -> term -> term option

Given a term, try to preprocess it. Return None if it didn't change. Can also add clauses to define new terms.

parameter mk_lit

creates a new literal for a boolean term.

parameter add_clause

pushes a new clause into the SAT solver.

val on_preprocess : t -> preprocess_hook -> unit

Model production

type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option

A model-production hook. It takes the solver, a class, and returns a term for this class.

val on_model_gen : t -> model_hook -> unit
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/Make/argument-1-A/S/T/Fun/index.html b/dev/sidekick-arith/Sidekick_arith_lra/Make/argument-1-A/S/T/Fun/index.html new file mode 100644 index 00000000..f2171a0d --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/Make/argument-1-A/S/T/Fun/index.html @@ -0,0 +1,2 @@ + +Fun (sidekick-arith.Sidekick_arith_lra.Make.1-A.S.T.Fun)

Module T.Fun

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/Make/argument-1-A/S/T/Term/index.html b/dev/sidekick-arith/Sidekick_arith_lra/Make/argument-1-A/S/T/Term/index.html new file mode 100644 index 00000000..f7d04f7a --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/Make/argument-1-A/S/T/Term/index.html @@ -0,0 +1,2 @@ + +Term (sidekick-arith.Sidekick_arith_lra.Make.1-A.S.T.Term)

Module T.Term

type t
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type state
val ty : t -> Ty.t
val bool : state -> bool -> t
val as_bool : t -> bool option
val abs : state -> t -> t * bool
val map_shallow : state -> (t -> t) -> t -> t

Map function on immediate subterms

val iter_dag : t -> (t -> unit) -> unit
module Tbl : CCHashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/Make/argument-1-A/S/T/Ty/index.html b/dev/sidekick-arith/Sidekick_arith_lra/Make/argument-1-A/S/T/Ty/index.html new file mode 100644 index 00000000..7d4dd0a7 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/Make/argument-1-A/S/T/Ty/index.html @@ -0,0 +1,2 @@ + +Ty (sidekick-arith.Sidekick_arith_lra.Make.1-A.S.T.Ty)

Module T.Ty

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type state
val bool : state -> t
val is_bool : t -> bool
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/Make/argument-1-A/S/T/index.html b/dev/sidekick-arith/Sidekick_arith_lra/Make/argument-1-A/S/T/index.html new file mode 100644 index 00000000..1d3b9d5a --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/Make/argument-1-A/S/T/index.html @@ -0,0 +1,2 @@ + +T (sidekick-arith.Sidekick_arith_lra.Make.1-A.S.T)

Module S.T

module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/Make/argument-1-A/S/Unknown/index.html b/dev/sidekick-arith/Sidekick_arith_lra/Make/argument-1-A/S/Unknown/index.html new file mode 100644 index 00000000..8a189194 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/Make/argument-1-A/S/Unknown/index.html @@ -0,0 +1,2 @@ + +Unknown (sidekick-arith.Sidekick_arith_lra.Make.1-A.S.Unknown)

Module S.Unknown

type t
val pp : t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/Make/argument-1-A/S/index.html b/dev/sidekick-arith/Sidekick_arith_lra/Make/argument-1-A/S/index.html new file mode 100644 index 00000000..6c3fd37d --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/Make/argument-1-A/S/index.html @@ -0,0 +1,2 @@ + +S (sidekick-arith.Sidekick_arith_lra.Make.1-A.S)

Module 1-A.S

module Lit : Sidekick_core.LIT with module T = T
module Solver_internal : Sidekick_core.SOLVER_INTERNAL with module T = T and module P = P and module Lit = Lit

Internal solver, available to theories.

type t
type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t
type lemma = P.t
module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

type 'a theory_p = (module THEORY with type t = 'a)

A theory that can be used for this particular solver, with state of type 'a.

val mk_theory : name:string -> create_and_setup:(Solver_internal.t -> 'th) -> ?⁠push_level:('th -> unit) -> ?⁠pop_levels:('th -> int -> unit) -> unit -> theory

Helper to create a theory

module Atom : sig ... end
module Model : sig ... end
module Unknown : sig ... end
module Proof : sig ... end
type proof = Proof.t

Main API

val stats : t -> Sidekick_util.Stat.t
val tst : t -> T.Term.state
val ty_st : t -> T.Ty.state
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠size:[ `Big | `Tiny | `Small ] -> ?⁠store_proof:bool -> theories:theory list -> T.Term.state -> T.Ty.state -> unit -> t

Create a new solver.

parameter theories

theories to load from the start.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val add_theory_p : t -> 'a theory_p -> 'a

Add the given theory and obtain its state

val add_theory_l : t -> theory list -> unit
val mk_atom_lit : t -> lit -> Atom.t
val mk_atom_t : t -> ?⁠sign:bool -> term -> Atom.t
val add_clause : t -> Atom.t Sidekick_util.IArray.t -> unit
val add_clause_l : t -> Atom.t list -> unit
type res =
| Sat of Model.t
| Unsat of {
proof : proof option lazy_t;
unsat_core : Atom.t list lazy_t;
}
| Unknown of Unknown.t

Result of solving for the current set of clauses

val solve : ?⁠on_exit:(unit -> unit) list -> ?⁠check:bool -> ?⁠on_progress:(t -> unit) -> assumptions:Atom.t list -> t -> res

solve s checks the satisfiability of the statement added so far to s

parameter check

if true, the model is checked before returning

parameter assumptions

a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

parameter on_exit

functions to be run before this returns

val pp_stats : t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/Make/argument-1-A/S/module-type-THEORY/index.html b/dev/sidekick-arith/Sidekick_arith_lra/Make/argument-1-A/S/module-type-THEORY/index.html new file mode 100644 index 00000000..0b44929a --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/Make/argument-1-A/S/module-type-THEORY/index.html @@ -0,0 +1,2 @@ + +THEORY (sidekick-arith.Sidekick_arith_lra.Make.1-A.S.THEORY)

Module type S.THEORY

A theory

Theories are abstracted over the concrete implementation of the solver, so they can work with any implementation.

Typically a theory should be a functor taking an argument containing a SOLVER_INTERNAL or even a full SOLVER, and some additional views on terms, literals, etc. that are specific to the theory (e.g. to map terms to linear expressions). The theory can then be instantiated on any kind of solver for any term representation that also satisfies the additional theory-specific requirements. Instantiated theories (ie values of type Sidekick_core.SOLVER.theory) can be added to the solver.

type t

The theory's state

val name : string

Name of the theory

val create_and_setup : Solver_internal.t -> t

Instantiate the theory's state for the given (internal) solver, register callbacks, create keys, etc.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Pop backtracking levels, restoring the theory to its former state

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/Make/argument-1-A/index.html b/dev/sidekick-arith/Sidekick_arith_lra/Make/argument-1-A/index.html new file mode 100644 index 00000000..d56dc872 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/Make/argument-1-A/index.html @@ -0,0 +1,2 @@ + +1-A (sidekick-arith.Sidekick_arith_lra.Make.1-A)

Parameter Make.1-A

type term = S.T.Term.t
type ty = S.T.Ty.t
val view_as_lra : term -> term lra_view

Project the term into the theory view

val mk_bool : S.T.Term.state -> bool -> term
val mk_lra : S.T.Term.state -> term lra_view -> term

Make a term from the given theory view

val ty_lra : S.T.Term.state -> ty
val mk_eq : S.T.Term.state -> term -> term -> term

syntactic equality

val has_ty_real : term -> bool

Does this term have the type Real

module Gensym : sig ... end
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/Make/index.html b/dev/sidekick-arith/Sidekick_arith_lra/Make/index.html new file mode 100644 index 00000000..0ebfa8ba --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/Make/index.html @@ -0,0 +1,2 @@ + +Make (sidekick-arith.Sidekick_arith_lra.Make)

Module Sidekick_arith_lra.Make

Parameters

Signature

module A = A
type state
val create : ?⁠stat:Sidekick_util.Stat.t -> A.S.T.Term.state -> A.S.T.Ty.state -> state
val theory : A.S.theory
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/Predicate/index.html b/dev/sidekick-arith/Sidekick_arith_lra/Predicate/index.html new file mode 100644 index 00000000..e9df801e --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/Predicate/index.html @@ -0,0 +1,2 @@ + +Predicate (sidekick-arith.Sidekick_arith_lra.Predicate)

Module Sidekick_arith_lra.Predicate

type t =
| Leq
| Geq
| Lt
| Gt
| Eq
| Neq
val neg : t -> t
val neg_sign : t -> t
val to_string : t -> string
val pp : Sidekick_util.Fmt.t -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/Simplex2/Make/Constraint/index.html b/dev/sidekick-arith/Sidekick_arith_lra/Simplex2/Make/Constraint/index.html new file mode 100644 index 00000000..52e00bc4 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/Simplex2/Make/Constraint/index.html @@ -0,0 +1,2 @@ + +Constraint (sidekick-arith.Sidekick_arith_lra.Simplex2.Make.Constraint)

Module Make.Constraint

type op = Op.t
type t = {
op : op;
lhs : V.t;
rhs : num;
}

A constraint is the comparison of a variable to a constant.

val mk : V.t -> op -> num -> t
val leq : V.t -> num -> t
val lt : V.t -> num -> t
val geq : V.t -> num -> t
val gt : V.t -> num -> t
val pp : t Sidekick_util.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/Simplex2/Make/Subst/index.html b/dev/sidekick-arith/Sidekick_arith_lra/Simplex2/Make/Subst/index.html new file mode 100644 index 00000000..70fc5304 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/Simplex2/Make/Subst/index.html @@ -0,0 +1,2 @@ + +Subst (sidekick-arith.Sidekick_arith_lra.Simplex2.Make.Subst)

Module Make.Subst

type t = num V_map.t
val eval : t -> V.t -> Q.t
val pp : t Sidekick_util.Fmt.printer
val to_string : t -> string
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/Simplex2/Make/Unsat_cert/index.html b/dev/sidekick-arith/Sidekick_arith_lra/Simplex2/Make/Unsat_cert/index.html new file mode 100644 index 00000000..9789f1b3 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/Simplex2/Make/Unsat_cert/index.html @@ -0,0 +1,2 @@ + +Unsat_cert (sidekick-arith.Sidekick_arith_lra.Simplex2.Make.Unsat_cert)

Module Make.Unsat_cert

type t = unsat_cert
val lits : t -> V.lit list
val pp : t Sidekick_util.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/Simplex2/Make/argument-1-Var/index.html b/dev/sidekick-arith/Sidekick_arith_lra/Simplex2/Make/argument-1-Var/index.html new file mode 100644 index 00000000..027e96d6 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/Simplex2/Make/argument-1-Var/index.html @@ -0,0 +1,2 @@ + +1-Var (sidekick-arith.Sidekick_arith_lra.Simplex2.Make.1-Var)

Parameter Make.1-Var

type t

Variable type.

val compare : t -> t -> int

Standard comparison function on variables.

val pp : t Sidekick_util.Fmt.printer

Printer for variables.

type lit
val pp_lit : lit Sidekick_util.Fmt.printer
val not_lit : lit -> lit option
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/Simplex2/Make/index.html b/dev/sidekick-arith/Sidekick_arith_lra/Simplex2/Make/index.html new file mode 100644 index 00000000..891d1711 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/Simplex2/Make/index.html @@ -0,0 +1,2 @@ + +Make (sidekick-arith.Sidekick_arith_lra.Simplex2.Make)

Module Simplex2.Make

Parameters

Signature

module V = Var
module V_map : CCMap.S with type V_map.key = V.t
type num = Q.t

Numbers

module Constraint : sig ... end
module Subst : sig ... end
type t
val create : ?⁠stat:Sidekick_util.Stat.t -> unit -> t

Create a new simplex.

val push_level : t -> unit
val pop_levels : t -> int -> unit
val define : t -> V.t -> (num * V.t) list -> unit

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 Constraint.t

type unsat_cert
module Unsat_cert : sig ... end
exception E_unsat of Unsat_cert.t
type ev_on_propagate = V.lit -> reason:V.lit list -> unit
val add_var : t -> V.t -> unit

Make sure the variable exists in the simplex.

val add_constraint : on_propagate:ev_on_propagate -> t -> Constraint.t -> V.lit -> unit

Add a constraint to the simplex.

raises Unsat

if it's immediately obvious that this is not satisfiable.

val declare_bound : t -> Constraint.t -> V.lit -> unit

Declare that this constraint exists, so we can possibly propagate it. Unlike add_constraint this does NOT assert that the constraint is true

val check_exn : on_propagate:(V.lit -> reason:V.lit list -> unit) -> t -> unit

Check the whole simplex for satisfiability.

parameter on_propagate

is called with arguments lit, reason whenever reason => lit is found to be true by the simplex.

raises Unsat

if the constraints are not satisfiable.

type result =
| Sat of Subst.t
| Unsat of Unsat_cert.t
val check : on_propagate:(V.lit -> reason:V.lit list -> unit) -> t -> result

Call check_exn and return a model or a proof of unsat.

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/Simplex2/Op/index.html b/dev/sidekick-arith/Sidekick_arith_lra/Simplex2/Op/index.html new file mode 100644 index 00000000..429e4d05 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/Simplex2/Op/index.html @@ -0,0 +1,2 @@ + +Op (sidekick-arith.Sidekick_arith_lra.Simplex2.Op)

Module Simplex2.Op

Basic operator

type t =
| Leq
| Lt
| Geq
| Gt
val neg_sign : t -> t
val not_ : t -> t
val to_string : t -> string
val pp : Sidekick_util.Fmt.t -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/Simplex2/index.html b/dev/sidekick-arith/Sidekick_arith_lra/Simplex2/index.html new file mode 100644 index 00000000..b402b6a1 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/Simplex2/index.html @@ -0,0 +1,2 @@ + +Simplex2 (sidekick-arith.Sidekick_arith_lra.Simplex2)

Module Sidekick_arith_lra.Simplex2

Fast Simplex for CDCL(T)

We follow the paper "Integrating Simplex with DPLL(T )" from de Moura and Dutertre.

module Op : sig ... end
module type S = sig ... end
module Make : functor (Var : VAR) -> S with module V = Var
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/Simplex2/module-type-S/Constraint/index.html b/dev/sidekick-arith/Sidekick_arith_lra/Simplex2/module-type-S/Constraint/index.html new file mode 100644 index 00000000..6698cd6f --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/Simplex2/module-type-S/Constraint/index.html @@ -0,0 +1,2 @@ + +Constraint (sidekick-arith.Sidekick_arith_lra.Simplex2.S.Constraint)

Module S.Constraint

type op = Op.t
type t = {
op : op;
lhs : V.t;
rhs : num;
}

A constraint is the comparison of a variable to a constant.

val mk : V.t -> op -> num -> t
val leq : V.t -> num -> t
val lt : V.t -> num -> t
val geq : V.t -> num -> t
val gt : V.t -> num -> t
val pp : t Sidekick_util.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/Simplex2/module-type-S/Subst/index.html b/dev/sidekick-arith/Sidekick_arith_lra/Simplex2/module-type-S/Subst/index.html new file mode 100644 index 00000000..1c87f7bf --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/Simplex2/module-type-S/Subst/index.html @@ -0,0 +1,2 @@ + +Subst (sidekick-arith.Sidekick_arith_lra.Simplex2.S.Subst)

Module S.Subst

type t = num V_map.t
val eval : t -> V.t -> Q.t
val pp : t Sidekick_util.Fmt.printer
val to_string : t -> string
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/Simplex2/module-type-S/Unsat_cert/index.html b/dev/sidekick-arith/Sidekick_arith_lra/Simplex2/module-type-S/Unsat_cert/index.html new file mode 100644 index 00000000..42624508 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/Simplex2/module-type-S/Unsat_cert/index.html @@ -0,0 +1,2 @@ + +Unsat_cert (sidekick-arith.Sidekick_arith_lra.Simplex2.S.Unsat_cert)

Module S.Unsat_cert

type t = unsat_cert
val lits : t -> V.lit list
val pp : t Sidekick_util.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/Simplex2/module-type-S/V/index.html b/dev/sidekick-arith/Sidekick_arith_lra/Simplex2/module-type-S/V/index.html new file mode 100644 index 00000000..9245d9ee --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/Simplex2/module-type-S/V/index.html @@ -0,0 +1,2 @@ + +V (sidekick-arith.Sidekick_arith_lra.Simplex2.S.V)

Module S.V

type t

Variable type.

val compare : t -> t -> int

Standard comparison function on variables.

val pp : t Sidekick_util.Fmt.printer

Printer for variables.

type lit
val pp_lit : lit Sidekick_util.Fmt.printer
val not_lit : lit -> lit option
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/Simplex2/module-type-S/index.html b/dev/sidekick-arith/Sidekick_arith_lra/Simplex2/module-type-S/index.html new file mode 100644 index 00000000..7e75b738 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/Simplex2/module-type-S/index.html @@ -0,0 +1,2 @@ + +S (sidekick-arith.Sidekick_arith_lra.Simplex2.S)

Module type Simplex2.S

module V : VAR
module V_map : CCMap.S with type V_map.key = V.t
type num = Q.t

Numbers

module Constraint : sig ... end
module Subst : sig ... end
type t
val create : ?⁠stat:Sidekick_util.Stat.t -> unit -> t

Create a new simplex.

val push_level : t -> unit
val pop_levels : t -> int -> unit
val define : t -> V.t -> (num * V.t) list -> unit

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 Constraint.t

type unsat_cert
module Unsat_cert : sig ... end
exception E_unsat of Unsat_cert.t
type ev_on_propagate = V.lit -> reason:V.lit list -> unit
val add_var : t -> V.t -> unit

Make sure the variable exists in the simplex.

val add_constraint : on_propagate:ev_on_propagate -> t -> Constraint.t -> V.lit -> unit

Add a constraint to the simplex.

raises Unsat

if it's immediately obvious that this is not satisfiable.

val declare_bound : t -> Constraint.t -> V.lit -> unit

Declare that this constraint exists, so we can possibly propagate it. Unlike add_constraint this does NOT assert that the constraint is true

val check_exn : on_propagate:(V.lit -> reason:V.lit list -> unit) -> t -> unit

Check the whole simplex for satisfiability.

parameter on_propagate

is called with arguments lit, reason whenever reason => lit is found to be true by the simplex.

raises Unsat

if the constraints are not satisfiable.

type result =
| Sat of Subst.t
| Unsat of Unsat_cert.t
val check : on_propagate:(V.lit -> reason:V.lit list -> unit) -> t -> result

Call check_exn and return a model or a proof of unsat.

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/Simplex2/module-type-VAR/index.html b/dev/sidekick-arith/Sidekick_arith_lra/Simplex2/module-type-VAR/index.html new file mode 100644 index 00000000..c6b13ea3 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/Simplex2/module-type-VAR/index.html @@ -0,0 +1,2 @@ + +VAR (sidekick-arith.Sidekick_arith_lra.Simplex2.VAR)

Module type Simplex2.VAR

type t

Variable type.

val compare : t -> t -> int

Standard comparison function on variables.

val pp : t Sidekick_util.Fmt.printer

Printer for variables.

type lit
val pp_lit : lit Sidekick_util.Fmt.printer
val not_lit : lit -> lit option
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/index.html b/dev/sidekick-arith/Sidekick_arith_lra/index.html new file mode 100644 index 00000000..9d950b6d --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/index.html @@ -0,0 +1,2 @@ + +Sidekick_arith_lra (sidekick-arith.Sidekick_arith_lra)

Module Sidekick_arith_lra

Linear Rational Arithmetic

module Simplex2 : sig ... end
module Predicate : sig ... end
module Linear_expr : sig ... end

Arithmetic expressions

module S_op = Simplex2.Op
type pred = Sidekick_arith_lra__.Linear_expr_intf.bool_op =
| Leq
| Geq
| Lt
| Gt
| Eq
| Neq
type op =
| Plus
| Minus
type 'a lra_view =
| LRA_pred of pred * 'a * 'a
| LRA_op of op * 'a * 'a
| LRA_mult of Q.t * 'a
| LRA_const of Q.t
| LRA_simplex_var of 'a
| LRA_simplex_pred of 'a * S_op.t * Q.t
| LRA_other of 'a
val map_view : ('a -> 'b) -> 'a lra_view -> 'b lra_view
module type ARG = sig ... end
module type S = sig ... end
module Make : functor (A : ARG) -> S with module A = A
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/module-type-ARG/Gensym/index.html b/dev/sidekick-arith/Sidekick_arith_lra/module-type-ARG/Gensym/index.html new file mode 100644 index 00000000..6d50879f --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/module-type-ARG/Gensym/index.html @@ -0,0 +1,2 @@ + +Gensym (sidekick-arith.Sidekick_arith_lra.ARG.Gensym)

Module ARG.Gensym

type t
val create : S.T.Term.state -> t
val tst : t -> S.T.Term.state
val copy : t -> t
val fresh_term : t -> pre:string -> S.T.Ty.t -> term

Make a fresh term of the given type

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/module-type-ARG/S/Atom/index.html b/dev/sidekick-arith/Sidekick_arith_lra/module-type-ARG/S/Atom/index.html new file mode 100644 index 00000000..d0f0b510 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/module-type-ARG/S/Atom/index.html @@ -0,0 +1,2 @@ + +Atom (sidekick-arith.Sidekick_arith_lra.ARG.S.Atom)

Module S.Atom

Boolean Atoms

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t CCFormat.printer
val neg : t -> t
val formula : t -> lit
val sign : t -> bool
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/module-type-ARG/S/Lit/index.html b/dev/sidekick-arith/Sidekick_arith_lra/module-type-ARG/S/Lit/index.html new file mode 100644 index 00000000..0570a036 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/module-type-ARG/S/Lit/index.html @@ -0,0 +1,2 @@ + +Lit (sidekick-arith.Sidekick_arith_lra.ARG.S.Lit)

Module S.Lit

module T = T
type t
val term : t -> T.Term.t
val sign : t -> bool
val neg : t -> t
val abs : t -> t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/module-type-ARG/S/Model/index.html b/dev/sidekick-arith/Sidekick_arith_lra/module-type-ARG/S/Model/index.html new file mode 100644 index 00000000..929c23f2 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/module-type-ARG/S/Model/index.html @@ -0,0 +1,2 @@ + +Model (sidekick-arith.Sidekick_arith_lra.ARG.S.Model)

Module S.Model

type t
val empty : t
val mem : t -> term -> bool
val find : t -> term -> term option
val eval : t -> term -> term option
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/module-type-ARG/S/P/index.html b/dev/sidekick-arith/Sidekick_arith_lra/module-type-ARG/S/P/index.html new file mode 100644 index 00000000..f4167e2c --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/module-type-ARG/S/P/index.html @@ -0,0 +1,2 @@ + +P (sidekick-arith.Sidekick_arith_lra.ARG.S.P)

Module S.P

type t
val pp : t Sidekick_core.Fmt.printer
val default : t
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/module-type-ARG/S/Proof/index.html b/dev/sidekick-arith/Sidekick_arith_lra/module-type-ARG/S/Proof/index.html new file mode 100644 index 00000000..1597ec58 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/module-type-ARG/S/Proof/index.html @@ -0,0 +1,2 @@ + +Proof (sidekick-arith.Sidekick_arith_lra.ARG.S.Proof)

Module S.Proof

type t
val check : t -> unit
val pp_dot : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/module-type-ARG/S/Solver_internal/CC/Actions/index.html b/dev/sidekick-arith/Sidekick_arith_lra/module-type-ARG/S/Solver_internal/CC/Actions/index.html new file mode 100644 index 00000000..d8ad0349 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/module-type-ARG/S/Solver_internal/CC/Actions/index.html @@ -0,0 +1,2 @@ + +Actions (sidekick-arith.Sidekick_arith_lra.ARG.S.Solver_internal.CC.Actions)

Module CC.Actions

module T = T
module P = P
module Lit = Lit
type t = actions
val raise_conflict : t -> Lit.t list -> P.t -> 'a
val propagate : t -> Lit.t -> reason:(unit -> Lit.t list) -> P.t -> unit
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/module-type-ARG/S/Solver_internal/CC/Expl/index.html b/dev/sidekick-arith/Sidekick_arith_lra/module-type-ARG/S/Solver_internal/CC/Expl/index.html new file mode 100644 index 00000000..530afbc0 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/module-type-ARG/S/Solver_internal/CC/Expl/index.html @@ -0,0 +1,2 @@ + +Expl (sidekick-arith.Sidekick_arith_lra.ARG.S.Solver_internal.CC.Expl)

Module CC.Expl

type t
val pp : t Sidekick_core.Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
val mk_theory : t -> t
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/module-type-ARG/S/Solver_internal/CC/N/index.html b/dev/sidekick-arith/Sidekick_arith_lra/module-type-ARG/S/Solver_internal/CC/N/index.html new file mode 100644 index 00000000..a530ba0e --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/module-type-ARG/S/Solver_internal/CC/N/index.html @@ -0,0 +1,2 @@ + +N (sidekick-arith.Sidekick_arith_lra.ARG.S.Solver_internal.CC.N)

Module CC.N

An equivalence class is a set of terms that are currently equal in the partial model built by the solver. The class is represented by a collection of nodes, one of which is distinguished and is called the "representative".

All information pertaining to the whole equivalence class is stored in this representative's node.

When two classes become equal (are "merged"), one of the two representatives is picked as the representative of the new class. The new class contains the union of the two old classes' nodes.

We also allow theories to store additional information in the representative. This information can be used when two classes are merged, to detect conflicts and solve equations à la Shostak.

type t
val term : t -> term
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
val is_root : t -> bool

Is the node a root (ie the representative of its class)?

val iter_class : t -> t Iter.t

Traverse the congruence class. Precondition: is_root n (see find below)

val iter_parents : t -> t Iter.t

Traverse the parents of the class. Precondition: is_root n (see find below)

type bitfield

A field in the bitfield of this node. This should only be allocated when a theory is initialized.

All fields are initially 0, are backtracked automatically, and are merged automatically when classes are merged.

val get_field : bitfield -> t -> bool
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/module-type-ARG/S/Solver_internal/CC/index.html b/dev/sidekick-arith/Sidekick_arith_lra/module-type-ARG/S/Solver_internal/CC/index.html new file mode 100644 index 00000000..767441bc --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/module-type-ARG/S/Solver_internal/CC/index.html @@ -0,0 +1,2 @@ + +CC (sidekick-arith.Sidekick_arith_lra.ARG.S.Solver_internal.CC)

Module Solver_internal.CC

module T = T
module P = P
module Lit = Lit
module Actions : Sidekick_core.CC_ACTIONS with module T = T and module Lit = Lit and module P = P and type t = actions
type term_state = T.Term.state
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type proof = P.t
type actions = Actions.t
type t

Global state of the congruence closure

module N : sig ... end

An equivalence class is a set of terms that are currently equal in the partial model built by the solver. The class is represented by a collection of nodes, one of which is distinguished and is called the "representative".

module Expl : sig ... end
type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t
val term_state : t -> term_state
val find : t -> node -> repr

Current representative

val add_term : t -> term -> node

Add the term to the congruence closure, if not present already. Will be backtracked.

val mem_term : t -> term -> bool

Returns true if the term is explicitly present in the congruence closure

type ev_on_pre_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit
type ev_on_post_merge = t -> actions -> N.t -> N.t -> unit
type ev_on_new_term = t -> N.t -> term -> unit
type ev_on_conflict = t -> th:bool -> lit list -> unit
type ev_on_propagate = t -> lit -> (unit -> lit list) -> unit
type ev_on_is_subterm = N.t -> term -> unit
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_pre_merge:ev_on_pre_merge list -> ?⁠on_post_merge:ev_on_post_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠on_is_subterm:ev_on_is_subterm list -> ?⁠size:[ `Small | `Big ] -> term_state -> t

Create a new congruence closure.

val allocate_bitfield : descr:string -> t -> N.bitfield

Allocate a new bitfield for the nodes. See N.bitfield.

val set_bitfield : t -> N.bitfield -> bool -> N.t -> unit

Set the bitfield for the node. This will be backtracked. See N.bitfield.

val on_pre_merge : t -> ev_on_pre_merge -> unit

Add a function to be called when two classes are merged

val on_post_merge : t -> ev_on_post_merge -> unit

Add a function to be called when two classes are merged

val on_new_term : t -> ev_on_new_term -> unit

Add a function to be called when a new node is created

val on_conflict : t -> ev_on_conflict -> unit

Called when the congruence closure finds a conflict

val on_propagate : t -> ev_on_propagate -> unit

Called when the congruence closure propagates a literal

val on_is_subterm : t -> ev_on_is_subterm -> unit

Called on terms that are subterms of function symbols

val set_as_lit : t -> N.t -> lit -> unit

map the given node to a literal.

val find_t : t -> term -> repr

Current representative of the term.

raises Not_found

if the term is not already add-ed.

val add_seq : t -> term Iter.t -> unit

Add a sequence of terms to the congruence closure

val all_classes : t -> repr Iter.t

All current classes. This is costly, only use if there is no other solution

val assert_lit : t -> lit -> unit

Given a literal, assume it in the congruence closure and propagate its consequences. Will be backtracked.

Useful for the theory combination or the SAT solver's functor

val assert_lits : t -> lit Iter.t -> unit

Addition of many literals

val explain_eq : t -> N.t -> N.t -> lit list

Explain why the two nodes are equal. Fails if they are not, in an unspecified way

val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given explanation it must be a theory tautology that expl ==> absurd. To be used in theories.

val n_true : t -> N.t
val n_false : t -> N.t
val n_bool : t -> bool -> N.t
val merge : t -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val merge_t : t -> term -> term -> Expl.t -> unit

Shortcut for adding + merging

val check : t -> actions -> unit

Perform all pending operations done via assert_eq, assert_lit, etc. Will use the actions to propagate literals, declare conflicts, etc.

val new_merges : t -> bool

Called after check, returns true if some pairs of classes were merged.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Restore to state n calls to push_level earlier. Used during backtracking.

val get_model : t -> N.t Iter.t Iter.t

get all the equivalence classes so they can be merged in the model

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/module-type-ARG/S/Solver_internal/Simplify/index.html b/dev/sidekick-arith/Sidekick_arith_lra/module-type-ARG/S/Solver_internal/Simplify/index.html new file mode 100644 index 00000000..33ca650e --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/module-type-ARG/S/Solver_internal/Simplify/index.html @@ -0,0 +1,2 @@ + +Simplify (sidekick-arith.Sidekick_arith_lra.ARG.S.Solver_internal.Simplify)

Module Solver_internal.Simplify

type t
val tst : t -> term_state
val ty_st : t -> ty_state
val clear : t -> unit

Reset internal cache, etc.

type hook = t -> term -> term option

Given a term, try to simplify it. Return None if it didn't change.

val normalize : t -> term -> term

Normalize a term using all the hooks.

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/module-type-ARG/S/Solver_internal/index.html b/dev/sidekick-arith/Sidekick_arith_lra/module-type-ARG/S/Solver_internal/index.html new file mode 100644 index 00000000..811b383a --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/module-type-ARG/S/Solver_internal/index.html @@ -0,0 +1,2 @@ + +Solver_internal (sidekick-arith.Sidekick_arith_lra.ARG.S.Solver_internal)

Module S.Solver_internal

Internal solver, available to theories.

module T = T
module P = P
type ty = T.Ty.t
type term = T.Term.t
type term_state = T.Term.state
type ty_state = T.Ty.state
type proof = P.t
type t

Main type for a solver

type solver = t
val tst : t -> term_state
val ty_st : t -> ty_state
val stats : t -> Sidekick_util.Stat.t

Actions for the theories

type actions
module Lit = Lit
type lit = Lit.t

Congruence Closure

module CC : Sidekick_core.CC_S with module T = T and module P = P and module Lit = Lit and type Actions.t = actions
val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end
type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit
val simplifier : t -> Simplify.t
val simp_t : t -> term -> term

hooks for the theory

val propagate : t -> actions -> lit -> reason:(unit -> lit list) -> proof -> unit

Propagate a literal for a reason. This is similar to asserting the clause reason => lit, but more lightweight, and in a way that is backtrackable.

val raise_conflict : t -> actions -> lit list -> proof -> 'a

Give a conflict clause to the solver

val push_decision : t -> actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : t -> actions -> lit -> (unit -> lit list) -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> actions -> lit -> lit list -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> actions -> lit list -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : t -> actions -> lit list -> unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> actions -> ?⁠sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val preprocess_term : t -> add_clause:(Lit.t list -> unit) -> term -> term

Preprocess a term.

val add_lit : t -> actions -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value

val add_lit_t : t -> actions -> ?⁠sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit

Callback called on every CC conflict

val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list) -> unit) -> unit

Callback called on every CC propagation

val on_partial_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

type preprocess_hook = t -> mk_lit:(term -> lit) -> add_clause:(lit list -> unit) -> term -> term option

Given a term, try to preprocess it. Return None if it didn't change. Can also add clauses to define new terms.

parameter mk_lit

creates a new literal for a boolean term.

parameter add_clause

pushes a new clause into the SAT solver.

val on_preprocess : t -> preprocess_hook -> unit

Model production

type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option

A model-production hook. It takes the solver, a class, and returns a term for this class.

val on_model_gen : t -> model_hook -> unit
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/module-type-ARG/S/T/Fun/index.html b/dev/sidekick-arith/Sidekick_arith_lra/module-type-ARG/S/T/Fun/index.html new file mode 100644 index 00000000..ad68393f --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/module-type-ARG/S/T/Fun/index.html @@ -0,0 +1,2 @@ + +Fun (sidekick-arith.Sidekick_arith_lra.ARG.S.T.Fun)

Module T.Fun

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/module-type-ARG/S/T/Term/index.html b/dev/sidekick-arith/Sidekick_arith_lra/module-type-ARG/S/T/Term/index.html new file mode 100644 index 00000000..90066480 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/module-type-ARG/S/T/Term/index.html @@ -0,0 +1,2 @@ + +Term (sidekick-arith.Sidekick_arith_lra.ARG.S.T.Term)

Module T.Term

type t
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type state
val ty : t -> Ty.t
val bool : state -> bool -> t
val as_bool : t -> bool option
val abs : state -> t -> t * bool
val map_shallow : state -> (t -> t) -> t -> t

Map function on immediate subterms

val iter_dag : t -> (t -> unit) -> unit
module Tbl : CCHashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/module-type-ARG/S/T/Ty/index.html b/dev/sidekick-arith/Sidekick_arith_lra/module-type-ARG/S/T/Ty/index.html new file mode 100644 index 00000000..1be93adb --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/module-type-ARG/S/T/Ty/index.html @@ -0,0 +1,2 @@ + +Ty (sidekick-arith.Sidekick_arith_lra.ARG.S.T.Ty)

Module T.Ty

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type state
val bool : state -> t
val is_bool : t -> bool
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/module-type-ARG/S/T/index.html b/dev/sidekick-arith/Sidekick_arith_lra/module-type-ARG/S/T/index.html new file mode 100644 index 00000000..f364c99e --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/module-type-ARG/S/T/index.html @@ -0,0 +1,2 @@ + +T (sidekick-arith.Sidekick_arith_lra.ARG.S.T)

Module S.T

module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/module-type-ARG/S/Unknown/index.html b/dev/sidekick-arith/Sidekick_arith_lra/module-type-ARG/S/Unknown/index.html new file mode 100644 index 00000000..5338a621 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/module-type-ARG/S/Unknown/index.html @@ -0,0 +1,2 @@ + +Unknown (sidekick-arith.Sidekick_arith_lra.ARG.S.Unknown)

Module S.Unknown

type t
val pp : t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/module-type-ARG/S/index.html b/dev/sidekick-arith/Sidekick_arith_lra/module-type-ARG/S/index.html new file mode 100644 index 00000000..04f53261 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/module-type-ARG/S/index.html @@ -0,0 +1,2 @@ + +S (sidekick-arith.Sidekick_arith_lra.ARG.S)

Module ARG.S

module Lit : Sidekick_core.LIT with module T = T
module Solver_internal : Sidekick_core.SOLVER_INTERNAL with module T = T and module P = P and module Lit = Lit

Internal solver, available to theories.

type t
type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t
type lemma = P.t
module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

type 'a theory_p = (module THEORY with type t = 'a)

A theory that can be used for this particular solver, with state of type 'a.

val mk_theory : name:string -> create_and_setup:(Solver_internal.t -> 'th) -> ?⁠push_level:('th -> unit) -> ?⁠pop_levels:('th -> int -> unit) -> unit -> theory

Helper to create a theory

module Atom : sig ... end
module Model : sig ... end
module Unknown : sig ... end
module Proof : sig ... end
type proof = Proof.t

Main API

val stats : t -> Sidekick_util.Stat.t
val tst : t -> T.Term.state
val ty_st : t -> T.Ty.state
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠size:[ `Big | `Tiny | `Small ] -> ?⁠store_proof:bool -> theories:theory list -> T.Term.state -> T.Ty.state -> unit -> t

Create a new solver.

parameter theories

theories to load from the start.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val add_theory_p : t -> 'a theory_p -> 'a

Add the given theory and obtain its state

val add_theory_l : t -> theory list -> unit
val mk_atom_lit : t -> lit -> Atom.t
val mk_atom_t : t -> ?⁠sign:bool -> term -> Atom.t
val add_clause : t -> Atom.t Sidekick_util.IArray.t -> unit
val add_clause_l : t -> Atom.t list -> unit
type res =
| Sat of Model.t
| Unsat of {
proof : proof option lazy_t;
unsat_core : Atom.t list lazy_t;
}
| Unknown of Unknown.t

Result of solving for the current set of clauses

val solve : ?⁠on_exit:(unit -> unit) list -> ?⁠check:bool -> ?⁠on_progress:(t -> unit) -> assumptions:Atom.t list -> t -> res

solve s checks the satisfiability of the statement added so far to s

parameter check

if true, the model is checked before returning

parameter assumptions

a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

parameter on_exit

functions to be run before this returns

val pp_stats : t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/module-type-ARG/S/module-type-THEORY/index.html b/dev/sidekick-arith/Sidekick_arith_lra/module-type-ARG/S/module-type-THEORY/index.html new file mode 100644 index 00000000..d29f2304 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/module-type-ARG/S/module-type-THEORY/index.html @@ -0,0 +1,2 @@ + +THEORY (sidekick-arith.Sidekick_arith_lra.ARG.S.THEORY)

Module type S.THEORY

A theory

Theories are abstracted over the concrete implementation of the solver, so they can work with any implementation.

Typically a theory should be a functor taking an argument containing a SOLVER_INTERNAL or even a full SOLVER, and some additional views on terms, literals, etc. that are specific to the theory (e.g. to map terms to linear expressions). The theory can then be instantiated on any kind of solver for any term representation that also satisfies the additional theory-specific requirements. Instantiated theories (ie values of type Sidekick_core.SOLVER.theory) can be added to the solver.

type t

The theory's state

val name : string

Name of the theory

val create_and_setup : Solver_internal.t -> t

Instantiate the theory's state for the given (internal) solver, register callbacks, create keys, etc.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Pop backtracking levels, restoring the theory to its former state

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/module-type-ARG/index.html b/dev/sidekick-arith/Sidekick_arith_lra/module-type-ARG/index.html new file mode 100644 index 00000000..91c3e5e0 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/module-type-ARG/index.html @@ -0,0 +1,2 @@ + +ARG (sidekick-arith.Sidekick_arith_lra.ARG)

Module type Sidekick_arith_lra.ARG

type term = S.T.Term.t
type ty = S.T.Ty.t
val view_as_lra : term -> term lra_view

Project the term into the theory view

val mk_bool : S.T.Term.state -> bool -> term
val mk_lra : S.T.Term.state -> term lra_view -> term

Make a term from the given theory view

val ty_lra : S.T.Term.state -> ty
val mk_eq : S.T.Term.state -> term -> term -> term

syntactic equality

val has_ty_real : term -> bool

Does this term have the type Real

module Gensym : sig ... end
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/module-type-S/A/Gensym/index.html b/dev/sidekick-arith/Sidekick_arith_lra/module-type-S/A/Gensym/index.html new file mode 100644 index 00000000..118ee03f --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/module-type-S/A/Gensym/index.html @@ -0,0 +1,2 @@ + +Gensym (sidekick-arith.Sidekick_arith_lra.S.A.Gensym)

Module A.Gensym

type t
val create : S.T.Term.state -> t
val tst : t -> S.T.Term.state
val copy : t -> t
val fresh_term : t -> pre:string -> S.T.Ty.t -> term

Make a fresh term of the given type

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/module-type-S/A/S/Atom/index.html b/dev/sidekick-arith/Sidekick_arith_lra/module-type-S/A/S/Atom/index.html new file mode 100644 index 00000000..d5e950d6 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/module-type-S/A/S/Atom/index.html @@ -0,0 +1,2 @@ + +Atom (sidekick-arith.Sidekick_arith_lra.S.A.S.Atom)

Module S.Atom

Boolean Atoms

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t CCFormat.printer
val neg : t -> t
val formula : t -> lit
val sign : t -> bool
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/module-type-S/A/S/Lit/index.html b/dev/sidekick-arith/Sidekick_arith_lra/module-type-S/A/S/Lit/index.html new file mode 100644 index 00000000..050d9290 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/module-type-S/A/S/Lit/index.html @@ -0,0 +1,2 @@ + +Lit (sidekick-arith.Sidekick_arith_lra.S.A.S.Lit)

Module S.Lit

module T = T
type t
val term : t -> T.Term.t
val sign : t -> bool
val neg : t -> t
val abs : t -> t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/module-type-S/A/S/Model/index.html b/dev/sidekick-arith/Sidekick_arith_lra/module-type-S/A/S/Model/index.html new file mode 100644 index 00000000..eb9f7da5 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/module-type-S/A/S/Model/index.html @@ -0,0 +1,2 @@ + +Model (sidekick-arith.Sidekick_arith_lra.S.A.S.Model)

Module S.Model

type t
val empty : t
val mem : t -> term -> bool
val find : t -> term -> term option
val eval : t -> term -> term option
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/module-type-S/A/S/P/index.html b/dev/sidekick-arith/Sidekick_arith_lra/module-type-S/A/S/P/index.html new file mode 100644 index 00000000..502df474 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/module-type-S/A/S/P/index.html @@ -0,0 +1,2 @@ + +P (sidekick-arith.Sidekick_arith_lra.S.A.S.P)

Module S.P

type t
val pp : t Sidekick_core.Fmt.printer
val default : t
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/module-type-S/A/S/Proof/index.html b/dev/sidekick-arith/Sidekick_arith_lra/module-type-S/A/S/Proof/index.html new file mode 100644 index 00000000..6f210a34 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/module-type-S/A/S/Proof/index.html @@ -0,0 +1,2 @@ + +Proof (sidekick-arith.Sidekick_arith_lra.S.A.S.Proof)

Module S.Proof

type t
val check : t -> unit
val pp_dot : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/module-type-S/A/S/Solver_internal/CC/Actions/index.html b/dev/sidekick-arith/Sidekick_arith_lra/module-type-S/A/S/Solver_internal/CC/Actions/index.html new file mode 100644 index 00000000..1f99b23c --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/module-type-S/A/S/Solver_internal/CC/Actions/index.html @@ -0,0 +1,2 @@ + +Actions (sidekick-arith.Sidekick_arith_lra.S.A.S.Solver_internal.CC.Actions)

Module CC.Actions

module T = T
module P = P
module Lit = Lit
type t = actions
val raise_conflict : t -> Lit.t list -> P.t -> 'a
val propagate : t -> Lit.t -> reason:(unit -> Lit.t list) -> P.t -> unit
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/module-type-S/A/S/Solver_internal/CC/Expl/index.html b/dev/sidekick-arith/Sidekick_arith_lra/module-type-S/A/S/Solver_internal/CC/Expl/index.html new file mode 100644 index 00000000..39b24b4b --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/module-type-S/A/S/Solver_internal/CC/Expl/index.html @@ -0,0 +1,2 @@ + +Expl (sidekick-arith.Sidekick_arith_lra.S.A.S.Solver_internal.CC.Expl)

Module CC.Expl

type t
val pp : t Sidekick_core.Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
val mk_theory : t -> t
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/module-type-S/A/S/Solver_internal/CC/N/index.html b/dev/sidekick-arith/Sidekick_arith_lra/module-type-S/A/S/Solver_internal/CC/N/index.html new file mode 100644 index 00000000..227ec2ad --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/module-type-S/A/S/Solver_internal/CC/N/index.html @@ -0,0 +1,2 @@ + +N (sidekick-arith.Sidekick_arith_lra.S.A.S.Solver_internal.CC.N)

Module CC.N

An equivalence class is a set of terms that are currently equal in the partial model built by the solver. The class is represented by a collection of nodes, one of which is distinguished and is called the "representative".

All information pertaining to the whole equivalence class is stored in this representative's node.

When two classes become equal (are "merged"), one of the two representatives is picked as the representative of the new class. The new class contains the union of the two old classes' nodes.

We also allow theories to store additional information in the representative. This information can be used when two classes are merged, to detect conflicts and solve equations à la Shostak.

type t
val term : t -> term
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
val is_root : t -> bool

Is the node a root (ie the representative of its class)?

val iter_class : t -> t Iter.t

Traverse the congruence class. Precondition: is_root n (see find below)

val iter_parents : t -> t Iter.t

Traverse the parents of the class. Precondition: is_root n (see find below)

type bitfield

A field in the bitfield of this node. This should only be allocated when a theory is initialized.

All fields are initially 0, are backtracked automatically, and are merged automatically when classes are merged.

val get_field : bitfield -> t -> bool
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/module-type-S/A/S/Solver_internal/CC/index.html b/dev/sidekick-arith/Sidekick_arith_lra/module-type-S/A/S/Solver_internal/CC/index.html new file mode 100644 index 00000000..adbdc072 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/module-type-S/A/S/Solver_internal/CC/index.html @@ -0,0 +1,2 @@ + +CC (sidekick-arith.Sidekick_arith_lra.S.A.S.Solver_internal.CC)

Module Solver_internal.CC

module T = T
module P = P
module Lit = Lit
module Actions : Sidekick_core.CC_ACTIONS with module T = T and module Lit = Lit and module P = P and type t = actions
type term_state = T.Term.state
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type proof = P.t
type actions = Actions.t
type t

Global state of the congruence closure

module N : sig ... end

An equivalence class is a set of terms that are currently equal in the partial model built by the solver. The class is represented by a collection of nodes, one of which is distinguished and is called the "representative".

module Expl : sig ... end
type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t
val term_state : t -> term_state
val find : t -> node -> repr

Current representative

val add_term : t -> term -> node

Add the term to the congruence closure, if not present already. Will be backtracked.

val mem_term : t -> term -> bool

Returns true if the term is explicitly present in the congruence closure

type ev_on_pre_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit
type ev_on_post_merge = t -> actions -> N.t -> N.t -> unit
type ev_on_new_term = t -> N.t -> term -> unit
type ev_on_conflict = t -> th:bool -> lit list -> unit
type ev_on_propagate = t -> lit -> (unit -> lit list) -> unit
type ev_on_is_subterm = N.t -> term -> unit
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_pre_merge:ev_on_pre_merge list -> ?⁠on_post_merge:ev_on_post_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠on_is_subterm:ev_on_is_subterm list -> ?⁠size:[ `Small | `Big ] -> term_state -> t

Create a new congruence closure.

val allocate_bitfield : descr:string -> t -> N.bitfield

Allocate a new bitfield for the nodes. See N.bitfield.

val set_bitfield : t -> N.bitfield -> bool -> N.t -> unit

Set the bitfield for the node. This will be backtracked. See N.bitfield.

val on_pre_merge : t -> ev_on_pre_merge -> unit

Add a function to be called when two classes are merged

val on_post_merge : t -> ev_on_post_merge -> unit

Add a function to be called when two classes are merged

val on_new_term : t -> ev_on_new_term -> unit

Add a function to be called when a new node is created

val on_conflict : t -> ev_on_conflict -> unit

Called when the congruence closure finds a conflict

val on_propagate : t -> ev_on_propagate -> unit

Called when the congruence closure propagates a literal

val on_is_subterm : t -> ev_on_is_subterm -> unit

Called on terms that are subterms of function symbols

val set_as_lit : t -> N.t -> lit -> unit

map the given node to a literal.

val find_t : t -> term -> repr

Current representative of the term.

raises Not_found

if the term is not already add-ed.

val add_seq : t -> term Iter.t -> unit

Add a sequence of terms to the congruence closure

val all_classes : t -> repr Iter.t

All current classes. This is costly, only use if there is no other solution

val assert_lit : t -> lit -> unit

Given a literal, assume it in the congruence closure and propagate its consequences. Will be backtracked.

Useful for the theory combination or the SAT solver's functor

val assert_lits : t -> lit Iter.t -> unit

Addition of many literals

val explain_eq : t -> N.t -> N.t -> lit list

Explain why the two nodes are equal. Fails if they are not, in an unspecified way

val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given explanation it must be a theory tautology that expl ==> absurd. To be used in theories.

val n_true : t -> N.t
val n_false : t -> N.t
val n_bool : t -> bool -> N.t
val merge : t -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val merge_t : t -> term -> term -> Expl.t -> unit

Shortcut for adding + merging

val check : t -> actions -> unit

Perform all pending operations done via assert_eq, assert_lit, etc. Will use the actions to propagate literals, declare conflicts, etc.

val new_merges : t -> bool

Called after check, returns true if some pairs of classes were merged.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Restore to state n calls to push_level earlier. Used during backtracking.

val get_model : t -> N.t Iter.t Iter.t

get all the equivalence classes so they can be merged in the model

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/module-type-S/A/S/Solver_internal/Simplify/index.html b/dev/sidekick-arith/Sidekick_arith_lra/module-type-S/A/S/Solver_internal/Simplify/index.html new file mode 100644 index 00000000..880e92cb --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/module-type-S/A/S/Solver_internal/Simplify/index.html @@ -0,0 +1,2 @@ + +Simplify (sidekick-arith.Sidekick_arith_lra.S.A.S.Solver_internal.Simplify)

Module Solver_internal.Simplify

type t
val tst : t -> term_state
val ty_st : t -> ty_state
val clear : t -> unit

Reset internal cache, etc.

type hook = t -> term -> term option

Given a term, try to simplify it. Return None if it didn't change.

val normalize : t -> term -> term

Normalize a term using all the hooks.

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/module-type-S/A/S/Solver_internal/index.html b/dev/sidekick-arith/Sidekick_arith_lra/module-type-S/A/S/Solver_internal/index.html new file mode 100644 index 00000000..9cac7d52 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/module-type-S/A/S/Solver_internal/index.html @@ -0,0 +1,2 @@ + +Solver_internal (sidekick-arith.Sidekick_arith_lra.S.A.S.Solver_internal)

Module S.Solver_internal

Internal solver, available to theories.

module T = T
module P = P
type ty = T.Ty.t
type term = T.Term.t
type term_state = T.Term.state
type ty_state = T.Ty.state
type proof = P.t
type t

Main type for a solver

type solver = t
val tst : t -> term_state
val ty_st : t -> ty_state
val stats : t -> Sidekick_util.Stat.t

Actions for the theories

type actions
module Lit = Lit
type lit = Lit.t

Congruence Closure

module CC : Sidekick_core.CC_S with module T = T and module P = P and module Lit = Lit and type Actions.t = actions
val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end
type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit
val simplifier : t -> Simplify.t
val simp_t : t -> term -> term

hooks for the theory

val propagate : t -> actions -> lit -> reason:(unit -> lit list) -> proof -> unit

Propagate a literal for a reason. This is similar to asserting the clause reason => lit, but more lightweight, and in a way that is backtrackable.

val raise_conflict : t -> actions -> lit list -> proof -> 'a

Give a conflict clause to the solver

val push_decision : t -> actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : t -> actions -> lit -> (unit -> lit list) -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> actions -> lit -> lit list -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> actions -> lit list -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : t -> actions -> lit list -> unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> actions -> ?⁠sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val preprocess_term : t -> add_clause:(Lit.t list -> unit) -> term -> term

Preprocess a term.

val add_lit : t -> actions -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value

val add_lit_t : t -> actions -> ?⁠sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit

Callback called on every CC conflict

val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list) -> unit) -> unit

Callback called on every CC propagation

val on_partial_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

type preprocess_hook = t -> mk_lit:(term -> lit) -> add_clause:(lit list -> unit) -> term -> term option

Given a term, try to preprocess it. Return None if it didn't change. Can also add clauses to define new terms.

parameter mk_lit

creates a new literal for a boolean term.

parameter add_clause

pushes a new clause into the SAT solver.

val on_preprocess : t -> preprocess_hook -> unit

Model production

type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option

A model-production hook. It takes the solver, a class, and returns a term for this class.

val on_model_gen : t -> model_hook -> unit
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/module-type-S/A/S/T/Fun/index.html b/dev/sidekick-arith/Sidekick_arith_lra/module-type-S/A/S/T/Fun/index.html new file mode 100644 index 00000000..9c6a0793 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/module-type-S/A/S/T/Fun/index.html @@ -0,0 +1,2 @@ + +Fun (sidekick-arith.Sidekick_arith_lra.S.A.S.T.Fun)

Module T.Fun

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/module-type-S/A/S/T/Term/index.html b/dev/sidekick-arith/Sidekick_arith_lra/module-type-S/A/S/T/Term/index.html new file mode 100644 index 00000000..c07c7f5d --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/module-type-S/A/S/T/Term/index.html @@ -0,0 +1,2 @@ + +Term (sidekick-arith.Sidekick_arith_lra.S.A.S.T.Term)

Module T.Term

type t
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type state
val ty : t -> Ty.t
val bool : state -> bool -> t
val as_bool : t -> bool option
val abs : state -> t -> t * bool
val map_shallow : state -> (t -> t) -> t -> t

Map function on immediate subterms

val iter_dag : t -> (t -> unit) -> unit
module Tbl : CCHashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/module-type-S/A/S/T/Ty/index.html b/dev/sidekick-arith/Sidekick_arith_lra/module-type-S/A/S/T/Ty/index.html new file mode 100644 index 00000000..f2f1f645 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/module-type-S/A/S/T/Ty/index.html @@ -0,0 +1,2 @@ + +Ty (sidekick-arith.Sidekick_arith_lra.S.A.S.T.Ty)

Module T.Ty

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type state
val bool : state -> t
val is_bool : t -> bool
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/module-type-S/A/S/T/index.html b/dev/sidekick-arith/Sidekick_arith_lra/module-type-S/A/S/T/index.html new file mode 100644 index 00000000..e46ee23a --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/module-type-S/A/S/T/index.html @@ -0,0 +1,2 @@ + +T (sidekick-arith.Sidekick_arith_lra.S.A.S.T)

Module S.T

module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/module-type-S/A/S/Unknown/index.html b/dev/sidekick-arith/Sidekick_arith_lra/module-type-S/A/S/Unknown/index.html new file mode 100644 index 00000000..efd7a0aa --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/module-type-S/A/S/Unknown/index.html @@ -0,0 +1,2 @@ + +Unknown (sidekick-arith.Sidekick_arith_lra.S.A.S.Unknown)

Module S.Unknown

type t
val pp : t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/module-type-S/A/S/index.html b/dev/sidekick-arith/Sidekick_arith_lra/module-type-S/A/S/index.html new file mode 100644 index 00000000..9ac74a22 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/module-type-S/A/S/index.html @@ -0,0 +1,2 @@ + +S (sidekick-arith.Sidekick_arith_lra.S.A.S)

Module A.S

module Lit : Sidekick_core.LIT with module T = T
module Solver_internal : Sidekick_core.SOLVER_INTERNAL with module T = T and module P = P and module Lit = Lit

Internal solver, available to theories.

type t
type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t
type lemma = P.t
module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

type 'a theory_p = (module THEORY with type t = 'a)

A theory that can be used for this particular solver, with state of type 'a.

val mk_theory : name:string -> create_and_setup:(Solver_internal.t -> 'th) -> ?⁠push_level:('th -> unit) -> ?⁠pop_levels:('th -> int -> unit) -> unit -> theory

Helper to create a theory

module Atom : sig ... end
module Model : sig ... end
module Unknown : sig ... end
module Proof : sig ... end
type proof = Proof.t

Main API

val stats : t -> Sidekick_util.Stat.t
val tst : t -> T.Term.state
val ty_st : t -> T.Ty.state
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠size:[ `Big | `Tiny | `Small ] -> ?⁠store_proof:bool -> theories:theory list -> T.Term.state -> T.Ty.state -> unit -> t

Create a new solver.

parameter theories

theories to load from the start.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val add_theory_p : t -> 'a theory_p -> 'a

Add the given theory and obtain its state

val add_theory_l : t -> theory list -> unit
val mk_atom_lit : t -> lit -> Atom.t
val mk_atom_t : t -> ?⁠sign:bool -> term -> Atom.t
val add_clause : t -> Atom.t Sidekick_util.IArray.t -> unit
val add_clause_l : t -> Atom.t list -> unit
type res =
| Sat of Model.t
| Unsat of {
proof : proof option lazy_t;
unsat_core : Atom.t list lazy_t;
}
| Unknown of Unknown.t

Result of solving for the current set of clauses

val solve : ?⁠on_exit:(unit -> unit) list -> ?⁠check:bool -> ?⁠on_progress:(t -> unit) -> assumptions:Atom.t list -> t -> res

solve s checks the satisfiability of the statement added so far to s

parameter check

if true, the model is checked before returning

parameter assumptions

a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

parameter on_exit

functions to be run before this returns

val pp_stats : t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/module-type-S/A/S/module-type-THEORY/index.html b/dev/sidekick-arith/Sidekick_arith_lra/module-type-S/A/S/module-type-THEORY/index.html new file mode 100644 index 00000000..5d8069bb --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/module-type-S/A/S/module-type-THEORY/index.html @@ -0,0 +1,2 @@ + +THEORY (sidekick-arith.Sidekick_arith_lra.S.A.S.THEORY)

Module type S.THEORY

A theory

Theories are abstracted over the concrete implementation of the solver, so they can work with any implementation.

Typically a theory should be a functor taking an argument containing a SOLVER_INTERNAL or even a full SOLVER, and some additional views on terms, literals, etc. that are specific to the theory (e.g. to map terms to linear expressions). The theory can then be instantiated on any kind of solver for any term representation that also satisfies the additional theory-specific requirements. Instantiated theories (ie values of type Sidekick_core.SOLVER.theory) can be added to the solver.

type t

The theory's state

val name : string

Name of the theory

val create_and_setup : Solver_internal.t -> t

Instantiate the theory's state for the given (internal) solver, register callbacks, create keys, etc.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Pop backtracking levels, restoring the theory to its former state

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/module-type-S/A/index.html b/dev/sidekick-arith/Sidekick_arith_lra/module-type-S/A/index.html new file mode 100644 index 00000000..a5ba382c --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/module-type-S/A/index.html @@ -0,0 +1,2 @@ + +A (sidekick-arith.Sidekick_arith_lra.S.A)

Module S.A

type term = S.T.Term.t
type ty = S.T.Ty.t
val view_as_lra : term -> term lra_view

Project the term into the theory view

val mk_bool : S.T.Term.state -> bool -> term
val mk_lra : S.T.Term.state -> term lra_view -> term

Make a term from the given theory view

val ty_lra : S.T.Term.state -> ty
val mk_eq : S.T.Term.state -> term -> term -> term

syntactic equality

val has_ty_real : term -> bool

Does this term have the type Real

module Gensym : sig ... end
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra/module-type-S/index.html b/dev/sidekick-arith/Sidekick_arith_lra/module-type-S/index.html new file mode 100644 index 00000000..7a7fd2df --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra/module-type-S/index.html @@ -0,0 +1,2 @@ + +S (sidekick-arith.Sidekick_arith_lra.S)

Module type Sidekick_arith_lra.S

module A : ARG
type state
val create : ?⁠stat:Sidekick_util.Stat.t -> A.S.T.Term.state -> A.S.T.Ty.state -> state
val theory : A.S.theory
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__Lexer/.dune-keep b/dev/sidekick-arith/Sidekick_arith_lra__/.dune-keep similarity index 100% rename from dev/sidekick-bin/Sidekick_smtlib__Lexer/.dune-keep rename to dev/sidekick-arith/Sidekick_arith_lra__/.dune-keep diff --git a/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr/Make/Comb/Infix/index.html b/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr/Make/Comb/Infix/index.html new file mode 100644 index 00000000..b8a1e18a --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr/Make/Comb/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (sidekick-arith.Sidekick_arith_lra__.Linear_expr.Make.Comb.Infix)

Module Comb.Infix

Infix operations on combinations

This module defines usual operations on linear combinations, as infix operators to ease reading of complex computations.

val (+) : t -> t -> t

Addition between combinations.

val (-) : t -> t -> t

Substraction between combinations.

val (*) : C.t -> t -> t

Multiplication by a constant.

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr/Make/Comb/index.html b/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr/Make/Comb/index.html new file mode 100644 index 00000000..ac3c8916 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr/Make/Comb/index.html @@ -0,0 +1,2 @@ + +Comb (sidekick-arith.Sidekick_arith_lra__.Linear_expr.Make.Comb)

Module Make.Comb

Combinations.

This module defines linear combnations as mapping from variables to coefficients. This allows for very fast computations.

type t

The type of linear combinations.

val compare : t -> t -> int

Comparisons on linear combinations.

val pp : t Sidekick_util.Fmt.printer

Printer for linear combinations.

val is_empty : t -> bool

Is the given expression empty ?

Creation
val empty : t

The empty linear combination.

val monomial : C.t -> var -> t

monome n v creates the linear combination n * v

val monomial1 : var -> t

monome1 v creates the linear combination 1 * v

val as_singleton : t -> (C.t * var) option

as_singleton l returns Some (c,x) if l = c * x, None otherwise

val add : C.t -> var -> t -> t

add n v t adds the monome n * v to the combination t.

module Infix : sig ... end

Infix operations on combinations

Include the previous module.

include module type of Infix
val (+) : t -> t -> t

Addition between combinations.

val (-) : t -> t -> t

Substraction between combinations.

val (*) : C.t -> t -> t

Multiplication by a constant.

val iter : (var -> C.t -> unit) -> t -> unit
val of_list : (C.t * var) list -> t
val to_list : t -> (C.t * var) list

Converters to and from lists of monomes.

val of_map : C.t Var_map.t -> t
val to_map : t -> C.t Var_map.t
Semantics
val eval : subst -> t -> C.t

Evaluate a linear combination given a substitution for its variables. TODO: document potential exceptions raised ?

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr/Make/Constr/index.html b/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr/Make/Constr/index.html new file mode 100644 index 00000000..eb67226a --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr/Make/Constr/index.html @@ -0,0 +1,2 @@ + +Constr (sidekick-arith.Sidekick_arith_lra__.Linear_expr.Make.Constr)

Module Make.Constr

Linear constraints.

Represents constraints on linear expressions.

type op = Sidekick_arith_lra__.Linear_expr_intf.bool_op

Arithmetic comparison operators.

type t = {
expr : Expr.t;
op : op;
}

Linear constraints. Expressions are implicitly compared to zero.

val compare : t -> t -> int

Standard comparison function.

val pp : t Sidekick_util.Fmt.printer

Standard printing function.

val of_expr : Expr.t -> Sidekick_arith_lra__.Linear_expr_intf.bool_op -> t
val make : Comb.t -> Sidekick_arith_lra__.Linear_expr_intf.bool_op -> C.t -> t

Create a constraint from a linear expression/combination and a constant.

val geq : Comb.t -> C.t -> t
val leq : Comb.t -> C.t -> t
val gt : Comb.t -> C.t -> t
val lt : Comb.t -> C.t -> t
val eq : Comb.t -> C.t -> t
val neq : Comb.t -> C.t -> t
val geq0 : Expr.t -> t
val leq0 : Expr.t -> t
val gt0 : Expr.t -> t
val lt0 : Expr.t -> t
val eq0 : Expr.t -> t
val neq0 : Expr.t -> t
val op : t -> Sidekick_arith_lra__.Linear_expr_intf.bool_op
val expr : t -> Expr.t

Extract the given part from a constraint.

val split : t -> Comb.t * Sidekick_arith_lra__.Linear_expr_intf.bool_op * C.t

Split the linear combinations from the constant

val eval : subst -> t -> bool

Evaluate the given constraint under a substitution.

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr/Make/Expr/Infix/index.html b/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr/Make/Expr/Infix/index.html new file mode 100644 index 00000000..ded6c6dc --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr/Make/Expr/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (sidekick-arith.Sidekick_arith_lra__.Linear_expr.Make.Expr.Infix)

Module Expr.Infix

Infix operations on expressions

This module defines usual operations on linear expressions, as infix operators to ease reading of complex computations.

val (+) : t -> t -> t

Addition between expressions.

val (-) : t -> t -> t

Substraction between expressions.

val (*) : C.t -> t -> t

Multiplication by a constant.

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr/Make/Expr/index.html b/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr/Make/Expr/index.html new file mode 100644 index 00000000..9693524b --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr/Make/Expr/index.html @@ -0,0 +1,2 @@ + +Expr (sidekick-arith.Sidekick_arith_lra__.Linear_expr.Make.Expr)

Module Make.Expr

Linear expressions represent linear arithmetic expressions as a linear combination and a constant.

type t

The type of linear expressions.

val comb : t -> Comb.t
val const : t -> C.t
val is_zero : t -> bool
val is_const : t -> bool
val compare : t -> t -> int

Standard comparison function on expressions.

val pp : t Sidekick_util.Fmt.printer

Standard printing function on expressions.

val zero : t

The expression 2.

val of_const : C.t -> t

The constant expression.

val of_comb : Comb.t -> t

Combination without constant

val of_list : C.t -> (C.t * Var.t) list -> t
val make : Comb.t -> C.t -> t

make c n makes the linear expression c + n.

val monomial : C.t -> var -> t
val monomial1 : var -> t
module Infix : sig ... end

Infix operations on expressions

Include the previous module.

include module type of Infix
val (+) : t -> t -> t

Addition between expressions.

val (-) : t -> t -> t

Substraction between expressions.

val (*) : C.t -> t -> t

Multiplication by a constant.

Semantics
val eval : subst -> t -> C.t

Evaluate a linear expression given a substitution for its variables. TODO: document potential exceptions raised ?

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr/Make/argument-1-C/index.html b/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr/Make/argument-1-C/index.html new file mode 100644 index 00000000..54ca5429 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr/Make/argument-1-C/index.html @@ -0,0 +1,2 @@ + +1-C (sidekick-arith.Sidekick_arith_lra__.Linear_expr.Make.1-C)

Parameter Make.1-C

type t
val equal : t -> t -> bool

Equality on coefficients.

val compare : t -> t -> int

Comparison on coefficients.

val pp : t Sidekick_util.Fmt.printer

Printer for coefficients.

val zero : t

The zero coefficient.

val one : t

The one coefficient (to rule them all, :p).

val neg : t -> t

Unary negation

val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t

Standard operations on coefficients.

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr/Make/argument-2-Var/index.html b/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr/Make/argument-2-Var/index.html new file mode 100644 index 00000000..3e927c41 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr/Make/argument-2-Var/index.html @@ -0,0 +1,2 @@ + +2-Var (sidekick-arith.Sidekick_arith_lra__.Linear_expr.Make.2-Var)

Parameter Make.2-Var

type t

Variable type.

val compare : t -> t -> int

Standard comparison function on variables.

val pp : t Sidekick_util.Fmt.printer

Printer for variables.

type lit
val pp_lit : lit Sidekick_util.Fmt.printer
val not_lit : lit -> lit option
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr/Make/index.html b/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr/Make/index.html new file mode 100644 index 00000000..9422d8a3 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr/Make/index.html @@ -0,0 +1,2 @@ + +Make (sidekick-arith.Sidekick_arith_lra__.Linear_expr.Make)

Module Linear_expr.Make

Parameters

Signature

module C = C

Coeficients used. Can be integers as well as rationals.

module Var = Var

Variables used in expressions.

type var = Var.t

The type of variables appearing in expressions.

module Var_map = CCMap.Make(Var)

Maps from variables, used for expressions as well as substitutions.

type subst = C.t Var_map.t

Type for substitutions.

module Comb : sig ... end

Combinations.

Linear expressions.

module Expr : sig ... end

Linear expressions represent linear arithmetic expressions as a linear combination and a constant.

module Constr : sig ... end
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr/index.html b/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr/index.html new file mode 100644 index 00000000..8cae799a --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr/index.html @@ -0,0 +1,2 @@ + +Linear_expr (sidekick-arith.Sidekick_arith_lra__.Linear_expr)

Module Sidekick_arith_lra__.Linear_expr

type nonrec bool_op = Sidekick_arith_lra__.Linear_expr_intf.bool_op =
| Leq
| Geq
| Lt
| Gt
| Eq
| Neq
module Make : functor (C : COEFF) -> functor (Var : VAR) -> S with module C = C and module Var = Var and module Var_map = CCMap.Make(Var)
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr/module-type-COEFF/index.html b/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr/module-type-COEFF/index.html new file mode 100644 index 00000000..62806260 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr/module-type-COEFF/index.html @@ -0,0 +1,2 @@ + +COEFF (sidekick-arith.Sidekick_arith_lra__.Linear_expr.COEFF)

Module type Linear_expr.COEFF

type t
val equal : t -> t -> bool

Equality on coefficients.

val compare : t -> t -> int

Comparison on coefficients.

val pp : t Sidekick_util.Fmt.printer

Printer for coefficients.

val zero : t

The zero coefficient.

val one : t

The one coefficient (to rule them all, :p).

val neg : t -> t

Unary negation

val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t

Standard operations on coefficients.

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr/module-type-S/C/index.html b/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr/module-type-S/C/index.html new file mode 100644 index 00000000..294d1b19 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr/module-type-S/C/index.html @@ -0,0 +1,2 @@ + +C (sidekick-arith.Sidekick_arith_lra__.Linear_expr.S.C)

Module S.C

Coeficients used. Can be integers as well as rationals.

type t
val equal : t -> t -> bool

Equality on coefficients.

val compare : t -> t -> int

Comparison on coefficients.

val pp : t Sidekick_util.Fmt.printer

Printer for coefficients.

val zero : t

The zero coefficient.

val one : t

The one coefficient (to rule them all, :p).

val neg : t -> t

Unary negation

val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t

Standard operations on coefficients.

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr/module-type-S/Comb/Infix/index.html b/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr/module-type-S/Comb/Infix/index.html new file mode 100644 index 00000000..e88b5e87 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr/module-type-S/Comb/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (sidekick-arith.Sidekick_arith_lra__.Linear_expr.S.Comb.Infix)

Module Comb.Infix

Infix operations on combinations

This module defines usual operations on linear combinations, as infix operators to ease reading of complex computations.

val (+) : t -> t -> t

Addition between combinations.

val (-) : t -> t -> t

Substraction between combinations.

val (*) : C.t -> t -> t

Multiplication by a constant.

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr/module-type-S/Comb/index.html b/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr/module-type-S/Comb/index.html new file mode 100644 index 00000000..55449792 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr/module-type-S/Comb/index.html @@ -0,0 +1,2 @@ + +Comb (sidekick-arith.Sidekick_arith_lra__.Linear_expr.S.Comb)

Module S.Comb

Combinations.

This module defines linear combnations as mapping from variables to coefficients. This allows for very fast computations.

type t

The type of linear combinations.

val compare : t -> t -> int

Comparisons on linear combinations.

val pp : t Sidekick_util.Fmt.printer

Printer for linear combinations.

val is_empty : t -> bool

Is the given expression empty ?

Creation
val empty : t

The empty linear combination.

val monomial : C.t -> var -> t

monome n v creates the linear combination n * v

val monomial1 : var -> t

monome1 v creates the linear combination 1 * v

val as_singleton : t -> (C.t * var) option

as_singleton l returns Some (c,x) if l = c * x, None otherwise

val add : C.t -> var -> t -> t

add n v t adds the monome n * v to the combination t.

module Infix : sig ... end

Infix operations on combinations

Include the previous module.

include module type of Infix
val (+) : t -> t -> t

Addition between combinations.

val (-) : t -> t -> t

Substraction between combinations.

val (*) : C.t -> t -> t

Multiplication by a constant.

val iter : (var -> C.t -> unit) -> t -> unit
val of_list : (C.t * var) list -> t
val to_list : t -> (C.t * var) list

Converters to and from lists of monomes.

val of_map : C.t Var_map.t -> t
val to_map : t -> C.t Var_map.t
Semantics
val eval : subst -> t -> C.t

Evaluate a linear combination given a substitution for its variables. TODO: document potential exceptions raised ?

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr/module-type-S/Constr/index.html b/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr/module-type-S/Constr/index.html new file mode 100644 index 00000000..39999db4 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr/module-type-S/Constr/index.html @@ -0,0 +1,2 @@ + +Constr (sidekick-arith.Sidekick_arith_lra__.Linear_expr.S.Constr)

Module S.Constr

Linear constraints.

Represents constraints on linear expressions.

type op = Sidekick_arith_lra__.Linear_expr_intf.bool_op

Arithmetic comparison operators.

type t = {
expr : Expr.t;
op : op;
}

Linear constraints. Expressions are implicitly compared to zero.

val compare : t -> t -> int

Standard comparison function.

val pp : t Sidekick_util.Fmt.printer

Standard printing function.

val of_expr : Expr.t -> Sidekick_arith_lra__.Linear_expr_intf.bool_op -> t
val make : Comb.t -> Sidekick_arith_lra__.Linear_expr_intf.bool_op -> C.t -> t

Create a constraint from a linear expression/combination and a constant.

val geq : Comb.t -> C.t -> t
val leq : Comb.t -> C.t -> t
val gt : Comb.t -> C.t -> t
val lt : Comb.t -> C.t -> t
val eq : Comb.t -> C.t -> t
val neq : Comb.t -> C.t -> t
val geq0 : Expr.t -> t
val leq0 : Expr.t -> t
val gt0 : Expr.t -> t
val lt0 : Expr.t -> t
val eq0 : Expr.t -> t
val neq0 : Expr.t -> t
val op : t -> Sidekick_arith_lra__.Linear_expr_intf.bool_op
val expr : t -> Expr.t

Extract the given part from a constraint.

val split : t -> Comb.t * Sidekick_arith_lra__.Linear_expr_intf.bool_op * C.t

Split the linear combinations from the constant

val eval : subst -> t -> bool

Evaluate the given constraint under a substitution.

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr/module-type-S/Expr/Infix/index.html b/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr/module-type-S/Expr/Infix/index.html new file mode 100644 index 00000000..35fec89e --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr/module-type-S/Expr/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (sidekick-arith.Sidekick_arith_lra__.Linear_expr.S.Expr.Infix)

Module Expr.Infix

Infix operations on expressions

This module defines usual operations on linear expressions, as infix operators to ease reading of complex computations.

val (+) : t -> t -> t

Addition between expressions.

val (-) : t -> t -> t

Substraction between expressions.

val (*) : C.t -> t -> t

Multiplication by a constant.

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr/module-type-S/Expr/index.html b/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr/module-type-S/Expr/index.html new file mode 100644 index 00000000..92a36d55 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr/module-type-S/Expr/index.html @@ -0,0 +1,2 @@ + +Expr (sidekick-arith.Sidekick_arith_lra__.Linear_expr.S.Expr)

Module S.Expr

Linear expressions represent linear arithmetic expressions as a linear combination and a constant.

type t

The type of linear expressions.

val comb : t -> Comb.t
val const : t -> C.t
val is_zero : t -> bool
val is_const : t -> bool
val compare : t -> t -> int

Standard comparison function on expressions.

val pp : t Sidekick_util.Fmt.printer

Standard printing function on expressions.

val zero : t

The expression 2.

val of_const : C.t -> t

The constant expression.

val of_comb : Comb.t -> t

Combination without constant

val of_list : C.t -> (C.t * Var.t) list -> t
val make : Comb.t -> C.t -> t

make c n makes the linear expression c + n.

val monomial : C.t -> var -> t
val monomial1 : var -> t
module Infix : sig ... end

Infix operations on expressions

Include the previous module.

include module type of Infix
val (+) : t -> t -> t

Addition between expressions.

val (-) : t -> t -> t

Substraction between expressions.

val (*) : C.t -> t -> t

Multiplication by a constant.

Semantics
val eval : subst -> t -> C.t

Evaluate a linear expression given a substitution for its variables. TODO: document potential exceptions raised ?

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr/module-type-S/Var/index.html b/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr/module-type-S/Var/index.html new file mode 100644 index 00000000..ec91e34f --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr/module-type-S/Var/index.html @@ -0,0 +1,2 @@ + +Var (sidekick-arith.Sidekick_arith_lra__.Linear_expr.S.Var)

Module S.Var

Variables used in expressions.

type t

Variable type.

val compare : t -> t -> int

Standard comparison function on variables.

val pp : t Sidekick_util.Fmt.printer

Printer for variables.

type lit
val pp_lit : lit Sidekick_util.Fmt.printer
val not_lit : lit -> lit option
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr/module-type-S/index.html b/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr/module-type-S/index.html new file mode 100644 index 00000000..d79a6982 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr/module-type-S/index.html @@ -0,0 +1,2 @@ + +S (sidekick-arith.Sidekick_arith_lra__.Linear_expr.S)

Module type Linear_expr.S

module C : Sidekick_arith_lra__.Linear_expr_intf.COEFF

Coeficients used. Can be integers as well as rationals.

module Var : Sidekick_arith_lra__.Linear_expr_intf.VAR

Variables used in expressions.

type var = Var.t

The type of variables appearing in expressions.

module Var_map : CCMap.S with type Var_map.key = var

Maps from variables, used for expressions as well as substitutions.

type subst = C.t Var_map.t

Type for substitutions.

module Comb : sig ... end

Combinations.

Linear expressions.

module Expr : sig ... end

Linear expressions represent linear arithmetic expressions as a linear combination and a constant.

module Constr : sig ... end
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr/module-type-VAR/index.html b/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr/module-type-VAR/index.html new file mode 100644 index 00000000..e71f2571 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr/module-type-VAR/index.html @@ -0,0 +1,2 @@ + +VAR (sidekick-arith.Sidekick_arith_lra__.Linear_expr.VAR)

Module type Linear_expr.VAR

type t

Variable type.

val compare : t -> t -> int

Standard comparison function on variables.

val pp : t Sidekick_util.Fmt.printer

Printer for variables.

type lit
val pp_lit : lit Sidekick_util.Fmt.printer
val not_lit : lit -> lit option
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr_intf/index.html b/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr_intf/index.html new file mode 100644 index 00000000..13f8cb01 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr_intf/index.html @@ -0,0 +1,2 @@ + +Linear_expr_intf (sidekick-arith.Sidekick_arith_lra__.Linear_expr_intf)

Module Sidekick_arith_lra__.Linear_expr_intf

Linear expressions interface

module type COEFF = sig ... end
module type VAR = sig ... end
type bool_op = Sidekick_arith_lra.Predicate.t =
| Leq
| Geq
| Lt
| Gt
| Eq
| Neq

Linear expressions & formulas

module type S = sig ... end

Linear expressions & formulas.

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr_intf/module-type-COEFF/index.html b/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr_intf/module-type-COEFF/index.html new file mode 100644 index 00000000..5701e67e --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr_intf/module-type-COEFF/index.html @@ -0,0 +1,2 @@ + +COEFF (sidekick-arith.Sidekick_arith_lra__.Linear_expr_intf.COEFF)

Module type Linear_expr_intf.COEFF

Coefficients

Coefficients are used in expressions. They usually are either rationals, or integers.

type t
val equal : t -> t -> bool

Equality on coefficients.

val compare : t -> t -> int

Comparison on coefficients.

val pp : t Sidekick_util.Fmt.printer

Printer for coefficients.

val zero : t

The zero coefficient.

val one : t

The one coefficient (to rule them all, :p).

val neg : t -> t

Unary negation

val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t

Standard operations on coefficients.

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr_intf/module-type-S/C/index.html b/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr_intf/module-type-S/C/index.html new file mode 100644 index 00000000..93b14dc7 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr_intf/module-type-S/C/index.html @@ -0,0 +1,2 @@ + +C (sidekick-arith.Sidekick_arith_lra__.Linear_expr_intf.S.C)

Module S.C

Coeficients used. Can be integers as well as rationals.

type t
val equal : t -> t -> bool

Equality on coefficients.

val compare : t -> t -> int

Comparison on coefficients.

val pp : t Sidekick_util.Fmt.printer

Printer for coefficients.

val zero : t

The zero coefficient.

val one : t

The one coefficient (to rule them all, :p).

val neg : t -> t

Unary negation

val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t

Standard operations on coefficients.

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr_intf/module-type-S/Comb/Infix/index.html b/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr_intf/module-type-S/Comb/Infix/index.html new file mode 100644 index 00000000..d6606bf3 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr_intf/module-type-S/Comb/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (sidekick-arith.Sidekick_arith_lra__.Linear_expr_intf.S.Comb.Infix)

Module Comb.Infix

Infix operations on combinations

This module defines usual operations on linear combinations, as infix operators to ease reading of complex computations.

val (+) : t -> t -> t

Addition between combinations.

val (-) : t -> t -> t

Substraction between combinations.

val (*) : C.t -> t -> t

Multiplication by a constant.

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr_intf/module-type-S/Comb/index.html b/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr_intf/module-type-S/Comb/index.html new file mode 100644 index 00000000..f5fd13a7 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr_intf/module-type-S/Comb/index.html @@ -0,0 +1,2 @@ + +Comb (sidekick-arith.Sidekick_arith_lra__.Linear_expr_intf.S.Comb)

Module S.Comb

Combinations.

This module defines linear combnations as mapping from variables to coefficients. This allows for very fast computations.

type t

The type of linear combinations.

val compare : t -> t -> int

Comparisons on linear combinations.

val pp : t Sidekick_util.Fmt.printer

Printer for linear combinations.

val is_empty : t -> bool

Is the given expression empty ?

Creation
val empty : t

The empty linear combination.

val monomial : C.t -> var -> t

monome n v creates the linear combination n * v

val monomial1 : var -> t

monome1 v creates the linear combination 1 * v

val as_singleton : t -> (C.t * var) option

as_singleton l returns Some (c,x) if l = c * x, None otherwise

val add : C.t -> var -> t -> t

add n v t adds the monome n * v to the combination t.

module Infix : sig ... end

Infix operations on combinations

Include the previous module.

include module type of Infix
val (+) : t -> t -> t

Addition between combinations.

val (-) : t -> t -> t

Substraction between combinations.

val (*) : C.t -> t -> t

Multiplication by a constant.

val iter : (var -> C.t -> unit) -> t -> unit
val of_list : (C.t * var) list -> t
val to_list : t -> (C.t * var) list

Converters to and from lists of monomes.

val of_map : C.t Var_map.t -> t
val to_map : t -> C.t Var_map.t
Semantics
val eval : subst -> t -> C.t

Evaluate a linear combination given a substitution for its variables. TODO: document potential exceptions raised ?

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr_intf/module-type-S/Constr/index.html b/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr_intf/module-type-S/Constr/index.html new file mode 100644 index 00000000..5a0a82d1 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr_intf/module-type-S/Constr/index.html @@ -0,0 +1,2 @@ + +Constr (sidekick-arith.Sidekick_arith_lra__.Linear_expr_intf.S.Constr)

Module S.Constr

Linear constraints.

Represents constraints on linear expressions.

type op = bool_op

Arithmetic comparison operators.

type t = {
expr : Expr.t;
op : op;
}

Linear constraints. Expressions are implicitly compared to zero.

val compare : t -> t -> int

Standard comparison function.

val pp : t Sidekick_util.Fmt.printer

Standard printing function.

val of_expr : Expr.t -> bool_op -> t
val make : Comb.t -> bool_op -> C.t -> t

Create a constraint from a linear expression/combination and a constant.

val geq : Comb.t -> C.t -> t
val leq : Comb.t -> C.t -> t
val gt : Comb.t -> C.t -> t
val lt : Comb.t -> C.t -> t
val eq : Comb.t -> C.t -> t
val neq : Comb.t -> C.t -> t
val geq0 : Expr.t -> t
val leq0 : Expr.t -> t
val gt0 : Expr.t -> t
val lt0 : Expr.t -> t
val eq0 : Expr.t -> t
val neq0 : Expr.t -> t
val op : t -> bool_op
val expr : t -> Expr.t

Extract the given part from a constraint.

val split : t -> Comb.t * bool_op * C.t

Split the linear combinations from the constant

val eval : subst -> t -> bool

Evaluate the given constraint under a substitution.

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr_intf/module-type-S/Expr/Infix/index.html b/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr_intf/module-type-S/Expr/Infix/index.html new file mode 100644 index 00000000..d2e33125 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr_intf/module-type-S/Expr/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (sidekick-arith.Sidekick_arith_lra__.Linear_expr_intf.S.Expr.Infix)

Module Expr.Infix

Infix operations on expressions

This module defines usual operations on linear expressions, as infix operators to ease reading of complex computations.

val (+) : t -> t -> t

Addition between expressions.

val (-) : t -> t -> t

Substraction between expressions.

val (*) : C.t -> t -> t

Multiplication by a constant.

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr_intf/module-type-S/Expr/index.html b/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr_intf/module-type-S/Expr/index.html new file mode 100644 index 00000000..04d62715 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr_intf/module-type-S/Expr/index.html @@ -0,0 +1,2 @@ + +Expr (sidekick-arith.Sidekick_arith_lra__.Linear_expr_intf.S.Expr)

Module S.Expr

Linear expressions represent linear arithmetic expressions as a linear combination and a constant.

type t

The type of linear expressions.

val comb : t -> Comb.t
val const : t -> C.t
val is_zero : t -> bool
val is_const : t -> bool
val compare : t -> t -> int

Standard comparison function on expressions.

val pp : t Sidekick_util.Fmt.printer

Standard printing function on expressions.

val zero : t

The expression 2.

val of_const : C.t -> t

The constant expression.

val of_comb : Comb.t -> t

Combination without constant

val of_list : C.t -> (C.t * Var.t) list -> t
val make : Comb.t -> C.t -> t

make c n makes the linear expression c + n.

val monomial : C.t -> var -> t
val monomial1 : var -> t
module Infix : sig ... end

Infix operations on expressions

Include the previous module.

include module type of Infix
val (+) : t -> t -> t

Addition between expressions.

val (-) : t -> t -> t

Substraction between expressions.

val (*) : C.t -> t -> t

Multiplication by a constant.

Semantics
val eval : subst -> t -> C.t

Evaluate a linear expression given a substitution for its variables. TODO: document potential exceptions raised ?

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr_intf/module-type-S/Var/index.html b/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr_intf/module-type-S/Var/index.html new file mode 100644 index 00000000..199a9a04 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr_intf/module-type-S/Var/index.html @@ -0,0 +1,2 @@ + +Var (sidekick-arith.Sidekick_arith_lra__.Linear_expr_intf.S.Var)

Module S.Var

Variables used in expressions.

type t

Variable type.

val compare : t -> t -> int

Standard comparison function on variables.

val pp : t Sidekick_util.Fmt.printer

Printer for variables.

type lit
val pp_lit : lit Sidekick_util.Fmt.printer
val not_lit : lit -> lit option
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr_intf/module-type-S/index.html b/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr_intf/module-type-S/index.html new file mode 100644 index 00000000..e4f2a9cb --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr_intf/module-type-S/index.html @@ -0,0 +1,2 @@ + +S (sidekick-arith.Sidekick_arith_lra__.Linear_expr_intf.S)

Module type Linear_expr_intf.S

Linear expressions & formulas.

This modules defines linear expressions (which are linear combinations of variables), and linear constraints, where the value of a linear expressions is constrained.

module C : COEFF

Coeficients used. Can be integers as well as rationals.

module Var : VAR

Variables used in expressions.

type var = Var.t

The type of variables appearing in expressions.

module Var_map : CCMap.S with type Var_map.key = var

Maps from variables, used for expressions as well as substitutions.

type subst = C.t Var_map.t

Type for substitutions.

module Comb : sig ... end

Combinations.

Linear expressions.

module Expr : sig ... end

Linear expressions represent linear arithmetic expressions as a linear combination and a constant.

module Constr : sig ... end
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr_intf/module-type-VAR/index.html b/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr_intf/module-type-VAR/index.html new file mode 100644 index 00000000..179f7fb2 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__/Linear_expr_intf/module-type-VAR/index.html @@ -0,0 +1,2 @@ + +VAR (sidekick-arith.Sidekick_arith_lra__.Linear_expr_intf.VAR)

Module type Linear_expr_intf.VAR

Variable interface

Standard interface for variables that are meant to be used in expressions.

type t

Variable type.

val compare : t -> t -> int

Standard comparison function on variables.

val pp : t Sidekick_util.Fmt.printer

Printer for variables.

type lit
val pp_lit : lit Sidekick_util.Fmt.printer
val not_lit : lit -> lit option
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__/Predicate/index.html b/dev/sidekick-arith/Sidekick_arith_lra__/Predicate/index.html new file mode 100644 index 00000000..98fd3471 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__/Predicate/index.html @@ -0,0 +1,2 @@ + +Predicate (sidekick-arith.Sidekick_arith_lra__.Predicate)

Module Sidekick_arith_lra__.Predicate

type t =
| Leq
| Geq
| Lt
| Gt
| Eq
| Neq
val neg : t -> t
val neg_sign : t -> t
val to_string : t -> string
val pp : Sidekick_util.Fmt.t -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__/Simplex2/Make/Constraint/index.html b/dev/sidekick-arith/Sidekick_arith_lra__/Simplex2/Make/Constraint/index.html new file mode 100644 index 00000000..99384aa5 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__/Simplex2/Make/Constraint/index.html @@ -0,0 +1,2 @@ + +Constraint (sidekick-arith.Sidekick_arith_lra__.Simplex2.Make.Constraint)

Module Make.Constraint

type op = Op.t
type t = {
op : op;
lhs : V.t;
rhs : num;
}

A constraint is the comparison of a variable to a constant.

val mk : V.t -> op -> num -> t
val leq : V.t -> num -> t
val lt : V.t -> num -> t
val geq : V.t -> num -> t
val gt : V.t -> num -> t
val pp : t Sidekick_util.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__/Simplex2/Make/Subst/index.html b/dev/sidekick-arith/Sidekick_arith_lra__/Simplex2/Make/Subst/index.html new file mode 100644 index 00000000..91bdde78 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__/Simplex2/Make/Subst/index.html @@ -0,0 +1,2 @@ + +Subst (sidekick-arith.Sidekick_arith_lra__.Simplex2.Make.Subst)

Module Make.Subst

type t = num V_map.t
val eval : t -> V.t -> Q.t
val pp : t Sidekick_util.Fmt.printer
val to_string : t -> string
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__/Simplex2/Make/Unsat_cert/index.html b/dev/sidekick-arith/Sidekick_arith_lra__/Simplex2/Make/Unsat_cert/index.html new file mode 100644 index 00000000..24a7e8d9 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__/Simplex2/Make/Unsat_cert/index.html @@ -0,0 +1,2 @@ + +Unsat_cert (sidekick-arith.Sidekick_arith_lra__.Simplex2.Make.Unsat_cert)

Module Make.Unsat_cert

type t = unsat_cert
val lits : t -> V.lit list
val pp : t Sidekick_util.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__/Simplex2/Make/argument-1-Var/index.html b/dev/sidekick-arith/Sidekick_arith_lra__/Simplex2/Make/argument-1-Var/index.html new file mode 100644 index 00000000..b141be62 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__/Simplex2/Make/argument-1-Var/index.html @@ -0,0 +1,2 @@ + +1-Var (sidekick-arith.Sidekick_arith_lra__.Simplex2.Make.1-Var)

Parameter Make.1-Var

type t

Variable type.

val compare : t -> t -> int

Standard comparison function on variables.

val pp : t Sidekick_util.Fmt.printer

Printer for variables.

type lit
val pp_lit : lit Sidekick_util.Fmt.printer
val not_lit : lit -> lit option
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__/Simplex2/Make/index.html b/dev/sidekick-arith/Sidekick_arith_lra__/Simplex2/Make/index.html new file mode 100644 index 00000000..51e5f7a3 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__/Simplex2/Make/index.html @@ -0,0 +1,2 @@ + +Make (sidekick-arith.Sidekick_arith_lra__.Simplex2.Make)

Module Simplex2.Make

Parameters

Signature

module V = Var
module V_map : CCMap.S with type V_map.key = V.t
type num = Q.t

Numbers

module Constraint : sig ... end
module Subst : sig ... end
type t
val create : ?⁠stat:Sidekick_util.Stat.t -> unit -> t

Create a new simplex.

val push_level : t -> unit
val pop_levels : t -> int -> unit
val define : t -> V.t -> (num * V.t) list -> unit

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 Constraint.t

type unsat_cert
module Unsat_cert : sig ... end
exception E_unsat of Unsat_cert.t
type ev_on_propagate = V.lit -> reason:V.lit list -> unit
val add_var : t -> V.t -> unit

Make sure the variable exists in the simplex.

val add_constraint : on_propagate:ev_on_propagate -> t -> Constraint.t -> V.lit -> unit

Add a constraint to the simplex.

raises Unsat

if it's immediately obvious that this is not satisfiable.

val declare_bound : t -> Constraint.t -> V.lit -> unit

Declare that this constraint exists, so we can possibly propagate it. Unlike add_constraint this does NOT assert that the constraint is true

val check_exn : on_propagate:(V.lit -> reason:V.lit list -> unit) -> t -> unit

Check the whole simplex for satisfiability.

parameter on_propagate

is called with arguments lit, reason whenever reason => lit is found to be true by the simplex.

raises Unsat

if the constraints are not satisfiable.

type result =
| Sat of Subst.t
| Unsat of Unsat_cert.t
val check : on_propagate:(V.lit -> reason:V.lit list -> unit) -> t -> result

Call check_exn and return a model or a proof of unsat.

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__/Simplex2/Op/index.html b/dev/sidekick-arith/Sidekick_arith_lra__/Simplex2/Op/index.html new file mode 100644 index 00000000..4f32b47e --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__/Simplex2/Op/index.html @@ -0,0 +1,2 @@ + +Op (sidekick-arith.Sidekick_arith_lra__.Simplex2.Op)

Module Simplex2.Op

Basic operator

type t =
| Leq
| Lt
| Geq
| Gt
val neg_sign : t -> t
val not_ : t -> t
val to_string : t -> string
val pp : Sidekick_util.Fmt.t -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__/Simplex2/index.html b/dev/sidekick-arith/Sidekick_arith_lra__/Simplex2/index.html new file mode 100644 index 00000000..6aa99e95 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__/Simplex2/index.html @@ -0,0 +1,2 @@ + +Simplex2 (sidekick-arith.Sidekick_arith_lra__.Simplex2)

Module Sidekick_arith_lra__.Simplex2

Fast Simplex for CDCL(T)

We follow the paper "Integrating Simplex with DPLL(T )" from de Moura and Dutertre.

module Op : sig ... end
module type S = sig ... end
module Make : functor (Var : VAR) -> S with module V = Var
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__/Simplex2/module-type-S/Constraint/index.html b/dev/sidekick-arith/Sidekick_arith_lra__/Simplex2/module-type-S/Constraint/index.html new file mode 100644 index 00000000..e6467e7d --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__/Simplex2/module-type-S/Constraint/index.html @@ -0,0 +1,2 @@ + +Constraint (sidekick-arith.Sidekick_arith_lra__.Simplex2.S.Constraint)

Module S.Constraint

type op = Op.t
type t = {
op : op;
lhs : V.t;
rhs : num;
}

A constraint is the comparison of a variable to a constant.

val mk : V.t -> op -> num -> t
val leq : V.t -> num -> t
val lt : V.t -> num -> t
val geq : V.t -> num -> t
val gt : V.t -> num -> t
val pp : t Sidekick_util.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__/Simplex2/module-type-S/Subst/index.html b/dev/sidekick-arith/Sidekick_arith_lra__/Simplex2/module-type-S/Subst/index.html new file mode 100644 index 00000000..d132c5e4 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__/Simplex2/module-type-S/Subst/index.html @@ -0,0 +1,2 @@ + +Subst (sidekick-arith.Sidekick_arith_lra__.Simplex2.S.Subst)

Module S.Subst

type t = num V_map.t
val eval : t -> V.t -> Q.t
val pp : t Sidekick_util.Fmt.printer
val to_string : t -> string
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__/Simplex2/module-type-S/Unsat_cert/index.html b/dev/sidekick-arith/Sidekick_arith_lra__/Simplex2/module-type-S/Unsat_cert/index.html new file mode 100644 index 00000000..7a3383a3 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__/Simplex2/module-type-S/Unsat_cert/index.html @@ -0,0 +1,2 @@ + +Unsat_cert (sidekick-arith.Sidekick_arith_lra__.Simplex2.S.Unsat_cert)

Module S.Unsat_cert

type t = unsat_cert
val lits : t -> V.lit list
val pp : t Sidekick_util.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__/Simplex2/module-type-S/V/index.html b/dev/sidekick-arith/Sidekick_arith_lra__/Simplex2/module-type-S/V/index.html new file mode 100644 index 00000000..46f547e1 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__/Simplex2/module-type-S/V/index.html @@ -0,0 +1,2 @@ + +V (sidekick-arith.Sidekick_arith_lra__.Simplex2.S.V)

Module S.V

type t

Variable type.

val compare : t -> t -> int

Standard comparison function on variables.

val pp : t Sidekick_util.Fmt.printer

Printer for variables.

type lit
val pp_lit : lit Sidekick_util.Fmt.printer
val not_lit : lit -> lit option
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__/Simplex2/module-type-S/index.html b/dev/sidekick-arith/Sidekick_arith_lra__/Simplex2/module-type-S/index.html new file mode 100644 index 00000000..5f537048 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__/Simplex2/module-type-S/index.html @@ -0,0 +1,2 @@ + +S (sidekick-arith.Sidekick_arith_lra__.Simplex2.S)

Module type Simplex2.S

module V : VAR
module V_map : CCMap.S with type V_map.key = V.t
type num = Q.t

Numbers

module Constraint : sig ... end
module Subst : sig ... end
type t
val create : ?⁠stat:Sidekick_util.Stat.t -> unit -> t

Create a new simplex.

val push_level : t -> unit
val pop_levels : t -> int -> unit
val define : t -> V.t -> (num * V.t) list -> unit

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 Constraint.t

type unsat_cert
module Unsat_cert : sig ... end
exception E_unsat of Unsat_cert.t
type ev_on_propagate = V.lit -> reason:V.lit list -> unit
val add_var : t -> V.t -> unit

Make sure the variable exists in the simplex.

val add_constraint : on_propagate:ev_on_propagate -> t -> Constraint.t -> V.lit -> unit

Add a constraint to the simplex.

raises Unsat

if it's immediately obvious that this is not satisfiable.

val declare_bound : t -> Constraint.t -> V.lit -> unit

Declare that this constraint exists, so we can possibly propagate it. Unlike add_constraint this does NOT assert that the constraint is true

val check_exn : on_propagate:(V.lit -> reason:V.lit list -> unit) -> t -> unit

Check the whole simplex for satisfiability.

parameter on_propagate

is called with arguments lit, reason whenever reason => lit is found to be true by the simplex.

raises Unsat

if the constraints are not satisfiable.

type result =
| Sat of Subst.t
| Unsat of Unsat_cert.t
val check : on_propagate:(V.lit -> reason:V.lit list -> unit) -> t -> result

Call check_exn and return a model or a proof of unsat.

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__/Simplex2/module-type-VAR/index.html b/dev/sidekick-arith/Sidekick_arith_lra__/Simplex2/module-type-VAR/index.html new file mode 100644 index 00000000..c9a168fc --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__/Simplex2/module-type-VAR/index.html @@ -0,0 +1,2 @@ + +VAR (sidekick-arith.Sidekick_arith_lra__.Simplex2.VAR)

Module type Simplex2.VAR

type t

Variable type.

val compare : t -> t -> int

Standard comparison function on variables.

val pp : t Sidekick_util.Fmt.printer

Printer for variables.

type lit
val pp_lit : lit Sidekick_util.Fmt.printer
val not_lit : lit -> lit option
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__/Simplex_intf/index.html b/dev/sidekick-arith/Sidekick_arith_lra__/Simplex_intf/index.html new file mode 100644 index 00000000..3ffb6777 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__/Simplex_intf/index.html @@ -0,0 +1,2 @@ + +Simplex_intf (sidekick-arith.Sidekick_arith_lra__.Simplex_intf)

Module Sidekick_arith_lra__.Simplex_intf

Modular and incremental implementation of the general simplex

.

module type S = sig ... end
module type S_FULL = sig ... end
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__/Simplex_intf/module-type-S/index.html b/dev/sidekick-arith/Sidekick_arith_lra__/Simplex_intf/module-type-S/index.html new file mode 100644 index 00000000..20c7fb3a --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__/Simplex_intf/module-type-S/index.html @@ -0,0 +1,2 @@ + +S (sidekick-arith.Sidekick_arith_lra__.Simplex_intf.S)

Module type Simplex_intf.S

type var

The given type of the variables

module Var_map : CCMap.S with type Var_map.key = var

A map on variables

type param

Parameter required at the creation of the simplex

type lit
type t

The type of a (possibly not solved) linear system

type cert = {
cert_var : var;
cert_expr : (Q.t * var) list;
}

An unsatisfiability explanation is a couple (x, expr). If expr is the empty list, then there is a contradiction between two given bounds of x. Else, the explanation is an equality x = expr that is valid (it can be derived from the original equations of the system) from which a bound can be deduced which contradicts an already given bound of the system.

type res =
| Solution of Q.t Var_map.t
| Unsatisfiable of cert

Generic type returned when solving the simplex. A solution is a list of bindings that satisfies all the constraints inside the system. If the system is unsatisfiable, an explanation of type 'cert is returned.

Simplex construction

val create : param -> t

The empty system.

parameter fresh

the state for generating fresh variables on demand.

val add_eq : t -> (var * (Q.t * var) list) -> unit

add_eq s (x, eq) adds the equation x=eq to s

val add_bounds : t -> ?⁠strict_lower:bool -> ?⁠strict_upper:bool -> ?⁠lower_reason:lit -> ?⁠upper_reason:lit -> (var * Q.t * Q.t) -> unit

add_bounds (x, lower, upper) adds to s the bounds lower and upper for the given variable x. If the bound is loose on one side (no upper bounds for instance), the values Q.inf and Q.minus_inf can be used. By default, in a system, all variables have no bounds, i.e have lower bound Q.minus_inf and upper bound Q.inf. Optional parameters allow to make the the bounds strict. Defaults to false, so that bounds are large by default.

val add_lower_bound : t -> ?⁠strict:bool -> reason:lit -> var -> Q.t -> unit
val add_upper_bound : t -> ?⁠strict:bool -> reason:lit -> var -> Q.t -> unit

Simplex solving

val solve : t -> res

solve s solves the system s and returns a solution, if one exists. This function may change the internal representation of the system to that of an equivalent one (permutation of basic and non basic variables and pivot operation on the tableaux).

val check_cert : t -> cert -> [ `Ok of lit list | `Bad_bounds of string * string | `Diff_not_0 of Q.t Var_map.t ]

checks that the certificat indeed yields to a contradiction in the current state of the simplex.

returns

`Ok unsat_core if the certificate is valid.

val pp_cert : cert CCFormat.printer
val pp_full_state : t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__/Simplex_intf/module-type-S_FULL/L/C/index.html b/dev/sidekick-arith/Sidekick_arith_lra__/Simplex_intf/module-type-S_FULL/L/C/index.html new file mode 100644 index 00000000..d298441e --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__/Simplex_intf/module-type-S_FULL/L/C/index.html @@ -0,0 +1,2 @@ + +C (sidekick-arith.Sidekick_arith_lra__.Simplex_intf.S_FULL.L.C)

Module L.C

Coeficients used. Can be integers as well as rationals.

type t = Q.t
val equal : t -> t -> bool

Equality on coefficients.

val compare : t -> t -> int

Comparison on coefficients.

val pp : t Sidekick_util.Fmt.printer

Printer for coefficients.

val zero : t

The zero coefficient.

val one : t

The one coefficient (to rule them all, :p).

val neg : t -> t

Unary negation

val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t

Standard operations on coefficients.

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__/Simplex_intf/module-type-S_FULL/L/Comb/Infix/index.html b/dev/sidekick-arith/Sidekick_arith_lra__/Simplex_intf/module-type-S_FULL/L/Comb/Infix/index.html new file mode 100644 index 00000000..82f44afa --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__/Simplex_intf/module-type-S_FULL/L/Comb/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (sidekick-arith.Sidekick_arith_lra__.Simplex_intf.S_FULL.L.Comb.Infix)

Module Comb.Infix

Infix operations on combinations

This module defines usual operations on linear combinations, as infix operators to ease reading of complex computations.

val (+) : t -> t -> t

Addition between combinations.

val (-) : t -> t -> t

Substraction between combinations.

val (*) : C.t -> t -> t

Multiplication by a constant.

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__/Simplex_intf/module-type-S_FULL/L/Comb/index.html b/dev/sidekick-arith/Sidekick_arith_lra__/Simplex_intf/module-type-S_FULL/L/Comb/index.html new file mode 100644 index 00000000..5553a511 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__/Simplex_intf/module-type-S_FULL/L/Comb/index.html @@ -0,0 +1,2 @@ + +Comb (sidekick-arith.Sidekick_arith_lra__.Simplex_intf.S_FULL.L.Comb)

Module L.Comb

Combinations.

This module defines linear combnations as mapping from variables to coefficients. This allows for very fast computations.

type t

The type of linear combinations.

val compare : t -> t -> int

Comparisons on linear combinations.

val pp : t Sidekick_util.Fmt.printer

Printer for linear combinations.

val is_empty : t -> bool

Is the given expression empty ?

Creation
val empty : t

The empty linear combination.

val monomial : C.t -> var -> t

monome n v creates the linear combination n * v

val monomial1 : var -> t

monome1 v creates the linear combination 1 * v

val as_singleton : t -> (C.t * var) option

as_singleton l returns Some (c,x) if l = c * x, None otherwise

val add : C.t -> var -> t -> t

add n v t adds the monome n * v to the combination t.

module Infix : sig ... end

Infix operations on combinations

Include the previous module.

include module type of Infix
val (+) : t -> t -> t

Addition between combinations.

val (-) : t -> t -> t

Substraction between combinations.

val (*) : C.t -> t -> t

Multiplication by a constant.

val iter : (var -> C.t -> unit) -> t -> unit
val of_list : (C.t * var) list -> t
val to_list : t -> (C.t * var) list

Converters to and from lists of monomes.

val of_map : C.t Var_map.t -> t
val to_map : t -> C.t Var_map.t
Semantics
val eval : subst -> t -> C.t

Evaluate a linear combination given a substitution for its variables. TODO: document potential exceptions raised ?

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__/Simplex_intf/module-type-S_FULL/L/Constr/index.html b/dev/sidekick-arith/Sidekick_arith_lra__/Simplex_intf/module-type-S_FULL/L/Constr/index.html new file mode 100644 index 00000000..d1d06d26 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__/Simplex_intf/module-type-S_FULL/L/Constr/index.html @@ -0,0 +1,2 @@ + +Constr (sidekick-arith.Sidekick_arith_lra__.Simplex_intf.S_FULL.L.Constr)

Module L.Constr

Linear constraints.

Represents constraints on linear expressions.

type op = Sidekick_arith_lra__.Linear_expr_intf.bool_op

Arithmetic comparison operators.

type t = {
expr : Expr.t;
op : op;
}

Linear constraints. Expressions are implicitly compared to zero.

val compare : t -> t -> int

Standard comparison function.

val pp : t Sidekick_util.Fmt.printer

Standard printing function.

val of_expr : Expr.t -> Sidekick_arith_lra__.Linear_expr_intf.bool_op -> t
val make : Comb.t -> Sidekick_arith_lra__.Linear_expr_intf.bool_op -> C.t -> t

Create a constraint from a linear expression/combination and a constant.

val geq : Comb.t -> C.t -> t
val leq : Comb.t -> C.t -> t
val gt : Comb.t -> C.t -> t
val lt : Comb.t -> C.t -> t
val eq : Comb.t -> C.t -> t
val neq : Comb.t -> C.t -> t
val geq0 : Expr.t -> t
val leq0 : Expr.t -> t
val gt0 : Expr.t -> t
val lt0 : Expr.t -> t
val eq0 : Expr.t -> t
val neq0 : Expr.t -> t
val op : t -> Sidekick_arith_lra__.Linear_expr_intf.bool_op
val expr : t -> Expr.t

Extract the given part from a constraint.

val split : t -> Comb.t * Sidekick_arith_lra__.Linear_expr_intf.bool_op * C.t

Split the linear combinations from the constant

val eval : subst -> t -> bool

Evaluate the given constraint under a substitution.

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__/Simplex_intf/module-type-S_FULL/L/Expr/Infix/index.html b/dev/sidekick-arith/Sidekick_arith_lra__/Simplex_intf/module-type-S_FULL/L/Expr/Infix/index.html new file mode 100644 index 00000000..2d09be3c --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__/Simplex_intf/module-type-S_FULL/L/Expr/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (sidekick-arith.Sidekick_arith_lra__.Simplex_intf.S_FULL.L.Expr.Infix)

Module Expr.Infix

Infix operations on expressions

This module defines usual operations on linear expressions, as infix operators to ease reading of complex computations.

val (+) : t -> t -> t

Addition between expressions.

val (-) : t -> t -> t

Substraction between expressions.

val (*) : C.t -> t -> t

Multiplication by a constant.

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__/Simplex_intf/module-type-S_FULL/L/Expr/index.html b/dev/sidekick-arith/Sidekick_arith_lra__/Simplex_intf/module-type-S_FULL/L/Expr/index.html new file mode 100644 index 00000000..d378b010 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__/Simplex_intf/module-type-S_FULL/L/Expr/index.html @@ -0,0 +1,2 @@ + +Expr (sidekick-arith.Sidekick_arith_lra__.Simplex_intf.S_FULL.L.Expr)

Module L.Expr

Linear expressions represent linear arithmetic expressions as a linear combination and a constant.

type t

The type of linear expressions.

val comb : t -> Comb.t
val const : t -> C.t
val is_zero : t -> bool
val is_const : t -> bool
val compare : t -> t -> int

Standard comparison function on expressions.

val pp : t Sidekick_util.Fmt.printer

Standard printing function on expressions.

val zero : t

The expression 2.

val of_const : C.t -> t

The constant expression.

val of_comb : Comb.t -> t

Combination without constant

val of_list : C.t -> (C.t * Var.t) list -> t
val make : Comb.t -> C.t -> t

make c n makes the linear expression c + n.

val monomial : C.t -> var -> t
val monomial1 : var -> t
module Infix : sig ... end

Infix operations on expressions

Include the previous module.

include module type of Infix
val (+) : t -> t -> t

Addition between expressions.

val (-) : t -> t -> t

Substraction between expressions.

val (*) : C.t -> t -> t

Multiplication by a constant.

Semantics
val eval : subst -> t -> C.t

Evaluate a linear expression given a substitution for its variables. TODO: document potential exceptions raised ?

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__/Simplex_intf/module-type-S_FULL/L/Var/index.html b/dev/sidekick-arith/Sidekick_arith_lra__/Simplex_intf/module-type-S_FULL/L/Var/index.html new file mode 100644 index 00000000..74cad045 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__/Simplex_intf/module-type-S_FULL/L/Var/index.html @@ -0,0 +1,2 @@ + +Var (sidekick-arith.Sidekick_arith_lra__.Simplex_intf.S_FULL.L.Var)

Module L.Var

Variables used in expressions.

type t = var

Variable type.

val compare : t -> t -> int

Standard comparison function on variables.

val pp : t Sidekick_util.Fmt.printer

Printer for variables.

type lit = lit
val pp_lit : lit Sidekick_util.Fmt.printer
val not_lit : lit -> lit option
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__/Simplex_intf/module-type-S_FULL/L/index.html b/dev/sidekick-arith/Sidekick_arith_lra__/Simplex_intf/module-type-S_FULL/L/index.html new file mode 100644 index 00000000..3c2f0ea3 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__/Simplex_intf/module-type-S_FULL/L/index.html @@ -0,0 +1,2 @@ + +L (sidekick-arith.Sidekick_arith_lra__.Simplex_intf.S_FULL.L)

Module S_FULL.L

module C : Sidekick_arith_lra__.Linear_expr_intf.COEFF with type t = Q.t

Coeficients used. Can be integers as well as rationals.

module Var : Sidekick_arith_lra__.Linear_expr_intf.VAR with type t = var and type lit = lit

Variables used in expressions.

type var = Var.t

The type of variables appearing in expressions.

module Var_map : CCMap.S with type Var_map.key = var

Maps from variables, used for expressions as well as substitutions.

type subst = C.t Var_map.t

Type for substitutions.

module Comb : sig ... end

Combinations.

Linear expressions.

module Expr : sig ... end

Linear expressions represent linear arithmetic expressions as a linear combination and a constant.

module Constr : sig ... end
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__/Simplex_intf/module-type-S_FULL/index.html b/dev/sidekick-arith/Sidekick_arith_lra__/Simplex_intf/module-type-S_FULL/index.html new file mode 100644 index 00000000..cdf3384d --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__/Simplex_intf/module-type-S_FULL/index.html @@ -0,0 +1,2 @@ + +S_FULL (sidekick-arith.Sidekick_arith_lra__.Simplex_intf.S_FULL)

Module type Simplex_intf.S_FULL

include S
type var

The given type of the variables

module Var_map : CCMap.S with type Var_map.key = var

A map on variables

type param

Parameter required at the creation of the simplex

type lit
type t

The type of a (possibly not solved) linear system

type cert = {
cert_var : var;
cert_expr : (Q.t * var) list;
}

An unsatisfiability explanation is a couple (x, expr). If expr is the empty list, then there is a contradiction between two given bounds of x. Else, the explanation is an equality x = expr that is valid (it can be derived from the original equations of the system) from which a bound can be deduced which contradicts an already given bound of the system.

type res =
| Solution of Q.t Var_map.t
| Unsatisfiable of cert

Generic type returned when solving the simplex. A solution is a list of bindings that satisfies all the constraints inside the system. If the system is unsatisfiable, an explanation of type 'cert is returned.

Simplex construction

val create : param -> t

The empty system.

parameter fresh

the state for generating fresh variables on demand.

val add_eq : t -> (var * (Q.t * var) list) -> unit

add_eq s (x, eq) adds the equation x=eq to s

val add_bounds : t -> ?⁠strict_lower:bool -> ?⁠strict_upper:bool -> ?⁠lower_reason:lit -> ?⁠upper_reason:lit -> (var * Q.t * Q.t) -> unit

add_bounds (x, lower, upper) adds to s the bounds lower and upper for the given variable x. If the bound is loose on one side (no upper bounds for instance), the values Q.inf and Q.minus_inf can be used. By default, in a system, all variables have no bounds, i.e have lower bound Q.minus_inf and upper bound Q.inf. Optional parameters allow to make the the bounds strict. Defaults to false, so that bounds are large by default.

val add_lower_bound : t -> ?⁠strict:bool -> reason:lit -> var -> Q.t -> unit
val add_upper_bound : t -> ?⁠strict:bool -> reason:lit -> var -> Q.t -> unit

Simplex solving

val solve : t -> res

solve s solves the system s and returns a solution, if one exists. This function may change the internal representation of the system to that of an equivalent one (permutation of basic and non basic variables and pivot operation on the tableaux).

val check_cert : t -> cert -> [ `Ok of lit list | `Bad_bounds of string * string | `Diff_not_0 of Q.t Var_map.t ]

checks that the certificat indeed yields to a contradiction in the current state of the simplex.

returns

`Ok unsat_core if the certificate is valid.

val pp_cert : cert CCFormat.printer
val pp_full_state : t CCFormat.printer
module L : Sidekick_arith_lra__.Linear_expr_intf.S with type C.t = Q.t and type Var.t = var and type Var.lit = lit
type op = Sidekick_arith_lra.Predicate.t =
| Leq
| Geq
| Lt
| Gt
| Eq
| Neq
type constr = L.Constr.t
val add_constr : t -> constr -> lit -> unit

Add a constraint to a simplex state.

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__/index.html b/dev/sidekick-arith/Sidekick_arith_lra__/index.html new file mode 100644 index 00000000..9cb43f5a --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__/index.html @@ -0,0 +1,2 @@ + +Sidekick_arith_lra__ (sidekick-arith.Sidekick_arith_lra__)

Module Sidekick_arith_lra__

module Linear_expr : sig ... end
module Linear_expr_intf : sig ... end
module Predicate : sig ... end
module Simplex2 : sig ... end
module Simplex_intf : sig ... end
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__Locations/.dune-keep b/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr/.dune-keep similarity index 100% rename from dev/sidekick-bin/Sidekick_smtlib__Locations/.dune-keep rename to dev/sidekick-arith/Sidekick_arith_lra__Linear_expr/.dune-keep diff --git a/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr/Make/Comb/Infix/index.html b/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr/Make/Comb/Infix/index.html new file mode 100644 index 00000000..1dbb863f --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr/Make/Comb/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (sidekick-arith.Sidekick_arith_lra__Linear_expr.Make.Comb.Infix)

Module Comb.Infix

Infix operations on combinations

This module defines usual operations on linear combinations, as infix operators to ease reading of complex computations.

val (+) : t -> t -> t

Addition between combinations.

val (-) : t -> t -> t

Substraction between combinations.

val (*) : C.t -> t -> t

Multiplication by a constant.

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr/Make/Comb/index.html b/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr/Make/Comb/index.html new file mode 100644 index 00000000..91b87cec --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr/Make/Comb/index.html @@ -0,0 +1,2 @@ + +Comb (sidekick-arith.Sidekick_arith_lra__Linear_expr.Make.Comb)

Module Make.Comb

Combinations.

This module defines linear combnations as mapping from variables to coefficients. This allows for very fast computations.

type t

The type of linear combinations.

val compare : t -> t -> int

Comparisons on linear combinations.

val pp : t Sidekick_util.Fmt.printer

Printer for linear combinations.

val is_empty : t -> bool

Is the given expression empty ?

Creation
val empty : t

The empty linear combination.

val monomial : C.t -> var -> t

monome n v creates the linear combination n * v

val monomial1 : var -> t

monome1 v creates the linear combination 1 * v

val as_singleton : t -> (C.t * var) option

as_singleton l returns Some (c,x) if l = c * x, None otherwise

val add : C.t -> var -> t -> t

add n v t adds the monome n * v to the combination t.

module Infix : sig ... end

Infix operations on combinations

Include the previous module.

include module type of Infix
val (+) : t -> t -> t

Addition between combinations.

val (-) : t -> t -> t

Substraction between combinations.

val (*) : C.t -> t -> t

Multiplication by a constant.

val iter : (var -> C.t -> unit) -> t -> unit
val of_list : (C.t * var) list -> t
val to_list : t -> (C.t * var) list

Converters to and from lists of monomes.

val of_map : C.t Var_map.t -> t
val to_map : t -> C.t Var_map.t
Semantics
val eval : subst -> t -> C.t

Evaluate a linear combination given a substitution for its variables. TODO: document potential exceptions raised ?

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr/Make/Constr/index.html b/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr/Make/Constr/index.html new file mode 100644 index 00000000..ecb76e73 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr/Make/Constr/index.html @@ -0,0 +1,2 @@ + +Constr (sidekick-arith.Sidekick_arith_lra__Linear_expr.Make.Constr)

Module Make.Constr

Linear constraints.

Represents constraints on linear expressions.

type op = Sidekick_arith_lra__.Linear_expr_intf.bool_op

Arithmetic comparison operators.

type t = {
expr : Expr.t;
op : op;
}

Linear constraints. Expressions are implicitly compared to zero.

val compare : t -> t -> int

Standard comparison function.

val pp : t Sidekick_util.Fmt.printer

Standard printing function.

val of_expr : Expr.t -> Sidekick_arith_lra__.Linear_expr_intf.bool_op -> t
val make : Comb.t -> Sidekick_arith_lra__.Linear_expr_intf.bool_op -> C.t -> t

Create a constraint from a linear expression/combination and a constant.

val geq : Comb.t -> C.t -> t
val leq : Comb.t -> C.t -> t
val gt : Comb.t -> C.t -> t
val lt : Comb.t -> C.t -> t
val eq : Comb.t -> C.t -> t
val neq : Comb.t -> C.t -> t
val geq0 : Expr.t -> t
val leq0 : Expr.t -> t
val gt0 : Expr.t -> t
val lt0 : Expr.t -> t
val eq0 : Expr.t -> t
val neq0 : Expr.t -> t
val op : t -> Sidekick_arith_lra__.Linear_expr_intf.bool_op
val expr : t -> Expr.t

Extract the given part from a constraint.

val split : t -> Comb.t * Sidekick_arith_lra__.Linear_expr_intf.bool_op * C.t

Split the linear combinations from the constant

val eval : subst -> t -> bool

Evaluate the given constraint under a substitution.

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr/Make/Expr/Infix/index.html b/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr/Make/Expr/Infix/index.html new file mode 100644 index 00000000..8f4c281b --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr/Make/Expr/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (sidekick-arith.Sidekick_arith_lra__Linear_expr.Make.Expr.Infix)

Module Expr.Infix

Infix operations on expressions

This module defines usual operations on linear expressions, as infix operators to ease reading of complex computations.

val (+) : t -> t -> t

Addition between expressions.

val (-) : t -> t -> t

Substraction between expressions.

val (*) : C.t -> t -> t

Multiplication by a constant.

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr/Make/Expr/index.html b/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr/Make/Expr/index.html new file mode 100644 index 00000000..25c08b82 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr/Make/Expr/index.html @@ -0,0 +1,2 @@ + +Expr (sidekick-arith.Sidekick_arith_lra__Linear_expr.Make.Expr)

Module Make.Expr

Linear expressions represent linear arithmetic expressions as a linear combination and a constant.

type t

The type of linear expressions.

val comb : t -> Comb.t
val const : t -> C.t
val is_zero : t -> bool
val is_const : t -> bool
val compare : t -> t -> int

Standard comparison function on expressions.

val pp : t Sidekick_util.Fmt.printer

Standard printing function on expressions.

val zero : t

The expression 2.

val of_const : C.t -> t

The constant expression.

val of_comb : Comb.t -> t

Combination without constant

val of_list : C.t -> (C.t * Var.t) list -> t
val make : Comb.t -> C.t -> t

make c n makes the linear expression c + n.

val monomial : C.t -> var -> t
val monomial1 : var -> t
module Infix : sig ... end

Infix operations on expressions

Include the previous module.

include module type of Infix
val (+) : t -> t -> t

Addition between expressions.

val (-) : t -> t -> t

Substraction between expressions.

val (*) : C.t -> t -> t

Multiplication by a constant.

Semantics
val eval : subst -> t -> C.t

Evaluate a linear expression given a substitution for its variables. TODO: document potential exceptions raised ?

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr/Make/argument-1-C/index.html b/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr/Make/argument-1-C/index.html new file mode 100644 index 00000000..49b75c80 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr/Make/argument-1-C/index.html @@ -0,0 +1,2 @@ + +1-C (sidekick-arith.Sidekick_arith_lra__Linear_expr.Make.1-C)

Parameter Make.1-C

type t
val equal : t -> t -> bool

Equality on coefficients.

val compare : t -> t -> int

Comparison on coefficients.

val pp : t Sidekick_util.Fmt.printer

Printer for coefficients.

val zero : t

The zero coefficient.

val one : t

The one coefficient (to rule them all, :p).

val neg : t -> t

Unary negation

val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t

Standard operations on coefficients.

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr/Make/argument-2-Var/index.html b/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr/Make/argument-2-Var/index.html new file mode 100644 index 00000000..7d3fcc6e --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr/Make/argument-2-Var/index.html @@ -0,0 +1,2 @@ + +2-Var (sidekick-arith.Sidekick_arith_lra__Linear_expr.Make.2-Var)

Parameter Make.2-Var

type t

Variable type.

val compare : t -> t -> int

Standard comparison function on variables.

val pp : t Sidekick_util.Fmt.printer

Printer for variables.

type lit
val pp_lit : lit Sidekick_util.Fmt.printer
val not_lit : lit -> lit option
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr/Make/index.html b/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr/Make/index.html new file mode 100644 index 00000000..34890ea9 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr/Make/index.html @@ -0,0 +1,2 @@ + +Make (sidekick-arith.Sidekick_arith_lra__Linear_expr.Make)

Module Sidekick_arith_lra__Linear_expr.Make

Parameters

Signature

module C = C

Coeficients used. Can be integers as well as rationals.

module Var = Var

Variables used in expressions.

type var = Var.t

The type of variables appearing in expressions.

module Var_map = CCMap.Make(Var)

Maps from variables, used for expressions as well as substitutions.

type subst = C.t Var_map.t

Type for substitutions.

module Comb : sig ... end

Combinations.

Linear expressions.

module Expr : sig ... end

Linear expressions represent linear arithmetic expressions as a linear combination and a constant.

module Constr : sig ... end
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr/index.html b/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr/index.html new file mode 100644 index 00000000..452363e6 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr/index.html @@ -0,0 +1,2 @@ + +Sidekick_arith_lra__Linear_expr (sidekick-arith.Sidekick_arith_lra__Linear_expr)

Module Sidekick_arith_lra__Linear_expr

Arithmetic expressions

type nonrec bool_op = Sidekick_arith_lra__.Linear_expr_intf.bool_op =
| Leq
| Geq
| Lt
| Gt
| Eq
| Neq
module Make : functor (C : COEFF) -> functor (Var : VAR) -> S with module C = C and module Var = Var and module Var_map = CCMap.Make(Var)
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr/module-type-COEFF/index.html b/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr/module-type-COEFF/index.html new file mode 100644 index 00000000..44ecdf31 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr/module-type-COEFF/index.html @@ -0,0 +1,2 @@ + +COEFF (sidekick-arith.Sidekick_arith_lra__Linear_expr.COEFF)

Module type Sidekick_arith_lra__Linear_expr.COEFF

type t
val equal : t -> t -> bool

Equality on coefficients.

val compare : t -> t -> int

Comparison on coefficients.

val pp : t Sidekick_util.Fmt.printer

Printer for coefficients.

val zero : t

The zero coefficient.

val one : t

The one coefficient (to rule them all, :p).

val neg : t -> t

Unary negation

val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t

Standard operations on coefficients.

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr/module-type-S/C/index.html b/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr/module-type-S/C/index.html new file mode 100644 index 00000000..87f63c58 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr/module-type-S/C/index.html @@ -0,0 +1,2 @@ + +C (sidekick-arith.Sidekick_arith_lra__Linear_expr.S.C)

Module S.C

Coeficients used. Can be integers as well as rationals.

type t
val equal : t -> t -> bool

Equality on coefficients.

val compare : t -> t -> int

Comparison on coefficients.

val pp : t Sidekick_util.Fmt.printer

Printer for coefficients.

val zero : t

The zero coefficient.

val one : t

The one coefficient (to rule them all, :p).

val neg : t -> t

Unary negation

val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t

Standard operations on coefficients.

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr/module-type-S/Comb/Infix/index.html b/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr/module-type-S/Comb/Infix/index.html new file mode 100644 index 00000000..1f309686 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr/module-type-S/Comb/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (sidekick-arith.Sidekick_arith_lra__Linear_expr.S.Comb.Infix)

Module Comb.Infix

Infix operations on combinations

This module defines usual operations on linear combinations, as infix operators to ease reading of complex computations.

val (+) : t -> t -> t

Addition between combinations.

val (-) : t -> t -> t

Substraction between combinations.

val (*) : C.t -> t -> t

Multiplication by a constant.

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr/module-type-S/Comb/index.html b/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr/module-type-S/Comb/index.html new file mode 100644 index 00000000..3984456e --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr/module-type-S/Comb/index.html @@ -0,0 +1,2 @@ + +Comb (sidekick-arith.Sidekick_arith_lra__Linear_expr.S.Comb)

Module S.Comb

Combinations.

This module defines linear combnations as mapping from variables to coefficients. This allows for very fast computations.

type t

The type of linear combinations.

val compare : t -> t -> int

Comparisons on linear combinations.

val pp : t Sidekick_util.Fmt.printer

Printer for linear combinations.

val is_empty : t -> bool

Is the given expression empty ?

Creation
val empty : t

The empty linear combination.

val monomial : C.t -> var -> t

monome n v creates the linear combination n * v

val monomial1 : var -> t

monome1 v creates the linear combination 1 * v

val as_singleton : t -> (C.t * var) option

as_singleton l returns Some (c,x) if l = c * x, None otherwise

val add : C.t -> var -> t -> t

add n v t adds the monome n * v to the combination t.

module Infix : sig ... end

Infix operations on combinations

Include the previous module.

include module type of Infix
val (+) : t -> t -> t

Addition between combinations.

val (-) : t -> t -> t

Substraction between combinations.

val (*) : C.t -> t -> t

Multiplication by a constant.

val iter : (var -> C.t -> unit) -> t -> unit
val of_list : (C.t * var) list -> t
val to_list : t -> (C.t * var) list

Converters to and from lists of monomes.

val of_map : C.t Var_map.t -> t
val to_map : t -> C.t Var_map.t
Semantics
val eval : subst -> t -> C.t

Evaluate a linear combination given a substitution for its variables. TODO: document potential exceptions raised ?

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr/module-type-S/Constr/index.html b/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr/module-type-S/Constr/index.html new file mode 100644 index 00000000..48ec5ca9 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr/module-type-S/Constr/index.html @@ -0,0 +1,2 @@ + +Constr (sidekick-arith.Sidekick_arith_lra__Linear_expr.S.Constr)

Module S.Constr

Linear constraints.

Represents constraints on linear expressions.

type op = Sidekick_arith_lra__.Linear_expr_intf.bool_op

Arithmetic comparison operators.

type t = {
expr : Expr.t;
op : op;
}

Linear constraints. Expressions are implicitly compared to zero.

val compare : t -> t -> int

Standard comparison function.

val pp : t Sidekick_util.Fmt.printer

Standard printing function.

val of_expr : Expr.t -> Sidekick_arith_lra__.Linear_expr_intf.bool_op -> t
val make : Comb.t -> Sidekick_arith_lra__.Linear_expr_intf.bool_op -> C.t -> t

Create a constraint from a linear expression/combination and a constant.

val geq : Comb.t -> C.t -> t
val leq : Comb.t -> C.t -> t
val gt : Comb.t -> C.t -> t
val lt : Comb.t -> C.t -> t
val eq : Comb.t -> C.t -> t
val neq : Comb.t -> C.t -> t
val geq0 : Expr.t -> t
val leq0 : Expr.t -> t
val gt0 : Expr.t -> t
val lt0 : Expr.t -> t
val eq0 : Expr.t -> t
val neq0 : Expr.t -> t
val op : t -> Sidekick_arith_lra__.Linear_expr_intf.bool_op
val expr : t -> Expr.t

Extract the given part from a constraint.

val split : t -> Comb.t * Sidekick_arith_lra__.Linear_expr_intf.bool_op * C.t

Split the linear combinations from the constant

val eval : subst -> t -> bool

Evaluate the given constraint under a substitution.

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr/module-type-S/Expr/Infix/index.html b/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr/module-type-S/Expr/Infix/index.html new file mode 100644 index 00000000..52b222e6 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr/module-type-S/Expr/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (sidekick-arith.Sidekick_arith_lra__Linear_expr.S.Expr.Infix)

Module Expr.Infix

Infix operations on expressions

This module defines usual operations on linear expressions, as infix operators to ease reading of complex computations.

val (+) : t -> t -> t

Addition between expressions.

val (-) : t -> t -> t

Substraction between expressions.

val (*) : C.t -> t -> t

Multiplication by a constant.

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr/module-type-S/Expr/index.html b/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr/module-type-S/Expr/index.html new file mode 100644 index 00000000..3abdf8f3 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr/module-type-S/Expr/index.html @@ -0,0 +1,2 @@ + +Expr (sidekick-arith.Sidekick_arith_lra__Linear_expr.S.Expr)

Module S.Expr

Linear expressions represent linear arithmetic expressions as a linear combination and a constant.

type t

The type of linear expressions.

val comb : t -> Comb.t
val const : t -> C.t
val is_zero : t -> bool
val is_const : t -> bool
val compare : t -> t -> int

Standard comparison function on expressions.

val pp : t Sidekick_util.Fmt.printer

Standard printing function on expressions.

val zero : t

The expression 2.

val of_const : C.t -> t

The constant expression.

val of_comb : Comb.t -> t

Combination without constant

val of_list : C.t -> (C.t * Var.t) list -> t
val make : Comb.t -> C.t -> t

make c n makes the linear expression c + n.

val monomial : C.t -> var -> t
val monomial1 : var -> t
module Infix : sig ... end

Infix operations on expressions

Include the previous module.

include module type of Infix
val (+) : t -> t -> t

Addition between expressions.

val (-) : t -> t -> t

Substraction between expressions.

val (*) : C.t -> t -> t

Multiplication by a constant.

Semantics
val eval : subst -> t -> C.t

Evaluate a linear expression given a substitution for its variables. TODO: document potential exceptions raised ?

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr/module-type-S/Var/index.html b/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr/module-type-S/Var/index.html new file mode 100644 index 00000000..94e73885 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr/module-type-S/Var/index.html @@ -0,0 +1,2 @@ + +Var (sidekick-arith.Sidekick_arith_lra__Linear_expr.S.Var)

Module S.Var

Variables used in expressions.

type t

Variable type.

val compare : t -> t -> int

Standard comparison function on variables.

val pp : t Sidekick_util.Fmt.printer

Printer for variables.

type lit
val pp_lit : lit Sidekick_util.Fmt.printer
val not_lit : lit -> lit option
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr/module-type-S/index.html b/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr/module-type-S/index.html new file mode 100644 index 00000000..036f0074 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr/module-type-S/index.html @@ -0,0 +1,2 @@ + +S (sidekick-arith.Sidekick_arith_lra__Linear_expr.S)

Module type Sidekick_arith_lra__Linear_expr.S

module C : Sidekick_arith_lra__.Linear_expr_intf.COEFF

Coeficients used. Can be integers as well as rationals.

module Var : Sidekick_arith_lra__.Linear_expr_intf.VAR

Variables used in expressions.

type var = Var.t

The type of variables appearing in expressions.

module Var_map : CCMap.S with type Var_map.key = var

Maps from variables, used for expressions as well as substitutions.

type subst = C.t Var_map.t

Type for substitutions.

module Comb : sig ... end

Combinations.

Linear expressions.

module Expr : sig ... end

Linear expressions represent linear arithmetic expressions as a linear combination and a constant.

module Constr : sig ... end
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr/module-type-VAR/index.html b/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr/module-type-VAR/index.html new file mode 100644 index 00000000..c4617dd9 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr/module-type-VAR/index.html @@ -0,0 +1,2 @@ + +VAR (sidekick-arith.Sidekick_arith_lra__Linear_expr.VAR)

Module type Sidekick_arith_lra__Linear_expr.VAR

type t

Variable type.

val compare : t -> t -> int

Standard comparison function on variables.

val pp : t Sidekick_util.Fmt.printer

Printer for variables.

type lit
val pp_lit : lit Sidekick_util.Fmt.printer
val not_lit : lit -> lit option
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__Parse_ast/.dune-keep b/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr_intf/.dune-keep similarity index 100% rename from dev/sidekick-bin/Sidekick_smtlib__Parse_ast/.dune-keep rename to dev/sidekick-arith/Sidekick_arith_lra__Linear_expr_intf/.dune-keep diff --git a/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr_intf/index.html b/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr_intf/index.html new file mode 100644 index 00000000..cf26f3b0 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr_intf/index.html @@ -0,0 +1,2 @@ + +Sidekick_arith_lra__Linear_expr_intf (sidekick-arith.Sidekick_arith_lra__Linear_expr_intf)

Module Sidekick_arith_lra__Linear_expr_intf

Linear expressions interface

module type COEFF = sig ... end
module type VAR = sig ... end
type bool_op = Sidekick_arith_lra.Predicate.t =
| Leq
| Geq
| Lt
| Gt
| Eq
| Neq

Linear expressions & formulas

module type S = sig ... end

Linear expressions & formulas.

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr_intf/module-type-COEFF/index.html b/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr_intf/module-type-COEFF/index.html new file mode 100644 index 00000000..715e6d7a --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr_intf/module-type-COEFF/index.html @@ -0,0 +1,2 @@ + +COEFF (sidekick-arith.Sidekick_arith_lra__Linear_expr_intf.COEFF)

Module type Sidekick_arith_lra__Linear_expr_intf.COEFF

Coefficients

Coefficients are used in expressions. They usually are either rationals, or integers.

type t
val equal : t -> t -> bool

Equality on coefficients.

val compare : t -> t -> int

Comparison on coefficients.

val pp : t Sidekick_util.Fmt.printer

Printer for coefficients.

val zero : t

The zero coefficient.

val one : t

The one coefficient (to rule them all, :p).

val neg : t -> t

Unary negation

val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t

Standard operations on coefficients.

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr_intf/module-type-S/C/index.html b/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr_intf/module-type-S/C/index.html new file mode 100644 index 00000000..6a2519b4 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr_intf/module-type-S/C/index.html @@ -0,0 +1,2 @@ + +C (sidekick-arith.Sidekick_arith_lra__Linear_expr_intf.S.C)

Module S.C

Coeficients used. Can be integers as well as rationals.

type t
val equal : t -> t -> bool

Equality on coefficients.

val compare : t -> t -> int

Comparison on coefficients.

val pp : t Sidekick_util.Fmt.printer

Printer for coefficients.

val zero : t

The zero coefficient.

val one : t

The one coefficient (to rule them all, :p).

val neg : t -> t

Unary negation

val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t

Standard operations on coefficients.

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr_intf/module-type-S/Comb/Infix/index.html b/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr_intf/module-type-S/Comb/Infix/index.html new file mode 100644 index 00000000..594a45c5 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr_intf/module-type-S/Comb/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (sidekick-arith.Sidekick_arith_lra__Linear_expr_intf.S.Comb.Infix)

Module Comb.Infix

Infix operations on combinations

This module defines usual operations on linear combinations, as infix operators to ease reading of complex computations.

val (+) : t -> t -> t

Addition between combinations.

val (-) : t -> t -> t

Substraction between combinations.

val (*) : C.t -> t -> t

Multiplication by a constant.

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr_intf/module-type-S/Comb/index.html b/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr_intf/module-type-S/Comb/index.html new file mode 100644 index 00000000..8f7d86f3 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr_intf/module-type-S/Comb/index.html @@ -0,0 +1,2 @@ + +Comb (sidekick-arith.Sidekick_arith_lra__Linear_expr_intf.S.Comb)

Module S.Comb

Combinations.

This module defines linear combnations as mapping from variables to coefficients. This allows for very fast computations.

type t

The type of linear combinations.

val compare : t -> t -> int

Comparisons on linear combinations.

val pp : t Sidekick_util.Fmt.printer

Printer for linear combinations.

val is_empty : t -> bool

Is the given expression empty ?

Creation
val empty : t

The empty linear combination.

val monomial : C.t -> var -> t

monome n v creates the linear combination n * v

val monomial1 : var -> t

monome1 v creates the linear combination 1 * v

val as_singleton : t -> (C.t * var) option

as_singleton l returns Some (c,x) if l = c * x, None otherwise

val add : C.t -> var -> t -> t

add n v t adds the monome n * v to the combination t.

module Infix : sig ... end

Infix operations on combinations

Include the previous module.

include module type of Infix
val (+) : t -> t -> t

Addition between combinations.

val (-) : t -> t -> t

Substraction between combinations.

val (*) : C.t -> t -> t

Multiplication by a constant.

val iter : (var -> C.t -> unit) -> t -> unit
val of_list : (C.t * var) list -> t
val to_list : t -> (C.t * var) list

Converters to and from lists of monomes.

val of_map : C.t Var_map.t -> t
val to_map : t -> C.t Var_map.t
Semantics
val eval : subst -> t -> C.t

Evaluate a linear combination given a substitution for its variables. TODO: document potential exceptions raised ?

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr_intf/module-type-S/Constr/index.html b/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr_intf/module-type-S/Constr/index.html new file mode 100644 index 00000000..b32dab21 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr_intf/module-type-S/Constr/index.html @@ -0,0 +1,2 @@ + +Constr (sidekick-arith.Sidekick_arith_lra__Linear_expr_intf.S.Constr)

Module S.Constr

Linear constraints.

Represents constraints on linear expressions.

type op = bool_op

Arithmetic comparison operators.

type t = {
expr : Expr.t;
op : op;
}

Linear constraints. Expressions are implicitly compared to zero.

val compare : t -> t -> int

Standard comparison function.

val pp : t Sidekick_util.Fmt.printer

Standard printing function.

val of_expr : Expr.t -> bool_op -> t
val make : Comb.t -> bool_op -> C.t -> t

Create a constraint from a linear expression/combination and a constant.

val geq : Comb.t -> C.t -> t
val leq : Comb.t -> C.t -> t
val gt : Comb.t -> C.t -> t
val lt : Comb.t -> C.t -> t
val eq : Comb.t -> C.t -> t
val neq : Comb.t -> C.t -> t
val geq0 : Expr.t -> t
val leq0 : Expr.t -> t
val gt0 : Expr.t -> t
val lt0 : Expr.t -> t
val eq0 : Expr.t -> t
val neq0 : Expr.t -> t
val op : t -> bool_op
val expr : t -> Expr.t

Extract the given part from a constraint.

val split : t -> Comb.t * bool_op * C.t

Split the linear combinations from the constant

val eval : subst -> t -> bool

Evaluate the given constraint under a substitution.

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr_intf/module-type-S/Expr/Infix/index.html b/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr_intf/module-type-S/Expr/Infix/index.html new file mode 100644 index 00000000..d45e5a91 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr_intf/module-type-S/Expr/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (sidekick-arith.Sidekick_arith_lra__Linear_expr_intf.S.Expr.Infix)

Module Expr.Infix

Infix operations on expressions

This module defines usual operations on linear expressions, as infix operators to ease reading of complex computations.

val (+) : t -> t -> t

Addition between expressions.

val (-) : t -> t -> t

Substraction between expressions.

val (*) : C.t -> t -> t

Multiplication by a constant.

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr_intf/module-type-S/Expr/index.html b/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr_intf/module-type-S/Expr/index.html new file mode 100644 index 00000000..81d8ac58 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr_intf/module-type-S/Expr/index.html @@ -0,0 +1,2 @@ + +Expr (sidekick-arith.Sidekick_arith_lra__Linear_expr_intf.S.Expr)

Module S.Expr

Linear expressions represent linear arithmetic expressions as a linear combination and a constant.

type t

The type of linear expressions.

val comb : t -> Comb.t
val const : t -> C.t
val is_zero : t -> bool
val is_const : t -> bool
val compare : t -> t -> int

Standard comparison function on expressions.

val pp : t Sidekick_util.Fmt.printer

Standard printing function on expressions.

val zero : t

The expression 2.

val of_const : C.t -> t

The constant expression.

val of_comb : Comb.t -> t

Combination without constant

val of_list : C.t -> (C.t * Var.t) list -> t
val make : Comb.t -> C.t -> t

make c n makes the linear expression c + n.

val monomial : C.t -> var -> t
val monomial1 : var -> t
module Infix : sig ... end

Infix operations on expressions

Include the previous module.

include module type of Infix
val (+) : t -> t -> t

Addition between expressions.

val (-) : t -> t -> t

Substraction between expressions.

val (*) : C.t -> t -> t

Multiplication by a constant.

Semantics
val eval : subst -> t -> C.t

Evaluate a linear expression given a substitution for its variables. TODO: document potential exceptions raised ?

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr_intf/module-type-S/Var/index.html b/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr_intf/module-type-S/Var/index.html new file mode 100644 index 00000000..3e21fc1b --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr_intf/module-type-S/Var/index.html @@ -0,0 +1,2 @@ + +Var (sidekick-arith.Sidekick_arith_lra__Linear_expr_intf.S.Var)

Module S.Var

Variables used in expressions.

type t

Variable type.

val compare : t -> t -> int

Standard comparison function on variables.

val pp : t Sidekick_util.Fmt.printer

Printer for variables.

type lit
val pp_lit : lit Sidekick_util.Fmt.printer
val not_lit : lit -> lit option
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr_intf/module-type-S/index.html b/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr_intf/module-type-S/index.html new file mode 100644 index 00000000..00b9bdab --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr_intf/module-type-S/index.html @@ -0,0 +1,2 @@ + +S (sidekick-arith.Sidekick_arith_lra__Linear_expr_intf.S)

Module type Sidekick_arith_lra__Linear_expr_intf.S

Linear expressions & formulas.

This modules defines linear expressions (which are linear combinations of variables), and linear constraints, where the value of a linear expressions is constrained.

module C : COEFF

Coeficients used. Can be integers as well as rationals.

module Var : VAR

Variables used in expressions.

type var = Var.t

The type of variables appearing in expressions.

module Var_map : CCMap.S with type Var_map.key = var

Maps from variables, used for expressions as well as substitutions.

type subst = C.t Var_map.t

Type for substitutions.

module Comb : sig ... end

Combinations.

Linear expressions.

module Expr : sig ... end

Linear expressions represent linear arithmetic expressions as a linear combination and a constant.

module Constr : sig ... end
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr_intf/module-type-VAR/index.html b/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr_intf/module-type-VAR/index.html new file mode 100644 index 00000000..0992ec25 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__Linear_expr_intf/module-type-VAR/index.html @@ -0,0 +1,2 @@ + +VAR (sidekick-arith.Sidekick_arith_lra__Linear_expr_intf.VAR)

Module type Sidekick_arith_lra__Linear_expr_intf.VAR

Variable interface

Standard interface for variables that are meant to be used in expressions.

type t

Variable type.

val compare : t -> t -> int

Standard comparison function on variables.

val pp : t Sidekick_util.Fmt.printer

Printer for variables.

type lit
val pp_lit : lit Sidekick_util.Fmt.printer
val not_lit : lit -> lit option
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__Parser/.dune-keep b/dev/sidekick-arith/Sidekick_arith_lra__Predicate/.dune-keep similarity index 100% rename from dev/sidekick-bin/Sidekick_smtlib__Parser/.dune-keep rename to dev/sidekick-arith/Sidekick_arith_lra__Predicate/.dune-keep diff --git a/dev/sidekick-arith/Sidekick_arith_lra__Predicate/index.html b/dev/sidekick-arith/Sidekick_arith_lra__Predicate/index.html new file mode 100644 index 00000000..ed65a589 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__Predicate/index.html @@ -0,0 +1,2 @@ + +Sidekick_arith_lra__Predicate (sidekick-arith.Sidekick_arith_lra__Predicate)

Module Sidekick_arith_lra__Predicate

type t =
| Leq
| Geq
| Lt
| Gt
| Eq
| Neq
val neg : t -> t
val neg_sign : t -> t
val to_string : t -> string
val pp : Sidekick_util.Fmt.t -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_base_term/.dune-keep b/dev/sidekick-arith/Sidekick_arith_lra__Simplex2/.dune-keep similarity index 100% rename from dev/sidekick/Sidekick_base_term/.dune-keep rename to dev/sidekick-arith/Sidekick_arith_lra__Simplex2/.dune-keep diff --git a/dev/sidekick-arith/Sidekick_arith_lra__Simplex2/Make/Constraint/index.html b/dev/sidekick-arith/Sidekick_arith_lra__Simplex2/Make/Constraint/index.html new file mode 100644 index 00000000..356d2fe2 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__Simplex2/Make/Constraint/index.html @@ -0,0 +1,2 @@ + +Constraint (sidekick-arith.Sidekick_arith_lra__Simplex2.Make.Constraint)

Module Make.Constraint

type op = Op.t
type t = {
op : op;
lhs : V.t;
rhs : num;
}

A constraint is the comparison of a variable to a constant.

val mk : V.t -> op -> num -> t
val leq : V.t -> num -> t
val lt : V.t -> num -> t
val geq : V.t -> num -> t
val gt : V.t -> num -> t
val pp : t Sidekick_util.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__Simplex2/Make/Subst/index.html b/dev/sidekick-arith/Sidekick_arith_lra__Simplex2/Make/Subst/index.html new file mode 100644 index 00000000..ba69df8f --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__Simplex2/Make/Subst/index.html @@ -0,0 +1,2 @@ + +Subst (sidekick-arith.Sidekick_arith_lra__Simplex2.Make.Subst)

Module Make.Subst

type t = num V_map.t
val eval : t -> V.t -> Q.t
val pp : t Sidekick_util.Fmt.printer
val to_string : t -> string
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__Simplex2/Make/Unsat_cert/index.html b/dev/sidekick-arith/Sidekick_arith_lra__Simplex2/Make/Unsat_cert/index.html new file mode 100644 index 00000000..bc541c8c --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__Simplex2/Make/Unsat_cert/index.html @@ -0,0 +1,2 @@ + +Unsat_cert (sidekick-arith.Sidekick_arith_lra__Simplex2.Make.Unsat_cert)

Module Make.Unsat_cert

type t = unsat_cert
val lits : t -> V.lit list
val pp : t Sidekick_util.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__Simplex2/Make/argument-1-Var/index.html b/dev/sidekick-arith/Sidekick_arith_lra__Simplex2/Make/argument-1-Var/index.html new file mode 100644 index 00000000..62a429d8 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__Simplex2/Make/argument-1-Var/index.html @@ -0,0 +1,2 @@ + +1-Var (sidekick-arith.Sidekick_arith_lra__Simplex2.Make.1-Var)

Parameter Make.1-Var

type t

Variable type.

val compare : t -> t -> int

Standard comparison function on variables.

val pp : t Sidekick_util.Fmt.printer

Printer for variables.

type lit
val pp_lit : lit Sidekick_util.Fmt.printer
val not_lit : lit -> lit option
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__Simplex2/Make/index.html b/dev/sidekick-arith/Sidekick_arith_lra__Simplex2/Make/index.html new file mode 100644 index 00000000..1e9679e7 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__Simplex2/Make/index.html @@ -0,0 +1,2 @@ + +Make (sidekick-arith.Sidekick_arith_lra__Simplex2.Make)

Module Sidekick_arith_lra__Simplex2.Make

Parameters

Signature

module V = Var
module V_map : CCMap.S with type V_map.key = V.t
type num = Q.t

Numbers

module Constraint : sig ... end
module Subst : sig ... end
type t
val create : ?⁠stat:Sidekick_util.Stat.t -> unit -> t

Create a new simplex.

val push_level : t -> unit
val pop_levels : t -> int -> unit
val define : t -> V.t -> (num * V.t) list -> unit

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 Constraint.t

type unsat_cert
module Unsat_cert : sig ... end
exception E_unsat of Unsat_cert.t
type ev_on_propagate = V.lit -> reason:V.lit list -> unit
val add_var : t -> V.t -> unit

Make sure the variable exists in the simplex.

val add_constraint : on_propagate:ev_on_propagate -> t -> Constraint.t -> V.lit -> unit

Add a constraint to the simplex.

raises Unsat

if it's immediately obvious that this is not satisfiable.

val declare_bound : t -> Constraint.t -> V.lit -> unit

Declare that this constraint exists, so we can possibly propagate it. Unlike add_constraint this does NOT assert that the constraint is true

val check_exn : on_propagate:(V.lit -> reason:V.lit list -> unit) -> t -> unit

Check the whole simplex for satisfiability.

parameter on_propagate

is called with arguments lit, reason whenever reason => lit is found to be true by the simplex.

raises Unsat

if the constraints are not satisfiable.

type result =
| Sat of Subst.t
| Unsat of Unsat_cert.t
val check : on_propagate:(V.lit -> reason:V.lit list -> unit) -> t -> result

Call check_exn and return a model or a proof of unsat.

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__Simplex2/Op/index.html b/dev/sidekick-arith/Sidekick_arith_lra__Simplex2/Op/index.html new file mode 100644 index 00000000..41da3101 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__Simplex2/Op/index.html @@ -0,0 +1,2 @@ + +Op (sidekick-arith.Sidekick_arith_lra__Simplex2.Op)

Module Sidekick_arith_lra__Simplex2.Op

Basic operator

type t =
| Leq
| Lt
| Geq
| Gt
val neg_sign : t -> t
val not_ : t -> t
val to_string : t -> string
val pp : Sidekick_util.Fmt.t -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__Simplex2/index.html b/dev/sidekick-arith/Sidekick_arith_lra__Simplex2/index.html new file mode 100644 index 00000000..174d5b77 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__Simplex2/index.html @@ -0,0 +1,2 @@ + +Sidekick_arith_lra__Simplex2 (sidekick-arith.Sidekick_arith_lra__Simplex2)

Module Sidekick_arith_lra__Simplex2

Fast Simplex for CDCL(T)

We follow the paper "Integrating Simplex with DPLL(T )" from de Moura and Dutertre.

module Op : sig ... end
module type S = sig ... end
module Make : functor (Var : VAR) -> S with module V = Var
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__Simplex2/module-type-S/Constraint/index.html b/dev/sidekick-arith/Sidekick_arith_lra__Simplex2/module-type-S/Constraint/index.html new file mode 100644 index 00000000..f5931856 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__Simplex2/module-type-S/Constraint/index.html @@ -0,0 +1,2 @@ + +Constraint (sidekick-arith.Sidekick_arith_lra__Simplex2.S.Constraint)

Module S.Constraint

type op = Op.t
type t = {
op : op;
lhs : V.t;
rhs : num;
}

A constraint is the comparison of a variable to a constant.

val mk : V.t -> op -> num -> t
val leq : V.t -> num -> t
val lt : V.t -> num -> t
val geq : V.t -> num -> t
val gt : V.t -> num -> t
val pp : t Sidekick_util.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__Simplex2/module-type-S/Subst/index.html b/dev/sidekick-arith/Sidekick_arith_lra__Simplex2/module-type-S/Subst/index.html new file mode 100644 index 00000000..4c87e36a --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__Simplex2/module-type-S/Subst/index.html @@ -0,0 +1,2 @@ + +Subst (sidekick-arith.Sidekick_arith_lra__Simplex2.S.Subst)

Module S.Subst

type t = num V_map.t
val eval : t -> V.t -> Q.t
val pp : t Sidekick_util.Fmt.printer
val to_string : t -> string
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__Simplex2/module-type-S/Unsat_cert/index.html b/dev/sidekick-arith/Sidekick_arith_lra__Simplex2/module-type-S/Unsat_cert/index.html new file mode 100644 index 00000000..6c45b6eb --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__Simplex2/module-type-S/Unsat_cert/index.html @@ -0,0 +1,2 @@ + +Unsat_cert (sidekick-arith.Sidekick_arith_lra__Simplex2.S.Unsat_cert)

Module S.Unsat_cert

type t = unsat_cert
val lits : t -> V.lit list
val pp : t Sidekick_util.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__Simplex2/module-type-S/V/index.html b/dev/sidekick-arith/Sidekick_arith_lra__Simplex2/module-type-S/V/index.html new file mode 100644 index 00000000..aada7f56 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__Simplex2/module-type-S/V/index.html @@ -0,0 +1,2 @@ + +V (sidekick-arith.Sidekick_arith_lra__Simplex2.S.V)

Module S.V

type t

Variable type.

val compare : t -> t -> int

Standard comparison function on variables.

val pp : t Sidekick_util.Fmt.printer

Printer for variables.

type lit
val pp_lit : lit Sidekick_util.Fmt.printer
val not_lit : lit -> lit option
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__Simplex2/module-type-S/index.html b/dev/sidekick-arith/Sidekick_arith_lra__Simplex2/module-type-S/index.html new file mode 100644 index 00000000..6303dd77 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__Simplex2/module-type-S/index.html @@ -0,0 +1,2 @@ + +S (sidekick-arith.Sidekick_arith_lra__Simplex2.S)

Module type Sidekick_arith_lra__Simplex2.S

module V : VAR
module V_map : CCMap.S with type V_map.key = V.t
type num = Q.t

Numbers

module Constraint : sig ... end
module Subst : sig ... end
type t
val create : ?⁠stat:Sidekick_util.Stat.t -> unit -> t

Create a new simplex.

val push_level : t -> unit
val pop_levels : t -> int -> unit
val define : t -> V.t -> (num * V.t) list -> unit

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 Constraint.t

type unsat_cert
module Unsat_cert : sig ... end
exception E_unsat of Unsat_cert.t
type ev_on_propagate = V.lit -> reason:V.lit list -> unit
val add_var : t -> V.t -> unit

Make sure the variable exists in the simplex.

val add_constraint : on_propagate:ev_on_propagate -> t -> Constraint.t -> V.lit -> unit

Add a constraint to the simplex.

raises Unsat

if it's immediately obvious that this is not satisfiable.

val declare_bound : t -> Constraint.t -> V.lit -> unit

Declare that this constraint exists, so we can possibly propagate it. Unlike add_constraint this does NOT assert that the constraint is true

val check_exn : on_propagate:(V.lit -> reason:V.lit list -> unit) -> t -> unit

Check the whole simplex for satisfiability.

parameter on_propagate

is called with arguments lit, reason whenever reason => lit is found to be true by the simplex.

raises Unsat

if the constraints are not satisfiable.

type result =
| Sat of Subst.t
| Unsat of Unsat_cert.t
val check : on_propagate:(V.lit -> reason:V.lit list -> unit) -> t -> result

Call check_exn and return a model or a proof of unsat.

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__Simplex2/module-type-VAR/index.html b/dev/sidekick-arith/Sidekick_arith_lra__Simplex2/module-type-VAR/index.html new file mode 100644 index 00000000..f3ba4546 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__Simplex2/module-type-VAR/index.html @@ -0,0 +1,2 @@ + +VAR (sidekick-arith.Sidekick_arith_lra__Simplex2.VAR)

Module type Sidekick_arith_lra__Simplex2.VAR

type t

Variable type.

val compare : t -> t -> int

Standard comparison function on variables.

val pp : t Sidekick_util.Fmt.printer

Printer for variables.

type lit
val pp_lit : lit Sidekick_util.Fmt.printer
val not_lit : lit -> lit option
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_base_term__/.dune-keep b/dev/sidekick-arith/Sidekick_arith_lra__Simplex_intf/.dune-keep similarity index 100% rename from dev/sidekick/Sidekick_base_term__/.dune-keep rename to dev/sidekick-arith/Sidekick_arith_lra__Simplex_intf/.dune-keep diff --git a/dev/sidekick-arith/Sidekick_arith_lra__Simplex_intf/index.html b/dev/sidekick-arith/Sidekick_arith_lra__Simplex_intf/index.html new file mode 100644 index 00000000..a55eac7f --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__Simplex_intf/index.html @@ -0,0 +1,2 @@ + +Sidekick_arith_lra__Simplex_intf (sidekick-arith.Sidekick_arith_lra__Simplex_intf)

Module Sidekick_arith_lra__Simplex_intf

Modular and incremental implementation of the general simplex

.

module type S = sig ... end
module type S_FULL = sig ... end
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__Simplex_intf/module-type-S/index.html b/dev/sidekick-arith/Sidekick_arith_lra__Simplex_intf/module-type-S/index.html new file mode 100644 index 00000000..1f09a4cf --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__Simplex_intf/module-type-S/index.html @@ -0,0 +1,2 @@ + +S (sidekick-arith.Sidekick_arith_lra__Simplex_intf.S)

Module type Sidekick_arith_lra__Simplex_intf.S

type var

The given type of the variables

module Var_map : CCMap.S with type Var_map.key = var

A map on variables

type param

Parameter required at the creation of the simplex

type lit
type t

The type of a (possibly not solved) linear system

type cert = {
cert_var : var;
cert_expr : (Q.t * var) list;
}

An unsatisfiability explanation is a couple (x, expr). If expr is the empty list, then there is a contradiction between two given bounds of x. Else, the explanation is an equality x = expr that is valid (it can be derived from the original equations of the system) from which a bound can be deduced which contradicts an already given bound of the system.

type res =
| Solution of Q.t Var_map.t
| Unsatisfiable of cert

Generic type returned when solving the simplex. A solution is a list of bindings that satisfies all the constraints inside the system. If the system is unsatisfiable, an explanation of type 'cert is returned.

Simplex construction

val create : param -> t

The empty system.

parameter fresh

the state for generating fresh variables on demand.

val add_eq : t -> (var * (Q.t * var) list) -> unit

add_eq s (x, eq) adds the equation x=eq to s

val add_bounds : t -> ?⁠strict_lower:bool -> ?⁠strict_upper:bool -> ?⁠lower_reason:lit -> ?⁠upper_reason:lit -> (var * Q.t * Q.t) -> unit

add_bounds (x, lower, upper) adds to s the bounds lower and upper for the given variable x. If the bound is loose on one side (no upper bounds for instance), the values Q.inf and Q.minus_inf can be used. By default, in a system, all variables have no bounds, i.e have lower bound Q.minus_inf and upper bound Q.inf. Optional parameters allow to make the the bounds strict. Defaults to false, so that bounds are large by default.

val add_lower_bound : t -> ?⁠strict:bool -> reason:lit -> var -> Q.t -> unit
val add_upper_bound : t -> ?⁠strict:bool -> reason:lit -> var -> Q.t -> unit

Simplex solving

val solve : t -> res

solve s solves the system s and returns a solution, if one exists. This function may change the internal representation of the system to that of an equivalent one (permutation of basic and non basic variables and pivot operation on the tableaux).

val check_cert : t -> cert -> [ `Ok of lit list | `Bad_bounds of string * string | `Diff_not_0 of Q.t Var_map.t ]

checks that the certificat indeed yields to a contradiction in the current state of the simplex.

returns

`Ok unsat_core if the certificate is valid.

val pp_cert : cert CCFormat.printer
val pp_full_state : t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__Simplex_intf/module-type-S_FULL/L/C/index.html b/dev/sidekick-arith/Sidekick_arith_lra__Simplex_intf/module-type-S_FULL/L/C/index.html new file mode 100644 index 00000000..aec80aef --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__Simplex_intf/module-type-S_FULL/L/C/index.html @@ -0,0 +1,2 @@ + +C (sidekick-arith.Sidekick_arith_lra__Simplex_intf.S_FULL.L.C)

Module L.C

Coeficients used. Can be integers as well as rationals.

type t = Q.t
val equal : t -> t -> bool

Equality on coefficients.

val compare : t -> t -> int

Comparison on coefficients.

val pp : t Sidekick_util.Fmt.printer

Printer for coefficients.

val zero : t

The zero coefficient.

val one : t

The one coefficient (to rule them all, :p).

val neg : t -> t

Unary negation

val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t

Standard operations on coefficients.

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__Simplex_intf/module-type-S_FULL/L/Comb/Infix/index.html b/dev/sidekick-arith/Sidekick_arith_lra__Simplex_intf/module-type-S_FULL/L/Comb/Infix/index.html new file mode 100644 index 00000000..ca944b01 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__Simplex_intf/module-type-S_FULL/L/Comb/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (sidekick-arith.Sidekick_arith_lra__Simplex_intf.S_FULL.L.Comb.Infix)

Module Comb.Infix

Infix operations on combinations

This module defines usual operations on linear combinations, as infix operators to ease reading of complex computations.

val (+) : t -> t -> t

Addition between combinations.

val (-) : t -> t -> t

Substraction between combinations.

val (*) : C.t -> t -> t

Multiplication by a constant.

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__Simplex_intf/module-type-S_FULL/L/Comb/index.html b/dev/sidekick-arith/Sidekick_arith_lra__Simplex_intf/module-type-S_FULL/L/Comb/index.html new file mode 100644 index 00000000..3bc099fb --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__Simplex_intf/module-type-S_FULL/L/Comb/index.html @@ -0,0 +1,2 @@ + +Comb (sidekick-arith.Sidekick_arith_lra__Simplex_intf.S_FULL.L.Comb)

Module L.Comb

Combinations.

This module defines linear combnations as mapping from variables to coefficients. This allows for very fast computations.

type t

The type of linear combinations.

val compare : t -> t -> int

Comparisons on linear combinations.

val pp : t Sidekick_util.Fmt.printer

Printer for linear combinations.

val is_empty : t -> bool

Is the given expression empty ?

Creation
val empty : t

The empty linear combination.

val monomial : C.t -> var -> t

monome n v creates the linear combination n * v

val monomial1 : var -> t

monome1 v creates the linear combination 1 * v

val as_singleton : t -> (C.t * var) option

as_singleton l returns Some (c,x) if l = c * x, None otherwise

val add : C.t -> var -> t -> t

add n v t adds the monome n * v to the combination t.

module Infix : sig ... end

Infix operations on combinations

Include the previous module.

include module type of Infix
val (+) : t -> t -> t

Addition between combinations.

val (-) : t -> t -> t

Substraction between combinations.

val (*) : C.t -> t -> t

Multiplication by a constant.

val iter : (var -> C.t -> unit) -> t -> unit
val of_list : (C.t * var) list -> t
val to_list : t -> (C.t * var) list

Converters to and from lists of monomes.

val of_map : C.t Var_map.t -> t
val to_map : t -> C.t Var_map.t
Semantics
val eval : subst -> t -> C.t

Evaluate a linear combination given a substitution for its variables. TODO: document potential exceptions raised ?

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__Simplex_intf/module-type-S_FULL/L/Constr/index.html b/dev/sidekick-arith/Sidekick_arith_lra__Simplex_intf/module-type-S_FULL/L/Constr/index.html new file mode 100644 index 00000000..48685d90 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__Simplex_intf/module-type-S_FULL/L/Constr/index.html @@ -0,0 +1,2 @@ + +Constr (sidekick-arith.Sidekick_arith_lra__Simplex_intf.S_FULL.L.Constr)

Module L.Constr

Linear constraints.

Represents constraints on linear expressions.

type op = Sidekick_arith_lra__.Linear_expr_intf.bool_op

Arithmetic comparison operators.

type t = {
expr : Expr.t;
op : op;
}

Linear constraints. Expressions are implicitly compared to zero.

val compare : t -> t -> int

Standard comparison function.

val pp : t Sidekick_util.Fmt.printer

Standard printing function.

val of_expr : Expr.t -> Sidekick_arith_lra__.Linear_expr_intf.bool_op -> t
val make : Comb.t -> Sidekick_arith_lra__.Linear_expr_intf.bool_op -> C.t -> t

Create a constraint from a linear expression/combination and a constant.

val geq : Comb.t -> C.t -> t
val leq : Comb.t -> C.t -> t
val gt : Comb.t -> C.t -> t
val lt : Comb.t -> C.t -> t
val eq : Comb.t -> C.t -> t
val neq : Comb.t -> C.t -> t
val geq0 : Expr.t -> t
val leq0 : Expr.t -> t
val gt0 : Expr.t -> t
val lt0 : Expr.t -> t
val eq0 : Expr.t -> t
val neq0 : Expr.t -> t
val op : t -> Sidekick_arith_lra__.Linear_expr_intf.bool_op
val expr : t -> Expr.t

Extract the given part from a constraint.

val split : t -> Comb.t * Sidekick_arith_lra__.Linear_expr_intf.bool_op * C.t

Split the linear combinations from the constant

val eval : subst -> t -> bool

Evaluate the given constraint under a substitution.

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__Simplex_intf/module-type-S_FULL/L/Expr/Infix/index.html b/dev/sidekick-arith/Sidekick_arith_lra__Simplex_intf/module-type-S_FULL/L/Expr/Infix/index.html new file mode 100644 index 00000000..67e18a72 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__Simplex_intf/module-type-S_FULL/L/Expr/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (sidekick-arith.Sidekick_arith_lra__Simplex_intf.S_FULL.L.Expr.Infix)

Module Expr.Infix

Infix operations on expressions

This module defines usual operations on linear expressions, as infix operators to ease reading of complex computations.

val (+) : t -> t -> t

Addition between expressions.

val (-) : t -> t -> t

Substraction between expressions.

val (*) : C.t -> t -> t

Multiplication by a constant.

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__Simplex_intf/module-type-S_FULL/L/Expr/index.html b/dev/sidekick-arith/Sidekick_arith_lra__Simplex_intf/module-type-S_FULL/L/Expr/index.html new file mode 100644 index 00000000..7d9f314c --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__Simplex_intf/module-type-S_FULL/L/Expr/index.html @@ -0,0 +1,2 @@ + +Expr (sidekick-arith.Sidekick_arith_lra__Simplex_intf.S_FULL.L.Expr)

Module L.Expr

Linear expressions represent linear arithmetic expressions as a linear combination and a constant.

type t

The type of linear expressions.

val comb : t -> Comb.t
val const : t -> C.t
val is_zero : t -> bool
val is_const : t -> bool
val compare : t -> t -> int

Standard comparison function on expressions.

val pp : t Sidekick_util.Fmt.printer

Standard printing function on expressions.

val zero : t

The expression 2.

val of_const : C.t -> t

The constant expression.

val of_comb : Comb.t -> t

Combination without constant

val of_list : C.t -> (C.t * Var.t) list -> t
val make : Comb.t -> C.t -> t

make c n makes the linear expression c + n.

val monomial : C.t -> var -> t
val monomial1 : var -> t
module Infix : sig ... end

Infix operations on expressions

Include the previous module.

include module type of Infix
val (+) : t -> t -> t

Addition between expressions.

val (-) : t -> t -> t

Substraction between expressions.

val (*) : C.t -> t -> t

Multiplication by a constant.

Semantics
val eval : subst -> t -> C.t

Evaluate a linear expression given a substitution for its variables. TODO: document potential exceptions raised ?

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__Simplex_intf/module-type-S_FULL/L/Var/index.html b/dev/sidekick-arith/Sidekick_arith_lra__Simplex_intf/module-type-S_FULL/L/Var/index.html new file mode 100644 index 00000000..4bcb5a91 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__Simplex_intf/module-type-S_FULL/L/Var/index.html @@ -0,0 +1,2 @@ + +Var (sidekick-arith.Sidekick_arith_lra__Simplex_intf.S_FULL.L.Var)

Module L.Var

Variables used in expressions.

type t = var

Variable type.

val compare : t -> t -> int

Standard comparison function on variables.

val pp : t Sidekick_util.Fmt.printer

Printer for variables.

type lit = lit
val pp_lit : lit Sidekick_util.Fmt.printer
val not_lit : lit -> lit option
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__Simplex_intf/module-type-S_FULL/L/index.html b/dev/sidekick-arith/Sidekick_arith_lra__Simplex_intf/module-type-S_FULL/L/index.html new file mode 100644 index 00000000..29393c5b --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__Simplex_intf/module-type-S_FULL/L/index.html @@ -0,0 +1,2 @@ + +L (sidekick-arith.Sidekick_arith_lra__Simplex_intf.S_FULL.L)

Module S_FULL.L

module C : Sidekick_arith_lra__.Linear_expr_intf.COEFF with type t = Q.t

Coeficients used. Can be integers as well as rationals.

module Var : Sidekick_arith_lra__.Linear_expr_intf.VAR with type t = var and type lit = lit

Variables used in expressions.

type var = Var.t

The type of variables appearing in expressions.

module Var_map : CCMap.S with type Var_map.key = var

Maps from variables, used for expressions as well as substitutions.

type subst = C.t Var_map.t

Type for substitutions.

module Comb : sig ... end

Combinations.

Linear expressions.

module Expr : sig ... end

Linear expressions represent linear arithmetic expressions as a linear combination and a constant.

module Constr : sig ... end
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_arith_lra__Simplex_intf/module-type-S_FULL/index.html b/dev/sidekick-arith/Sidekick_arith_lra__Simplex_intf/module-type-S_FULL/index.html new file mode 100644 index 00000000..61268b0b --- /dev/null +++ b/dev/sidekick-arith/Sidekick_arith_lra__Simplex_intf/module-type-S_FULL/index.html @@ -0,0 +1,2 @@ + +S_FULL (sidekick-arith.Sidekick_arith_lra__Simplex_intf.S_FULL)

Module type Sidekick_arith_lra__Simplex_intf.S_FULL

include S
type var

The given type of the variables

module Var_map : CCMap.S with type Var_map.key = var

A map on variables

type param

Parameter required at the creation of the simplex

type lit
type t

The type of a (possibly not solved) linear system

type cert = {
cert_var : var;
cert_expr : (Q.t * var) list;
}

An unsatisfiability explanation is a couple (x, expr). If expr is the empty list, then there is a contradiction between two given bounds of x. Else, the explanation is an equality x = expr that is valid (it can be derived from the original equations of the system) from which a bound can be deduced which contradicts an already given bound of the system.

type res =
| Solution of Q.t Var_map.t
| Unsatisfiable of cert

Generic type returned when solving the simplex. A solution is a list of bindings that satisfies all the constraints inside the system. If the system is unsatisfiable, an explanation of type 'cert is returned.

Simplex construction

val create : param -> t

The empty system.

parameter fresh

the state for generating fresh variables on demand.

val add_eq : t -> (var * (Q.t * var) list) -> unit

add_eq s (x, eq) adds the equation x=eq to s

val add_bounds : t -> ?⁠strict_lower:bool -> ?⁠strict_upper:bool -> ?⁠lower_reason:lit -> ?⁠upper_reason:lit -> (var * Q.t * Q.t) -> unit

add_bounds (x, lower, upper) adds to s the bounds lower and upper for the given variable x. If the bound is loose on one side (no upper bounds for instance), the values Q.inf and Q.minus_inf can be used. By default, in a system, all variables have no bounds, i.e have lower bound Q.minus_inf and upper bound Q.inf. Optional parameters allow to make the the bounds strict. Defaults to false, so that bounds are large by default.

val add_lower_bound : t -> ?⁠strict:bool -> reason:lit -> var -> Q.t -> unit
val add_upper_bound : t -> ?⁠strict:bool -> reason:lit -> var -> Q.t -> unit

Simplex solving

val solve : t -> res

solve s solves the system s and returns a solution, if one exists. This function may change the internal representation of the system to that of an equivalent one (permutation of basic and non basic variables and pivot operation on the tableaux).

val check_cert : t -> cert -> [ `Ok of lit list | `Bad_bounds of string * string | `Diff_not_0 of Q.t Var_map.t ]

checks that the certificat indeed yields to a contradiction in the current state of the simplex.

returns

`Ok unsat_core if the certificate is valid.

val pp_cert : cert CCFormat.printer
val pp_full_state : t CCFormat.printer
module L : Sidekick_arith_lra__.Linear_expr_intf.S with type C.t = Q.t and type Var.t = var and type Var.lit = lit
type op = Sidekick_arith_lra.Predicate.t =
| Leq
| Geq
| Lt
| Gt
| Eq
| Neq
type constr = L.Constr.t
val add_constr : t -> constr -> lit -> unit

Add a constraint to a simplex state.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_base_term__Base_types/.dune-keep b/dev/sidekick-arith/Sidekick_base_term/.dune-keep similarity index 100% rename from dev/sidekick/Sidekick_base_term__Base_types/.dune-keep rename to dev/sidekick-arith/Sidekick_base_term/.dune-keep diff --git a/dev/sidekick-arith/Sidekick_base_term/Arg/Fun/index.html b/dev/sidekick-arith/Sidekick_base_term/Arg/Fun/index.html new file mode 100644 index 00000000..b59409ac --- /dev/null +++ b/dev/sidekick-arith/Sidekick_base_term/Arg/Fun/index.html @@ -0,0 +1,2 @@ + +Fun (sidekick-arith.Sidekick_base_term.Arg.Fun)

Module Arg.Fun

type t = Fun.t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_base_term/Arg/Term/index.html b/dev/sidekick-arith/Sidekick_base_term/Arg/Term/index.html new file mode 100644 index 00000000..5105ad98 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_base_term/Arg/Term/index.html @@ -0,0 +1,2 @@ + +Term (sidekick-arith.Sidekick_base_term.Arg.Term)

Module Arg.Term

type t = Term.t
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type state = Term.state
val ty : t -> Ty.t
val bool : state -> bool -> t
val as_bool : t -> bool option
val abs : state -> t -> t * bool
val map_shallow : state -> (t -> t) -> t -> t

Map function on immediate subterms

val iter_dag : t -> (t -> unit) -> unit
module Tbl : CCHashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_base_term/Arg/Ty/index.html b/dev/sidekick-arith/Sidekick_base_term/Arg/Ty/index.html new file mode 100644 index 00000000..a2651923 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_base_term/Arg/Ty/index.html @@ -0,0 +1,2 @@ + +Ty (sidekick-arith.Sidekick_base_term.Arg.Ty)

Module Arg.Ty

type t = Ty.t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type state
val bool : state -> t
val is_bool : t -> bool
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_base_term/Arg/index.html b/dev/sidekick-arith/Sidekick_base_term/Arg/index.html new file mode 100644 index 00000000..838ad498 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_base_term/Arg/index.html @@ -0,0 +1,2 @@ + +Arg (sidekick-arith.Sidekick_base_term.Arg)

Module Sidekick_base_term.Arg

module Fun : sig ... end with type t = Fun.t
module Ty : sig ... end with type t = Ty.t
module Term : sig ... end with type t = Term.t and type state = Term.state
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_base_term/Base_types/Cstor/index.html b/dev/sidekick-arith/Sidekick_base_term/Base_types/Cstor/index.html new file mode 100644 index 00000000..eb3c4a8a --- /dev/null +++ b/dev/sidekick-arith/Sidekick_base_term/Base_types/Cstor/index.html @@ -0,0 +1,2 @@ + +Cstor (sidekick-arith.Sidekick_base_term.Base_types.Cstor)

Module Base_types.Cstor

type t = cstor = {
cstor_id : ID.t;
cstor_is_a : ID.t;
mutable cstor_arity : int;
cstor_args : select list lazy_t;
cstor_ty_as_data : data;
cstor_ty : ty lazy_t;
}
val ty_args : t -> ty Iter.t
val equal : cstor -> cstor -> bool
val pp : CCFormat.t -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_base_term/Base_types/Data/index.html b/dev/sidekick-arith/Sidekick_base_term/Base_types/Data/index.html new file mode 100644 index 00000000..d7923dc9 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_base_term/Base_types/Data/index.html @@ -0,0 +1,2 @@ + +Data (sidekick-arith.Sidekick_base_term.Base_types.Data)

Module Base_types.Data

type t = data = {
data_id : ID.t;
data_cstors : cstor Sidekick_base_term__.ID.Map.t lazy_t;
data_as_ty : ty lazy_t;
}
val pp : CCFormat.t -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_base_term/Base_types/Fun/index.html b/dev/sidekick-arith/Sidekick_base_term/Base_types/Fun/index.html new file mode 100644 index 00000000..b5326d29 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_base_term/Base_types/Fun/index.html @@ -0,0 +1,2 @@ + +Fun (sidekick-arith.Sidekick_base_term.Base_types.Fun)

Module Base_types.Fun

type view = fun_view =
| Fun_undef of fun_ty
| Fun_select of select
| Fun_cstor of cstor
| Fun_is_a of cstor
| Fun_def of {
pp : a. ('a Fmt.printer -> 'a Sidekick_util.IArray.t Fmt.printer) option;
abs : self:term -> term Sidekick_util.IArray.t -> term * bool;
do_cc : bool;
relevant : a. ID.t -> 'a Sidekick_util.IArray.t -> int -> bool;
ty : ID.t -> term Sidekick_util.IArray.t -> ty;
eval : value Sidekick_util.IArray.t -> value;
}
type t = fun_ = {
fun_id : ID.t;
fun_view : fun_view;
}
val id : t -> ID.t
val view : t -> view
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val as_undefined : t -> (t * Ty.Fun.t) option
val as_undefined_exn : t -> t * Ty.Fun.t
val is_undefined : t -> bool
val select : select -> t
val select_idx : cstor -> int -> t
val cstor : cstor -> t
val is_a : cstor -> t
val do_cc : t -> bool
val mk_undef : ID.t -> Ty.Fun.t -> t
val mk_undef' : ID.t -> Ty.t list -> Ty.t -> t
val mk_undef_const : ID.t -> Ty.t -> t
val pp : t CCFormat.printer
module Map : CCMap.S with type Map.key = t
module Tbl : CCHashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_base_term/Base_types/Proof/index.html b/dev/sidekick-arith/Sidekick_base_term/Base_types/Proof/index.html new file mode 100644 index 00000000..76ffbdbb --- /dev/null +++ b/dev/sidekick-arith/Sidekick_base_term/Base_types/Proof/index.html @@ -0,0 +1,2 @@ + +Proof (sidekick-arith.Sidekick_base_term.Base_types.Proof)

Module Base_types.Proof

type t =
| Default
val default : t
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_base_term/Base_types/Select/index.html b/dev/sidekick-arith/Sidekick_base_term/Base_types/Select/index.html new file mode 100644 index 00000000..4901af5d --- /dev/null +++ b/dev/sidekick-arith/Sidekick_base_term/Base_types/Select/index.html @@ -0,0 +1,2 @@ + +Select (sidekick-arith.Sidekick_base_term.Base_types.Select)

Module Base_types.Select

type t = select = {
select_id : ID.t;
select_cstor : cstor;
select_ty : ty lazy_t;
select_i : int;
}
val ty : t -> ty
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_base_term/Base_types/Statement/index.html b/dev/sidekick-arith/Sidekick_base_term/Base_types/Statement/index.html new file mode 100644 index 00000000..fc3925cc --- /dev/null +++ b/dev/sidekick-arith/Sidekick_base_term/Base_types/Statement/index.html @@ -0,0 +1,2 @@ + +Statement (sidekick-arith.Sidekick_base_term.Base_types.Statement)

Module Base_types.Statement

type t = statement =
| Stmt_set_logic of string
| Stmt_set_option of string list
| Stmt_set_info of string * string
| Stmt_data of data list
| Stmt_ty_decl of ID.t * int
| Stmt_decl of ID.t * ty list * ty
| Stmt_define of definition list
| Stmt_assert of term
| Stmt_assert_clause of term list
| Stmt_check_sat of (bool * term) list
| Stmt_exit
val pp : Fmt.t -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_base_term/Base_types/Term/Iter_dag/index.html b/dev/sidekick-arith/Sidekick_base_term/Base_types/Term/Iter_dag/index.html new file mode 100644 index 00000000..35263827 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_base_term/Base_types/Term/Iter_dag/index.html @@ -0,0 +1,2 @@ + +Iter_dag (sidekick-arith.Sidekick_base_term.Base_types.Term.Iter_dag)

Module Term.Iter_dag

type t
val create : unit -> t
val iter_dag : t -> term -> term Iter.t
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_base_term/Base_types/Term/index.html b/dev/sidekick-arith/Sidekick_base_term/Base_types/Term/index.html new file mode 100644 index 00000000..c9ad25a0 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_base_term/Base_types/Term/index.html @@ -0,0 +1,2 @@ + +Term (sidekick-arith.Sidekick_base_term.Base_types.Term)

Module Base_types.Term

type t = term = {
mutable term_id : int;
mutable term_ty : ty;
term_view : t term_view;
}
type 'a view = 'a term_view =
| Bool of bool
| App_fun of fun_ * 'a Sidekick_util.IArray.t
| Eq of 'a * 'a
| Not of 'a
| Ite of 'a * 'a * 'a
| LRA of 'a lra_view
val id : t -> int
val view : t -> term view
val ty : t -> Ty.t
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
type state
val create : ?⁠size:int -> unit -> state
val make : state -> t view -> t
val true_ : state -> t
val false_ : state -> t
val bool : state -> bool -> t
val const : state -> fun_ -> t
val app_fun : state -> fun_ -> t Sidekick_util.IArray.t -> t
val eq : state -> t -> t -> t
val not_ : state -> t -> t
val ite : state -> t -> t -> t -> t
val select : state -> select -> t -> t
val app_cstor : state -> cstor -> t Sidekick_util.IArray.t -> t
val is_a : state -> cstor -> t -> t
val lra : state -> t lra_view -> t
val abs : state -> t -> t * bool

Obtain unsigned version of t, + the sign as a boolean

module Iter_dag : sig ... end
val iter_dag : t -> t Iter.t
val map_shallow : state -> (t -> t) -> t -> t
val pp : t Fmt.printer
Views
val is_true : t -> bool
val is_false : t -> bool
val is_const : t -> bool
val cc_view : t -> (fun_tt Iter.t) CC_view.t
val as_fun_undef : t -> (fun_ * Ty.Fun.t) option
val as_bool : t -> bool option
Containers
module Tbl : CCHashtbl.S with type Tbl.key = t
module Map : CCMap.S with type Map.key = t
module Set : CCSet.S with type Set.elt = t
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_base_term/Base_types/Term_cell/Make_eq/argument-1-X/index.html b/dev/sidekick-arith/Sidekick_base_term/Base_types/Term_cell/Make_eq/argument-1-X/index.html new file mode 100644 index 00000000..ea8bafa7 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_base_term/Base_types/Term_cell/Make_eq/argument-1-X/index.html @@ -0,0 +1,2 @@ + +1-X (sidekick-arith.Sidekick_base_term.Base_types.Term_cell.Make_eq.1-X)

Parameter Make_eq.1-X

type t
val hash : t -> int
val equal : t -> t -> bool
val pp : t Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_base_term/Base_types/Term_cell/Make_eq/index.html b/dev/sidekick-arith/Sidekick_base_term/Base_types/Term_cell/Make_eq/index.html new file mode 100644 index 00000000..b584f8f1 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_base_term/Base_types/Term_cell/Make_eq/index.html @@ -0,0 +1,2 @@ + +Make_eq (sidekick-arith.Sidekick_base_term.Base_types.Term_cell.Make_eq)

Module Term_cell.Make_eq

Parameters

Signature

val equal : X.t view -> X.t view -> bool
val hash : X.t view -> int
val pp : X.t view Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_base_term/Base_types/Term_cell/index.html b/dev/sidekick-arith/Sidekick_base_term/Base_types/Term_cell/index.html new file mode 100644 index 00000000..460859cd --- /dev/null +++ b/dev/sidekick-arith/Sidekick_base_term/Base_types/Term_cell/index.html @@ -0,0 +1,2 @@ + +Term_cell (sidekick-arith.Sidekick_base_term.Base_types.Term_cell)

Module Base_types.Term_cell

type 'a view = 'a term_view =
| Bool of bool
| App_fun of fun_ * 'a Sidekick_util.IArray.t
| Eq of 'a * 'a
| Not of 'a
| Ite of 'a * 'a * 'a
| LRA of 'a lra_view
type t = term view
val equal : t -> t -> bool
val hash : t -> int
val true_ : t
val false_ : t
val const : fun_ -> t
val app_fun : fun_ -> term Sidekick_util.IArray.t -> t
val eq : term -> term -> t
val not_ : term -> t
val ite : term -> term -> term -> t
val lra : term lra_view -> t
val ty : t -> Ty.t

Compute the type of this term cell. Not totally free

val pp : t Fmt.printer
val map : ('a -> 'b) -> 'a view -> 'b view
val iter : ('a -> unit) -> 'a view -> unit
module type ARG = sig ... end
module Make_eq : functor (X : ARG) -> sig ... end
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_base_term/Base_types/Term_cell/module-type-ARG/index.html b/dev/sidekick-arith/Sidekick_base_term/Base_types/Term_cell/module-type-ARG/index.html new file mode 100644 index 00000000..d4aeff23 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_base_term/Base_types/Term_cell/module-type-ARG/index.html @@ -0,0 +1,2 @@ + +ARG (sidekick-arith.Sidekick_base_term.Base_types.Term_cell.ARG)

Module type Term_cell.ARG

type t
val hash : t -> int
val equal : t -> t -> bool
val pp : t Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_base_term/Base_types/Ty/Fun/index.html b/dev/sidekick-arith/Sidekick_base_term/Base_types/Ty/Fun/index.html new file mode 100644 index 00000000..07d2d407 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_base_term/Base_types/Ty/Fun/index.html @@ -0,0 +1,2 @@ + +Fun (sidekick-arith.Sidekick_base_term.Base_types.Ty.Fun)

Module Ty.Fun

type t = fun_ty
val args : t -> ty list
val ret : t -> ty
val arity : t -> int
val unfold : t -> ty list * ty
val mk : ty list -> ty -> t
val pp : t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_base_term/Base_types/Ty/index.html b/dev/sidekick-arith/Sidekick_base_term/Base_types/Ty/index.html new file mode 100644 index 00000000..a88db462 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_base_term/Base_types/Ty/index.html @@ -0,0 +1,2 @@ + +Ty (sidekick-arith.Sidekick_base_term.Base_types.Ty)

Module Base_types.Ty

type t = ty
type state = unit
type view = ty_view =
| Ty_bool
| Ty_real
| Ty_atomic of {
def : ty_def;
args : ty list;
mutable finite : bool;
}
type def = ty_def =
| Ty_uninterpreted of ID.t
| Ty_data of {
data : data;
}
| Ty_def of {
id : ID.t;
pp : ty Fmt.printer -> ty list Fmt.printer;
default_val : value list -> value;
}
val id : t -> int
val view : t -> view
val bool : state -> t
val real : state -> t
val atomic : def -> t list -> t
val atomic_uninterpreted : ID.t -> t
val finite : t -> bool
val set_finite : t -> bool -> unit
val is_bool : t -> bool
val is_uninterpreted : t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val pp : t CCFormat.printer
module Tbl : CCHashtbl.S with type Tbl.key = t
module Fun : sig ... end
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_base_term/Base_types/Value/index.html b/dev/sidekick-arith/Sidekick_base_term/Base_types/Value/index.html new file mode 100644 index 00000000..318196aa --- /dev/null +++ b/dev/sidekick-arith/Sidekick_base_term/Base_types/Value/index.html @@ -0,0 +1,2 @@ + +Value (sidekick-arith.Sidekick_base_term.Base_types.Value)

Module Base_types.Value

type t = value =
| V_bool of bool
| V_element of {
id : ID.t;
ty : ty;
}
| V_cstor of {
c : cstor;
args : value list;
}
| V_custom of {
view : value_custom_view;
pp : value_custom_view Fmt.printer;
eq : value_custom_view -> value_custom_view -> bool;
hash : value_custom_view -> int;
}
| V_real of Q.t
val true_ : t
val false_ : t
val bool : bool -> t
val real : Q.t -> t
val real_of_string : string -> t
val mk_elt : ID.t -> Ty.t -> t
val is_bool : t -> bool
val is_true : t -> bool
val is_false : t -> bool
val cstor_app : cstor -> t list -> t
val fresh : Term.t -> t
val hash : t -> int
val equal : t -> t -> bool
val pp : t Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_base_term/Base_types/index.html b/dev/sidekick-arith/Sidekick_base_term/Base_types/index.html new file mode 100644 index 00000000..7d309c1a --- /dev/null +++ b/dev/sidekick-arith/Sidekick_base_term/Base_types/index.html @@ -0,0 +1,2 @@ + +Base_types (sidekick-arith.Sidekick_base_term.Base_types)

Module Sidekick_base_term.Base_types

module Vec = Msat.Vec
module Log = Msat.Log
module Fmt = CCFormat
module CC_view = Sidekick_core.CC_view
type lra_pred = Sidekick_arith_lra.Predicate.t =
| Leq
| Geq
| Lt
| Gt
| Eq
| Neq
type lra_op = Sidekick_arith_lra.op =
| Plus
| Minus
type 'a lra_view = 'a Sidekick_arith_lra.lra_view =
| LRA_pred of lra_pred * 'a * 'a
| LRA_op of lra_op * 'a * 'a
| LRA_mult of Q.t * 'a
| LRA_const of Q.t
| LRA_simplex_var of 'a
| LRA_simplex_pred of 'a * Sidekick_arith_lra.S_op.t * Q.t
| LRA_other of 'a
type term = {
mutable term_id : int;
mutable term_ty : ty;
term_view : term term_view;
}
and 'a term_view =
| Bool of bool
| App_fun of fun_ * 'a Sidekick_util.IArray.t
| Eq of 'a * 'a
| Not of 'a
| Ite of 'a * 'a * 'a
| LRA of 'a lra_view
and fun_ = {
fun_id : ID.t;
fun_view : fun_view;
}
and fun_view =
| Fun_undef of fun_ty
| Fun_select of select
| Fun_cstor of cstor
| Fun_is_a of cstor
| Fun_def of {
pp : a. ('a Fmt.printer -> 'a Sidekick_util.IArray.t Fmt.printer) option;
abs : self:term -> term Sidekick_util.IArray.t -> term * bool;
do_cc : bool;
relevant : a. ID.t -> 'a Sidekick_util.IArray.t -> int -> bool;
ty : ID.t -> term Sidekick_util.IArray.t -> ty;
eval : value Sidekick_util.IArray.t -> value;
}

Methods on the custom term view whose arguments are 'a. Terms must be printable, and provide some additional theory handles.

  • relevant must return a subset of args (possibly the same set). The terms it returns will be activated and evaluated whenever possible. Terms in args \ relevant args are considered for congruence but not for evaluation.
and fun_ty = {
fun_ty_args : ty list;
fun_ty_ret : ty;
}

Function type

and ty = {
mutable ty_id : int;
ty_view : ty_view;
}

Hashconsed type

and ty_view =
| Ty_bool
| Ty_real
| Ty_atomic of {
def : ty_def;
args : ty list;
mutable finite : bool;
}
and ty_def =
| Ty_uninterpreted of ID.t
| Ty_data of {
data : data;
}
| Ty_def of {
id : ID.t;
pp : ty Fmt.printer -> ty list Fmt.printer;
default_val : value list -> value;
}
and data = {
data_id : ID.t;
data_cstors : cstor Sidekick_base_term__.ID.Map.t lazy_t;
data_as_ty : ty lazy_t;
}
and cstor = {
cstor_id : ID.t;
cstor_is_a : ID.t;
mutable cstor_arity : int;
cstor_args : select list lazy_t;
cstor_ty_as_data : data;
cstor_ty : ty lazy_t;
}
and select = {
select_id : ID.t;
select_cstor : cstor;
select_ty : ty lazy_t;
select_i : int;
}
and value =
| V_bool of bool
| V_element of {
id : ID.t;
ty : ty;
}

a named constant, distinct from any other constant

| V_cstor of {
c : cstor;
args : value list;
}
| V_custom of {
view : value_custom_view;
pp : value_custom_view Fmt.printer;
eq : value_custom_view -> value_custom_view -> bool;
hash : value_custom_view -> int;
}

Custom value

| V_real of Q.t

Semantic values, used for models (and possibly model-constructing calculi)

and value_custom_view = ..
type definition = ID.t * ty * term
type statement =
| Stmt_set_logic of string
| Stmt_set_option of string list
| Stmt_set_info of string * string
| Stmt_data of data list
| Stmt_ty_decl of ID.t * int
| Stmt_decl of ID.t * ty list * ty
| Stmt_define of definition list
| Stmt_assert of term
| Stmt_assert_clause of term list
| Stmt_check_sat of (bool * term) list
| Stmt_exit
val term_equal_ : term -> term -> bool
val term_hash_ : term -> int
val term_cmp_ : term -> term -> int
val fun_compare : fun_ -> fun_ -> int
val pp_fun : CCFormat.t -> fun_ -> unit
val id_of_fun : fun_ -> ID.t
val eq_ty : ty -> ty -> bool
val eq_cstor : cstor -> cstor -> bool
val eq_value : value -> value -> bool
val hash_value : value Sidekick_util.Hash.t
val pp_value : value Sidekick_util.Util.printer
val pp_db : Stdlib.Format.formatter -> (int * 'a) -> unit
val pp_ty : ty Sidekick_util.Util.printer
val string_of_lra_pred : lra_pred -> string
val pp_pred : Fmt.t -> lra_pred -> unit
val string_of_lra_op : lra_op -> string
val pp_lra_op : Fmt.t -> lra_op -> unit
val pp_term_view_gen : pp_id:(Fmt.t -> ID.t -> unit) -> pp_t:'a Fmt.printer -> Fmt.t -> 'a term_view -> unit
val pp_term_top : ids:bool -> Fmt.t -> term -> unit
val pp_term : Fmt.t -> term -> unit
val pp_term_view : Fmt.t -> term term_view -> unit
module Ty : sig ... end
module Fun : sig ... end
module Term_cell : sig ... end
module Term : sig ... end
module Value : sig ... end
module Data : sig ... end
module Select : sig ... end
module Cstor : sig ... end
module Proof : sig ... end
module Statement : sig ... end
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_base_term/ID/B/index.html b/dev/sidekick-arith/Sidekick_base_term/ID/B/index.html new file mode 100644 index 00000000..38397272 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_base_term/ID/B/index.html @@ -0,0 +1,2 @@ + +B (sidekick-arith.Sidekick_base_term.ID.B)

Module ID.B

val rat : t
val int : t
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_base_term/ID/index.html b/dev/sidekick-arith/Sidekick_base_term/ID/index.html new file mode 100644 index 00000000..d1d7d91d --- /dev/null +++ b/dev/sidekick-arith/Sidekick_base_term/ID/index.html @@ -0,0 +1,2 @@ + +ID (sidekick-arith.Sidekick_base_term.ID)

Module Sidekick_base_term.ID

Unique Identifiers

type t
val make : string -> t
val makef : ('a, Stdlib.Format.formatter, unit, t) Stdlib.format4 -> 'a
val copy : t -> t
val id : t -> int
val to_string : t -> string
val to_string_full : t -> string
include Sidekick_util.Intf.EQ with type t := t
type t
val equal : t -> t -> bool
include Sidekick_util.Intf.ORD with type t := t
type t
val compare : t -> t -> int
include Sidekick_util.Intf.HASH with type t := t
type t
val hash : t -> int
include Sidekick_util.Intf.PRINT with type t := t
type t
val pp : t CCFormat.printer
val pp_name : t CCFormat.printer
module Map : CCMap.S with type Map.key = t
module Set : CCSet.S with type Set.elt = t
module Tbl : CCHashtbl.S with type Tbl.key = t
module B : sig ... end
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_base_term/Model/Fun_interpretation/index.html b/dev/sidekick-arith/Sidekick_base_term/Model/Fun_interpretation/index.html new file mode 100644 index 00000000..d454f000 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_base_term/Model/Fun_interpretation/index.html @@ -0,0 +1,2 @@ + +Fun_interpretation (sidekick-arith.Sidekick_base_term.Model.Fun_interpretation)

Module Model.Fun_interpretation

type t = {
cases : Base_types.Value.t Val_map.t;
default : Base_types.Value.t;
}
val default : t -> Base_types.Value.t
val cases_list : t -> (Base_types.Value.t list * Base_types.Value.t) list
val make : default:Base_types.Value.t -> (Base_types.Value.t list * Base_types.Value.t) list -> t
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_base_term/Model/Val_map/index.html b/dev/sidekick-arith/Sidekick_base_term/Model/Val_map/index.html new file mode 100644 index 00000000..4252d864 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_base_term/Model/Val_map/index.html @@ -0,0 +1,2 @@ + +Val_map (sidekick-arith.Sidekick_base_term.Model.Val_map)

Module Model.Val_map

type key = Base_types.Value.t list
type 'a t
val empty : 'a t
val is_empty : _ t -> bool
val cardinal : _ t -> int
val find : key -> 'a t -> 'a option
val add : key -> 'a -> 'a t -> 'a t
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_base_term/Model/index.html b/dev/sidekick-arith/Sidekick_base_term/Model/index.html new file mode 100644 index 00000000..af079852 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_base_term/Model/index.html @@ -0,0 +1,2 @@ + +Model (sidekick-arith.Sidekick_base_term.Model)

Module Sidekick_base_term.Model

Model

module Val_map : sig ... end
module Fun_interpretation : sig ... end
type t = {
values : Base_types.Value.t Sidekick_base_term__.Base_types.Term.Map.t;
funs : Fun_interpretation.t Sidekick_base_term__.Base_types.Fun.Map.t;
}
val empty : t
val add : Base_types.Term.t -> Base_types.Value.t -> t -> t
val mem : Base_types.Term.t -> t -> bool
val find : Base_types.Term.t -> t -> Base_types.Value.t option
val merge : t -> t -> t
val pp : t CCFormat.printer
val eval : t -> Base_types.Term.t -> Base_types.Value.t option
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_base_term/index.html b/dev/sidekick-arith/Sidekick_base_term/index.html new file mode 100644 index 00000000..ef484009 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_base_term/index.html @@ -0,0 +1,2 @@ + +Sidekick_base_term (sidekick-arith.Sidekick_base_term)

Module Sidekick_base_term

module Base_types : sig ... end
module ID : sig ... end
module Fun = Base_types.Fun
module Stat = Sidekick_util.Stat
module Model : sig ... end
module Term = Base_types.Term
module Value = Base_types.Value
module Term_cell = Base_types.Term_cell
module Ty = Base_types.Ty
module Statement = Base_types.Statement
module Data = Base_types.Data
module Select = Base_types.Select
module Arg : Sidekick_core.TERM with type Term.t = Term.t and type Fun.t = Fun.t and type Ty.t = Ty.t and type Term.state = Term.state
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_base_term__Config/.dune-keep b/dev/sidekick-arith/Sidekick_base_term__/.dune-keep similarity index 100% rename from dev/sidekick/Sidekick_base_term__Config/.dune-keep rename to dev/sidekick-arith/Sidekick_base_term__/.dune-keep diff --git a/dev/sidekick-arith/Sidekick_base_term__/Base_types/Cstor/index.html b/dev/sidekick-arith/Sidekick_base_term__/Base_types/Cstor/index.html new file mode 100644 index 00000000..3e792618 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_base_term__/Base_types/Cstor/index.html @@ -0,0 +1,2 @@ + +Cstor (sidekick-arith.Sidekick_base_term__.Base_types.Cstor)

Module Base_types.Cstor

type t = cstor = {
cstor_id : Sidekick_base_term.ID.t;
cstor_is_a : Sidekick_base_term.ID.t;
mutable cstor_arity : int;
cstor_args : select list lazy_t;
cstor_ty_as_data : data;
cstor_ty : ty lazy_t;
}
val ty_args : t -> ty Iter.t
val equal : cstor -> cstor -> bool
val pp : CCFormat.t -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_base_term__/Base_types/Data/index.html b/dev/sidekick-arith/Sidekick_base_term__/Base_types/Data/index.html new file mode 100644 index 00000000..c6a93de2 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_base_term__/Base_types/Data/index.html @@ -0,0 +1,2 @@ + +Data (sidekick-arith.Sidekick_base_term__.Base_types.Data)

Module Base_types.Data

type t = data = {
data_id : Sidekick_base_term.ID.t;
data_cstors : cstor Sidekick_base_term__.ID.Map.t lazy_t;
data_as_ty : ty lazy_t;
}
val pp : CCFormat.t -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_base_term__/Base_types/Fun/index.html b/dev/sidekick-arith/Sidekick_base_term__/Base_types/Fun/index.html new file mode 100644 index 00000000..2f8f6a3b --- /dev/null +++ b/dev/sidekick-arith/Sidekick_base_term__/Base_types/Fun/index.html @@ -0,0 +1,2 @@ + +Fun (sidekick-arith.Sidekick_base_term__.Base_types.Fun)

Module Base_types.Fun

type view = fun_view =
| Fun_undef of fun_ty
| Fun_select of select
| Fun_cstor of cstor
| Fun_is_a of cstor
| Fun_def of {
pp : a. ('a Fmt.printer -> 'a Sidekick_util.IArray.t Fmt.printer) option;
abs : self:term -> term Sidekick_util.IArray.t -> term * bool;
do_cc : bool;
relevant : a. Sidekick_base_term.ID.t -> 'a Sidekick_util.IArray.t -> int -> bool;
ty : Sidekick_base_term.ID.t -> term Sidekick_util.IArray.t -> ty;
eval : value Sidekick_util.IArray.t -> value;
}
type t = fun_ = {
fun_id : Sidekick_base_term.ID.t;
fun_view : fun_view;
}
val id : t -> Sidekick_base_term.ID.t
val view : t -> view
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val as_undefined : t -> (t * Ty.Fun.t) option
val as_undefined_exn : t -> t * Ty.Fun.t
val is_undefined : t -> bool
val select : select -> t
val select_idx : cstor -> int -> t
val cstor : cstor -> t
val is_a : cstor -> t
val do_cc : t -> bool
val mk_undef : Sidekick_base_term.ID.t -> Ty.Fun.t -> t
val mk_undef' : Sidekick_base_term.ID.t -> Ty.t list -> Ty.t -> t
val mk_undef_const : Sidekick_base_term.ID.t -> Ty.t -> t
val pp : t CCFormat.printer
module Map : CCMap.S with type Map.key = t
module Tbl : CCHashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_base_term__/Base_types/Proof/index.html b/dev/sidekick-arith/Sidekick_base_term__/Base_types/Proof/index.html new file mode 100644 index 00000000..0fec475e --- /dev/null +++ b/dev/sidekick-arith/Sidekick_base_term__/Base_types/Proof/index.html @@ -0,0 +1,2 @@ + +Proof (sidekick-arith.Sidekick_base_term__.Base_types.Proof)

Module Base_types.Proof

type t =
| Default
val default : t
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_base_term__/Base_types/Select/index.html b/dev/sidekick-arith/Sidekick_base_term__/Base_types/Select/index.html new file mode 100644 index 00000000..4aff3f5c --- /dev/null +++ b/dev/sidekick-arith/Sidekick_base_term__/Base_types/Select/index.html @@ -0,0 +1,2 @@ + +Select (sidekick-arith.Sidekick_base_term__.Base_types.Select)

Module Base_types.Select

type t = select = {
select_id : Sidekick_base_term.ID.t;
select_cstor : cstor;
select_ty : ty lazy_t;
select_i : int;
}
val ty : t -> ty
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_base_term__/Base_types/Statement/index.html b/dev/sidekick-arith/Sidekick_base_term__/Base_types/Statement/index.html new file mode 100644 index 00000000..0e3926ba --- /dev/null +++ b/dev/sidekick-arith/Sidekick_base_term__/Base_types/Statement/index.html @@ -0,0 +1,2 @@ + +Statement (sidekick-arith.Sidekick_base_term__.Base_types.Statement)

Module Base_types.Statement

type t = statement =
| Stmt_set_logic of string
| Stmt_set_option of string list
| Stmt_set_info of string * string
| Stmt_data of data list
| Stmt_ty_decl of Sidekick_base_term.ID.t * int
| Stmt_decl of Sidekick_base_term.ID.t * ty list * ty
| Stmt_define of definition list
| Stmt_assert of term
| Stmt_assert_clause of term list
| Stmt_check_sat of (bool * term) list
| Stmt_exit
val pp : Fmt.t -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_base_term__/Base_types/Term/Iter_dag/index.html b/dev/sidekick-arith/Sidekick_base_term__/Base_types/Term/Iter_dag/index.html new file mode 100644 index 00000000..00b0ef44 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_base_term__/Base_types/Term/Iter_dag/index.html @@ -0,0 +1,2 @@ + +Iter_dag (sidekick-arith.Sidekick_base_term__.Base_types.Term.Iter_dag)

Module Term.Iter_dag

type t
val create : unit -> t
val iter_dag : t -> term -> term Iter.t
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_base_term__/Base_types/Term/index.html b/dev/sidekick-arith/Sidekick_base_term__/Base_types/Term/index.html new file mode 100644 index 00000000..f0212590 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_base_term__/Base_types/Term/index.html @@ -0,0 +1,2 @@ + +Term (sidekick-arith.Sidekick_base_term__.Base_types.Term)

Module Base_types.Term

type t = term = {
mutable term_id : int;
mutable term_ty : ty;
term_view : t term_view;
}
type 'a view = 'a term_view =
| Bool of bool
| App_fun of fun_ * 'a Sidekick_util.IArray.t
| Eq of 'a * 'a
| Not of 'a
| Ite of 'a * 'a * 'a
| LRA of 'a lra_view
val id : t -> int
val view : t -> term view
val ty : t -> Ty.t
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
type state
val create : ?⁠size:int -> unit -> state
val make : state -> t view -> t
val true_ : state -> t
val false_ : state -> t
val bool : state -> bool -> t
val const : state -> fun_ -> t
val app_fun : state -> fun_ -> t Sidekick_util.IArray.t -> t
val eq : state -> t -> t -> t
val not_ : state -> t -> t
val ite : state -> t -> t -> t -> t
val select : state -> select -> t -> t
val app_cstor : state -> cstor -> t Sidekick_util.IArray.t -> t
val is_a : state -> cstor -> t -> t
val lra : state -> t lra_view -> t
val abs : state -> t -> t * bool

Obtain unsigned version of t, + the sign as a boolean

module Iter_dag : sig ... end
val iter_dag : t -> t Iter.t
val map_shallow : state -> (t -> t) -> t -> t
val pp : t Fmt.printer
Views
val is_true : t -> bool
val is_false : t -> bool
val is_const : t -> bool
val cc_view : t -> (fun_tt Iter.t) CC_view.t
val as_fun_undef : t -> (fun_ * Ty.Fun.t) option
val as_bool : t -> bool option
Containers
module Tbl : CCHashtbl.S with type Tbl.key = t
module Map : CCMap.S with type Map.key = t
module Set : CCSet.S with type Set.elt = t
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_base_term__/Base_types/Term_cell/Make_eq/argument-1-X/index.html b/dev/sidekick-arith/Sidekick_base_term__/Base_types/Term_cell/Make_eq/argument-1-X/index.html new file mode 100644 index 00000000..234477d8 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_base_term__/Base_types/Term_cell/Make_eq/argument-1-X/index.html @@ -0,0 +1,2 @@ + +1-X (sidekick-arith.Sidekick_base_term__.Base_types.Term_cell.Make_eq.1-X)

Parameter Make_eq.1-X

type t
val hash : t -> int
val equal : t -> t -> bool
val pp : t Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_base_term__/Base_types/Term_cell/Make_eq/index.html b/dev/sidekick-arith/Sidekick_base_term__/Base_types/Term_cell/Make_eq/index.html new file mode 100644 index 00000000..d65f4394 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_base_term__/Base_types/Term_cell/Make_eq/index.html @@ -0,0 +1,2 @@ + +Make_eq (sidekick-arith.Sidekick_base_term__.Base_types.Term_cell.Make_eq)

Module Term_cell.Make_eq

Parameters

Signature

val equal : X.t view -> X.t view -> bool
val hash : X.t view -> int
val pp : X.t view Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_base_term__/Base_types/Term_cell/index.html b/dev/sidekick-arith/Sidekick_base_term__/Base_types/Term_cell/index.html new file mode 100644 index 00000000..c46b1f8d --- /dev/null +++ b/dev/sidekick-arith/Sidekick_base_term__/Base_types/Term_cell/index.html @@ -0,0 +1,2 @@ + +Term_cell (sidekick-arith.Sidekick_base_term__.Base_types.Term_cell)

Module Base_types.Term_cell

type 'a view = 'a term_view =
| Bool of bool
| App_fun of fun_ * 'a Sidekick_util.IArray.t
| Eq of 'a * 'a
| Not of 'a
| Ite of 'a * 'a * 'a
| LRA of 'a lra_view
type t = term view
val equal : t -> t -> bool
val hash : t -> int
val true_ : t
val false_ : t
val const : fun_ -> t
val app_fun : fun_ -> term Sidekick_util.IArray.t -> t
val eq : term -> term -> t
val not_ : term -> t
val ite : term -> term -> term -> t
val lra : term lra_view -> t
val ty : t -> Ty.t

Compute the type of this term cell. Not totally free

val pp : t Fmt.printer
val map : ('a -> 'b) -> 'a view -> 'b view
val iter : ('a -> unit) -> 'a view -> unit
module type ARG = sig ... end
module Make_eq : functor (X : ARG) -> sig ... end
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_base_term__/Base_types/Term_cell/module-type-ARG/index.html b/dev/sidekick-arith/Sidekick_base_term__/Base_types/Term_cell/module-type-ARG/index.html new file mode 100644 index 00000000..55c6c45a --- /dev/null +++ b/dev/sidekick-arith/Sidekick_base_term__/Base_types/Term_cell/module-type-ARG/index.html @@ -0,0 +1,2 @@ + +ARG (sidekick-arith.Sidekick_base_term__.Base_types.Term_cell.ARG)

Module type Term_cell.ARG

type t
val hash : t -> int
val equal : t -> t -> bool
val pp : t Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_base_term__/Base_types/Ty/Fun/index.html b/dev/sidekick-arith/Sidekick_base_term__/Base_types/Ty/Fun/index.html new file mode 100644 index 00000000..de689a19 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_base_term__/Base_types/Ty/Fun/index.html @@ -0,0 +1,2 @@ + +Fun (sidekick-arith.Sidekick_base_term__.Base_types.Ty.Fun)

Module Ty.Fun

type t = fun_ty
val args : t -> ty list
val ret : t -> ty
val arity : t -> int
val unfold : t -> ty list * ty
val mk : ty list -> ty -> t
val pp : t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_base_term__/Base_types/Ty/index.html b/dev/sidekick-arith/Sidekick_base_term__/Base_types/Ty/index.html new file mode 100644 index 00000000..9ef728e7 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_base_term__/Base_types/Ty/index.html @@ -0,0 +1,2 @@ + +Ty (sidekick-arith.Sidekick_base_term__.Base_types.Ty)

Module Base_types.Ty

type t = ty
type state = unit
type view = ty_view =
| Ty_bool
| Ty_real
| Ty_atomic of {
def : ty_def;
args : ty list;
mutable finite : bool;
}
type def = ty_def =
| Ty_uninterpreted of Sidekick_base_term.ID.t
| Ty_data of {
data : data;
}
| Ty_def of {
id : Sidekick_base_term.ID.t;
pp : ty Fmt.printer -> ty list Fmt.printer;
default_val : value list -> value;
}
val id : t -> int
val view : t -> view
val bool : state -> t
val real : state -> t
val atomic : def -> t list -> t
val atomic_uninterpreted : Sidekick_base_term.ID.t -> t
val finite : t -> bool
val set_finite : t -> bool -> unit
val is_bool : t -> bool
val is_uninterpreted : t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val pp : t CCFormat.printer
module Tbl : CCHashtbl.S with type Tbl.key = t
module Fun : sig ... end
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_base_term__/Base_types/Value/index.html b/dev/sidekick-arith/Sidekick_base_term__/Base_types/Value/index.html new file mode 100644 index 00000000..1eab8796 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_base_term__/Base_types/Value/index.html @@ -0,0 +1,2 @@ + +Value (sidekick-arith.Sidekick_base_term__.Base_types.Value)

Module Base_types.Value

type t = value =
| V_bool of bool
| V_element of {
id : Sidekick_base_term.ID.t;
ty : ty;
}
| V_cstor of {
c : cstor;
args : value list;
}
| V_custom of {
view : value_custom_view;
pp : value_custom_view Fmt.printer;
eq : value_custom_view -> value_custom_view -> bool;
hash : value_custom_view -> int;
}
| V_real of Q.t
val true_ : t
val false_ : t
val bool : bool -> t
val real : Q.t -> t
val real_of_string : string -> t
val mk_elt : Sidekick_base_term.ID.t -> Ty.t -> t
val is_bool : t -> bool
val is_true : t -> bool
val is_false : t -> bool
val cstor_app : cstor -> t list -> t
val fresh : Term.t -> t
val hash : t -> int
val equal : t -> t -> bool
val pp : t Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_base_term__/Base_types/index.html b/dev/sidekick-arith/Sidekick_base_term__/Base_types/index.html new file mode 100644 index 00000000..00d791ac --- /dev/null +++ b/dev/sidekick-arith/Sidekick_base_term__/Base_types/index.html @@ -0,0 +1,2 @@ + +Base_types (sidekick-arith.Sidekick_base_term__.Base_types)

Module Sidekick_base_term__.Base_types

module Vec = Msat.Vec
module Log = Msat.Log
module Fmt = CCFormat
module CC_view = Sidekick_core.CC_view
type lra_pred = Sidekick_arith_lra.Predicate.t =
| Leq
| Geq
| Lt
| Gt
| Eq
| Neq
type lra_op = Sidekick_arith_lra.op =
| Plus
| Minus
type 'a lra_view = 'a Sidekick_arith_lra.lra_view =
| LRA_pred of lra_pred * 'a * 'a
| LRA_op of lra_op * 'a * 'a
| LRA_mult of Q.t * 'a
| LRA_const of Q.t
| LRA_simplex_var of 'a
| LRA_simplex_pred of 'a * Sidekick_arith_lra.S_op.t * Q.t
| LRA_other of 'a
type term = {
mutable term_id : int;
mutable term_ty : ty;
term_view : term term_view;
}
and 'a term_view =
| Bool of bool
| App_fun of fun_ * 'a Sidekick_util.IArray.t
| Eq of 'a * 'a
| Not of 'a
| Ite of 'a * 'a * 'a
| LRA of 'a lra_view
and fun_ = {
fun_id : Sidekick_base_term.ID.t;
fun_view : fun_view;
}
and fun_view =
| Fun_undef of fun_ty
| Fun_select of select
| Fun_cstor of cstor
| Fun_is_a of cstor
| Fun_def of {
pp : a. ('a Fmt.printer -> 'a Sidekick_util.IArray.t Fmt.printer) option;
abs : self:term -> term Sidekick_util.IArray.t -> term * bool;
do_cc : bool;
relevant : a. Sidekick_base_term.ID.t -> 'a Sidekick_util.IArray.t -> int -> bool;
ty : Sidekick_base_term.ID.t -> term Sidekick_util.IArray.t -> ty;
eval : value Sidekick_util.IArray.t -> value;
}

Methods on the custom term view whose arguments are 'a. Terms must be printable, and provide some additional theory handles.

  • relevant must return a subset of args (possibly the same set). The terms it returns will be activated and evaluated whenever possible. Terms in args \ relevant args are considered for congruence but not for evaluation.
and fun_ty = {
fun_ty_args : ty list;
fun_ty_ret : ty;
}

Function type

and ty = {
mutable ty_id : int;
ty_view : ty_view;
}

Hashconsed type

and ty_view =
| Ty_bool
| Ty_real
| Ty_atomic of {
def : ty_def;
args : ty list;
mutable finite : bool;
}
and ty_def =
| Ty_uninterpreted of Sidekick_base_term.ID.t
| Ty_data of {
data : data;
}
| Ty_def of {
id : Sidekick_base_term.ID.t;
pp : ty Fmt.printer -> ty list Fmt.printer;
default_val : value list -> value;
}
and data = {
data_id : Sidekick_base_term.ID.t;
data_cstors : cstor Sidekick_base_term__.ID.Map.t lazy_t;
data_as_ty : ty lazy_t;
}
and cstor = {
cstor_id : Sidekick_base_term.ID.t;
cstor_is_a : Sidekick_base_term.ID.t;
mutable cstor_arity : int;
cstor_args : select list lazy_t;
cstor_ty_as_data : data;
cstor_ty : ty lazy_t;
}
and select = {
select_id : Sidekick_base_term.ID.t;
select_cstor : cstor;
select_ty : ty lazy_t;
select_i : int;
}
and value =
| V_bool of bool
| V_element of {
id : Sidekick_base_term.ID.t;
ty : ty;
}

a named constant, distinct from any other constant

| V_cstor of {
c : cstor;
args : value list;
}
| V_custom of {
view : value_custom_view;
pp : value_custom_view Fmt.printer;
eq : value_custom_view -> value_custom_view -> bool;
hash : value_custom_view -> int;
}

Custom value

| V_real of Q.t

Semantic values, used for models (and possibly model-constructing calculi)

and value_custom_view = ..
type definition = Sidekick_base_term.ID.t * ty * term
type statement =
| Stmt_set_logic of string
| Stmt_set_option of string list
| Stmt_set_info of string * string
| Stmt_data of data list
| Stmt_ty_decl of Sidekick_base_term.ID.t * int
| Stmt_decl of Sidekick_base_term.ID.t * ty list * ty
| Stmt_define of definition list
| Stmt_assert of term
| Stmt_assert_clause of term list
| Stmt_check_sat of (bool * term) list
| Stmt_exit
val term_equal_ : term -> term -> bool
val term_hash_ : term -> int
val term_cmp_ : term -> term -> int
val fun_compare : fun_ -> fun_ -> int
val pp_fun : CCFormat.t -> fun_ -> unit
val id_of_fun : fun_ -> Sidekick_base_term.ID.t
val eq_ty : ty -> ty -> bool
val eq_cstor : cstor -> cstor -> bool
val eq_value : value -> value -> bool
val hash_value : value Sidekick_util.Hash.t
val pp_value : value Sidekick_util.Util.printer
val pp_db : Stdlib.Format.formatter -> (int * 'a) -> unit
val pp_ty : ty Sidekick_util.Util.printer
val string_of_lra_pred : lra_pred -> string
val pp_pred : Fmt.t -> lra_pred -> unit
val string_of_lra_op : lra_op -> string
val pp_lra_op : Fmt.t -> lra_op -> unit
val pp_term_view_gen : pp_id:(Fmt.t -> Sidekick_base_term.ID.t -> unit) -> pp_t:'a Fmt.printer -> Fmt.t -> 'a term_view -> unit
val pp_term_top : ids:bool -> Fmt.t -> term -> unit
val pp_term : Fmt.t -> term -> unit
val pp_term_view : Fmt.t -> term term_view -> unit
module Ty : sig ... end
module Fun : sig ... end
module Term_cell : sig ... end
module Term : sig ... end
module Value : sig ... end
module Data : sig ... end
module Select : sig ... end
module Cstor : sig ... end
module Proof : sig ... end
module Statement : sig ... end
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_base_term__/CCHet/Key/index.html b/dev/sidekick-arith/Sidekick_base_term__/CCHet/Key/index.html new file mode 100644 index 00000000..12f8290a --- /dev/null +++ b/dev/sidekick-arith/Sidekick_base_term__/CCHet/Key/index.html @@ -0,0 +1,2 @@ + +Key (sidekick-arith.Sidekick_base_term__.CCHet.Key)

Module CCHet.Key

type 'a t
val create : unit -> 'a t
val equal : 'a t -> 'a t -> bool

Compare two keys that have compatible types.

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_base_term__/CCHet/Map/index.html b/dev/sidekick-arith/Sidekick_base_term__/CCHet/Map/index.html new file mode 100644 index 00000000..a5d7578f --- /dev/null +++ b/dev/sidekick-arith/Sidekick_base_term__/CCHet/Map/index.html @@ -0,0 +1,2 @@ + +Map (sidekick-arith.Sidekick_base_term__.CCHet.Map)

Module CCHet.Map

Immutable map

type t
val empty : t
val mem : _ Key.t -> t -> bool
val add : 'a Key.t -> 'a -> t -> t
val remove : _ Key.t -> t -> t
val length : t -> int
val cardinal : t -> int
val find : 'a Key.t -> t -> 'a option
val find_exn : 'a Key.t -> t -> 'a
raises Not_found

if the key is not in the table.

val iter : (pair -> unit) -> t -> unit
val to_iter : t -> pair iter
val of_iter : pair iter -> t
val add_iter : t -> pair iter -> t
val add_list : t -> pair list -> t
val of_list : pair list -> t
val to_list : t -> pair list
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_base_term__/CCHet/Tbl/index.html b/dev/sidekick-arith/Sidekick_base_term__/CCHet/Tbl/index.html new file mode 100644 index 00000000..9578b3bf --- /dev/null +++ b/dev/sidekick-arith/Sidekick_base_term__/CCHet/Tbl/index.html @@ -0,0 +1,2 @@ + +Tbl (sidekick-arith.Sidekick_base_term__.CCHet.Tbl)

Module CCHet.Tbl

Imperative table indexed by Key

type t
val create : ?⁠size:int -> unit -> t
val mem : t -> _ Key.t -> bool
val add : t -> 'a Key.t -> 'a -> unit
val remove : t -> _ Key.t -> unit
val length : t -> int
val find : t -> 'a Key.t -> 'a option
val find_exn : t -> 'a Key.t -> 'a
raises Not_found

if the key is not in the table.

val iter : (pair -> unit) -> t -> unit
val to_iter : t -> pair iter
val of_iter : pair iter -> t
val add_iter : t -> pair iter -> unit
val add_list : t -> pair list -> unit
val of_list : pair list -> t
val to_list : t -> pair list
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_base_term__/CCHet/index.html b/dev/sidekick-arith/Sidekick_base_term__/CCHet/index.html new file mode 100644 index 00000000..6eb961d3 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_base_term__/CCHet/index.html @@ -0,0 +1,2 @@ + +CCHet (sidekick-arith.Sidekick_base_term__.CCHet)

Module Sidekick_base_term__.CCHet

Associative containers with Heterogeneous Values

This is similar to CCMixtbl, but the injection is directly used as a key.

since
0.17
type 'a iter = ('a -> unit) -> unit
type 'a gen = unit -> 'a option
module Key : sig ... end
type pair =
| Pair : 'a Key.t * 'a -> pair
module Tbl : sig ... end
module Map : sig ... end
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_base_term__/Config/Key/index.html b/dev/sidekick-arith/Sidekick_base_term__/Config/Key/index.html new file mode 100644 index 00000000..d534ef39 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_base_term__/Config/Key/index.html @@ -0,0 +1,2 @@ + +Key (sidekick-arith.Sidekick_base_term__.Config.Key)

Module Config.Key

type 'a t
val create : unit -> 'a t
val equal : 'a t -> 'a t -> bool

Compare two keys that have compatible types

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_base_term__/Config/index.html b/dev/sidekick-arith/Sidekick_base_term__/Config/index.html new file mode 100644 index 00000000..d0aa22ef --- /dev/null +++ b/dev/sidekick-arith/Sidekick_base_term__/Config/index.html @@ -0,0 +1,2 @@ + +Config (sidekick-arith.Sidekick_base_term__.Config)

Module Sidekick_base_term__.Config

Configuration

type 'a sequence = ('a -> unit) -> unit
module Key : sig ... end
type t
val empty : t
val mem : _ Key.t -> t -> bool
val add : 'a Key.t -> 'a -> t -> t
val length : t -> int
val cardinal : t -> int
val find : 'a Key.t -> t -> 'a option
val find_exn : 'a Key.t -> t -> 'a
raises Not_found

if the key is not in the table

type pair =
| Pair : 'a Key.t * 'a -> pair
val iter : (pair -> unit) -> t -> unit
val to_iter : t -> pair sequence
val of_iter : pair sequence -> t
val add_iter : t -> pair sequence -> t
val add_list : t -> pair list -> t
val of_list : pair list -> t
val to_list : t -> pair list
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_base_term__/Hashcons/Make/argument-1-A/index.html b/dev/sidekick-arith/Sidekick_base_term__/Hashcons/Make/argument-1-A/index.html new file mode 100644 index 00000000..c39acd42 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_base_term__/Hashcons/Make/argument-1-A/index.html @@ -0,0 +1,2 @@ + +1-A (sidekick-arith.Sidekick_base_term__.Hashcons.Make.1-A)

Parameter Make.1-A

type t
val equal : t -> t -> bool
val hash : t -> int
val set_id : t -> int -> unit
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_base_term__/Hashcons/Make/index.html b/dev/sidekick-arith/Sidekick_base_term__/Hashcons/Make/index.html new file mode 100644 index 00000000..8860fd55 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_base_term__/Hashcons/Make/index.html @@ -0,0 +1,2 @@ + +Make (sidekick-arith.Sidekick_base_term__.Hashcons.Make)

Module Hashcons.Make

Parameters

Signature

type t
val create : ?⁠size:int -> unit -> t
val hashcons : t -> A.t -> A.t
val to_seq : t -> A.t Iter.t
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_base_term__/Hashcons/index.html b/dev/sidekick-arith/Sidekick_base_term__/Hashcons/index.html new file mode 100644 index 00000000..dac0348a --- /dev/null +++ b/dev/sidekick-arith/Sidekick_base_term__/Hashcons/index.html @@ -0,0 +1,2 @@ + +Hashcons (sidekick-arith.Sidekick_base_term__.Hashcons)

Module Sidekick_base_term__.Hashcons

module type ARG = sig ... end
module Make : functor (A : ARG) -> sig ... end
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_base_term__/Hashcons/module-type-ARG/index.html b/dev/sidekick-arith/Sidekick_base_term__/Hashcons/module-type-ARG/index.html new file mode 100644 index 00000000..3df2ae5e --- /dev/null +++ b/dev/sidekick-arith/Sidekick_base_term__/Hashcons/module-type-ARG/index.html @@ -0,0 +1,2 @@ + +ARG (sidekick-arith.Sidekick_base_term__.Hashcons.ARG)

Module type Hashcons.ARG

type t
val equal : t -> t -> bool
val hash : t -> int
val set_id : t -> int -> unit
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_base_term__/ID/B/index.html b/dev/sidekick-arith/Sidekick_base_term__/ID/B/index.html new file mode 100644 index 00000000..46f9e78f --- /dev/null +++ b/dev/sidekick-arith/Sidekick_base_term__/ID/B/index.html @@ -0,0 +1,2 @@ + +B (sidekick-arith.Sidekick_base_term__.ID.B)

Module ID.B

val rat : t
val int : t
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_base_term__/ID/index.html b/dev/sidekick-arith/Sidekick_base_term__/ID/index.html new file mode 100644 index 00000000..fa056176 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_base_term__/ID/index.html @@ -0,0 +1,2 @@ + +ID (sidekick-arith.Sidekick_base_term__.ID)

Module Sidekick_base_term__.ID

Unique Identifiers

type t
val make : string -> t
val makef : ('a, Stdlib.Format.formatter, unit, t) Stdlib.format4 -> 'a
val copy : t -> t
val id : t -> int
val to_string : t -> string
val to_string_full : t -> string
include Sidekick_util.Intf.EQ with type t := t
type t
val equal : t -> t -> bool
include Sidekick_util.Intf.ORD with type t := t
type t
val compare : t -> t -> int
include Sidekick_util.Intf.HASH with type t := t
type t
val hash : t -> int
include Sidekick_util.Intf.PRINT with type t := t
type t
val pp : t CCFormat.printer
val pp_name : t CCFormat.printer
module Map : CCMap.S with type Map.key = t
module Set : CCSet.S with type Set.elt = t
module Tbl : CCHashtbl.S with type Tbl.key = t
module B : sig ... end
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_base_term__/Model/Fun_interpretation/index.html b/dev/sidekick-arith/Sidekick_base_term__/Model/Fun_interpretation/index.html new file mode 100644 index 00000000..d46252a8 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_base_term__/Model/Fun_interpretation/index.html @@ -0,0 +1,2 @@ + +Fun_interpretation (sidekick-arith.Sidekick_base_term__.Model.Fun_interpretation) \ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_base_term__/Model/Val_map/index.html b/dev/sidekick-arith/Sidekick_base_term__/Model/Val_map/index.html new file mode 100644 index 00000000..7ce7204a --- /dev/null +++ b/dev/sidekick-arith/Sidekick_base_term__/Model/Val_map/index.html @@ -0,0 +1,2 @@ + +Val_map (sidekick-arith.Sidekick_base_term__.Model.Val_map)

Module Model.Val_map

type key = Sidekick_base_term.Base_types.Value.t list
type 'a t
val empty : 'a t
val is_empty : _ t -> bool
val cardinal : _ t -> int
val find : key -> 'a t -> 'a option
val add : key -> 'a -> 'a t -> 'a t
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_base_term__/Model/index.html b/dev/sidekick-arith/Sidekick_base_term__/Model/index.html new file mode 100644 index 00000000..dc1d69e2 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_base_term__/Model/index.html @@ -0,0 +1,2 @@ + +Model (sidekick-arith.Sidekick_base_term__.Model) \ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_base_term__/index.html b/dev/sidekick-arith/Sidekick_base_term__/index.html new file mode 100644 index 00000000..0d15a47d --- /dev/null +++ b/dev/sidekick-arith/Sidekick_base_term__/index.html @@ -0,0 +1,2 @@ + +Sidekick_base_term__ (sidekick-arith.Sidekick_base_term__)

Module Sidekick_base_term__

module Base_types : sig ... end
module CCHet : sig ... end
module Config : sig ... end
module Hashcons : sig ... end
module ID : sig ... end
module Model : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_base_term__Hash/.dune-keep b/dev/sidekick-arith/Sidekick_base_term__Base_types/.dune-keep similarity index 100% rename from dev/sidekick/Sidekick_base_term__Hash/.dune-keep rename to dev/sidekick-arith/Sidekick_base_term__Base_types/.dune-keep diff --git a/dev/sidekick-arith/Sidekick_base_term__Base_types/Cstor/index.html b/dev/sidekick-arith/Sidekick_base_term__Base_types/Cstor/index.html new file mode 100644 index 00000000..e13d93c2 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_base_term__Base_types/Cstor/index.html @@ -0,0 +1,2 @@ + +Cstor (sidekick-arith.Sidekick_base_term__Base_types.Cstor)

Module Sidekick_base_term__Base_types.Cstor

type t = cstor = {
cstor_id : Sidekick_base_term.ID.t;
cstor_is_a : Sidekick_base_term.ID.t;
mutable cstor_arity : int;
cstor_args : select list lazy_t;
cstor_ty_as_data : data;
cstor_ty : ty lazy_t;
}
val ty_args : t -> ty Iter.t
val equal : cstor -> cstor -> bool
val pp : CCFormat.t -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_base_term__Base_types/Data/index.html b/dev/sidekick-arith/Sidekick_base_term__Base_types/Data/index.html new file mode 100644 index 00000000..eb63fd61 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_base_term__Base_types/Data/index.html @@ -0,0 +1,2 @@ + +Data (sidekick-arith.Sidekick_base_term__Base_types.Data)

Module Sidekick_base_term__Base_types.Data

type t = data = {
data_id : Sidekick_base_term.ID.t;
data_cstors : cstor Sidekick_base_term__.ID.Map.t lazy_t;
data_as_ty : ty lazy_t;
}
val pp : CCFormat.t -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_base_term__Base_types/Fun/index.html b/dev/sidekick-arith/Sidekick_base_term__Base_types/Fun/index.html new file mode 100644 index 00000000..825e7796 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_base_term__Base_types/Fun/index.html @@ -0,0 +1,2 @@ + +Fun (sidekick-arith.Sidekick_base_term__Base_types.Fun)

Module Sidekick_base_term__Base_types.Fun

type view = fun_view =
| Fun_undef of fun_ty
| Fun_select of select
| Fun_cstor of cstor
| Fun_is_a of cstor
| Fun_def of {
pp : a. ('a Fmt.printer -> 'a Sidekick_util.IArray.t Fmt.printer) option;
abs : self:term -> term Sidekick_util.IArray.t -> term * bool;
do_cc : bool;
relevant : a. Sidekick_base_term.ID.t -> 'a Sidekick_util.IArray.t -> int -> bool;
ty : Sidekick_base_term.ID.t -> term Sidekick_util.IArray.t -> ty;
eval : value Sidekick_util.IArray.t -> value;
}
type t = fun_ = {
fun_id : Sidekick_base_term.ID.t;
fun_view : fun_view;
}
val id : t -> Sidekick_base_term.ID.t
val view : t -> view
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val as_undefined : t -> (t * Ty.Fun.t) option
val as_undefined_exn : t -> t * Ty.Fun.t
val is_undefined : t -> bool
val select : select -> t
val select_idx : cstor -> int -> t
val cstor : cstor -> t
val is_a : cstor -> t
val do_cc : t -> bool
val mk_undef : Sidekick_base_term.ID.t -> Ty.Fun.t -> t
val mk_undef' : Sidekick_base_term.ID.t -> Ty.t list -> Ty.t -> t
val mk_undef_const : Sidekick_base_term.ID.t -> Ty.t -> t
val pp : t CCFormat.printer
module Map : CCMap.S with type Map.key = t
module Tbl : CCHashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_base_term__Base_types/Proof/index.html b/dev/sidekick-arith/Sidekick_base_term__Base_types/Proof/index.html new file mode 100644 index 00000000..fd08d565 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_base_term__Base_types/Proof/index.html @@ -0,0 +1,2 @@ + +Proof (sidekick-arith.Sidekick_base_term__Base_types.Proof)

Module Sidekick_base_term__Base_types.Proof

type t =
| Default
val default : t
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_base_term__Base_types/Select/index.html b/dev/sidekick-arith/Sidekick_base_term__Base_types/Select/index.html new file mode 100644 index 00000000..66ce7c24 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_base_term__Base_types/Select/index.html @@ -0,0 +1,2 @@ + +Select (sidekick-arith.Sidekick_base_term__Base_types.Select)

Module Sidekick_base_term__Base_types.Select

type t = select = {
select_id : Sidekick_base_term.ID.t;
select_cstor : cstor;
select_ty : ty lazy_t;
select_i : int;
}
val ty : t -> ty
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_base_term__Base_types/Statement/index.html b/dev/sidekick-arith/Sidekick_base_term__Base_types/Statement/index.html new file mode 100644 index 00000000..f3b1821a --- /dev/null +++ b/dev/sidekick-arith/Sidekick_base_term__Base_types/Statement/index.html @@ -0,0 +1,2 @@ + +Statement (sidekick-arith.Sidekick_base_term__Base_types.Statement)

Module Sidekick_base_term__Base_types.Statement

type t = statement =
| Stmt_set_logic of string
| Stmt_set_option of string list
| Stmt_set_info of string * string
| Stmt_data of data list
| Stmt_ty_decl of Sidekick_base_term.ID.t * int
| Stmt_decl of Sidekick_base_term.ID.t * ty list * ty
| Stmt_define of definition list
| Stmt_assert of term
| Stmt_assert_clause of term list
| Stmt_check_sat of (bool * term) list
| Stmt_exit
val pp : Fmt.t -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_base_term__Base_types/Term/Iter_dag/index.html b/dev/sidekick-arith/Sidekick_base_term__Base_types/Term/Iter_dag/index.html new file mode 100644 index 00000000..5088de01 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_base_term__Base_types/Term/Iter_dag/index.html @@ -0,0 +1,2 @@ + +Iter_dag (sidekick-arith.Sidekick_base_term__Base_types.Term.Iter_dag)

Module Term.Iter_dag

type t
val create : unit -> t
val iter_dag : t -> term -> term Iter.t
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_base_term__Base_types/Term/index.html b/dev/sidekick-arith/Sidekick_base_term__Base_types/Term/index.html new file mode 100644 index 00000000..d93a1e38 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_base_term__Base_types/Term/index.html @@ -0,0 +1,2 @@ + +Term (sidekick-arith.Sidekick_base_term__Base_types.Term)

Module Sidekick_base_term__Base_types.Term

type t = term = {
mutable term_id : int;
mutable term_ty : ty;
term_view : t term_view;
}
type 'a view = 'a term_view =
| Bool of bool
| App_fun of fun_ * 'a Sidekick_util.IArray.t
| Eq of 'a * 'a
| Not of 'a
| Ite of 'a * 'a * 'a
| LRA of 'a lra_view
val id : t -> int
val view : t -> term view
val ty : t -> Ty.t
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
type state
val create : ?⁠size:int -> unit -> state
val make : state -> t view -> t
val true_ : state -> t
val false_ : state -> t
val bool : state -> bool -> t
val const : state -> fun_ -> t
val app_fun : state -> fun_ -> t Sidekick_util.IArray.t -> t
val eq : state -> t -> t -> t
val not_ : state -> t -> t
val ite : state -> t -> t -> t -> t
val select : state -> select -> t -> t
val app_cstor : state -> cstor -> t Sidekick_util.IArray.t -> t
val is_a : state -> cstor -> t -> t
val lra : state -> t lra_view -> t
val abs : state -> t -> t * bool

Obtain unsigned version of t, + the sign as a boolean

module Iter_dag : sig ... end
val iter_dag : t -> t Iter.t
val map_shallow : state -> (t -> t) -> t -> t
val pp : t Fmt.printer
Views
val is_true : t -> bool
val is_false : t -> bool
val is_const : t -> bool
val cc_view : t -> (fun_tt Iter.t) CC_view.t
val as_fun_undef : t -> (fun_ * Ty.Fun.t) option
val as_bool : t -> bool option
Containers
module Tbl : CCHashtbl.S with type Tbl.key = t
module Map : CCMap.S with type Map.key = t
module Set : CCSet.S with type Set.elt = t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_base_term__/Base_types/Term_cell/Make_eq/argument-1-X/index.html b/dev/sidekick-arith/Sidekick_base_term__Base_types/Term_cell/Make_eq/argument-1-X/index.html similarity index 54% rename from dev/sidekick/Sidekick_base_term__/Base_types/Term_cell/Make_eq/argument-1-X/index.html rename to dev/sidekick-arith/Sidekick_base_term__Base_types/Term_cell/Make_eq/argument-1-X/index.html index 108251f8..094cdc44 100644 --- a/dev/sidekick/Sidekick_base_term__/Base_types/Term_cell/Make_eq/argument-1-X/index.html +++ b/dev/sidekick-arith/Sidekick_base_term__Base_types/Term_cell/Make_eq/argument-1-X/index.html @@ -1,2 +1,2 @@ -1-X (sidekick.Sidekick_base_term__.Base_types.Term_cell.Make_eq.1-X)

Parameter Make_eq.1-X

type t
val hash : t -> int
val equal : t -> t -> bool
val pp : t Fmt.printer
\ No newline at end of file +1-X (sidekick-arith.Sidekick_base_term__Base_types.Term_cell.Make_eq.1-X)

Parameter Make_eq.1-X

type t
val hash : t -> int
val equal : t -> t -> bool
val pp : t Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_base_term__Base_types/Term_cell/Make_eq/index.html b/dev/sidekick-arith/Sidekick_base_term__Base_types/Term_cell/Make_eq/index.html new file mode 100644 index 00000000..8a0c77d9 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_base_term__Base_types/Term_cell/Make_eq/index.html @@ -0,0 +1,2 @@ + +Make_eq (sidekick-arith.Sidekick_base_term__Base_types.Term_cell.Make_eq)

Module Term_cell.Make_eq

Parameters

Signature

val equal : X.t view -> X.t view -> bool
val hash : X.t view -> int
val pp : X.t view Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_base_term__Base_types/Term_cell/index.html b/dev/sidekick-arith/Sidekick_base_term__Base_types/Term_cell/index.html new file mode 100644 index 00000000..e16fe7e4 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_base_term__Base_types/Term_cell/index.html @@ -0,0 +1,2 @@ + +Term_cell (sidekick-arith.Sidekick_base_term__Base_types.Term_cell)

Module Sidekick_base_term__Base_types.Term_cell

type 'a view = 'a term_view =
| Bool of bool
| App_fun of fun_ * 'a Sidekick_util.IArray.t
| Eq of 'a * 'a
| Not of 'a
| Ite of 'a * 'a * 'a
| LRA of 'a lra_view
type t = term view
val equal : t -> t -> bool
val hash : t -> int
val true_ : t
val false_ : t
val const : fun_ -> t
val app_fun : fun_ -> term Sidekick_util.IArray.t -> t
val eq : term -> term -> t
val not_ : term -> t
val ite : term -> term -> term -> t
val lra : term lra_view -> t
val ty : t -> Ty.t

Compute the type of this term cell. Not totally free

val pp : t Fmt.printer
val map : ('a -> 'b) -> 'a view -> 'b view
val iter : ('a -> unit) -> 'a view -> unit
module type ARG = sig ... end
module Make_eq : functor (X : ARG) -> sig ... end
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_base_term__Base_types/Term_cell/module-type-ARG/index.html b/dev/sidekick-arith/Sidekick_base_term__Base_types/Term_cell/module-type-ARG/index.html new file mode 100644 index 00000000..073eb619 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_base_term__Base_types/Term_cell/module-type-ARG/index.html @@ -0,0 +1,2 @@ + +ARG (sidekick-arith.Sidekick_base_term__Base_types.Term_cell.ARG)

Module type Term_cell.ARG

type t
val hash : t -> int
val equal : t -> t -> bool
val pp : t Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_base_term__Base_types/Ty/Fun/index.html b/dev/sidekick-arith/Sidekick_base_term__Base_types/Ty/Fun/index.html new file mode 100644 index 00000000..9c432b29 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_base_term__Base_types/Ty/Fun/index.html @@ -0,0 +1,2 @@ + +Fun (sidekick-arith.Sidekick_base_term__Base_types.Ty.Fun)

Module Ty.Fun

type t = fun_ty
val args : t -> ty list
val ret : t -> ty
val arity : t -> int
val unfold : t -> ty list * ty
val mk : ty list -> ty -> t
val pp : t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_base_term__Base_types/Ty/index.html b/dev/sidekick-arith/Sidekick_base_term__Base_types/Ty/index.html new file mode 100644 index 00000000..ebf82312 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_base_term__Base_types/Ty/index.html @@ -0,0 +1,2 @@ + +Ty (sidekick-arith.Sidekick_base_term__Base_types.Ty)

Module Sidekick_base_term__Base_types.Ty

type t = ty
type state = unit
type view = ty_view =
| Ty_bool
| Ty_real
| Ty_atomic of {
def : ty_def;
args : ty list;
mutable finite : bool;
}
type def = ty_def =
| Ty_uninterpreted of Sidekick_base_term.ID.t
| Ty_data of {
data : data;
}
| Ty_def of {
id : Sidekick_base_term.ID.t;
pp : ty Fmt.printer -> ty list Fmt.printer;
default_val : value list -> value;
}
val id : t -> int
val view : t -> view
val bool : state -> t
val real : state -> t
val atomic : def -> t list -> t
val atomic_uninterpreted : Sidekick_base_term.ID.t -> t
val finite : t -> bool
val set_finite : t -> bool -> unit
val is_bool : t -> bool
val is_uninterpreted : t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val pp : t CCFormat.printer
module Tbl : CCHashtbl.S with type Tbl.key = t
module Fun : sig ... end
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_base_term__Base_types/Value/index.html b/dev/sidekick-arith/Sidekick_base_term__Base_types/Value/index.html new file mode 100644 index 00000000..4aee2773 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_base_term__Base_types/Value/index.html @@ -0,0 +1,2 @@ + +Value (sidekick-arith.Sidekick_base_term__Base_types.Value)

Module Sidekick_base_term__Base_types.Value

type t = value =
| V_bool of bool
| V_element of {
id : Sidekick_base_term.ID.t;
ty : ty;
}
| V_cstor of {
c : cstor;
args : value list;
}
| V_custom of {
view : value_custom_view;
pp : value_custom_view Fmt.printer;
eq : value_custom_view -> value_custom_view -> bool;
hash : value_custom_view -> int;
}
| V_real of Q.t
val true_ : t
val false_ : t
val bool : bool -> t
val real : Q.t -> t
val real_of_string : string -> t
val mk_elt : Sidekick_base_term.ID.t -> Ty.t -> t
val is_bool : t -> bool
val is_true : t -> bool
val is_false : t -> bool
val cstor_app : cstor -> t list -> t
val fresh : Term.t -> t
val hash : t -> int
val equal : t -> t -> bool
val pp : t Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_base_term__Base_types/index.html b/dev/sidekick-arith/Sidekick_base_term__Base_types/index.html new file mode 100644 index 00000000..881ac56e --- /dev/null +++ b/dev/sidekick-arith/Sidekick_base_term__Base_types/index.html @@ -0,0 +1,2 @@ + +Sidekick_base_term__Base_types (sidekick-arith.Sidekick_base_term__Base_types)

Module Sidekick_base_term__Base_types

module Vec = Msat.Vec
module Log = Msat.Log
module Fmt = CCFormat
module CC_view = Sidekick_core.CC_view
type lra_pred = Sidekick_arith_lra.Predicate.t =
| Leq
| Geq
| Lt
| Gt
| Eq
| Neq
type lra_op = Sidekick_arith_lra.op =
| Plus
| Minus
type 'a lra_view = 'a Sidekick_arith_lra.lra_view =
| LRA_pred of lra_pred * 'a * 'a
| LRA_op of lra_op * 'a * 'a
| LRA_mult of Q.t * 'a
| LRA_const of Q.t
| LRA_simplex_var of 'a
| LRA_simplex_pred of 'a * Sidekick_arith_lra.S_op.t * Q.t
| LRA_other of 'a
type term = {
mutable term_id : int;
mutable term_ty : ty;
term_view : term term_view;
}
and 'a term_view =
| Bool of bool
| App_fun of fun_ * 'a Sidekick_util.IArray.t
| Eq of 'a * 'a
| Not of 'a
| Ite of 'a * 'a * 'a
| LRA of 'a lra_view
and fun_ = {
fun_id : Sidekick_base_term.ID.t;
fun_view : fun_view;
}
and fun_view =
| Fun_undef of fun_ty
| Fun_select of select
| Fun_cstor of cstor
| Fun_is_a of cstor
| Fun_def of {
pp : a. ('a Fmt.printer -> 'a Sidekick_util.IArray.t Fmt.printer) option;
abs : self:term -> term Sidekick_util.IArray.t -> term * bool;
do_cc : bool;
relevant : a. Sidekick_base_term.ID.t -> 'a Sidekick_util.IArray.t -> int -> bool;
ty : Sidekick_base_term.ID.t -> term Sidekick_util.IArray.t -> ty;
eval : value Sidekick_util.IArray.t -> value;
}

Methods on the custom term view whose arguments are 'a. Terms must be printable, and provide some additional theory handles.

  • relevant must return a subset of args (possibly the same set). The terms it returns will be activated and evaluated whenever possible. Terms in args \ relevant args are considered for congruence but not for evaluation.
and fun_ty = {
fun_ty_args : ty list;
fun_ty_ret : ty;
}

Function type

and ty = {
mutable ty_id : int;
ty_view : ty_view;
}

Hashconsed type

and ty_view =
| Ty_bool
| Ty_real
| Ty_atomic of {
def : ty_def;
args : ty list;
mutable finite : bool;
}
and ty_def =
| Ty_uninterpreted of Sidekick_base_term.ID.t
| Ty_data of {
data : data;
}
| Ty_def of {
id : Sidekick_base_term.ID.t;
pp : ty Fmt.printer -> ty list Fmt.printer;
default_val : value list -> value;
}
and data = {
data_id : Sidekick_base_term.ID.t;
data_cstors : cstor Sidekick_base_term__.ID.Map.t lazy_t;
data_as_ty : ty lazy_t;
}
and cstor = {
cstor_id : Sidekick_base_term.ID.t;
cstor_is_a : Sidekick_base_term.ID.t;
mutable cstor_arity : int;
cstor_args : select list lazy_t;
cstor_ty_as_data : data;
cstor_ty : ty lazy_t;
}
and select = {
select_id : Sidekick_base_term.ID.t;
select_cstor : cstor;
select_ty : ty lazy_t;
select_i : int;
}
and value =
| V_bool of bool
| V_element of {
id : Sidekick_base_term.ID.t;
ty : ty;
}

a named constant, distinct from any other constant

| V_cstor of {
c : cstor;
args : value list;
}
| V_custom of {
view : value_custom_view;
pp : value_custom_view Fmt.printer;
eq : value_custom_view -> value_custom_view -> bool;
hash : value_custom_view -> int;
}

Custom value

| V_real of Q.t

Semantic values, used for models (and possibly model-constructing calculi)

and value_custom_view = ..
type definition = Sidekick_base_term.ID.t * ty * term
type statement =
| Stmt_set_logic of string
| Stmt_set_option of string list
| Stmt_set_info of string * string
| Stmt_data of data list
| Stmt_ty_decl of Sidekick_base_term.ID.t * int
| Stmt_decl of Sidekick_base_term.ID.t * ty list * ty
| Stmt_define of definition list
| Stmt_assert of term
| Stmt_assert_clause of term list
| Stmt_check_sat of (bool * term) list
| Stmt_exit
val term_equal_ : term -> term -> bool
val term_hash_ : term -> int
val term_cmp_ : term -> term -> int
val fun_compare : fun_ -> fun_ -> int
val pp_fun : CCFormat.t -> fun_ -> unit
val id_of_fun : fun_ -> Sidekick_base_term.ID.t
val eq_ty : ty -> ty -> bool
val eq_cstor : cstor -> cstor -> bool
val eq_value : value -> value -> bool
val hash_value : value Sidekick_util.Hash.t
val pp_value : value Sidekick_util.Util.printer
val pp_db : Stdlib.Format.formatter -> (int * 'a) -> unit
val pp_ty : ty Sidekick_util.Util.printer
val string_of_lra_pred : lra_pred -> string
val pp_pred : Fmt.t -> lra_pred -> unit
val string_of_lra_op : lra_op -> string
val pp_lra_op : Fmt.t -> lra_op -> unit
val pp_term_view_gen : pp_id:(Fmt.t -> Sidekick_base_term.ID.t -> unit) -> pp_t:'a Fmt.printer -> Fmt.t -> 'a term_view -> unit
val pp_term_top : ids:bool -> Fmt.t -> term -> unit
val pp_term : Fmt.t -> term -> unit
val pp_term_view : Fmt.t -> term term_view -> unit
module Ty : sig ... end
module Fun : sig ... end
module Term_cell : sig ... end
module Term : sig ... end
module Value : sig ... end
module Data : sig ... end
module Select : sig ... end
module Cstor : sig ... end
module Proof : sig ... end
module Statement : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_base_term__Hashcons/.dune-keep b/dev/sidekick-arith/Sidekick_base_term__CCHet/.dune-keep similarity index 100% rename from dev/sidekick/Sidekick_base_term__Hashcons/.dune-keep rename to dev/sidekick-arith/Sidekick_base_term__CCHet/.dune-keep diff --git a/dev/sidekick-arith/Sidekick_base_term__CCHet/Key/index.html b/dev/sidekick-arith/Sidekick_base_term__CCHet/Key/index.html new file mode 100644 index 00000000..712ba532 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_base_term__CCHet/Key/index.html @@ -0,0 +1,2 @@ + +Key (sidekick-arith.Sidekick_base_term__CCHet.Key)

Module Sidekick_base_term__CCHet.Key

type 'a t
val create : unit -> 'a t
val equal : 'a t -> 'a t -> bool

Compare two keys that have compatible types.

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_base_term__CCHet/Map/index.html b/dev/sidekick-arith/Sidekick_base_term__CCHet/Map/index.html new file mode 100644 index 00000000..fd450388 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_base_term__CCHet/Map/index.html @@ -0,0 +1,2 @@ + +Map (sidekick-arith.Sidekick_base_term__CCHet.Map)

Module Sidekick_base_term__CCHet.Map

Immutable map

type t
val empty : t
val mem : _ Key.t -> t -> bool
val add : 'a Key.t -> 'a -> t -> t
val remove : _ Key.t -> t -> t
val length : t -> int
val cardinal : t -> int
val find : 'a Key.t -> t -> 'a option
val find_exn : 'a Key.t -> t -> 'a
raises Not_found

if the key is not in the table.

val iter : (pair -> unit) -> t -> unit
val to_iter : t -> pair iter
val of_iter : pair iter -> t
val add_iter : t -> pair iter -> t
val add_list : t -> pair list -> t
val of_list : pair list -> t
val to_list : t -> pair list
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_base_term__CCHet/Tbl/index.html b/dev/sidekick-arith/Sidekick_base_term__CCHet/Tbl/index.html new file mode 100644 index 00000000..0cacc629 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_base_term__CCHet/Tbl/index.html @@ -0,0 +1,2 @@ + +Tbl (sidekick-arith.Sidekick_base_term__CCHet.Tbl)

Module Sidekick_base_term__CCHet.Tbl

Imperative table indexed by Key

type t
val create : ?⁠size:int -> unit -> t
val mem : t -> _ Key.t -> bool
val add : t -> 'a Key.t -> 'a -> unit
val remove : t -> _ Key.t -> unit
val length : t -> int
val find : t -> 'a Key.t -> 'a option
val find_exn : t -> 'a Key.t -> 'a
raises Not_found

if the key is not in the table.

val iter : (pair -> unit) -> t -> unit
val to_iter : t -> pair iter
val of_iter : pair iter -> t
val add_iter : t -> pair iter -> unit
val add_list : t -> pair list -> unit
val of_list : pair list -> t
val to_list : t -> pair list
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_base_term__CCHet/index.html b/dev/sidekick-arith/Sidekick_base_term__CCHet/index.html new file mode 100644 index 00000000..db8791d2 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_base_term__CCHet/index.html @@ -0,0 +1,2 @@ + +Sidekick_base_term__CCHet (sidekick-arith.Sidekick_base_term__CCHet)

Module Sidekick_base_term__CCHet

Associative containers with Heterogeneous Values

This is similar to CCMixtbl, but the injection is directly used as a key.

since
0.17
type 'a iter = ('a -> unit) -> unit
type 'a gen = unit -> 'a option
module Key : sig ... end
type pair =
| Pair : 'a Key.t * 'a -> pair
module Tbl : sig ... end
module Map : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_base_term__ID/.dune-keep b/dev/sidekick-arith/Sidekick_base_term__Config/.dune-keep similarity index 100% rename from dev/sidekick/Sidekick_base_term__ID/.dune-keep rename to dev/sidekick-arith/Sidekick_base_term__Config/.dune-keep diff --git a/dev/sidekick-arith/Sidekick_base_term__Config/Key/index.html b/dev/sidekick-arith/Sidekick_base_term__Config/Key/index.html new file mode 100644 index 00000000..72212e28 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_base_term__Config/Key/index.html @@ -0,0 +1,2 @@ + +Key (sidekick-arith.Sidekick_base_term__Config.Key)

Module Sidekick_base_term__Config.Key

type 'a t
val create : unit -> 'a t
val equal : 'a t -> 'a t -> bool

Compare two keys that have compatible types

\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_base_term__Config/index.html b/dev/sidekick-arith/Sidekick_base_term__Config/index.html new file mode 100644 index 00000000..6a84ca2c --- /dev/null +++ b/dev/sidekick-arith/Sidekick_base_term__Config/index.html @@ -0,0 +1,2 @@ + +Sidekick_base_term__Config (sidekick-arith.Sidekick_base_term__Config)

Module Sidekick_base_term__Config

Configuration

type 'a sequence = ('a -> unit) -> unit
module Key : sig ... end
type t
val empty : t
val mem : _ Key.t -> t -> bool
val add : 'a Key.t -> 'a -> t -> t
val length : t -> int
val cardinal : t -> int
val find : 'a Key.t -> t -> 'a option
val find_exn : 'a Key.t -> t -> 'a
raises Not_found

if the key is not in the table

type pair =
| Pair : 'a Key.t * 'a -> pair
val iter : (pair -> unit) -> t -> unit
val to_iter : t -> pair sequence
val of_iter : pair sequence -> t
val add_iter : t -> pair sequence -> t
val add_list : t -> pair list -> t
val of_list : pair list -> t
val to_list : t -> pair list
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_base_term__Model/.dune-keep b/dev/sidekick-arith/Sidekick_base_term__Hashcons/.dune-keep similarity index 100% rename from dev/sidekick/Sidekick_base_term__Model/.dune-keep rename to dev/sidekick-arith/Sidekick_base_term__Hashcons/.dune-keep diff --git a/dev/sidekick-arith/Sidekick_base_term__Hashcons/Make/argument-1-A/index.html b/dev/sidekick-arith/Sidekick_base_term__Hashcons/Make/argument-1-A/index.html new file mode 100644 index 00000000..f35f8899 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_base_term__Hashcons/Make/argument-1-A/index.html @@ -0,0 +1,2 @@ + +1-A (sidekick-arith.Sidekick_base_term__Hashcons.Make.1-A)

Parameter Make.1-A

type t
val equal : t -> t -> bool
val hash : t -> int
val set_id : t -> int -> unit
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_base_term__Hashcons/Make/index.html b/dev/sidekick-arith/Sidekick_base_term__Hashcons/Make/index.html new file mode 100644 index 00000000..e8fc18e2 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_base_term__Hashcons/Make/index.html @@ -0,0 +1,2 @@ + +Make (sidekick-arith.Sidekick_base_term__Hashcons.Make)

Module Sidekick_base_term__Hashcons.Make

Parameters

Signature

type t
val create : ?⁠size:int -> unit -> t
val hashcons : t -> A.t -> A.t
val to_seq : t -> A.t Iter.t
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_base_term__Hashcons/index.html b/dev/sidekick-arith/Sidekick_base_term__Hashcons/index.html new file mode 100644 index 00000000..3e52fbd7 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_base_term__Hashcons/index.html @@ -0,0 +1,2 @@ + +Sidekick_base_term__Hashcons (sidekick-arith.Sidekick_base_term__Hashcons)

Module Sidekick_base_term__Hashcons

module type ARG = sig ... end
module Make : functor (A : ARG) -> sig ... end
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_base_term__Hashcons/module-type-ARG/index.html b/dev/sidekick-arith/Sidekick_base_term__Hashcons/module-type-ARG/index.html new file mode 100644 index 00000000..9779911d --- /dev/null +++ b/dev/sidekick-arith/Sidekick_base_term__Hashcons/module-type-ARG/index.html @@ -0,0 +1,2 @@ + +ARG (sidekick-arith.Sidekick_base_term__Hashcons.ARG)

Module type Sidekick_base_term__Hashcons.ARG

type t
val equal : t -> t -> bool
val hash : t -> int
val set_id : t -> int -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__Event/.dune-keep b/dev/sidekick-arith/Sidekick_base_term__ID/.dune-keep similarity index 100% rename from dev/sidekick/Sidekick_util__Event/.dune-keep rename to dev/sidekick-arith/Sidekick_base_term__ID/.dune-keep diff --git a/dev/sidekick-arith/Sidekick_base_term__ID/B/index.html b/dev/sidekick-arith/Sidekick_base_term__ID/B/index.html new file mode 100644 index 00000000..33301c0e --- /dev/null +++ b/dev/sidekick-arith/Sidekick_base_term__ID/B/index.html @@ -0,0 +1,2 @@ + +B (sidekick-arith.Sidekick_base_term__ID.B)

Module Sidekick_base_term__ID.B

val rat : t
val int : t
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_base_term__ID/index.html b/dev/sidekick-arith/Sidekick_base_term__ID/index.html new file mode 100644 index 00000000..20bc2e4c --- /dev/null +++ b/dev/sidekick-arith/Sidekick_base_term__ID/index.html @@ -0,0 +1,2 @@ + +Sidekick_base_term__ID (sidekick-arith.Sidekick_base_term__ID)

Module Sidekick_base_term__ID

Unique Identifiers

type t
val make : string -> t
val makef : ('a, Stdlib.Format.formatter, unit, t) Stdlib.format4 -> 'a
val copy : t -> t
val id : t -> int
val to_string : t -> string
val to_string_full : t -> string
include Sidekick_util.Intf.EQ with type t := t
type t
val equal : t -> t -> bool
include Sidekick_util.Intf.ORD with type t := t
type t
val compare : t -> t -> int
include Sidekick_util.Intf.HASH with type t := t
type t
val hash : t -> int
include Sidekick_util.Intf.PRINT with type t := t
type t
val pp : t CCFormat.printer
val pp_name : t CCFormat.printer
module Map : CCMap.S with type Map.key = t
module Set : CCSet.S with type Set.elt = t
module Tbl : CCHashtbl.S with type Tbl.key = t
module B : sig ... end
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_base_term__Model/.dune-keep b/dev/sidekick-arith/Sidekick_base_term__Model/.dune-keep new file mode 100644 index 00000000..e69de29b diff --git a/dev/sidekick-arith/Sidekick_base_term__Model/Fun_interpretation/index.html b/dev/sidekick-arith/Sidekick_base_term__Model/Fun_interpretation/index.html new file mode 100644 index 00000000..db102117 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_base_term__Model/Fun_interpretation/index.html @@ -0,0 +1,2 @@ + +Fun_interpretation (sidekick-arith.Sidekick_base_term__Model.Fun_interpretation) \ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_base_term__Model/Val_map/index.html b/dev/sidekick-arith/Sidekick_base_term__Model/Val_map/index.html new file mode 100644 index 00000000..f2f49f98 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_base_term__Model/Val_map/index.html @@ -0,0 +1,2 @@ + +Val_map (sidekick-arith.Sidekick_base_term__Model.Val_map)

Module Sidekick_base_term__Model.Val_map

type key = Sidekick_base_term.Base_types.Value.t list
type 'a t
val empty : 'a t
val is_empty : _ t -> bool
val cardinal : _ t -> int
val find : key -> 'a t -> 'a option
val add : key -> 'a -> 'a t -> 'a t
\ No newline at end of file diff --git a/dev/sidekick-arith/Sidekick_base_term__Model/index.html b/dev/sidekick-arith/Sidekick_base_term__Model/index.html new file mode 100644 index 00000000..6b1c6d66 --- /dev/null +++ b/dev/sidekick-arith/Sidekick_base_term__Model/index.html @@ -0,0 +1,2 @@ + +Sidekick_base_term__Model (sidekick-arith.Sidekick_base_term__Model)

Module Sidekick_base_term__Model

Model

module Val_map : sig ... end
module Fun_interpretation : sig ... end
type t = {
values : Sidekick_base_term.Base_types.Value.t Sidekick_base_term__.Base_types.Term.Map.t;
funs : Fun_interpretation.t Sidekick_base_term__.Base_types.Fun.Map.t;
}
val empty : t
val add : Sidekick_base_term.Base_types.Term.t -> Sidekick_base_term.Base_types.Value.t -> t -> t
val mem : Sidekick_base_term.Base_types.Term.t -> t -> bool
val find : Sidekick_base_term.Base_types.Term.t -> t -> Sidekick_base_term.Base_types.Value.t option
val merge : t -> t -> t
val pp : t CCFormat.printer
val eval : t -> Sidekick_base_term.Base_types.Term.t -> Sidekick_base_term.Base_types.Value.t option
\ No newline at end of file diff --git a/dev/sidekick-arith/index.html b/dev/sidekick-arith/index.html new file mode 100644 index 00000000..22693305 --- /dev/null +++ b/dev/sidekick-arith/index.html @@ -0,0 +1,2 @@ + +index (sidekick-arith.index)

sidekick-arith index

Library sidekick-arith.base-term

The entry point of this library is the module: Sidekick_base_term.

Library sidekick-arith.lra

The entry point of this library is the module: Sidekick_arith_lra.

\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib/Ast/Ty/index.html b/dev/sidekick-bin/Sidekick_smtlib/Ast/Ty/index.html deleted file mode 100644 index 7381c546..00000000 --- a/dev/sidekick-bin/Sidekick_smtlib/Ast/Ty/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Ty (sidekick-bin.Sidekick_smtlib.Ast.Ty)

Module Ast.Ty

type t =
| Prop
| App of Sidekick_base_term.ID.t * t list
| Arrow of t * t
val prop : t
val const : Sidekick_base_term.ID.t -> t
val app : Sidekick_base_term.ID.t -> t list -> t
val arrow : t -> t -> t
val arrow_l : t list -> t -> t
val rat : t
val int : t
include Sidekick_util.Intf.EQ with type t := t
type t
val equal : t -> t -> bool
include Sidekick_util.Intf.ORD with type t := t
type t
val compare : t -> t -> int
include Sidekick_util.Intf.HASH with type t := t
type t
val hash : t -> int
include Sidekick_util.Intf.PRINT with type t := t
type t
val pp : t CCFormat.printer
val unfold : t -> t list * t

unfold ty will get the list of arguments, and the return type of any function. An atomic type is just a function with no arguments

Datatypes

type data = {
data_id : Sidekick_base_term.ID.t;
data_cstors : t Sidekick_base_term.ID.Map.t;
}

Mutually recursive datatypes

module Map : CCMap.S with type Map.key = t

Error Handling

val ill_typed : ('a, Format.formatter, unit, 'b) Pervasives.format4 -> 'a
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib/Ast/Var/index.html b/dev/sidekick-bin/Sidekick_smtlib/Ast/Var/index.html deleted file mode 100644 index dc779399..00000000 --- a/dev/sidekick-bin/Sidekick_smtlib/Ast/Var/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Var (sidekick-bin.Sidekick_smtlib.Ast.Var)

Module Ast.Var

type 'ty t = private {
id : Sidekick_base_term.ID.t;
ty : 'ty;
}
val make : Sidekick_base_term.ID.t -> 'ty -> 'ty t
val makef : ty:'a -> ('b, Format.formatter, unit, 'a t) Pervasives.format4 -> 'b
val copy : 'a t -> 'a t
val id : _ t -> Sidekick_base_term.ID.t
val ty : 'a t -> 'a
val equal : 'a t -> 'a t -> bool
val compare : 'a t -> 'a t -> int
val pp : _ t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib/Ast/index.html b/dev/sidekick-bin/Sidekick_smtlib/Ast/index.html deleted file mode 100644 index 5a7f39f4..00000000 --- a/dev/sidekick-bin/Sidekick_smtlib/Ast/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Ast (sidekick-bin.Sidekick_smtlib.Ast)

Module Sidekick_smtlib.Ast

Preprocessing AST

type 'a or_error = ('a, string) CCResult.t

Types

module Var : sig ... end
module Ty : sig ... end
type var = Ty.t Var.t
type op =
| And
| Or
| Imply
| Eq
| Distinct
type arith_op =
| Leq
| Lt
| Geq
| Gt
| Add
| Minus
| Mult
| Div
type binder =
| Fun
| Forall
| Exists
| Mu
type term = private {
term : term_cell;
ty : Ty.t;
}
and term_cell =
| Var of var
| Const of Sidekick_base_term.ID.t
| Num_z of Z.t
| Num_q of Q.t
| App of term * term list
| If of term * term * term
| Match of term * (var list * term) Sidekick_base_term.ID.Map.t
| Select of select * term
| Bind of binder * var * term
| Arith of arith_op * term list
| Let of (var * term) list * term
| Not of term
| Op of op * term list
| Asserting of {
t : term;
guard : term;
}
| Undefined_value
| Bool of bool
and select = {
select_name : Sidekick_base_term.ID.t lazy_t;
select_cstor : Sidekick_base_term.ID.t;
select_i : int;
}
type definition = Sidekick_base_term.ID.t * Ty.t * term
type statement =
| SetLogic of string
| SetOption of string list
| SetInfo of string list
| Data of Ty.data list
| TyDecl of Sidekick_base_term.ID.t * int
| Decl of Sidekick_base_term.ID.t * Ty.t
| Define of definition list
| Assert of term
| Goal of var list * term
| CheckSat
| Exit

Constructors

val term_view : term -> term_cell
val ty : term -> Ty.t
val var : var -> term
val const : Sidekick_base_term.ID.t -> Ty.t -> term
val app : term -> term list -> term
val app_a : term -> term array -> term
val if_ : term -> term -> term -> term
val match_ : term -> (var list * term) Sidekick_base_term.ID.Map.t -> term
val let_ : var -> term -> term -> term
val let_l : (var * term) list -> term -> term
val bind : ty:Ty.t -> binder -> var -> term -> term
val select : ty:Ty.t -> select -> term -> term
val fun_ : var -> term -> term
val fun_l : var list -> term -> term
val fun_a : var array -> term -> term
val forall : var -> term -> term
val forall_l : var list -> term -> term
val exists : var -> term -> term
val exists_l : var list -> term -> term
val mu : var -> term -> term
val eq : term -> term -> term
val not_ : term -> term
val op : op -> term list -> term
val and_ : term -> term -> term
val and_l : term list -> term
val or_ : term -> term -> term
val or_l : term list -> term
val imply : term -> term -> term
val true_ : term
val false_ : term
val undefined_value : Ty.t -> term
val asserting : term -> term -> term
val num_z : Ty.t -> Z.t -> term
val num_q : Ty.t -> Q.t -> term
val num_str : Ty.t -> string -> term

parses int + num

val arith : Ty.t -> arith_op -> term list -> term

helpers

val is_true : term -> bool
val is_false : term -> bool
val unfold_binder : binder -> term -> var list * term
val unfold_fun : term -> var list * term

Printing

val pp_ty : Ty.t CCFormat.printer
val pp_term : term CCFormat.printer
val pp_statement : statement CCFormat.printer

Environment

type env_entry =
| E_uninterpreted_ty
| E_uninterpreted_cst
| E_const of Ty.t
| E_data of Ty.t Sidekick_base_term.ID.Map.t
| E_cstor of Ty.t
| E_defined of Ty.t * term
type env = {
defs : env_entry Sidekick_base_term.ID.Map.t;
}

Environment with definitions and goals

val env_empty : env
val env_add_statement : env -> statement -> env
val env_of_statements : statement Iter.t -> env
val env_find_def : env -> Sidekick_base_term.ID.t -> env_entry option
val env_add_def : env -> Sidekick_base_term.ID.t -> env_entry -> env
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib/Process/Check_cc/index.html b/dev/sidekick-bin/Sidekick_smtlib/Process/Check_cc/index.html index 5eb2b0b7..2673f026 100644 --- a/dev/sidekick-bin/Sidekick_smtlib/Process/Check_cc/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib/Process/Check_cc/index.html @@ -1,2 +1,2 @@ -Check_cc (sidekick-bin.Sidekick_smtlib.Process.Check_cc)

Module Process.Check_cc

val theory : Solver.theory

theory that check validity of conflicts

\ No newline at end of file +Check_cc (sidekick-bin.Sidekick_smtlib.Process.Check_cc)

Module Process.Check_cc

val theory : Solver.theory

theory that check validity of conflicts

\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/A/Fun/index.html b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/A/Fun/index.html deleted file mode 100644 index 036720ff..00000000 --- a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/A/Fun/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Fun (sidekick-bin.Sidekick_smtlib.Process.Solver.A.Fun)

Module A.Fun

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/A/Proof/index.html b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/A/Proof/index.html deleted file mode 100644 index 8234ca41..00000000 --- a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/A/Proof/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Proof (sidekick-bin.Sidekick_smtlib.Process.Solver.A.Proof)

Module A.Proof

type t
val pp : t Sidekick_core.Fmt.printer
val default : t
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/A/Term/index.html b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/A/Term/index.html deleted file mode 100644 index 7b33308a..00000000 --- a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/A/Term/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Term (sidekick-bin.Sidekick_smtlib.Process.Solver.A.Term)

Module A.Term

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type state
val ty : t -> Ty.t
val bool : state -> bool -> t
val as_bool : t -> bool option
val abs : state -> t -> t * bool
val map_shallow : state -> (t -> t) -> t -> t

Map function on immediate subterms

val iter_dag : t -> (t -> unit) -> unit
module Tbl : CCHashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/A/Ty/index.html b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/A/Ty/index.html deleted file mode 100644 index cbbe1ff8..00000000 --- a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/A/Ty/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Ty (sidekick-bin.Sidekick_smtlib.Process.Solver.A.Ty)

Module A.Ty

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
val bool : t
val is_bool : t -> bool
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/A/index.html b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/A/index.html deleted file mode 100644 index bd10ffe4..00000000 --- a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/A/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -A (sidekick-bin.Sidekick_smtlib.Process.Solver.A)

Module Solver.A

include Sidekick_core.TERM
module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
module Proof : sig ... end
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Atom/index.html b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Atom/index.html index f2933add..d2d7c43f 100644 --- a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Atom/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Atom/index.html @@ -1,2 +1,2 @@ -Atom (sidekick-bin.Sidekick_smtlib.Process.Solver.Atom)

Module Solver.Atom

Boolean Atoms

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t CCFormat.printer
\ No newline at end of file +Atom (sidekick-bin.Sidekick_smtlib.Process.Solver.Atom)

Module Solver.Atom

Boolean Atoms

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t CCFormat.printer
val neg : t -> t
val formula : t -> lit
val sign : t -> bool
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/CC_A/Actions/index.html b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/CC_A/Actions/index.html deleted file mode 100644 index 78a57793..00000000 --- a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/CC_A/Actions/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Actions (sidekick-bin.Sidekick_smtlib.Process.Solver.CC_A.Actions)

Module CC_A.Actions

type t
val raise_conflict : t -> Lit.t list -> A.Proof.t -> 'a
val propagate : t -> Lit.t -> reason:(unit -> Lit.t list) -> A.Proof.t -> unit
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/CC_A/Lit/index.html b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/CC_A/Lit/index.html deleted file mode 100644 index 5cff3157..00000000 --- a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/CC_A/Lit/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Lit (sidekick-bin.Sidekick_smtlib.Process.Solver.CC_A.Lit)

Module CC_A.Lit

type t
val term : t -> A.Term.t
val sign : t -> bool
val neg : t -> t
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/CC_A/index.html b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/CC_A/index.html deleted file mode 100644 index 9fbf0572..00000000 --- a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/CC_A/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -CC_A (sidekick-bin.Sidekick_smtlib.Process.Solver.CC_A)

Module Solver.CC_A

module A = A
val cc_view : A.Term.t -> (A.Fun.tA.Term.tA.Term.t Iter.t) Sidekick_core.CC_view.t

View the term through the lens of the congruence closure

module Lit : sig ... end
module Actions : sig ... end
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Lit/index.html b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Lit/index.html new file mode 100644 index 00000000..d1da2b55 --- /dev/null +++ b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Lit/index.html @@ -0,0 +1,2 @@ + +Lit (sidekick-bin.Sidekick_smtlib.Process.Solver.Lit)

Module Solver.Lit

module T = T
type t
val term : t -> T.Term.t
val sign : t -> bool
val neg : t -> t
val abs : t -> t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Model/index.html b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Model/index.html index e448fdc1..6ecabcea 100644 --- a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Model/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Model/index.html @@ -1,2 +1,2 @@ -Model (sidekick-bin.Sidekick_smtlib.Process.Solver.Model)

Module Solver.Model

type t
val empty : t
val mem : term -> t -> bool
val find : term -> t -> Value.t option
val eval : t -> term -> Value.t option
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Model (sidekick-bin.Sidekick_smtlib.Process.Solver.Model)

Module Solver.Model

type t
val empty : t
val mem : t -> term -> bool
val find : t -> term -> term option
val eval : t -> term -> term option
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/P/index.html b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/P/index.html new file mode 100644 index 00000000..74005d21 --- /dev/null +++ b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/P/index.html @@ -0,0 +1,2 @@ + +P (sidekick-bin.Sidekick_smtlib.Process.Solver.P)

Module Solver.P

type t
val pp : t Sidekick_core.Fmt.printer
val default : t
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Proof/index.html b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Proof/index.html index 95881c7b..41a47c39 100644 --- a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Proof/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Proof/index.html @@ -1,2 +1,2 @@ -Proof (sidekick-bin.Sidekick_smtlib.Process.Solver.Proof)

Module Solver.Proof

type t
val check : t -> unit
val pp_dot : t Sidekick_core.Fmt.printer
\ No newline at end of file +Proof (sidekick-bin.Sidekick_smtlib.Process.Solver.Proof)

Module Solver.Proof

type t
val check : t -> unit
val pp_dot : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Solver_internal/CC/Actions/index.html b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Solver_internal/CC/Actions/index.html new file mode 100644 index 00000000..6dbebf24 --- /dev/null +++ b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Solver_internal/CC/Actions/index.html @@ -0,0 +1,2 @@ + +Actions (sidekick-bin.Sidekick_smtlib.Process.Solver.Solver_internal.CC.Actions)

Module CC.Actions

module T = T
module P = P
module Lit = Lit
type t = actions
val raise_conflict : t -> Lit.t list -> P.t -> 'a
val propagate : t -> Lit.t -> reason:(unit -> Lit.t list) -> P.t -> unit
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Solver_internal/CC/Expl/index.html b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Solver_internal/CC/Expl/index.html index d9048b51..c5ce0f31 100644 --- a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Solver_internal/CC/Expl/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Solver_internal/CC/Expl/index.html @@ -1,2 +1,2 @@ -Expl (sidekick-bin.Sidekick_smtlib.Process.Solver.Solver_internal.CC.Expl)

Module CC.Expl

type t
val pp : t Sidekick_core.Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
\ No newline at end of file +Expl (sidekick-bin.Sidekick_smtlib.Process.Solver.Solver_internal.CC.Expl)

Module CC.Expl

type t
val pp : t Sidekick_core.Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
val mk_theory : t -> t
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Solver_internal/CC/N/index.html b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Solver_internal/CC/N/index.html index d1babe1c..71f6a394 100644 --- a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Solver_internal/CC/N/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Solver_internal/CC/N/index.html @@ -1,2 +1,2 @@ -N (sidekick-bin.Sidekick_smtlib.Process.Solver.Solver_internal.CC.N)

Module CC.N

An equivalence class is a set of terms that are currently equal in the partial model built by the solver. The class is represented by a collection of nodes, one of which is distinguished and is called the "representative".

All information pertaining to the whole equivalence class is stored in this representative's node.

When two classes become equal (are "merged"), one of the two representatives is picked as the representative of the new class. The new class contains the union of the two old classes' nodes.

We also allow theories to store additional information in the representative. This information can be used when two classes are merged, to detect conflicts and solve equations à la Shostak.

type t
val term : t -> term
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
val is_root : t -> bool

Is the node a root (ie the representative of its class)?

val iter_class : t -> t Iter.t

Traverse the congruence class. Precondition: is_root n (see find below)

val iter_parents : t -> t Iter.t

Traverse the parents of the class. Precondition: is_root n (see find below)

\ No newline at end of file +N (sidekick-bin.Sidekick_smtlib.Process.Solver.Solver_internal.CC.N)

Module CC.N

An equivalence class is a set of terms that are currently equal in the partial model built by the solver. The class is represented by a collection of nodes, one of which is distinguished and is called the "representative".

All information pertaining to the whole equivalence class is stored in this representative's node.

When two classes become equal (are "merged"), one of the two representatives is picked as the representative of the new class. The new class contains the union of the two old classes' nodes.

We also allow theories to store additional information in the representative. This information can be used when two classes are merged, to detect conflicts and solve equations à la Shostak.

type t
val term : t -> term
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
val is_root : t -> bool

Is the node a root (ie the representative of its class)?

val iter_class : t -> t Iter.t

Traverse the congruence class. Precondition: is_root n (see find below)

val iter_parents : t -> t Iter.t

Traverse the parents of the class. Precondition: is_root n (see find below)

type bitfield

A field in the bitfield of this node. This should only be allocated when a theory is initialized.

All fields are initially 0, are backtracked automatically, and are merged automatically when classes are merged.

val get_field : bitfield -> t -> bool
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Solver_internal/CC/index.html b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Solver_internal/CC/index.html index 51dd0542..db411b4e 100644 --- a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Solver_internal/CC/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Solver_internal/CC/index.html @@ -1,2 +1,2 @@ -CC (sidekick-bin.Sidekick_smtlib.Process.Solver.Solver_internal.CC)

Module Solver_internal.CC

module CC_A = CC_A
module A = CC_A.A
type term_state = A.Term.state
type term = A.Term.t
type fun_ = A.Fun.t
type lit = CC_A.Lit.t
type proof = A.Proof.t
type actions = CC_A.Actions.t
type t

Global state of the congruence closure

module N : sig ... end

An equivalence class is a set of terms that are currently equal in the partial model built by the solver. The class is represented by a collection of nodes, one of which is distinguished and is called the "representative".

module Expl : sig ... end
type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t
val term_state : t -> term_state
val find : t -> node -> repr

Current representative

val add_term : t -> term -> node

Add the term to the congruence closure, if not present already. Will be backtracked.

type ev_on_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit
type ev_on_new_term = t -> N.t -> term -> unit
type ev_on_conflict = t -> lit list -> unit
type ev_on_propagate = t -> lit -> (unit -> lit list) -> unit
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_merge:ev_on_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠size:[ `Small | `Big ] -> term_state -> t

Create a new congruence closure.

val on_merge : t -> ev_on_merge -> unit

Add a function to be called when two classes are merged

val on_new_term : t -> ev_on_new_term -> unit

Add a function to be called when a new node is created

val on_conflict : t -> ev_on_conflict -> unit

Called when the congruence closure finds a conflict

val on_propagate : t -> ev_on_propagate -> unit

Called when the congruence closure propagates a literal

val set_as_lit : t -> N.t -> lit -> unit

map the given node to a literal.

val find_t : t -> term -> repr

Current representative of the term.

raises Not_found

if the term is not already add-ed.

val add_seq : t -> term Iter.t -> unit

Add a sequence of terms to the congruence closure

val all_classes : t -> repr Iter.t

All current classes. This is costly, only use if there is no other solution

val assert_lit : t -> lit -> unit

Given a literal, assume it in the congruence closure and propagate its consequences. Will be backtracked.

Useful for the theory combination or the SAT solver's functor

val assert_lits : t -> lit Iter.t -> unit

Addition of many literals

val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given explanation it must be a theory tautology that expl ==> absurd. To be used in theories.

val merge : t -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val check : t -> actions -> unit

Perform all pending operations done via assert_eq, assert_lit, etc. Will use the actions to propagate literals, declare conflicts, etc.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Restore to state n calls to push_level earlier. Used during backtracking.

val get_model : t -> N.t Iter.t Iter.t

get all the equivalence classes so they can be merged in the model

\ No newline at end of file +CC (sidekick-bin.Sidekick_smtlib.Process.Solver.Solver_internal.CC)

Module Solver_internal.CC

module T = T
module P = P
module Lit = Lit
module Actions : Sidekick_core.CC_ACTIONS with module T = T and module Lit = Lit and module P = P and type t = actions
type term_state = T.Term.state
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type proof = P.t
type actions = Actions.t
type t

Global state of the congruence closure

module N : sig ... end

An equivalence class is a set of terms that are currently equal in the partial model built by the solver. The class is represented by a collection of nodes, one of which is distinguished and is called the "representative".

module Expl : sig ... end
type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t
val term_state : t -> term_state
val find : t -> node -> repr

Current representative

val add_term : t -> term -> node

Add the term to the congruence closure, if not present already. Will be backtracked.

val mem_term : t -> term -> bool

Returns true if the term is explicitly present in the congruence closure

type ev_on_pre_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit
type ev_on_post_merge = t -> actions -> N.t -> N.t -> unit
type ev_on_new_term = t -> N.t -> term -> unit
type ev_on_conflict = t -> th:bool -> lit list -> unit
type ev_on_propagate = t -> lit -> (unit -> lit list) -> unit
type ev_on_is_subterm = N.t -> term -> unit
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_pre_merge:ev_on_pre_merge list -> ?⁠on_post_merge:ev_on_post_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠on_is_subterm:ev_on_is_subterm list -> ?⁠size:[ `Small | `Big ] -> term_state -> t

Create a new congruence closure.

val allocate_bitfield : descr:string -> t -> N.bitfield

Allocate a new bitfield for the nodes. See N.bitfield.

val set_bitfield : t -> N.bitfield -> bool -> N.t -> unit

Set the bitfield for the node. This will be backtracked. See N.bitfield.

val on_pre_merge : t -> ev_on_pre_merge -> unit

Add a function to be called when two classes are merged

val on_post_merge : t -> ev_on_post_merge -> unit

Add a function to be called when two classes are merged

val on_new_term : t -> ev_on_new_term -> unit

Add a function to be called when a new node is created

val on_conflict : t -> ev_on_conflict -> unit

Called when the congruence closure finds a conflict

val on_propagate : t -> ev_on_propagate -> unit

Called when the congruence closure propagates a literal

val on_is_subterm : t -> ev_on_is_subterm -> unit

Called on terms that are subterms of function symbols

val set_as_lit : t -> N.t -> lit -> unit

map the given node to a literal.

val find_t : t -> term -> repr

Current representative of the term.

raises Not_found

if the term is not already add-ed.

val add_seq : t -> term Iter.t -> unit

Add a sequence of terms to the congruence closure

val all_classes : t -> repr Iter.t

All current classes. This is costly, only use if there is no other solution

val assert_lit : t -> lit -> unit

Given a literal, assume it in the congruence closure and propagate its consequences. Will be backtracked.

Useful for the theory combination or the SAT solver's functor

val assert_lits : t -> lit Iter.t -> unit

Addition of many literals

val explain_eq : t -> N.t -> N.t -> lit list

Explain why the two nodes are equal. Fails if they are not, in an unspecified way

val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given explanation it must be a theory tautology that expl ==> absurd. To be used in theories.

val n_true : t -> N.t
val n_false : t -> N.t
val n_bool : t -> bool -> N.t
val merge : t -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val merge_t : t -> term -> term -> Expl.t -> unit

Shortcut for adding + merging

val check : t -> actions -> unit

Perform all pending operations done via assert_eq, assert_lit, etc. Will use the actions to propagate literals, declare conflicts, etc.

val new_merges : t -> bool

Called after check, returns true if some pairs of classes were merged.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Restore to state n calls to push_level earlier. Used during backtracking.

val get_model : t -> N.t Iter.t Iter.t

get all the equivalence classes so they can be merged in the model

\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Solver_internal/Lit/index.html b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Solver_internal/Lit/index.html deleted file mode 100644 index 626a7a07..00000000 --- a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Solver_internal/Lit/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Lit (sidekick-bin.Sidekick_smtlib.Process.Solver.Solver_internal.Lit)

Module Solver_internal.Lit

Literals

A literal is a (preprocessed) term along with its sign. It is directly manipulated by the SAT solver.

type t
val term : t -> term
val sign : t -> bool
val neg : t -> t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Solver_internal/Simplify/index.html b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Solver_internal/Simplify/index.html index fa06371e..bea31ec8 100644 --- a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Solver_internal/Simplify/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Solver_internal/Simplify/index.html @@ -1,2 +1,2 @@ -Simplify (sidekick-bin.Sidekick_smtlib.Process.Solver.Solver_internal.Simplify)

Module Solver_internal.Simplify

type t
val tst : t -> term_state
val clear : t -> unit

Reset internal cache, etc.

type hook = t -> term -> term option

Given a term, try to simplify it. Return None if it didn't change. Can also add clauses to the simplifier.

val normalize : t -> term -> term

Normalize a term using all the hooks.

\ No newline at end of file +Simplify (sidekick-bin.Sidekick_smtlib.Process.Solver.Solver_internal.Simplify)

Module Solver_internal.Simplify

type t
val tst : t -> term_state
val ty_st : t -> ty_state
val clear : t -> unit

Reset internal cache, etc.

type hook = t -> term -> term option

Given a term, try to simplify it. Return None if it didn't change.

val normalize : t -> term -> term

Normalize a term using all the hooks.

\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Solver_internal/index.html b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Solver_internal/index.html index 9627a4e7..cf07d83a 100644 --- a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Solver_internal/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Solver_internal/index.html @@ -1,2 +1,2 @@ -Solver_internal (sidekick-bin.Sidekick_smtlib.Process.Solver.Solver_internal)

Module Solver.Solver_internal

Internal solver, available to theories.

module A = A
module CC_A = CC_A
module CC : Sidekick_core.CC_S with module CC_A = CC_A
type ty = A.Ty.t
type term = A.Term.t
type term_state = A.Term.state
type proof = A.Proof.t
type t

Main type for a solver

type solver = t
module Expl = CC.Expl
module N = CC.N
val tst : t -> term_state
val cc : t -> CC.t

Congruence closure for this solver

module Lit : sig ... end
type lit = Lit.t

Simplifiers

module Simplify : sig ... end
type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit
val simplifier : t -> Simplify.t
val simp_t : t -> term -> term

hooks for the theory

type actions
val propagate : t -> actions -> lit -> reason:(unit -> lit list) -> A.Proof.t -> unit
val raise_conflict : t -> actions -> lit list -> A.Proof.t -> 'a

Give a conflict clause to the solver

val propagate : t -> actions -> lit -> (unit -> lit list) -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> actions -> lit -> lit list -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> actions -> lit list -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : t -> actions -> lit list -> unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> actions -> ?⁠sign:bool -> term -> lit

Create a literal

val add_lit : t -> actions -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value

val add_lit_t : t -> actions -> ?⁠sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> N.t -> N.t

Find representative of the node

val cc_merge : t -> actions -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> actions -> term -> term -> Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> N.t

Add/retrieve congruence closure node for this term. To be used in theories

val on_cc_merge : t -> (CC.t -> actions -> N.t -> N.t -> Expl.t -> unit) -> unit

Callback for when two classes containing data for this key are merged

val on_cc_new_term : t -> (CC.t -> N.t -> term -> unit) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_conflict : t -> (CC.t -> lit list -> unit) -> unit

Callback called on every CC conflict

val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list) -> unit) -> unit

Callback called on every CC propagation

val on_partial_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

type preprocess_hook = t -> mk_lit:(term -> lit) -> add_clause:(lit list -> unit) -> term -> term option

Given a term, try to preprocess it. Return None if it didn't change. Can also add clauses to define new terms.

val add_preprocess : t -> preprocess_hook -> unit
\ No newline at end of file +Solver_internal (sidekick-bin.Sidekick_smtlib.Process.Solver.Solver_internal)

Module Solver.Solver_internal

Internal solver, available to theories.

module T = T
module P = P
type ty = T.Ty.t
type term = T.Term.t
type term_state = T.Term.state
type ty_state = T.Ty.state
type proof = P.t
type t

Main type for a solver

type solver = t
val tst : t -> term_state
val ty_st : t -> ty_state
val stats : t -> Sidekick_util.Stat.t

Actions for the theories

type actions
module Lit = Lit
type lit = Lit.t

Congruence Closure

module CC : Sidekick_core.CC_S with module T = T and module P = P and module Lit = Lit and type Actions.t = actions
val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end
type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit
val simplifier : t -> Simplify.t
val simp_t : t -> term -> term

hooks for the theory

val propagate : t -> actions -> lit -> reason:(unit -> lit list) -> proof -> unit

Propagate a literal for a reason. This is similar to asserting the clause reason => lit, but more lightweight, and in a way that is backtrackable.

val raise_conflict : t -> actions -> lit list -> proof -> 'a

Give a conflict clause to the solver

val push_decision : t -> actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : t -> actions -> lit -> (unit -> lit list) -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> actions -> lit -> lit list -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> actions -> lit list -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : t -> actions -> lit list -> unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> actions -> ?⁠sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val preprocess_term : t -> add_clause:(Lit.t list -> unit) -> term -> term

Preprocess a term.

val add_lit : t -> actions -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value

val add_lit_t : t -> actions -> ?⁠sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit

Callback called on every CC conflict

val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list) -> unit) -> unit

Callback called on every CC propagation

val on_partial_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

type preprocess_hook = t -> mk_lit:(term -> lit) -> add_clause:(lit list -> unit) -> term -> term option

Given a term, try to preprocess it. Return None if it didn't change. Can also add clauses to define new terms.

parameter mk_lit

creates a new literal for a boolean term.

parameter add_clause

pushes a new clause into the SAT solver.

val on_preprocess : t -> preprocess_hook -> unit

Model production

type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option

A model-production hook. It takes the solver, a class, and returns a term for this class.

val on_model_gen : t -> model_hook -> unit
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/T/Fun/index.html b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/T/Fun/index.html new file mode 100644 index 00000000..2096f3fe --- /dev/null +++ b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/T/Fun/index.html @@ -0,0 +1,2 @@ + +Fun (sidekick-bin.Sidekick_smtlib.Process.Solver.T.Fun)

Module T.Fun

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/T/Term/index.html b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/T/Term/index.html new file mode 100644 index 00000000..14f6e815 --- /dev/null +++ b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/T/Term/index.html @@ -0,0 +1,2 @@ + +Term (sidekick-bin.Sidekick_smtlib.Process.Solver.T.Term)

Module T.Term

type t = Sidekick_base_term.Term.t
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type state = Sidekick_base_term.Term.state
val ty : t -> Ty.t
val bool : state -> bool -> t
val as_bool : t -> bool option
val abs : state -> t -> t * bool
val map_shallow : state -> (t -> t) -> t -> t

Map function on immediate subterms

val iter_dag : t -> (t -> unit) -> unit
module Tbl : CCHashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/T/Ty/index.html b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/T/Ty/index.html new file mode 100644 index 00000000..c3fcbd0d --- /dev/null +++ b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/T/Ty/index.html @@ -0,0 +1,2 @@ + +Ty (sidekick-bin.Sidekick_smtlib.Process.Solver.T.Ty)

Module T.Ty

type t = Sidekick_base_term.Ty.t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type state = Sidekick_base_term.Ty.state
val bool : state -> t
val is_bool : t -> bool
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/T/index.html b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/T/index.html new file mode 100644 index 00000000..90b86535 --- /dev/null +++ b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/T/index.html @@ -0,0 +1,2 @@ + +T (sidekick-bin.Sidekick_smtlib.Process.Solver.T)

Module Solver.T

module Fun : sig ... end
module Ty : sig ... end with type t = Sidekick_base_term.Ty.t and type state = Sidekick_base_term.Ty.state
module Term : sig ... end with type t = Sidekick_base_term.Term.t and type state = Sidekick_base_term.Term.state
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Unknown/index.html b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Unknown/index.html index ceb9656d..4554fcb0 100644 --- a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Unknown/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Unknown/index.html @@ -1,2 +1,2 @@ -Unknown (sidekick-bin.Sidekick_smtlib.Process.Solver.Unknown)

Module Solver.Unknown

type t
val pp : t CCFormat.printer
\ No newline at end of file +Unknown (sidekick-bin.Sidekick_smtlib.Process.Solver.Unknown)

Module Solver.Unknown

type t
val pp : t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Value/index.html b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Value/index.html deleted file mode 100644 index 74a5afb1..00000000 --- a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Value/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Value (sidekick-bin.Sidekick_smtlib.Process.Solver.Value)

Module Solver.Value

Semantic values

type t
val equal : t -> t -> bool
val hash : t -> int
val ty : t -> ty
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/index.html b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/index.html index f58ae38a..99eb04a5 100644 --- a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/index.html @@ -1,2 +1,2 @@ -Solver (sidekick-bin.Sidekick_smtlib.Process.Solver)

Module Process.Solver

module CC_A : Sidekick_core.CC_ARG with module A = A
module Solver_internal : Sidekick_core.SOLVER_INTERNAL with module A = A and module CC_A = CC_A

Internal solver, available to theories.

module Lit = Solver_internal.Lit
type t
type solver = t
type term = A.Term.t
type ty = A.Ty.t
type lit = Solver_internal.Lit.t
type lemma = A.Proof.t
module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

val mk_theory : name:string -> create_and_setup:(Solver_internal.t -> 'th) -> ?⁠push_level:('th -> unit) -> ?⁠pop_levels:('th -> int -> unit) -> unit -> theory

Helper to create a theory

module Atom : sig ... end
module Value : sig ... end
module Model : sig ... end
module Unknown : sig ... end
module Proof : sig ... end
type proof = Proof.t

Main API

val stats : t -> Sidekick_util.Stat.t
val tst : t -> A.Term.state
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠size:[ `Big | `Tiny | `Small ] -> ?⁠store_proof:bool -> theories:theory list -> A.Term.state -> unit -> t

Create a new solver.

parameter theories

theories to load from the start.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val mk_atom_lit : t -> lit -> Atom.t
val mk_atom_t : t -> ?⁠sign:bool -> term -> Atom.t
val add_clause : t -> Atom.t Sidekick_util.IArray.t -> unit
val add_clause_l : t -> Atom.t list -> unit
type res =
| Sat of Model.t
| Unsat of {
proof : proof option;
unsat_core : Atom.t list lazy_t;
}
| Unknown of Unknown.t

Result of solving for the current set of clauses

val solve : ?⁠on_exit:(unit -> unit) list -> ?⁠check:bool -> assumptions:Atom.t list -> t -> res

solve s checks the satisfiability of the statement added so far to s

parameter check

if true, the model is checked before returning

parameter assumptions

a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

parameter on_exit

functions to be run before this returns

val pp_term_graph : t CCFormat.printer
val pp_stats : t CCFormat.printer
\ No newline at end of file +Solver (sidekick-bin.Sidekick_smtlib.Process.Solver)

Module Process.Solver

module Lit : Sidekick_core.LIT with module T = T
module Solver_internal : Sidekick_core.SOLVER_INTERNAL with module T = T and module P = P and module Lit = Lit

Internal solver, available to theories.

type t
type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t
type lemma = P.t
module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

type 'a theory_p = (module THEORY with type t = 'a)

A theory that can be used for this particular solver, with state of type 'a.

val mk_theory : name:string -> create_and_setup:(Solver_internal.t -> 'th) -> ?⁠push_level:('th -> unit) -> ?⁠pop_levels:('th -> int -> unit) -> unit -> theory

Helper to create a theory

module Atom : sig ... end
module Model : sig ... end
module Unknown : sig ... end
module Proof : sig ... end
type proof = Proof.t

Main API

val stats : t -> Sidekick_util.Stat.t
val tst : t -> T.Term.state
val ty_st : t -> T.Ty.state
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠size:[ `Big | `Tiny | `Small ] -> ?⁠store_proof:bool -> theories:theory list -> T.Term.state -> T.Ty.state -> unit -> t

Create a new solver.

parameter theories

theories to load from the start.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val add_theory_p : t -> 'a theory_p -> 'a

Add the given theory and obtain its state

val add_theory_l : t -> theory list -> unit
val mk_atom_lit : t -> lit -> Atom.t
val mk_atom_t : t -> ?⁠sign:bool -> term -> Atom.t
val add_clause : t -> Atom.t Sidekick_util.IArray.t -> unit
val add_clause_l : t -> Atom.t list -> unit
type res =
| Sat of Model.t
| Unsat of {
proof : proof option lazy_t;
unsat_core : Atom.t list lazy_t;
}
| Unknown of Unknown.t

Result of solving for the current set of clauses

val solve : ?⁠on_exit:(unit -> unit) list -> ?⁠check:bool -> ?⁠on_progress:(t -> unit) -> assumptions:Atom.t list -> t -> res

solve s checks the satisfiability of the statement added so far to s

parameter check

if true, the model is checked before returning

parameter assumptions

a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

parameter on_exit

functions to be run before this returns

val pp_stats : t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/module-type-THEORY/index.html b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/module-type-THEORY/index.html index 15a1630f..9a9872e1 100644 --- a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/module-type-THEORY/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/module-type-THEORY/index.html @@ -1,2 +1,2 @@ -THEORY (sidekick-bin.Sidekick_smtlib.Process.Solver.THEORY)

Module type Solver.THEORY

A theory

Theories are abstracted over the concrete implementation of the solver, so they can work with any implementation.

Typically a theory should be a functor taking an argument containing a SOLVER_INTERNAL and some additional views on terms, literals, etc. that are specific to the theory (e.g. to map terms to linear expressions). The theory can then be instantiated on any kind of solver for any term representation that also satisfies the additional theory-specific requirements. Instantiated theories (ie values of type Sidekick_core.SOLVER.theory) can be added to the solver.

type t

The theory's state

val name : string

Name of the theory

val create_and_setup : Solver_internal.t -> t

Instantiate the theory's state for the given (internal) solver, register callbacks, create keys, etc.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Pop backtracking levels, restoring the theory to its former state

\ No newline at end of file +THEORY (sidekick-bin.Sidekick_smtlib.Process.Solver.THEORY)

Module type Solver.THEORY

A theory

Theories are abstracted over the concrete implementation of the solver, so they can work with any implementation.

Typically a theory should be a functor taking an argument containing a SOLVER_INTERNAL or even a full SOLVER, and some additional views on terms, literals, etc. that are specific to the theory (e.g. to map terms to linear expressions). The theory can then be instantiated on any kind of solver for any term representation that also satisfies the additional theory-specific requirements. Instantiated theories (ie values of type Sidekick_core.SOLVER.theory) can be added to the solver.

type t

The theory's state

val name : string

Name of the theory

val create_and_setup : Solver_internal.t -> t

Instantiate the theory's state for the given (internal) solver, register callbacks, create keys, etc.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Pop backtracking levels, restoring the theory to its former state

\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib/Process/index.html b/dev/sidekick-bin/Sidekick_smtlib/Process/index.html index 3585ef7f..28c735c5 100644 --- a/dev/sidekick-bin/Sidekick_smtlib/Process/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib/Process/index.html @@ -1,2 +1,2 @@ -Process (sidekick-bin.Sidekick_smtlib.Process)

Module Sidekick_smtlib.Process

Process Statements

val th_bool : Solver.theory
type 'a or_error = ('a, string) CCResult.t
val conv_ty : Ast.Ty.t -> Sidekick_base_term.Ty.t
val conv_term : Sidekick_base_term.Term.state -> Ast.term -> Sidekick_base_term.Term.t
module Check_cc : sig ... end
val process_stmt : ?⁠hyps:Solver.Atom.t list Sidekick_util.Vec.t -> ?⁠gc:bool -> ?⁠restarts:bool -> ?⁠pp_cnf:bool -> ?⁠dot_proof:string -> ?⁠pp_model:bool -> ?⁠check:bool -> ?⁠time:float -> ?⁠memory:float -> ?⁠progress:bool -> Solver.t -> Ast.statement -> unit or_error
\ No newline at end of file +Process (sidekick-bin.Sidekick_smtlib.Process)

Module Sidekick_smtlib.Process

Process Statements

val th_bool : Solver.theory
val th_data : Solver.theory
val th_lra : Solver.theory
type 'a or_error = ('a, string) CCResult.t
module Check_cc : sig ... end
val process_stmt : ?⁠hyps:Solver.Atom.t list Sidekick_util.Vec.t -> ?⁠gc:bool -> ?⁠restarts:bool -> ?⁠pp_cnf:bool -> ?⁠dot_proof:string -> ?⁠pp_model:bool -> ?⁠check:bool -> ?⁠time:float -> ?⁠memory:float -> ?⁠progress:bool -> Solver.t -> Sidekick_base_term.Statement.t -> unit or_error
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib/index.html b/dev/sidekick-bin/Sidekick_smtlib/index.html index 6abfe47c..0aa6373c 100644 --- a/dev/sidekick-bin/Sidekick_smtlib/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib/index.html @@ -1,2 +1,2 @@ -Sidekick_smtlib (sidekick-bin.Sidekick_smtlib)

Module Sidekick_smtlib

SMTLib-2 Interface

type 'a or_error = ('a, string) CCResult.t
module Ast : sig ... end
module Process : sig ... end
module Solver = Process.Solver
val parse : string -> Ast.statement list or_error
val parse_stdin : unit -> Ast.statement list or_error
\ No newline at end of file +Sidekick_smtlib (sidekick-bin.Sidekick_smtlib)

Module Sidekick_smtlib

SMTLib-2 Interface

type 'a or_error = ('a, string) CCResult.t
module Process : sig ... end
module Solver = Process.Solver
val parse : Term.state -> string -> Stmt.t list or_error
val parse_stdin : Term.state -> Stmt.t list or_error
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__/Ast/Ty/index.html b/dev/sidekick-bin/Sidekick_smtlib__/Ast/Ty/index.html deleted file mode 100644 index 2ffdf961..00000000 --- a/dev/sidekick-bin/Sidekick_smtlib__/Ast/Ty/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Ty (sidekick-bin.Sidekick_smtlib__.Ast.Ty)

Module Ast.Ty

type t =
| Prop
| App of Sidekick_base_term.ID.t * t list
| Arrow of t * t
val prop : t
val const : Sidekick_base_term.ID.t -> t
val app : Sidekick_base_term.ID.t -> t list -> t
val arrow : t -> t -> t
val arrow_l : t list -> t -> t
val rat : t
val int : t
include Sidekick_util.Intf.EQ with type t := t
type t
val equal : t -> t -> bool
include Sidekick_util.Intf.ORD with type t := t
type t
val compare : t -> t -> int
include Sidekick_util.Intf.HASH with type t := t
type t
val hash : t -> int
include Sidekick_util.Intf.PRINT with type t := t
type t
val pp : t CCFormat.printer
val unfold : t -> t list * t

unfold ty will get the list of arguments, and the return type of any function. An atomic type is just a function with no arguments

Datatypes

type data = {
data_id : Sidekick_base_term.ID.t;
data_cstors : t Sidekick_base_term.ID.Map.t;
}

Mutually recursive datatypes

module Map : CCMap.S with type Map.key = t

Error Handling

val ill_typed : ('a, Format.formatter, unit, 'b) Pervasives.format4 -> 'a
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__/Ast/Var/index.html b/dev/sidekick-bin/Sidekick_smtlib__/Ast/Var/index.html deleted file mode 100644 index e5f873ae..00000000 --- a/dev/sidekick-bin/Sidekick_smtlib__/Ast/Var/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Var (sidekick-bin.Sidekick_smtlib__.Ast.Var)

Module Ast.Var

type 'ty t = private {
id : Sidekick_base_term.ID.t;
ty : 'ty;
}
val make : Sidekick_base_term.ID.t -> 'ty -> 'ty t
val makef : ty:'a -> ('b, Format.formatter, unit, 'a t) Pervasives.format4 -> 'b
val copy : 'a t -> 'a t
val id : _ t -> Sidekick_base_term.ID.t
val ty : 'a t -> 'a
val equal : 'a t -> 'a t -> bool
val compare : 'a t -> 'a t -> int
val pp : _ t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__/Ast/index.html b/dev/sidekick-bin/Sidekick_smtlib__/Ast/index.html deleted file mode 100644 index 7126d439..00000000 --- a/dev/sidekick-bin/Sidekick_smtlib__/Ast/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Ast (sidekick-bin.Sidekick_smtlib__.Ast)

Module Sidekick_smtlib__.Ast

Preprocessing AST

type 'a or_error = ('a, string) CCResult.t

Types

module Var : sig ... end
module Ty : sig ... end
type var = Ty.t Var.t
type op =
| And
| Or
| Imply
| Eq
| Distinct
type arith_op =
| Leq
| Lt
| Geq
| Gt
| Add
| Minus
| Mult
| Div
type binder =
| Fun
| Forall
| Exists
| Mu
type term = private {
term : term_cell;
ty : Ty.t;
}
and term_cell =
| Var of var
| Const of Sidekick_base_term.ID.t
| Num_z of Z.t
| Num_q of Q.t
| App of term * term list
| If of term * term * term
| Match of term * (var list * term) Sidekick_base_term.ID.Map.t
| Select of select * term
| Bind of binder * var * term
| Arith of arith_op * term list
| Let of (var * term) list * term
| Not of term
| Op of op * term list
| Asserting of {
t : term;
guard : term;
}
| Undefined_value
| Bool of bool
and select = {
select_name : Sidekick_base_term.ID.t lazy_t;
select_cstor : Sidekick_base_term.ID.t;
select_i : int;
}
type definition = Sidekick_base_term.ID.t * Ty.t * term
type statement =
| SetLogic of string
| SetOption of string list
| SetInfo of string list
| Data of Ty.data list
| TyDecl of Sidekick_base_term.ID.t * int
| Decl of Sidekick_base_term.ID.t * Ty.t
| Define of definition list
| Assert of term
| Goal of var list * term
| CheckSat
| Exit

Constructors

val term_view : term -> term_cell
val ty : term -> Ty.t
val var : var -> term
val const : Sidekick_base_term.ID.t -> Ty.t -> term
val app : term -> term list -> term
val app_a : term -> term array -> term
val if_ : term -> term -> term -> term
val match_ : term -> (var list * term) Sidekick_base_term.ID.Map.t -> term
val let_ : var -> term -> term -> term
val let_l : (var * term) list -> term -> term
val bind : ty:Ty.t -> binder -> var -> term -> term
val select : ty:Ty.t -> select -> term -> term
val fun_ : var -> term -> term
val fun_l : var list -> term -> term
val fun_a : var array -> term -> term
val forall : var -> term -> term
val forall_l : var list -> term -> term
val exists : var -> term -> term
val exists_l : var list -> term -> term
val mu : var -> term -> term
val eq : term -> term -> term
val not_ : term -> term
val op : op -> term list -> term
val and_ : term -> term -> term
val and_l : term list -> term
val or_ : term -> term -> term
val or_l : term list -> term
val imply : term -> term -> term
val true_ : term
val false_ : term
val undefined_value : Ty.t -> term
val asserting : term -> term -> term
val num_z : Ty.t -> Z.t -> term
val num_q : Ty.t -> Q.t -> term
val num_str : Ty.t -> string -> term

parses int + num

val arith : Ty.t -> arith_op -> term list -> term

helpers

val is_true : term -> bool
val is_false : term -> bool
val unfold_binder : binder -> term -> var list * term
val unfold_fun : term -> var list * term

Printing

val pp_ty : Ty.t CCFormat.printer
val pp_term : term CCFormat.printer
val pp_statement : statement CCFormat.printer

Environment

type env_entry =
| E_uninterpreted_ty
| E_uninterpreted_cst
| E_const of Ty.t
| E_data of Ty.t Sidekick_base_term.ID.Map.t
| E_cstor of Ty.t
| E_defined of Ty.t * term
type env = {
defs : env_entry Sidekick_base_term.ID.Map.t;
}

Environment with definitions and goals

val env_empty : env
val env_add_statement : env -> statement -> env
val env_of_statements : statement Iter.t -> env
val env_find_def : env -> Sidekick_base_term.ID.t -> env_entry option
val env_add_def : env -> Sidekick_base_term.ID.t -> env_entry -> env
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__/Form/Funs/index.html b/dev/sidekick-bin/Sidekick_smtlib__/Form/Funs/index.html new file mode 100644 index 00000000..95f36395 --- /dev/null +++ b/dev/sidekick-bin/Sidekick_smtlib__/Form/Funs/index.html @@ -0,0 +1,2 @@ + +Funs (sidekick-bin.Sidekick_smtlib__.Form.Funs) \ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__/Form/Gensym/index.html b/dev/sidekick-bin/Sidekick_smtlib__/Form/Gensym/index.html new file mode 100644 index 00000000..a6b923e9 --- /dev/null +++ b/dev/sidekick-bin/Sidekick_smtlib__/Form/Gensym/index.html @@ -0,0 +1,2 @@ + +Gensym (sidekick-bin.Sidekick_smtlib__.Form.Gensym)

Module Form.Gensym

type t = {
tst : T.state;
mutable fresh : int;
}
val create : T.state -> t
val fresh_term : t -> pre:string -> Sidekick_base_term.Ty.t -> T.t
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__/Form/index.html b/dev/sidekick-bin/Sidekick_smtlib__/Form/index.html new file mode 100644 index 00000000..f02ec011 --- /dev/null +++ b/dev/sidekick-bin/Sidekick_smtlib__/Form/index.html @@ -0,0 +1,2 @@ + +Form (sidekick-bin.Sidekick_smtlib__.Form)

Module Sidekick_smtlib__.Form

exception Not_a_th_term
val id_and : Sidekick_base_term.ID.t
val id_or : Sidekick_base_term.ID.t
val id_imply : Sidekick_base_term.ID.t
val view_id : Sidekick_base_term.ID.t -> 'a Sidekick_util.IArray.t -> ('a'a Sidekick_util.IArray.iter) Sidekick_th_bool_static.bool_view
val view_as_bool : T.t -> (T.tT.t Sidekick_util.IArray.iter) Sidekick_th_bool_static.bool_view
module Funs : sig ... end
val as_id : Sidekick_base_term.ID.t -> T.t -> T.t Sidekick_util.IArray.t option
val flatten_id : Sidekick_base_term.ID.t -> bool -> T.t list -> T.t list
val and_l : T.state -> T.t list -> T.t
val or_l : T.state -> T.t list -> T.t
val and_ : T.state -> T.t -> T.t -> T.t
val or_ : T.state -> T.t -> T.t -> T.t
val and_a : T.state -> T.t Sidekick_util.IArray.t -> T.t
val or_a : T.state -> T.t Sidekick_util.IArray.t -> T.t
val eq : T.state -> T.t -> T.t -> T.t
val not_ : T.state -> T.t -> T.t
val ite : T.state -> T.t -> T.t -> T.t -> T.t
val equiv : T.state -> T.t -> T.t -> T.t
val neq : T.state -> T.t -> T.t -> T.t
val imply_a : T.state -> T.t Sidekick_util.IArray.t -> T.t -> T.t
val imply_l : T.state -> T.t list -> T.t -> T.t
val imply : T.state -> T.t -> T.t -> T.t
val xor : T.state -> T.t -> T.t -> T.t
val distinct_l : T.state -> T.t CCList.t -> T.t
val mk_bool : T.state -> (T.tT.t Sidekick_util.IArray.t) Sidekick_th_bool_static.bool_view -> T.t
module Gensym : sig ... end
val check_congruence_classes : bool
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__/Lexer/index.html b/dev/sidekick-bin/Sidekick_smtlib__/Lexer/index.html deleted file mode 100644 index c15b5cd2..00000000 --- a/dev/sidekick-bin/Sidekick_smtlib__/Lexer/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Lexer (sidekick-bin.Sidekick_smtlib__.Lexer)

Module Sidekick_smtlib__.Lexer

val __ocaml_lex_tables : Lexing.lex_tables
val token : Lexing.lexbuf -> Sidekick_smtlib__.Parser.token
val __ocaml_lex_token_rec : Lexing.lexbuf -> int -> Sidekick_smtlib__.Parser.token
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__/Locations/index.html b/dev/sidekick-bin/Sidekick_smtlib__/Locations/index.html deleted file mode 100644 index 63e0a8e7..00000000 --- a/dev/sidekick-bin/Sidekick_smtlib__/Locations/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Locations (sidekick-bin.Sidekick_smtlib__.Locations)

Module Sidekick_smtlib__.Locations

Locations

type t = {
file : string;
start_line : int;
start_column : int;
stop_line : int;
stop_column : int;
}
val mk : string -> int -> int -> int -> int -> t
val mk_pair : string -> (int * int) -> (int * int) -> t
val mk_pos : Lexing.position -> Lexing.position -> t
val equal : 'a -> 'a -> bool
val pp : Format.formatter -> t -> unit
val pp_opt : Format.formatter -> t option -> unit
val pp_to_string : (Format.formatter -> 'a -> unit) -> 'a -> string
val to_string_opt : t option -> string

Lexbuf

val set_file : Lexing.lexbuf -> string -> unit
val get_file : Lexing.lexbuf -> string
val of_lexbuf : Lexing.lexbuf -> t
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__/Parse_ast/index.html b/dev/sidekick-bin/Sidekick_smtlib__/Parse_ast/index.html deleted file mode 100644 index 3da0340e..00000000 --- a/dev/sidekick-bin/Sidekick_smtlib__/Parse_ast/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Parse_ast (sidekick-bin.Sidekick_smtlib__.Parse_ast)

Module Sidekick_smtlib__.Parse_ast

Simple AST for parsing

module Fmt = CCFormat
val pp_str : Format.formatter -> string -> unit
val pp_to_string : (Format.formatter -> 'a -> unit) -> 'a -> string
type var = string
type ty_var = string
type ty =
| Ty_bool
| Ty_app of ty_var * ty list
| Ty_arrow of ty list * ty

Polymorphic types

type typed_var = var * ty
type arith_op =
| Leq
| Lt
| Geq
| Gt
| Add
| Minus
| Mult
| Div
type term =
| True
| False
| Const of string
| Arith of arith_op * term list
| App of string * term list
| HO_app of term * term
| Match of term * match_branch list
| If of term * term * term
| Let of (var * term) list * term
| Fun of typed_var * term
| Eq of term * term
| Imply of term * term
| And of term list
| Or of term list
| Not of term
| Xor of term * term
| Distinct of term list
| Cast of term * ty
| Forall of (var * ty) list * term
| Exists of (var * ty) list * term

AST: S-expressions with locations

and match_branch =
| Match_default of term
| Match_case of string * var list * term
type cstor = {
cstor_name : string;
cstor_args : (string * ty) list;
}
type 'arg fun_decl = {
fun_ty_vars : ty_var list;
fun_name : string;
fun_args : 'arg list;
fun_ret : ty;
}
type fun_def = {
fr_decl : typed_var fun_decl;
fr_body : term;
}
type funs_rec_def = {
fsr_decls : typed_var fun_decl list;
fsr_bodies : term list;
}
type statement = {
stmt : stmt;
loc : Loc.t option;
}
and stmt =
| Stmt_decl_sort of string * int
| Stmt_decl of ty fun_decl
| Stmt_fun_def of fun_def
| Stmt_fun_rec of fun_def
| Stmt_funs_rec of funs_rec_def
| Stmt_data of ty_var list * (string * cstor list) list
| Stmt_assert of term
| Stmt_lemma of term
| Stmt_assert_not of ty_var list * term
| Stmt_set_logic of string
| Stmt_set_option of string list
| Stmt_set_info of string list
| Stmt_check_sat
| Stmt_exit
val ty_bool : ty
val ty_app : ty_var -> ty list -> ty
val ty_const : ty_var -> ty
val ty_arrow_l : ty list -> ty -> ty
val ty_arrow : ty -> ty -> ty
val true_ : term
val false_ : term
val const : string -> term
val app : string -> term list -> term
val ho_app : term -> term -> term
val ho_app_l : term -> term list -> term
val match_ : term -> match_branch list -> term
val if_ : term -> term -> term -> term
val fun_ : typed_var -> term -> term
val fun_l : typed_var list -> term -> term
val let_ : (var * term) list -> term -> term
val eq : term -> term -> term
val imply : term -> term -> term
val xor : term -> term -> term
val and_ : term list -> term
val or_ : term list -> term
val distinct : term list -> term
val cast : term -> ty:ty -> term
val forall : (var * ty) list -> term -> term
val exists : (var * ty) list -> term -> term
val not_ : term -> term
val arith : arith_op -> term list -> term
val _mk : ?⁠loc:Loc.t -> stmt -> statement
val mk_cstor : string -> (string * ty) list -> cstor
val mk_fun_decl : ty_vars:ty_var list -> string -> 'a list -> ty -> 'a fun_decl
val mk_fun_rec : ty_vars:ty_var list -> string -> typed_var list -> ty -> term -> fun_def
val decl_sort : ?⁠loc:Loc.t -> string -> arity:int -> statement
val decl_fun : ?⁠loc:Loc.t -> tyvars:ty_var list -> string -> ty list -> ty -> statement
val fun_def : ?⁠loc:Loc.t -> fun_def -> statement
val fun_rec : ?⁠loc:Loc.t -> fun_def -> statement
val funs_rec : ?⁠loc:Loc.t -> typed_var fun_decl list -> term list -> statement
val data : ?⁠loc:Loc.t -> ty_var list -> (string * cstor list) list -> statement
val assert_ : ?⁠loc:Loc.t -> term -> statement
val lemma : ?⁠loc:Loc.t -> term -> statement
val assert_not : ?⁠loc:Loc.t -> ty_vars:ty_var list -> term -> statement
val set_logic : ?⁠loc:Loc.t -> string -> statement
val set_option : ?⁠loc:Loc.t -> string list -> statement
val set_info : ?⁠loc:Loc.t -> string list -> statement
val check_sat : ?⁠loc:Loc.t -> unit -> statement
val exit : ?⁠loc:Loc.t -> unit -> statement
val loc : statement -> Loc.t option
val view : statement -> stmt
val fpf : Format.formatter -> ('a, Format.formatter, unit) Pervasives.format -> 'a
val pp_tyvar : Format.formatter -> string -> unit
val pp_ty : ty Sidekick_util.Util.printer
val pp_arith : Fmt.t -> arith_op -> unit
val pp_term : term Sidekick_util.Util.printer
val pp_typed_var : typed_var Sidekick_util.Util.printer
val pp_par : (CCFormat.t -> 'a -> unit) -> CCFormat.t -> (string list * 'a) -> unit
val pp_fun_decl : 'a Sidekick_util.Util.printer -> Format.formatter -> 'a fun_decl -> unit
val pp_fr : Format.formatter -> fun_def -> unit
val pp_stmt : Format.formatter -> statement -> unit

Errors

exception Parse_error of Loc.t option * string
val parse_error : ?⁠loc:Loc.t -> string -> 'a
val parse_errorf : ?⁠loc:Loc.t -> ('a, unit, string, 'b) Pervasives.format4 -> 'a
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__/Parser/index.html b/dev/sidekick-bin/Sidekick_smtlib__/Parser/index.html deleted file mode 100644 index 47171493..00000000 --- a/dev/sidekick-bin/Sidekick_smtlib__/Parser/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Parser (sidekick-bin.Sidekick_smtlib__.Parser)

Module Sidekick_smtlib__.Parser

type token =
| XOR
| TRUE
| SET_OPTION
| SET_LOGIC
| SET_INFO
| RIGHT_PAREN
| QUOTED of string
| PROD
| PAR
| OR
| NOT
| MINUS
| MATCH
| LT
| LET
| LEQ
| LEMMA
| LEFT_PAREN
| IF
| IDENT of string
| GT
| GEQ
| FUN
| FORALL
| FALSE
| EXIT
| EXISTS
| ESCAPED of string
| EQ
| EOI
| DIV
| DISTINCT
| DEFINE_FUN_REC
| DEFINE_FUNS_REC
| DEFINE_FUN
| DEFAULT
| DECLARE_SORT
| DECLARE_FUN
| DECLARE_CONST
| DATA
| CHECK_SAT
| CASE
| AT
| ASSERT_NOT
| ASSERT
| AS
| ARROW
| AND
| ADD
exception Error
val parse_ty : (Lexing.lexbuf -> token) -> Lexing.lexbuf -> Sidekick_smtlib__.Parse_ast.ty
val parse_term : (Lexing.lexbuf -> token) -> Lexing.lexbuf -> Sidekick_smtlib__.Parse_ast.term
val parse_list : (Lexing.lexbuf -> token) -> Lexing.lexbuf -> Sidekick_smtlib__.Parse_ast.statement list
val parse : (Lexing.lexbuf -> token) -> Lexing.lexbuf -> Sidekick_smtlib__.Parse_ast.statement
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__/Process/Check_cc/index.html b/dev/sidekick-bin/Sidekick_smtlib__/Process/Check_cc/index.html index a8a0bfcf..73fd8f5f 100644 --- a/dev/sidekick-bin/Sidekick_smtlib__/Process/Check_cc/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib__/Process/Check_cc/index.html @@ -1,2 +1,2 @@ -Check_cc (sidekick-bin.Sidekick_smtlib__.Process.Check_cc)

Module Process.Check_cc

val theory : Solver.theory

theory that check validity of conflicts

\ No newline at end of file +Check_cc (sidekick-bin.Sidekick_smtlib__.Process.Check_cc)

Module Process.Check_cc

val theory : Solver.theory

theory that check validity of conflicts

\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/A/Fun/index.html b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/A/Fun/index.html deleted file mode 100644 index 83276226..00000000 --- a/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/A/Fun/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Fun (sidekick-bin.Sidekick_smtlib__.Process.Solver.A.Fun)

Module A.Fun

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/A/Proof/index.html b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/A/Proof/index.html deleted file mode 100644 index fd55bbdf..00000000 --- a/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/A/Proof/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Proof (sidekick-bin.Sidekick_smtlib__.Process.Solver.A.Proof)

Module A.Proof

type t
val pp : t Sidekick_core.Fmt.printer
val default : t
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/A/Term/index.html b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/A/Term/index.html deleted file mode 100644 index ab5a0fbf..00000000 --- a/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/A/Term/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Term (sidekick-bin.Sidekick_smtlib__.Process.Solver.A.Term)

Module A.Term

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type state
val ty : t -> Ty.t
val bool : state -> bool -> t
val as_bool : t -> bool option
val abs : state -> t -> t * bool
val map_shallow : state -> (t -> t) -> t -> t

Map function on immediate subterms

val iter_dag : t -> (t -> unit) -> unit
module Tbl : CCHashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/A/Ty/index.html b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/A/Ty/index.html deleted file mode 100644 index 4b590aca..00000000 --- a/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/A/Ty/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Ty (sidekick-bin.Sidekick_smtlib__.Process.Solver.A.Ty)

Module A.Ty

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
val bool : t
val is_bool : t -> bool
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/A/index.html b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/A/index.html deleted file mode 100644 index f4243fa0..00000000 --- a/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/A/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -A (sidekick-bin.Sidekick_smtlib__.Process.Solver.A)

Module Solver.A

include Sidekick_core.TERM
module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
module Proof : sig ... end
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Atom/index.html b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Atom/index.html index c3461943..d81b1dc1 100644 --- a/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Atom/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Atom/index.html @@ -1,2 +1,2 @@ -Atom (sidekick-bin.Sidekick_smtlib__.Process.Solver.Atom)

Module Solver.Atom

Boolean Atoms

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t CCFormat.printer
\ No newline at end of file +Atom (sidekick-bin.Sidekick_smtlib__.Process.Solver.Atom)

Module Solver.Atom

Boolean Atoms

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t CCFormat.printer
val neg : t -> t
val formula : t -> lit
val sign : t -> bool
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/CC_A/Actions/index.html b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/CC_A/Actions/index.html deleted file mode 100644 index d46a3786..00000000 --- a/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/CC_A/Actions/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Actions (sidekick-bin.Sidekick_smtlib__.Process.Solver.CC_A.Actions)

Module CC_A.Actions

type t
val raise_conflict : t -> Lit.t list -> A.Proof.t -> 'a
val propagate : t -> Lit.t -> reason:(unit -> Lit.t list) -> A.Proof.t -> unit
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/CC_A/Lit/index.html b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/CC_A/Lit/index.html deleted file mode 100644 index f3089050..00000000 --- a/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/CC_A/Lit/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Lit (sidekick-bin.Sidekick_smtlib__.Process.Solver.CC_A.Lit)

Module CC_A.Lit

type t
val term : t -> A.Term.t
val sign : t -> bool
val neg : t -> t
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/CC_A/index.html b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/CC_A/index.html deleted file mode 100644 index 5a2dc612..00000000 --- a/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/CC_A/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -CC_A (sidekick-bin.Sidekick_smtlib__.Process.Solver.CC_A)

Module Solver.CC_A

module A = A
val cc_view : A.Term.t -> (A.Fun.tA.Term.tA.Term.t Iter.t) Sidekick_core.CC_view.t

View the term through the lens of the congruence closure

module Lit : sig ... end
module Actions : sig ... end
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Lit/index.html b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Lit/index.html new file mode 100644 index 00000000..61c82cd5 --- /dev/null +++ b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Lit/index.html @@ -0,0 +1,2 @@ + +Lit (sidekick-bin.Sidekick_smtlib__.Process.Solver.Lit)

Module Solver.Lit

module T = T
type t
val term : t -> T.Term.t
val sign : t -> bool
val neg : t -> t
val abs : t -> t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Model/index.html b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Model/index.html index 8935a274..332b111f 100644 --- a/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Model/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Model/index.html @@ -1,2 +1,2 @@ -Model (sidekick-bin.Sidekick_smtlib__.Process.Solver.Model)

Module Solver.Model

type t
val empty : t
val mem : term -> t -> bool
val find : term -> t -> Value.t option
val eval : t -> term -> Value.t option
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Model (sidekick-bin.Sidekick_smtlib__.Process.Solver.Model)

Module Solver.Model

type t
val empty : t
val mem : t -> term -> bool
val find : t -> term -> term option
val eval : t -> term -> term option
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/P/index.html b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/P/index.html new file mode 100644 index 00000000..09fce30e --- /dev/null +++ b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/P/index.html @@ -0,0 +1,2 @@ + +P (sidekick-bin.Sidekick_smtlib__.Process.Solver.P)

Module Solver.P

type t
val pp : t Sidekick_core.Fmt.printer
val default : t
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Proof/index.html b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Proof/index.html index 8b7aec1d..e774e291 100644 --- a/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Proof/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Proof/index.html @@ -1,2 +1,2 @@ -Proof (sidekick-bin.Sidekick_smtlib__.Process.Solver.Proof)

Module Solver.Proof

type t
val check : t -> unit
val pp_dot : t Sidekick_core.Fmt.printer
\ No newline at end of file +Proof (sidekick-bin.Sidekick_smtlib__.Process.Solver.Proof)

Module Solver.Proof

type t
val check : t -> unit
val pp_dot : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Solver_internal/CC/Actions/index.html b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Solver_internal/CC/Actions/index.html new file mode 100644 index 00000000..d6dbbc11 --- /dev/null +++ b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Solver_internal/CC/Actions/index.html @@ -0,0 +1,2 @@ + +Actions (sidekick-bin.Sidekick_smtlib__.Process.Solver.Solver_internal.CC.Actions)

Module CC.Actions

module T = T
module P = P
module Lit = Lit
type t = actions
val raise_conflict : t -> Lit.t list -> P.t -> 'a
val propagate : t -> Lit.t -> reason:(unit -> Lit.t list) -> P.t -> unit
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Solver_internal/CC/Expl/index.html b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Solver_internal/CC/Expl/index.html index a35778ca..12ea7d96 100644 --- a/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Solver_internal/CC/Expl/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Solver_internal/CC/Expl/index.html @@ -1,2 +1,2 @@ -Expl (sidekick-bin.Sidekick_smtlib__.Process.Solver.Solver_internal.CC.Expl)

Module CC.Expl

type t
val pp : t Sidekick_core.Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
\ No newline at end of file +Expl (sidekick-bin.Sidekick_smtlib__.Process.Solver.Solver_internal.CC.Expl)

Module CC.Expl

type t
val pp : t Sidekick_core.Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
val mk_theory : t -> t
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Solver_internal/CC/N/index.html b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Solver_internal/CC/N/index.html index 20b390e1..7eee3a63 100644 --- a/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Solver_internal/CC/N/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Solver_internal/CC/N/index.html @@ -1,2 +1,2 @@ -N (sidekick-bin.Sidekick_smtlib__.Process.Solver.Solver_internal.CC.N)

Module CC.N

An equivalence class is a set of terms that are currently equal in the partial model built by the solver. The class is represented by a collection of nodes, one of which is distinguished and is called the "representative".

All information pertaining to the whole equivalence class is stored in this representative's node.

When two classes become equal (are "merged"), one of the two representatives is picked as the representative of the new class. The new class contains the union of the two old classes' nodes.

We also allow theories to store additional information in the representative. This information can be used when two classes are merged, to detect conflicts and solve equations à la Shostak.

type t
val term : t -> term
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
val is_root : t -> bool

Is the node a root (ie the representative of its class)?

val iter_class : t -> t Iter.t

Traverse the congruence class. Precondition: is_root n (see find below)

val iter_parents : t -> t Iter.t

Traverse the parents of the class. Precondition: is_root n (see find below)

\ No newline at end of file +N (sidekick-bin.Sidekick_smtlib__.Process.Solver.Solver_internal.CC.N)

Module CC.N

An equivalence class is a set of terms that are currently equal in the partial model built by the solver. The class is represented by a collection of nodes, one of which is distinguished and is called the "representative".

All information pertaining to the whole equivalence class is stored in this representative's node.

When two classes become equal (are "merged"), one of the two representatives is picked as the representative of the new class. The new class contains the union of the two old classes' nodes.

We also allow theories to store additional information in the representative. This information can be used when two classes are merged, to detect conflicts and solve equations à la Shostak.

type t
val term : t -> term
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
val is_root : t -> bool

Is the node a root (ie the representative of its class)?

val iter_class : t -> t Iter.t

Traverse the congruence class. Precondition: is_root n (see find below)

val iter_parents : t -> t Iter.t

Traverse the parents of the class. Precondition: is_root n (see find below)

type bitfield

A field in the bitfield of this node. This should only be allocated when a theory is initialized.

All fields are initially 0, are backtracked automatically, and are merged automatically when classes are merged.

val get_field : bitfield -> t -> bool
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Solver_internal/CC/index.html b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Solver_internal/CC/index.html index 1d95f156..8b1edaa6 100644 --- a/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Solver_internal/CC/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Solver_internal/CC/index.html @@ -1,2 +1,2 @@ -CC (sidekick-bin.Sidekick_smtlib__.Process.Solver.Solver_internal.CC)

Module Solver_internal.CC

module CC_A = CC_A
module A = CC_A.A
type term_state = A.Term.state
type term = A.Term.t
type fun_ = A.Fun.t
type lit = CC_A.Lit.t
type proof = A.Proof.t
type actions = CC_A.Actions.t
type t

Global state of the congruence closure

module N : sig ... end

An equivalence class is a set of terms that are currently equal in the partial model built by the solver. The class is represented by a collection of nodes, one of which is distinguished and is called the "representative".

module Expl : sig ... end
type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t
val term_state : t -> term_state
val find : t -> node -> repr

Current representative

val add_term : t -> term -> node

Add the term to the congruence closure, if not present already. Will be backtracked.

type ev_on_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit
type ev_on_new_term = t -> N.t -> term -> unit
type ev_on_conflict = t -> lit list -> unit
type ev_on_propagate = t -> lit -> (unit -> lit list) -> unit
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_merge:ev_on_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠size:[ `Small | `Big ] -> term_state -> t

Create a new congruence closure.

val on_merge : t -> ev_on_merge -> unit

Add a function to be called when two classes are merged

val on_new_term : t -> ev_on_new_term -> unit

Add a function to be called when a new node is created

val on_conflict : t -> ev_on_conflict -> unit

Called when the congruence closure finds a conflict

val on_propagate : t -> ev_on_propagate -> unit

Called when the congruence closure propagates a literal

val set_as_lit : t -> N.t -> lit -> unit

map the given node to a literal.

val find_t : t -> term -> repr

Current representative of the term.

raises Not_found

if the term is not already add-ed.

val add_seq : t -> term Iter.t -> unit

Add a sequence of terms to the congruence closure

val all_classes : t -> repr Iter.t

All current classes. This is costly, only use if there is no other solution

val assert_lit : t -> lit -> unit

Given a literal, assume it in the congruence closure and propagate its consequences. Will be backtracked.

Useful for the theory combination or the SAT solver's functor

val assert_lits : t -> lit Iter.t -> unit

Addition of many literals

val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given explanation it must be a theory tautology that expl ==> absurd. To be used in theories.

val merge : t -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val check : t -> actions -> unit

Perform all pending operations done via assert_eq, assert_lit, etc. Will use the actions to propagate literals, declare conflicts, etc.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Restore to state n calls to push_level earlier. Used during backtracking.

val get_model : t -> N.t Iter.t Iter.t

get all the equivalence classes so they can be merged in the model

\ No newline at end of file +CC (sidekick-bin.Sidekick_smtlib__.Process.Solver.Solver_internal.CC)

Module Solver_internal.CC

module T = T
module P = P
module Lit = Lit
module Actions : Sidekick_core.CC_ACTIONS with module T = T and module Lit = Lit and module P = P and type t = actions
type term_state = T.Term.state
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type proof = P.t
type actions = Actions.t
type t

Global state of the congruence closure

module N : sig ... end

An equivalence class is a set of terms that are currently equal in the partial model built by the solver. The class is represented by a collection of nodes, one of which is distinguished and is called the "representative".

module Expl : sig ... end
type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t
val term_state : t -> term_state
val find : t -> node -> repr

Current representative

val add_term : t -> term -> node

Add the term to the congruence closure, if not present already. Will be backtracked.

val mem_term : t -> term -> bool

Returns true if the term is explicitly present in the congruence closure

type ev_on_pre_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit
type ev_on_post_merge = t -> actions -> N.t -> N.t -> unit
type ev_on_new_term = t -> N.t -> term -> unit
type ev_on_conflict = t -> th:bool -> lit list -> unit
type ev_on_propagate = t -> lit -> (unit -> lit list) -> unit
type ev_on_is_subterm = N.t -> term -> unit
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_pre_merge:ev_on_pre_merge list -> ?⁠on_post_merge:ev_on_post_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠on_is_subterm:ev_on_is_subterm list -> ?⁠size:[ `Small | `Big ] -> term_state -> t

Create a new congruence closure.

val allocate_bitfield : descr:string -> t -> N.bitfield

Allocate a new bitfield for the nodes. See N.bitfield.

val set_bitfield : t -> N.bitfield -> bool -> N.t -> unit

Set the bitfield for the node. This will be backtracked. See N.bitfield.

val on_pre_merge : t -> ev_on_pre_merge -> unit

Add a function to be called when two classes are merged

val on_post_merge : t -> ev_on_post_merge -> unit

Add a function to be called when two classes are merged

val on_new_term : t -> ev_on_new_term -> unit

Add a function to be called when a new node is created

val on_conflict : t -> ev_on_conflict -> unit

Called when the congruence closure finds a conflict

val on_propagate : t -> ev_on_propagate -> unit

Called when the congruence closure propagates a literal

val on_is_subterm : t -> ev_on_is_subterm -> unit

Called on terms that are subterms of function symbols

val set_as_lit : t -> N.t -> lit -> unit

map the given node to a literal.

val find_t : t -> term -> repr

Current representative of the term.

raises Not_found

if the term is not already add-ed.

val add_seq : t -> term Iter.t -> unit

Add a sequence of terms to the congruence closure

val all_classes : t -> repr Iter.t

All current classes. This is costly, only use if there is no other solution

val assert_lit : t -> lit -> unit

Given a literal, assume it in the congruence closure and propagate its consequences. Will be backtracked.

Useful for the theory combination or the SAT solver's functor

val assert_lits : t -> lit Iter.t -> unit

Addition of many literals

val explain_eq : t -> N.t -> N.t -> lit list

Explain why the two nodes are equal. Fails if they are not, in an unspecified way

val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given explanation it must be a theory tautology that expl ==> absurd. To be used in theories.

val n_true : t -> N.t
val n_false : t -> N.t
val n_bool : t -> bool -> N.t
val merge : t -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val merge_t : t -> term -> term -> Expl.t -> unit

Shortcut for adding + merging

val check : t -> actions -> unit

Perform all pending operations done via assert_eq, assert_lit, etc. Will use the actions to propagate literals, declare conflicts, etc.

val new_merges : t -> bool

Called after check, returns true if some pairs of classes were merged.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Restore to state n calls to push_level earlier. Used during backtracking.

val get_model : t -> N.t Iter.t Iter.t

get all the equivalence classes so they can be merged in the model

\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Solver_internal/Lit/index.html b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Solver_internal/Lit/index.html deleted file mode 100644 index 86d60df9..00000000 --- a/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Solver_internal/Lit/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Lit (sidekick-bin.Sidekick_smtlib__.Process.Solver.Solver_internal.Lit)

Module Solver_internal.Lit

Literals

A literal is a (preprocessed) term along with its sign. It is directly manipulated by the SAT solver.

type t
val term : t -> term
val sign : t -> bool
val neg : t -> t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Solver_internal/Simplify/index.html b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Solver_internal/Simplify/index.html index 87443548..eca71cc1 100644 --- a/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Solver_internal/Simplify/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Solver_internal/Simplify/index.html @@ -1,2 +1,2 @@ -Simplify (sidekick-bin.Sidekick_smtlib__.Process.Solver.Solver_internal.Simplify)

Module Solver_internal.Simplify

type t
val tst : t -> term_state
val clear : t -> unit

Reset internal cache, etc.

type hook = t -> term -> term option

Given a term, try to simplify it. Return None if it didn't change. Can also add clauses to the simplifier.

val normalize : t -> term -> term

Normalize a term using all the hooks.

\ No newline at end of file +Simplify (sidekick-bin.Sidekick_smtlib__.Process.Solver.Solver_internal.Simplify)

Module Solver_internal.Simplify

type t
val tst : t -> term_state
val ty_st : t -> ty_state
val clear : t -> unit

Reset internal cache, etc.

type hook = t -> term -> term option

Given a term, try to simplify it. Return None if it didn't change.

val normalize : t -> term -> term

Normalize a term using all the hooks.

\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Solver_internal/index.html b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Solver_internal/index.html index e238fd9d..81f67add 100644 --- a/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Solver_internal/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Solver_internal/index.html @@ -1,2 +1,2 @@ -Solver_internal (sidekick-bin.Sidekick_smtlib__.Process.Solver.Solver_internal)

Module Solver.Solver_internal

Internal solver, available to theories.

module A = A
module CC_A = CC_A
module CC : Sidekick_core.CC_S with module CC_A = CC_A
type ty = A.Ty.t
type term = A.Term.t
type term_state = A.Term.state
type proof = A.Proof.t
type t

Main type for a solver

type solver = t
module Expl = CC.Expl
module N = CC.N
val tst : t -> term_state
val cc : t -> CC.t

Congruence closure for this solver

module Lit : sig ... end
type lit = Lit.t

Simplifiers

module Simplify : sig ... end
type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit
val simplifier : t -> Simplify.t
val simp_t : t -> term -> term

hooks for the theory

type actions
val propagate : t -> actions -> lit -> reason:(unit -> lit list) -> A.Proof.t -> unit
val raise_conflict : t -> actions -> lit list -> A.Proof.t -> 'a

Give a conflict clause to the solver

val propagate : t -> actions -> lit -> (unit -> lit list) -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> actions -> lit -> lit list -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> actions -> lit list -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : t -> actions -> lit list -> unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> actions -> ?⁠sign:bool -> term -> lit

Create a literal

val add_lit : t -> actions -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value

val add_lit_t : t -> actions -> ?⁠sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> N.t -> N.t

Find representative of the node

val cc_merge : t -> actions -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> actions -> term -> term -> Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> N.t

Add/retrieve congruence closure node for this term. To be used in theories

val on_cc_merge : t -> (CC.t -> actions -> N.t -> N.t -> Expl.t -> unit) -> unit

Callback for when two classes containing data for this key are merged

val on_cc_new_term : t -> (CC.t -> N.t -> term -> unit) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_conflict : t -> (CC.t -> lit list -> unit) -> unit

Callback called on every CC conflict

val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list) -> unit) -> unit

Callback called on every CC propagation

val on_partial_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

type preprocess_hook = t -> mk_lit:(term -> lit) -> add_clause:(lit list -> unit) -> term -> term option

Given a term, try to preprocess it. Return None if it didn't change. Can also add clauses to define new terms.

val add_preprocess : t -> preprocess_hook -> unit
\ No newline at end of file +Solver_internal (sidekick-bin.Sidekick_smtlib__.Process.Solver.Solver_internal)

Module Solver.Solver_internal

Internal solver, available to theories.

module T = T
module P = P
type ty = T.Ty.t
type term = T.Term.t
type term_state = T.Term.state
type ty_state = T.Ty.state
type proof = P.t
type t

Main type for a solver

type solver = t
val tst : t -> term_state
val ty_st : t -> ty_state
val stats : t -> Sidekick_util.Stat.t

Actions for the theories

type actions
module Lit = Lit
type lit = Lit.t

Congruence Closure

module CC : Sidekick_core.CC_S with module T = T and module P = P and module Lit = Lit and type Actions.t = actions
val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end
type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit
val simplifier : t -> Simplify.t
val simp_t : t -> term -> term

hooks for the theory

val propagate : t -> actions -> lit -> reason:(unit -> lit list) -> proof -> unit

Propagate a literal for a reason. This is similar to asserting the clause reason => lit, but more lightweight, and in a way that is backtrackable.

val raise_conflict : t -> actions -> lit list -> proof -> 'a

Give a conflict clause to the solver

val push_decision : t -> actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : t -> actions -> lit -> (unit -> lit list) -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> actions -> lit -> lit list -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> actions -> lit list -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : t -> actions -> lit list -> unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> actions -> ?⁠sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val preprocess_term : t -> add_clause:(Lit.t list -> unit) -> term -> term

Preprocess a term.

val add_lit : t -> actions -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value

val add_lit_t : t -> actions -> ?⁠sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit

Callback called on every CC conflict

val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list) -> unit) -> unit

Callback called on every CC propagation

val on_partial_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

type preprocess_hook = t -> mk_lit:(term -> lit) -> add_clause:(lit list -> unit) -> term -> term option

Given a term, try to preprocess it. Return None if it didn't change. Can also add clauses to define new terms.

parameter mk_lit

creates a new literal for a boolean term.

parameter add_clause

pushes a new clause into the SAT solver.

val on_preprocess : t -> preprocess_hook -> unit

Model production

type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option

A model-production hook. It takes the solver, a class, and returns a term for this class.

val on_model_gen : t -> model_hook -> unit
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/T/Fun/index.html b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/T/Fun/index.html new file mode 100644 index 00000000..36844565 --- /dev/null +++ b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/T/Fun/index.html @@ -0,0 +1,2 @@ + +Fun (sidekick-bin.Sidekick_smtlib__.Process.Solver.T.Fun)

Module T.Fun

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/T/Term/index.html b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/T/Term/index.html new file mode 100644 index 00000000..e94d3d78 --- /dev/null +++ b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/T/Term/index.html @@ -0,0 +1,2 @@ + +Term (sidekick-bin.Sidekick_smtlib__.Process.Solver.T.Term)

Module T.Term

type t = Sidekick_base_term.Term.t
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type state = Sidekick_base_term.Term.state
val ty : t -> Ty.t
val bool : state -> bool -> t
val as_bool : t -> bool option
val abs : state -> t -> t * bool
val map_shallow : state -> (t -> t) -> t -> t

Map function on immediate subterms

val iter_dag : t -> (t -> unit) -> unit
module Tbl : CCHashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/T/Ty/index.html b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/T/Ty/index.html new file mode 100644 index 00000000..50c40a18 --- /dev/null +++ b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/T/Ty/index.html @@ -0,0 +1,2 @@ + +Ty (sidekick-bin.Sidekick_smtlib__.Process.Solver.T.Ty)

Module T.Ty

type t = Sidekick_base_term.Ty.t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type state = Sidekick_base_term.Ty.state
val bool : state -> t
val is_bool : t -> bool
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/T/index.html b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/T/index.html new file mode 100644 index 00000000..a8c3df18 --- /dev/null +++ b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/T/index.html @@ -0,0 +1,2 @@ + +T (sidekick-bin.Sidekick_smtlib__.Process.Solver.T)

Module Solver.T

module Fun : sig ... end
module Ty : sig ... end with type t = Sidekick_base_term.Ty.t and type state = Sidekick_base_term.Ty.state
module Term : sig ... end with type t = Sidekick_base_term.Term.t and type state = Sidekick_base_term.Term.state
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Unknown/index.html b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Unknown/index.html index f05e07ef..0bec7ba9 100644 --- a/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Unknown/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Unknown/index.html @@ -1,2 +1,2 @@ -Unknown (sidekick-bin.Sidekick_smtlib__.Process.Solver.Unknown)

Module Solver.Unknown

type t
val pp : t CCFormat.printer
\ No newline at end of file +Unknown (sidekick-bin.Sidekick_smtlib__.Process.Solver.Unknown)

Module Solver.Unknown

type t
val pp : t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Value/index.html b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Value/index.html deleted file mode 100644 index 749b6a0e..00000000 --- a/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Value/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Value (sidekick-bin.Sidekick_smtlib__.Process.Solver.Value)

Module Solver.Value

Semantic values

type t
val equal : t -> t -> bool
val hash : t -> int
val ty : t -> ty
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/index.html b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/index.html index ce1aefd4..cf3a9bea 100644 --- a/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/index.html @@ -1,2 +1,2 @@ -Solver (sidekick-bin.Sidekick_smtlib__.Process.Solver)

Module Process.Solver

module CC_A : Sidekick_core.CC_ARG with module A = A
module Solver_internal : Sidekick_core.SOLVER_INTERNAL with module A = A and module CC_A = CC_A

Internal solver, available to theories.

module Lit = Solver_internal.Lit
type t
type solver = t
type term = A.Term.t
type ty = A.Ty.t
type lit = Solver_internal.Lit.t
type lemma = A.Proof.t
module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

val mk_theory : name:string -> create_and_setup:(Solver_internal.t -> 'th) -> ?⁠push_level:('th -> unit) -> ?⁠pop_levels:('th -> int -> unit) -> unit -> theory

Helper to create a theory

module Atom : sig ... end
module Value : sig ... end
module Model : sig ... end
module Unknown : sig ... end
module Proof : sig ... end
type proof = Proof.t

Main API

val stats : t -> Sidekick_util.Stat.t
val tst : t -> A.Term.state
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠size:[ `Big | `Tiny | `Small ] -> ?⁠store_proof:bool -> theories:theory list -> A.Term.state -> unit -> t

Create a new solver.

parameter theories

theories to load from the start.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val mk_atom_lit : t -> lit -> Atom.t
val mk_atom_t : t -> ?⁠sign:bool -> term -> Atom.t
val add_clause : t -> Atom.t Sidekick_util.IArray.t -> unit
val add_clause_l : t -> Atom.t list -> unit
type res =
| Sat of Model.t
| Unsat of {
proof : proof option;
unsat_core : Atom.t list lazy_t;
}
| Unknown of Unknown.t

Result of solving for the current set of clauses

val solve : ?⁠on_exit:(unit -> unit) list -> ?⁠check:bool -> assumptions:Atom.t list -> t -> res

solve s checks the satisfiability of the statement added so far to s

parameter check

if true, the model is checked before returning

parameter assumptions

a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

parameter on_exit

functions to be run before this returns

val pp_term_graph : t CCFormat.printer
val pp_stats : t CCFormat.printer
\ No newline at end of file +Solver (sidekick-bin.Sidekick_smtlib__.Process.Solver)

Module Process.Solver

module Lit : Sidekick_core.LIT with module T = T
module Solver_internal : Sidekick_core.SOLVER_INTERNAL with module T = T and module P = P and module Lit = Lit

Internal solver, available to theories.

type t
type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t
type lemma = P.t
module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

type 'a theory_p = (module THEORY with type t = 'a)

A theory that can be used for this particular solver, with state of type 'a.

val mk_theory : name:string -> create_and_setup:(Solver_internal.t -> 'th) -> ?⁠push_level:('th -> unit) -> ?⁠pop_levels:('th -> int -> unit) -> unit -> theory

Helper to create a theory

module Atom : sig ... end
module Model : sig ... end
module Unknown : sig ... end
module Proof : sig ... end
type proof = Proof.t

Main API

val stats : t -> Sidekick_util.Stat.t
val tst : t -> T.Term.state
val ty_st : t -> T.Ty.state
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠size:[ `Big | `Tiny | `Small ] -> ?⁠store_proof:bool -> theories:theory list -> T.Term.state -> T.Ty.state -> unit -> t

Create a new solver.

parameter theories

theories to load from the start.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val add_theory_p : t -> 'a theory_p -> 'a

Add the given theory and obtain its state

val add_theory_l : t -> theory list -> unit
val mk_atom_lit : t -> lit -> Atom.t
val mk_atom_t : t -> ?⁠sign:bool -> term -> Atom.t
val add_clause : t -> Atom.t Sidekick_util.IArray.t -> unit
val add_clause_l : t -> Atom.t list -> unit
type res =
| Sat of Model.t
| Unsat of {
proof : proof option lazy_t;
unsat_core : Atom.t list lazy_t;
}
| Unknown of Unknown.t

Result of solving for the current set of clauses

val solve : ?⁠on_exit:(unit -> unit) list -> ?⁠check:bool -> ?⁠on_progress:(t -> unit) -> assumptions:Atom.t list -> t -> res

solve s checks the satisfiability of the statement added so far to s

parameter check

if true, the model is checked before returning

parameter assumptions

a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

parameter on_exit

functions to be run before this returns

val pp_stats : t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/module-type-THEORY/index.html b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/module-type-THEORY/index.html index d6b08116..4ea73c4e 100644 --- a/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/module-type-THEORY/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/module-type-THEORY/index.html @@ -1,2 +1,2 @@ -THEORY (sidekick-bin.Sidekick_smtlib__.Process.Solver.THEORY)

Module type Solver.THEORY

A theory

Theories are abstracted over the concrete implementation of the solver, so they can work with any implementation.

Typically a theory should be a functor taking an argument containing a SOLVER_INTERNAL and some additional views on terms, literals, etc. that are specific to the theory (e.g. to map terms to linear expressions). The theory can then be instantiated on any kind of solver for any term representation that also satisfies the additional theory-specific requirements. Instantiated theories (ie values of type Sidekick_core.SOLVER.theory) can be added to the solver.

type t

The theory's state

val name : string

Name of the theory

val create_and_setup : Solver_internal.t -> t

Instantiate the theory's state for the given (internal) solver, register callbacks, create keys, etc.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Pop backtracking levels, restoring the theory to its former state

\ No newline at end of file +THEORY (sidekick-bin.Sidekick_smtlib__.Process.Solver.THEORY)

Module type Solver.THEORY

A theory

Theories are abstracted over the concrete implementation of the solver, so they can work with any implementation.

Typically a theory should be a functor taking an argument containing a SOLVER_INTERNAL or even a full SOLVER, and some additional views on terms, literals, etc. that are specific to the theory (e.g. to map terms to linear expressions). The theory can then be instantiated on any kind of solver for any term representation that also satisfies the additional theory-specific requirements. Instantiated theories (ie values of type Sidekick_core.SOLVER.theory) can be added to the solver.

type t

The theory's state

val name : string

Name of the theory

val create_and_setup : Solver_internal.t -> t

Instantiate the theory's state for the given (internal) solver, register callbacks, create keys, etc.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Pop backtracking levels, restoring the theory to its former state

\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__/Process/index.html b/dev/sidekick-bin/Sidekick_smtlib__/Process/index.html index e3a6dea0..b593cee5 100644 --- a/dev/sidekick-bin/Sidekick_smtlib__/Process/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib__/Process/index.html @@ -1,2 +1,2 @@ -Process (sidekick-bin.Sidekick_smtlib__.Process)

Module Sidekick_smtlib__.Process

Process Statements

val th_bool : Solver.theory
type 'a or_error = ('a, string) CCResult.t
val conv_ty : Sidekick_smtlib.Ast.Ty.t -> Sidekick_base_term.Ty.t
val conv_term : Sidekick_base_term.Term.state -> Sidekick_smtlib.Ast.term -> Sidekick_base_term.Term.t
module Check_cc : sig ... end
val process_stmt : ?⁠hyps:Solver.Atom.t list Sidekick_util.Vec.t -> ?⁠gc:bool -> ?⁠restarts:bool -> ?⁠pp_cnf:bool -> ?⁠dot_proof:string -> ?⁠pp_model:bool -> ?⁠check:bool -> ?⁠time:float -> ?⁠memory:float -> ?⁠progress:bool -> Solver.t -> Sidekick_smtlib.Ast.statement -> unit or_error
\ No newline at end of file +Process (sidekick-bin.Sidekick_smtlib__.Process)

Module Sidekick_smtlib__.Process

Process Statements

val th_bool : Solver.theory
val th_data : Solver.theory
val th_lra : Solver.theory
type 'a or_error = ('a, string) CCResult.t
module Check_cc : sig ... end
val process_stmt : ?⁠hyps:Solver.Atom.t list Sidekick_util.Vec.t -> ?⁠gc:bool -> ?⁠restarts:bool -> ?⁠pp_cnf:bool -> ?⁠dot_proof:string -> ?⁠pp_model:bool -> ?⁠check:bool -> ?⁠time:float -> ?⁠memory:float -> ?⁠progress:bool -> Solver.t -> Sidekick_base_term.Statement.t -> unit or_error
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__/Typecheck/Ctx/index.html b/dev/sidekick-bin/Sidekick_smtlib__/Typecheck/Ctx/index.html index 0caee102..500a3955 100644 --- a/dev/sidekick-bin/Sidekick_smtlib__/Typecheck/Ctx/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib__/Typecheck/Ctx/index.html @@ -1,2 +1,2 @@ -Ctx (sidekick-bin.Sidekick_smtlib__.Typecheck.Ctx)

Module Typecheck.Ctx

type t
val create : unit -> t
val pp : t CCFormat.printer
\ No newline at end of file +Ctx (sidekick-bin.Sidekick_smtlib__.Typecheck.Ctx)

Module Typecheck.Ctx

type t
val create : T.state -> t
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__/Typecheck/index.html b/dev/sidekick-bin/Sidekick_smtlib__/Typecheck/index.html index 3ea834df..ad0a3897 100644 --- a/dev/sidekick-bin/Sidekick_smtlib__/Typecheck/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib__/Typecheck/index.html @@ -1,2 +1,2 @@ -Typecheck (sidekick-bin.Sidekick_smtlib__.Typecheck)

Module Sidekick_smtlib__.Typecheck

Preprocessing AST

type 'a or_error = ('a, string) CCResult.t

Parsing and Typing

module Ctx : sig ... end
val conv_term : Ctx.t -> PA.term -> A.term
val conv_statement : Ctx.t -> PA.statement -> A.statement list
\ No newline at end of file +Typecheck (sidekick-bin.Sidekick_smtlib__.Typecheck)

Module Sidekick_smtlib__.Typecheck

Preprocessing AST

module Loc = Smtlib_utils.V_2_6.Loc
module PA = Smtlib_utils.V_2_6.Ast
type 'a or_error = ('a, string) CCResult.t

Parsing and Typing

module Ctx : sig ... end
val conv_term : Ctx.t -> PA.term -> T.t
val conv_statement : Ctx.t -> PA.statement -> Stmt.t list
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__/index.html b/dev/sidekick-bin/Sidekick_smtlib__/index.html index 89121ee0..721a730f 100644 --- a/dev/sidekick-bin/Sidekick_smtlib__/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib__/index.html @@ -1,2 +1,2 @@ -Sidekick_smtlib__ (sidekick-bin.Sidekick_smtlib__)

Module Sidekick_smtlib__

module Ast : sig ... end
module Lexer : sig ... end
module Locations : sig ... end
module Parse_ast : sig ... end
module Parser : sig ... end
module Process : sig ... end
module Typecheck : sig ... end
\ No newline at end of file +Sidekick_smtlib__ (sidekick-bin.Sidekick_smtlib__)

Module Sidekick_smtlib__

module Form : sig ... end
module Process : sig ... end
module Typecheck : sig ... end
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__Ast/Ty/index.html b/dev/sidekick-bin/Sidekick_smtlib__Ast/Ty/index.html deleted file mode 100644 index f02b0b9a..00000000 --- a/dev/sidekick-bin/Sidekick_smtlib__Ast/Ty/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Ty (sidekick-bin.Sidekick_smtlib__Ast.Ty)

Module Sidekick_smtlib__Ast.Ty

type t =
| Prop
| App of Sidekick_base_term.ID.t * t list
| Arrow of t * t
val prop : t
val const : Sidekick_base_term.ID.t -> t
val app : Sidekick_base_term.ID.t -> t list -> t
val arrow : t -> t -> t
val arrow_l : t list -> t -> t
val rat : t
val int : t
include Sidekick_util.Intf.EQ with type t := t
type t
val equal : t -> t -> bool
include Sidekick_util.Intf.ORD with type t := t
type t
val compare : t -> t -> int
include Sidekick_util.Intf.HASH with type t := t
type t
val hash : t -> int
include Sidekick_util.Intf.PRINT with type t := t
type t
val pp : t CCFormat.printer
val unfold : t -> t list * t

unfold ty will get the list of arguments, and the return type of any function. An atomic type is just a function with no arguments

Datatypes

type data = {
data_id : Sidekick_base_term.ID.t;
data_cstors : t Sidekick_base_term.ID.Map.t;
}

Mutually recursive datatypes

module Map : CCMap.S with type Map.key = t

Error Handling

val ill_typed : ('a, Format.formatter, unit, 'b) Pervasives.format4 -> 'a
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__Ast/Var/index.html b/dev/sidekick-bin/Sidekick_smtlib__Ast/Var/index.html deleted file mode 100644 index 484934f5..00000000 --- a/dev/sidekick-bin/Sidekick_smtlib__Ast/Var/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Var (sidekick-bin.Sidekick_smtlib__Ast.Var)

Module Sidekick_smtlib__Ast.Var

type 'ty t = private {
id : Sidekick_base_term.ID.t;
ty : 'ty;
}
val make : Sidekick_base_term.ID.t -> 'ty -> 'ty t
val makef : ty:'a -> ('b, Format.formatter, unit, 'a t) Pervasives.format4 -> 'b
val copy : 'a t -> 'a t
val id : _ t -> Sidekick_base_term.ID.t
val ty : 'a t -> 'a
val equal : 'a t -> 'a t -> bool
val compare : 'a t -> 'a t -> int
val pp : _ t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__Ast/index.html b/dev/sidekick-bin/Sidekick_smtlib__Ast/index.html deleted file mode 100644 index ca3dfd8c..00000000 --- a/dev/sidekick-bin/Sidekick_smtlib__Ast/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Sidekick_smtlib__Ast (sidekick-bin.Sidekick_smtlib__Ast)

Module Sidekick_smtlib__Ast

Preprocessing AST

type 'a or_error = ('a, string) CCResult.t

Types

module Var : sig ... end
module Ty : sig ... end
type var = Ty.t Var.t
type op =
| And
| Or
| Imply
| Eq
| Distinct
type arith_op =
| Leq
| Lt
| Geq
| Gt
| Add
| Minus
| Mult
| Div
type binder =
| Fun
| Forall
| Exists
| Mu
type term = private {
term : term_cell;
ty : Ty.t;
}
and term_cell =
| Var of var
| Const of Sidekick_base_term.ID.t
| Num_z of Z.t
| Num_q of Q.t
| App of term * term list
| If of term * term * term
| Match of term * (var list * term) Sidekick_base_term.ID.Map.t
| Select of select * term
| Bind of binder * var * term
| Arith of arith_op * term list
| Let of (var * term) list * term
| Not of term
| Op of op * term list
| Asserting of {
t : term;
guard : term;
}
| Undefined_value
| Bool of bool
and select = {
select_name : Sidekick_base_term.ID.t lazy_t;
select_cstor : Sidekick_base_term.ID.t;
select_i : int;
}
type definition = Sidekick_base_term.ID.t * Ty.t * term
type statement =
| SetLogic of string
| SetOption of string list
| SetInfo of string list
| Data of Ty.data list
| TyDecl of Sidekick_base_term.ID.t * int
| Decl of Sidekick_base_term.ID.t * Ty.t
| Define of definition list
| Assert of term
| Goal of var list * term
| CheckSat
| Exit

Constructors

val term_view : term -> term_cell
val ty : term -> Ty.t
val var : var -> term
val const : Sidekick_base_term.ID.t -> Ty.t -> term
val app : term -> term list -> term
val app_a : term -> term array -> term
val if_ : term -> term -> term -> term
val match_ : term -> (var list * term) Sidekick_base_term.ID.Map.t -> term
val let_ : var -> term -> term -> term
val let_l : (var * term) list -> term -> term
val bind : ty:Ty.t -> binder -> var -> term -> term
val select : ty:Ty.t -> select -> term -> term
val fun_ : var -> term -> term
val fun_l : var list -> term -> term
val fun_a : var array -> term -> term
val forall : var -> term -> term
val forall_l : var list -> term -> term
val exists : var -> term -> term
val exists_l : var list -> term -> term
val mu : var -> term -> term
val eq : term -> term -> term
val not_ : term -> term
val op : op -> term list -> term
val and_ : term -> term -> term
val and_l : term list -> term
val or_ : term -> term -> term
val or_l : term list -> term
val imply : term -> term -> term
val true_ : term
val false_ : term
val undefined_value : Ty.t -> term
val asserting : term -> term -> term
val num_z : Ty.t -> Z.t -> term
val num_q : Ty.t -> Q.t -> term
val num_str : Ty.t -> string -> term

parses int + num

val arith : Ty.t -> arith_op -> term list -> term

helpers

val is_true : term -> bool
val is_false : term -> bool
val unfold_binder : binder -> term -> var list * term
val unfold_fun : term -> var list * term

Printing

val pp_ty : Ty.t CCFormat.printer
val pp_term : term CCFormat.printer
val pp_statement : statement CCFormat.printer

Environment

type env_entry =
| E_uninterpreted_ty
| E_uninterpreted_cst
| E_const of Ty.t
| E_data of Ty.t Sidekick_base_term.ID.Map.t
| E_cstor of Ty.t
| E_defined of Ty.t * term
type env = {
defs : env_entry Sidekick_base_term.ID.Map.t;
}

Environment with definitions and goals

val env_empty : env
val env_add_statement : env -> statement -> env
val env_of_statements : statement Iter.t -> env
val env_find_def : env -> Sidekick_base_term.ID.t -> env_entry option
val env_add_def : env -> Sidekick_base_term.ID.t -> env_entry -> env
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__Form/.dune-keep b/dev/sidekick-bin/Sidekick_smtlib__Form/.dune-keep new file mode 100644 index 00000000..e69de29b diff --git a/dev/sidekick-bin/Sidekick_smtlib__Form/Funs/index.html b/dev/sidekick-bin/Sidekick_smtlib__Form/Funs/index.html new file mode 100644 index 00000000..6da961a9 --- /dev/null +++ b/dev/sidekick-bin/Sidekick_smtlib__Form/Funs/index.html @@ -0,0 +1,2 @@ + +Funs (sidekick-bin.Sidekick_smtlib__Form.Funs) \ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__Form/Gensym/index.html b/dev/sidekick-bin/Sidekick_smtlib__Form/Gensym/index.html new file mode 100644 index 00000000..14cd4f04 --- /dev/null +++ b/dev/sidekick-bin/Sidekick_smtlib__Form/Gensym/index.html @@ -0,0 +1,2 @@ + +Gensym (sidekick-bin.Sidekick_smtlib__Form.Gensym)

Module Sidekick_smtlib__Form.Gensym

type t = {
tst : T.state;
mutable fresh : int;
}
val create : T.state -> t
val fresh_term : t -> pre:string -> Sidekick_base_term.Ty.t -> T.t
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__Form/index.html b/dev/sidekick-bin/Sidekick_smtlib__Form/index.html new file mode 100644 index 00000000..1fddcf2e --- /dev/null +++ b/dev/sidekick-bin/Sidekick_smtlib__Form/index.html @@ -0,0 +1,2 @@ + +Sidekick_smtlib__Form (sidekick-bin.Sidekick_smtlib__Form)

Module Sidekick_smtlib__Form

exception Not_a_th_term
val id_and : Sidekick_base_term.ID.t
val id_or : Sidekick_base_term.ID.t
val id_imply : Sidekick_base_term.ID.t
val view_id : Sidekick_base_term.ID.t -> 'a Sidekick_util.IArray.t -> ('a'a Sidekick_util.IArray.iter) Sidekick_th_bool_static.bool_view
val view_as_bool : T.t -> (T.tT.t Sidekick_util.IArray.iter) Sidekick_th_bool_static.bool_view
module Funs : sig ... end
val as_id : Sidekick_base_term.ID.t -> T.t -> T.t Sidekick_util.IArray.t option
val flatten_id : Sidekick_base_term.ID.t -> bool -> T.t list -> T.t list
val and_l : T.state -> T.t list -> T.t
val or_l : T.state -> T.t list -> T.t
val and_ : T.state -> T.t -> T.t -> T.t
val or_ : T.state -> T.t -> T.t -> T.t
val and_a : T.state -> T.t Sidekick_util.IArray.t -> T.t
val or_a : T.state -> T.t Sidekick_util.IArray.t -> T.t
val eq : T.state -> T.t -> T.t -> T.t
val not_ : T.state -> T.t -> T.t
val ite : T.state -> T.t -> T.t -> T.t -> T.t
val equiv : T.state -> T.t -> T.t -> T.t
val neq : T.state -> T.t -> T.t -> T.t
val imply_a : T.state -> T.t Sidekick_util.IArray.t -> T.t -> T.t
val imply_l : T.state -> T.t list -> T.t -> T.t
val imply : T.state -> T.t -> T.t -> T.t
val xor : T.state -> T.t -> T.t -> T.t
val distinct_l : T.state -> T.t CCList.t -> T.t
val mk_bool : T.state -> (T.tT.t Sidekick_util.IArray.t) Sidekick_th_bool_static.bool_view -> T.t
module Gensym : sig ... end
val check_congruence_classes : bool
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__Lexer/index.html b/dev/sidekick-bin/Sidekick_smtlib__Lexer/index.html deleted file mode 100644 index 2f0d920a..00000000 --- a/dev/sidekick-bin/Sidekick_smtlib__Lexer/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Sidekick_smtlib__Lexer (sidekick-bin.Sidekick_smtlib__Lexer)

Module Sidekick_smtlib__Lexer

val __ocaml_lex_tables : Lexing.lex_tables
val token : Lexing.lexbuf -> Sidekick_smtlib__.Parser.token
val __ocaml_lex_token_rec : Lexing.lexbuf -> int -> Sidekick_smtlib__.Parser.token
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__Locations/index.html b/dev/sidekick-bin/Sidekick_smtlib__Locations/index.html deleted file mode 100644 index e8416fc9..00000000 --- a/dev/sidekick-bin/Sidekick_smtlib__Locations/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Sidekick_smtlib__Locations (sidekick-bin.Sidekick_smtlib__Locations)

Module Sidekick_smtlib__Locations

Locations

type t = {
file : string;
start_line : int;
start_column : int;
stop_line : int;
stop_column : int;
}
val mk : string -> int -> int -> int -> int -> t
val mk_pair : string -> (int * int) -> (int * int) -> t
val mk_pos : Lexing.position -> Lexing.position -> t
val equal : 'a -> 'a -> bool
val pp : Format.formatter -> t -> unit
val pp_opt : Format.formatter -> t option -> unit
val pp_to_string : (Format.formatter -> 'a -> unit) -> 'a -> string
val to_string_opt : t option -> string

Lexbuf

val set_file : Lexing.lexbuf -> string -> unit
val get_file : Lexing.lexbuf -> string
val of_lexbuf : Lexing.lexbuf -> t
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__Parse_ast/index.html b/dev/sidekick-bin/Sidekick_smtlib__Parse_ast/index.html deleted file mode 100644 index 9b7add9c..00000000 --- a/dev/sidekick-bin/Sidekick_smtlib__Parse_ast/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Sidekick_smtlib__Parse_ast (sidekick-bin.Sidekick_smtlib__Parse_ast)

Module Sidekick_smtlib__Parse_ast

Simple AST for parsing

module Fmt = CCFormat
val pp_str : Format.formatter -> string -> unit
val pp_to_string : (Format.formatter -> 'a -> unit) -> 'a -> string
type var = string
type ty_var = string
type ty =
| Ty_bool
| Ty_app of ty_var * ty list
| Ty_arrow of ty list * ty

Polymorphic types

type typed_var = var * ty
type arith_op =
| Leq
| Lt
| Geq
| Gt
| Add
| Minus
| Mult
| Div
type term =
| True
| False
| Const of string
| Arith of arith_op * term list
| App of string * term list
| HO_app of term * term
| Match of term * match_branch list
| If of term * term * term
| Let of (var * term) list * term
| Fun of typed_var * term
| Eq of term * term
| Imply of term * term
| And of term list
| Or of term list
| Not of term
| Xor of term * term
| Distinct of term list
| Cast of term * ty
| Forall of (var * ty) list * term
| Exists of (var * ty) list * term

AST: S-expressions with locations

and match_branch =
| Match_default of term
| Match_case of string * var list * term
type cstor = {
cstor_name : string;
cstor_args : (string * ty) list;
}
type 'arg fun_decl = {
fun_ty_vars : ty_var list;
fun_name : string;
fun_args : 'arg list;
fun_ret : ty;
}
type fun_def = {
fr_decl : typed_var fun_decl;
fr_body : term;
}
type funs_rec_def = {
fsr_decls : typed_var fun_decl list;
fsr_bodies : term list;
}
type statement = {
stmt : stmt;
loc : Loc.t option;
}
and stmt =
| Stmt_decl_sort of string * int
| Stmt_decl of ty fun_decl
| Stmt_fun_def of fun_def
| Stmt_fun_rec of fun_def
| Stmt_funs_rec of funs_rec_def
| Stmt_data of ty_var list * (string * cstor list) list
| Stmt_assert of term
| Stmt_lemma of term
| Stmt_assert_not of ty_var list * term
| Stmt_set_logic of string
| Stmt_set_option of string list
| Stmt_set_info of string list
| Stmt_check_sat
| Stmt_exit
val ty_bool : ty
val ty_app : ty_var -> ty list -> ty
val ty_const : ty_var -> ty
val ty_arrow_l : ty list -> ty -> ty
val ty_arrow : ty -> ty -> ty
val true_ : term
val false_ : term
val const : string -> term
val app : string -> term list -> term
val ho_app : term -> term -> term
val ho_app_l : term -> term list -> term
val match_ : term -> match_branch list -> term
val if_ : term -> term -> term -> term
val fun_ : typed_var -> term -> term
val fun_l : typed_var list -> term -> term
val let_ : (var * term) list -> term -> term
val eq : term -> term -> term
val imply : term -> term -> term
val xor : term -> term -> term
val and_ : term list -> term
val or_ : term list -> term
val distinct : term list -> term
val cast : term -> ty:ty -> term
val forall : (var * ty) list -> term -> term
val exists : (var * ty) list -> term -> term
val not_ : term -> term
val arith : arith_op -> term list -> term
val _mk : ?⁠loc:Loc.t -> stmt -> statement
val mk_cstor : string -> (string * ty) list -> cstor
val mk_fun_decl : ty_vars:ty_var list -> string -> 'a list -> ty -> 'a fun_decl
val mk_fun_rec : ty_vars:ty_var list -> string -> typed_var list -> ty -> term -> fun_def
val decl_sort : ?⁠loc:Loc.t -> string -> arity:int -> statement
val decl_fun : ?⁠loc:Loc.t -> tyvars:ty_var list -> string -> ty list -> ty -> statement
val fun_def : ?⁠loc:Loc.t -> fun_def -> statement
val fun_rec : ?⁠loc:Loc.t -> fun_def -> statement
val funs_rec : ?⁠loc:Loc.t -> typed_var fun_decl list -> term list -> statement
val data : ?⁠loc:Loc.t -> ty_var list -> (string * cstor list) list -> statement
val assert_ : ?⁠loc:Loc.t -> term -> statement
val lemma : ?⁠loc:Loc.t -> term -> statement
val assert_not : ?⁠loc:Loc.t -> ty_vars:ty_var list -> term -> statement
val set_logic : ?⁠loc:Loc.t -> string -> statement
val set_option : ?⁠loc:Loc.t -> string list -> statement
val set_info : ?⁠loc:Loc.t -> string list -> statement
val check_sat : ?⁠loc:Loc.t -> unit -> statement
val exit : ?⁠loc:Loc.t -> unit -> statement
val loc : statement -> Loc.t option
val view : statement -> stmt
val fpf : Format.formatter -> ('a, Format.formatter, unit) Pervasives.format -> 'a
val pp_tyvar : Format.formatter -> string -> unit
val pp_ty : ty Sidekick_util.Util.printer
val pp_arith : Fmt.t -> arith_op -> unit
val pp_term : term Sidekick_util.Util.printer
val pp_typed_var : typed_var Sidekick_util.Util.printer
val pp_par : (CCFormat.t -> 'a -> unit) -> CCFormat.t -> (string list * 'a) -> unit
val pp_fun_decl : 'a Sidekick_util.Util.printer -> Format.formatter -> 'a fun_decl -> unit
val pp_fr : Format.formatter -> fun_def -> unit
val pp_stmt : Format.formatter -> statement -> unit

Errors

exception Parse_error of Loc.t option * string
val parse_error : ?⁠loc:Loc.t -> string -> 'a
val parse_errorf : ?⁠loc:Loc.t -> ('a, unit, string, 'b) Pervasives.format4 -> 'a
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__Parser/index.html b/dev/sidekick-bin/Sidekick_smtlib__Parser/index.html deleted file mode 100644 index 45b5e4ba..00000000 --- a/dev/sidekick-bin/Sidekick_smtlib__Parser/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Sidekick_smtlib__Parser (sidekick-bin.Sidekick_smtlib__Parser)

Module Sidekick_smtlib__Parser

type token =
| XOR
| TRUE
| SET_OPTION
| SET_LOGIC
| SET_INFO
| RIGHT_PAREN
| QUOTED of string
| PROD
| PAR
| OR
| NOT
| MINUS
| MATCH
| LT
| LET
| LEQ
| LEMMA
| LEFT_PAREN
| IF
| IDENT of string
| GT
| GEQ
| FUN
| FORALL
| FALSE
| EXIT
| EXISTS
| ESCAPED of string
| EQ
| EOI
| DIV
| DISTINCT
| DEFINE_FUN_REC
| DEFINE_FUNS_REC
| DEFINE_FUN
| DEFAULT
| DECLARE_SORT
| DECLARE_FUN
| DECLARE_CONST
| DATA
| CHECK_SAT
| CASE
| AT
| ASSERT_NOT
| ASSERT
| AS
| ARROW
| AND
| ADD
exception Error
val parse_ty : (Lexing.lexbuf -> token) -> Lexing.lexbuf -> Sidekick_smtlib__.Parse_ast.ty
val parse_term : (Lexing.lexbuf -> token) -> Lexing.lexbuf -> Sidekick_smtlib__.Parse_ast.term
val parse_list : (Lexing.lexbuf -> token) -> Lexing.lexbuf -> Sidekick_smtlib__.Parse_ast.statement list
val parse : (Lexing.lexbuf -> token) -> Lexing.lexbuf -> Sidekick_smtlib__.Parse_ast.statement
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__Process/Check_cc/index.html b/dev/sidekick-bin/Sidekick_smtlib__Process/Check_cc/index.html index 64d1a851..d79c8d00 100644 --- a/dev/sidekick-bin/Sidekick_smtlib__Process/Check_cc/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib__Process/Check_cc/index.html @@ -1,2 +1,2 @@ -Check_cc (sidekick-bin.Sidekick_smtlib__Process.Check_cc)

Module Sidekick_smtlib__Process.Check_cc

val theory : Solver.theory

theory that check validity of conflicts

\ No newline at end of file +Check_cc (sidekick-bin.Sidekick_smtlib__Process.Check_cc)

Module Sidekick_smtlib__Process.Check_cc

val theory : Solver.theory

theory that check validity of conflicts

\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/A/Fun/index.html b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/A/Fun/index.html deleted file mode 100644 index 82a9df1e..00000000 --- a/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/A/Fun/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Fun (sidekick-bin.Sidekick_smtlib__Process.Solver.A.Fun)

Module A.Fun

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/A/Proof/index.html b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/A/Proof/index.html deleted file mode 100644 index 589a2753..00000000 --- a/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/A/Proof/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Proof (sidekick-bin.Sidekick_smtlib__Process.Solver.A.Proof)

Module A.Proof

type t
val pp : t Sidekick_core.Fmt.printer
val default : t
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/A/Term/index.html b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/A/Term/index.html deleted file mode 100644 index 2e9c8739..00000000 --- a/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/A/Term/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Term (sidekick-bin.Sidekick_smtlib__Process.Solver.A.Term)

Module A.Term

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type state
val ty : t -> Ty.t
val bool : state -> bool -> t
val as_bool : t -> bool option
val abs : state -> t -> t * bool
val map_shallow : state -> (t -> t) -> t -> t

Map function on immediate subterms

val iter_dag : t -> (t -> unit) -> unit
module Tbl : CCHashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/A/Ty/index.html b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/A/Ty/index.html deleted file mode 100644 index aa221564..00000000 --- a/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/A/Ty/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Ty (sidekick-bin.Sidekick_smtlib__Process.Solver.A.Ty)

Module A.Ty

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
val bool : t
val is_bool : t -> bool
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/A/index.html b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/A/index.html deleted file mode 100644 index a18e9502..00000000 --- a/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/A/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -A (sidekick-bin.Sidekick_smtlib__Process.Solver.A)

Module Solver.A

include Sidekick_core.TERM
module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
module Proof : sig ... end
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Atom/index.html b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Atom/index.html index 9b375402..e182d3fd 100644 --- a/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Atom/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Atom/index.html @@ -1,2 +1,2 @@ -Atom (sidekick-bin.Sidekick_smtlib__Process.Solver.Atom)

Module Solver.Atom

Boolean Atoms

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t CCFormat.printer
\ No newline at end of file +Atom (sidekick-bin.Sidekick_smtlib__Process.Solver.Atom)

Module Solver.Atom

Boolean Atoms

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t CCFormat.printer
val neg : t -> t
val formula : t -> lit
val sign : t -> bool
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/CC_A/Actions/index.html b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/CC_A/Actions/index.html deleted file mode 100644 index ce80d9a6..00000000 --- a/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/CC_A/Actions/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Actions (sidekick-bin.Sidekick_smtlib__Process.Solver.CC_A.Actions)

Module CC_A.Actions

type t
val raise_conflict : t -> Lit.t list -> A.Proof.t -> 'a
val propagate : t -> Lit.t -> reason:(unit -> Lit.t list) -> A.Proof.t -> unit
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/CC_A/Lit/index.html b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/CC_A/Lit/index.html deleted file mode 100644 index 892124a5..00000000 --- a/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/CC_A/Lit/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Lit (sidekick-bin.Sidekick_smtlib__Process.Solver.CC_A.Lit)

Module CC_A.Lit

type t
val term : t -> A.Term.t
val sign : t -> bool
val neg : t -> t
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/CC_A/index.html b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/CC_A/index.html deleted file mode 100644 index c209aa7c..00000000 --- a/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/CC_A/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -CC_A (sidekick-bin.Sidekick_smtlib__Process.Solver.CC_A)

Module Solver.CC_A

module A = A
val cc_view : A.Term.t -> (A.Fun.tA.Term.tA.Term.t Iter.t) Sidekick_core.CC_view.t

View the term through the lens of the congruence closure

module Lit : sig ... end
module Actions : sig ... end
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Lit/index.html b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Lit/index.html new file mode 100644 index 00000000..ac683e93 --- /dev/null +++ b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Lit/index.html @@ -0,0 +1,2 @@ + +Lit (sidekick-bin.Sidekick_smtlib__Process.Solver.Lit)

Module Solver.Lit

module T = T
type t
val term : t -> T.Term.t
val sign : t -> bool
val neg : t -> t
val abs : t -> t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Model/index.html b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Model/index.html index 9216a57d..e6488d1e 100644 --- a/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Model/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Model/index.html @@ -1,2 +1,2 @@ -Model (sidekick-bin.Sidekick_smtlib__Process.Solver.Model)

Module Solver.Model

type t
val empty : t
val mem : term -> t -> bool
val find : term -> t -> Value.t option
val eval : t -> term -> Value.t option
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Model (sidekick-bin.Sidekick_smtlib__Process.Solver.Model)

Module Solver.Model

type t
val empty : t
val mem : t -> term -> bool
val find : t -> term -> term option
val eval : t -> term -> term option
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/P/index.html b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/P/index.html new file mode 100644 index 00000000..282d7fe2 --- /dev/null +++ b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/P/index.html @@ -0,0 +1,2 @@ + +P (sidekick-bin.Sidekick_smtlib__Process.Solver.P)

Module Solver.P

type t
val pp : t Sidekick_core.Fmt.printer
val default : t
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Proof/index.html b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Proof/index.html index b1db0cbc..f551777f 100644 --- a/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Proof/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Proof/index.html @@ -1,2 +1,2 @@ -Proof (sidekick-bin.Sidekick_smtlib__Process.Solver.Proof)

Module Solver.Proof

type t
val check : t -> unit
val pp_dot : t Sidekick_core.Fmt.printer
\ No newline at end of file +Proof (sidekick-bin.Sidekick_smtlib__Process.Solver.Proof)

Module Solver.Proof

type t
val check : t -> unit
val pp_dot : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Solver_internal/CC/Actions/index.html b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Solver_internal/CC/Actions/index.html new file mode 100644 index 00000000..ec54717f --- /dev/null +++ b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Solver_internal/CC/Actions/index.html @@ -0,0 +1,2 @@ + +Actions (sidekick-bin.Sidekick_smtlib__Process.Solver.Solver_internal.CC.Actions)

Module CC.Actions

module T = T
module P = P
module Lit = Lit
type t = actions
val raise_conflict : t -> Lit.t list -> P.t -> 'a
val propagate : t -> Lit.t -> reason:(unit -> Lit.t list) -> P.t -> unit
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Solver_internal/CC/Expl/index.html b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Solver_internal/CC/Expl/index.html index 4246f51a..b154aac8 100644 --- a/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Solver_internal/CC/Expl/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Solver_internal/CC/Expl/index.html @@ -1,2 +1,2 @@ -Expl (sidekick-bin.Sidekick_smtlib__Process.Solver.Solver_internal.CC.Expl)

Module CC.Expl

type t
val pp : t Sidekick_core.Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
\ No newline at end of file +Expl (sidekick-bin.Sidekick_smtlib__Process.Solver.Solver_internal.CC.Expl)

Module CC.Expl

type t
val pp : t Sidekick_core.Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
val mk_theory : t -> t
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Solver_internal/CC/N/index.html b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Solver_internal/CC/N/index.html index 4b8bd7b1..a6d553c5 100644 --- a/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Solver_internal/CC/N/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Solver_internal/CC/N/index.html @@ -1,2 +1,2 @@ -N (sidekick-bin.Sidekick_smtlib__Process.Solver.Solver_internal.CC.N)

Module CC.N

An equivalence class is a set of terms that are currently equal in the partial model built by the solver. The class is represented by a collection of nodes, one of which is distinguished and is called the "representative".

All information pertaining to the whole equivalence class is stored in this representative's node.

When two classes become equal (are "merged"), one of the two representatives is picked as the representative of the new class. The new class contains the union of the two old classes' nodes.

We also allow theories to store additional information in the representative. This information can be used when two classes are merged, to detect conflicts and solve equations à la Shostak.

type t
val term : t -> term
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
val is_root : t -> bool

Is the node a root (ie the representative of its class)?

val iter_class : t -> t Iter.t

Traverse the congruence class. Precondition: is_root n (see find below)

val iter_parents : t -> t Iter.t

Traverse the parents of the class. Precondition: is_root n (see find below)

\ No newline at end of file +N (sidekick-bin.Sidekick_smtlib__Process.Solver.Solver_internal.CC.N)

Module CC.N

An equivalence class is a set of terms that are currently equal in the partial model built by the solver. The class is represented by a collection of nodes, one of which is distinguished and is called the "representative".

All information pertaining to the whole equivalence class is stored in this representative's node.

When two classes become equal (are "merged"), one of the two representatives is picked as the representative of the new class. The new class contains the union of the two old classes' nodes.

We also allow theories to store additional information in the representative. This information can be used when two classes are merged, to detect conflicts and solve equations à la Shostak.

type t
val term : t -> term
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
val is_root : t -> bool

Is the node a root (ie the representative of its class)?

val iter_class : t -> t Iter.t

Traverse the congruence class. Precondition: is_root n (see find below)

val iter_parents : t -> t Iter.t

Traverse the parents of the class. Precondition: is_root n (see find below)

type bitfield

A field in the bitfield of this node. This should only be allocated when a theory is initialized.

All fields are initially 0, are backtracked automatically, and are merged automatically when classes are merged.

val get_field : bitfield -> t -> bool
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Solver_internal/CC/index.html b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Solver_internal/CC/index.html index 0c735426..97a28f13 100644 --- a/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Solver_internal/CC/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Solver_internal/CC/index.html @@ -1,2 +1,2 @@ -CC (sidekick-bin.Sidekick_smtlib__Process.Solver.Solver_internal.CC)

Module Solver_internal.CC

module CC_A = CC_A
module A = CC_A.A
type term_state = A.Term.state
type term = A.Term.t
type fun_ = A.Fun.t
type lit = CC_A.Lit.t
type proof = A.Proof.t
type actions = CC_A.Actions.t
type t

Global state of the congruence closure

module N : sig ... end

An equivalence class is a set of terms that are currently equal in the partial model built by the solver. The class is represented by a collection of nodes, one of which is distinguished and is called the "representative".

module Expl : sig ... end
type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t
val term_state : t -> term_state
val find : t -> node -> repr

Current representative

val add_term : t -> term -> node

Add the term to the congruence closure, if not present already. Will be backtracked.

type ev_on_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit
type ev_on_new_term = t -> N.t -> term -> unit
type ev_on_conflict = t -> lit list -> unit
type ev_on_propagate = t -> lit -> (unit -> lit list) -> unit
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_merge:ev_on_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠size:[ `Small | `Big ] -> term_state -> t

Create a new congruence closure.

val on_merge : t -> ev_on_merge -> unit

Add a function to be called when two classes are merged

val on_new_term : t -> ev_on_new_term -> unit

Add a function to be called when a new node is created

val on_conflict : t -> ev_on_conflict -> unit

Called when the congruence closure finds a conflict

val on_propagate : t -> ev_on_propagate -> unit

Called when the congruence closure propagates a literal

val set_as_lit : t -> N.t -> lit -> unit

map the given node to a literal.

val find_t : t -> term -> repr

Current representative of the term.

raises Not_found

if the term is not already add-ed.

val add_seq : t -> term Iter.t -> unit

Add a sequence of terms to the congruence closure

val all_classes : t -> repr Iter.t

All current classes. This is costly, only use if there is no other solution

val assert_lit : t -> lit -> unit

Given a literal, assume it in the congruence closure and propagate its consequences. Will be backtracked.

Useful for the theory combination or the SAT solver's functor

val assert_lits : t -> lit Iter.t -> unit

Addition of many literals

val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given explanation it must be a theory tautology that expl ==> absurd. To be used in theories.

val merge : t -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val check : t -> actions -> unit

Perform all pending operations done via assert_eq, assert_lit, etc. Will use the actions to propagate literals, declare conflicts, etc.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Restore to state n calls to push_level earlier. Used during backtracking.

val get_model : t -> N.t Iter.t Iter.t

get all the equivalence classes so they can be merged in the model

\ No newline at end of file +CC (sidekick-bin.Sidekick_smtlib__Process.Solver.Solver_internal.CC)

Module Solver_internal.CC

module T = T
module P = P
module Lit = Lit
module Actions : Sidekick_core.CC_ACTIONS with module T = T and module Lit = Lit and module P = P and type t = actions
type term_state = T.Term.state
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type proof = P.t
type actions = Actions.t
type t

Global state of the congruence closure

module N : sig ... end

An equivalence class is a set of terms that are currently equal in the partial model built by the solver. The class is represented by a collection of nodes, one of which is distinguished and is called the "representative".

module Expl : sig ... end
type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t
val term_state : t -> term_state
val find : t -> node -> repr

Current representative

val add_term : t -> term -> node

Add the term to the congruence closure, if not present already. Will be backtracked.

val mem_term : t -> term -> bool

Returns true if the term is explicitly present in the congruence closure

type ev_on_pre_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit
type ev_on_post_merge = t -> actions -> N.t -> N.t -> unit
type ev_on_new_term = t -> N.t -> term -> unit
type ev_on_conflict = t -> th:bool -> lit list -> unit
type ev_on_propagate = t -> lit -> (unit -> lit list) -> unit
type ev_on_is_subterm = N.t -> term -> unit
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_pre_merge:ev_on_pre_merge list -> ?⁠on_post_merge:ev_on_post_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠on_is_subterm:ev_on_is_subterm list -> ?⁠size:[ `Small | `Big ] -> term_state -> t

Create a new congruence closure.

val allocate_bitfield : descr:string -> t -> N.bitfield

Allocate a new bitfield for the nodes. See N.bitfield.

val set_bitfield : t -> N.bitfield -> bool -> N.t -> unit

Set the bitfield for the node. This will be backtracked. See N.bitfield.

val on_pre_merge : t -> ev_on_pre_merge -> unit

Add a function to be called when two classes are merged

val on_post_merge : t -> ev_on_post_merge -> unit

Add a function to be called when two classes are merged

val on_new_term : t -> ev_on_new_term -> unit

Add a function to be called when a new node is created

val on_conflict : t -> ev_on_conflict -> unit

Called when the congruence closure finds a conflict

val on_propagate : t -> ev_on_propagate -> unit

Called when the congruence closure propagates a literal

val on_is_subterm : t -> ev_on_is_subterm -> unit

Called on terms that are subterms of function symbols

val set_as_lit : t -> N.t -> lit -> unit

map the given node to a literal.

val find_t : t -> term -> repr

Current representative of the term.

raises Not_found

if the term is not already add-ed.

val add_seq : t -> term Iter.t -> unit

Add a sequence of terms to the congruence closure

val all_classes : t -> repr Iter.t

All current classes. This is costly, only use if there is no other solution

val assert_lit : t -> lit -> unit

Given a literal, assume it in the congruence closure and propagate its consequences. Will be backtracked.

Useful for the theory combination or the SAT solver's functor

val assert_lits : t -> lit Iter.t -> unit

Addition of many literals

val explain_eq : t -> N.t -> N.t -> lit list

Explain why the two nodes are equal. Fails if they are not, in an unspecified way

val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given explanation it must be a theory tautology that expl ==> absurd. To be used in theories.

val n_true : t -> N.t
val n_false : t -> N.t
val n_bool : t -> bool -> N.t
val merge : t -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val merge_t : t -> term -> term -> Expl.t -> unit

Shortcut for adding + merging

val check : t -> actions -> unit

Perform all pending operations done via assert_eq, assert_lit, etc. Will use the actions to propagate literals, declare conflicts, etc.

val new_merges : t -> bool

Called after check, returns true if some pairs of classes were merged.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Restore to state n calls to push_level earlier. Used during backtracking.

val get_model : t -> N.t Iter.t Iter.t

get all the equivalence classes so they can be merged in the model

\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Solver_internal/Lit/index.html b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Solver_internal/Lit/index.html deleted file mode 100644 index 46201d75..00000000 --- a/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Solver_internal/Lit/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Lit (sidekick-bin.Sidekick_smtlib__Process.Solver.Solver_internal.Lit)

Module Solver_internal.Lit

Literals

A literal is a (preprocessed) term along with its sign. It is directly manipulated by the SAT solver.

type t
val term : t -> term
val sign : t -> bool
val neg : t -> t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Solver_internal/Simplify/index.html b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Solver_internal/Simplify/index.html index ecdadfc9..79c260b9 100644 --- a/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Solver_internal/Simplify/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Solver_internal/Simplify/index.html @@ -1,2 +1,2 @@ -Simplify (sidekick-bin.Sidekick_smtlib__Process.Solver.Solver_internal.Simplify)

Module Solver_internal.Simplify

type t
val tst : t -> term_state
val clear : t -> unit

Reset internal cache, etc.

type hook = t -> term -> term option

Given a term, try to simplify it. Return None if it didn't change. Can also add clauses to the simplifier.

val normalize : t -> term -> term

Normalize a term using all the hooks.

\ No newline at end of file +Simplify (sidekick-bin.Sidekick_smtlib__Process.Solver.Solver_internal.Simplify)

Module Solver_internal.Simplify

type t
val tst : t -> term_state
val ty_st : t -> ty_state
val clear : t -> unit

Reset internal cache, etc.

type hook = t -> term -> term option

Given a term, try to simplify it. Return None if it didn't change.

val normalize : t -> term -> term

Normalize a term using all the hooks.

\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Solver_internal/index.html b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Solver_internal/index.html index 1ead67ce..6fdc9a72 100644 --- a/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Solver_internal/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Solver_internal/index.html @@ -1,2 +1,2 @@ -Solver_internal (sidekick-bin.Sidekick_smtlib__Process.Solver.Solver_internal)

Module Solver.Solver_internal

Internal solver, available to theories.

module A = A
module CC_A = CC_A
module CC : Sidekick_core.CC_S with module CC_A = CC_A
type ty = A.Ty.t
type term = A.Term.t
type term_state = A.Term.state
type proof = A.Proof.t
type t

Main type for a solver

type solver = t
module Expl = CC.Expl
module N = CC.N
val tst : t -> term_state
val cc : t -> CC.t

Congruence closure for this solver

module Lit : sig ... end
type lit = Lit.t

Simplifiers

module Simplify : sig ... end
type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit
val simplifier : t -> Simplify.t
val simp_t : t -> term -> term

hooks for the theory

type actions
val propagate : t -> actions -> lit -> reason:(unit -> lit list) -> A.Proof.t -> unit
val raise_conflict : t -> actions -> lit list -> A.Proof.t -> 'a

Give a conflict clause to the solver

val propagate : t -> actions -> lit -> (unit -> lit list) -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> actions -> lit -> lit list -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> actions -> lit list -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : t -> actions -> lit list -> unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> actions -> ?⁠sign:bool -> term -> lit

Create a literal

val add_lit : t -> actions -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value

val add_lit_t : t -> actions -> ?⁠sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> N.t -> N.t

Find representative of the node

val cc_merge : t -> actions -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> actions -> term -> term -> Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> N.t

Add/retrieve congruence closure node for this term. To be used in theories

val on_cc_merge : t -> (CC.t -> actions -> N.t -> N.t -> Expl.t -> unit) -> unit

Callback for when two classes containing data for this key are merged

val on_cc_new_term : t -> (CC.t -> N.t -> term -> unit) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_conflict : t -> (CC.t -> lit list -> unit) -> unit

Callback called on every CC conflict

val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list) -> unit) -> unit

Callback called on every CC propagation

val on_partial_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

type preprocess_hook = t -> mk_lit:(term -> lit) -> add_clause:(lit list -> unit) -> term -> term option

Given a term, try to preprocess it. Return None if it didn't change. Can also add clauses to define new terms.

val add_preprocess : t -> preprocess_hook -> unit
\ No newline at end of file +Solver_internal (sidekick-bin.Sidekick_smtlib__Process.Solver.Solver_internal)

Module Solver.Solver_internal

Internal solver, available to theories.

module T = T
module P = P
type ty = T.Ty.t
type term = T.Term.t
type term_state = T.Term.state
type ty_state = T.Ty.state
type proof = P.t
type t

Main type for a solver

type solver = t
val tst : t -> term_state
val ty_st : t -> ty_state
val stats : t -> Sidekick_util.Stat.t

Actions for the theories

type actions
module Lit = Lit
type lit = Lit.t

Congruence Closure

module CC : Sidekick_core.CC_S with module T = T and module P = P and module Lit = Lit and type Actions.t = actions
val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end
type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit
val simplifier : t -> Simplify.t
val simp_t : t -> term -> term

hooks for the theory

val propagate : t -> actions -> lit -> reason:(unit -> lit list) -> proof -> unit

Propagate a literal for a reason. This is similar to asserting the clause reason => lit, but more lightweight, and in a way that is backtrackable.

val raise_conflict : t -> actions -> lit list -> proof -> 'a

Give a conflict clause to the solver

val push_decision : t -> actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : t -> actions -> lit -> (unit -> lit list) -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> actions -> lit -> lit list -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> actions -> lit list -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : t -> actions -> lit list -> unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> actions -> ?⁠sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val preprocess_term : t -> add_clause:(Lit.t list -> unit) -> term -> term

Preprocess a term.

val add_lit : t -> actions -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value

val add_lit_t : t -> actions -> ?⁠sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit

Callback called on every CC conflict

val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list) -> unit) -> unit

Callback called on every CC propagation

val on_partial_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

type preprocess_hook = t -> mk_lit:(term -> lit) -> add_clause:(lit list -> unit) -> term -> term option

Given a term, try to preprocess it. Return None if it didn't change. Can also add clauses to define new terms.

parameter mk_lit

creates a new literal for a boolean term.

parameter add_clause

pushes a new clause into the SAT solver.

val on_preprocess : t -> preprocess_hook -> unit

Model production

type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option

A model-production hook. It takes the solver, a class, and returns a term for this class.

val on_model_gen : t -> model_hook -> unit
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/T/Fun/index.html b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/T/Fun/index.html new file mode 100644 index 00000000..b7d3c91c --- /dev/null +++ b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/T/Fun/index.html @@ -0,0 +1,2 @@ + +Fun (sidekick-bin.Sidekick_smtlib__Process.Solver.T.Fun)

Module T.Fun

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/T/Term/index.html b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/T/Term/index.html new file mode 100644 index 00000000..0eb34184 --- /dev/null +++ b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/T/Term/index.html @@ -0,0 +1,2 @@ + +Term (sidekick-bin.Sidekick_smtlib__Process.Solver.T.Term)

Module T.Term

type t = Sidekick_base_term.Term.t
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type state = Sidekick_base_term.Term.state
val ty : t -> Ty.t
val bool : state -> bool -> t
val as_bool : t -> bool option
val abs : state -> t -> t * bool
val map_shallow : state -> (t -> t) -> t -> t

Map function on immediate subterms

val iter_dag : t -> (t -> unit) -> unit
module Tbl : CCHashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/T/Ty/index.html b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/T/Ty/index.html new file mode 100644 index 00000000..1cbf4140 --- /dev/null +++ b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/T/Ty/index.html @@ -0,0 +1,2 @@ + +Ty (sidekick-bin.Sidekick_smtlib__Process.Solver.T.Ty)

Module T.Ty

type t = Sidekick_base_term.Ty.t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type state = Sidekick_base_term.Ty.state
val bool : state -> t
val is_bool : t -> bool
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/T/index.html b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/T/index.html new file mode 100644 index 00000000..70ac1f35 --- /dev/null +++ b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/T/index.html @@ -0,0 +1,2 @@ + +T (sidekick-bin.Sidekick_smtlib__Process.Solver.T)

Module Solver.T

module Fun : sig ... end
module Ty : sig ... end with type t = Sidekick_base_term.Ty.t and type state = Sidekick_base_term.Ty.state
module Term : sig ... end with type t = Sidekick_base_term.Term.t and type state = Sidekick_base_term.Term.state
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Unknown/index.html b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Unknown/index.html index d49c3adc..131d191e 100644 --- a/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Unknown/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Unknown/index.html @@ -1,2 +1,2 @@ -Unknown (sidekick-bin.Sidekick_smtlib__Process.Solver.Unknown)

Module Solver.Unknown

type t
val pp : t CCFormat.printer
\ No newline at end of file +Unknown (sidekick-bin.Sidekick_smtlib__Process.Solver.Unknown)

Module Solver.Unknown

type t
val pp : t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Value/index.html b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Value/index.html deleted file mode 100644 index e063d737..00000000 --- a/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Value/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Value (sidekick-bin.Sidekick_smtlib__Process.Solver.Value)

Module Solver.Value

Semantic values

type t
val equal : t -> t -> bool
val hash : t -> int
val ty : t -> ty
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/index.html b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/index.html index 53030695..01ab01b9 100644 --- a/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/index.html @@ -1,2 +1,2 @@ -Solver (sidekick-bin.Sidekick_smtlib__Process.Solver)

Module Sidekick_smtlib__Process.Solver

module CC_A : Sidekick_core.CC_ARG with module A = A
module Solver_internal : Sidekick_core.SOLVER_INTERNAL with module A = A and module CC_A = CC_A

Internal solver, available to theories.

module Lit = Solver_internal.Lit
type t
type solver = t
type term = A.Term.t
type ty = A.Ty.t
type lit = Solver_internal.Lit.t
type lemma = A.Proof.t
module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

val mk_theory : name:string -> create_and_setup:(Solver_internal.t -> 'th) -> ?⁠push_level:('th -> unit) -> ?⁠pop_levels:('th -> int -> unit) -> unit -> theory

Helper to create a theory

module Atom : sig ... end
module Value : sig ... end
module Model : sig ... end
module Unknown : sig ... end
module Proof : sig ... end
type proof = Proof.t

Main API

val stats : t -> Sidekick_util.Stat.t
val tst : t -> A.Term.state
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠size:[ `Big | `Tiny | `Small ] -> ?⁠store_proof:bool -> theories:theory list -> A.Term.state -> unit -> t

Create a new solver.

parameter theories

theories to load from the start.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val mk_atom_lit : t -> lit -> Atom.t
val mk_atom_t : t -> ?⁠sign:bool -> term -> Atom.t
val add_clause : t -> Atom.t Sidekick_util.IArray.t -> unit
val add_clause_l : t -> Atom.t list -> unit
type res =
| Sat of Model.t
| Unsat of {
proof : proof option;
unsat_core : Atom.t list lazy_t;
}
| Unknown of Unknown.t

Result of solving for the current set of clauses

val solve : ?⁠on_exit:(unit -> unit) list -> ?⁠check:bool -> assumptions:Atom.t list -> t -> res

solve s checks the satisfiability of the statement added so far to s

parameter check

if true, the model is checked before returning

parameter assumptions

a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

parameter on_exit

functions to be run before this returns

val pp_term_graph : t CCFormat.printer
val pp_stats : t CCFormat.printer
\ No newline at end of file +Solver (sidekick-bin.Sidekick_smtlib__Process.Solver)

Module Sidekick_smtlib__Process.Solver

module Lit : Sidekick_core.LIT with module T = T
module Solver_internal : Sidekick_core.SOLVER_INTERNAL with module T = T and module P = P and module Lit = Lit

Internal solver, available to theories.

type t
type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t
type lemma = P.t
module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

type 'a theory_p = (module THEORY with type t = 'a)

A theory that can be used for this particular solver, with state of type 'a.

val mk_theory : name:string -> create_and_setup:(Solver_internal.t -> 'th) -> ?⁠push_level:('th -> unit) -> ?⁠pop_levels:('th -> int -> unit) -> unit -> theory

Helper to create a theory

module Atom : sig ... end
module Model : sig ... end
module Unknown : sig ... end
module Proof : sig ... end
type proof = Proof.t

Main API

val stats : t -> Sidekick_util.Stat.t
val tst : t -> T.Term.state
val ty_st : t -> T.Ty.state
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠size:[ `Big | `Tiny | `Small ] -> ?⁠store_proof:bool -> theories:theory list -> T.Term.state -> T.Ty.state -> unit -> t

Create a new solver.

parameter theories

theories to load from the start.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val add_theory_p : t -> 'a theory_p -> 'a

Add the given theory and obtain its state

val add_theory_l : t -> theory list -> unit
val mk_atom_lit : t -> lit -> Atom.t
val mk_atom_t : t -> ?⁠sign:bool -> term -> Atom.t
val add_clause : t -> Atom.t Sidekick_util.IArray.t -> unit
val add_clause_l : t -> Atom.t list -> unit
type res =
| Sat of Model.t
| Unsat of {
proof : proof option lazy_t;
unsat_core : Atom.t list lazy_t;
}
| Unknown of Unknown.t

Result of solving for the current set of clauses

val solve : ?⁠on_exit:(unit -> unit) list -> ?⁠check:bool -> ?⁠on_progress:(t -> unit) -> assumptions:Atom.t list -> t -> res

solve s checks the satisfiability of the statement added so far to s

parameter check

if true, the model is checked before returning

parameter assumptions

a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

parameter on_exit

functions to be run before this returns

val pp_stats : t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/module-type-THEORY/index.html b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/module-type-THEORY/index.html index 20611f7a..2be6b52e 100644 --- a/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/module-type-THEORY/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/module-type-THEORY/index.html @@ -1,2 +1,2 @@ -THEORY (sidekick-bin.Sidekick_smtlib__Process.Solver.THEORY)

Module type Solver.THEORY

A theory

Theories are abstracted over the concrete implementation of the solver, so they can work with any implementation.

Typically a theory should be a functor taking an argument containing a SOLVER_INTERNAL and some additional views on terms, literals, etc. that are specific to the theory (e.g. to map terms to linear expressions). The theory can then be instantiated on any kind of solver for any term representation that also satisfies the additional theory-specific requirements. Instantiated theories (ie values of type Sidekick_core.SOLVER.theory) can be added to the solver.

type t

The theory's state

val name : string

Name of the theory

val create_and_setup : Solver_internal.t -> t

Instantiate the theory's state for the given (internal) solver, register callbacks, create keys, etc.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Pop backtracking levels, restoring the theory to its former state

\ No newline at end of file +THEORY (sidekick-bin.Sidekick_smtlib__Process.Solver.THEORY)

Module type Solver.THEORY

A theory

Theories are abstracted over the concrete implementation of the solver, so they can work with any implementation.

Typically a theory should be a functor taking an argument containing a SOLVER_INTERNAL or even a full SOLVER, and some additional views on terms, literals, etc. that are specific to the theory (e.g. to map terms to linear expressions). The theory can then be instantiated on any kind of solver for any term representation that also satisfies the additional theory-specific requirements. Instantiated theories (ie values of type Sidekick_core.SOLVER.theory) can be added to the solver.

type t

The theory's state

val name : string

Name of the theory

val create_and_setup : Solver_internal.t -> t

Instantiate the theory's state for the given (internal) solver, register callbacks, create keys, etc.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Pop backtracking levels, restoring the theory to its former state

\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__Process/index.html b/dev/sidekick-bin/Sidekick_smtlib__Process/index.html index 648bc0b8..dee2293f 100644 --- a/dev/sidekick-bin/Sidekick_smtlib__Process/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib__Process/index.html @@ -1,2 +1,2 @@ -Sidekick_smtlib__Process (sidekick-bin.Sidekick_smtlib__Process)

Module Sidekick_smtlib__Process

Process Statements

val th_bool : Solver.theory
type 'a or_error = ('a, string) CCResult.t
val conv_ty : Sidekick_smtlib.Ast.Ty.t -> Sidekick_base_term.Ty.t
val conv_term : Sidekick_base_term.Term.state -> Sidekick_smtlib.Ast.term -> Sidekick_base_term.Term.t
module Check_cc : sig ... end
val process_stmt : ?⁠hyps:Solver.Atom.t list Sidekick_util.Vec.t -> ?⁠gc:bool -> ?⁠restarts:bool -> ?⁠pp_cnf:bool -> ?⁠dot_proof:string -> ?⁠pp_model:bool -> ?⁠check:bool -> ?⁠time:float -> ?⁠memory:float -> ?⁠progress:bool -> Solver.t -> Sidekick_smtlib.Ast.statement -> unit or_error
\ No newline at end of file +Sidekick_smtlib__Process (sidekick-bin.Sidekick_smtlib__Process)

Module Sidekick_smtlib__Process

Process Statements

val th_bool : Solver.theory
val th_data : Solver.theory
val th_lra : Solver.theory
type 'a or_error = ('a, string) CCResult.t
module Check_cc : sig ... end
val process_stmt : ?⁠hyps:Solver.Atom.t list Sidekick_util.Vec.t -> ?⁠gc:bool -> ?⁠restarts:bool -> ?⁠pp_cnf:bool -> ?⁠dot_proof:string -> ?⁠pp_model:bool -> ?⁠check:bool -> ?⁠time:float -> ?⁠memory:float -> ?⁠progress:bool -> Solver.t -> Sidekick_base_term.Statement.t -> unit or_error
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__Typecheck/Ctx/index.html b/dev/sidekick-bin/Sidekick_smtlib__Typecheck/Ctx/index.html index cac2b6fd..46d9067d 100644 --- a/dev/sidekick-bin/Sidekick_smtlib__Typecheck/Ctx/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib__Typecheck/Ctx/index.html @@ -1,2 +1,2 @@ -Ctx (sidekick-bin.Sidekick_smtlib__Typecheck.Ctx)

Module Sidekick_smtlib__Typecheck.Ctx

type t
val create : unit -> t
val pp : t CCFormat.printer
\ No newline at end of file +Ctx (sidekick-bin.Sidekick_smtlib__Typecheck.Ctx)

Module Sidekick_smtlib__Typecheck.Ctx

type t
val create : T.state -> t
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__Typecheck/index.html b/dev/sidekick-bin/Sidekick_smtlib__Typecheck/index.html index 0fb35d4b..6dc919c0 100644 --- a/dev/sidekick-bin/Sidekick_smtlib__Typecheck/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib__Typecheck/index.html @@ -1,2 +1,2 @@ -Sidekick_smtlib__Typecheck (sidekick-bin.Sidekick_smtlib__Typecheck)

Module Sidekick_smtlib__Typecheck

Preprocessing AST

type 'a or_error = ('a, string) CCResult.t

Parsing and Typing

module Ctx : sig ... end
val conv_term : Ctx.t -> PA.term -> A.term
val conv_statement : Ctx.t -> PA.statement -> A.statement list
\ No newline at end of file +Sidekick_smtlib__Typecheck (sidekick-bin.Sidekick_smtlib__Typecheck)

Module Sidekick_smtlib__Typecheck

Preprocessing AST

module Loc = Smtlib_utils.V_2_6.Loc
module PA = Smtlib_utils.V_2_6.Ast
type 'a or_error = ('a, string) CCResult.t

Parsing and Typing

module Ctx : sig ... end
val conv_term : Ctx.t -> PA.term -> T.t
val conv_statement : Ctx.t -> PA.statement -> Stmt.t list
\ No newline at end of file diff --git a/dev/sidekick-bin/index.html b/dev/sidekick-bin/index.html index 3f11fc5d..e55fc287 100644 --- a/dev/sidekick-bin/index.html +++ b/dev/sidekick-bin/index.html @@ -1,2 +1,2 @@ -index (sidekick-bin.index)

sidekick-bin index

Library sidekick-bin.smtlib

The entry point of this library is the module: Sidekick_smtlib.

\ No newline at end of file +index (sidekick-bin.index)

sidekick-bin index

Library sidekick-bin.smtlib

The entry point of this library is the module: Sidekick_smtlib.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_base_term/Arg/Fun/index.html b/dev/sidekick/Sidekick_base_term/Arg/Fun/index.html deleted file mode 100644 index 0c835d9b..00000000 --- a/dev/sidekick/Sidekick_base_term/Arg/Fun/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Fun (sidekick.Sidekick_base_term.Arg.Fun)

Module Arg.Fun

type t = Fun.t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_base_term/Arg/Term/index.html b/dev/sidekick/Sidekick_base_term/Arg/Term/index.html deleted file mode 100644 index 45b11af7..00000000 --- a/dev/sidekick/Sidekick_base_term/Arg/Term/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Term (sidekick.Sidekick_base_term.Arg.Term)

Module Arg.Term

type t = Term.t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type state
val ty : t -> Ty.t
val bool : state -> bool -> t
val as_bool : t -> bool option
val abs : state -> t -> t * bool
val map_shallow : state -> (t -> t) -> t -> t

Map function on immediate subterms

val iter_dag : t -> (t -> unit) -> unit
module Tbl : CCHashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_base_term/Arg/Ty/index.html b/dev/sidekick/Sidekick_base_term/Arg/Ty/index.html deleted file mode 100644 index d1078f5c..00000000 --- a/dev/sidekick/Sidekick_base_term/Arg/Ty/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Ty (sidekick.Sidekick_base_term.Arg.Ty)

Module Arg.Ty

type t = Ty.t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
val bool : t
val is_bool : t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_base_term/Arg/index.html b/dev/sidekick/Sidekick_base_term/Arg/index.html deleted file mode 100644 index d000e074..00000000 --- a/dev/sidekick/Sidekick_base_term/Arg/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Arg (sidekick.Sidekick_base_term.Arg)

Module Sidekick_base_term.Arg

module Fun : sig ... end with type t = Fun.t
module Ty : sig ... end with type t = Ty.t
module Term : sig ... end with type t = Term.t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_base_term/Base_types/Fun/index.html b/dev/sidekick/Sidekick_base_term/Base_types/Fun/index.html deleted file mode 100644 index b03d7133..00000000 --- a/dev/sidekick/Sidekick_base_term/Base_types/Fun/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Fun (sidekick.Sidekick_base_term.Base_types.Fun)

Module Base_types.Fun

type view = fun_view
type t = fun_
val id : t -> ID.t
val view : t -> view
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val as_undefined : t -> (t * Ty.Fun.t) option
val as_undefined_exn : t -> t * Ty.Fun.t
val is_undefined : t -> bool
val do_cc : t -> bool
val mk_undef : ID.t -> Ty.Fun.t -> t
val mk_undef_const : ID.t -> Ty.t -> t
val pp : t CCFormat.printer
module Map : CCMap.S with type Map.key = t
module Tbl : CCHashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_base_term/Base_types/Proof/index.html b/dev/sidekick/Sidekick_base_term/Base_types/Proof/index.html deleted file mode 100644 index 7688db0c..00000000 --- a/dev/sidekick/Sidekick_base_term/Base_types/Proof/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Proof (sidekick.Sidekick_base_term.Base_types.Proof)

Module Base_types.Proof

type t =
| Default
val default : t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_base_term/Base_types/Term/Iter_dag/index.html b/dev/sidekick/Sidekick_base_term/Base_types/Term/Iter_dag/index.html deleted file mode 100644 index bfc46cc6..00000000 --- a/dev/sidekick/Sidekick_base_term/Base_types/Term/Iter_dag/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Iter_dag (sidekick.Sidekick_base_term.Base_types.Term.Iter_dag)

Module Term.Iter_dag

type t
val create : unit -> t
val iter_dag : t -> term -> term Iter.t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_base_term/Base_types/Term/index.html b/dev/sidekick/Sidekick_base_term/Base_types/Term/index.html deleted file mode 100644 index f1e78f59..00000000 --- a/dev/sidekick/Sidekick_base_term/Base_types/Term/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Term (sidekick.Sidekick_base_term.Base_types.Term)

Module Base_types.Term

type t = term = {
mutable term_id : int;
mutable term_ty : ty;
term_view : t term_view;
}
type 'a view = 'a term_view =
| Bool of bool
| App_fun of fun_ * 'a Sidekick_util.IArray.t
| Eq of 'a * 'a
| Not of 'a
val id : t -> int
val view : t -> term view
val ty : t -> Ty.t
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
type state
val create : ?⁠size:int -> unit -> state
val make : state -> t view -> t
val true_ : state -> t
val false_ : state -> t
val bool : state -> bool -> t
val const : state -> fun_ -> t
val app_fun : state -> fun_ -> t Sidekick_util.IArray.t -> t
val eq : state -> t -> t -> t
val not_ : state -> t -> t
val abs : state -> t -> t * bool

Obtain unsigned version of t, + the sign as a boolean

module Iter_dag : sig ... end
val iter_dag : t -> t Iter.t
val map_shallow : state -> (t -> t) -> t -> t
val pp : t Fmt.printer
Views
val is_true : t -> bool
val is_false : t -> bool
val is_const : t -> bool
val cc_view : t -> (fun_tt Iter.t) CC_view.t
val as_fun_undef : t -> (fun_ * Ty.Fun.t) option
val as_bool : t -> bool option
Containers
module Tbl : CCHashtbl.S with type Tbl.key = t
module Map : CCMap.S with type Map.key = t
module Set : CCSet.S with type Set.elt = t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_base_term/Base_types/Term_cell/Make_eq/argument-1-X/index.html b/dev/sidekick/Sidekick_base_term/Base_types/Term_cell/Make_eq/argument-1-X/index.html deleted file mode 100644 index 1664f328..00000000 --- a/dev/sidekick/Sidekick_base_term/Base_types/Term_cell/Make_eq/argument-1-X/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -1-X (sidekick.Sidekick_base_term.Base_types.Term_cell.Make_eq.1-X)

Parameter Make_eq.1-X

type t
val hash : t -> int
val equal : t -> t -> bool
val pp : t Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_base_term/Base_types/Term_cell/Make_eq/index.html b/dev/sidekick/Sidekick_base_term/Base_types/Term_cell/Make_eq/index.html deleted file mode 100644 index 4eee00ca..00000000 --- a/dev/sidekick/Sidekick_base_term/Base_types/Term_cell/Make_eq/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Make_eq (sidekick.Sidekick_base_term.Base_types.Term_cell.Make_eq)

Module Term_cell.Make_eq

Parameters

Signature

val equal : X.t view -> X.t view -> bool
val hash : X.t view -> int
val pp : X.t view Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_base_term/Base_types/Term_cell/index.html b/dev/sidekick/Sidekick_base_term/Base_types/Term_cell/index.html deleted file mode 100644 index a39eaccf..00000000 --- a/dev/sidekick/Sidekick_base_term/Base_types/Term_cell/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Term_cell (sidekick.Sidekick_base_term.Base_types.Term_cell)

Module Base_types.Term_cell

type 'a view = 'a term_view =
| Bool of bool
| App_fun of fun_ * 'a Sidekick_util.IArray.t
| Eq of 'a * 'a
| Not of 'a
type t = term view
val equal : t -> t -> bool
val hash : t -> int
val true_ : t
val false_ : t
val const : fun_ -> t
val app_fun : fun_ -> term Sidekick_util.IArray.t -> t
val eq : term -> term -> t
val not_ : term -> t
val ty : t -> Ty.t

Compute the type of this term cell. Not totally free

val pp : t Fmt.printer
val map : ('a -> 'b) -> 'a view -> 'b view
val iter : ('a -> unit) -> 'a view -> unit
module type ARG = sig ... end
module Make_eq : functor (X : ARG) -> sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_base_term/Base_types/Term_cell/module-type-ARG/index.html b/dev/sidekick/Sidekick_base_term/Base_types/Term_cell/module-type-ARG/index.html deleted file mode 100644 index 097cc382..00000000 --- a/dev/sidekick/Sidekick_base_term/Base_types/Term_cell/module-type-ARG/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -ARG (sidekick.Sidekick_base_term.Base_types.Term_cell.ARG)

Module type Term_cell.ARG

type t
val hash : t -> int
val equal : t -> t -> bool
val pp : t Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_base_term/Base_types/Ty/Fun/index.html b/dev/sidekick/Sidekick_base_term/Base_types/Ty/Fun/index.html deleted file mode 100644 index 0dabc995..00000000 --- a/dev/sidekick/Sidekick_base_term/Base_types/Ty/Fun/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Fun (sidekick.Sidekick_base_term.Base_types.Ty.Fun)

Module Ty.Fun

type t = fun_ty
val args : t -> ty list
val ret : t -> ty
val arity : t -> int
val unfold : t -> ty list * ty
val mk : ty list -> ty -> t
val pp : t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_base_term/Base_types/Ty/index.html b/dev/sidekick/Sidekick_base_term/Base_types/Ty/index.html deleted file mode 100644 index 2e06ed8f..00000000 --- a/dev/sidekick/Sidekick_base_term/Base_types/Ty/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Ty (sidekick.Sidekick_base_term.Base_types.Ty)

Module Base_types.Ty

type t = ty
type view = ty_view
type def = ty_def
val id : t -> int
val view : t -> view
val bool : t
val atomic : def -> t list -> t
val atomic_uninterpreted : ID.t -> t
val card : t -> ty_card
val is_bool : t -> bool
val is_uninterpreted : t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val pp : t CCFormat.printer
module Tbl : CCHashtbl.S with type Tbl.key = t
module Fun : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_base_term/Base_types/Ty_card/index.html b/dev/sidekick/Sidekick_base_term/Base_types/Ty_card/index.html deleted file mode 100644 index 61164891..00000000 --- a/dev/sidekick/Sidekick_base_term/Base_types/Ty_card/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Ty_card (sidekick.Sidekick_base_term.Base_types.Ty_card)

Module Base_types.Ty_card

type t = ty_card =
| Finite
| Infinite
val (+) : t -> t -> t
val (*) : t -> t -> t
val (^) : t -> t -> t
val finite : t
val infinite : t
val sum : t list -> t
val product : t list -> t
val equal : t -> t -> bool
val compare : t -> t -> int
val pp : t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_base_term/Base_types/Value/index.html b/dev/sidekick/Sidekick_base_term/Base_types/Value/index.html deleted file mode 100644 index f0ead8b5..00000000 --- a/dev/sidekick/Sidekick_base_term/Base_types/Value/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Value (sidekick.Sidekick_base_term.Base_types.Value)

Module Base_types.Value

type t = value =
| V_bool of bool
| V_element of {
id : ID.t;
ty : ty;
}
| V_custom of {
view : value_custom_view;
pp : value_custom_view Fmt.printer;
eq : value_custom_view -> value_custom_view -> bool;
hash : value_custom_view -> int;
}
val true_ : t
val false_ : t
val bool : bool -> t
val mk_elt : ID.t -> Ty.t -> t
val is_bool : t -> bool
val is_true : t -> bool
val is_false : t -> bool
val fresh : Term.t -> t
val hash : t -> int
val equal : t -> t -> bool
val pp : t Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_base_term/Base_types/index.html b/dev/sidekick/Sidekick_base_term/Base_types/index.html deleted file mode 100644 index 2b2bc743..00000000 --- a/dev/sidekick/Sidekick_base_term/Base_types/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Base_types (sidekick.Sidekick_base_term.Base_types)

Module Sidekick_base_term.Base_types

module Vec = Msat.Vec
module Log = Msat.Log
module Fmt = CCFormat
module CC_view = Sidekick_core.CC_view
type term = {
mutable term_id : int;
mutable term_ty : ty;
term_view : term term_view;
}
and 'a term_view =
| Bool of bool
| App_fun of fun_ * 'a Sidekick_util.IArray.t
| Eq of 'a * 'a
| Not of 'a
and fun_ = {
fun_id : ID.t;
fun_view : fun_view;
}
and fun_view =
| Fun_undef of fun_ty
| Fun_def of {
pp : a. ('a Fmt.printer -> 'a Sidekick_util.IArray.t Fmt.printer) option;
abs : self:term -> term Sidekick_util.IArray.t -> term * bool;
do_cc : bool;
relevant : a. ID.t -> 'a Sidekick_util.IArray.t -> int -> bool;
ty : ID.t -> term Sidekick_util.IArray.t -> ty;
eval : value Sidekick_util.IArray.t -> value;
}

Methods on the custom term view whose arguments are 'a. Terms must be printable, and provide some additional theory handles.

  • relevant must return a subset of args (possibly the same set). The terms it returns will be activated and evaluated whenever possible. Terms in args \ relevant args are considered for congruence but not for evaluation.
and fun_ty = {
fun_ty_args : ty list;
fun_ty_ret : ty;
}

Function type

and ty = {
mutable ty_id : int;
ty_view : ty_view;
}

Hashconsed type

and ty_view =
| Ty_bool
| Ty_atomic of {
def : ty_def;
args : ty list;
card : ty_card lazy_t;
}
and ty_def =
| Ty_uninterpreted of ID.t
| Ty_def of {
id : ID.t;
pp : ty Fmt.printer -> ty list Fmt.printer;
default_val : value list -> value;
card : ty list -> ty_card;
}
and ty_card =
| Finite
| Infinite
and value =
| V_bool of bool
| V_element of {
id : ID.t;
ty : ty;
}

a named constant, distinct from any other constant

| V_custom of {
view : value_custom_view;
pp : value_custom_view Fmt.printer;
eq : value_custom_view -> value_custom_view -> bool;
hash : value_custom_view -> int;
}

Custom value

Semantic values, used for models (and possibly model-constructing calculi)

and value_custom_view = ..
val term_equal_ : term -> term -> bool
val term_hash_ : term -> int
val term_cmp_ : term -> term -> int
val fun_compare : fun_ -> fun_ -> int
val pp_fun : CCFormat.t -> fun_ -> unit
val id_of_fun : fun_ -> ID.t
val eq_ty : ty -> ty -> bool
val eq_value : value -> value -> bool
val hash_value : value -> int
val pp_value : Fmt.t -> value -> unit
val pp_db : Format.formatter -> (int * 'a) -> unit
val pp_ty : ty Sidekick_util.Util.printer
val pp_term_view_gen : pp_id:(Fmt.t -> ID.t -> unit) -> pp_t:'a Fmt.printer -> Fmt.t -> 'a term_view -> unit
val pp_term_top : ids:bool -> Fmt.t -> term -> unit
val pp_term : Fmt.t -> term -> unit
val pp_term_view : Fmt.t -> term term_view -> unit
module Ty_card : sig ... end
module Ty : sig ... end
module Fun : sig ... end
module Term_cell : sig ... end
module Term : sig ... end
module Value : sig ... end
module Proof : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_base_term/ID/B/index.html b/dev/sidekick/Sidekick_base_term/ID/B/index.html deleted file mode 100644 index 6dcb0c73..00000000 --- a/dev/sidekick/Sidekick_base_term/ID/B/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -B (sidekick.Sidekick_base_term.ID.B)

Module ID.B

val rat : t
val int : t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_base_term/ID/index.html b/dev/sidekick/Sidekick_base_term/ID/index.html deleted file mode 100644 index 498645ce..00000000 --- a/dev/sidekick/Sidekick_base_term/ID/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -ID (sidekick.Sidekick_base_term.ID)

Module Sidekick_base_term.ID

Unique Identifiers

type t
val make : string -> t
val makef : ('a, Format.formatter, unit, t) Pervasives.format4 -> 'a
val copy : t -> t
val id : t -> int
val to_string : t -> string
val to_string_full : t -> string
include Sidekick_util.Intf.EQ with type t := t
type t
val equal : t -> t -> bool
include Sidekick_util.Intf.ORD with type t := t
type t
val compare : t -> t -> int
include Sidekick_util.Intf.HASH with type t := t
type t
val hash : t -> int
include Sidekick_util.Intf.PRINT with type t := t
type t
val pp : t CCFormat.printer
val pp_name : t CCFormat.printer
module Map : CCMap.S with type Map.key = t
module Set : CCSet.S with type Set.elt = t
module Tbl : CCHashtbl.S with type Tbl.key = t
module B : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_base_term/Model/Fun_interpretation/index.html b/dev/sidekick/Sidekick_base_term/Model/Fun_interpretation/index.html deleted file mode 100644 index 30e33844..00000000 --- a/dev/sidekick/Sidekick_base_term/Model/Fun_interpretation/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Fun_interpretation (sidekick.Sidekick_base_term.Model.Fun_interpretation)

Module Model.Fun_interpretation

type t = {
cases : Base_types.Value.t Val_map.t;
default : Base_types.Value.t;
}
val default : t -> Base_types.Value.t
val cases_list : t -> (Base_types.Value.t list * Base_types.Value.t) list
val make : default:Base_types.Value.t -> (Base_types.Value.t list * Base_types.Value.t) list -> t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_base_term/Model/Val_map/index.html b/dev/sidekick/Sidekick_base_term/Model/Val_map/index.html deleted file mode 100644 index 0e55f9d7..00000000 --- a/dev/sidekick/Sidekick_base_term/Model/Val_map/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Val_map (sidekick.Sidekick_base_term.Model.Val_map)

Module Model.Val_map

type key = Base_types.Value.t list
type 'a t
val empty : 'a t
val is_empty : _ t -> bool
val cardinal : _ t -> int
val find : key -> 'a t -> 'a option
val add : key -> 'a -> 'a t -> 'a t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_base_term/Model/index.html b/dev/sidekick/Sidekick_base_term/Model/index.html deleted file mode 100644 index a2d4f39e..00000000 --- a/dev/sidekick/Sidekick_base_term/Model/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Model (sidekick.Sidekick_base_term.Model)

Module Sidekick_base_term.Model

Model

module Val_map : sig ... end
module Fun_interpretation : sig ... end
type t = {
values : Base_types.Value.t Sidekick_base_term__.Base_types.Term.Map.t;
funs : Fun_interpretation.t Sidekick_base_term__.Base_types.Fun.Map.t;
}
val empty : t
val add : Base_types.Term.t -> Base_types.Value.t -> t -> t
val mem : Base_types.Term.t -> t -> bool
val find : Base_types.Term.t -> t -> Base_types.Value.t option
val merge : t -> t -> t
val pp : t CCFormat.printer
val eval : t -> Base_types.Term.t -> Base_types.Value.t option
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_base_term/index.html b/dev/sidekick/Sidekick_base_term/index.html deleted file mode 100644 index 69836082..00000000 --- a/dev/sidekick/Sidekick_base_term/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Sidekick_base_term (sidekick.Sidekick_base_term)

Module Sidekick_base_term

module Base_types : sig ... end
module ID : sig ... end
module Ty_card = Base_types.Ty_card
module Fun = Base_types.Fun
module Stat = Sidekick_util.Stat
module Model : sig ... end
module Term = Base_types.Term
module Value = Base_types.Value
module Term_cell = Base_types.Term_cell
module Ty = Base_types.Ty
module Arg : Sidekick_core.TERM with type Term.t = Term.t and type Fun.t = Fun.t and type Ty.t = Ty.t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_base_term__/Base_types/Fun/index.html b/dev/sidekick/Sidekick_base_term__/Base_types/Fun/index.html deleted file mode 100644 index f9a9bdbd..00000000 --- a/dev/sidekick/Sidekick_base_term__/Base_types/Fun/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Fun (sidekick.Sidekick_base_term__.Base_types.Fun)

Module Base_types.Fun

type view = fun_view
type t = fun_
val id : t -> Sidekick_base_term.ID.t
val view : t -> view
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val as_undefined : t -> (t * Ty.Fun.t) option
val as_undefined_exn : t -> t * Ty.Fun.t
val is_undefined : t -> bool
val do_cc : t -> bool
val mk_undef : Sidekick_base_term.ID.t -> Ty.Fun.t -> t
val mk_undef_const : Sidekick_base_term.ID.t -> Ty.t -> t
val pp : t CCFormat.printer
module Map : CCMap.S with type Map.key = t
module Tbl : CCHashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_base_term__/Base_types/Proof/index.html b/dev/sidekick/Sidekick_base_term__/Base_types/Proof/index.html deleted file mode 100644 index 6c77505a..00000000 --- a/dev/sidekick/Sidekick_base_term__/Base_types/Proof/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Proof (sidekick.Sidekick_base_term__.Base_types.Proof)

Module Base_types.Proof

type t =
| Default
val default : t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_base_term__/Base_types/Term/Iter_dag/index.html b/dev/sidekick/Sidekick_base_term__/Base_types/Term/Iter_dag/index.html deleted file mode 100644 index 9b13ea06..00000000 --- a/dev/sidekick/Sidekick_base_term__/Base_types/Term/Iter_dag/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Iter_dag (sidekick.Sidekick_base_term__.Base_types.Term.Iter_dag)

Module Term.Iter_dag

type t
val create : unit -> t
val iter_dag : t -> term -> term Iter.t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_base_term__/Base_types/Term/index.html b/dev/sidekick/Sidekick_base_term__/Base_types/Term/index.html deleted file mode 100644 index 273a3461..00000000 --- a/dev/sidekick/Sidekick_base_term__/Base_types/Term/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Term (sidekick.Sidekick_base_term__.Base_types.Term)

Module Base_types.Term

type t = term = {
mutable term_id : int;
mutable term_ty : ty;
term_view : t term_view;
}
type 'a view = 'a term_view =
| Bool of bool
| App_fun of fun_ * 'a Sidekick_util.IArray.t
| Eq of 'a * 'a
| Not of 'a
val id : t -> int
val view : t -> term view
val ty : t -> Ty.t
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
type state
val create : ?⁠size:int -> unit -> state
val make : state -> t view -> t
val true_ : state -> t
val false_ : state -> t
val bool : state -> bool -> t
val const : state -> fun_ -> t
val app_fun : state -> fun_ -> t Sidekick_util.IArray.t -> t
val eq : state -> t -> t -> t
val not_ : state -> t -> t
val abs : state -> t -> t * bool

Obtain unsigned version of t, + the sign as a boolean

module Iter_dag : sig ... end
val iter_dag : t -> t Iter.t
val map_shallow : state -> (t -> t) -> t -> t
val pp : t Fmt.printer
Views
val is_true : t -> bool
val is_false : t -> bool
val is_const : t -> bool
val cc_view : t -> (fun_tt Iter.t) CC_view.t
val as_fun_undef : t -> (fun_ * Ty.Fun.t) option
val as_bool : t -> bool option
Containers
module Tbl : CCHashtbl.S with type Tbl.key = t
module Map : CCMap.S with type Map.key = t
module Set : CCSet.S with type Set.elt = t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_base_term__/Base_types/Term_cell/Make_eq/index.html b/dev/sidekick/Sidekick_base_term__/Base_types/Term_cell/Make_eq/index.html deleted file mode 100644 index c04b747a..00000000 --- a/dev/sidekick/Sidekick_base_term__/Base_types/Term_cell/Make_eq/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Make_eq (sidekick.Sidekick_base_term__.Base_types.Term_cell.Make_eq)

Module Term_cell.Make_eq

Parameters

Signature

val equal : X.t view -> X.t view -> bool
val hash : X.t view -> int
val pp : X.t view Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_base_term__/Base_types/Term_cell/index.html b/dev/sidekick/Sidekick_base_term__/Base_types/Term_cell/index.html deleted file mode 100644 index 48e22408..00000000 --- a/dev/sidekick/Sidekick_base_term__/Base_types/Term_cell/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Term_cell (sidekick.Sidekick_base_term__.Base_types.Term_cell)

Module Base_types.Term_cell

type 'a view = 'a term_view =
| Bool of bool
| App_fun of fun_ * 'a Sidekick_util.IArray.t
| Eq of 'a * 'a
| Not of 'a
type t = term view
val equal : t -> t -> bool
val hash : t -> int
val true_ : t
val false_ : t
val const : fun_ -> t
val app_fun : fun_ -> term Sidekick_util.IArray.t -> t
val eq : term -> term -> t
val not_ : term -> t
val ty : t -> Ty.t

Compute the type of this term cell. Not totally free

val pp : t Fmt.printer
val map : ('a -> 'b) -> 'a view -> 'b view
val iter : ('a -> unit) -> 'a view -> unit
module type ARG = sig ... end
module Make_eq : functor (X : ARG) -> sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_base_term__/Base_types/Term_cell/module-type-ARG/index.html b/dev/sidekick/Sidekick_base_term__/Base_types/Term_cell/module-type-ARG/index.html deleted file mode 100644 index e7b8e3d2..00000000 --- a/dev/sidekick/Sidekick_base_term__/Base_types/Term_cell/module-type-ARG/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -ARG (sidekick.Sidekick_base_term__.Base_types.Term_cell.ARG)

Module type Term_cell.ARG

type t
val hash : t -> int
val equal : t -> t -> bool
val pp : t Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_base_term__/Base_types/Ty/Fun/index.html b/dev/sidekick/Sidekick_base_term__/Base_types/Ty/Fun/index.html deleted file mode 100644 index 0d5482aa..00000000 --- a/dev/sidekick/Sidekick_base_term__/Base_types/Ty/Fun/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Fun (sidekick.Sidekick_base_term__.Base_types.Ty.Fun)

Module Ty.Fun

type t = fun_ty
val args : t -> ty list
val ret : t -> ty
val arity : t -> int
val unfold : t -> ty list * ty
val mk : ty list -> ty -> t
val pp : t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_base_term__/Base_types/Ty/index.html b/dev/sidekick/Sidekick_base_term__/Base_types/Ty/index.html deleted file mode 100644 index 761c13bf..00000000 --- a/dev/sidekick/Sidekick_base_term__/Base_types/Ty/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Ty (sidekick.Sidekick_base_term__.Base_types.Ty)

Module Base_types.Ty

type t = ty
type view = ty_view
type def = ty_def
val id : t -> int
val view : t -> view
val bool : t
val atomic : def -> t list -> t
val atomic_uninterpreted : Sidekick_base_term.ID.t -> t
val card : t -> ty_card
val is_bool : t -> bool
val is_uninterpreted : t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val pp : t CCFormat.printer
module Tbl : CCHashtbl.S with type Tbl.key = t
module Fun : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_base_term__/Base_types/Ty_card/index.html b/dev/sidekick/Sidekick_base_term__/Base_types/Ty_card/index.html deleted file mode 100644 index 127bd503..00000000 --- a/dev/sidekick/Sidekick_base_term__/Base_types/Ty_card/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Ty_card (sidekick.Sidekick_base_term__.Base_types.Ty_card)

Module Base_types.Ty_card

type t = ty_card =
| Finite
| Infinite
val (+) : t -> t -> t
val (*) : t -> t -> t
val (^) : t -> t -> t
val finite : t
val infinite : t
val sum : t list -> t
val product : t list -> t
val equal : t -> t -> bool
val compare : t -> t -> int
val pp : t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_base_term__/Base_types/Value/index.html b/dev/sidekick/Sidekick_base_term__/Base_types/Value/index.html deleted file mode 100644 index fd154391..00000000 --- a/dev/sidekick/Sidekick_base_term__/Base_types/Value/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Value (sidekick.Sidekick_base_term__.Base_types.Value)

Module Base_types.Value

type t = value =
| V_bool of bool
| V_element of {
id : Sidekick_base_term.ID.t;
ty : ty;
}
| V_custom of {
view : value_custom_view;
pp : value_custom_view Fmt.printer;
eq : value_custom_view -> value_custom_view -> bool;
hash : value_custom_view -> int;
}
val true_ : t
val false_ : t
val bool : bool -> t
val mk_elt : Sidekick_base_term.ID.t -> Ty.t -> t
val is_bool : t -> bool
val is_true : t -> bool
val is_false : t -> bool
val fresh : Term.t -> t
val hash : t -> int
val equal : t -> t -> bool
val pp : t Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_base_term__/Base_types/index.html b/dev/sidekick/Sidekick_base_term__/Base_types/index.html deleted file mode 100644 index 5cb7c208..00000000 --- a/dev/sidekick/Sidekick_base_term__/Base_types/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Base_types (sidekick.Sidekick_base_term__.Base_types)

Module Sidekick_base_term__.Base_types

module Vec = Msat.Vec
module Log = Msat.Log
module Fmt = CCFormat
module CC_view = Sidekick_core.CC_view
type term = {
mutable term_id : int;
mutable term_ty : ty;
term_view : term term_view;
}
and 'a term_view =
| Bool of bool
| App_fun of fun_ * 'a Sidekick_util.IArray.t
| Eq of 'a * 'a
| Not of 'a
and fun_ = {
fun_id : Sidekick_base_term.ID.t;
fun_view : fun_view;
}
and fun_view =
| Fun_undef of fun_ty
| Fun_def of {
pp : a. ('a Fmt.printer -> 'a Sidekick_util.IArray.t Fmt.printer) option;
abs : self:term -> term Sidekick_util.IArray.t -> term * bool;
do_cc : bool;
relevant : a. Sidekick_base_term.ID.t -> 'a Sidekick_util.IArray.t -> int -> bool;
ty : Sidekick_base_term.ID.t -> term Sidekick_util.IArray.t -> ty;
eval : value Sidekick_util.IArray.t -> value;
}

Methods on the custom term view whose arguments are 'a. Terms must be printable, and provide some additional theory handles.

  • relevant must return a subset of args (possibly the same set). The terms it returns will be activated and evaluated whenever possible. Terms in args \ relevant args are considered for congruence but not for evaluation.
and fun_ty = {
fun_ty_args : ty list;
fun_ty_ret : ty;
}

Function type

and ty = {
mutable ty_id : int;
ty_view : ty_view;
}

Hashconsed type

and ty_view =
| Ty_bool
| Ty_atomic of {
def : ty_def;
args : ty list;
card : ty_card lazy_t;
}
and ty_def =
| Ty_uninterpreted of Sidekick_base_term.ID.t
| Ty_def of {
id : Sidekick_base_term.ID.t;
pp : ty Fmt.printer -> ty list Fmt.printer;
default_val : value list -> value;
card : ty list -> ty_card;
}
and ty_card =
| Finite
| Infinite
and value =
| V_bool of bool
| V_element of {
id : Sidekick_base_term.ID.t;
ty : ty;
}

a named constant, distinct from any other constant

| V_custom of {
view : value_custom_view;
pp : value_custom_view Fmt.printer;
eq : value_custom_view -> value_custom_view -> bool;
hash : value_custom_view -> int;
}

Custom value

Semantic values, used for models (and possibly model-constructing calculi)

and value_custom_view = ..
val term_equal_ : term -> term -> bool
val term_hash_ : term -> int
val term_cmp_ : term -> term -> int
val fun_compare : fun_ -> fun_ -> int
val pp_fun : CCFormat.t -> fun_ -> unit
val id_of_fun : fun_ -> Sidekick_base_term.ID.t
val eq_ty : ty -> ty -> bool
val eq_value : value -> value -> bool
val hash_value : value -> int
val pp_value : Fmt.t -> value -> unit
val pp_db : Format.formatter -> (int * 'a) -> unit
val pp_ty : ty Sidekick_util.Util.printer
val pp_term_view_gen : pp_id:(Fmt.t -> Sidekick_base_term.ID.t -> unit) -> pp_t:'a Fmt.printer -> Fmt.t -> 'a term_view -> unit
val pp_term_top : ids:bool -> Fmt.t -> term -> unit
val pp_term : Fmt.t -> term -> unit
val pp_term_view : Fmt.t -> term term_view -> unit
module Ty_card : sig ... end
module Ty : sig ... end
module Fun : sig ... end
module Term_cell : sig ... end
module Term : sig ... end
module Value : sig ... end
module Proof : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_base_term__/Config/Key/index.html b/dev/sidekick/Sidekick_base_term__/Config/Key/index.html deleted file mode 100644 index 4bb15a6c..00000000 --- a/dev/sidekick/Sidekick_base_term__/Config/Key/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Key (sidekick.Sidekick_base_term__.Config.Key)

Module Config.Key

type 'a t
val create : unit -> 'a t
val equal : 'a t -> 'a t -> bool

Compare two keys that have compatible types

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_base_term__/Config/index.html b/dev/sidekick/Sidekick_base_term__/Config/index.html deleted file mode 100644 index 52ca9d6f..00000000 --- a/dev/sidekick/Sidekick_base_term__/Config/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Config (sidekick.Sidekick_base_term__.Config)

Module Sidekick_base_term__.Config

Configuration

type 'a sequence = ('a -> unit) -> unit
module Key : sig ... end
type t
val empty : t
val mem : _ Key.t -> t -> bool
val add : 'a Key.t -> 'a -> t -> t
val length : t -> int
val cardinal : t -> int
val find : 'a Key.t -> t -> 'a option
val find_exn : 'a Key.t -> t -> 'a
raises Not_found

if the key is not in the table

type pair =
| Pair : 'a Key.t * 'a -> pair
val iter : (pair -> unit) -> t -> unit
val to_seq : t -> pair sequence
val of_seq : pair sequence -> t
val add_seq : t -> pair sequence -> t
val add_list : t -> pair list -> t
val of_list : pair list -> t
val to_list : t -> pair list
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_base_term__/Hash/index.html b/dev/sidekick/Sidekick_base_term__/Hash/index.html deleted file mode 100644 index 1b577b5c..00000000 --- a/dev/sidekick/Sidekick_base_term__/Hash/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Hash (sidekick.Sidekick_base_term__.Hash)

Module Sidekick_base_term__.Hash

type 'a t = 'a -> int
val bool : bool t
val int : int t
val string : string t
val combine : 'a t -> int -> 'a -> int
val pair : 'a t -> 'b t -> ('a * 'b) t
val opt : 'a t -> 'a option t
val list : 'a t -> 'a list t
val array : 'a t -> 'a array t
val iarray : 'a t -> 'a Sidekick_util.IArray.t t
val seq : 'a t -> 'a Iter.t t
val combine2 : int -> int -> int
val combine3 : int -> int -> int -> int
val combine4 : int -> int -> int -> int -> int
val poly : 'a t

the regular polymorphic hash function

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_base_term__/Hashcons/Make/argument-1-A/index.html b/dev/sidekick/Sidekick_base_term__/Hashcons/Make/argument-1-A/index.html deleted file mode 100644 index bca45661..00000000 --- a/dev/sidekick/Sidekick_base_term__/Hashcons/Make/argument-1-A/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -1-A (sidekick.Sidekick_base_term__.Hashcons.Make.1-A)

Parameter Make.1-A

type t
val equal : t -> t -> bool
val hash : t -> int
val set_id : t -> int -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_base_term__/Hashcons/Make/index.html b/dev/sidekick/Sidekick_base_term__/Hashcons/Make/index.html deleted file mode 100644 index ca7214c4..00000000 --- a/dev/sidekick/Sidekick_base_term__/Hashcons/Make/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Make (sidekick.Sidekick_base_term__.Hashcons.Make)

Module Hashcons.Make

Parameters

Signature

type t
val create : ?⁠size:int -> unit -> t
val hashcons : t -> A.t -> A.t
val to_seq : t -> A.t Iter.t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_base_term__/Hashcons/index.html b/dev/sidekick/Sidekick_base_term__/Hashcons/index.html deleted file mode 100644 index e5eb4946..00000000 --- a/dev/sidekick/Sidekick_base_term__/Hashcons/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Hashcons (sidekick.Sidekick_base_term__.Hashcons)

Module Sidekick_base_term__.Hashcons

module type ARG = sig ... end
module Make : functor (A : ARG) -> sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_base_term__/Hashcons/module-type-ARG/index.html b/dev/sidekick/Sidekick_base_term__/Hashcons/module-type-ARG/index.html deleted file mode 100644 index b628a936..00000000 --- a/dev/sidekick/Sidekick_base_term__/Hashcons/module-type-ARG/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -ARG (sidekick.Sidekick_base_term__.Hashcons.ARG)

Module type Hashcons.ARG

type t
val equal : t -> t -> bool
val hash : t -> int
val set_id : t -> int -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_base_term__/ID/B/index.html b/dev/sidekick/Sidekick_base_term__/ID/B/index.html deleted file mode 100644 index 6c1a8fb4..00000000 --- a/dev/sidekick/Sidekick_base_term__/ID/B/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -B (sidekick.Sidekick_base_term__.ID.B)

Module ID.B

val rat : t
val int : t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_base_term__/ID/index.html b/dev/sidekick/Sidekick_base_term__/ID/index.html deleted file mode 100644 index 513f43ba..00000000 --- a/dev/sidekick/Sidekick_base_term__/ID/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -ID (sidekick.Sidekick_base_term__.ID)

Module Sidekick_base_term__.ID

Unique Identifiers

type t
val make : string -> t
val makef : ('a, Format.formatter, unit, t) Pervasives.format4 -> 'a
val copy : t -> t
val id : t -> int
val to_string : t -> string
val to_string_full : t -> string
include Sidekick_util.Intf.EQ with type t := t
type t
val equal : t -> t -> bool
include Sidekick_util.Intf.ORD with type t := t
type t
val compare : t -> t -> int
include Sidekick_util.Intf.HASH with type t := t
type t
val hash : t -> int
include Sidekick_util.Intf.PRINT with type t := t
type t
val pp : t CCFormat.printer
val pp_name : t CCFormat.printer
module Map : CCMap.S with type Map.key = t
module Set : CCSet.S with type Set.elt = t
module Tbl : CCHashtbl.S with type Tbl.key = t
module B : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_base_term__/Model/Fun_interpretation/index.html b/dev/sidekick/Sidekick_base_term__/Model/Fun_interpretation/index.html deleted file mode 100644 index 159653d8..00000000 --- a/dev/sidekick/Sidekick_base_term__/Model/Fun_interpretation/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Fun_interpretation (sidekick.Sidekick_base_term__.Model.Fun_interpretation) \ No newline at end of file diff --git a/dev/sidekick/Sidekick_base_term__/Model/Val_map/index.html b/dev/sidekick/Sidekick_base_term__/Model/Val_map/index.html deleted file mode 100644 index edf06909..00000000 --- a/dev/sidekick/Sidekick_base_term__/Model/Val_map/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Val_map (sidekick.Sidekick_base_term__.Model.Val_map)

Module Model.Val_map

type key = Sidekick_base_term.Base_types.Value.t list
type 'a t
val empty : 'a t
val is_empty : _ t -> bool
val cardinal : _ t -> int
val find : key -> 'a t -> 'a option
val add : key -> 'a -> 'a t -> 'a t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_base_term__/Model/index.html b/dev/sidekick/Sidekick_base_term__/Model/index.html deleted file mode 100644 index 6dedc3f8..00000000 --- a/dev/sidekick/Sidekick_base_term__/Model/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Model (sidekick.Sidekick_base_term__.Model) \ No newline at end of file diff --git a/dev/sidekick/Sidekick_base_term__/index.html b/dev/sidekick/Sidekick_base_term__/index.html deleted file mode 100644 index 7555225b..00000000 --- a/dev/sidekick/Sidekick_base_term__/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Sidekick_base_term__ (sidekick.Sidekick_base_term__)

Module Sidekick_base_term__

module Base_types : sig ... end
module Config : sig ... end
module Hash : sig ... end
module Hashcons : sig ... end
module ID : sig ... end
module Model : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_base_term__Base_types/Fun/index.html b/dev/sidekick/Sidekick_base_term__Base_types/Fun/index.html deleted file mode 100644 index 2f2533d3..00000000 --- a/dev/sidekick/Sidekick_base_term__Base_types/Fun/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Fun (sidekick.Sidekick_base_term__Base_types.Fun)

Module Sidekick_base_term__Base_types.Fun

type view = fun_view
type t = fun_
val id : t -> Sidekick_base_term.ID.t
val view : t -> view
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val as_undefined : t -> (t * Ty.Fun.t) option
val as_undefined_exn : t -> t * Ty.Fun.t
val is_undefined : t -> bool
val do_cc : t -> bool
val mk_undef : Sidekick_base_term.ID.t -> Ty.Fun.t -> t
val mk_undef_const : Sidekick_base_term.ID.t -> Ty.t -> t
val pp : t CCFormat.printer
module Map : CCMap.S with type Map.key = t
module Tbl : CCHashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_base_term__Base_types/Proof/index.html b/dev/sidekick/Sidekick_base_term__Base_types/Proof/index.html deleted file mode 100644 index 7e3ae717..00000000 --- a/dev/sidekick/Sidekick_base_term__Base_types/Proof/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Proof (sidekick.Sidekick_base_term__Base_types.Proof)

Module Sidekick_base_term__Base_types.Proof

type t =
| Default
val default : t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_base_term__Base_types/Term/Iter_dag/index.html b/dev/sidekick/Sidekick_base_term__Base_types/Term/Iter_dag/index.html deleted file mode 100644 index f607dc44..00000000 --- a/dev/sidekick/Sidekick_base_term__Base_types/Term/Iter_dag/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Iter_dag (sidekick.Sidekick_base_term__Base_types.Term.Iter_dag)

Module Term.Iter_dag

type t
val create : unit -> t
val iter_dag : t -> term -> term Iter.t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_base_term__Base_types/Term/index.html b/dev/sidekick/Sidekick_base_term__Base_types/Term/index.html deleted file mode 100644 index 88b1b39a..00000000 --- a/dev/sidekick/Sidekick_base_term__Base_types/Term/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Term (sidekick.Sidekick_base_term__Base_types.Term)

Module Sidekick_base_term__Base_types.Term

type t = term = {
mutable term_id : int;
mutable term_ty : ty;
term_view : t term_view;
}
type 'a view = 'a term_view =
| Bool of bool
| App_fun of fun_ * 'a Sidekick_util.IArray.t
| Eq of 'a * 'a
| Not of 'a
val id : t -> int
val view : t -> term view
val ty : t -> Ty.t
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
type state
val create : ?⁠size:int -> unit -> state
val make : state -> t view -> t
val true_ : state -> t
val false_ : state -> t
val bool : state -> bool -> t
val const : state -> fun_ -> t
val app_fun : state -> fun_ -> t Sidekick_util.IArray.t -> t
val eq : state -> t -> t -> t
val not_ : state -> t -> t
val abs : state -> t -> t * bool

Obtain unsigned version of t, + the sign as a boolean

module Iter_dag : sig ... end
val iter_dag : t -> t Iter.t
val map_shallow : state -> (t -> t) -> t -> t
val pp : t Fmt.printer
Views
val is_true : t -> bool
val is_false : t -> bool
val is_const : t -> bool
val cc_view : t -> (fun_tt Iter.t) CC_view.t
val as_fun_undef : t -> (fun_ * Ty.Fun.t) option
val as_bool : t -> bool option
Containers
module Tbl : CCHashtbl.S with type Tbl.key = t
module Map : CCMap.S with type Map.key = t
module Set : CCSet.S with type Set.elt = t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_base_term__Base_types/Term_cell/Make_eq/argument-1-X/index.html b/dev/sidekick/Sidekick_base_term__Base_types/Term_cell/Make_eq/argument-1-X/index.html deleted file mode 100644 index 706f491a..00000000 --- a/dev/sidekick/Sidekick_base_term__Base_types/Term_cell/Make_eq/argument-1-X/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -1-X (sidekick.Sidekick_base_term__Base_types.Term_cell.Make_eq.1-X)

Parameter Make_eq.1-X

type t
val hash : t -> int
val equal : t -> t -> bool
val pp : t Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_base_term__Base_types/Term_cell/Make_eq/index.html b/dev/sidekick/Sidekick_base_term__Base_types/Term_cell/Make_eq/index.html deleted file mode 100644 index db73f246..00000000 --- a/dev/sidekick/Sidekick_base_term__Base_types/Term_cell/Make_eq/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Make_eq (sidekick.Sidekick_base_term__Base_types.Term_cell.Make_eq)

Module Term_cell.Make_eq

Parameters

Signature

val equal : X.t view -> X.t view -> bool
val hash : X.t view -> int
val pp : X.t view Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_base_term__Base_types/Term_cell/index.html b/dev/sidekick/Sidekick_base_term__Base_types/Term_cell/index.html deleted file mode 100644 index 8b308aba..00000000 --- a/dev/sidekick/Sidekick_base_term__Base_types/Term_cell/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Term_cell (sidekick.Sidekick_base_term__Base_types.Term_cell)

Module Sidekick_base_term__Base_types.Term_cell

type 'a view = 'a term_view =
| Bool of bool
| App_fun of fun_ * 'a Sidekick_util.IArray.t
| Eq of 'a * 'a
| Not of 'a
type t = term view
val equal : t -> t -> bool
val hash : t -> int
val true_ : t
val false_ : t
val const : fun_ -> t
val app_fun : fun_ -> term Sidekick_util.IArray.t -> t
val eq : term -> term -> t
val not_ : term -> t
val ty : t -> Ty.t

Compute the type of this term cell. Not totally free

val pp : t Fmt.printer
val map : ('a -> 'b) -> 'a view -> 'b view
val iter : ('a -> unit) -> 'a view -> unit
module type ARG = sig ... end
module Make_eq : functor (X : ARG) -> sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_base_term__Base_types/Term_cell/module-type-ARG/index.html b/dev/sidekick/Sidekick_base_term__Base_types/Term_cell/module-type-ARG/index.html deleted file mode 100644 index 6b455eb7..00000000 --- a/dev/sidekick/Sidekick_base_term__Base_types/Term_cell/module-type-ARG/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -ARG (sidekick.Sidekick_base_term__Base_types.Term_cell.ARG)

Module type Term_cell.ARG

type t
val hash : t -> int
val equal : t -> t -> bool
val pp : t Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_base_term__Base_types/Ty/Fun/index.html b/dev/sidekick/Sidekick_base_term__Base_types/Ty/Fun/index.html deleted file mode 100644 index e327b139..00000000 --- a/dev/sidekick/Sidekick_base_term__Base_types/Ty/Fun/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Fun (sidekick.Sidekick_base_term__Base_types.Ty.Fun)

Module Ty.Fun

type t = fun_ty
val args : t -> ty list
val ret : t -> ty
val arity : t -> int
val unfold : t -> ty list * ty
val mk : ty list -> ty -> t
val pp : t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_base_term__Base_types/Ty/index.html b/dev/sidekick/Sidekick_base_term__Base_types/Ty/index.html deleted file mode 100644 index a9a77ac5..00000000 --- a/dev/sidekick/Sidekick_base_term__Base_types/Ty/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Ty (sidekick.Sidekick_base_term__Base_types.Ty)

Module Sidekick_base_term__Base_types.Ty

type t = ty
type view = ty_view
type def = ty_def
val id : t -> int
val view : t -> view
val bool : t
val atomic : def -> t list -> t
val atomic_uninterpreted : Sidekick_base_term.ID.t -> t
val card : t -> ty_card
val is_bool : t -> bool
val is_uninterpreted : t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val pp : t CCFormat.printer
module Tbl : CCHashtbl.S with type Tbl.key = t
module Fun : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_base_term__Base_types/Ty_card/index.html b/dev/sidekick/Sidekick_base_term__Base_types/Ty_card/index.html deleted file mode 100644 index 41d7dfda..00000000 --- a/dev/sidekick/Sidekick_base_term__Base_types/Ty_card/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Ty_card (sidekick.Sidekick_base_term__Base_types.Ty_card)

Module Sidekick_base_term__Base_types.Ty_card

type t = ty_card =
| Finite
| Infinite
val (+) : t -> t -> t
val (*) : t -> t -> t
val (^) : t -> t -> t
val finite : t
val infinite : t
val sum : t list -> t
val product : t list -> t
val equal : t -> t -> bool
val compare : t -> t -> int
val pp : t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_base_term__Base_types/Value/index.html b/dev/sidekick/Sidekick_base_term__Base_types/Value/index.html deleted file mode 100644 index 34f15028..00000000 --- a/dev/sidekick/Sidekick_base_term__Base_types/Value/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Value (sidekick.Sidekick_base_term__Base_types.Value)

Module Sidekick_base_term__Base_types.Value

type t = value =
| V_bool of bool
| V_element of {
id : Sidekick_base_term.ID.t;
ty : ty;
}
| V_custom of {
view : value_custom_view;
pp : value_custom_view Fmt.printer;
eq : value_custom_view -> value_custom_view -> bool;
hash : value_custom_view -> int;
}
val true_ : t
val false_ : t
val bool : bool -> t
val mk_elt : Sidekick_base_term.ID.t -> Ty.t -> t
val is_bool : t -> bool
val is_true : t -> bool
val is_false : t -> bool
val fresh : Term.t -> t
val hash : t -> int
val equal : t -> t -> bool
val pp : t Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_base_term__Base_types/index.html b/dev/sidekick/Sidekick_base_term__Base_types/index.html deleted file mode 100644 index b17fe971..00000000 --- a/dev/sidekick/Sidekick_base_term__Base_types/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Sidekick_base_term__Base_types (sidekick.Sidekick_base_term__Base_types)

Module Sidekick_base_term__Base_types

module Vec = Msat.Vec
module Log = Msat.Log
module Fmt = CCFormat
module CC_view = Sidekick_core.CC_view
type term = {
mutable term_id : int;
mutable term_ty : ty;
term_view : term term_view;
}
and 'a term_view =
| Bool of bool
| App_fun of fun_ * 'a Sidekick_util.IArray.t
| Eq of 'a * 'a
| Not of 'a
and fun_ = {
fun_id : Sidekick_base_term.ID.t;
fun_view : fun_view;
}
and fun_view =
| Fun_undef of fun_ty
| Fun_def of {
pp : a. ('a Fmt.printer -> 'a Sidekick_util.IArray.t Fmt.printer) option;
abs : self:term -> term Sidekick_util.IArray.t -> term * bool;
do_cc : bool;
relevant : a. Sidekick_base_term.ID.t -> 'a Sidekick_util.IArray.t -> int -> bool;
ty : Sidekick_base_term.ID.t -> term Sidekick_util.IArray.t -> ty;
eval : value Sidekick_util.IArray.t -> value;
}

Methods on the custom term view whose arguments are 'a. Terms must be printable, and provide some additional theory handles.

  • relevant must return a subset of args (possibly the same set). The terms it returns will be activated and evaluated whenever possible. Terms in args \ relevant args are considered for congruence but not for evaluation.
and fun_ty = {
fun_ty_args : ty list;
fun_ty_ret : ty;
}

Function type

and ty = {
mutable ty_id : int;
ty_view : ty_view;
}

Hashconsed type

and ty_view =
| Ty_bool
| Ty_atomic of {
def : ty_def;
args : ty list;
card : ty_card lazy_t;
}
and ty_def =
| Ty_uninterpreted of Sidekick_base_term.ID.t
| Ty_def of {
id : Sidekick_base_term.ID.t;
pp : ty Fmt.printer -> ty list Fmt.printer;
default_val : value list -> value;
card : ty list -> ty_card;
}
and ty_card =
| Finite
| Infinite
and value =
| V_bool of bool
| V_element of {
id : Sidekick_base_term.ID.t;
ty : ty;
}

a named constant, distinct from any other constant

| V_custom of {
view : value_custom_view;
pp : value_custom_view Fmt.printer;
eq : value_custom_view -> value_custom_view -> bool;
hash : value_custom_view -> int;
}

Custom value

Semantic values, used for models (and possibly model-constructing calculi)

and value_custom_view = ..
val term_equal_ : term -> term -> bool
val term_hash_ : term -> int
val term_cmp_ : term -> term -> int
val fun_compare : fun_ -> fun_ -> int
val pp_fun : CCFormat.t -> fun_ -> unit
val id_of_fun : fun_ -> Sidekick_base_term.ID.t
val eq_ty : ty -> ty -> bool
val eq_value : value -> value -> bool
val hash_value : value -> int
val pp_value : Fmt.t -> value -> unit
val pp_db : Format.formatter -> (int * 'a) -> unit
val pp_ty : ty Sidekick_util.Util.printer
val pp_term_view_gen : pp_id:(Fmt.t -> Sidekick_base_term.ID.t -> unit) -> pp_t:'a Fmt.printer -> Fmt.t -> 'a term_view -> unit
val pp_term_top : ids:bool -> Fmt.t -> term -> unit
val pp_term : Fmt.t -> term -> unit
val pp_term_view : Fmt.t -> term term_view -> unit
module Ty_card : sig ... end
module Ty : sig ... end
module Fun : sig ... end
module Term_cell : sig ... end
module Term : sig ... end
module Value : sig ... end
module Proof : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_base_term__Config/Key/index.html b/dev/sidekick/Sidekick_base_term__Config/Key/index.html deleted file mode 100644 index 320c5805..00000000 --- a/dev/sidekick/Sidekick_base_term__Config/Key/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Key (sidekick.Sidekick_base_term__Config.Key)

Module Sidekick_base_term__Config.Key

type 'a t
val create : unit -> 'a t
val equal : 'a t -> 'a t -> bool

Compare two keys that have compatible types

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_base_term__Config/index.html b/dev/sidekick/Sidekick_base_term__Config/index.html deleted file mode 100644 index 0a60c40a..00000000 --- a/dev/sidekick/Sidekick_base_term__Config/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Sidekick_base_term__Config (sidekick.Sidekick_base_term__Config)

Module Sidekick_base_term__Config

Configuration

type 'a sequence = ('a -> unit) -> unit
module Key : sig ... end
type t
val empty : t
val mem : _ Key.t -> t -> bool
val add : 'a Key.t -> 'a -> t -> t
val length : t -> int
val cardinal : t -> int
val find : 'a Key.t -> t -> 'a option
val find_exn : 'a Key.t -> t -> 'a
raises Not_found

if the key is not in the table

type pair =
| Pair : 'a Key.t * 'a -> pair
val iter : (pair -> unit) -> t -> unit
val to_seq : t -> pair sequence
val of_seq : pair sequence -> t
val add_seq : t -> pair sequence -> t
val add_list : t -> pair list -> t
val of_list : pair list -> t
val to_list : t -> pair list
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_base_term__Hash/index.html b/dev/sidekick/Sidekick_base_term__Hash/index.html deleted file mode 100644 index 67c7806c..00000000 --- a/dev/sidekick/Sidekick_base_term__Hash/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Sidekick_base_term__Hash (sidekick.Sidekick_base_term__Hash)

Module Sidekick_base_term__Hash

type 'a t = 'a -> int
val bool : bool t
val int : int t
val string : string t
val combine : 'a t -> int -> 'a -> int
val pair : 'a t -> 'b t -> ('a * 'b) t
val opt : 'a t -> 'a option t
val list : 'a t -> 'a list t
val array : 'a t -> 'a array t
val iarray : 'a t -> 'a Sidekick_util.IArray.t t
val seq : 'a t -> 'a Iter.t t
val combine2 : int -> int -> int
val combine3 : int -> int -> int -> int
val combine4 : int -> int -> int -> int -> int
val poly : 'a t

the regular polymorphic hash function

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_base_term__Hashcons/Make/argument-1-A/index.html b/dev/sidekick/Sidekick_base_term__Hashcons/Make/argument-1-A/index.html deleted file mode 100644 index afc35b45..00000000 --- a/dev/sidekick/Sidekick_base_term__Hashcons/Make/argument-1-A/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -1-A (sidekick.Sidekick_base_term__Hashcons.Make.1-A)

Parameter Make.1-A

type t
val equal : t -> t -> bool
val hash : t -> int
val set_id : t -> int -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_base_term__Hashcons/Make/index.html b/dev/sidekick/Sidekick_base_term__Hashcons/Make/index.html deleted file mode 100644 index 66130ea6..00000000 --- a/dev/sidekick/Sidekick_base_term__Hashcons/Make/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Make (sidekick.Sidekick_base_term__Hashcons.Make)

Module Sidekick_base_term__Hashcons.Make

Parameters

Signature

type t
val create : ?⁠size:int -> unit -> t
val hashcons : t -> A.t -> A.t
val to_seq : t -> A.t Iter.t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_base_term__Hashcons/index.html b/dev/sidekick/Sidekick_base_term__Hashcons/index.html deleted file mode 100644 index bafa9983..00000000 --- a/dev/sidekick/Sidekick_base_term__Hashcons/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Sidekick_base_term__Hashcons (sidekick.Sidekick_base_term__Hashcons)

Module Sidekick_base_term__Hashcons

module type ARG = sig ... end
module Make : functor (A : ARG) -> sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_base_term__Hashcons/module-type-ARG/index.html b/dev/sidekick/Sidekick_base_term__Hashcons/module-type-ARG/index.html deleted file mode 100644 index 7a235256..00000000 --- a/dev/sidekick/Sidekick_base_term__Hashcons/module-type-ARG/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -ARG (sidekick.Sidekick_base_term__Hashcons.ARG)

Module type Sidekick_base_term__Hashcons.ARG

type t
val equal : t -> t -> bool
val hash : t -> int
val set_id : t -> int -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_base_term__ID/B/index.html b/dev/sidekick/Sidekick_base_term__ID/B/index.html deleted file mode 100644 index 41c734c3..00000000 --- a/dev/sidekick/Sidekick_base_term__ID/B/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -B (sidekick.Sidekick_base_term__ID.B)

Module Sidekick_base_term__ID.B

val rat : t
val int : t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_base_term__ID/index.html b/dev/sidekick/Sidekick_base_term__ID/index.html deleted file mode 100644 index b6777349..00000000 --- a/dev/sidekick/Sidekick_base_term__ID/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Sidekick_base_term__ID (sidekick.Sidekick_base_term__ID)

Module Sidekick_base_term__ID

Unique Identifiers

type t
val make : string -> t
val makef : ('a, Format.formatter, unit, t) Pervasives.format4 -> 'a
val copy : t -> t
val id : t -> int
val to_string : t -> string
val to_string_full : t -> string
include Sidekick_util.Intf.EQ with type t := t
type t
val equal : t -> t -> bool
include Sidekick_util.Intf.ORD with type t := t
type t
val compare : t -> t -> int
include Sidekick_util.Intf.HASH with type t := t
type t
val hash : t -> int
include Sidekick_util.Intf.PRINT with type t := t
type t
val pp : t CCFormat.printer
val pp_name : t CCFormat.printer
module Map : CCMap.S with type Map.key = t
module Set : CCSet.S with type Set.elt = t
module Tbl : CCHashtbl.S with type Tbl.key = t
module B : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_base_term__Model/Fun_interpretation/index.html b/dev/sidekick/Sidekick_base_term__Model/Fun_interpretation/index.html deleted file mode 100644 index 6e7db749..00000000 --- a/dev/sidekick/Sidekick_base_term__Model/Fun_interpretation/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Fun_interpretation (sidekick.Sidekick_base_term__Model.Fun_interpretation) \ No newline at end of file diff --git a/dev/sidekick/Sidekick_base_term__Model/Val_map/index.html b/dev/sidekick/Sidekick_base_term__Model/Val_map/index.html deleted file mode 100644 index 68277d83..00000000 --- a/dev/sidekick/Sidekick_base_term__Model/Val_map/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Val_map (sidekick.Sidekick_base_term__Model.Val_map)

Module Sidekick_base_term__Model.Val_map

type key = Sidekick_base_term.Base_types.Value.t list
type 'a t
val empty : 'a t
val is_empty : _ t -> bool
val cardinal : _ t -> int
val find : key -> 'a t -> 'a option
val add : key -> 'a -> 'a t -> 'a t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_base_term__Model/index.html b/dev/sidekick/Sidekick_base_term__Model/index.html deleted file mode 100644 index d936e573..00000000 --- a/dev/sidekick/Sidekick_base_term__Model/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Sidekick_base_term__Model (sidekick.Sidekick_base_term__Model)

Module Sidekick_base_term__Model

Model

module Val_map : sig ... end
module Fun_interpretation : sig ... end
type t = {
values : Sidekick_base_term.Base_types.Value.t Sidekick_base_term__.Base_types.Term.Map.t;
funs : Fun_interpretation.t Sidekick_base_term__.Base_types.Fun.Map.t;
}
val empty : t
val add : Sidekick_base_term.Base_types.Term.t -> Sidekick_base_term.Base_types.Value.t -> t -> t
val mem : Sidekick_base_term.Base_types.Term.t -> t -> bool
val find : Sidekick_base_term.Base_types.Term.t -> t -> Sidekick_base_term.Base_types.Value.t option
val merge : t -> t -> t
val pp : t CCFormat.printer
val eval : t -> Sidekick_base_term.Base_types.Term.t -> Sidekick_base_term.Base_types.Value.t option
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_cc/Make/Expl/index.html b/dev/sidekick/Sidekick_cc/Make/Expl/index.html index a7b087a1..cdde1d64 100644 --- a/dev/sidekick/Sidekick_cc/Make/Expl/index.html +++ b/dev/sidekick/Sidekick_cc/Make/Expl/index.html @@ -1,2 +1,2 @@ -Expl (sidekick.Sidekick_cc.Make.Expl)

Module Make.Expl

type t
val pp : t Sidekick_core.Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
\ No newline at end of file +Expl (sidekick.Sidekick_cc.Make.Expl)

Module Make.Expl

type t
val pp : t Sidekick_core.Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
val mk_theory : t -> t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_cc/Make/N/index.html b/dev/sidekick/Sidekick_cc/Make/N/index.html index e7d15ca2..2f8c910a 100644 --- a/dev/sidekick/Sidekick_cc/Make/N/index.html +++ b/dev/sidekick/Sidekick_cc/Make/N/index.html @@ -1,2 +1,2 @@ -N (sidekick.Sidekick_cc.Make.N)

Module Make.N

An equivalence class is a set of terms that are currently equal in the partial model built by the solver. The class is represented by a collection of nodes, one of which is distinguished and is called the "representative".

All information pertaining to the whole equivalence class is stored in this representative's node.

When two classes become equal (are "merged"), one of the two representatives is picked as the representative of the new class. The new class contains the union of the two old classes' nodes.

We also allow theories to store additional information in the representative. This information can be used when two classes are merged, to detect conflicts and solve equations à la Shostak.

type t
val term : t -> term
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
val is_root : t -> bool

Is the node a root (ie the representative of its class)?

val iter_class : t -> t Iter.t

Traverse the congruence class. Precondition: is_root n (see find below)

val iter_parents : t -> t Iter.t

Traverse the parents of the class. Precondition: is_root n (see find below)

\ No newline at end of file +N (sidekick.Sidekick_cc.Make.N)

Module Make.N

An equivalence class is a set of terms that are currently equal in the partial model built by the solver. The class is represented by a collection of nodes, one of which is distinguished and is called the "representative".

All information pertaining to the whole equivalence class is stored in this representative's node.

When two classes become equal (are "merged"), one of the two representatives is picked as the representative of the new class. The new class contains the union of the two old classes' nodes.

We also allow theories to store additional information in the representative. This information can be used when two classes are merged, to detect conflicts and solve equations à la Shostak.

type t
val term : t -> term
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
val is_root : t -> bool

Is the node a root (ie the representative of its class)?

val iter_class : t -> t Iter.t

Traverse the congruence class. Precondition: is_root n (see find below)

val iter_parents : t -> t Iter.t

Traverse the parents of the class. Precondition: is_root n (see find below)

type bitfield

A field in the bitfield of this node. This should only be allocated when a theory is initialized.

All fields are initially 0, are backtracked automatically, and are merged automatically when classes are merged.

val get_field : bitfield -> t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_cc/Make/argument-1-A/Actions/index.html b/dev/sidekick/Sidekick_cc/Make/argument-1-A/Actions/index.html new file mode 100644 index 00000000..3573c9cd --- /dev/null +++ b/dev/sidekick/Sidekick_cc/Make/argument-1-A/Actions/index.html @@ -0,0 +1,2 @@ + +Actions (sidekick.Sidekick_cc.Make.1-A.Actions)

Module 1-A.Actions

module T = T
module P = P
module Lit = Lit
type t
val raise_conflict : t -> Lit.t list -> P.t -> 'a
val propagate : t -> Lit.t -> reason:(unit -> Lit.t list) -> P.t -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_cc/Make/argument-1-A/Lit/index.html b/dev/sidekick/Sidekick_cc/Make/argument-1-A/Lit/index.html new file mode 100644 index 00000000..974c0eab --- /dev/null +++ b/dev/sidekick/Sidekick_cc/Make/argument-1-A/Lit/index.html @@ -0,0 +1,2 @@ + +Lit (sidekick.Sidekick_cc.Make.1-A.Lit)

Module 1-A.Lit

module T = T
type t
val term : t -> T.Term.t
val sign : t -> bool
val neg : t -> t
val abs : t -> t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_cc/Make/argument-1-A/P/index.html b/dev/sidekick/Sidekick_cc/Make/argument-1-A/P/index.html new file mode 100644 index 00000000..30c426e5 --- /dev/null +++ b/dev/sidekick/Sidekick_cc/Make/argument-1-A/P/index.html @@ -0,0 +1,2 @@ + +P (sidekick.Sidekick_cc.Make.1-A.P)

Module 1-A.P

type t
val pp : t Sidekick_core.Fmt.printer
val default : t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_cc/Make/argument-1-A/T/Fun/index.html b/dev/sidekick/Sidekick_cc/Make/argument-1-A/T/Fun/index.html new file mode 100644 index 00000000..832727cd --- /dev/null +++ b/dev/sidekick/Sidekick_cc/Make/argument-1-A/T/Fun/index.html @@ -0,0 +1,2 @@ + +Fun (sidekick.Sidekick_cc.Make.1-A.T.Fun)

Module T.Fun

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_cc/Make/argument-1-A/T/Term/index.html b/dev/sidekick/Sidekick_cc/Make/argument-1-A/T/Term/index.html new file mode 100644 index 00000000..1f7e0d68 --- /dev/null +++ b/dev/sidekick/Sidekick_cc/Make/argument-1-A/T/Term/index.html @@ -0,0 +1,2 @@ + +Term (sidekick.Sidekick_cc.Make.1-A.T.Term)

Module T.Term

type t
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type state
val ty : t -> Ty.t
val bool : state -> bool -> t
val as_bool : t -> bool option
val abs : state -> t -> t * bool
val map_shallow : state -> (t -> t) -> t -> t

Map function on immediate subterms

val iter_dag : t -> (t -> unit) -> unit
module Tbl : CCHashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_cc/Make/argument-1-A/T/Ty/index.html b/dev/sidekick/Sidekick_cc/Make/argument-1-A/T/Ty/index.html new file mode 100644 index 00000000..9cc20abb --- /dev/null +++ b/dev/sidekick/Sidekick_cc/Make/argument-1-A/T/Ty/index.html @@ -0,0 +1,2 @@ + +Ty (sidekick.Sidekick_cc.Make.1-A.T.Ty)

Module T.Ty

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type state
val bool : state -> t
val is_bool : t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_cc/Make/argument-1-A/T/index.html b/dev/sidekick/Sidekick_cc/Make/argument-1-A/T/index.html new file mode 100644 index 00000000..6965bf85 --- /dev/null +++ b/dev/sidekick/Sidekick_cc/Make/argument-1-A/T/index.html @@ -0,0 +1,2 @@ + +T (sidekick.Sidekick_cc.Make.1-A.T)

Module 1-A.T

module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_cc/Make/argument-1-A/index.html b/dev/sidekick/Sidekick_cc/Make/argument-1-A/index.html new file mode 100644 index 00000000..10866644 --- /dev/null +++ b/dev/sidekick/Sidekick_cc/Make/argument-1-A/index.html @@ -0,0 +1,2 @@ + +1-A (sidekick.Sidekick_cc.Make.1-A)

Parameter Make.1-A

module Lit : Sidekick_core.LIT with module T = T
module Actions : Sidekick_core.CC_ACTIONS with module T = T and module P = P and module Lit = Lit
val cc_view : T.Term.t -> (T.Fun.tT.Term.tT.Term.t Iter.t) Sidekick_core.CC_view.t

View the term through the lens of the congruence closure

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_cc/Make/argument-1-CC_A/A/Fun/index.html b/dev/sidekick/Sidekick_cc/Make/argument-1-CC_A/A/Fun/index.html deleted file mode 100644 index 51f390d6..00000000 --- a/dev/sidekick/Sidekick_cc/Make/argument-1-CC_A/A/Fun/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Fun (sidekick.Sidekick_cc.Make.1-CC_A.A.Fun)

Module A.Fun

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_cc/Make/argument-1-CC_A/A/Proof/index.html b/dev/sidekick/Sidekick_cc/Make/argument-1-CC_A/A/Proof/index.html deleted file mode 100644 index 29e59f9e..00000000 --- a/dev/sidekick/Sidekick_cc/Make/argument-1-CC_A/A/Proof/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Proof (sidekick.Sidekick_cc.Make.1-CC_A.A.Proof)

Module A.Proof

type t
val pp : t Sidekick_core.Fmt.printer
val default : t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_cc/Make/argument-1-CC_A/A/Term/index.html b/dev/sidekick/Sidekick_cc/Make/argument-1-CC_A/A/Term/index.html deleted file mode 100644 index 0a75c129..00000000 --- a/dev/sidekick/Sidekick_cc/Make/argument-1-CC_A/A/Term/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Term (sidekick.Sidekick_cc.Make.1-CC_A.A.Term)

Module A.Term

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type state
val ty : t -> Ty.t
val bool : state -> bool -> t
val as_bool : t -> bool option
val abs : state -> t -> t * bool
val map_shallow : state -> (t -> t) -> t -> t

Map function on immediate subterms

val iter_dag : t -> (t -> unit) -> unit
module Tbl : CCHashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_cc/Make/argument-1-CC_A/A/Ty/index.html b/dev/sidekick/Sidekick_cc/Make/argument-1-CC_A/A/Ty/index.html deleted file mode 100644 index 22d9bb35..00000000 --- a/dev/sidekick/Sidekick_cc/Make/argument-1-CC_A/A/Ty/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Ty (sidekick.Sidekick_cc.Make.1-CC_A.A.Ty)

Module A.Ty

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
val bool : t
val is_bool : t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_cc/Make/argument-1-CC_A/A/index.html b/dev/sidekick/Sidekick_cc/Make/argument-1-CC_A/A/index.html deleted file mode 100644 index b4f763ea..00000000 --- a/dev/sidekick/Sidekick_cc/Make/argument-1-CC_A/A/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -A (sidekick.Sidekick_cc.Make.1-CC_A.A)

Module 1-CC_A.A

include Sidekick_core.TERM
module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
module Proof : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_cc/Make/argument-1-CC_A/Actions/index.html b/dev/sidekick/Sidekick_cc/Make/argument-1-CC_A/Actions/index.html deleted file mode 100644 index bae2fab4..00000000 --- a/dev/sidekick/Sidekick_cc/Make/argument-1-CC_A/Actions/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Actions (sidekick.Sidekick_cc.Make.1-CC_A.Actions)

Module 1-CC_A.Actions

type t
val raise_conflict : t -> Lit.t list -> A.Proof.t -> 'a
val propagate : t -> Lit.t -> reason:(unit -> Lit.t list) -> A.Proof.t -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_cc/Make/argument-1-CC_A/Lit/index.html b/dev/sidekick/Sidekick_cc/Make/argument-1-CC_A/Lit/index.html deleted file mode 100644 index 3b0dab14..00000000 --- a/dev/sidekick/Sidekick_cc/Make/argument-1-CC_A/Lit/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Lit (sidekick.Sidekick_cc.Make.1-CC_A.Lit)

Module 1-CC_A.Lit

type t
val term : t -> A.Term.t
val sign : t -> bool
val neg : t -> t
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_cc/Make/argument-1-CC_A/index.html b/dev/sidekick/Sidekick_cc/Make/argument-1-CC_A/index.html deleted file mode 100644 index f10bdab0..00000000 --- a/dev/sidekick/Sidekick_cc/Make/argument-1-CC_A/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -1-CC_A (sidekick.Sidekick_cc.Make.1-CC_A)

Parameter Make.1-CC_A

val cc_view : A.Term.t -> (A.Fun.tA.Term.tA.Term.t Iter.t) Sidekick_core.CC_view.t

View the term through the lens of the congruence closure

module Lit : sig ... end
module Actions : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_cc/Make/index.html b/dev/sidekick/Sidekick_cc/Make/index.html index 44d4942e..4f7dbe8d 100644 --- a/dev/sidekick/Sidekick_cc/Make/index.html +++ b/dev/sidekick/Sidekick_cc/Make/index.html @@ -1,2 +1,2 @@ -Make (sidekick.Sidekick_cc.Make)

Module Sidekick_cc.Make

Parameters

Signature

module CC_A = CC_A
module A = CC_A.A
type term_state = A.Term.state
type term = A.Term.t
type fun_ = A.Fun.t
type lit = CC_A.Lit.t
type proof = A.Proof.t
type actions = CC_A.Actions.t
type t

Global state of the congruence closure

module N : sig ... end

An equivalence class is a set of terms that are currently equal in the partial model built by the solver. The class is represented by a collection of nodes, one of which is distinguished and is called the "representative".

module Expl : sig ... end
type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t
val term_state : t -> term_state
val find : t -> node -> repr

Current representative

val add_term : t -> term -> node

Add the term to the congruence closure, if not present already. Will be backtracked.

type ev_on_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit
type ev_on_new_term = t -> N.t -> term -> unit
type ev_on_conflict = t -> lit list -> unit
type ev_on_propagate = t -> lit -> (unit -> lit list) -> unit
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_merge:ev_on_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠size:[ `Small | `Big ] -> term_state -> t

Create a new congruence closure.

val on_merge : t -> ev_on_merge -> unit

Add a function to be called when two classes are merged

val on_new_term : t -> ev_on_new_term -> unit

Add a function to be called when a new node is created

val on_conflict : t -> ev_on_conflict -> unit

Called when the congruence closure finds a conflict

val on_propagate : t -> ev_on_propagate -> unit

Called when the congruence closure propagates a literal

val set_as_lit : t -> N.t -> lit -> unit

map the given node to a literal.

val find_t : t -> term -> repr

Current representative of the term.

raises Not_found

if the term is not already add-ed.

val add_seq : t -> term Iter.t -> unit

Add a sequence of terms to the congruence closure

val all_classes : t -> repr Iter.t

All current classes. This is costly, only use if there is no other solution

val assert_lit : t -> lit -> unit

Given a literal, assume it in the congruence closure and propagate its consequences. Will be backtracked.

Useful for the theory combination or the SAT solver's functor

val assert_lits : t -> lit Iter.t -> unit

Addition of many literals

val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given explanation it must be a theory tautology that expl ==> absurd. To be used in theories.

val merge : t -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val check : t -> actions -> unit

Perform all pending operations done via assert_eq, assert_lit, etc. Will use the actions to propagate literals, declare conflicts, etc.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Restore to state n calls to push_level earlier. Used during backtracking.

val get_model : t -> N.t Iter.t Iter.t

get all the equivalence classes so they can be merged in the model

\ No newline at end of file +Make (sidekick.Sidekick_cc.Make)

Module Sidekick_cc.Make

Parameters

Signature

module T = A.T
module P = A.P
module Lit = A.Lit
module Actions = A.Actions
type term_state = T.Term.state
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type proof = P.t
type actions = Actions.t
type t

Global state of the congruence closure

module N : sig ... end

An equivalence class is a set of terms that are currently equal in the partial model built by the solver. The class is represented by a collection of nodes, one of which is distinguished and is called the "representative".

module Expl : sig ... end
type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t
val term_state : t -> term_state
val find : t -> node -> repr

Current representative

val add_term : t -> term -> node

Add the term to the congruence closure, if not present already. Will be backtracked.

val mem_term : t -> term -> bool

Returns true if the term is explicitly present in the congruence closure

type ev_on_pre_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit
type ev_on_post_merge = t -> actions -> N.t -> N.t -> unit
type ev_on_new_term = t -> N.t -> term -> unit
type ev_on_conflict = t -> th:bool -> lit list -> unit
type ev_on_propagate = t -> lit -> (unit -> lit list) -> unit
type ev_on_is_subterm = N.t -> term -> unit
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_pre_merge:ev_on_pre_merge list -> ?⁠on_post_merge:ev_on_post_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠on_is_subterm:ev_on_is_subterm list -> ?⁠size:[ `Small | `Big ] -> term_state -> t

Create a new congruence closure.

val allocate_bitfield : descr:string -> t -> N.bitfield

Allocate a new bitfield for the nodes. See N.bitfield.

val set_bitfield : t -> N.bitfield -> bool -> N.t -> unit

Set the bitfield for the node. This will be backtracked. See N.bitfield.

val on_pre_merge : t -> ev_on_pre_merge -> unit

Add a function to be called when two classes are merged

val on_post_merge : t -> ev_on_post_merge -> unit

Add a function to be called when two classes are merged

val on_new_term : t -> ev_on_new_term -> unit

Add a function to be called when a new node is created

val on_conflict : t -> ev_on_conflict -> unit

Called when the congruence closure finds a conflict

val on_propagate : t -> ev_on_propagate -> unit

Called when the congruence closure propagates a literal

val on_is_subterm : t -> ev_on_is_subterm -> unit

Called on terms that are subterms of function symbols

val set_as_lit : t -> N.t -> lit -> unit

map the given node to a literal.

val find_t : t -> term -> repr

Current representative of the term.

raises Not_found

if the term is not already add-ed.

val add_seq : t -> term Iter.t -> unit

Add a sequence of terms to the congruence closure

val all_classes : t -> repr Iter.t

All current classes. This is costly, only use if there is no other solution

val assert_lit : t -> lit -> unit

Given a literal, assume it in the congruence closure and propagate its consequences. Will be backtracked.

Useful for the theory combination or the SAT solver's functor

val assert_lits : t -> lit Iter.t -> unit

Addition of many literals

val explain_eq : t -> N.t -> N.t -> lit list

Explain why the two nodes are equal. Fails if they are not, in an unspecified way

val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given explanation it must be a theory tautology that expl ==> absurd. To be used in theories.

val n_true : t -> N.t
val n_false : t -> N.t
val n_bool : t -> bool -> N.t
val merge : t -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val merge_t : t -> term -> term -> Expl.t -> unit

Shortcut for adding + merging

val check : t -> actions -> unit

Perform all pending operations done via assert_eq, assert_lit, etc. Will use the actions to propagate literals, declare conflicts, etc.

val new_merges : t -> bool

Called after check, returns true if some pairs of classes were merged.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Restore to state n calls to push_level earlier. Used during backtracking.

val get_model : t -> N.t Iter.t Iter.t

get all the equivalence classes so they can be merged in the model

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_cc/index.html b/dev/sidekick/Sidekick_cc/index.html index 6a6ca268..9016c97e 100644 --- a/dev/sidekick/Sidekick_cc/index.html +++ b/dev/sidekick/Sidekick_cc/index.html @@ -1,2 +1,2 @@ -Sidekick_cc (sidekick.Sidekick_cc)

Module Sidekick_cc

Congruence Closure

module type S = Sidekick_core.CC_S
module Make : functor (CC_A : ARG) -> S with module CC_A = CC_A
\ No newline at end of file +Sidekick_cc (sidekick.Sidekick_cc)

Module Sidekick_cc

Congruence Closure

module type S = Sidekick_core.CC_S
module Make : functor (A : Sidekick_core.CC_ARG) -> S with module T = A.T and module Lit = A.Lit and module P = A.P and module Actions = A.Actions
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_cc/module-type-ARG/A/Fun/index.html b/dev/sidekick/Sidekick_cc/module-type-ARG/A/Fun/index.html deleted file mode 100644 index c5a75bdb..00000000 --- a/dev/sidekick/Sidekick_cc/module-type-ARG/A/Fun/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Fun (sidekick.Sidekick_cc.ARG.A.Fun)

Module A.Fun

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_cc/module-type-ARG/A/Proof/index.html b/dev/sidekick/Sidekick_cc/module-type-ARG/A/Proof/index.html deleted file mode 100644 index 2d3c968d..00000000 --- a/dev/sidekick/Sidekick_cc/module-type-ARG/A/Proof/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Proof (sidekick.Sidekick_cc.ARG.A.Proof)

Module A.Proof

type t
val pp : t Sidekick_core.Fmt.printer
val default : t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_cc/module-type-ARG/A/Term/index.html b/dev/sidekick/Sidekick_cc/module-type-ARG/A/Term/index.html deleted file mode 100644 index 98b831ec..00000000 --- a/dev/sidekick/Sidekick_cc/module-type-ARG/A/Term/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Term (sidekick.Sidekick_cc.ARG.A.Term)

Module A.Term

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type state
val ty : t -> Ty.t
val bool : state -> bool -> t
val as_bool : t -> bool option
val abs : state -> t -> t * bool
val map_shallow : state -> (t -> t) -> t -> t

Map function on immediate subterms

val iter_dag : t -> (t -> unit) -> unit
module Tbl : CCHashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_cc/module-type-ARG/A/Ty/index.html b/dev/sidekick/Sidekick_cc/module-type-ARG/A/Ty/index.html deleted file mode 100644 index e8f183ab..00000000 --- a/dev/sidekick/Sidekick_cc/module-type-ARG/A/Ty/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Ty (sidekick.Sidekick_cc.ARG.A.Ty)

Module A.Ty

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
val bool : t
val is_bool : t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_cc/module-type-ARG/A/index.html b/dev/sidekick/Sidekick_cc/module-type-ARG/A/index.html deleted file mode 100644 index 92afbf3e..00000000 --- a/dev/sidekick/Sidekick_cc/module-type-ARG/A/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -A (sidekick.Sidekick_cc.ARG.A)

Module ARG.A

include Sidekick_core.TERM
module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
module Proof : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_cc/module-type-ARG/Actions/index.html b/dev/sidekick/Sidekick_cc/module-type-ARG/Actions/index.html deleted file mode 100644 index 15ceb772..00000000 --- a/dev/sidekick/Sidekick_cc/module-type-ARG/Actions/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Actions (sidekick.Sidekick_cc.ARG.Actions)

Module ARG.Actions

type t
val raise_conflict : t -> Lit.t list -> A.Proof.t -> 'a
val propagate : t -> Lit.t -> reason:(unit -> Lit.t list) -> A.Proof.t -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_cc/module-type-ARG/Lit/index.html b/dev/sidekick/Sidekick_cc/module-type-ARG/Lit/index.html deleted file mode 100644 index b99d984c..00000000 --- a/dev/sidekick/Sidekick_cc/module-type-ARG/Lit/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Lit (sidekick.Sidekick_cc.ARG.Lit)

Module ARG.Lit

type t
val term : t -> A.Term.t
val sign : t -> bool
val neg : t -> t
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_cc/module-type-ARG/index.html b/dev/sidekick/Sidekick_cc/module-type-ARG/index.html deleted file mode 100644 index d5d5658d..00000000 --- a/dev/sidekick/Sidekick_cc/module-type-ARG/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -ARG (sidekick.Sidekick_cc.ARG)

Module type Sidekick_cc.ARG

val cc_view : A.Term.t -> (A.Fun.tA.Term.tA.Term.t Iter.t) Sidekick_core.CC_view.t

View the term through the lens of the congruence closure

module Lit : sig ... end
module Actions : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_cc/module-type-S/Actions/index.html b/dev/sidekick/Sidekick_cc/module-type-S/Actions/index.html new file mode 100644 index 00000000..36432eee --- /dev/null +++ b/dev/sidekick/Sidekick_cc/module-type-S/Actions/index.html @@ -0,0 +1,2 @@ + +Actions (sidekick.Sidekick_cc.S.Actions)

Module S.Actions

module T = T
module P = P
module Lit = Lit
type t
val raise_conflict : t -> Lit.t list -> P.t -> 'a
val propagate : t -> Lit.t -> reason:(unit -> Lit.t list) -> P.t -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_cc/module-type-S/CC_A/A/Fun/index.html b/dev/sidekick/Sidekick_cc/module-type-S/CC_A/A/Fun/index.html deleted file mode 100644 index be6caceb..00000000 --- a/dev/sidekick/Sidekick_cc/module-type-S/CC_A/A/Fun/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Fun (sidekick.Sidekick_cc.S.CC_A.A.Fun)

Module A.Fun

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_cc/module-type-S/CC_A/A/Proof/index.html b/dev/sidekick/Sidekick_cc/module-type-S/CC_A/A/Proof/index.html deleted file mode 100644 index 8654bb9f..00000000 --- a/dev/sidekick/Sidekick_cc/module-type-S/CC_A/A/Proof/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Proof (sidekick.Sidekick_cc.S.CC_A.A.Proof)

Module A.Proof

type t
val pp : t Sidekick_core.Fmt.printer
val default : t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_cc/module-type-S/CC_A/A/Term/index.html b/dev/sidekick/Sidekick_cc/module-type-S/CC_A/A/Term/index.html deleted file mode 100644 index fe66b39f..00000000 --- a/dev/sidekick/Sidekick_cc/module-type-S/CC_A/A/Term/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Term (sidekick.Sidekick_cc.S.CC_A.A.Term)

Module A.Term

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type state
val ty : t -> Ty.t
val bool : state -> bool -> t
val as_bool : t -> bool option
val abs : state -> t -> t * bool
val map_shallow : state -> (t -> t) -> t -> t

Map function on immediate subterms

val iter_dag : t -> (t -> unit) -> unit
module Tbl : CCHashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_cc/module-type-S/CC_A/A/Ty/index.html b/dev/sidekick/Sidekick_cc/module-type-S/CC_A/A/Ty/index.html deleted file mode 100644 index 3ef70c7b..00000000 --- a/dev/sidekick/Sidekick_cc/module-type-S/CC_A/A/Ty/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Ty (sidekick.Sidekick_cc.S.CC_A.A.Ty)

Module A.Ty

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
val bool : t
val is_bool : t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_cc/module-type-S/CC_A/A/index.html b/dev/sidekick/Sidekick_cc/module-type-S/CC_A/A/index.html deleted file mode 100644 index 4c1e7112..00000000 --- a/dev/sidekick/Sidekick_cc/module-type-S/CC_A/A/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -A (sidekick.Sidekick_cc.S.CC_A.A)

Module CC_A.A

include Sidekick_core.TERM
module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
module Proof : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_cc/module-type-S/CC_A/Actions/index.html b/dev/sidekick/Sidekick_cc/module-type-S/CC_A/Actions/index.html deleted file mode 100644 index 9308be3f..00000000 --- a/dev/sidekick/Sidekick_cc/module-type-S/CC_A/Actions/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Actions (sidekick.Sidekick_cc.S.CC_A.Actions)

Module CC_A.Actions

type t
val raise_conflict : t -> Lit.t list -> A.Proof.t -> 'a
val propagate : t -> Lit.t -> reason:(unit -> Lit.t list) -> A.Proof.t -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_cc/module-type-S/CC_A/Lit/index.html b/dev/sidekick/Sidekick_cc/module-type-S/CC_A/Lit/index.html deleted file mode 100644 index f2d5c235..00000000 --- a/dev/sidekick/Sidekick_cc/module-type-S/CC_A/Lit/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Lit (sidekick.Sidekick_cc.S.CC_A.Lit)

Module CC_A.Lit

type t
val term : t -> A.Term.t
val sign : t -> bool
val neg : t -> t
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_cc/module-type-S/CC_A/index.html b/dev/sidekick/Sidekick_cc/module-type-S/CC_A/index.html deleted file mode 100644 index 16cfd0a8..00000000 --- a/dev/sidekick/Sidekick_cc/module-type-S/CC_A/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -CC_A (sidekick.Sidekick_cc.S.CC_A)

Module S.CC_A

val cc_view : A.Term.t -> (A.Fun.tA.Term.tA.Term.t Iter.t) Sidekick_core.CC_view.t

View the term through the lens of the congruence closure

module Lit : sig ... end
module Actions : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_cc/module-type-S/Expl/index.html b/dev/sidekick/Sidekick_cc/module-type-S/Expl/index.html index 1ad2f090..08d95187 100644 --- a/dev/sidekick/Sidekick_cc/module-type-S/Expl/index.html +++ b/dev/sidekick/Sidekick_cc/module-type-S/Expl/index.html @@ -1,2 +1,2 @@ -Expl (sidekick.Sidekick_cc.S.Expl)

Module S.Expl

type t
val pp : t Sidekick_core.Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
\ No newline at end of file +Expl (sidekick.Sidekick_cc.S.Expl)

Module S.Expl

type t
val pp : t Sidekick_core.Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
val mk_theory : t -> t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_cc/module-type-S/Lit/index.html b/dev/sidekick/Sidekick_cc/module-type-S/Lit/index.html new file mode 100644 index 00000000..07f7ec1f --- /dev/null +++ b/dev/sidekick/Sidekick_cc/module-type-S/Lit/index.html @@ -0,0 +1,2 @@ + +Lit (sidekick.Sidekick_cc.S.Lit)

Module S.Lit

module T = T
type t
val term : t -> T.Term.t
val sign : t -> bool
val neg : t -> t
val abs : t -> t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_cc/module-type-S/N/index.html b/dev/sidekick/Sidekick_cc/module-type-S/N/index.html index 61eca7b8..2ce357cb 100644 --- a/dev/sidekick/Sidekick_cc/module-type-S/N/index.html +++ b/dev/sidekick/Sidekick_cc/module-type-S/N/index.html @@ -1,2 +1,2 @@ -N (sidekick.Sidekick_cc.S.N)

Module S.N

An equivalence class is a set of terms that are currently equal in the partial model built by the solver. The class is represented by a collection of nodes, one of which is distinguished and is called the "representative".

All information pertaining to the whole equivalence class is stored in this representative's node.

When two classes become equal (are "merged"), one of the two representatives is picked as the representative of the new class. The new class contains the union of the two old classes' nodes.

We also allow theories to store additional information in the representative. This information can be used when two classes are merged, to detect conflicts and solve equations à la Shostak.

type t
val term : t -> term
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
val is_root : t -> bool

Is the node a root (ie the representative of its class)?

val iter_class : t -> t Iter.t

Traverse the congruence class. Precondition: is_root n (see find below)

val iter_parents : t -> t Iter.t

Traverse the parents of the class. Precondition: is_root n (see find below)

\ No newline at end of file +N (sidekick.Sidekick_cc.S.N)

Module S.N

An equivalence class is a set of terms that are currently equal in the partial model built by the solver. The class is represented by a collection of nodes, one of which is distinguished and is called the "representative".

All information pertaining to the whole equivalence class is stored in this representative's node.

When two classes become equal (are "merged"), one of the two representatives is picked as the representative of the new class. The new class contains the union of the two old classes' nodes.

We also allow theories to store additional information in the representative. This information can be used when two classes are merged, to detect conflicts and solve equations à la Shostak.

type t
val term : t -> term
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
val is_root : t -> bool

Is the node a root (ie the representative of its class)?

val iter_class : t -> t Iter.t

Traverse the congruence class. Precondition: is_root n (see find below)

val iter_parents : t -> t Iter.t

Traverse the parents of the class. Precondition: is_root n (see find below)

type bitfield

A field in the bitfield of this node. This should only be allocated when a theory is initialized.

All fields are initially 0, are backtracked automatically, and are merged automatically when classes are merged.

val get_field : bitfield -> t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_cc/module-type-S/P/index.html b/dev/sidekick/Sidekick_cc/module-type-S/P/index.html new file mode 100644 index 00000000..1594c141 --- /dev/null +++ b/dev/sidekick/Sidekick_cc/module-type-S/P/index.html @@ -0,0 +1,2 @@ + +P (sidekick.Sidekick_cc.S.P)

Module S.P

type t
val pp : t Sidekick_core.Fmt.printer
val default : t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_cc/module-type-S/T/Fun/index.html b/dev/sidekick/Sidekick_cc/module-type-S/T/Fun/index.html new file mode 100644 index 00000000..f6a16292 --- /dev/null +++ b/dev/sidekick/Sidekick_cc/module-type-S/T/Fun/index.html @@ -0,0 +1,2 @@ + +Fun (sidekick.Sidekick_cc.S.T.Fun)

Module T.Fun

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_cc/module-type-S/T/Term/index.html b/dev/sidekick/Sidekick_cc/module-type-S/T/Term/index.html new file mode 100644 index 00000000..e38ac849 --- /dev/null +++ b/dev/sidekick/Sidekick_cc/module-type-S/T/Term/index.html @@ -0,0 +1,2 @@ + +Term (sidekick.Sidekick_cc.S.T.Term)

Module T.Term

type t
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type state
val ty : t -> Ty.t
val bool : state -> bool -> t
val as_bool : t -> bool option
val abs : state -> t -> t * bool
val map_shallow : state -> (t -> t) -> t -> t

Map function on immediate subterms

val iter_dag : t -> (t -> unit) -> unit
module Tbl : CCHashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_cc/module-type-S/T/Ty/index.html b/dev/sidekick/Sidekick_cc/module-type-S/T/Ty/index.html new file mode 100644 index 00000000..514208ab --- /dev/null +++ b/dev/sidekick/Sidekick_cc/module-type-S/T/Ty/index.html @@ -0,0 +1,2 @@ + +Ty (sidekick.Sidekick_cc.S.T.Ty)

Module T.Ty

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type state
val bool : state -> t
val is_bool : t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_cc/module-type-S/T/index.html b/dev/sidekick/Sidekick_cc/module-type-S/T/index.html new file mode 100644 index 00000000..d6715ca5 --- /dev/null +++ b/dev/sidekick/Sidekick_cc/module-type-S/T/index.html @@ -0,0 +1,2 @@ + +T (sidekick.Sidekick_cc.S.T)

Module S.T

module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_cc/module-type-S/index.html b/dev/sidekick/Sidekick_cc/module-type-S/index.html index 25a05cc7..abb645be 100644 --- a/dev/sidekick/Sidekick_cc/module-type-S/index.html +++ b/dev/sidekick/Sidekick_cc/module-type-S/index.html @@ -1,2 +1,2 @@ -S (sidekick.Sidekick_cc.S)

Module type Sidekick_cc.S

module A = CC_A.A
type term_state = A.Term.state
type term = A.Term.t
type fun_ = A.Fun.t
type lit = CC_A.Lit.t
type proof = A.Proof.t
type actions = CC_A.Actions.t
type t

Global state of the congruence closure

module N : sig ... end

An equivalence class is a set of terms that are currently equal in the partial model built by the solver. The class is represented by a collection of nodes, one of which is distinguished and is called the "representative".

module Expl : sig ... end
type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t
val term_state : t -> term_state
val find : t -> node -> repr

Current representative

val add_term : t -> term -> node

Add the term to the congruence closure, if not present already. Will be backtracked.

type ev_on_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit
type ev_on_new_term = t -> N.t -> term -> unit
type ev_on_conflict = t -> lit list -> unit
type ev_on_propagate = t -> lit -> (unit -> lit list) -> unit
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_merge:ev_on_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠size:[ `Small | `Big ] -> term_state -> t

Create a new congruence closure.

val on_merge : t -> ev_on_merge -> unit

Add a function to be called when two classes are merged

val on_new_term : t -> ev_on_new_term -> unit

Add a function to be called when a new node is created

val on_conflict : t -> ev_on_conflict -> unit

Called when the congruence closure finds a conflict

val on_propagate : t -> ev_on_propagate -> unit

Called when the congruence closure propagates a literal

val set_as_lit : t -> N.t -> lit -> unit

map the given node to a literal.

val find_t : t -> term -> repr

Current representative of the term.

raises Not_found

if the term is not already add-ed.

val add_seq : t -> term Iter.t -> unit

Add a sequence of terms to the congruence closure

val all_classes : t -> repr Iter.t

All current classes. This is costly, only use if there is no other solution

val assert_lit : t -> lit -> unit

Given a literal, assume it in the congruence closure and propagate its consequences. Will be backtracked.

Useful for the theory combination or the SAT solver's functor

val assert_lits : t -> lit Iter.t -> unit

Addition of many literals

val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given explanation it must be a theory tautology that expl ==> absurd. To be used in theories.

val merge : t -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val check : t -> actions -> unit

Perform all pending operations done via assert_eq, assert_lit, etc. Will use the actions to propagate literals, declare conflicts, etc.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Restore to state n calls to push_level earlier. Used during backtracking.

val get_model : t -> N.t Iter.t Iter.t

get all the equivalence classes so they can be merged in the model

\ No newline at end of file +S (sidekick.Sidekick_cc.S)

Module type Sidekick_cc.S

module Lit : Sidekick_core.LIT with module T = T
module Actions : Sidekick_core.CC_ACTIONS with module T = T and module Lit = Lit and module P = P
type term_state = T.Term.state
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type proof = P.t
type actions = Actions.t
type t

Global state of the congruence closure

module N : sig ... end

An equivalence class is a set of terms that are currently equal in the partial model built by the solver. The class is represented by a collection of nodes, one of which is distinguished and is called the "representative".

module Expl : sig ... end
type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t
val term_state : t -> term_state
val find : t -> node -> repr

Current representative

val add_term : t -> term -> node

Add the term to the congruence closure, if not present already. Will be backtracked.

val mem_term : t -> term -> bool

Returns true if the term is explicitly present in the congruence closure

type ev_on_pre_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit
type ev_on_post_merge = t -> actions -> N.t -> N.t -> unit
type ev_on_new_term = t -> N.t -> term -> unit
type ev_on_conflict = t -> th:bool -> lit list -> unit
type ev_on_propagate = t -> lit -> (unit -> lit list) -> unit
type ev_on_is_subterm = N.t -> term -> unit
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_pre_merge:ev_on_pre_merge list -> ?⁠on_post_merge:ev_on_post_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠on_is_subterm:ev_on_is_subterm list -> ?⁠size:[ `Small | `Big ] -> term_state -> t

Create a new congruence closure.

val allocate_bitfield : descr:string -> t -> N.bitfield

Allocate a new bitfield for the nodes. See N.bitfield.

val set_bitfield : t -> N.bitfield -> bool -> N.t -> unit

Set the bitfield for the node. This will be backtracked. See N.bitfield.

val on_pre_merge : t -> ev_on_pre_merge -> unit

Add a function to be called when two classes are merged

val on_post_merge : t -> ev_on_post_merge -> unit

Add a function to be called when two classes are merged

val on_new_term : t -> ev_on_new_term -> unit

Add a function to be called when a new node is created

val on_conflict : t -> ev_on_conflict -> unit

Called when the congruence closure finds a conflict

val on_propagate : t -> ev_on_propagate -> unit

Called when the congruence closure propagates a literal

val on_is_subterm : t -> ev_on_is_subterm -> unit

Called on terms that are subterms of function symbols

val set_as_lit : t -> N.t -> lit -> unit

map the given node to a literal.

val find_t : t -> term -> repr

Current representative of the term.

raises Not_found

if the term is not already add-ed.

val add_seq : t -> term Iter.t -> unit

Add a sequence of terms to the congruence closure

val all_classes : t -> repr Iter.t

All current classes. This is costly, only use if there is no other solution

val assert_lit : t -> lit -> unit

Given a literal, assume it in the congruence closure and propagate its consequences. Will be backtracked.

Useful for the theory combination or the SAT solver's functor

val assert_lits : t -> lit Iter.t -> unit

Addition of many literals

val explain_eq : t -> N.t -> N.t -> lit list

Explain why the two nodes are equal. Fails if they are not, in an unspecified way

val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given explanation it must be a theory tautology that expl ==> absurd. To be used in theories.

val n_true : t -> N.t
val n_false : t -> N.t
val n_bool : t -> bool -> N.t
val merge : t -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val merge_t : t -> term -> term -> Expl.t -> unit

Shortcut for adding + merging

val check : t -> actions -> unit

Perform all pending operations done via assert_eq, assert_lit, etc. Will use the actions to propagate literals, declare conflicts, etc.

val new_merges : t -> bool

Called after check, returns true if some pairs of classes were merged.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Restore to state n calls to push_level earlier. Used during backtracking.

val get_model : t -> N.t Iter.t Iter.t

get all the equivalence classes so they can be merged in the model

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/CC_view/index.html b/dev/sidekick/Sidekick_core/CC_view/index.html index 49bee4d2..f3cc74aa 100644 --- a/dev/sidekick/Sidekick_core/CC_view/index.html +++ b/dev/sidekick/Sidekick_core/CC_view/index.html @@ -1,2 +1,2 @@ -CC_view (sidekick.Sidekick_core.CC_view)

Module Sidekick_core.CC_view

type ('f, 't, 'ts) t =
| Bool of bool
| App_fun of 'f * 'ts
| App_ho of 't * 'ts
| If of 't * 't * 't
| Eq of 't * 't
| Not of 't
| Opaque of 't
val map_view : f_f:('a -> 'b) -> f_t:('c -> 'd) -> f_ts:('e -> 'f) -> ('a'c'e) t -> ('b'd'f) t
val iter_view : f_f:('a -> unit) -> f_t:('b -> unit) -> f_ts:('c -> unit) -> ('a'b'c) t -> unit
\ No newline at end of file +CC_view (sidekick.Sidekick_core.CC_view)

Module Sidekick_core.CC_view

View terms through the lens of the Congruence Closure

type ('f, 't, 'ts) t =
| Bool of bool
| App_fun of 'f * 'ts
| App_ho of 't * 't
| If of 't * 't * 't
| Eq of 't * 't
| Not of 't
| Opaque of 't

A view of a term fron the point of view of the congruence closure.

  • 'f is the type of function symbols
  • 't is the type of terms
  • 'ts is the type of sequences of terms (arguments of function application)
val map_view : f_f:('a -> 'b) -> f_t:('c -> 'd) -> f_ts:('e -> 'f) -> ('a'c'e) t -> ('b'd'f) t

Map function over a view, one level deep. Each function maps over a different type, e.g. f_t maps over terms

val iter_view : f_f:('a -> unit) -> f_t:('b -> unit) -> f_ts:('c -> unit) -> ('a'b'c) t -> unit

Iterate over a view, one level deep.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/CC/Actions/index.html b/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/CC/Actions/index.html new file mode 100644 index 00000000..a4dbca98 --- /dev/null +++ b/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/CC/Actions/index.html @@ -0,0 +1,2 @@ + +Actions (sidekick.Sidekick_core.Monoid_of_repr.1-M.SI.CC.Actions)

Module CC.Actions

module T = T
module P = P
module Lit = Lit
type t = actions
val raise_conflict : t -> Lit.t list -> P.t -> 'a
val propagate : t -> Lit.t -> reason:(unit -> Lit.t list) -> P.t -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/CC/Expl/index.html b/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/CC/Expl/index.html new file mode 100644 index 00000000..a13623ce --- /dev/null +++ b/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/CC/Expl/index.html @@ -0,0 +1,2 @@ + +Expl (sidekick.Sidekick_core.Monoid_of_repr.1-M.SI.CC.Expl)

Module CC.Expl

type t
val pp : t Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
val mk_theory : t -> t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/CC/N/index.html b/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/CC/N/index.html new file mode 100644 index 00000000..e4924f41 --- /dev/null +++ b/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/CC/N/index.html @@ -0,0 +1,2 @@ + +N (sidekick.Sidekick_core.Monoid_of_repr.1-M.SI.CC.N)

Module CC.N

An equivalence class is a set of terms that are currently equal in the partial model built by the solver. The class is represented by a collection of nodes, one of which is distinguished and is called the "representative".

All information pertaining to the whole equivalence class is stored in this representative's node.

When two classes become equal (are "merged"), one of the two representatives is picked as the representative of the new class. The new class contains the union of the two old classes' nodes.

We also allow theories to store additional information in the representative. This information can be used when two classes are merged, to detect conflicts and solve equations à la Shostak.

type t
val term : t -> term
val equal : t -> t -> bool
val hash : t -> int
val pp : t Fmt.printer
val is_root : t -> bool

Is the node a root (ie the representative of its class)?

val iter_class : t -> t Iter.t

Traverse the congruence class. Precondition: is_root n (see find below)

val iter_parents : t -> t Iter.t

Traverse the parents of the class. Precondition: is_root n (see find below)

type bitfield

A field in the bitfield of this node. This should only be allocated when a theory is initialized.

All fields are initially 0, are backtracked automatically, and are merged automatically when classes are merged.

val get_field : bitfield -> t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/CC/index.html b/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/CC/index.html new file mode 100644 index 00000000..542ce95a --- /dev/null +++ b/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/CC/index.html @@ -0,0 +1,2 @@ + +CC (sidekick.Sidekick_core.Monoid_of_repr.1-M.SI.CC)

Module SI.CC

module T = T
module P = P
module Lit = Lit
module Actions : CC_ACTIONS with module T = T and module Lit = Lit and module P = P and type t = actions
type term_state = T.Term.state
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type proof = P.t
type actions = Actions.t
type t

Global state of the congruence closure

module N : sig ... end

An equivalence class is a set of terms that are currently equal in the partial model built by the solver. The class is represented by a collection of nodes, one of which is distinguished and is called the "representative".

module Expl : sig ... end
type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t
val term_state : t -> term_state
val find : t -> node -> repr

Current representative

val add_term : t -> term -> node

Add the term to the congruence closure, if not present already. Will be backtracked.

val mem_term : t -> term -> bool

Returns true if the term is explicitly present in the congruence closure

type ev_on_pre_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit
type ev_on_post_merge = t -> actions -> N.t -> N.t -> unit
type ev_on_new_term = t -> N.t -> term -> unit
type ev_on_conflict = t -> th:bool -> lit list -> unit
type ev_on_propagate = t -> lit -> (unit -> lit list) -> unit
type ev_on_is_subterm = N.t -> term -> unit
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_pre_merge:ev_on_pre_merge list -> ?⁠on_post_merge:ev_on_post_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠on_is_subterm:ev_on_is_subterm list -> ?⁠size:[ `Small | `Big ] -> term_state -> t

Create a new congruence closure.

val allocate_bitfield : descr:string -> t -> N.bitfield

Allocate a new bitfield for the nodes. See N.bitfield.

val set_bitfield : t -> N.bitfield -> bool -> N.t -> unit

Set the bitfield for the node. This will be backtracked. See N.bitfield.

val on_pre_merge : t -> ev_on_pre_merge -> unit

Add a function to be called when two classes are merged

val on_post_merge : t -> ev_on_post_merge -> unit

Add a function to be called when two classes are merged

val on_new_term : t -> ev_on_new_term -> unit

Add a function to be called when a new node is created

val on_conflict : t -> ev_on_conflict -> unit

Called when the congruence closure finds a conflict

val on_propagate : t -> ev_on_propagate -> unit

Called when the congruence closure propagates a literal

val on_is_subterm : t -> ev_on_is_subterm -> unit

Called on terms that are subterms of function symbols

val set_as_lit : t -> N.t -> lit -> unit

map the given node to a literal.

val find_t : t -> term -> repr

Current representative of the term.

raises Not_found

if the term is not already add-ed.

val add_seq : t -> term Iter.t -> unit

Add a sequence of terms to the congruence closure

val all_classes : t -> repr Iter.t

All current classes. This is costly, only use if there is no other solution

val assert_lit : t -> lit -> unit

Given a literal, assume it in the congruence closure and propagate its consequences. Will be backtracked.

Useful for the theory combination or the SAT solver's functor

val assert_lits : t -> lit Iter.t -> unit

Addition of many literals

val explain_eq : t -> N.t -> N.t -> lit list

Explain why the two nodes are equal. Fails if they are not, in an unspecified way

val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given explanation it must be a theory tautology that expl ==> absurd. To be used in theories.

val n_true : t -> N.t
val n_false : t -> N.t
val n_bool : t -> bool -> N.t
val merge : t -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val merge_t : t -> term -> term -> Expl.t -> unit

Shortcut for adding + merging

val check : t -> actions -> unit

Perform all pending operations done via assert_eq, assert_lit, etc. Will use the actions to propagate literals, declare conflicts, etc.

val new_merges : t -> bool

Called after check, returns true if some pairs of classes were merged.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Restore to state n calls to push_level earlier. Used during backtracking.

val get_model : t -> N.t Iter.t Iter.t

get all the equivalence classes so they can be merged in the model

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/Lit/index.html b/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/Lit/index.html new file mode 100644 index 00000000..b4c8ca2b --- /dev/null +++ b/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/Lit/index.html @@ -0,0 +1,2 @@ + +Lit (sidekick.Sidekick_core.Monoid_of_repr.1-M.SI.Lit)

Module SI.Lit

Literals

A literal is a (preprocessed) term along with its sign. It is directly manipulated by the SAT solver.

module T = T
type t
val term : t -> T.Term.t
val sign : t -> bool
val neg : t -> t
val abs : t -> t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/P/index.html b/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/P/index.html new file mode 100644 index 00000000..4ebd439f --- /dev/null +++ b/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/P/index.html @@ -0,0 +1,2 @@ + +P (sidekick.Sidekick_core.Monoid_of_repr.1-M.SI.P)

Module SI.P

type t
val pp : t Fmt.printer
val default : t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/Simplify/index.html b/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/Simplify/index.html new file mode 100644 index 00000000..f14e493d --- /dev/null +++ b/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/Simplify/index.html @@ -0,0 +1,2 @@ + +Simplify (sidekick.Sidekick_core.Monoid_of_repr.1-M.SI.Simplify)

Module SI.Simplify

type t
val tst : t -> term_state
val ty_st : t -> ty_state
val clear : t -> unit

Reset internal cache, etc.

type hook = t -> term -> term option

Given a term, try to simplify it. Return None if it didn't change.

val normalize : t -> term -> term

Normalize a term using all the hooks.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/T/Fun/index.html b/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/T/Fun/index.html new file mode 100644 index 00000000..763943db --- /dev/null +++ b/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/T/Fun/index.html @@ -0,0 +1,2 @@ + +Fun (sidekick.Sidekick_core.Monoid_of_repr.1-M.SI.T.Fun)

Module T.Fun

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/T/Term/index.html b/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/T/Term/index.html new file mode 100644 index 00000000..05369faf --- /dev/null +++ b/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/T/Term/index.html @@ -0,0 +1,2 @@ + +Term (sidekick.Sidekick_core.Monoid_of_repr.1-M.SI.T.Term)

Module T.Term

type t
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val pp : t Fmt.printer
type state
val ty : t -> Ty.t
val bool : state -> bool -> t
val as_bool : t -> bool option
val abs : state -> t -> t * bool
val map_shallow : state -> (t -> t) -> t -> t

Map function on immediate subterms

val iter_dag : t -> (t -> unit) -> unit
module Tbl : CCHashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/T/Ty/index.html b/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/T/Ty/index.html new file mode 100644 index 00000000..e03e14f7 --- /dev/null +++ b/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/T/Ty/index.html @@ -0,0 +1,2 @@ + +Ty (sidekick.Sidekick_core.Monoid_of_repr.1-M.SI.T.Ty)

Module T.Ty

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Fmt.printer
type state
val bool : state -> t
val is_bool : t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/T/index.html b/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/T/index.html new file mode 100644 index 00000000..754959f2 --- /dev/null +++ b/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/T/index.html @@ -0,0 +1,2 @@ + +T (sidekick.Sidekick_core.Monoid_of_repr.1-M.SI.T)

Module SI.T

module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/index.html b/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/index.html new file mode 100644 index 00000000..522c2dfe --- /dev/null +++ b/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/index.html @@ -0,0 +1,2 @@ + +SI (sidekick.Sidekick_core.Monoid_of_repr.1-M.SI)

Module 1-M.SI

module T : TERM
module P : PROOF
type ty = T.Ty.t
type term = T.Term.t
type term_state = T.Term.state
type ty_state = T.Ty.state
type proof = P.t
type t

Main type for a solver

type solver = t
val tst : t -> term_state
val ty_st : t -> ty_state
val stats : t -> Sidekick_util.Stat.t

Actions for the theories

type actions
module Lit : LIT with module T = T
type lit = Lit.t

Congruence Closure

module CC : CC_S with module T = T and module P = P and module Lit = Lit and type Actions.t = actions
val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end
type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit
val simplifier : t -> Simplify.t
val simp_t : t -> term -> term

hooks for the theory

val propagate : t -> actions -> lit -> reason:(unit -> lit list) -> proof -> unit

Propagate a literal for a reason. This is similar to asserting the clause reason => lit, but more lightweight, and in a way that is backtrackable.

val raise_conflict : t -> actions -> lit list -> proof -> 'a

Give a conflict clause to the solver

val push_decision : t -> actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : t -> actions -> lit -> (unit -> lit list) -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> actions -> lit -> lit list -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> actions -> lit list -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : t -> actions -> lit list -> unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> actions -> ?⁠sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val preprocess_term : t -> add_clause:(Lit.t list -> unit) -> term -> term

Preprocess a term.

val add_lit : t -> actions -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value

val add_lit_t : t -> actions -> ?⁠sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit

Callback called on every CC conflict

val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list) -> unit) -> unit

Callback called on every CC propagation

val on_partial_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

type preprocess_hook = t -> mk_lit:(term -> lit) -> add_clause:(lit list -> unit) -> term -> term option

Given a term, try to preprocess it. Return None if it didn't change. Can also add clauses to define new terms.

parameter mk_lit

creates a new literal for a boolean term.

parameter add_clause

pushes a new clause into the SAT solver.

val on_preprocess : t -> preprocess_hook -> unit

Model production

type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option

A model-production hook. It takes the solver, a class, and returns a term for this class.

val on_model_gen : t -> model_hook -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/index.html b/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/index.html new file mode 100644 index 00000000..4d16f268 --- /dev/null +++ b/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/index.html @@ -0,0 +1,2 @@ + +1-M (sidekick.Sidekick_core.Monoid_of_repr.1-M)

Parameter Monoid_of_repr.1-M

type t
val pp : t Fmt.printer
val name : string

name of the monoid's value (short)

val of_term : SI.CC.t -> SI.CC.N.t -> SI.T.Term.t -> t option * (SI.CC.N.t * t) list

of_term n t, where t is the term annotating node n, returns maybe_m, l, where:

  • maybe_m = Some m if t has monoid value m; otherwise maybe_m=None
  • l is a list of (u, m_u) where each u's term is a direct subterm of t and m_u is the monoid value attached to u.
val merge : SI.CC.t -> SI.CC.N.t -> t -> SI.CC.N.t -> t -> SI.CC.Expl.t -> (tSI.CC.Expl.t) Stdlib.result
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/Monoid_of_repr/index.html b/dev/sidekick/Sidekick_core/Monoid_of_repr/index.html new file mode 100644 index 00000000..c2548f36 --- /dev/null +++ b/dev/sidekick/Sidekick_core/Monoid_of_repr/index.html @@ -0,0 +1,2 @@ + +Monoid_of_repr (sidekick.Sidekick_core.Monoid_of_repr)

Module Sidekick_core.Monoid_of_repr

Keep track of monoid state per equivalence class

Parameters

Signature

type t
val create_and_setup : ?⁠size:int -> M.SI.t -> t
val push_level : t -> unit
val pop_levels : t -> int -> unit
val mem : t -> M.SI.CC.N.t -> bool
val get : t -> M.SI.CC.N.t -> M.t option
val iter_all : t -> (M.SI.CC.repr * M.t) Iter.t
val pp : t Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/index.html b/dev/sidekick/Sidekick_core/index.html index 60541fd1..1e22e6e8 100644 --- a/dev/sidekick/Sidekick_core/index.html +++ b/dev/sidekick/Sidekick_core/index.html @@ -1,2 +1,2 @@ -Sidekick_core (sidekick.Sidekick_core)

Module Sidekick_core

Main Environment

Theories and concrete solvers rely on an environment that defines several important types:

  • sorts
  • terms (to represent logic expressions and formulas)
  • a congruence closure instance
module Fmt = CCFormat
module type MERGE_PP = sig ... end
module CC_view : sig ... end
module type TERM = sig ... end
module type TERM_PROOF = sig ... end
module type CC_ARG = sig ... end
module type CC_S = sig ... end
module type SOLVER_INTERNAL = sig ... end

A view of the solver from a theory's point of view

module type SOLVER = sig ... end

Public view of the solver

\ No newline at end of file +Sidekick_core (sidekick.Sidekick_core)

Module Sidekick_core

Main Environment

Theories and concrete solvers rely on an environment that defines several important types:

  • sorts
  • terms (to represent logic expressions and formulas)
  • a congruence closure instance
module Fmt = CCFormat
module CC_view : sig ... end

View terms through the lens of the Congruence Closure

module type TERM = sig ... end

Main representation of Terms and Types

module type PROOF = sig ... end
module type LIT = sig ... end
module type CC_ACTIONS = sig ... end

Actions provided to the congruence closure.

module type CC_ARG = sig ... end
module type CC_S = sig ... end
module type SOLVER_INTERNAL = sig ... end

A view of the solver from a theory's point of view

module type SOLVER = sig ... end

Public view of the solver

module type MONOID_ARG = sig ... end
module Monoid_of_repr : functor (M : MONOID_ARG) -> sig ... end

Keep track of monoid state per equivalence class

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-CC_ACTIONS/Lit/index.html b/dev/sidekick/Sidekick_core/module-type-CC_ACTIONS/Lit/index.html new file mode 100644 index 00000000..2603fa3f --- /dev/null +++ b/dev/sidekick/Sidekick_core/module-type-CC_ACTIONS/Lit/index.html @@ -0,0 +1,2 @@ + +Lit (sidekick.Sidekick_core.CC_ACTIONS.Lit)

Module CC_ACTIONS.Lit

module T = T
type t
val term : t -> T.Term.t
val sign : t -> bool
val neg : t -> t
val abs : t -> t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-CC_ACTIONS/P/index.html b/dev/sidekick/Sidekick_core/module-type-CC_ACTIONS/P/index.html new file mode 100644 index 00000000..53f54ebe --- /dev/null +++ b/dev/sidekick/Sidekick_core/module-type-CC_ACTIONS/P/index.html @@ -0,0 +1,2 @@ + +P (sidekick.Sidekick_core.CC_ACTIONS.P)

Module CC_ACTIONS.P

type t
val pp : t Fmt.printer
val default : t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-CC_ACTIONS/T/Fun/index.html b/dev/sidekick/Sidekick_core/module-type-CC_ACTIONS/T/Fun/index.html new file mode 100644 index 00000000..7ee596a2 --- /dev/null +++ b/dev/sidekick/Sidekick_core/module-type-CC_ACTIONS/T/Fun/index.html @@ -0,0 +1,2 @@ + +Fun (sidekick.Sidekick_core.CC_ACTIONS.T.Fun)

Module T.Fun

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-CC_ACTIONS/T/Term/index.html b/dev/sidekick/Sidekick_core/module-type-CC_ACTIONS/T/Term/index.html new file mode 100644 index 00000000..3cc17045 --- /dev/null +++ b/dev/sidekick/Sidekick_core/module-type-CC_ACTIONS/T/Term/index.html @@ -0,0 +1,2 @@ + +Term (sidekick.Sidekick_core.CC_ACTIONS.T.Term)

Module T.Term

type t
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val pp : t Fmt.printer
type state
val ty : t -> Ty.t
val bool : state -> bool -> t
val as_bool : t -> bool option
val abs : state -> t -> t * bool
val map_shallow : state -> (t -> t) -> t -> t

Map function on immediate subterms

val iter_dag : t -> (t -> unit) -> unit
module Tbl : CCHashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-CC_ACTIONS/T/Ty/index.html b/dev/sidekick/Sidekick_core/module-type-CC_ACTIONS/T/Ty/index.html new file mode 100644 index 00000000..b31ce147 --- /dev/null +++ b/dev/sidekick/Sidekick_core/module-type-CC_ACTIONS/T/Ty/index.html @@ -0,0 +1,2 @@ + +Ty (sidekick.Sidekick_core.CC_ACTIONS.T.Ty)

Module T.Ty

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Fmt.printer
type state
val bool : state -> t
val is_bool : t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-CC_ACTIONS/T/index.html b/dev/sidekick/Sidekick_core/module-type-CC_ACTIONS/T/index.html new file mode 100644 index 00000000..1c0b827a --- /dev/null +++ b/dev/sidekick/Sidekick_core/module-type-CC_ACTIONS/T/index.html @@ -0,0 +1,2 @@ + +T (sidekick.Sidekick_core.CC_ACTIONS.T)

Module CC_ACTIONS.T

module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-CC_ACTIONS/index.html b/dev/sidekick/Sidekick_core/module-type-CC_ACTIONS/index.html new file mode 100644 index 00000000..cbdfd9be --- /dev/null +++ b/dev/sidekick/Sidekick_core/module-type-CC_ACTIONS/index.html @@ -0,0 +1,2 @@ + +CC_ACTIONS (sidekick.Sidekick_core.CC_ACTIONS)

Module type Sidekick_core.CC_ACTIONS

Actions provided to the congruence closure.

The congruence closure must be able to propagate literals when it detects that they are true or false; it must also be able to create conflicts when the set of (dis)equalities is inconsistent

module T : TERM
module P : PROOF
module Lit : LIT with module T = T
type t
val raise_conflict : t -> Lit.t list -> P.t -> 'a
val propagate : t -> Lit.t -> reason:(unit -> Lit.t list) -> P.t -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-CC_ARG/A/Fun/index.html b/dev/sidekick/Sidekick_core/module-type-CC_ARG/A/Fun/index.html deleted file mode 100644 index df4b525f..00000000 --- a/dev/sidekick/Sidekick_core/module-type-CC_ARG/A/Fun/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Fun (sidekick.Sidekick_core.CC_ARG.A.Fun)

Module A.Fun

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-CC_ARG/A/Proof/index.html b/dev/sidekick/Sidekick_core/module-type-CC_ARG/A/Proof/index.html deleted file mode 100644 index b2daffb0..00000000 --- a/dev/sidekick/Sidekick_core/module-type-CC_ARG/A/Proof/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Proof (sidekick.Sidekick_core.CC_ARG.A.Proof)

Module A.Proof

type t
val pp : t Fmt.printer
val default : t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-CC_ARG/A/Term/index.html b/dev/sidekick/Sidekick_core/module-type-CC_ARG/A/Term/index.html deleted file mode 100644 index 75d79baa..00000000 --- a/dev/sidekick/Sidekick_core/module-type-CC_ARG/A/Term/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Term (sidekick.Sidekick_core.CC_ARG.A.Term)

Module A.Term

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Fmt.printer
type state
val ty : t -> Ty.t
val bool : state -> bool -> t
val as_bool : t -> bool option
val abs : state -> t -> t * bool
val map_shallow : state -> (t -> t) -> t -> t

Map function on immediate subterms

val iter_dag : t -> (t -> unit) -> unit
module Tbl : CCHashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-CC_ARG/A/Ty/index.html b/dev/sidekick/Sidekick_core/module-type-CC_ARG/A/Ty/index.html deleted file mode 100644 index 251b8db4..00000000 --- a/dev/sidekick/Sidekick_core/module-type-CC_ARG/A/Ty/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Ty (sidekick.Sidekick_core.CC_ARG.A.Ty)

Module A.Ty

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Fmt.printer
val bool : t
val is_bool : t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-CC_ARG/A/index.html b/dev/sidekick/Sidekick_core/module-type-CC_ARG/A/index.html deleted file mode 100644 index c69e64f4..00000000 --- a/dev/sidekick/Sidekick_core/module-type-CC_ARG/A/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -A (sidekick.Sidekick_core.CC_ARG.A)

Module CC_ARG.A

include TERM
module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
module Proof : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-CC_ARG/Actions/index.html b/dev/sidekick/Sidekick_core/module-type-CC_ARG/Actions/index.html index b6bd63ce..4f5cbb0b 100644 --- a/dev/sidekick/Sidekick_core/module-type-CC_ARG/Actions/index.html +++ b/dev/sidekick/Sidekick_core/module-type-CC_ARG/Actions/index.html @@ -1,2 +1,2 @@ -Actions (sidekick.Sidekick_core.CC_ARG.Actions)

Module CC_ARG.Actions

type t
val raise_conflict : t -> Lit.t list -> A.Proof.t -> 'a
val propagate : t -> Lit.t -> reason:(unit -> Lit.t list) -> A.Proof.t -> unit
\ No newline at end of file +Actions (sidekick.Sidekick_core.CC_ARG.Actions)

Module CC_ARG.Actions

module T = T
module P = P
module Lit = Lit
type t
val raise_conflict : t -> Lit.t list -> P.t -> 'a
val propagate : t -> Lit.t -> reason:(unit -> Lit.t list) -> P.t -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-CC_ARG/Lit/index.html b/dev/sidekick/Sidekick_core/module-type-CC_ARG/Lit/index.html index 9df7ee42..6ec78ed1 100644 --- a/dev/sidekick/Sidekick_core/module-type-CC_ARG/Lit/index.html +++ b/dev/sidekick/Sidekick_core/module-type-CC_ARG/Lit/index.html @@ -1,2 +1,2 @@ -Lit (sidekick.Sidekick_core.CC_ARG.Lit)

Module CC_ARG.Lit

type t
val term : t -> A.Term.t
val sign : t -> bool
val neg : t -> t
val pp : t Fmt.printer
\ No newline at end of file +Lit (sidekick.Sidekick_core.CC_ARG.Lit)

Module CC_ARG.Lit

module T = T
type t
val term : t -> T.Term.t
val sign : t -> bool
val neg : t -> t
val abs : t -> t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-CC_ARG/P/index.html b/dev/sidekick/Sidekick_core/module-type-CC_ARG/P/index.html new file mode 100644 index 00000000..71196ec3 --- /dev/null +++ b/dev/sidekick/Sidekick_core/module-type-CC_ARG/P/index.html @@ -0,0 +1,2 @@ + +P (sidekick.Sidekick_core.CC_ARG.P)

Module CC_ARG.P

type t
val pp : t Fmt.printer
val default : t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-CC_ARG/T/Fun/index.html b/dev/sidekick/Sidekick_core/module-type-CC_ARG/T/Fun/index.html new file mode 100644 index 00000000..3211e614 --- /dev/null +++ b/dev/sidekick/Sidekick_core/module-type-CC_ARG/T/Fun/index.html @@ -0,0 +1,2 @@ + +Fun (sidekick.Sidekick_core.CC_ARG.T.Fun)

Module T.Fun

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-CC_ARG/T/Term/index.html b/dev/sidekick/Sidekick_core/module-type-CC_ARG/T/Term/index.html new file mode 100644 index 00000000..edd504d2 --- /dev/null +++ b/dev/sidekick/Sidekick_core/module-type-CC_ARG/T/Term/index.html @@ -0,0 +1,2 @@ + +Term (sidekick.Sidekick_core.CC_ARG.T.Term)

Module T.Term

type t
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val pp : t Fmt.printer
type state
val ty : t -> Ty.t
val bool : state -> bool -> t
val as_bool : t -> bool option
val abs : state -> t -> t * bool
val map_shallow : state -> (t -> t) -> t -> t

Map function on immediate subterms

val iter_dag : t -> (t -> unit) -> unit
module Tbl : CCHashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-CC_ARG/T/Ty/index.html b/dev/sidekick/Sidekick_core/module-type-CC_ARG/T/Ty/index.html new file mode 100644 index 00000000..771b0a81 --- /dev/null +++ b/dev/sidekick/Sidekick_core/module-type-CC_ARG/T/Ty/index.html @@ -0,0 +1,2 @@ + +Ty (sidekick.Sidekick_core.CC_ARG.T.Ty)

Module T.Ty

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Fmt.printer
type state
val bool : state -> t
val is_bool : t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-CC_ARG/T/index.html b/dev/sidekick/Sidekick_core/module-type-CC_ARG/T/index.html new file mode 100644 index 00000000..366fc529 --- /dev/null +++ b/dev/sidekick/Sidekick_core/module-type-CC_ARG/T/index.html @@ -0,0 +1,2 @@ + +T (sidekick.Sidekick_core.CC_ARG.T)

Module CC_ARG.T

module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-CC_ARG/index.html b/dev/sidekick/Sidekick_core/module-type-CC_ARG/index.html index 1d712bfb..0741e3ca 100644 --- a/dev/sidekick/Sidekick_core/module-type-CC_ARG/index.html +++ b/dev/sidekick/Sidekick_core/module-type-CC_ARG/index.html @@ -1,2 +1,2 @@ -CC_ARG (sidekick.Sidekick_core.CC_ARG)

Module type Sidekick_core.CC_ARG

module A : TERM_PROOF
val cc_view : A.Term.t -> (A.Fun.tA.Term.tA.Term.t Iter.t) CC_view.t

View the term through the lens of the congruence closure

module Lit : sig ... end
module Actions : sig ... end
\ No newline at end of file +CC_ARG (sidekick.Sidekick_core.CC_ARG)

Module type Sidekick_core.CC_ARG

module T : TERM
module P : PROOF
module Lit : LIT with module T = T
module Actions : CC_ACTIONS with module T = T and module P = P and module Lit = Lit
val cc_view : T.Term.t -> (T.Fun.tT.Term.tT.Term.t Iter.t) CC_view.t

View the term through the lens of the congruence closure

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-CC_S/Actions/index.html b/dev/sidekick/Sidekick_core/module-type-CC_S/Actions/index.html new file mode 100644 index 00000000..049552a2 --- /dev/null +++ b/dev/sidekick/Sidekick_core/module-type-CC_S/Actions/index.html @@ -0,0 +1,2 @@ + +Actions (sidekick.Sidekick_core.CC_S.Actions)

Module CC_S.Actions

module T = T
module P = P
module Lit = Lit
type t
val raise_conflict : t -> Lit.t list -> P.t -> 'a
val propagate : t -> Lit.t -> reason:(unit -> Lit.t list) -> P.t -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-CC_S/CC_A/A/Fun/index.html b/dev/sidekick/Sidekick_core/module-type-CC_S/CC_A/A/Fun/index.html deleted file mode 100644 index a75cf8a4..00000000 --- a/dev/sidekick/Sidekick_core/module-type-CC_S/CC_A/A/Fun/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Fun (sidekick.Sidekick_core.CC_S.CC_A.A.Fun)

Module A.Fun

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-CC_S/CC_A/A/Proof/index.html b/dev/sidekick/Sidekick_core/module-type-CC_S/CC_A/A/Proof/index.html deleted file mode 100644 index 4f5df013..00000000 --- a/dev/sidekick/Sidekick_core/module-type-CC_S/CC_A/A/Proof/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Proof (sidekick.Sidekick_core.CC_S.CC_A.A.Proof)

Module A.Proof

type t
val pp : t Fmt.printer
val default : t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-CC_S/CC_A/A/Term/index.html b/dev/sidekick/Sidekick_core/module-type-CC_S/CC_A/A/Term/index.html deleted file mode 100644 index 205ec534..00000000 --- a/dev/sidekick/Sidekick_core/module-type-CC_S/CC_A/A/Term/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Term (sidekick.Sidekick_core.CC_S.CC_A.A.Term)

Module A.Term

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Fmt.printer
type state
val ty : t -> Ty.t
val bool : state -> bool -> t
val as_bool : t -> bool option
val abs : state -> t -> t * bool
val map_shallow : state -> (t -> t) -> t -> t

Map function on immediate subterms

val iter_dag : t -> (t -> unit) -> unit
module Tbl : CCHashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-CC_S/CC_A/A/Ty/index.html b/dev/sidekick/Sidekick_core/module-type-CC_S/CC_A/A/Ty/index.html deleted file mode 100644 index aa3a9440..00000000 --- a/dev/sidekick/Sidekick_core/module-type-CC_S/CC_A/A/Ty/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Ty (sidekick.Sidekick_core.CC_S.CC_A.A.Ty)

Module A.Ty

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Fmt.printer
val bool : t
val is_bool : t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-CC_S/CC_A/A/index.html b/dev/sidekick/Sidekick_core/module-type-CC_S/CC_A/A/index.html deleted file mode 100644 index 876fc48a..00000000 --- a/dev/sidekick/Sidekick_core/module-type-CC_S/CC_A/A/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -A (sidekick.Sidekick_core.CC_S.CC_A.A)

Module CC_A.A

include TERM
module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
module Proof : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-CC_S/CC_A/Actions/index.html b/dev/sidekick/Sidekick_core/module-type-CC_S/CC_A/Actions/index.html deleted file mode 100644 index 8a19e932..00000000 --- a/dev/sidekick/Sidekick_core/module-type-CC_S/CC_A/Actions/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Actions (sidekick.Sidekick_core.CC_S.CC_A.Actions)

Module CC_A.Actions

type t
val raise_conflict : t -> Lit.t list -> A.Proof.t -> 'a
val propagate : t -> Lit.t -> reason:(unit -> Lit.t list) -> A.Proof.t -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-CC_S/CC_A/Lit/index.html b/dev/sidekick/Sidekick_core/module-type-CC_S/CC_A/Lit/index.html deleted file mode 100644 index 522960c2..00000000 --- a/dev/sidekick/Sidekick_core/module-type-CC_S/CC_A/Lit/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Lit (sidekick.Sidekick_core.CC_S.CC_A.Lit)

Module CC_A.Lit

type t
val term : t -> A.Term.t
val sign : t -> bool
val neg : t -> t
val pp : t Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-CC_S/CC_A/index.html b/dev/sidekick/Sidekick_core/module-type-CC_S/CC_A/index.html deleted file mode 100644 index 9396324e..00000000 --- a/dev/sidekick/Sidekick_core/module-type-CC_S/CC_A/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -CC_A (sidekick.Sidekick_core.CC_S.CC_A)

Module CC_S.CC_A

module A : TERM_PROOF
val cc_view : A.Term.t -> (A.Fun.tA.Term.tA.Term.t Iter.t) CC_view.t

View the term through the lens of the congruence closure

module Lit : sig ... end
module Actions : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-CC_S/Expl/index.html b/dev/sidekick/Sidekick_core/module-type-CC_S/Expl/index.html index ce3882ee..60dc299a 100644 --- a/dev/sidekick/Sidekick_core/module-type-CC_S/Expl/index.html +++ b/dev/sidekick/Sidekick_core/module-type-CC_S/Expl/index.html @@ -1,2 +1,2 @@ -Expl (sidekick.Sidekick_core.CC_S.Expl)

Module CC_S.Expl

type t
val pp : t Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
\ No newline at end of file +Expl (sidekick.Sidekick_core.CC_S.Expl)

Module CC_S.Expl

type t
val pp : t Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
val mk_theory : t -> t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-CC_S/Lit/index.html b/dev/sidekick/Sidekick_core/module-type-CC_S/Lit/index.html new file mode 100644 index 00000000..32d429d1 --- /dev/null +++ b/dev/sidekick/Sidekick_core/module-type-CC_S/Lit/index.html @@ -0,0 +1,2 @@ + +Lit (sidekick.Sidekick_core.CC_S.Lit)

Module CC_S.Lit

module T = T
type t
val term : t -> T.Term.t
val sign : t -> bool
val neg : t -> t
val abs : t -> t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-CC_S/N/index.html b/dev/sidekick/Sidekick_core/module-type-CC_S/N/index.html index 5b0634c8..a8d8758a 100644 --- a/dev/sidekick/Sidekick_core/module-type-CC_S/N/index.html +++ b/dev/sidekick/Sidekick_core/module-type-CC_S/N/index.html @@ -1,2 +1,2 @@ -N (sidekick.Sidekick_core.CC_S.N)

Module CC_S.N

An equivalence class is a set of terms that are currently equal in the partial model built by the solver. The class is represented by a collection of nodes, one of which is distinguished and is called the "representative".

All information pertaining to the whole equivalence class is stored in this representative's node.

When two classes become equal (are "merged"), one of the two representatives is picked as the representative of the new class. The new class contains the union of the two old classes' nodes.

We also allow theories to store additional information in the representative. This information can be used when two classes are merged, to detect conflicts and solve equations à la Shostak.

type t
val term : t -> term
val equal : t -> t -> bool
val hash : t -> int
val pp : t Fmt.printer
val is_root : t -> bool

Is the node a root (ie the representative of its class)?

val iter_class : t -> t Iter.t

Traverse the congruence class. Precondition: is_root n (see find below)

val iter_parents : t -> t Iter.t

Traverse the parents of the class. Precondition: is_root n (see find below)

\ No newline at end of file +N (sidekick.Sidekick_core.CC_S.N)

Module CC_S.N

An equivalence class is a set of terms that are currently equal in the partial model built by the solver. The class is represented by a collection of nodes, one of which is distinguished and is called the "representative".

All information pertaining to the whole equivalence class is stored in this representative's node.

When two classes become equal (are "merged"), one of the two representatives is picked as the representative of the new class. The new class contains the union of the two old classes' nodes.

We also allow theories to store additional information in the representative. This information can be used when two classes are merged, to detect conflicts and solve equations à la Shostak.

type t
val term : t -> term
val equal : t -> t -> bool
val hash : t -> int
val pp : t Fmt.printer
val is_root : t -> bool

Is the node a root (ie the representative of its class)?

val iter_class : t -> t Iter.t

Traverse the congruence class. Precondition: is_root n (see find below)

val iter_parents : t -> t Iter.t

Traverse the parents of the class. Precondition: is_root n (see find below)

type bitfield

A field in the bitfield of this node. This should only be allocated when a theory is initialized.

All fields are initially 0, are backtracked automatically, and are merged automatically when classes are merged.

val get_field : bitfield -> t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-CC_S/P/index.html b/dev/sidekick/Sidekick_core/module-type-CC_S/P/index.html new file mode 100644 index 00000000..5dab4a1d --- /dev/null +++ b/dev/sidekick/Sidekick_core/module-type-CC_S/P/index.html @@ -0,0 +1,2 @@ + +P (sidekick.Sidekick_core.CC_S.P)

Module CC_S.P

type t
val pp : t Fmt.printer
val default : t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-CC_S/T/Fun/index.html b/dev/sidekick/Sidekick_core/module-type-CC_S/T/Fun/index.html new file mode 100644 index 00000000..da7047e2 --- /dev/null +++ b/dev/sidekick/Sidekick_core/module-type-CC_S/T/Fun/index.html @@ -0,0 +1,2 @@ + +Fun (sidekick.Sidekick_core.CC_S.T.Fun)

Module T.Fun

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-CC_S/T/Term/index.html b/dev/sidekick/Sidekick_core/module-type-CC_S/T/Term/index.html new file mode 100644 index 00000000..2f920eec --- /dev/null +++ b/dev/sidekick/Sidekick_core/module-type-CC_S/T/Term/index.html @@ -0,0 +1,2 @@ + +Term (sidekick.Sidekick_core.CC_S.T.Term)

Module T.Term

type t
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val pp : t Fmt.printer
type state
val ty : t -> Ty.t
val bool : state -> bool -> t
val as_bool : t -> bool option
val abs : state -> t -> t * bool
val map_shallow : state -> (t -> t) -> t -> t

Map function on immediate subterms

val iter_dag : t -> (t -> unit) -> unit
module Tbl : CCHashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-CC_S/T/Ty/index.html b/dev/sidekick/Sidekick_core/module-type-CC_S/T/Ty/index.html new file mode 100644 index 00000000..1e895d7c --- /dev/null +++ b/dev/sidekick/Sidekick_core/module-type-CC_S/T/Ty/index.html @@ -0,0 +1,2 @@ + +Ty (sidekick.Sidekick_core.CC_S.T.Ty)

Module T.Ty

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Fmt.printer
type state
val bool : state -> t
val is_bool : t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-CC_S/T/index.html b/dev/sidekick/Sidekick_core/module-type-CC_S/T/index.html new file mode 100644 index 00000000..3d12f780 --- /dev/null +++ b/dev/sidekick/Sidekick_core/module-type-CC_S/T/index.html @@ -0,0 +1,2 @@ + +T (sidekick.Sidekick_core.CC_S.T)

Module CC_S.T

module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-CC_S/index.html b/dev/sidekick/Sidekick_core/module-type-CC_S/index.html index 4b499590..1147cfc3 100644 --- a/dev/sidekick/Sidekick_core/module-type-CC_S/index.html +++ b/dev/sidekick/Sidekick_core/module-type-CC_S/index.html @@ -1,2 +1,2 @@ -CC_S (sidekick.Sidekick_core.CC_S)

Module type Sidekick_core.CC_S

module CC_A : CC_ARG
module A = CC_A.A
type term_state = A.Term.state
type term = A.Term.t
type fun_ = A.Fun.t
type lit = CC_A.Lit.t
type proof = A.Proof.t
type actions = CC_A.Actions.t
type t

Global state of the congruence closure

module N : sig ... end

An equivalence class is a set of terms that are currently equal in the partial model built by the solver. The class is represented by a collection of nodes, one of which is distinguished and is called the "representative".

module Expl : sig ... end
type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t
val term_state : t -> term_state
val find : t -> node -> repr

Current representative

val add_term : t -> term -> node

Add the term to the congruence closure, if not present already. Will be backtracked.

type ev_on_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit
type ev_on_new_term = t -> N.t -> term -> unit
type ev_on_conflict = t -> lit list -> unit
type ev_on_propagate = t -> lit -> (unit -> lit list) -> unit
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_merge:ev_on_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠size:[ `Small | `Big ] -> term_state -> t

Create a new congruence closure.

val on_merge : t -> ev_on_merge -> unit

Add a function to be called when two classes are merged

val on_new_term : t -> ev_on_new_term -> unit

Add a function to be called when a new node is created

val on_conflict : t -> ev_on_conflict -> unit

Called when the congruence closure finds a conflict

val on_propagate : t -> ev_on_propagate -> unit

Called when the congruence closure propagates a literal

val set_as_lit : t -> N.t -> lit -> unit

map the given node to a literal.

val find_t : t -> term -> repr

Current representative of the term.

raises Not_found

if the term is not already add-ed.

val add_seq : t -> term Iter.t -> unit

Add a sequence of terms to the congruence closure

val all_classes : t -> repr Iter.t

All current classes. This is costly, only use if there is no other solution

val assert_lit : t -> lit -> unit

Given a literal, assume it in the congruence closure and propagate its consequences. Will be backtracked.

Useful for the theory combination or the SAT solver's functor

val assert_lits : t -> lit Iter.t -> unit

Addition of many literals

val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given explanation it must be a theory tautology that expl ==> absurd. To be used in theories.

val merge : t -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val check : t -> actions -> unit

Perform all pending operations done via assert_eq, assert_lit, etc. Will use the actions to propagate literals, declare conflicts, etc.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Restore to state n calls to push_level earlier. Used during backtracking.

val get_model : t -> N.t Iter.t Iter.t

get all the equivalence classes so they can be merged in the model

\ No newline at end of file +CC_S (sidekick.Sidekick_core.CC_S)

Module type Sidekick_core.CC_S

module T : TERM
module P : PROOF
module Lit : LIT with module T = T
module Actions : CC_ACTIONS with module T = T and module Lit = Lit and module P = P
type term_state = T.Term.state
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type proof = P.t
type actions = Actions.t
type t

Global state of the congruence closure

module N : sig ... end

An equivalence class is a set of terms that are currently equal in the partial model built by the solver. The class is represented by a collection of nodes, one of which is distinguished and is called the "representative".

module Expl : sig ... end
type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t
val term_state : t -> term_state
val find : t -> node -> repr

Current representative

val add_term : t -> term -> node

Add the term to the congruence closure, if not present already. Will be backtracked.

val mem_term : t -> term -> bool

Returns true if the term is explicitly present in the congruence closure

type ev_on_pre_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit
type ev_on_post_merge = t -> actions -> N.t -> N.t -> unit
type ev_on_new_term = t -> N.t -> term -> unit
type ev_on_conflict = t -> th:bool -> lit list -> unit
type ev_on_propagate = t -> lit -> (unit -> lit list) -> unit
type ev_on_is_subterm = N.t -> term -> unit
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_pre_merge:ev_on_pre_merge list -> ?⁠on_post_merge:ev_on_post_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠on_is_subterm:ev_on_is_subterm list -> ?⁠size:[ `Small | `Big ] -> term_state -> t

Create a new congruence closure.

val allocate_bitfield : descr:string -> t -> N.bitfield

Allocate a new bitfield for the nodes. See N.bitfield.

val set_bitfield : t -> N.bitfield -> bool -> N.t -> unit

Set the bitfield for the node. This will be backtracked. See N.bitfield.

val on_pre_merge : t -> ev_on_pre_merge -> unit

Add a function to be called when two classes are merged

val on_post_merge : t -> ev_on_post_merge -> unit

Add a function to be called when two classes are merged

val on_new_term : t -> ev_on_new_term -> unit

Add a function to be called when a new node is created

val on_conflict : t -> ev_on_conflict -> unit

Called when the congruence closure finds a conflict

val on_propagate : t -> ev_on_propagate -> unit

Called when the congruence closure propagates a literal

val on_is_subterm : t -> ev_on_is_subterm -> unit

Called on terms that are subterms of function symbols

val set_as_lit : t -> N.t -> lit -> unit

map the given node to a literal.

val find_t : t -> term -> repr

Current representative of the term.

raises Not_found

if the term is not already add-ed.

val add_seq : t -> term Iter.t -> unit

Add a sequence of terms to the congruence closure

val all_classes : t -> repr Iter.t

All current classes. This is costly, only use if there is no other solution

val assert_lit : t -> lit -> unit

Given a literal, assume it in the congruence closure and propagate its consequences. Will be backtracked.

Useful for the theory combination or the SAT solver's functor

val assert_lits : t -> lit Iter.t -> unit

Addition of many literals

val explain_eq : t -> N.t -> N.t -> lit list

Explain why the two nodes are equal. Fails if they are not, in an unspecified way

val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given explanation it must be a theory tautology that expl ==> absurd. To be used in theories.

val n_true : t -> N.t
val n_false : t -> N.t
val n_bool : t -> bool -> N.t
val merge : t -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val merge_t : t -> term -> term -> Expl.t -> unit

Shortcut for adding + merging

val check : t -> actions -> unit

Perform all pending operations done via assert_eq, assert_lit, etc. Will use the actions to propagate literals, declare conflicts, etc.

val new_merges : t -> bool

Called after check, returns true if some pairs of classes were merged.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Restore to state n calls to push_level earlier. Used during backtracking.

val get_model : t -> N.t Iter.t Iter.t

get all the equivalence classes so they can be merged in the model

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-LIT/T/Fun/index.html b/dev/sidekick/Sidekick_core/module-type-LIT/T/Fun/index.html new file mode 100644 index 00000000..5f7b96e7 --- /dev/null +++ b/dev/sidekick/Sidekick_core/module-type-LIT/T/Fun/index.html @@ -0,0 +1,2 @@ + +Fun (sidekick.Sidekick_core.LIT.T.Fun)

Module T.Fun

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-LIT/T/Term/index.html b/dev/sidekick/Sidekick_core/module-type-LIT/T/Term/index.html new file mode 100644 index 00000000..a8fab037 --- /dev/null +++ b/dev/sidekick/Sidekick_core/module-type-LIT/T/Term/index.html @@ -0,0 +1,2 @@ + +Term (sidekick.Sidekick_core.LIT.T.Term)

Module T.Term

type t
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val pp : t Fmt.printer
type state
val ty : t -> Ty.t
val bool : state -> bool -> t
val as_bool : t -> bool option
val abs : state -> t -> t * bool
val map_shallow : state -> (t -> t) -> t -> t

Map function on immediate subterms

val iter_dag : t -> (t -> unit) -> unit
module Tbl : CCHashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-LIT/T/Ty/index.html b/dev/sidekick/Sidekick_core/module-type-LIT/T/Ty/index.html new file mode 100644 index 00000000..b509e749 --- /dev/null +++ b/dev/sidekick/Sidekick_core/module-type-LIT/T/Ty/index.html @@ -0,0 +1,2 @@ + +Ty (sidekick.Sidekick_core.LIT.T.Ty)

Module T.Ty

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Fmt.printer
type state
val bool : state -> t
val is_bool : t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-LIT/T/index.html b/dev/sidekick/Sidekick_core/module-type-LIT/T/index.html new file mode 100644 index 00000000..211e1ae9 --- /dev/null +++ b/dev/sidekick/Sidekick_core/module-type-LIT/T/index.html @@ -0,0 +1,2 @@ + +T (sidekick.Sidekick_core.LIT.T)

Module LIT.T

module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-LIT/index.html b/dev/sidekick/Sidekick_core/module-type-LIT/index.html new file mode 100644 index 00000000..962638a0 --- /dev/null +++ b/dev/sidekick/Sidekick_core/module-type-LIT/index.html @@ -0,0 +1,2 @@ + +LIT (sidekick.Sidekick_core.LIT)

Module type Sidekick_core.LIT

module T : TERM
type t
val term : t -> T.Term.t
val sign : t -> bool
val neg : t -> t
val abs : t -> t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-MERGE_PP/index.html b/dev/sidekick/Sidekick_core/module-type-MERGE_PP/index.html deleted file mode 100644 index 35607768..00000000 --- a/dev/sidekick/Sidekick_core/module-type-MERGE_PP/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -MERGE_PP (sidekick.Sidekick_core.MERGE_PP)

Module type Sidekick_core.MERGE_PP

type t
val merge : t -> t -> t
val pp : t Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/CC/Actions/index.html b/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/CC/Actions/index.html new file mode 100644 index 00000000..4f2f5374 --- /dev/null +++ b/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/CC/Actions/index.html @@ -0,0 +1,2 @@ + +Actions (sidekick.Sidekick_core.MONOID_ARG.SI.CC.Actions)

Module CC.Actions

module T = T
module P = P
module Lit = Lit
type t = actions
val raise_conflict : t -> Lit.t list -> P.t -> 'a
val propagate : t -> Lit.t -> reason:(unit -> Lit.t list) -> P.t -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/CC/Expl/index.html b/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/CC/Expl/index.html new file mode 100644 index 00000000..39edab1b --- /dev/null +++ b/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/CC/Expl/index.html @@ -0,0 +1,2 @@ + +Expl (sidekick.Sidekick_core.MONOID_ARG.SI.CC.Expl)

Module CC.Expl

type t
val pp : t Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
val mk_theory : t -> t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/CC/N/index.html b/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/CC/N/index.html new file mode 100644 index 00000000..5807c539 --- /dev/null +++ b/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/CC/N/index.html @@ -0,0 +1,2 @@ + +N (sidekick.Sidekick_core.MONOID_ARG.SI.CC.N)

Module CC.N

An equivalence class is a set of terms that are currently equal in the partial model built by the solver. The class is represented by a collection of nodes, one of which is distinguished and is called the "representative".

All information pertaining to the whole equivalence class is stored in this representative's node.

When two classes become equal (are "merged"), one of the two representatives is picked as the representative of the new class. The new class contains the union of the two old classes' nodes.

We also allow theories to store additional information in the representative. This information can be used when two classes are merged, to detect conflicts and solve equations à la Shostak.

type t
val term : t -> term
val equal : t -> t -> bool
val hash : t -> int
val pp : t Fmt.printer
val is_root : t -> bool

Is the node a root (ie the representative of its class)?

val iter_class : t -> t Iter.t

Traverse the congruence class. Precondition: is_root n (see find below)

val iter_parents : t -> t Iter.t

Traverse the parents of the class. Precondition: is_root n (see find below)

type bitfield

A field in the bitfield of this node. This should only be allocated when a theory is initialized.

All fields are initially 0, are backtracked automatically, and are merged automatically when classes are merged.

val get_field : bitfield -> t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/CC/index.html b/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/CC/index.html new file mode 100644 index 00000000..3656f8fa --- /dev/null +++ b/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/CC/index.html @@ -0,0 +1,2 @@ + +CC (sidekick.Sidekick_core.MONOID_ARG.SI.CC)

Module SI.CC

module T = T
module P = P
module Lit = Lit
module Actions : CC_ACTIONS with module T = T and module Lit = Lit and module P = P and type t = actions
type term_state = T.Term.state
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type proof = P.t
type actions = Actions.t
type t

Global state of the congruence closure

module N : sig ... end

An equivalence class is a set of terms that are currently equal in the partial model built by the solver. The class is represented by a collection of nodes, one of which is distinguished and is called the "representative".

module Expl : sig ... end
type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t
val term_state : t -> term_state
val find : t -> node -> repr

Current representative

val add_term : t -> term -> node

Add the term to the congruence closure, if not present already. Will be backtracked.

val mem_term : t -> term -> bool

Returns true if the term is explicitly present in the congruence closure

type ev_on_pre_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit
type ev_on_post_merge = t -> actions -> N.t -> N.t -> unit
type ev_on_new_term = t -> N.t -> term -> unit
type ev_on_conflict = t -> th:bool -> lit list -> unit
type ev_on_propagate = t -> lit -> (unit -> lit list) -> unit
type ev_on_is_subterm = N.t -> term -> unit
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_pre_merge:ev_on_pre_merge list -> ?⁠on_post_merge:ev_on_post_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠on_is_subterm:ev_on_is_subterm list -> ?⁠size:[ `Small | `Big ] -> term_state -> t

Create a new congruence closure.

val allocate_bitfield : descr:string -> t -> N.bitfield

Allocate a new bitfield for the nodes. See N.bitfield.

val set_bitfield : t -> N.bitfield -> bool -> N.t -> unit

Set the bitfield for the node. This will be backtracked. See N.bitfield.

val on_pre_merge : t -> ev_on_pre_merge -> unit

Add a function to be called when two classes are merged

val on_post_merge : t -> ev_on_post_merge -> unit

Add a function to be called when two classes are merged

val on_new_term : t -> ev_on_new_term -> unit

Add a function to be called when a new node is created

val on_conflict : t -> ev_on_conflict -> unit

Called when the congruence closure finds a conflict

val on_propagate : t -> ev_on_propagate -> unit

Called when the congruence closure propagates a literal

val on_is_subterm : t -> ev_on_is_subterm -> unit

Called on terms that are subterms of function symbols

val set_as_lit : t -> N.t -> lit -> unit

map the given node to a literal.

val find_t : t -> term -> repr

Current representative of the term.

raises Not_found

if the term is not already add-ed.

val add_seq : t -> term Iter.t -> unit

Add a sequence of terms to the congruence closure

val all_classes : t -> repr Iter.t

All current classes. This is costly, only use if there is no other solution

val assert_lit : t -> lit -> unit

Given a literal, assume it in the congruence closure and propagate its consequences. Will be backtracked.

Useful for the theory combination or the SAT solver's functor

val assert_lits : t -> lit Iter.t -> unit

Addition of many literals

val explain_eq : t -> N.t -> N.t -> lit list

Explain why the two nodes are equal. Fails if they are not, in an unspecified way

val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given explanation it must be a theory tautology that expl ==> absurd. To be used in theories.

val n_true : t -> N.t
val n_false : t -> N.t
val n_bool : t -> bool -> N.t
val merge : t -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val merge_t : t -> term -> term -> Expl.t -> unit

Shortcut for adding + merging

val check : t -> actions -> unit

Perform all pending operations done via assert_eq, assert_lit, etc. Will use the actions to propagate literals, declare conflicts, etc.

val new_merges : t -> bool

Called after check, returns true if some pairs of classes were merged.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Restore to state n calls to push_level earlier. Used during backtracking.

val get_model : t -> N.t Iter.t Iter.t

get all the equivalence classes so they can be merged in the model

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/Lit/index.html b/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/Lit/index.html new file mode 100644 index 00000000..062f5952 --- /dev/null +++ b/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/Lit/index.html @@ -0,0 +1,2 @@ + +Lit (sidekick.Sidekick_core.MONOID_ARG.SI.Lit)

Module SI.Lit

Literals

A literal is a (preprocessed) term along with its sign. It is directly manipulated by the SAT solver.

module T = T
type t
val term : t -> T.Term.t
val sign : t -> bool
val neg : t -> t
val abs : t -> t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/P/index.html b/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/P/index.html new file mode 100644 index 00000000..7774e0ab --- /dev/null +++ b/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/P/index.html @@ -0,0 +1,2 @@ + +P (sidekick.Sidekick_core.MONOID_ARG.SI.P)

Module SI.P

type t
val pp : t Fmt.printer
val default : t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/Simplify/index.html b/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/Simplify/index.html new file mode 100644 index 00000000..1af30356 --- /dev/null +++ b/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/Simplify/index.html @@ -0,0 +1,2 @@ + +Simplify (sidekick.Sidekick_core.MONOID_ARG.SI.Simplify)

Module SI.Simplify

type t
val tst : t -> term_state
val ty_st : t -> ty_state
val clear : t -> unit

Reset internal cache, etc.

type hook = t -> term -> term option

Given a term, try to simplify it. Return None if it didn't change.

val normalize : t -> term -> term

Normalize a term using all the hooks.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/T/Fun/index.html b/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/T/Fun/index.html new file mode 100644 index 00000000..98d22357 --- /dev/null +++ b/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/T/Fun/index.html @@ -0,0 +1,2 @@ + +Fun (sidekick.Sidekick_core.MONOID_ARG.SI.T.Fun)

Module T.Fun

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/T/Term/index.html b/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/T/Term/index.html new file mode 100644 index 00000000..3d3fbb7b --- /dev/null +++ b/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/T/Term/index.html @@ -0,0 +1,2 @@ + +Term (sidekick.Sidekick_core.MONOID_ARG.SI.T.Term)

Module T.Term

type t
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val pp : t Fmt.printer
type state
val ty : t -> Ty.t
val bool : state -> bool -> t
val as_bool : t -> bool option
val abs : state -> t -> t * bool
val map_shallow : state -> (t -> t) -> t -> t

Map function on immediate subterms

val iter_dag : t -> (t -> unit) -> unit
module Tbl : CCHashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/T/Ty/index.html b/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/T/Ty/index.html new file mode 100644 index 00000000..6b288b72 --- /dev/null +++ b/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/T/Ty/index.html @@ -0,0 +1,2 @@ + +Ty (sidekick.Sidekick_core.MONOID_ARG.SI.T.Ty)

Module T.Ty

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Fmt.printer
type state
val bool : state -> t
val is_bool : t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/T/index.html b/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/T/index.html new file mode 100644 index 00000000..f6fd584c --- /dev/null +++ b/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/T/index.html @@ -0,0 +1,2 @@ + +T (sidekick.Sidekick_core.MONOID_ARG.SI.T)

Module SI.T

module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/index.html b/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/index.html new file mode 100644 index 00000000..9f8a05f8 --- /dev/null +++ b/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/index.html @@ -0,0 +1,2 @@ + +SI (sidekick.Sidekick_core.MONOID_ARG.SI)

Module MONOID_ARG.SI

module T : TERM
module P : PROOF
type ty = T.Ty.t
type term = T.Term.t
type term_state = T.Term.state
type ty_state = T.Ty.state
type proof = P.t
type t

Main type for a solver

type solver = t
val tst : t -> term_state
val ty_st : t -> ty_state
val stats : t -> Sidekick_util.Stat.t

Actions for the theories

type actions
module Lit : LIT with module T = T
type lit = Lit.t

Congruence Closure

module CC : CC_S with module T = T and module P = P and module Lit = Lit and type Actions.t = actions
val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end
type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit
val simplifier : t -> Simplify.t
val simp_t : t -> term -> term

hooks for the theory

val propagate : t -> actions -> lit -> reason:(unit -> lit list) -> proof -> unit

Propagate a literal for a reason. This is similar to asserting the clause reason => lit, but more lightweight, and in a way that is backtrackable.

val raise_conflict : t -> actions -> lit list -> proof -> 'a

Give a conflict clause to the solver

val push_decision : t -> actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : t -> actions -> lit -> (unit -> lit list) -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> actions -> lit -> lit list -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> actions -> lit list -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : t -> actions -> lit list -> unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> actions -> ?⁠sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val preprocess_term : t -> add_clause:(Lit.t list -> unit) -> term -> term

Preprocess a term.

val add_lit : t -> actions -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value

val add_lit_t : t -> actions -> ?⁠sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit

Callback called on every CC conflict

val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list) -> unit) -> unit

Callback called on every CC propagation

val on_partial_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

type preprocess_hook = t -> mk_lit:(term -> lit) -> add_clause:(lit list -> unit) -> term -> term option

Given a term, try to preprocess it. Return None if it didn't change. Can also add clauses to define new terms.

parameter mk_lit

creates a new literal for a boolean term.

parameter add_clause

pushes a new clause into the SAT solver.

val on_preprocess : t -> preprocess_hook -> unit

Model production

type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option

A model-production hook. It takes the solver, a class, and returns a term for this class.

val on_model_gen : t -> model_hook -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/index.html b/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/index.html new file mode 100644 index 00000000..1759c053 --- /dev/null +++ b/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/index.html @@ -0,0 +1,2 @@ + +MONOID_ARG (sidekick.Sidekick_core.MONOID_ARG)

Module type Sidekick_core.MONOID_ARG

type t
val pp : t Fmt.printer
val name : string

name of the monoid's value (short)

val of_term : SI.CC.t -> SI.CC.N.t -> SI.T.Term.t -> t option * (SI.CC.N.t * t) list

of_term n t, where t is the term annotating node n, returns maybe_m, l, where:

  • maybe_m = Some m if t has monoid value m; otherwise maybe_m=None
  • l is a list of (u, m_u) where each u's term is a direct subterm of t and m_u is the monoid value attached to u.
val merge : SI.CC.t -> SI.CC.N.t -> t -> SI.CC.N.t -> t -> SI.CC.Expl.t -> (tSI.CC.Expl.t) Stdlib.result
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-PROOF/index.html b/dev/sidekick/Sidekick_core/module-type-PROOF/index.html new file mode 100644 index 00000000..792ee38f --- /dev/null +++ b/dev/sidekick/Sidekick_core/module-type-PROOF/index.html @@ -0,0 +1,2 @@ + +PROOF (sidekick.Sidekick_core.PROOF)

Module type Sidekick_core.PROOF

type t
val pp : t Fmt.printer
val default : t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER/A/Fun/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER/A/Fun/index.html deleted file mode 100644 index 7f867a95..00000000 --- a/dev/sidekick/Sidekick_core/module-type-SOLVER/A/Fun/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Fun (sidekick.Sidekick_core.SOLVER.A.Fun)

Module A.Fun

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER/A/Proof/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER/A/Proof/index.html deleted file mode 100644 index 45186269..00000000 --- a/dev/sidekick/Sidekick_core/module-type-SOLVER/A/Proof/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Proof (sidekick.Sidekick_core.SOLVER.A.Proof)

Module A.Proof

type t
val pp : t Fmt.printer
val default : t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER/A/Term/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER/A/Term/index.html deleted file mode 100644 index 394030eb..00000000 --- a/dev/sidekick/Sidekick_core/module-type-SOLVER/A/Term/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Term (sidekick.Sidekick_core.SOLVER.A.Term)

Module A.Term

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Fmt.printer
type state
val ty : t -> Ty.t
val bool : state -> bool -> t
val as_bool : t -> bool option
val abs : state -> t -> t * bool
val map_shallow : state -> (t -> t) -> t -> t

Map function on immediate subterms

val iter_dag : t -> (t -> unit) -> unit
module Tbl : CCHashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER/A/Ty/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER/A/Ty/index.html deleted file mode 100644 index 5ed74d86..00000000 --- a/dev/sidekick/Sidekick_core/module-type-SOLVER/A/Ty/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Ty (sidekick.Sidekick_core.SOLVER.A.Ty)

Module A.Ty

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Fmt.printer
val bool : t
val is_bool : t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER/A/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER/A/index.html deleted file mode 100644 index 51f3eee7..00000000 --- a/dev/sidekick/Sidekick_core/module-type-SOLVER/A/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -A (sidekick.Sidekick_core.SOLVER.A)

Module SOLVER.A

include TERM
module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
module Proof : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER/Atom/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER/Atom/index.html index 74ea015a..cfa58bd0 100644 --- a/dev/sidekick/Sidekick_core/module-type-SOLVER/Atom/index.html +++ b/dev/sidekick/Sidekick_core/module-type-SOLVER/Atom/index.html @@ -1,2 +1,2 @@ -Atom (sidekick.Sidekick_core.SOLVER.Atom)

Module SOLVER.Atom

Boolean Atoms

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t CCFormat.printer
\ No newline at end of file +Atom (sidekick.Sidekick_core.SOLVER.Atom)

Module SOLVER.Atom

Boolean Atoms

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t CCFormat.printer
val neg : t -> t
val formula : t -> lit
val sign : t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER/CC_A/Actions/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER/CC_A/Actions/index.html deleted file mode 100644 index f01d9619..00000000 --- a/dev/sidekick/Sidekick_core/module-type-SOLVER/CC_A/Actions/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Actions (sidekick.Sidekick_core.SOLVER.CC_A.Actions)

Module CC_A.Actions

type t
val raise_conflict : t -> Lit.t list -> A.Proof.t -> 'a
val propagate : t -> Lit.t -> reason:(unit -> Lit.t list) -> A.Proof.t -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER/CC_A/Lit/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER/CC_A/Lit/index.html deleted file mode 100644 index ed56dce9..00000000 --- a/dev/sidekick/Sidekick_core/module-type-SOLVER/CC_A/Lit/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Lit (sidekick.Sidekick_core.SOLVER.CC_A.Lit)

Module CC_A.Lit

type t
val term : t -> A.Term.t
val sign : t -> bool
val neg : t -> t
val pp : t Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER/CC_A/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER/CC_A/index.html deleted file mode 100644 index 5ee38328..00000000 --- a/dev/sidekick/Sidekick_core/module-type-SOLVER/CC_A/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -CC_A (sidekick.Sidekick_core.SOLVER.CC_A)

Module SOLVER.CC_A

module A = A
val cc_view : A.Term.t -> (A.Fun.tA.Term.tA.Term.t Iter.t) CC_view.t

View the term through the lens of the congruence closure

module Lit : sig ... end
module Actions : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER/Lit/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER/Lit/index.html new file mode 100644 index 00000000..9a81f59a --- /dev/null +++ b/dev/sidekick/Sidekick_core/module-type-SOLVER/Lit/index.html @@ -0,0 +1,2 @@ + +Lit (sidekick.Sidekick_core.SOLVER.Lit)

Module SOLVER.Lit

module T = T
type t
val term : t -> T.Term.t
val sign : t -> bool
val neg : t -> t
val abs : t -> t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER/Model/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER/Model/index.html index 226d1d14..78d48c37 100644 --- a/dev/sidekick/Sidekick_core/module-type-SOLVER/Model/index.html +++ b/dev/sidekick/Sidekick_core/module-type-SOLVER/Model/index.html @@ -1,2 +1,2 @@ -Model (sidekick.Sidekick_core.SOLVER.Model)

Module SOLVER.Model

type t
val empty : t
val mem : term -> t -> bool
val find : term -> t -> Value.t option
val eval : t -> term -> Value.t option
val pp : t Fmt.printer
\ No newline at end of file +Model (sidekick.Sidekick_core.SOLVER.Model)

Module SOLVER.Model

type t
val empty : t
val mem : t -> term -> bool
val find : t -> term -> term option
val eval : t -> term -> term option
val pp : t Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER/P/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER/P/index.html new file mode 100644 index 00000000..b80262ac --- /dev/null +++ b/dev/sidekick/Sidekick_core/module-type-SOLVER/P/index.html @@ -0,0 +1,2 @@ + +P (sidekick.Sidekick_core.SOLVER.P)

Module SOLVER.P

type t
val pp : t Fmt.printer
val default : t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER/Proof/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER/Proof/index.html index 74928516..41eeb291 100644 --- a/dev/sidekick/Sidekick_core/module-type-SOLVER/Proof/index.html +++ b/dev/sidekick/Sidekick_core/module-type-SOLVER/Proof/index.html @@ -1,2 +1,2 @@ -Proof (sidekick.Sidekick_core.SOLVER.Proof)

Module SOLVER.Proof

type t
val check : t -> unit
val pp_dot : t Fmt.printer
\ No newline at end of file +Proof (sidekick.Sidekick_core.SOLVER.Proof)

Module SOLVER.Proof

type t
val check : t -> unit
val pp_dot : t Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/CC/Actions/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/CC/Actions/index.html new file mode 100644 index 00000000..daf3c279 --- /dev/null +++ b/dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/CC/Actions/index.html @@ -0,0 +1,2 @@ + +Actions (sidekick.Sidekick_core.SOLVER.Solver_internal.CC.Actions)

Module CC.Actions

module T = T
module P = P
module Lit = Lit
type t = actions
val raise_conflict : t -> Lit.t list -> P.t -> 'a
val propagate : t -> Lit.t -> reason:(unit -> Lit.t list) -> P.t -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/CC/Expl/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/CC/Expl/index.html index 68925d68..200aee6f 100644 --- a/dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/CC/Expl/index.html +++ b/dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/CC/Expl/index.html @@ -1,2 +1,2 @@ -Expl (sidekick.Sidekick_core.SOLVER.Solver_internal.CC.Expl)

Module CC.Expl

type t
val pp : t Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
\ No newline at end of file +Expl (sidekick.Sidekick_core.SOLVER.Solver_internal.CC.Expl)

Module CC.Expl

type t
val pp : t Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
val mk_theory : t -> t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/CC/N/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/CC/N/index.html index 5d55db3d..8efeae84 100644 --- a/dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/CC/N/index.html +++ b/dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/CC/N/index.html @@ -1,2 +1,2 @@ -N (sidekick.Sidekick_core.SOLVER.Solver_internal.CC.N)

Module CC.N

An equivalence class is a set of terms that are currently equal in the partial model built by the solver. The class is represented by a collection of nodes, one of which is distinguished and is called the "representative".

All information pertaining to the whole equivalence class is stored in this representative's node.

When two classes become equal (are "merged"), one of the two representatives is picked as the representative of the new class. The new class contains the union of the two old classes' nodes.

We also allow theories to store additional information in the representative. This information can be used when two classes are merged, to detect conflicts and solve equations à la Shostak.

type t
val term : t -> term
val equal : t -> t -> bool
val hash : t -> int
val pp : t Fmt.printer
val is_root : t -> bool

Is the node a root (ie the representative of its class)?

val iter_class : t -> t Iter.t

Traverse the congruence class. Precondition: is_root n (see find below)

val iter_parents : t -> t Iter.t

Traverse the parents of the class. Precondition: is_root n (see find below)

\ No newline at end of file +N (sidekick.Sidekick_core.SOLVER.Solver_internal.CC.N)

Module CC.N

An equivalence class is a set of terms that are currently equal in the partial model built by the solver. The class is represented by a collection of nodes, one of which is distinguished and is called the "representative".

All information pertaining to the whole equivalence class is stored in this representative's node.

When two classes become equal (are "merged"), one of the two representatives is picked as the representative of the new class. The new class contains the union of the two old classes' nodes.

We also allow theories to store additional information in the representative. This information can be used when two classes are merged, to detect conflicts and solve equations à la Shostak.

type t
val term : t -> term
val equal : t -> t -> bool
val hash : t -> int
val pp : t Fmt.printer
val is_root : t -> bool

Is the node a root (ie the representative of its class)?

val iter_class : t -> t Iter.t

Traverse the congruence class. Precondition: is_root n (see find below)

val iter_parents : t -> t Iter.t

Traverse the parents of the class. Precondition: is_root n (see find below)

type bitfield

A field in the bitfield of this node. This should only be allocated when a theory is initialized.

All fields are initially 0, are backtracked automatically, and are merged automatically when classes are merged.

val get_field : bitfield -> t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/CC/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/CC/index.html index c1b7b4a7..00250d9c 100644 --- a/dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/CC/index.html +++ b/dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/CC/index.html @@ -1,2 +1,2 @@ -CC (sidekick.Sidekick_core.SOLVER.Solver_internal.CC)

Module Solver_internal.CC

module CC_A = CC_A
module A = CC_A.A
type term_state = A.Term.state
type term = A.Term.t
type fun_ = A.Fun.t
type lit = CC_A.Lit.t
type proof = A.Proof.t
type actions = CC_A.Actions.t
type t

Global state of the congruence closure

module N : sig ... end

An equivalence class is a set of terms that are currently equal in the partial model built by the solver. The class is represented by a collection of nodes, one of which is distinguished and is called the "representative".

module Expl : sig ... end
type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t
val term_state : t -> term_state
val find : t -> node -> repr

Current representative

val add_term : t -> term -> node

Add the term to the congruence closure, if not present already. Will be backtracked.

type ev_on_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit
type ev_on_new_term = t -> N.t -> term -> unit
type ev_on_conflict = t -> lit list -> unit
type ev_on_propagate = t -> lit -> (unit -> lit list) -> unit
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_merge:ev_on_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠size:[ `Small | `Big ] -> term_state -> t

Create a new congruence closure.

val on_merge : t -> ev_on_merge -> unit

Add a function to be called when two classes are merged

val on_new_term : t -> ev_on_new_term -> unit

Add a function to be called when a new node is created

val on_conflict : t -> ev_on_conflict -> unit

Called when the congruence closure finds a conflict

val on_propagate : t -> ev_on_propagate -> unit

Called when the congruence closure propagates a literal

val set_as_lit : t -> N.t -> lit -> unit

map the given node to a literal.

val find_t : t -> term -> repr

Current representative of the term.

raises Not_found

if the term is not already add-ed.

val add_seq : t -> term Iter.t -> unit

Add a sequence of terms to the congruence closure

val all_classes : t -> repr Iter.t

All current classes. This is costly, only use if there is no other solution

val assert_lit : t -> lit -> unit

Given a literal, assume it in the congruence closure and propagate its consequences. Will be backtracked.

Useful for the theory combination or the SAT solver's functor

val assert_lits : t -> lit Iter.t -> unit

Addition of many literals

val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given explanation it must be a theory tautology that expl ==> absurd. To be used in theories.

val merge : t -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val check : t -> actions -> unit

Perform all pending operations done via assert_eq, assert_lit, etc. Will use the actions to propagate literals, declare conflicts, etc.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Restore to state n calls to push_level earlier. Used during backtracking.

val get_model : t -> N.t Iter.t Iter.t

get all the equivalence classes so they can be merged in the model

\ No newline at end of file +CC (sidekick.Sidekick_core.SOLVER.Solver_internal.CC)

Module Solver_internal.CC

module T = T
module P = P
module Lit = Lit
module Actions : CC_ACTIONS with module T = T and module Lit = Lit and module P = P and type t = actions
type term_state = T.Term.state
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type proof = P.t
type actions = Actions.t
type t

Global state of the congruence closure

module N : sig ... end

An equivalence class is a set of terms that are currently equal in the partial model built by the solver. The class is represented by a collection of nodes, one of which is distinguished and is called the "representative".

module Expl : sig ... end
type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t
val term_state : t -> term_state
val find : t -> node -> repr

Current representative

val add_term : t -> term -> node

Add the term to the congruence closure, if not present already. Will be backtracked.

val mem_term : t -> term -> bool

Returns true if the term is explicitly present in the congruence closure

type ev_on_pre_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit
type ev_on_post_merge = t -> actions -> N.t -> N.t -> unit
type ev_on_new_term = t -> N.t -> term -> unit
type ev_on_conflict = t -> th:bool -> lit list -> unit
type ev_on_propagate = t -> lit -> (unit -> lit list) -> unit
type ev_on_is_subterm = N.t -> term -> unit
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_pre_merge:ev_on_pre_merge list -> ?⁠on_post_merge:ev_on_post_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠on_is_subterm:ev_on_is_subterm list -> ?⁠size:[ `Small | `Big ] -> term_state -> t

Create a new congruence closure.

val allocate_bitfield : descr:string -> t -> N.bitfield

Allocate a new bitfield for the nodes. See N.bitfield.

val set_bitfield : t -> N.bitfield -> bool -> N.t -> unit

Set the bitfield for the node. This will be backtracked. See N.bitfield.

val on_pre_merge : t -> ev_on_pre_merge -> unit

Add a function to be called when two classes are merged

val on_post_merge : t -> ev_on_post_merge -> unit

Add a function to be called when two classes are merged

val on_new_term : t -> ev_on_new_term -> unit

Add a function to be called when a new node is created

val on_conflict : t -> ev_on_conflict -> unit

Called when the congruence closure finds a conflict

val on_propagate : t -> ev_on_propagate -> unit

Called when the congruence closure propagates a literal

val on_is_subterm : t -> ev_on_is_subterm -> unit

Called on terms that are subterms of function symbols

val set_as_lit : t -> N.t -> lit -> unit

map the given node to a literal.

val find_t : t -> term -> repr

Current representative of the term.

raises Not_found

if the term is not already add-ed.

val add_seq : t -> term Iter.t -> unit

Add a sequence of terms to the congruence closure

val all_classes : t -> repr Iter.t

All current classes. This is costly, only use if there is no other solution

val assert_lit : t -> lit -> unit

Given a literal, assume it in the congruence closure and propagate its consequences. Will be backtracked.

Useful for the theory combination or the SAT solver's functor

val assert_lits : t -> lit Iter.t -> unit

Addition of many literals

val explain_eq : t -> N.t -> N.t -> lit list

Explain why the two nodes are equal. Fails if they are not, in an unspecified way

val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given explanation it must be a theory tautology that expl ==> absurd. To be used in theories.

val n_true : t -> N.t
val n_false : t -> N.t
val n_bool : t -> bool -> N.t
val merge : t -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val merge_t : t -> term -> term -> Expl.t -> unit

Shortcut for adding + merging

val check : t -> actions -> unit

Perform all pending operations done via assert_eq, assert_lit, etc. Will use the actions to propagate literals, declare conflicts, etc.

val new_merges : t -> bool

Called after check, returns true if some pairs of classes were merged.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Restore to state n calls to push_level earlier. Used during backtracking.

val get_model : t -> N.t Iter.t Iter.t

get all the equivalence classes so they can be merged in the model

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/Lit/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/Lit/index.html deleted file mode 100644 index bca20fdd..00000000 --- a/dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/Lit/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Lit (sidekick.Sidekick_core.SOLVER.Solver_internal.Lit)

Module Solver_internal.Lit

Literals

A literal is a (preprocessed) term along with its sign. It is directly manipulated by the SAT solver.

type t
val term : t -> term
val sign : t -> bool
val neg : t -> t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/Simplify/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/Simplify/index.html index fcf59323..32677657 100644 --- a/dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/Simplify/index.html +++ b/dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/Simplify/index.html @@ -1,2 +1,2 @@ -Simplify (sidekick.Sidekick_core.SOLVER.Solver_internal.Simplify)

Module Solver_internal.Simplify

type t
val tst : t -> term_state
val clear : t -> unit

Reset internal cache, etc.

type hook = t -> term -> term option

Given a term, try to simplify it. Return None if it didn't change. Can also add clauses to the simplifier.

val normalize : t -> term -> term

Normalize a term using all the hooks.

\ No newline at end of file +Simplify (sidekick.Sidekick_core.SOLVER.Solver_internal.Simplify)

Module Solver_internal.Simplify

type t
val tst : t -> term_state
val ty_st : t -> ty_state
val clear : t -> unit

Reset internal cache, etc.

type hook = t -> term -> term option

Given a term, try to simplify it. Return None if it didn't change.

val normalize : t -> term -> term

Normalize a term using all the hooks.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/index.html index ae8d8d96..70810c73 100644 --- a/dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/index.html +++ b/dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/index.html @@ -1,2 +1,2 @@ -Solver_internal (sidekick.Sidekick_core.SOLVER.Solver_internal)

Module SOLVER.Solver_internal

Internal solver, available to theories.

module A = A
module CC_A = CC_A
module CC : CC_S with module CC_A = CC_A
type ty = A.Ty.t
type term = A.Term.t
type term_state = A.Term.state
type proof = A.Proof.t
type t

Main type for a solver

type solver = t
module Expl = CC.Expl
module N = CC.N
val tst : t -> term_state
val cc : t -> CC.t

Congruence closure for this solver

module Lit : sig ... end
type lit = Lit.t

Simplifiers

module Simplify : sig ... end
type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit
val simplifier : t -> Simplify.t
val simp_t : t -> term -> term

hooks for the theory

type actions
val propagate : t -> actions -> lit -> reason:(unit -> lit list) -> A.Proof.t -> unit
val raise_conflict : t -> actions -> lit list -> A.Proof.t -> 'a

Give a conflict clause to the solver

val propagate : t -> actions -> lit -> (unit -> lit list) -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> actions -> lit -> lit list -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> actions -> lit list -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : t -> actions -> lit list -> unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> actions -> ?⁠sign:bool -> term -> lit

Create a literal

val add_lit : t -> actions -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value

val add_lit_t : t -> actions -> ?⁠sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> N.t -> N.t

Find representative of the node

val cc_merge : t -> actions -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> actions -> term -> term -> Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> N.t

Add/retrieve congruence closure node for this term. To be used in theories

val on_cc_merge : t -> (CC.t -> actions -> N.t -> N.t -> Expl.t -> unit) -> unit

Callback for when two classes containing data for this key are merged

val on_cc_new_term : t -> (CC.t -> N.t -> term -> unit) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_conflict : t -> (CC.t -> lit list -> unit) -> unit

Callback called on every CC conflict

val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list) -> unit) -> unit

Callback called on every CC propagation

val on_partial_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

type preprocess_hook = t -> mk_lit:(term -> lit) -> add_clause:(lit list -> unit) -> term -> term option

Given a term, try to preprocess it. Return None if it didn't change. Can also add clauses to define new terms.

val add_preprocess : t -> preprocess_hook -> unit
\ No newline at end of file +Solver_internal (sidekick.Sidekick_core.SOLVER.Solver_internal)

Module SOLVER.Solver_internal

Internal solver, available to theories.

module T = T
module P = P
type ty = T.Ty.t
type term = T.Term.t
type term_state = T.Term.state
type ty_state = T.Ty.state
type proof = P.t
type t

Main type for a solver

type solver = t
val tst : t -> term_state
val ty_st : t -> ty_state
val stats : t -> Sidekick_util.Stat.t

Actions for the theories

type actions
module Lit = Lit
type lit = Lit.t

Congruence Closure

module CC : CC_S with module T = T and module P = P and module Lit = Lit and type Actions.t = actions
val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end
type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit
val simplifier : t -> Simplify.t
val simp_t : t -> term -> term

hooks for the theory

val propagate : t -> actions -> lit -> reason:(unit -> lit list) -> proof -> unit

Propagate a literal for a reason. This is similar to asserting the clause reason => lit, but more lightweight, and in a way that is backtrackable.

val raise_conflict : t -> actions -> lit list -> proof -> 'a

Give a conflict clause to the solver

val push_decision : t -> actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : t -> actions -> lit -> (unit -> lit list) -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> actions -> lit -> lit list -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> actions -> lit list -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : t -> actions -> lit list -> unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> actions -> ?⁠sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val preprocess_term : t -> add_clause:(Lit.t list -> unit) -> term -> term

Preprocess a term.

val add_lit : t -> actions -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value

val add_lit_t : t -> actions -> ?⁠sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit

Callback called on every CC conflict

val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list) -> unit) -> unit

Callback called on every CC propagation

val on_partial_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

type preprocess_hook = t -> mk_lit:(term -> lit) -> add_clause:(lit list -> unit) -> term -> term option

Given a term, try to preprocess it. Return None if it didn't change. Can also add clauses to define new terms.

parameter mk_lit

creates a new literal for a boolean term.

parameter add_clause

pushes a new clause into the SAT solver.

val on_preprocess : t -> preprocess_hook -> unit

Model production

type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option

A model-production hook. It takes the solver, a class, and returns a term for this class.

val on_model_gen : t -> model_hook -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER/T/Fun/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER/T/Fun/index.html new file mode 100644 index 00000000..311ce3ba --- /dev/null +++ b/dev/sidekick/Sidekick_core/module-type-SOLVER/T/Fun/index.html @@ -0,0 +1,2 @@ + +Fun (sidekick.Sidekick_core.SOLVER.T.Fun)

Module T.Fun

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER/T/Term/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER/T/Term/index.html new file mode 100644 index 00000000..0443fe08 --- /dev/null +++ b/dev/sidekick/Sidekick_core/module-type-SOLVER/T/Term/index.html @@ -0,0 +1,2 @@ + +Term (sidekick.Sidekick_core.SOLVER.T.Term)

Module T.Term

type t
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val pp : t Fmt.printer
type state
val ty : t -> Ty.t
val bool : state -> bool -> t
val as_bool : t -> bool option
val abs : state -> t -> t * bool
val map_shallow : state -> (t -> t) -> t -> t

Map function on immediate subterms

val iter_dag : t -> (t -> unit) -> unit
module Tbl : CCHashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER/T/Ty/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER/T/Ty/index.html new file mode 100644 index 00000000..e62251dd --- /dev/null +++ b/dev/sidekick/Sidekick_core/module-type-SOLVER/T/Ty/index.html @@ -0,0 +1,2 @@ + +Ty (sidekick.Sidekick_core.SOLVER.T.Ty)

Module T.Ty

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Fmt.printer
type state
val bool : state -> t
val is_bool : t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER/T/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER/T/index.html new file mode 100644 index 00000000..2b73d9d1 --- /dev/null +++ b/dev/sidekick/Sidekick_core/module-type-SOLVER/T/index.html @@ -0,0 +1,2 @@ + +T (sidekick.Sidekick_core.SOLVER.T)

Module SOLVER.T

module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER/Unknown/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER/Unknown/index.html index 5839700e..74f2d2f0 100644 --- a/dev/sidekick/Sidekick_core/module-type-SOLVER/Unknown/index.html +++ b/dev/sidekick/Sidekick_core/module-type-SOLVER/Unknown/index.html @@ -1,2 +1,2 @@ -Unknown (sidekick.Sidekick_core.SOLVER.Unknown)

Module SOLVER.Unknown

type t
val pp : t CCFormat.printer
\ No newline at end of file +Unknown (sidekick.Sidekick_core.SOLVER.Unknown)

Module SOLVER.Unknown

type t
val pp : t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER/Value/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER/Value/index.html deleted file mode 100644 index 00def874..00000000 --- a/dev/sidekick/Sidekick_core/module-type-SOLVER/Value/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Value (sidekick.Sidekick_core.SOLVER.Value)

Module SOLVER.Value

Semantic values

type t
val equal : t -> t -> bool
val hash : t -> int
val ty : t -> ty
val pp : t Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER/index.html index 0282d3a0..1bb44c92 100644 --- a/dev/sidekick/Sidekick_core/module-type-SOLVER/index.html +++ b/dev/sidekick/Sidekick_core/module-type-SOLVER/index.html @@ -1,2 +1,2 @@ -SOLVER (sidekick.Sidekick_core.SOLVER)

Module type Sidekick_core.SOLVER

Public view of the solver

module A : TERM_PROOF
module CC_A : CC_ARG with module A = A
module Solver_internal : SOLVER_INTERNAL with module A = A and module CC_A = CC_A

Internal solver, available to theories.

module Lit = Solver_internal.Lit
type t
type solver = t
type term = A.Term.t
type ty = A.Ty.t
type lit = Solver_internal.Lit.t
type lemma = A.Proof.t
module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

val mk_theory : name:string -> create_and_setup:(Solver_internal.t -> 'th) -> ?⁠push_level:('th -> unit) -> ?⁠pop_levels:('th -> int -> unit) -> unit -> theory

Helper to create a theory

module Atom : sig ... end
module Value : sig ... end
module Model : sig ... end
module Unknown : sig ... end
module Proof : sig ... end
type proof = Proof.t

Main API

val stats : t -> Sidekick_util.Stat.t
val tst : t -> A.Term.state
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠size:[ `Big | `Tiny | `Small ] -> ?⁠store_proof:bool -> theories:theory list -> A.Term.state -> unit -> t

Create a new solver.

parameter theories

theories to load from the start.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val mk_atom_lit : t -> lit -> Atom.t
val mk_atom_t : t -> ?⁠sign:bool -> term -> Atom.t
val add_clause : t -> Atom.t Sidekick_util.IArray.t -> unit
val add_clause_l : t -> Atom.t list -> unit
type res =
| Sat of Model.t
| Unsat of {
proof : proof option;
unsat_core : Atom.t list lazy_t;
}
| Unknown of Unknown.t

Result of solving for the current set of clauses

val solve : ?⁠on_exit:(unit -> unit) list -> ?⁠check:bool -> assumptions:Atom.t list -> t -> res

solve s checks the satisfiability of the statement added so far to s

parameter check

if true, the model is checked before returning

parameter assumptions

a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

parameter on_exit

functions to be run before this returns

val pp_term_graph : t CCFormat.printer
val pp_stats : t CCFormat.printer
\ No newline at end of file +SOLVER (sidekick.Sidekick_core.SOLVER)

Module type Sidekick_core.SOLVER

Public view of the solver

module T : TERM
module P : PROOF
module Lit : LIT with module T = T
module Solver_internal : SOLVER_INTERNAL with module T = T and module P = P and module Lit = Lit

Internal solver, available to theories.

type t
type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t
type lemma = P.t
module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

type 'a theory_p = (module THEORY with type t = 'a)

A theory that can be used for this particular solver, with state of type 'a.

val mk_theory : name:string -> create_and_setup:(Solver_internal.t -> 'th) -> ?⁠push_level:('th -> unit) -> ?⁠pop_levels:('th -> int -> unit) -> unit -> theory

Helper to create a theory

module Atom : sig ... end
module Model : sig ... end
module Unknown : sig ... end
module Proof : sig ... end
type proof = Proof.t

Main API

val stats : t -> Sidekick_util.Stat.t
val tst : t -> T.Term.state
val ty_st : t -> T.Ty.state
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠size:[ `Big | `Tiny | `Small ] -> ?⁠store_proof:bool -> theories:theory list -> T.Term.state -> T.Ty.state -> unit -> t

Create a new solver.

parameter theories

theories to load from the start.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val add_theory_p : t -> 'a theory_p -> 'a

Add the given theory and obtain its state

val add_theory_l : t -> theory list -> unit
val mk_atom_lit : t -> lit -> Atom.t
val mk_atom_t : t -> ?⁠sign:bool -> term -> Atom.t
val add_clause : t -> Atom.t Sidekick_util.IArray.t -> unit
val add_clause_l : t -> Atom.t list -> unit
type res =
| Sat of Model.t
| Unsat of {
proof : proof option lazy_t;
unsat_core : Atom.t list lazy_t;
}
| Unknown of Unknown.t

Result of solving for the current set of clauses

val solve : ?⁠on_exit:(unit -> unit) list -> ?⁠check:bool -> ?⁠on_progress:(t -> unit) -> assumptions:Atom.t list -> t -> res

solve s checks the satisfiability of the statement added so far to s

parameter check

if true, the model is checked before returning

parameter assumptions

a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

parameter on_exit

functions to be run before this returns

val pp_stats : t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER/module-type-THEORY/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER/module-type-THEORY/index.html index 2bba67a7..e78c6214 100644 --- a/dev/sidekick/Sidekick_core/module-type-SOLVER/module-type-THEORY/index.html +++ b/dev/sidekick/Sidekick_core/module-type-SOLVER/module-type-THEORY/index.html @@ -1,2 +1,2 @@ -THEORY (sidekick.Sidekick_core.SOLVER.THEORY)

Module type SOLVER.THEORY

A theory

Theories are abstracted over the concrete implementation of the solver, so they can work with any implementation.

Typically a theory should be a functor taking an argument containing a SOLVER_INTERNAL and some additional views on terms, literals, etc. that are specific to the theory (e.g. to map terms to linear expressions). The theory can then be instantiated on any kind of solver for any term representation that also satisfies the additional theory-specific requirements. Instantiated theories (ie values of type SOLVER.theory) can be added to the solver.

type t

The theory's state

val name : string

Name of the theory

val create_and_setup : Solver_internal.t -> t

Instantiate the theory's state for the given (internal) solver, register callbacks, create keys, etc.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Pop backtracking levels, restoring the theory to its former state

\ No newline at end of file +THEORY (sidekick.Sidekick_core.SOLVER.THEORY)

Module type SOLVER.THEORY

A theory

Theories are abstracted over the concrete implementation of the solver, so they can work with any implementation.

Typically a theory should be a functor taking an argument containing a SOLVER_INTERNAL or even a full SOLVER, and some additional views on terms, literals, etc. that are specific to the theory (e.g. to map terms to linear expressions). The theory can then be instantiated on any kind of solver for any term representation that also satisfies the additional theory-specific requirements. Instantiated theories (ie values of type SOLVER.theory) can be added to the solver.

type t

The theory's state

val name : string

Name of the theory

val create_and_setup : Solver_internal.t -> t

Instantiate the theory's state for the given (internal) solver, register callbacks, create keys, etc.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Pop backtracking levels, restoring the theory to its former state

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/A/Fun/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/A/Fun/index.html deleted file mode 100644 index c0d0ba6f..00000000 --- a/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/A/Fun/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Fun (sidekick.Sidekick_core.SOLVER_INTERNAL.A.Fun)

Module A.Fun

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/A/Proof/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/A/Proof/index.html deleted file mode 100644 index 2d1e5f6b..00000000 --- a/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/A/Proof/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Proof (sidekick.Sidekick_core.SOLVER_INTERNAL.A.Proof)

Module A.Proof

type t
val pp : t Fmt.printer
val default : t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/A/Term/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/A/Term/index.html deleted file mode 100644 index 9d467ba5..00000000 --- a/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/A/Term/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Term (sidekick.Sidekick_core.SOLVER_INTERNAL.A.Term)

Module A.Term

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Fmt.printer
type state
val ty : t -> Ty.t
val bool : state -> bool -> t
val as_bool : t -> bool option
val abs : state -> t -> t * bool
val map_shallow : state -> (t -> t) -> t -> t

Map function on immediate subterms

val iter_dag : t -> (t -> unit) -> unit
module Tbl : CCHashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/A/Ty/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/A/Ty/index.html deleted file mode 100644 index d70ce15b..00000000 --- a/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/A/Ty/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Ty (sidekick.Sidekick_core.SOLVER_INTERNAL.A.Ty)

Module A.Ty

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Fmt.printer
val bool : t
val is_bool : t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/A/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/A/index.html deleted file mode 100644 index db7363fb..00000000 --- a/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/A/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -A (sidekick.Sidekick_core.SOLVER_INTERNAL.A)

Module SOLVER_INTERNAL.A

include TERM
module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
module Proof : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/CC/Actions/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/CC/Actions/index.html new file mode 100644 index 00000000..5c2f6f8e --- /dev/null +++ b/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/CC/Actions/index.html @@ -0,0 +1,2 @@ + +Actions (sidekick.Sidekick_core.SOLVER_INTERNAL.CC.Actions)

Module CC.Actions

module T = T
module P = P
module Lit = Lit
type t = actions
val raise_conflict : t -> Lit.t list -> P.t -> 'a
val propagate : t -> Lit.t -> reason:(unit -> Lit.t list) -> P.t -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/CC/Expl/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/CC/Expl/index.html index 00f10e94..4d4a4447 100644 --- a/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/CC/Expl/index.html +++ b/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/CC/Expl/index.html @@ -1,2 +1,2 @@ -Expl (sidekick.Sidekick_core.SOLVER_INTERNAL.CC.Expl)

Module CC.Expl

type t
val pp : t Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
\ No newline at end of file +Expl (sidekick.Sidekick_core.SOLVER_INTERNAL.CC.Expl)

Module CC.Expl

type t
val pp : t Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
val mk_theory : t -> t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/CC/N/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/CC/N/index.html index 4f80d85d..47af4fd0 100644 --- a/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/CC/N/index.html +++ b/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/CC/N/index.html @@ -1,2 +1,2 @@ -N (sidekick.Sidekick_core.SOLVER_INTERNAL.CC.N)

Module CC.N

An equivalence class is a set of terms that are currently equal in the partial model built by the solver. The class is represented by a collection of nodes, one of which is distinguished and is called the "representative".

All information pertaining to the whole equivalence class is stored in this representative's node.

When two classes become equal (are "merged"), one of the two representatives is picked as the representative of the new class. The new class contains the union of the two old classes' nodes.

We also allow theories to store additional information in the representative. This information can be used when two classes are merged, to detect conflicts and solve equations à la Shostak.

type t
val term : t -> term
val equal : t -> t -> bool
val hash : t -> int
val pp : t Fmt.printer
val is_root : t -> bool

Is the node a root (ie the representative of its class)?

val iter_class : t -> t Iter.t

Traverse the congruence class. Precondition: is_root n (see find below)

val iter_parents : t -> t Iter.t

Traverse the parents of the class. Precondition: is_root n (see find below)

\ No newline at end of file +N (sidekick.Sidekick_core.SOLVER_INTERNAL.CC.N)

Module CC.N

An equivalence class is a set of terms that are currently equal in the partial model built by the solver. The class is represented by a collection of nodes, one of which is distinguished and is called the "representative".

All information pertaining to the whole equivalence class is stored in this representative's node.

When two classes become equal (are "merged"), one of the two representatives is picked as the representative of the new class. The new class contains the union of the two old classes' nodes.

We also allow theories to store additional information in the representative. This information can be used when two classes are merged, to detect conflicts and solve equations à la Shostak.

type t
val term : t -> term
val equal : t -> t -> bool
val hash : t -> int
val pp : t Fmt.printer
val is_root : t -> bool

Is the node a root (ie the representative of its class)?

val iter_class : t -> t Iter.t

Traverse the congruence class. Precondition: is_root n (see find below)

val iter_parents : t -> t Iter.t

Traverse the parents of the class. Precondition: is_root n (see find below)

type bitfield

A field in the bitfield of this node. This should only be allocated when a theory is initialized.

All fields are initially 0, are backtracked automatically, and are merged automatically when classes are merged.

val get_field : bitfield -> t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/CC/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/CC/index.html index 4d8de576..56c2a7ca 100644 --- a/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/CC/index.html +++ b/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/CC/index.html @@ -1,2 +1,2 @@ -CC (sidekick.Sidekick_core.SOLVER_INTERNAL.CC)

Module SOLVER_INTERNAL.CC

module CC_A = CC_A
module A = CC_A.A
type term_state = A.Term.state
type term = A.Term.t
type fun_ = A.Fun.t
type lit = CC_A.Lit.t
type proof = A.Proof.t
type actions = CC_A.Actions.t
type t

Global state of the congruence closure

module N : sig ... end

An equivalence class is a set of terms that are currently equal in the partial model built by the solver. The class is represented by a collection of nodes, one of which is distinguished and is called the "representative".

module Expl : sig ... end
type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t
val term_state : t -> term_state
val find : t -> node -> repr

Current representative

val add_term : t -> term -> node

Add the term to the congruence closure, if not present already. Will be backtracked.

type ev_on_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit
type ev_on_new_term = t -> N.t -> term -> unit
type ev_on_conflict = t -> lit list -> unit
type ev_on_propagate = t -> lit -> (unit -> lit list) -> unit
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_merge:ev_on_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠size:[ `Small | `Big ] -> term_state -> t

Create a new congruence closure.

val on_merge : t -> ev_on_merge -> unit

Add a function to be called when two classes are merged

val on_new_term : t -> ev_on_new_term -> unit

Add a function to be called when a new node is created

val on_conflict : t -> ev_on_conflict -> unit

Called when the congruence closure finds a conflict

val on_propagate : t -> ev_on_propagate -> unit

Called when the congruence closure propagates a literal

val set_as_lit : t -> N.t -> lit -> unit

map the given node to a literal.

val find_t : t -> term -> repr

Current representative of the term.

raises Not_found

if the term is not already add-ed.

val add_seq : t -> term Iter.t -> unit

Add a sequence of terms to the congruence closure

val all_classes : t -> repr Iter.t

All current classes. This is costly, only use if there is no other solution

val assert_lit : t -> lit -> unit

Given a literal, assume it in the congruence closure and propagate its consequences. Will be backtracked.

Useful for the theory combination or the SAT solver's functor

val assert_lits : t -> lit Iter.t -> unit

Addition of many literals

val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given explanation it must be a theory tautology that expl ==> absurd. To be used in theories.

val merge : t -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val check : t -> actions -> unit

Perform all pending operations done via assert_eq, assert_lit, etc. Will use the actions to propagate literals, declare conflicts, etc.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Restore to state n calls to push_level earlier. Used during backtracking.

val get_model : t -> N.t Iter.t Iter.t

get all the equivalence classes so they can be merged in the model

\ No newline at end of file +CC (sidekick.Sidekick_core.SOLVER_INTERNAL.CC)

Module SOLVER_INTERNAL.CC

module T = T
module P = P
module Lit = Lit
module Actions : CC_ACTIONS with module T = T and module Lit = Lit and module P = P and type t = actions
type term_state = T.Term.state
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type proof = P.t
type actions = Actions.t
type t

Global state of the congruence closure

module N : sig ... end

An equivalence class is a set of terms that are currently equal in the partial model built by the solver. The class is represented by a collection of nodes, one of which is distinguished and is called the "representative".

module Expl : sig ... end
type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t
val term_state : t -> term_state
val find : t -> node -> repr

Current representative

val add_term : t -> term -> node

Add the term to the congruence closure, if not present already. Will be backtracked.

val mem_term : t -> term -> bool

Returns true if the term is explicitly present in the congruence closure

type ev_on_pre_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit
type ev_on_post_merge = t -> actions -> N.t -> N.t -> unit
type ev_on_new_term = t -> N.t -> term -> unit
type ev_on_conflict = t -> th:bool -> lit list -> unit
type ev_on_propagate = t -> lit -> (unit -> lit list) -> unit
type ev_on_is_subterm = N.t -> term -> unit
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_pre_merge:ev_on_pre_merge list -> ?⁠on_post_merge:ev_on_post_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠on_is_subterm:ev_on_is_subterm list -> ?⁠size:[ `Small | `Big ] -> term_state -> t

Create a new congruence closure.

val allocate_bitfield : descr:string -> t -> N.bitfield

Allocate a new bitfield for the nodes. See N.bitfield.

val set_bitfield : t -> N.bitfield -> bool -> N.t -> unit

Set the bitfield for the node. This will be backtracked. See N.bitfield.

val on_pre_merge : t -> ev_on_pre_merge -> unit

Add a function to be called when two classes are merged

val on_post_merge : t -> ev_on_post_merge -> unit

Add a function to be called when two classes are merged

val on_new_term : t -> ev_on_new_term -> unit

Add a function to be called when a new node is created

val on_conflict : t -> ev_on_conflict -> unit

Called when the congruence closure finds a conflict

val on_propagate : t -> ev_on_propagate -> unit

Called when the congruence closure propagates a literal

val on_is_subterm : t -> ev_on_is_subterm -> unit

Called on terms that are subterms of function symbols

val set_as_lit : t -> N.t -> lit -> unit

map the given node to a literal.

val find_t : t -> term -> repr

Current representative of the term.

raises Not_found

if the term is not already add-ed.

val add_seq : t -> term Iter.t -> unit

Add a sequence of terms to the congruence closure

val all_classes : t -> repr Iter.t

All current classes. This is costly, only use if there is no other solution

val assert_lit : t -> lit -> unit

Given a literal, assume it in the congruence closure and propagate its consequences. Will be backtracked.

Useful for the theory combination or the SAT solver's functor

val assert_lits : t -> lit Iter.t -> unit

Addition of many literals

val explain_eq : t -> N.t -> N.t -> lit list

Explain why the two nodes are equal. Fails if they are not, in an unspecified way

val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given explanation it must be a theory tautology that expl ==> absurd. To be used in theories.

val n_true : t -> N.t
val n_false : t -> N.t
val n_bool : t -> bool -> N.t
val merge : t -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val merge_t : t -> term -> term -> Expl.t -> unit

Shortcut for adding + merging

val check : t -> actions -> unit

Perform all pending operations done via assert_eq, assert_lit, etc. Will use the actions to propagate literals, declare conflicts, etc.

val new_merges : t -> bool

Called after check, returns true if some pairs of classes were merged.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Restore to state n calls to push_level earlier. Used during backtracking.

val get_model : t -> N.t Iter.t Iter.t

get all the equivalence classes so they can be merged in the model

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/CC_A/Actions/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/CC_A/Actions/index.html deleted file mode 100644 index f09bb8e7..00000000 --- a/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/CC_A/Actions/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Actions (sidekick.Sidekick_core.SOLVER_INTERNAL.CC_A.Actions)

Module CC_A.Actions

type t
val raise_conflict : t -> Lit.t list -> A.Proof.t -> 'a
val propagate : t -> Lit.t -> reason:(unit -> Lit.t list) -> A.Proof.t -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/CC_A/Lit/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/CC_A/Lit/index.html deleted file mode 100644 index 4da04d37..00000000 --- a/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/CC_A/Lit/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Lit (sidekick.Sidekick_core.SOLVER_INTERNAL.CC_A.Lit)

Module CC_A.Lit

type t
val term : t -> A.Term.t
val sign : t -> bool
val neg : t -> t
val pp : t Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/CC_A/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/CC_A/index.html deleted file mode 100644 index 8f0203ab..00000000 --- a/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/CC_A/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -CC_A (sidekick.Sidekick_core.SOLVER_INTERNAL.CC_A)

Module SOLVER_INTERNAL.CC_A

module A = A
val cc_view : A.Term.t -> (A.Fun.tA.Term.tA.Term.t Iter.t) CC_view.t

View the term through the lens of the congruence closure

module Lit : sig ... end
module Actions : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/Lit/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/Lit/index.html index 56e48e74..d83d757c 100644 --- a/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/Lit/index.html +++ b/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/Lit/index.html @@ -1,2 +1,2 @@ -Lit (sidekick.Sidekick_core.SOLVER_INTERNAL.Lit)

Module SOLVER_INTERNAL.Lit

Literals

A literal is a (preprocessed) term along with its sign. It is directly manipulated by the SAT solver.

type t
val term : t -> term
val sign : t -> bool
val neg : t -> t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Fmt.printer
\ No newline at end of file +Lit (sidekick.Sidekick_core.SOLVER_INTERNAL.Lit)

Module SOLVER_INTERNAL.Lit

Literals

A literal is a (preprocessed) term along with its sign. It is directly manipulated by the SAT solver.

module T = T
type t
val term : t -> T.Term.t
val sign : t -> bool
val neg : t -> t
val abs : t -> t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/P/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/P/index.html new file mode 100644 index 00000000..d8ea345c --- /dev/null +++ b/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/P/index.html @@ -0,0 +1,2 @@ + +P (sidekick.Sidekick_core.SOLVER_INTERNAL.P)

Module SOLVER_INTERNAL.P

type t
val pp : t Fmt.printer
val default : t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/Simplify/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/Simplify/index.html index ed553fc5..e09ce3a7 100644 --- a/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/Simplify/index.html +++ b/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/Simplify/index.html @@ -1,2 +1,2 @@ -Simplify (sidekick.Sidekick_core.SOLVER_INTERNAL.Simplify)

Module SOLVER_INTERNAL.Simplify

type t
val tst : t -> term_state
val clear : t -> unit

Reset internal cache, etc.

type hook = t -> term -> term option

Given a term, try to simplify it. Return None if it didn't change. Can also add clauses to the simplifier.

val normalize : t -> term -> term

Normalize a term using all the hooks.

\ No newline at end of file +Simplify (sidekick.Sidekick_core.SOLVER_INTERNAL.Simplify)

Module SOLVER_INTERNAL.Simplify

type t
val tst : t -> term_state
val ty_st : t -> ty_state
val clear : t -> unit

Reset internal cache, etc.

type hook = t -> term -> term option

Given a term, try to simplify it. Return None if it didn't change.

val normalize : t -> term -> term

Normalize a term using all the hooks.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/T/Fun/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/T/Fun/index.html new file mode 100644 index 00000000..d7339366 --- /dev/null +++ b/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/T/Fun/index.html @@ -0,0 +1,2 @@ + +Fun (sidekick.Sidekick_core.SOLVER_INTERNAL.T.Fun)

Module T.Fun

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/T/Term/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/T/Term/index.html new file mode 100644 index 00000000..29c0fd8f --- /dev/null +++ b/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/T/Term/index.html @@ -0,0 +1,2 @@ + +Term (sidekick.Sidekick_core.SOLVER_INTERNAL.T.Term)

Module T.Term

type t
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val pp : t Fmt.printer
type state
val ty : t -> Ty.t
val bool : state -> bool -> t
val as_bool : t -> bool option
val abs : state -> t -> t * bool
val map_shallow : state -> (t -> t) -> t -> t

Map function on immediate subterms

val iter_dag : t -> (t -> unit) -> unit
module Tbl : CCHashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/T/Ty/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/T/Ty/index.html new file mode 100644 index 00000000..7d900e48 --- /dev/null +++ b/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/T/Ty/index.html @@ -0,0 +1,2 @@ + +Ty (sidekick.Sidekick_core.SOLVER_INTERNAL.T.Ty)

Module T.Ty

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Fmt.printer
type state
val bool : state -> t
val is_bool : t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/T/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/T/index.html new file mode 100644 index 00000000..c8597a75 --- /dev/null +++ b/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/T/index.html @@ -0,0 +1,2 @@ + +T (sidekick.Sidekick_core.SOLVER_INTERNAL.T)

Module SOLVER_INTERNAL.T

module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/index.html index 70a622d0..6bba3d3c 100644 --- a/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/index.html +++ b/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/index.html @@ -1,2 +1,2 @@ -SOLVER_INTERNAL (sidekick.Sidekick_core.SOLVER_INTERNAL)

Module type Sidekick_core.SOLVER_INTERNAL

A view of the solver from a theory's point of view

module A : TERM_PROOF
module CC_A : CC_ARG with module A = A
module CC : CC_S with module CC_A = CC_A
type ty = A.Ty.t
type term = A.Term.t
type term_state = A.Term.state
type proof = A.Proof.t
type t

Main type for a solver

type solver = t
module Expl = CC.Expl
module N = CC.N
val tst : t -> term_state
val cc : t -> CC.t

Congruence closure for this solver

module Lit : sig ... end
type lit = Lit.t

Simplifiers

module Simplify : sig ... end
type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit
val simplifier : t -> Simplify.t
val simp_t : t -> term -> term

hooks for the theory

type actions
val propagate : t -> actions -> lit -> reason:(unit -> lit list) -> A.Proof.t -> unit
val raise_conflict : t -> actions -> lit list -> A.Proof.t -> 'a

Give a conflict clause to the solver

val propagate : t -> actions -> lit -> (unit -> lit list) -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> actions -> lit -> lit list -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> actions -> lit list -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : t -> actions -> lit list -> unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> actions -> ?⁠sign:bool -> term -> lit

Create a literal

val add_lit : t -> actions -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value

val add_lit_t : t -> actions -> ?⁠sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> N.t -> N.t

Find representative of the node

val cc_merge : t -> actions -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> actions -> term -> term -> Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> N.t

Add/retrieve congruence closure node for this term. To be used in theories

val on_cc_merge : t -> (CC.t -> actions -> N.t -> N.t -> Expl.t -> unit) -> unit

Callback for when two classes containing data for this key are merged

val on_cc_new_term : t -> (CC.t -> N.t -> term -> unit) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_conflict : t -> (CC.t -> lit list -> unit) -> unit

Callback called on every CC conflict

val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list) -> unit) -> unit

Callback called on every CC propagation

val on_partial_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

type preprocess_hook = t -> mk_lit:(term -> lit) -> add_clause:(lit list -> unit) -> term -> term option

Given a term, try to preprocess it. Return None if it didn't change. Can also add clauses to define new terms.

val add_preprocess : t -> preprocess_hook -> unit
\ No newline at end of file +SOLVER_INTERNAL (sidekick.Sidekick_core.SOLVER_INTERNAL)

Module type Sidekick_core.SOLVER_INTERNAL

A view of the solver from a theory's point of view

module T : TERM
module P : PROOF
type ty = T.Ty.t
type term = T.Term.t
type term_state = T.Term.state
type ty_state = T.Ty.state
type proof = P.t
type t

Main type for a solver

type solver = t
val tst : t -> term_state
val ty_st : t -> ty_state
val stats : t -> Sidekick_util.Stat.t

Actions for the theories

type actions
module Lit : LIT with module T = T
type lit = Lit.t

Congruence Closure

module CC : CC_S with module T = T and module P = P and module Lit = Lit and type Actions.t = actions
val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end
type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit
val simplifier : t -> Simplify.t
val simp_t : t -> term -> term

hooks for the theory

val propagate : t -> actions -> lit -> reason:(unit -> lit list) -> proof -> unit

Propagate a literal for a reason. This is similar to asserting the clause reason => lit, but more lightweight, and in a way that is backtrackable.

val raise_conflict : t -> actions -> lit list -> proof -> 'a

Give a conflict clause to the solver

val push_decision : t -> actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : t -> actions -> lit -> (unit -> lit list) -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> actions -> lit -> lit list -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> actions -> lit list -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : t -> actions -> lit list -> unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> actions -> ?⁠sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val preprocess_term : t -> add_clause:(Lit.t list -> unit) -> term -> term

Preprocess a term.

val add_lit : t -> actions -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value

val add_lit_t : t -> actions -> ?⁠sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit

Callback called on every CC conflict

val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list) -> unit) -> unit

Callback called on every CC propagation

val on_partial_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

type preprocess_hook = t -> mk_lit:(term -> lit) -> add_clause:(lit list -> unit) -> term -> term option

Given a term, try to preprocess it. Return None if it didn't change. Can also add clauses to define new terms.

parameter mk_lit

creates a new literal for a boolean term.

parameter add_clause

pushes a new clause into the SAT solver.

val on_preprocess : t -> preprocess_hook -> unit

Model production

type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option

A model-production hook. It takes the solver, a class, and returns a term for this class.

val on_model_gen : t -> model_hook -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-TERM/Fun/index.html b/dev/sidekick/Sidekick_core/module-type-TERM/Fun/index.html index f8f0ba58..03c4694c 100644 --- a/dev/sidekick/Sidekick_core/module-type-TERM/Fun/index.html +++ b/dev/sidekick/Sidekick_core/module-type-TERM/Fun/index.html @@ -1,2 +1,2 @@ -Fun (sidekick.Sidekick_core.TERM.Fun)

Module TERM.Fun

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Fmt.printer
\ No newline at end of file +Fun (sidekick.Sidekick_core.TERM.Fun)

Module TERM.Fun

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-TERM/Term/index.html b/dev/sidekick/Sidekick_core/module-type-TERM/Term/index.html index 378ed666..cb62d310 100644 --- a/dev/sidekick/Sidekick_core/module-type-TERM/Term/index.html +++ b/dev/sidekick/Sidekick_core/module-type-TERM/Term/index.html @@ -1,2 +1,2 @@ -Term (sidekick.Sidekick_core.TERM.Term)

Module TERM.Term

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Fmt.printer
type state
val ty : t -> Ty.t
val bool : state -> bool -> t
val as_bool : t -> bool option
val abs : state -> t -> t * bool
val map_shallow : state -> (t -> t) -> t -> t

Map function on immediate subterms

val iter_dag : t -> (t -> unit) -> unit
module Tbl : CCHashtbl.S with type Tbl.key = t
\ No newline at end of file +Term (sidekick.Sidekick_core.TERM.Term)

Module TERM.Term

type t
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val pp : t Fmt.printer
type state
val ty : t -> Ty.t
val bool : state -> bool -> t
val as_bool : t -> bool option
val abs : state -> t -> t * bool
val map_shallow : state -> (t -> t) -> t -> t

Map function on immediate subterms

val iter_dag : t -> (t -> unit) -> unit
module Tbl : CCHashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-TERM/Ty/index.html b/dev/sidekick/Sidekick_core/module-type-TERM/Ty/index.html index 2ae18956..74671696 100644 --- a/dev/sidekick/Sidekick_core/module-type-TERM/Ty/index.html +++ b/dev/sidekick/Sidekick_core/module-type-TERM/Ty/index.html @@ -1,2 +1,2 @@ -Ty (sidekick.Sidekick_core.TERM.Ty)

Module TERM.Ty

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Fmt.printer
val bool : t
val is_bool : t -> bool
\ No newline at end of file +Ty (sidekick.Sidekick_core.TERM.Ty)

Module TERM.Ty

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Fmt.printer
type state
val bool : state -> t
val is_bool : t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-TERM/index.html b/dev/sidekick/Sidekick_core/module-type-TERM/index.html index b15cb7c8..31f589c2 100644 --- a/dev/sidekick/Sidekick_core/module-type-TERM/index.html +++ b/dev/sidekick/Sidekick_core/module-type-TERM/index.html @@ -1,2 +1,2 @@ -TERM (sidekick.Sidekick_core.TERM)

Module type Sidekick_core.TERM

module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
\ No newline at end of file +TERM (sidekick.Sidekick_core.TERM)

Module type Sidekick_core.TERM

Main representation of Terms and Types

module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-TERM_PROOF/Fun/index.html b/dev/sidekick/Sidekick_core/module-type-TERM_PROOF/Fun/index.html deleted file mode 100644 index 18ecfada..00000000 --- a/dev/sidekick/Sidekick_core/module-type-TERM_PROOF/Fun/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Fun (sidekick.Sidekick_core.TERM_PROOF.Fun)

Module TERM_PROOF.Fun

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-TERM_PROOF/Proof/index.html b/dev/sidekick/Sidekick_core/module-type-TERM_PROOF/Proof/index.html deleted file mode 100644 index 67a5b197..00000000 --- a/dev/sidekick/Sidekick_core/module-type-TERM_PROOF/Proof/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Proof (sidekick.Sidekick_core.TERM_PROOF.Proof)

Module TERM_PROOF.Proof

type t
val pp : t Fmt.printer
val default : t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-TERM_PROOF/Term/index.html b/dev/sidekick/Sidekick_core/module-type-TERM_PROOF/Term/index.html deleted file mode 100644 index 3aa19b06..00000000 --- a/dev/sidekick/Sidekick_core/module-type-TERM_PROOF/Term/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Term (sidekick.Sidekick_core.TERM_PROOF.Term)

Module TERM_PROOF.Term

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Fmt.printer
type state
val ty : t -> Ty.t
val bool : state -> bool -> t
val as_bool : t -> bool option
val abs : state -> t -> t * bool
val map_shallow : state -> (t -> t) -> t -> t

Map function on immediate subterms

val iter_dag : t -> (t -> unit) -> unit
module Tbl : CCHashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-TERM_PROOF/Ty/index.html b/dev/sidekick/Sidekick_core/module-type-TERM_PROOF/Ty/index.html deleted file mode 100644 index 1f5b20d8..00000000 --- a/dev/sidekick/Sidekick_core/module-type-TERM_PROOF/Ty/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Ty (sidekick.Sidekick_core.TERM_PROOF.Ty)

Module TERM_PROOF.Ty

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Fmt.printer
val bool : t
val is_bool : t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-TERM_PROOF/index.html b/dev/sidekick/Sidekick_core/module-type-TERM_PROOF/index.html deleted file mode 100644 index e73d5fcc..00000000 --- a/dev/sidekick/Sidekick_core/module-type-TERM_PROOF/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -TERM_PROOF (sidekick.Sidekick_core.TERM_PROOF)

Module type Sidekick_core.TERM_PROOF

include TERM
module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
module Proof : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_mini_cc/Make/argument-1-A/Fun/index.html b/dev/sidekick/Sidekick_mini_cc/Make/argument-1-A/Fun/index.html deleted file mode 100644 index a0d04e3e..00000000 --- a/dev/sidekick/Sidekick_mini_cc/Make/argument-1-A/Fun/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Fun (sidekick.Sidekick_mini_cc.Make.1-A.Fun)

Module 1-A.Fun

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_mini_cc/Make/argument-1-A/T/Fun/index.html b/dev/sidekick/Sidekick_mini_cc/Make/argument-1-A/T/Fun/index.html new file mode 100644 index 00000000..e331d862 --- /dev/null +++ b/dev/sidekick/Sidekick_mini_cc/Make/argument-1-A/T/Fun/index.html @@ -0,0 +1,2 @@ + +Fun (sidekick.Sidekick_mini_cc.Make.1-A.T.Fun)

Module T.Fun

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_mini_cc/Make/argument-1-A/T/Term/index.html b/dev/sidekick/Sidekick_mini_cc/Make/argument-1-A/T/Term/index.html new file mode 100644 index 00000000..f22d9248 --- /dev/null +++ b/dev/sidekick/Sidekick_mini_cc/Make/argument-1-A/T/Term/index.html @@ -0,0 +1,2 @@ + +Term (sidekick.Sidekick_mini_cc.Make.1-A.T.Term)

Module T.Term

type t
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type state
val ty : t -> Ty.t
val bool : state -> bool -> t
val as_bool : t -> bool option
val abs : state -> t -> t * bool
val map_shallow : state -> (t -> t) -> t -> t

Map function on immediate subterms

val iter_dag : t -> (t -> unit) -> unit
module Tbl : CCHashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_mini_cc/Make/argument-1-A/T/Ty/index.html b/dev/sidekick/Sidekick_mini_cc/Make/argument-1-A/T/Ty/index.html new file mode 100644 index 00000000..51c85dd4 --- /dev/null +++ b/dev/sidekick/Sidekick_mini_cc/Make/argument-1-A/T/Ty/index.html @@ -0,0 +1,2 @@ + +Ty (sidekick.Sidekick_mini_cc.Make.1-A.T.Ty)

Module T.Ty

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type state
val bool : state -> t
val is_bool : t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_mini_cc/Make/argument-1-A/T/index.html b/dev/sidekick/Sidekick_mini_cc/Make/argument-1-A/T/index.html new file mode 100644 index 00000000..ccfe0c30 --- /dev/null +++ b/dev/sidekick/Sidekick_mini_cc/Make/argument-1-A/T/index.html @@ -0,0 +1,2 @@ + +T (sidekick.Sidekick_mini_cc.Make.1-A.T)

Module 1-A.T

module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_mini_cc/Make/argument-1-A/Term/index.html b/dev/sidekick/Sidekick_mini_cc/Make/argument-1-A/Term/index.html deleted file mode 100644 index 1ba4e54f..00000000 --- a/dev/sidekick/Sidekick_mini_cc/Make/argument-1-A/Term/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Term (sidekick.Sidekick_mini_cc.Make.1-A.Term)

Module 1-A.Term

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type state
val ty : t -> Ty.t
val bool : state -> bool -> t
val as_bool : t -> bool option
val abs : state -> t -> t * bool
val map_shallow : state -> (t -> t) -> t -> t

Map function on immediate subterms

val iter_dag : t -> (t -> unit) -> unit
module Tbl : CCHashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_mini_cc/Make/argument-1-A/Ty/index.html b/dev/sidekick/Sidekick_mini_cc/Make/argument-1-A/Ty/index.html deleted file mode 100644 index 26d9a6e0..00000000 --- a/dev/sidekick/Sidekick_mini_cc/Make/argument-1-A/Ty/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Ty (sidekick.Sidekick_mini_cc.Make.1-A.Ty)

Module 1-A.Ty

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
val bool : t
val is_bool : t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_mini_cc/Make/argument-1-A/index.html b/dev/sidekick/Sidekick_mini_cc/Make/argument-1-A/index.html index baffd63f..abe95a1b 100644 --- a/dev/sidekick/Sidekick_mini_cc/Make/argument-1-A/index.html +++ b/dev/sidekick/Sidekick_mini_cc/Make/argument-1-A/index.html @@ -1,2 +1,2 @@ -1-A (sidekick.Sidekick_mini_cc.Make.1-A)

Parameter Make.1-A

include Sidekick_core.TERM
module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
val cc_view : Term.t -> (Fun.tTerm.tTerm.t Iter.t) CC_view.t
\ No newline at end of file +1-A (sidekick.Sidekick_mini_cc.Make.1-A)

Parameter Make.1-A

val cc_view : T.Term.t -> (T.Fun.tT.Term.tT.Term.t Iter.t) CC_view.t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_mini_cc/Make/index.html b/dev/sidekick/Sidekick_mini_cc/Make/index.html index 417443b2..f2a6877a 100644 --- a/dev/sidekick/Sidekick_mini_cc/Make/index.html +++ b/dev/sidekick/Sidekick_mini_cc/Make/index.html @@ -1,2 +1,2 @@ -Make (sidekick.Sidekick_mini_cc.Make)

Module Sidekick_mini_cc.Make

Parameters

Signature

type term = A.Term.t
type fun_ = A.Fun.t
type term_state = A.Term.state
type t
val create : term_state -> t
val add_lit : t -> term -> bool -> unit

add_lit cc p sign asserts that p=sign

val distinct : t -> term list -> unit

distinct cc l asserts that all terms in l are distinct

val check_sat : t -> bool

check_sat cc returns true if the current state is satisfiable, false if it's unsatisfiable

val classes : t -> term Iter.t Iter.t

Traverse the set of classes in the congruence closure. This should be called only if check returned Sat.

\ No newline at end of file +Make (sidekick.Sidekick_mini_cc.Make)

Module Sidekick_mini_cc.Make

Parameters

Signature

type term = A.T.Term.t
type fun_ = A.T.Fun.t
type term_state = A.T.Term.state
type t
val create : term_state -> t
val clear : t -> unit

Fully reset the congruence closure's state

val add_lit : t -> term -> bool -> unit

add_lit cc p sign asserts that p=sign

val check_sat : t -> bool

check_sat cc returns true if the current state is satisfiable, false if it's unsatisfiable

val classes : t -> term Iter.t Iter.t

Traverse the set of classes in the congruence closure. This should be called only if check returned Sat.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_mini_cc/index.html b/dev/sidekick/Sidekick_mini_cc/index.html index 1f013189..e217f8fe 100644 --- a/dev/sidekick/Sidekick_mini_cc/index.html +++ b/dev/sidekick/Sidekick_mini_cc/index.html @@ -1,2 +1,2 @@ -Sidekick_mini_cc (sidekick.Sidekick_mini_cc)

Module Sidekick_mini_cc

Mini congruence closure

This implementation is as simple as possible, and doesn't provide backtracking, theories, or explanations. It just decides the satisfiability of a set of (dis)equations.

module CC_view = Sidekick_core.CC_view
module type ARG = sig ... end
module type S = sig ... end
module Make : functor (A : ARG) -> S with type term = A.Term.t and type fun_ = A.Fun.t and type term_state = A.Term.state
\ No newline at end of file +Sidekick_mini_cc (sidekick.Sidekick_mini_cc)

Module Sidekick_mini_cc

Mini congruence closure

This implementation is as simple as possible, and doesn't provide backtracking, theories, or explanations. It just decides the satisfiability of a set of (dis)equations.

module CC_view = Sidekick_core.CC_view
module type ARG = sig ... end
module type S = sig ... end
module Make : functor (A : ARG) -> S with type term = A.T.Term.t and type fun_ = A.T.Fun.t and type term_state = A.T.Term.state
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_mini_cc/module-type-ARG/Fun/index.html b/dev/sidekick/Sidekick_mini_cc/module-type-ARG/Fun/index.html deleted file mode 100644 index 446646e9..00000000 --- a/dev/sidekick/Sidekick_mini_cc/module-type-ARG/Fun/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Fun (sidekick.Sidekick_mini_cc.ARG.Fun)

Module ARG.Fun

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_mini_cc/module-type-ARG/T/Fun/index.html b/dev/sidekick/Sidekick_mini_cc/module-type-ARG/T/Fun/index.html new file mode 100644 index 00000000..b950658f --- /dev/null +++ b/dev/sidekick/Sidekick_mini_cc/module-type-ARG/T/Fun/index.html @@ -0,0 +1,2 @@ + +Fun (sidekick.Sidekick_mini_cc.ARG.T.Fun)

Module T.Fun

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_mini_cc/module-type-ARG/T/Term/index.html b/dev/sidekick/Sidekick_mini_cc/module-type-ARG/T/Term/index.html new file mode 100644 index 00000000..73962bf7 --- /dev/null +++ b/dev/sidekick/Sidekick_mini_cc/module-type-ARG/T/Term/index.html @@ -0,0 +1,2 @@ + +Term (sidekick.Sidekick_mini_cc.ARG.T.Term)

Module T.Term

type t
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type state
val ty : t -> Ty.t
val bool : state -> bool -> t
val as_bool : t -> bool option
val abs : state -> t -> t * bool
val map_shallow : state -> (t -> t) -> t -> t

Map function on immediate subterms

val iter_dag : t -> (t -> unit) -> unit
module Tbl : CCHashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_mini_cc/module-type-ARG/T/Ty/index.html b/dev/sidekick/Sidekick_mini_cc/module-type-ARG/T/Ty/index.html new file mode 100644 index 00000000..f62cb84c --- /dev/null +++ b/dev/sidekick/Sidekick_mini_cc/module-type-ARG/T/Ty/index.html @@ -0,0 +1,2 @@ + +Ty (sidekick.Sidekick_mini_cc.ARG.T.Ty)

Module T.Ty

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type state
val bool : state -> t
val is_bool : t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_mini_cc/module-type-ARG/T/index.html b/dev/sidekick/Sidekick_mini_cc/module-type-ARG/T/index.html new file mode 100644 index 00000000..b7dfd81c --- /dev/null +++ b/dev/sidekick/Sidekick_mini_cc/module-type-ARG/T/index.html @@ -0,0 +1,2 @@ + +T (sidekick.Sidekick_mini_cc.ARG.T)

Module ARG.T

module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_mini_cc/module-type-ARG/Term/index.html b/dev/sidekick/Sidekick_mini_cc/module-type-ARG/Term/index.html deleted file mode 100644 index ffea94fd..00000000 --- a/dev/sidekick/Sidekick_mini_cc/module-type-ARG/Term/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Term (sidekick.Sidekick_mini_cc.ARG.Term)

Module ARG.Term

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type state
val ty : t -> Ty.t
val bool : state -> bool -> t
val as_bool : t -> bool option
val abs : state -> t -> t * bool
val map_shallow : state -> (t -> t) -> t -> t

Map function on immediate subterms

val iter_dag : t -> (t -> unit) -> unit
module Tbl : CCHashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_mini_cc/module-type-ARG/Ty/index.html b/dev/sidekick/Sidekick_mini_cc/module-type-ARG/Ty/index.html deleted file mode 100644 index 17cdbb55..00000000 --- a/dev/sidekick/Sidekick_mini_cc/module-type-ARG/Ty/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Ty (sidekick.Sidekick_mini_cc.ARG.Ty)

Module ARG.Ty

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
val bool : t
val is_bool : t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_mini_cc/module-type-ARG/index.html b/dev/sidekick/Sidekick_mini_cc/module-type-ARG/index.html index 858db173..0ce371da 100644 --- a/dev/sidekick/Sidekick_mini_cc/module-type-ARG/index.html +++ b/dev/sidekick/Sidekick_mini_cc/module-type-ARG/index.html @@ -1,2 +1,2 @@ -ARG (sidekick.Sidekick_mini_cc.ARG)

Module type Sidekick_mini_cc.ARG

include Sidekick_core.TERM
module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
val cc_view : Term.t -> (Fun.tTerm.tTerm.t Iter.t) CC_view.t
\ No newline at end of file +ARG (sidekick.Sidekick_mini_cc.ARG)

Module type Sidekick_mini_cc.ARG

val cc_view : T.Term.t -> (T.Fun.tT.Term.tT.Term.t Iter.t) CC_view.t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_mini_cc/module-type-S/index.html b/dev/sidekick/Sidekick_mini_cc/module-type-S/index.html index 21a57960..ba128e02 100644 --- a/dev/sidekick/Sidekick_mini_cc/module-type-S/index.html +++ b/dev/sidekick/Sidekick_mini_cc/module-type-S/index.html @@ -1,2 +1,2 @@ -S (sidekick.Sidekick_mini_cc.S)

Module type Sidekick_mini_cc.S

type term
type fun_
type term_state
type t
val create : term_state -> t
val add_lit : t -> term -> bool -> unit

add_lit cc p sign asserts that p=sign

val distinct : t -> term list -> unit

distinct cc l asserts that all terms in l are distinct

val check_sat : t -> bool

check_sat cc returns true if the current state is satisfiable, false if it's unsatisfiable

val classes : t -> term Iter.t Iter.t

Traverse the set of classes in the congruence closure. This should be called only if check returned Sat.

\ No newline at end of file +S (sidekick.Sidekick_mini_cc.S)

Module type Sidekick_mini_cc.S

type term
type fun_
type term_state
type t
val create : term_state -> t
val clear : t -> unit

Fully reset the congruence closure's state

val add_lit : t -> term -> bool -> unit

add_lit cc p sign asserts that p=sign

val check_sat : t -> bool

check_sat cc returns true if the current state is satisfiable, false if it's unsatisfiable

val classes : t -> term Iter.t Iter.t

Traverse the set of classes in the congruence closure. This should be called only if check returned Sat.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/Make/Atom/index.html b/dev/sidekick/Sidekick_msat_solver/Make/Atom/index.html index bba2080c..d2da4bb7 100644 --- a/dev/sidekick/Sidekick_msat_solver/Make/Atom/index.html +++ b/dev/sidekick/Sidekick_msat_solver/Make/Atom/index.html @@ -1,2 +1,2 @@ -Atom (sidekick.Sidekick_msat_solver.Make.Atom)

Module Make.Atom

Boolean Atoms

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t CCFormat.printer
\ No newline at end of file +Atom (sidekick.Sidekick_msat_solver.Make.Atom)

Module Make.Atom

Boolean Atoms

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t CCFormat.printer
val neg : t -> t
val formula : t -> lit
val sign : t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/Make/CC_A/Actions/index.html b/dev/sidekick/Sidekick_msat_solver/Make/CC_A/Actions/index.html deleted file mode 100644 index 8fc7a1a6..00000000 --- a/dev/sidekick/Sidekick_msat_solver/Make/CC_A/Actions/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Actions (sidekick.Sidekick_msat_solver.Make.CC_A.Actions)

Module CC_A.Actions

type t
val raise_conflict : t -> Lit.t list -> A.Proof.t -> 'a
val propagate : t -> Lit.t -> reason:(unit -> Lit.t list) -> A.Proof.t -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/Make/CC_A/Lit/index.html b/dev/sidekick/Sidekick_msat_solver/Make/CC_A/Lit/index.html deleted file mode 100644 index 5c4ac363..00000000 --- a/dev/sidekick/Sidekick_msat_solver/Make/CC_A/Lit/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Lit (sidekick.Sidekick_msat_solver.Make.CC_A.Lit)

Module CC_A.Lit

type t
val term : t -> A.Term.t
val sign : t -> bool
val neg : t -> t
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/Make/CC_A/index.html b/dev/sidekick/Sidekick_msat_solver/Make/CC_A/index.html deleted file mode 100644 index b4e069ab..00000000 --- a/dev/sidekick/Sidekick_msat_solver/Make/CC_A/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -CC_A (sidekick.Sidekick_msat_solver.Make.CC_A)

Module Make.CC_A

module A = A
val cc_view : A.Term.t -> (A.Fun.tA.Term.tA.Term.t Iter.t) Sidekick_core.CC_view.t

View the term through the lens of the congruence closure

module Lit : sig ... end
module Actions : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/Make/Lit/index.html b/dev/sidekick/Sidekick_msat_solver/Make/Lit/index.html new file mode 100644 index 00000000..29d9bd92 --- /dev/null +++ b/dev/sidekick/Sidekick_msat_solver/Make/Lit/index.html @@ -0,0 +1,2 @@ + +Lit (sidekick.Sidekick_msat_solver.Make.Lit)

Module Make.Lit

module T = T
type t
val term : t -> T.Term.t
val sign : t -> bool
val neg : t -> t
val abs : t -> t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/Make/Model/index.html b/dev/sidekick/Sidekick_msat_solver/Make/Model/index.html index 4588af0a..235affea 100644 --- a/dev/sidekick/Sidekick_msat_solver/Make/Model/index.html +++ b/dev/sidekick/Sidekick_msat_solver/Make/Model/index.html @@ -1,2 +1,2 @@ -Model (sidekick.Sidekick_msat_solver.Make.Model)

Module Make.Model

type t
val empty : t
val mem : term -> t -> bool
val find : term -> t -> Value.t option
val eval : t -> term -> Value.t option
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Model (sidekick.Sidekick_msat_solver.Make.Model)

Module Make.Model

type t
val empty : t
val mem : t -> term -> bool
val find : t -> term -> term option
val eval : t -> term -> term option
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/Make/Proof/index.html b/dev/sidekick/Sidekick_msat_solver/Make/Proof/index.html index db559c6f..33304cf2 100644 --- a/dev/sidekick/Sidekick_msat_solver/Make/Proof/index.html +++ b/dev/sidekick/Sidekick_msat_solver/Make/Proof/index.html @@ -1,2 +1,2 @@ -Proof (sidekick.Sidekick_msat_solver.Make.Proof)

Module Make.Proof

type t
val check : t -> unit
val pp_dot : t Sidekick_core.Fmt.printer
\ No newline at end of file +Proof (sidekick.Sidekick_msat_solver.Make.Proof)

Module Make.Proof

type t
val check : t -> unit
val pp_dot : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/Make/Solver_internal/CC/Actions/index.html b/dev/sidekick/Sidekick_msat_solver/Make/Solver_internal/CC/Actions/index.html new file mode 100644 index 00000000..66536d18 --- /dev/null +++ b/dev/sidekick/Sidekick_msat_solver/Make/Solver_internal/CC/Actions/index.html @@ -0,0 +1,2 @@ + +Actions (sidekick.Sidekick_msat_solver.Make.Solver_internal.CC.Actions)

Module CC.Actions

module T = T
module P = P
module Lit = Lit
type t = actions
val raise_conflict : t -> Lit.t list -> P.t -> 'a
val propagate : t -> Lit.t -> reason:(unit -> Lit.t list) -> P.t -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/Make/Solver_internal/CC/Expl/index.html b/dev/sidekick/Sidekick_msat_solver/Make/Solver_internal/CC/Expl/index.html index b1c6a47f..16944865 100644 --- a/dev/sidekick/Sidekick_msat_solver/Make/Solver_internal/CC/Expl/index.html +++ b/dev/sidekick/Sidekick_msat_solver/Make/Solver_internal/CC/Expl/index.html @@ -1,2 +1,2 @@ -Expl (sidekick.Sidekick_msat_solver.Make.Solver_internal.CC.Expl)

Module CC.Expl

type t
val pp : t Sidekick_core.Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
\ No newline at end of file +Expl (sidekick.Sidekick_msat_solver.Make.Solver_internal.CC.Expl)

Module CC.Expl

type t
val pp : t Sidekick_core.Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
val mk_theory : t -> t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/Make/Solver_internal/CC/N/index.html b/dev/sidekick/Sidekick_msat_solver/Make/Solver_internal/CC/N/index.html index 889fedc3..cfb12feb 100644 --- a/dev/sidekick/Sidekick_msat_solver/Make/Solver_internal/CC/N/index.html +++ b/dev/sidekick/Sidekick_msat_solver/Make/Solver_internal/CC/N/index.html @@ -1,2 +1,2 @@ -N (sidekick.Sidekick_msat_solver.Make.Solver_internal.CC.N)

Module CC.N

An equivalence class is a set of terms that are currently equal in the partial model built by the solver. The class is represented by a collection of nodes, one of which is distinguished and is called the "representative".

All information pertaining to the whole equivalence class is stored in this representative's node.

When two classes become equal (are "merged"), one of the two representatives is picked as the representative of the new class. The new class contains the union of the two old classes' nodes.

We also allow theories to store additional information in the representative. This information can be used when two classes are merged, to detect conflicts and solve equations à la Shostak.

type t
val term : t -> term
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
val is_root : t -> bool

Is the node a root (ie the representative of its class)?

val iter_class : t -> t Iter.t

Traverse the congruence class. Precondition: is_root n (see find below)

val iter_parents : t -> t Iter.t

Traverse the parents of the class. Precondition: is_root n (see find below)

\ No newline at end of file +N (sidekick.Sidekick_msat_solver.Make.Solver_internal.CC.N)

Module CC.N

An equivalence class is a set of terms that are currently equal in the partial model built by the solver. The class is represented by a collection of nodes, one of which is distinguished and is called the "representative".

All information pertaining to the whole equivalence class is stored in this representative's node.

When two classes become equal (are "merged"), one of the two representatives is picked as the representative of the new class. The new class contains the union of the two old classes' nodes.

We also allow theories to store additional information in the representative. This information can be used when two classes are merged, to detect conflicts and solve equations à la Shostak.

type t
val term : t -> term
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
val is_root : t -> bool

Is the node a root (ie the representative of its class)?

val iter_class : t -> t Iter.t

Traverse the congruence class. Precondition: is_root n (see find below)

val iter_parents : t -> t Iter.t

Traverse the parents of the class. Precondition: is_root n (see find below)

type bitfield

A field in the bitfield of this node. This should only be allocated when a theory is initialized.

All fields are initially 0, are backtracked automatically, and are merged automatically when classes are merged.

val get_field : bitfield -> t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/Make/Solver_internal/CC/index.html b/dev/sidekick/Sidekick_msat_solver/Make/Solver_internal/CC/index.html index cb2ac62b..fb3531d9 100644 --- a/dev/sidekick/Sidekick_msat_solver/Make/Solver_internal/CC/index.html +++ b/dev/sidekick/Sidekick_msat_solver/Make/Solver_internal/CC/index.html @@ -1,2 +1,2 @@ -CC (sidekick.Sidekick_msat_solver.Make.Solver_internal.CC)

Module Solver_internal.CC

module CC_A = CC_A
module A = CC_A.A
type term_state = A.Term.state
type term = A.Term.t
type fun_ = A.Fun.t
type lit = CC_A.Lit.t
type proof = A.Proof.t
type actions = CC_A.Actions.t
type t

Global state of the congruence closure

module N : sig ... end

An equivalence class is a set of terms that are currently equal in the partial model built by the solver. The class is represented by a collection of nodes, one of which is distinguished and is called the "representative".

module Expl : sig ... end
type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t
val term_state : t -> term_state
val find : t -> node -> repr

Current representative

val add_term : t -> term -> node

Add the term to the congruence closure, if not present already. Will be backtracked.

type ev_on_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit
type ev_on_new_term = t -> N.t -> term -> unit
type ev_on_conflict = t -> lit list -> unit
type ev_on_propagate = t -> lit -> (unit -> lit list) -> unit
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_merge:ev_on_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠size:[ `Small | `Big ] -> term_state -> t

Create a new congruence closure.

val on_merge : t -> ev_on_merge -> unit

Add a function to be called when two classes are merged

val on_new_term : t -> ev_on_new_term -> unit

Add a function to be called when a new node is created

val on_conflict : t -> ev_on_conflict -> unit

Called when the congruence closure finds a conflict

val on_propagate : t -> ev_on_propagate -> unit

Called when the congruence closure propagates a literal

val set_as_lit : t -> N.t -> lit -> unit

map the given node to a literal.

val find_t : t -> term -> repr

Current representative of the term.

raises Not_found

if the term is not already add-ed.

val add_seq : t -> term Iter.t -> unit

Add a sequence of terms to the congruence closure

val all_classes : t -> repr Iter.t

All current classes. This is costly, only use if there is no other solution

val assert_lit : t -> lit -> unit

Given a literal, assume it in the congruence closure and propagate its consequences. Will be backtracked.

Useful for the theory combination or the SAT solver's functor

val assert_lits : t -> lit Iter.t -> unit

Addition of many literals

val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given explanation it must be a theory tautology that expl ==> absurd. To be used in theories.

val merge : t -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val check : t -> actions -> unit

Perform all pending operations done via assert_eq, assert_lit, etc. Will use the actions to propagate literals, declare conflicts, etc.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Restore to state n calls to push_level earlier. Used during backtracking.

val get_model : t -> N.t Iter.t Iter.t

get all the equivalence classes so they can be merged in the model

\ No newline at end of file +CC (sidekick.Sidekick_msat_solver.Make.Solver_internal.CC)

Module Solver_internal.CC

module T = T
module P = P
module Lit = Lit
module Actions : Sidekick_core.CC_ACTIONS with module T = T and module Lit = Lit and module P = P and type t = actions
type term_state = T.Term.state
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type proof = P.t
type actions = Actions.t
type t

Global state of the congruence closure

module N : sig ... end

An equivalence class is a set of terms that are currently equal in the partial model built by the solver. The class is represented by a collection of nodes, one of which is distinguished and is called the "representative".

module Expl : sig ... end
type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t
val term_state : t -> term_state
val find : t -> node -> repr

Current representative

val add_term : t -> term -> node

Add the term to the congruence closure, if not present already. Will be backtracked.

val mem_term : t -> term -> bool

Returns true if the term is explicitly present in the congruence closure

type ev_on_pre_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit
type ev_on_post_merge = t -> actions -> N.t -> N.t -> unit
type ev_on_new_term = t -> N.t -> term -> unit
type ev_on_conflict = t -> th:bool -> lit list -> unit
type ev_on_propagate = t -> lit -> (unit -> lit list) -> unit
type ev_on_is_subterm = N.t -> term -> unit
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_pre_merge:ev_on_pre_merge list -> ?⁠on_post_merge:ev_on_post_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠on_is_subterm:ev_on_is_subterm list -> ?⁠size:[ `Small | `Big ] -> term_state -> t

Create a new congruence closure.

val allocate_bitfield : descr:string -> t -> N.bitfield

Allocate a new bitfield for the nodes. See N.bitfield.

val set_bitfield : t -> N.bitfield -> bool -> N.t -> unit

Set the bitfield for the node. This will be backtracked. See N.bitfield.

val on_pre_merge : t -> ev_on_pre_merge -> unit

Add a function to be called when two classes are merged

val on_post_merge : t -> ev_on_post_merge -> unit

Add a function to be called when two classes are merged

val on_new_term : t -> ev_on_new_term -> unit

Add a function to be called when a new node is created

val on_conflict : t -> ev_on_conflict -> unit

Called when the congruence closure finds a conflict

val on_propagate : t -> ev_on_propagate -> unit

Called when the congruence closure propagates a literal

val on_is_subterm : t -> ev_on_is_subterm -> unit

Called on terms that are subterms of function symbols

val set_as_lit : t -> N.t -> lit -> unit

map the given node to a literal.

val find_t : t -> term -> repr

Current representative of the term.

raises Not_found

if the term is not already add-ed.

val add_seq : t -> term Iter.t -> unit

Add a sequence of terms to the congruence closure

val all_classes : t -> repr Iter.t

All current classes. This is costly, only use if there is no other solution

val assert_lit : t -> lit -> unit

Given a literal, assume it in the congruence closure and propagate its consequences. Will be backtracked.

Useful for the theory combination or the SAT solver's functor

val assert_lits : t -> lit Iter.t -> unit

Addition of many literals

val explain_eq : t -> N.t -> N.t -> lit list

Explain why the two nodes are equal. Fails if they are not, in an unspecified way

val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given explanation it must be a theory tautology that expl ==> absurd. To be used in theories.

val n_true : t -> N.t
val n_false : t -> N.t
val n_bool : t -> bool -> N.t
val merge : t -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val merge_t : t -> term -> term -> Expl.t -> unit

Shortcut for adding + merging

val check : t -> actions -> unit

Perform all pending operations done via assert_eq, assert_lit, etc. Will use the actions to propagate literals, declare conflicts, etc.

val new_merges : t -> bool

Called after check, returns true if some pairs of classes were merged.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Restore to state n calls to push_level earlier. Used during backtracking.

val get_model : t -> N.t Iter.t Iter.t

get all the equivalence classes so they can be merged in the model

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/Make/Solver_internal/Lit/index.html b/dev/sidekick/Sidekick_msat_solver/Make/Solver_internal/Lit/index.html deleted file mode 100644 index 7ea05890..00000000 --- a/dev/sidekick/Sidekick_msat_solver/Make/Solver_internal/Lit/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Lit (sidekick.Sidekick_msat_solver.Make.Solver_internal.Lit)

Module Solver_internal.Lit

Literals

A literal is a (preprocessed) term along with its sign. It is directly manipulated by the SAT solver.

type t
val term : t -> term
val sign : t -> bool
val neg : t -> t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/Make/Solver_internal/Simplify/index.html b/dev/sidekick/Sidekick_msat_solver/Make/Solver_internal/Simplify/index.html index 4ccd8bc5..e5ad16a2 100644 --- a/dev/sidekick/Sidekick_msat_solver/Make/Solver_internal/Simplify/index.html +++ b/dev/sidekick/Sidekick_msat_solver/Make/Solver_internal/Simplify/index.html @@ -1,2 +1,2 @@ -Simplify (sidekick.Sidekick_msat_solver.Make.Solver_internal.Simplify)

Module Solver_internal.Simplify

type t
val tst : t -> term_state
val clear : t -> unit

Reset internal cache, etc.

type hook = t -> term -> term option

Given a term, try to simplify it. Return None if it didn't change. Can also add clauses to the simplifier.

val normalize : t -> term -> term

Normalize a term using all the hooks.

\ No newline at end of file +Simplify (sidekick.Sidekick_msat_solver.Make.Solver_internal.Simplify)

Module Solver_internal.Simplify

type t
val tst : t -> term_state
val ty_st : t -> ty_state
val clear : t -> unit

Reset internal cache, etc.

type hook = t -> term -> term option

Given a term, try to simplify it. Return None if it didn't change.

val normalize : t -> term -> term

Normalize a term using all the hooks.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/Make/Solver_internal/index.html b/dev/sidekick/Sidekick_msat_solver/Make/Solver_internal/index.html index 378387b3..42493fe0 100644 --- a/dev/sidekick/Sidekick_msat_solver/Make/Solver_internal/index.html +++ b/dev/sidekick/Sidekick_msat_solver/Make/Solver_internal/index.html @@ -1,2 +1,2 @@ -Solver_internal (sidekick.Sidekick_msat_solver.Make.Solver_internal)

Module Make.Solver_internal

Internal solver, available to theories.

module A = A
module CC_A = CC_A
module CC : Sidekick_core.CC_S with module CC_A = CC_A
type ty = A.Ty.t
type term = A.Term.t
type term_state = A.Term.state
type proof = A.Proof.t
type t

Main type for a solver

type solver = t
module Expl = CC.Expl
module N = CC.N
val tst : t -> term_state
val cc : t -> CC.t

Congruence closure for this solver

module Lit : sig ... end
type lit = Lit.t

Simplifiers

module Simplify : sig ... end
type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit
val simplifier : t -> Simplify.t
val simp_t : t -> term -> term

hooks for the theory

type actions
val propagate : t -> actions -> lit -> reason:(unit -> lit list) -> A.Proof.t -> unit
val raise_conflict : t -> actions -> lit list -> A.Proof.t -> 'a

Give a conflict clause to the solver

val propagate : t -> actions -> lit -> (unit -> lit list) -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> actions -> lit -> lit list -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> actions -> lit list -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : t -> actions -> lit list -> unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> actions -> ?⁠sign:bool -> term -> lit

Create a literal

val add_lit : t -> actions -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value

val add_lit_t : t -> actions -> ?⁠sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> N.t -> N.t

Find representative of the node

val cc_merge : t -> actions -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> actions -> term -> term -> Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> N.t

Add/retrieve congruence closure node for this term. To be used in theories

val on_cc_merge : t -> (CC.t -> actions -> N.t -> N.t -> Expl.t -> unit) -> unit

Callback for when two classes containing data for this key are merged

val on_cc_new_term : t -> (CC.t -> N.t -> term -> unit) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_conflict : t -> (CC.t -> lit list -> unit) -> unit

Callback called on every CC conflict

val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list) -> unit) -> unit

Callback called on every CC propagation

val on_partial_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

type preprocess_hook = t -> mk_lit:(term -> lit) -> add_clause:(lit list -> unit) -> term -> term option

Given a term, try to preprocess it. Return None if it didn't change. Can also add clauses to define new terms.

val add_preprocess : t -> preprocess_hook -> unit
\ No newline at end of file +Solver_internal (sidekick.Sidekick_msat_solver.Make.Solver_internal)

Module Make.Solver_internal

Internal solver, available to theories.

module T = T
module P = P
type ty = T.Ty.t
type term = T.Term.t
type term_state = T.Term.state
type ty_state = T.Ty.state
type proof = P.t
type t

Main type for a solver

type solver = t
val tst : t -> term_state
val ty_st : t -> ty_state
val stats : t -> Sidekick_util.Stat.t

Actions for the theories

type actions
module Lit = Lit
type lit = Lit.t

Congruence Closure

module CC : Sidekick_core.CC_S with module T = T and module P = P and module Lit = Lit and type Actions.t = actions
val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end
type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit
val simplifier : t -> Simplify.t
val simp_t : t -> term -> term

hooks for the theory

val propagate : t -> actions -> lit -> reason:(unit -> lit list) -> proof -> unit

Propagate a literal for a reason. This is similar to asserting the clause reason => lit, but more lightweight, and in a way that is backtrackable.

val raise_conflict : t -> actions -> lit list -> proof -> 'a

Give a conflict clause to the solver

val push_decision : t -> actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : t -> actions -> lit -> (unit -> lit list) -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> actions -> lit -> lit list -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> actions -> lit list -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : t -> actions -> lit list -> unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> actions -> ?⁠sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val preprocess_term : t -> add_clause:(Lit.t list -> unit) -> term -> term

Preprocess a term.

val add_lit : t -> actions -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value

val add_lit_t : t -> actions -> ?⁠sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit

Callback called on every CC conflict

val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list) -> unit) -> unit

Callback called on every CC propagation

val on_partial_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

type preprocess_hook = t -> mk_lit:(term -> lit) -> add_clause:(lit list -> unit) -> term -> term option

Given a term, try to preprocess it. Return None if it didn't change. Can also add clauses to define new terms.

parameter mk_lit

creates a new literal for a boolean term.

parameter add_clause

pushes a new clause into the SAT solver.

val on_preprocess : t -> preprocess_hook -> unit

Model production

type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option

A model-production hook. It takes the solver, a class, and returns a term for this class.

val on_model_gen : t -> model_hook -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/Make/Unknown/index.html b/dev/sidekick/Sidekick_msat_solver/Make/Unknown/index.html index df9ff3a9..a61ae966 100644 --- a/dev/sidekick/Sidekick_msat_solver/Make/Unknown/index.html +++ b/dev/sidekick/Sidekick_msat_solver/Make/Unknown/index.html @@ -1,2 +1,2 @@ -Unknown (sidekick.Sidekick_msat_solver.Make.Unknown)

Module Make.Unknown

type t
val pp : t CCFormat.printer
\ No newline at end of file +Unknown (sidekick.Sidekick_msat_solver.Make.Unknown)

Module Make.Unknown

type t
val pp : t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/Make/Value/index.html b/dev/sidekick/Sidekick_msat_solver/Make/Value/index.html deleted file mode 100644 index 02f30cdb..00000000 --- a/dev/sidekick/Sidekick_msat_solver/Make/Value/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Value (sidekick.Sidekick_msat_solver.Make.Value)

Module Make.Value

Semantic values

type t
val equal : t -> t -> bool
val hash : t -> int
val ty : t -> ty
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/Make/argument-1-A/Fun/index.html b/dev/sidekick/Sidekick_msat_solver/Make/argument-1-A/Fun/index.html deleted file mode 100644 index f4dbe2cd..00000000 --- a/dev/sidekick/Sidekick_msat_solver/Make/argument-1-A/Fun/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Fun (sidekick.Sidekick_msat_solver.Make.1-A.Fun)

Module 1-A.Fun

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/Make/argument-1-A/P/index.html b/dev/sidekick/Sidekick_msat_solver/Make/argument-1-A/P/index.html new file mode 100644 index 00000000..2fba7f84 --- /dev/null +++ b/dev/sidekick/Sidekick_msat_solver/Make/argument-1-A/P/index.html @@ -0,0 +1,2 @@ + +P (sidekick.Sidekick_msat_solver.Make.1-A.P)

Module 1-A.P

type t
val pp : t Sidekick_core.Fmt.printer
val default : t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/Make/argument-1-A/Proof/index.html b/dev/sidekick/Sidekick_msat_solver/Make/argument-1-A/Proof/index.html deleted file mode 100644 index 6a660f63..00000000 --- a/dev/sidekick/Sidekick_msat_solver/Make/argument-1-A/Proof/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Proof (sidekick.Sidekick_msat_solver.Make.1-A.Proof)

Module 1-A.Proof

type t
val pp : t Sidekick_core.Fmt.printer
val default : t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/Make/argument-1-A/T/Fun/index.html b/dev/sidekick/Sidekick_msat_solver/Make/argument-1-A/T/Fun/index.html new file mode 100644 index 00000000..df198746 --- /dev/null +++ b/dev/sidekick/Sidekick_msat_solver/Make/argument-1-A/T/Fun/index.html @@ -0,0 +1,2 @@ + +Fun (sidekick.Sidekick_msat_solver.Make.1-A.T.Fun)

Module T.Fun

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/Make/argument-1-A/T/Term/index.html b/dev/sidekick/Sidekick_msat_solver/Make/argument-1-A/T/Term/index.html new file mode 100644 index 00000000..fe32f770 --- /dev/null +++ b/dev/sidekick/Sidekick_msat_solver/Make/argument-1-A/T/Term/index.html @@ -0,0 +1,2 @@ + +Term (sidekick.Sidekick_msat_solver.Make.1-A.T.Term)

Module T.Term

type t
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type state
val ty : t -> Ty.t
val bool : state -> bool -> t
val as_bool : t -> bool option
val abs : state -> t -> t * bool
val map_shallow : state -> (t -> t) -> t -> t

Map function on immediate subterms

val iter_dag : t -> (t -> unit) -> unit
module Tbl : CCHashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/Make/argument-1-A/T/Ty/index.html b/dev/sidekick/Sidekick_msat_solver/Make/argument-1-A/T/Ty/index.html new file mode 100644 index 00000000..b25b58e8 --- /dev/null +++ b/dev/sidekick/Sidekick_msat_solver/Make/argument-1-A/T/Ty/index.html @@ -0,0 +1,2 @@ + +Ty (sidekick.Sidekick_msat_solver.Make.1-A.T.Ty)

Module T.Ty

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type state
val bool : state -> t
val is_bool : t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/Make/argument-1-A/T/index.html b/dev/sidekick/Sidekick_msat_solver/Make/argument-1-A/T/index.html new file mode 100644 index 00000000..60a04294 --- /dev/null +++ b/dev/sidekick/Sidekick_msat_solver/Make/argument-1-A/T/index.html @@ -0,0 +1,2 @@ + +T (sidekick.Sidekick_msat_solver.Make.1-A.T)

Module 1-A.T

module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/Make/argument-1-A/Term/index.html b/dev/sidekick/Sidekick_msat_solver/Make/argument-1-A/Term/index.html deleted file mode 100644 index bf02a2fc..00000000 --- a/dev/sidekick/Sidekick_msat_solver/Make/argument-1-A/Term/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Term (sidekick.Sidekick_msat_solver.Make.1-A.Term)

Module 1-A.Term

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type state
val ty : t -> Ty.t
val bool : state -> bool -> t
val as_bool : t -> bool option
val abs : state -> t -> t * bool
val map_shallow : state -> (t -> t) -> t -> t

Map function on immediate subterms

val iter_dag : t -> (t -> unit) -> unit
module Tbl : CCHashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/Make/argument-1-A/Ty/index.html b/dev/sidekick/Sidekick_msat_solver/Make/argument-1-A/Ty/index.html deleted file mode 100644 index b76af36a..00000000 --- a/dev/sidekick/Sidekick_msat_solver/Make/argument-1-A/Ty/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Ty (sidekick.Sidekick_msat_solver.Make.1-A.Ty)

Module 1-A.Ty

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
val bool : t
val is_bool : t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/Make/argument-1-A/index.html b/dev/sidekick/Sidekick_msat_solver/Make/argument-1-A/index.html index 8c5341ec..d9cd44a6 100644 --- a/dev/sidekick/Sidekick_msat_solver/Make/argument-1-A/index.html +++ b/dev/sidekick/Sidekick_msat_solver/Make/argument-1-A/index.html @@ -1,2 +1,2 @@ -1-A (sidekick.Sidekick_msat_solver.Make.1-A)

Parameter Make.1-A

include Sidekick_core.TERM_PROOF
include Sidekick_core.TERM
module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
module Proof : sig ... end
val cc_view : Term.t -> (Fun.tTerm.tTerm.t Iter.t) Sidekick_core.CC_view.t
\ No newline at end of file +1-A (sidekick.Sidekick_msat_solver.Make.1-A)

Parameter Make.1-A

val cc_view : T.Term.t -> (T.Fun.tT.Term.tT.Term.t Iter.t) Sidekick_core.CC_view.t
val is_valid_literal : T.Term.t -> bool

Is this a valid boolean literal? (e.g. is it a closed term, not inside a quantifier)

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/Make/index.html b/dev/sidekick/Sidekick_msat_solver/Make/index.html index d21c132d..d650fbfc 100644 --- a/dev/sidekick/Sidekick_msat_solver/Make/index.html +++ b/dev/sidekick/Sidekick_msat_solver/Make/index.html @@ -1,2 +1,2 @@ -Make (sidekick.Sidekick_msat_solver.Make)

Module Sidekick_msat_solver.Make

Parameters

Signature

module A = A
module CC_A : Sidekick_core.CC_ARG with module A = A
module Solver_internal : Sidekick_core.SOLVER_INTERNAL with module A = A and module CC_A = CC_A

Internal solver, available to theories.

module Lit = Solver_internal.Lit
type t
type solver = t
type term = A.Term.t
type ty = A.Ty.t
type lit = Solver_internal.Lit.t
type lemma = A.Proof.t
module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

val mk_theory : name:string -> create_and_setup:(Solver_internal.t -> 'th) -> ?⁠push_level:('th -> unit) -> ?⁠pop_levels:('th -> int -> unit) -> unit -> theory

Helper to create a theory

module Atom : sig ... end
module Value : sig ... end
module Model : sig ... end
module Unknown : sig ... end
module Proof : sig ... end
type proof = Proof.t

Main API

val stats : t -> Sidekick_util.Stat.t
val tst : t -> A.Term.state
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠size:[ `Big | `Tiny | `Small ] -> ?⁠store_proof:bool -> theories:theory list -> A.Term.state -> unit -> t

Create a new solver.

parameter theories

theories to load from the start.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val mk_atom_lit : t -> lit -> Atom.t
val mk_atom_t : t -> ?⁠sign:bool -> term -> Atom.t
val add_clause : t -> Atom.t Sidekick_util.IArray.t -> unit
val add_clause_l : t -> Atom.t list -> unit
type res =
| Sat of Model.t
| Unsat of {
proof : proof option;
unsat_core : Atom.t list lazy_t;
}
| Unknown of Unknown.t

Result of solving for the current set of clauses

val solve : ?⁠on_exit:(unit -> unit) list -> ?⁠check:bool -> assumptions:Atom.t list -> t -> res

solve s checks the satisfiability of the statement added so far to s

parameter check

if true, the model is checked before returning

parameter assumptions

a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

parameter on_exit

functions to be run before this returns

val pp_term_graph : t CCFormat.printer
val pp_stats : t CCFormat.printer
\ No newline at end of file +Make (sidekick.Sidekick_msat_solver.Make)

Module Sidekick_msat_solver.Make

Parameters

Signature

module T = A.T
module P = A.P
module Lit : Sidekick_core.LIT with module T = T
module Solver_internal : Sidekick_core.SOLVER_INTERNAL with module T = T and module P = P and module Lit = Lit

Internal solver, available to theories.

type t
type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t
type lemma = P.t
module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

type 'a theory_p = (module THEORY with type t = 'a)

A theory that can be used for this particular solver, with state of type 'a.

val mk_theory : name:string -> create_and_setup:(Solver_internal.t -> 'th) -> ?⁠push_level:('th -> unit) -> ?⁠pop_levels:('th -> int -> unit) -> unit -> theory

Helper to create a theory

module Atom : sig ... end
module Model : sig ... end
module Unknown : sig ... end
module Proof : sig ... end
type proof = Proof.t

Main API

val stats : t -> Sidekick_util.Stat.t
val tst : t -> T.Term.state
val ty_st : t -> T.Ty.state
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠size:[ `Big | `Tiny | `Small ] -> ?⁠store_proof:bool -> theories:theory list -> T.Term.state -> T.Ty.state -> unit -> t

Create a new solver.

parameter theories

theories to load from the start.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val add_theory_p : t -> 'a theory_p -> 'a

Add the given theory and obtain its state

val add_theory_l : t -> theory list -> unit
val mk_atom_lit : t -> lit -> Atom.t
val mk_atom_t : t -> ?⁠sign:bool -> term -> Atom.t
val add_clause : t -> Atom.t Sidekick_util.IArray.t -> unit
val add_clause_l : t -> Atom.t list -> unit
type res =
| Sat of Model.t
| Unsat of {
proof : proof option lazy_t;
unsat_core : Atom.t list lazy_t;
}
| Unknown of Unknown.t

Result of solving for the current set of clauses

val solve : ?⁠on_exit:(unit -> unit) list -> ?⁠check:bool -> ?⁠on_progress:(t -> unit) -> assumptions:Atom.t list -> t -> res

solve s checks the satisfiability of the statement added so far to s

parameter check

if true, the model is checked before returning

parameter assumptions

a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

parameter on_exit

functions to be run before this returns

val pp_stats : t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/Make/module-type-THEORY/index.html b/dev/sidekick/Sidekick_msat_solver/Make/module-type-THEORY/index.html index e6876259..dc64403d 100644 --- a/dev/sidekick/Sidekick_msat_solver/Make/module-type-THEORY/index.html +++ b/dev/sidekick/Sidekick_msat_solver/Make/module-type-THEORY/index.html @@ -1,2 +1,2 @@ -THEORY (sidekick.Sidekick_msat_solver.Make.THEORY)

Module type Make.THEORY

A theory

Theories are abstracted over the concrete implementation of the solver, so they can work with any implementation.

Typically a theory should be a functor taking an argument containing a SOLVER_INTERNAL and some additional views on terms, literals, etc. that are specific to the theory (e.g. to map terms to linear expressions). The theory can then be instantiated on any kind of solver for any term representation that also satisfies the additional theory-specific requirements. Instantiated theories (ie values of type Sidekick_core.SOLVER.theory) can be added to the solver.

type t

The theory's state

val name : string

Name of the theory

val create_and_setup : Solver_internal.t -> t

Instantiate the theory's state for the given (internal) solver, register callbacks, create keys, etc.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Pop backtracking levels, restoring the theory to its former state

\ No newline at end of file +THEORY (sidekick.Sidekick_msat_solver.Make.THEORY)

Module type Make.THEORY

A theory

Theories are abstracted over the concrete implementation of the solver, so they can work with any implementation.

Typically a theory should be a functor taking an argument containing a SOLVER_INTERNAL or even a full SOLVER, and some additional views on terms, literals, etc. that are specific to the theory (e.g. to map terms to linear expressions). The theory can then be instantiated on any kind of solver for any term representation that also satisfies the additional theory-specific requirements. Instantiated theories (ie values of type Sidekick_core.SOLVER.theory) can be added to the solver.

type t

The theory's state

val name : string

Name of the theory

val create_and_setup : Solver_internal.t -> t

Instantiate the theory's state for the given (internal) solver, register callbacks, create keys, etc.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Pop backtracking levels, restoring the theory to its former state

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/index.html b/dev/sidekick/Sidekick_msat_solver/index.html index 54232fc0..b4bed888 100644 --- a/dev/sidekick/Sidekick_msat_solver/index.html +++ b/dev/sidekick/Sidekick_msat_solver/index.html @@ -1,2 +1,2 @@ -Sidekick_msat_solver (sidekick.Sidekick_msat_solver)

Module Sidekick_msat_solver

Implementation of a Solver using Msat

module Vec = Msat.Vec
module Log = Msat.Log
module type ARG = sig ... end
module type S = Sidekick_core.SOLVER
module Make : functor (A : ARG) -> S with module A = A
\ No newline at end of file +Sidekick_msat_solver (sidekick.Sidekick_msat_solver)

Module Sidekick_msat_solver

Implementation of a Solver using Msat

module Log = Msat.Log
module type ARG = sig ... end
module type S = Sidekick_core.SOLVER
module Make : functor (A : ARG) -> S with module T = A.T and module P = A.P
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/module-type-ARG/Fun/index.html b/dev/sidekick/Sidekick_msat_solver/module-type-ARG/Fun/index.html deleted file mode 100644 index c6e4dfd6..00000000 --- a/dev/sidekick/Sidekick_msat_solver/module-type-ARG/Fun/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Fun (sidekick.Sidekick_msat_solver.ARG.Fun)

Module ARG.Fun

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/module-type-ARG/P/index.html b/dev/sidekick/Sidekick_msat_solver/module-type-ARG/P/index.html new file mode 100644 index 00000000..9d618465 --- /dev/null +++ b/dev/sidekick/Sidekick_msat_solver/module-type-ARG/P/index.html @@ -0,0 +1,2 @@ + +P (sidekick.Sidekick_msat_solver.ARG.P)

Module ARG.P

type t
val pp : t Sidekick_core.Fmt.printer
val default : t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/module-type-ARG/Proof/index.html b/dev/sidekick/Sidekick_msat_solver/module-type-ARG/Proof/index.html deleted file mode 100644 index 096c7a38..00000000 --- a/dev/sidekick/Sidekick_msat_solver/module-type-ARG/Proof/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Proof (sidekick.Sidekick_msat_solver.ARG.Proof)

Module ARG.Proof

type t
val pp : t Sidekick_core.Fmt.printer
val default : t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/module-type-ARG/T/Fun/index.html b/dev/sidekick/Sidekick_msat_solver/module-type-ARG/T/Fun/index.html new file mode 100644 index 00000000..5fb0c89f --- /dev/null +++ b/dev/sidekick/Sidekick_msat_solver/module-type-ARG/T/Fun/index.html @@ -0,0 +1,2 @@ + +Fun (sidekick.Sidekick_msat_solver.ARG.T.Fun)

Module T.Fun

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/module-type-ARG/T/Term/index.html b/dev/sidekick/Sidekick_msat_solver/module-type-ARG/T/Term/index.html new file mode 100644 index 00000000..8c7a880d --- /dev/null +++ b/dev/sidekick/Sidekick_msat_solver/module-type-ARG/T/Term/index.html @@ -0,0 +1,2 @@ + +Term (sidekick.Sidekick_msat_solver.ARG.T.Term)

Module T.Term

type t
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type state
val ty : t -> Ty.t
val bool : state -> bool -> t
val as_bool : t -> bool option
val abs : state -> t -> t * bool
val map_shallow : state -> (t -> t) -> t -> t

Map function on immediate subterms

val iter_dag : t -> (t -> unit) -> unit
module Tbl : CCHashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/module-type-ARG/T/Ty/index.html b/dev/sidekick/Sidekick_msat_solver/module-type-ARG/T/Ty/index.html new file mode 100644 index 00000000..a80cff5d --- /dev/null +++ b/dev/sidekick/Sidekick_msat_solver/module-type-ARG/T/Ty/index.html @@ -0,0 +1,2 @@ + +Ty (sidekick.Sidekick_msat_solver.ARG.T.Ty)

Module T.Ty

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type state
val bool : state -> t
val is_bool : t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/module-type-ARG/T/index.html b/dev/sidekick/Sidekick_msat_solver/module-type-ARG/T/index.html new file mode 100644 index 00000000..098fe526 --- /dev/null +++ b/dev/sidekick/Sidekick_msat_solver/module-type-ARG/T/index.html @@ -0,0 +1,2 @@ + +T (sidekick.Sidekick_msat_solver.ARG.T)

Module ARG.T

module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/module-type-ARG/Term/index.html b/dev/sidekick/Sidekick_msat_solver/module-type-ARG/Term/index.html deleted file mode 100644 index 3abaa6ba..00000000 --- a/dev/sidekick/Sidekick_msat_solver/module-type-ARG/Term/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Term (sidekick.Sidekick_msat_solver.ARG.Term)

Module ARG.Term

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type state
val ty : t -> Ty.t
val bool : state -> bool -> t
val as_bool : t -> bool option
val abs : state -> t -> t * bool
val map_shallow : state -> (t -> t) -> t -> t

Map function on immediate subterms

val iter_dag : t -> (t -> unit) -> unit
module Tbl : CCHashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/module-type-ARG/Ty/index.html b/dev/sidekick/Sidekick_msat_solver/module-type-ARG/Ty/index.html deleted file mode 100644 index ff02e548..00000000 --- a/dev/sidekick/Sidekick_msat_solver/module-type-ARG/Ty/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Ty (sidekick.Sidekick_msat_solver.ARG.Ty)

Module ARG.Ty

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
val bool : t
val is_bool : t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/module-type-ARG/index.html b/dev/sidekick/Sidekick_msat_solver/module-type-ARG/index.html index f80c5900..6e5cf069 100644 --- a/dev/sidekick/Sidekick_msat_solver/module-type-ARG/index.html +++ b/dev/sidekick/Sidekick_msat_solver/module-type-ARG/index.html @@ -1,2 +1,2 @@ -ARG (sidekick.Sidekick_msat_solver.ARG)

Module type Sidekick_msat_solver.ARG

include Sidekick_core.TERM_PROOF
include Sidekick_core.TERM
module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
module Proof : sig ... end
val cc_view : Term.t -> (Fun.tTerm.tTerm.t Iter.t) Sidekick_core.CC_view.t
\ No newline at end of file +ARG (sidekick.Sidekick_msat_solver.ARG)

Module type Sidekick_msat_solver.ARG

val cc_view : T.Term.t -> (T.Fun.tT.Term.tT.Term.t Iter.t) Sidekick_core.CC_view.t
val is_valid_literal : T.Term.t -> bool

Is this a valid boolean literal? (e.g. is it a closed term, not inside a quantifier)

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/module-type-S/A/Fun/index.html b/dev/sidekick/Sidekick_msat_solver/module-type-S/A/Fun/index.html deleted file mode 100644 index 6b922664..00000000 --- a/dev/sidekick/Sidekick_msat_solver/module-type-S/A/Fun/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Fun (sidekick.Sidekick_msat_solver.S.A.Fun)

Module A.Fun

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/module-type-S/A/Proof/index.html b/dev/sidekick/Sidekick_msat_solver/module-type-S/A/Proof/index.html deleted file mode 100644 index e60b6e99..00000000 --- a/dev/sidekick/Sidekick_msat_solver/module-type-S/A/Proof/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Proof (sidekick.Sidekick_msat_solver.S.A.Proof)

Module A.Proof

type t
val pp : t Sidekick_core.Fmt.printer
val default : t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/module-type-S/A/Term/index.html b/dev/sidekick/Sidekick_msat_solver/module-type-S/A/Term/index.html deleted file mode 100644 index a4e5aff1..00000000 --- a/dev/sidekick/Sidekick_msat_solver/module-type-S/A/Term/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Term (sidekick.Sidekick_msat_solver.S.A.Term)

Module A.Term

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type state
val ty : t -> Ty.t
val bool : state -> bool -> t
val as_bool : t -> bool option
val abs : state -> t -> t * bool
val map_shallow : state -> (t -> t) -> t -> t

Map function on immediate subterms

val iter_dag : t -> (t -> unit) -> unit
module Tbl : CCHashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/module-type-S/A/Ty/index.html b/dev/sidekick/Sidekick_msat_solver/module-type-S/A/Ty/index.html deleted file mode 100644 index 48484531..00000000 --- a/dev/sidekick/Sidekick_msat_solver/module-type-S/A/Ty/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Ty (sidekick.Sidekick_msat_solver.S.A.Ty)

Module A.Ty

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
val bool : t
val is_bool : t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/module-type-S/A/index.html b/dev/sidekick/Sidekick_msat_solver/module-type-S/A/index.html deleted file mode 100644 index 40ebcc50..00000000 --- a/dev/sidekick/Sidekick_msat_solver/module-type-S/A/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -A (sidekick.Sidekick_msat_solver.S.A)

Module S.A

include Sidekick_core.TERM
module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
module Proof : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/module-type-S/Atom/index.html b/dev/sidekick/Sidekick_msat_solver/module-type-S/Atom/index.html index dccf0110..90c6104b 100644 --- a/dev/sidekick/Sidekick_msat_solver/module-type-S/Atom/index.html +++ b/dev/sidekick/Sidekick_msat_solver/module-type-S/Atom/index.html @@ -1,2 +1,2 @@ -Atom (sidekick.Sidekick_msat_solver.S.Atom)

Module S.Atom

Boolean Atoms

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t CCFormat.printer
\ No newline at end of file +Atom (sidekick.Sidekick_msat_solver.S.Atom)

Module S.Atom

Boolean Atoms

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t CCFormat.printer
val neg : t -> t
val formula : t -> lit
val sign : t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/module-type-S/CC_A/Actions/index.html b/dev/sidekick/Sidekick_msat_solver/module-type-S/CC_A/Actions/index.html deleted file mode 100644 index 1ae1c8ef..00000000 --- a/dev/sidekick/Sidekick_msat_solver/module-type-S/CC_A/Actions/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Actions (sidekick.Sidekick_msat_solver.S.CC_A.Actions)

Module CC_A.Actions

type t
val raise_conflict : t -> Lit.t list -> A.Proof.t -> 'a
val propagate : t -> Lit.t -> reason:(unit -> Lit.t list) -> A.Proof.t -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/module-type-S/CC_A/Lit/index.html b/dev/sidekick/Sidekick_msat_solver/module-type-S/CC_A/Lit/index.html deleted file mode 100644 index d3f80013..00000000 --- a/dev/sidekick/Sidekick_msat_solver/module-type-S/CC_A/Lit/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Lit (sidekick.Sidekick_msat_solver.S.CC_A.Lit)

Module CC_A.Lit

type t
val term : t -> A.Term.t
val sign : t -> bool
val neg : t -> t
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/module-type-S/CC_A/index.html b/dev/sidekick/Sidekick_msat_solver/module-type-S/CC_A/index.html deleted file mode 100644 index 7f73995e..00000000 --- a/dev/sidekick/Sidekick_msat_solver/module-type-S/CC_A/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -CC_A (sidekick.Sidekick_msat_solver.S.CC_A)

Module S.CC_A

module A = A
val cc_view : A.Term.t -> (A.Fun.tA.Term.tA.Term.t Iter.t) Sidekick_core.CC_view.t

View the term through the lens of the congruence closure

module Lit : sig ... end
module Actions : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/module-type-S/Lit/index.html b/dev/sidekick/Sidekick_msat_solver/module-type-S/Lit/index.html new file mode 100644 index 00000000..7e912d53 --- /dev/null +++ b/dev/sidekick/Sidekick_msat_solver/module-type-S/Lit/index.html @@ -0,0 +1,2 @@ + +Lit (sidekick.Sidekick_msat_solver.S.Lit)

Module S.Lit

module T = T
type t
val term : t -> T.Term.t
val sign : t -> bool
val neg : t -> t
val abs : t -> t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/module-type-S/Model/index.html b/dev/sidekick/Sidekick_msat_solver/module-type-S/Model/index.html index d24057fa..b6cdfacf 100644 --- a/dev/sidekick/Sidekick_msat_solver/module-type-S/Model/index.html +++ b/dev/sidekick/Sidekick_msat_solver/module-type-S/Model/index.html @@ -1,2 +1,2 @@ -Model (sidekick.Sidekick_msat_solver.S.Model)

Module S.Model

type t
val empty : t
val mem : term -> t -> bool
val find : term -> t -> Value.t option
val eval : t -> term -> Value.t option
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Model (sidekick.Sidekick_msat_solver.S.Model)

Module S.Model

type t
val empty : t
val mem : t -> term -> bool
val find : t -> term -> term option
val eval : t -> term -> term option
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/module-type-S/P/index.html b/dev/sidekick/Sidekick_msat_solver/module-type-S/P/index.html new file mode 100644 index 00000000..21c13532 --- /dev/null +++ b/dev/sidekick/Sidekick_msat_solver/module-type-S/P/index.html @@ -0,0 +1,2 @@ + +P (sidekick.Sidekick_msat_solver.S.P)

Module S.P

type t
val pp : t Sidekick_core.Fmt.printer
val default : t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/module-type-S/Proof/index.html b/dev/sidekick/Sidekick_msat_solver/module-type-S/Proof/index.html index 35412646..8d1ef99c 100644 --- a/dev/sidekick/Sidekick_msat_solver/module-type-S/Proof/index.html +++ b/dev/sidekick/Sidekick_msat_solver/module-type-S/Proof/index.html @@ -1,2 +1,2 @@ -Proof (sidekick.Sidekick_msat_solver.S.Proof)

Module S.Proof

type t
val check : t -> unit
val pp_dot : t Sidekick_core.Fmt.printer
\ No newline at end of file +Proof (sidekick.Sidekick_msat_solver.S.Proof)

Module S.Proof

type t
val check : t -> unit
val pp_dot : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/module-type-S/Solver_internal/CC/Actions/index.html b/dev/sidekick/Sidekick_msat_solver/module-type-S/Solver_internal/CC/Actions/index.html new file mode 100644 index 00000000..068d18a8 --- /dev/null +++ b/dev/sidekick/Sidekick_msat_solver/module-type-S/Solver_internal/CC/Actions/index.html @@ -0,0 +1,2 @@ + +Actions (sidekick.Sidekick_msat_solver.S.Solver_internal.CC.Actions)

Module CC.Actions

module T = T
module P = P
module Lit = Lit
type t = actions
val raise_conflict : t -> Lit.t list -> P.t -> 'a
val propagate : t -> Lit.t -> reason:(unit -> Lit.t list) -> P.t -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/module-type-S/Solver_internal/CC/Expl/index.html b/dev/sidekick/Sidekick_msat_solver/module-type-S/Solver_internal/CC/Expl/index.html index 66a8f8a2..d7f84728 100644 --- a/dev/sidekick/Sidekick_msat_solver/module-type-S/Solver_internal/CC/Expl/index.html +++ b/dev/sidekick/Sidekick_msat_solver/module-type-S/Solver_internal/CC/Expl/index.html @@ -1,2 +1,2 @@ -Expl (sidekick.Sidekick_msat_solver.S.Solver_internal.CC.Expl)

Module CC.Expl

type t
val pp : t Sidekick_core.Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
\ No newline at end of file +Expl (sidekick.Sidekick_msat_solver.S.Solver_internal.CC.Expl)

Module CC.Expl

type t
val pp : t Sidekick_core.Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
val mk_theory : t -> t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/module-type-S/Solver_internal/CC/N/index.html b/dev/sidekick/Sidekick_msat_solver/module-type-S/Solver_internal/CC/N/index.html index 0f9a0503..6fdf44e2 100644 --- a/dev/sidekick/Sidekick_msat_solver/module-type-S/Solver_internal/CC/N/index.html +++ b/dev/sidekick/Sidekick_msat_solver/module-type-S/Solver_internal/CC/N/index.html @@ -1,2 +1,2 @@ -N (sidekick.Sidekick_msat_solver.S.Solver_internal.CC.N)

Module CC.N

An equivalence class is a set of terms that are currently equal in the partial model built by the solver. The class is represented by a collection of nodes, one of which is distinguished and is called the "representative".

All information pertaining to the whole equivalence class is stored in this representative's node.

When two classes become equal (are "merged"), one of the two representatives is picked as the representative of the new class. The new class contains the union of the two old classes' nodes.

We also allow theories to store additional information in the representative. This information can be used when two classes are merged, to detect conflicts and solve equations à la Shostak.

type t
val term : t -> term
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
val is_root : t -> bool

Is the node a root (ie the representative of its class)?

val iter_class : t -> t Iter.t

Traverse the congruence class. Precondition: is_root n (see find below)

val iter_parents : t -> t Iter.t

Traverse the parents of the class. Precondition: is_root n (see find below)

\ No newline at end of file +N (sidekick.Sidekick_msat_solver.S.Solver_internal.CC.N)

Module CC.N

An equivalence class is a set of terms that are currently equal in the partial model built by the solver. The class is represented by a collection of nodes, one of which is distinguished and is called the "representative".

All information pertaining to the whole equivalence class is stored in this representative's node.

When two classes become equal (are "merged"), one of the two representatives is picked as the representative of the new class. The new class contains the union of the two old classes' nodes.

We also allow theories to store additional information in the representative. This information can be used when two classes are merged, to detect conflicts and solve equations à la Shostak.

type t
val term : t -> term
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
val is_root : t -> bool

Is the node a root (ie the representative of its class)?

val iter_class : t -> t Iter.t

Traverse the congruence class. Precondition: is_root n (see find below)

val iter_parents : t -> t Iter.t

Traverse the parents of the class. Precondition: is_root n (see find below)

type bitfield

A field in the bitfield of this node. This should only be allocated when a theory is initialized.

All fields are initially 0, are backtracked automatically, and are merged automatically when classes are merged.

val get_field : bitfield -> t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/module-type-S/Solver_internal/CC/index.html b/dev/sidekick/Sidekick_msat_solver/module-type-S/Solver_internal/CC/index.html index 4255074c..86195d32 100644 --- a/dev/sidekick/Sidekick_msat_solver/module-type-S/Solver_internal/CC/index.html +++ b/dev/sidekick/Sidekick_msat_solver/module-type-S/Solver_internal/CC/index.html @@ -1,2 +1,2 @@ -CC (sidekick.Sidekick_msat_solver.S.Solver_internal.CC)

Module Solver_internal.CC

module CC_A = CC_A
module A = CC_A.A
type term_state = A.Term.state
type term = A.Term.t
type fun_ = A.Fun.t
type lit = CC_A.Lit.t
type proof = A.Proof.t
type actions = CC_A.Actions.t
type t

Global state of the congruence closure

module N : sig ... end

An equivalence class is a set of terms that are currently equal in the partial model built by the solver. The class is represented by a collection of nodes, one of which is distinguished and is called the "representative".

module Expl : sig ... end
type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t
val term_state : t -> term_state
val find : t -> node -> repr

Current representative

val add_term : t -> term -> node

Add the term to the congruence closure, if not present already. Will be backtracked.

type ev_on_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit
type ev_on_new_term = t -> N.t -> term -> unit
type ev_on_conflict = t -> lit list -> unit
type ev_on_propagate = t -> lit -> (unit -> lit list) -> unit
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_merge:ev_on_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠size:[ `Small | `Big ] -> term_state -> t

Create a new congruence closure.

val on_merge : t -> ev_on_merge -> unit

Add a function to be called when two classes are merged

val on_new_term : t -> ev_on_new_term -> unit

Add a function to be called when a new node is created

val on_conflict : t -> ev_on_conflict -> unit

Called when the congruence closure finds a conflict

val on_propagate : t -> ev_on_propagate -> unit

Called when the congruence closure propagates a literal

val set_as_lit : t -> N.t -> lit -> unit

map the given node to a literal.

val find_t : t -> term -> repr

Current representative of the term.

raises Not_found

if the term is not already add-ed.

val add_seq : t -> term Iter.t -> unit

Add a sequence of terms to the congruence closure

val all_classes : t -> repr Iter.t

All current classes. This is costly, only use if there is no other solution

val assert_lit : t -> lit -> unit

Given a literal, assume it in the congruence closure and propagate its consequences. Will be backtracked.

Useful for the theory combination or the SAT solver's functor

val assert_lits : t -> lit Iter.t -> unit

Addition of many literals

val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given explanation it must be a theory tautology that expl ==> absurd. To be used in theories.

val merge : t -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val check : t -> actions -> unit

Perform all pending operations done via assert_eq, assert_lit, etc. Will use the actions to propagate literals, declare conflicts, etc.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Restore to state n calls to push_level earlier. Used during backtracking.

val get_model : t -> N.t Iter.t Iter.t

get all the equivalence classes so they can be merged in the model

\ No newline at end of file +CC (sidekick.Sidekick_msat_solver.S.Solver_internal.CC)

Module Solver_internal.CC

module T = T
module P = P
module Lit = Lit
module Actions : Sidekick_core.CC_ACTIONS with module T = T and module Lit = Lit and module P = P and type t = actions
type term_state = T.Term.state
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type proof = P.t
type actions = Actions.t
type t

Global state of the congruence closure

module N : sig ... end

An equivalence class is a set of terms that are currently equal in the partial model built by the solver. The class is represented by a collection of nodes, one of which is distinguished and is called the "representative".

module Expl : sig ... end
type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t
val term_state : t -> term_state
val find : t -> node -> repr

Current representative

val add_term : t -> term -> node

Add the term to the congruence closure, if not present already. Will be backtracked.

val mem_term : t -> term -> bool

Returns true if the term is explicitly present in the congruence closure

type ev_on_pre_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit
type ev_on_post_merge = t -> actions -> N.t -> N.t -> unit
type ev_on_new_term = t -> N.t -> term -> unit
type ev_on_conflict = t -> th:bool -> lit list -> unit
type ev_on_propagate = t -> lit -> (unit -> lit list) -> unit
type ev_on_is_subterm = N.t -> term -> unit
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_pre_merge:ev_on_pre_merge list -> ?⁠on_post_merge:ev_on_post_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠on_is_subterm:ev_on_is_subterm list -> ?⁠size:[ `Small | `Big ] -> term_state -> t

Create a new congruence closure.

val allocate_bitfield : descr:string -> t -> N.bitfield

Allocate a new bitfield for the nodes. See N.bitfield.

val set_bitfield : t -> N.bitfield -> bool -> N.t -> unit

Set the bitfield for the node. This will be backtracked. See N.bitfield.

val on_pre_merge : t -> ev_on_pre_merge -> unit

Add a function to be called when two classes are merged

val on_post_merge : t -> ev_on_post_merge -> unit

Add a function to be called when two classes are merged

val on_new_term : t -> ev_on_new_term -> unit

Add a function to be called when a new node is created

val on_conflict : t -> ev_on_conflict -> unit

Called when the congruence closure finds a conflict

val on_propagate : t -> ev_on_propagate -> unit

Called when the congruence closure propagates a literal

val on_is_subterm : t -> ev_on_is_subterm -> unit

Called on terms that are subterms of function symbols

val set_as_lit : t -> N.t -> lit -> unit

map the given node to a literal.

val find_t : t -> term -> repr

Current representative of the term.

raises Not_found

if the term is not already add-ed.

val add_seq : t -> term Iter.t -> unit

Add a sequence of terms to the congruence closure

val all_classes : t -> repr Iter.t

All current classes. This is costly, only use if there is no other solution

val assert_lit : t -> lit -> unit

Given a literal, assume it in the congruence closure and propagate its consequences. Will be backtracked.

Useful for the theory combination or the SAT solver's functor

val assert_lits : t -> lit Iter.t -> unit

Addition of many literals

val explain_eq : t -> N.t -> N.t -> lit list

Explain why the two nodes are equal. Fails if they are not, in an unspecified way

val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given explanation it must be a theory tautology that expl ==> absurd. To be used in theories.

val n_true : t -> N.t
val n_false : t -> N.t
val n_bool : t -> bool -> N.t
val merge : t -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val merge_t : t -> term -> term -> Expl.t -> unit

Shortcut for adding + merging

val check : t -> actions -> unit

Perform all pending operations done via assert_eq, assert_lit, etc. Will use the actions to propagate literals, declare conflicts, etc.

val new_merges : t -> bool

Called after check, returns true if some pairs of classes were merged.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Restore to state n calls to push_level earlier. Used during backtracking.

val get_model : t -> N.t Iter.t Iter.t

get all the equivalence classes so they can be merged in the model

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/module-type-S/Solver_internal/Lit/index.html b/dev/sidekick/Sidekick_msat_solver/module-type-S/Solver_internal/Lit/index.html deleted file mode 100644 index f44e4a74..00000000 --- a/dev/sidekick/Sidekick_msat_solver/module-type-S/Solver_internal/Lit/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Lit (sidekick.Sidekick_msat_solver.S.Solver_internal.Lit)

Module Solver_internal.Lit

Literals

A literal is a (preprocessed) term along with its sign. It is directly manipulated by the SAT solver.

type t
val term : t -> term
val sign : t -> bool
val neg : t -> t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/module-type-S/Solver_internal/Simplify/index.html b/dev/sidekick/Sidekick_msat_solver/module-type-S/Solver_internal/Simplify/index.html index 0f2866da..176e0523 100644 --- a/dev/sidekick/Sidekick_msat_solver/module-type-S/Solver_internal/Simplify/index.html +++ b/dev/sidekick/Sidekick_msat_solver/module-type-S/Solver_internal/Simplify/index.html @@ -1,2 +1,2 @@ -Simplify (sidekick.Sidekick_msat_solver.S.Solver_internal.Simplify)

Module Solver_internal.Simplify

type t
val tst : t -> term_state
val clear : t -> unit

Reset internal cache, etc.

type hook = t -> term -> term option

Given a term, try to simplify it. Return None if it didn't change. Can also add clauses to the simplifier.

val normalize : t -> term -> term

Normalize a term using all the hooks.

\ No newline at end of file +Simplify (sidekick.Sidekick_msat_solver.S.Solver_internal.Simplify)

Module Solver_internal.Simplify

type t
val tst : t -> term_state
val ty_st : t -> ty_state
val clear : t -> unit

Reset internal cache, etc.

type hook = t -> term -> term option

Given a term, try to simplify it. Return None if it didn't change.

val normalize : t -> term -> term

Normalize a term using all the hooks.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/module-type-S/Solver_internal/index.html b/dev/sidekick/Sidekick_msat_solver/module-type-S/Solver_internal/index.html index 46117d04..890963db 100644 --- a/dev/sidekick/Sidekick_msat_solver/module-type-S/Solver_internal/index.html +++ b/dev/sidekick/Sidekick_msat_solver/module-type-S/Solver_internal/index.html @@ -1,2 +1,2 @@ -Solver_internal (sidekick.Sidekick_msat_solver.S.Solver_internal)

Module S.Solver_internal

Internal solver, available to theories.

module A = A
module CC_A = CC_A
module CC : Sidekick_core.CC_S with module CC_A = CC_A
type ty = A.Ty.t
type term = A.Term.t
type term_state = A.Term.state
type proof = A.Proof.t
type t

Main type for a solver

type solver = t
module Expl = CC.Expl
module N = CC.N
val tst : t -> term_state
val cc : t -> CC.t

Congruence closure for this solver

module Lit : sig ... end
type lit = Lit.t

Simplifiers

module Simplify : sig ... end
type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit
val simplifier : t -> Simplify.t
val simp_t : t -> term -> term

hooks for the theory

type actions
val propagate : t -> actions -> lit -> reason:(unit -> lit list) -> A.Proof.t -> unit
val raise_conflict : t -> actions -> lit list -> A.Proof.t -> 'a

Give a conflict clause to the solver

val propagate : t -> actions -> lit -> (unit -> lit list) -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> actions -> lit -> lit list -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> actions -> lit list -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : t -> actions -> lit list -> unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> actions -> ?⁠sign:bool -> term -> lit

Create a literal

val add_lit : t -> actions -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value

val add_lit_t : t -> actions -> ?⁠sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> N.t -> N.t

Find representative of the node

val cc_merge : t -> actions -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> actions -> term -> term -> Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> N.t

Add/retrieve congruence closure node for this term. To be used in theories

val on_cc_merge : t -> (CC.t -> actions -> N.t -> N.t -> Expl.t -> unit) -> unit

Callback for when two classes containing data for this key are merged

val on_cc_new_term : t -> (CC.t -> N.t -> term -> unit) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_conflict : t -> (CC.t -> lit list -> unit) -> unit

Callback called on every CC conflict

val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list) -> unit) -> unit

Callback called on every CC propagation

val on_partial_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

type preprocess_hook = t -> mk_lit:(term -> lit) -> add_clause:(lit list -> unit) -> term -> term option

Given a term, try to preprocess it. Return None if it didn't change. Can also add clauses to define new terms.

val add_preprocess : t -> preprocess_hook -> unit
\ No newline at end of file +Solver_internal (sidekick.Sidekick_msat_solver.S.Solver_internal)

Module S.Solver_internal

Internal solver, available to theories.

module T = T
module P = P
type ty = T.Ty.t
type term = T.Term.t
type term_state = T.Term.state
type ty_state = T.Ty.state
type proof = P.t
type t

Main type for a solver

type solver = t
val tst : t -> term_state
val ty_st : t -> ty_state
val stats : t -> Sidekick_util.Stat.t

Actions for the theories

type actions
module Lit = Lit
type lit = Lit.t

Congruence Closure

module CC : Sidekick_core.CC_S with module T = T and module P = P and module Lit = Lit and type Actions.t = actions
val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end
type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit
val simplifier : t -> Simplify.t
val simp_t : t -> term -> term

hooks for the theory

val propagate : t -> actions -> lit -> reason:(unit -> lit list) -> proof -> unit

Propagate a literal for a reason. This is similar to asserting the clause reason => lit, but more lightweight, and in a way that is backtrackable.

val raise_conflict : t -> actions -> lit list -> proof -> 'a

Give a conflict clause to the solver

val push_decision : t -> actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : t -> actions -> lit -> (unit -> lit list) -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> actions -> lit -> lit list -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> actions -> lit list -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : t -> actions -> lit list -> unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> actions -> ?⁠sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val preprocess_term : t -> add_clause:(Lit.t list -> unit) -> term -> term

Preprocess a term.

val add_lit : t -> actions -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value

val add_lit_t : t -> actions -> ?⁠sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit

Callback called on every CC conflict

val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list) -> unit) -> unit

Callback called on every CC propagation

val on_partial_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

type preprocess_hook = t -> mk_lit:(term -> lit) -> add_clause:(lit list -> unit) -> term -> term option

Given a term, try to preprocess it. Return None if it didn't change. Can also add clauses to define new terms.

parameter mk_lit

creates a new literal for a boolean term.

parameter add_clause

pushes a new clause into the SAT solver.

val on_preprocess : t -> preprocess_hook -> unit

Model production

type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option

A model-production hook. It takes the solver, a class, and returns a term for this class.

val on_model_gen : t -> model_hook -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/module-type-S/T/Fun/index.html b/dev/sidekick/Sidekick_msat_solver/module-type-S/T/Fun/index.html new file mode 100644 index 00000000..263803b9 --- /dev/null +++ b/dev/sidekick/Sidekick_msat_solver/module-type-S/T/Fun/index.html @@ -0,0 +1,2 @@ + +Fun (sidekick.Sidekick_msat_solver.S.T.Fun)

Module T.Fun

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/module-type-S/T/Term/index.html b/dev/sidekick/Sidekick_msat_solver/module-type-S/T/Term/index.html new file mode 100644 index 00000000..c6c0f8b9 --- /dev/null +++ b/dev/sidekick/Sidekick_msat_solver/module-type-S/T/Term/index.html @@ -0,0 +1,2 @@ + +Term (sidekick.Sidekick_msat_solver.S.T.Term)

Module T.Term

type t
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type state
val ty : t -> Ty.t
val bool : state -> bool -> t
val as_bool : t -> bool option
val abs : state -> t -> t * bool
val map_shallow : state -> (t -> t) -> t -> t

Map function on immediate subterms

val iter_dag : t -> (t -> unit) -> unit
module Tbl : CCHashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/module-type-S/T/Ty/index.html b/dev/sidekick/Sidekick_msat_solver/module-type-S/T/Ty/index.html new file mode 100644 index 00000000..b7a2379a --- /dev/null +++ b/dev/sidekick/Sidekick_msat_solver/module-type-S/T/Ty/index.html @@ -0,0 +1,2 @@ + +Ty (sidekick.Sidekick_msat_solver.S.T.Ty)

Module T.Ty

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type state
val bool : state -> t
val is_bool : t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/module-type-S/T/index.html b/dev/sidekick/Sidekick_msat_solver/module-type-S/T/index.html new file mode 100644 index 00000000..3ca5d1cc --- /dev/null +++ b/dev/sidekick/Sidekick_msat_solver/module-type-S/T/index.html @@ -0,0 +1,2 @@ + +T (sidekick.Sidekick_msat_solver.S.T)

Module S.T

module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/module-type-S/Unknown/index.html b/dev/sidekick/Sidekick_msat_solver/module-type-S/Unknown/index.html index b239113f..e6b557b5 100644 --- a/dev/sidekick/Sidekick_msat_solver/module-type-S/Unknown/index.html +++ b/dev/sidekick/Sidekick_msat_solver/module-type-S/Unknown/index.html @@ -1,2 +1,2 @@ -Unknown (sidekick.Sidekick_msat_solver.S.Unknown)

Module S.Unknown

type t
val pp : t CCFormat.printer
\ No newline at end of file +Unknown (sidekick.Sidekick_msat_solver.S.Unknown)

Module S.Unknown

type t
val pp : t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/module-type-S/Value/index.html b/dev/sidekick/Sidekick_msat_solver/module-type-S/Value/index.html deleted file mode 100644 index 7a0c7dff..00000000 --- a/dev/sidekick/Sidekick_msat_solver/module-type-S/Value/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Value (sidekick.Sidekick_msat_solver.S.Value)

Module S.Value

Semantic values

type t
val equal : t -> t -> bool
val hash : t -> int
val ty : t -> ty
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/module-type-S/index.html b/dev/sidekick/Sidekick_msat_solver/module-type-S/index.html index 600225c4..723da835 100644 --- a/dev/sidekick/Sidekick_msat_solver/module-type-S/index.html +++ b/dev/sidekick/Sidekick_msat_solver/module-type-S/index.html @@ -1,2 +1,2 @@ -S (sidekick.Sidekick_msat_solver.S)

Module type Sidekick_msat_solver.S

module CC_A : Sidekick_core.CC_ARG with module A = A
module Solver_internal : Sidekick_core.SOLVER_INTERNAL with module A = A and module CC_A = CC_A

Internal solver, available to theories.

module Lit = Solver_internal.Lit
type t
type solver = t
type term = A.Term.t
type ty = A.Ty.t
type lit = Solver_internal.Lit.t
type lemma = A.Proof.t
module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

val mk_theory : name:string -> create_and_setup:(Solver_internal.t -> 'th) -> ?⁠push_level:('th -> unit) -> ?⁠pop_levels:('th -> int -> unit) -> unit -> theory

Helper to create a theory

module Atom : sig ... end
module Value : sig ... end
module Model : sig ... end
module Unknown : sig ... end
module Proof : sig ... end
type proof = Proof.t

Main API

val stats : t -> Sidekick_util.Stat.t
val tst : t -> A.Term.state
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠size:[ `Big | `Tiny | `Small ] -> ?⁠store_proof:bool -> theories:theory list -> A.Term.state -> unit -> t

Create a new solver.

parameter theories

theories to load from the start.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val mk_atom_lit : t -> lit -> Atom.t
val mk_atom_t : t -> ?⁠sign:bool -> term -> Atom.t
val add_clause : t -> Atom.t Sidekick_util.IArray.t -> unit
val add_clause_l : t -> Atom.t list -> unit
type res =
| Sat of Model.t
| Unsat of {
proof : proof option;
unsat_core : Atom.t list lazy_t;
}
| Unknown of Unknown.t

Result of solving for the current set of clauses

val solve : ?⁠on_exit:(unit -> unit) list -> ?⁠check:bool -> assumptions:Atom.t list -> t -> res

solve s checks the satisfiability of the statement added so far to s

parameter check

if true, the model is checked before returning

parameter assumptions

a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

parameter on_exit

functions to be run before this returns

val pp_term_graph : t CCFormat.printer
val pp_stats : t CCFormat.printer
\ No newline at end of file +S (sidekick.Sidekick_msat_solver.S)

Module type Sidekick_msat_solver.S

module Lit : Sidekick_core.LIT with module T = T
module Solver_internal : Sidekick_core.SOLVER_INTERNAL with module T = T and module P = P and module Lit = Lit

Internal solver, available to theories.

type t
type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t
type lemma = P.t
module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

type 'a theory_p = (module THEORY with type t = 'a)

A theory that can be used for this particular solver, with state of type 'a.

val mk_theory : name:string -> create_and_setup:(Solver_internal.t -> 'th) -> ?⁠push_level:('th -> unit) -> ?⁠pop_levels:('th -> int -> unit) -> unit -> theory

Helper to create a theory

module Atom : sig ... end
module Model : sig ... end
module Unknown : sig ... end
module Proof : sig ... end
type proof = Proof.t

Main API

val stats : t -> Sidekick_util.Stat.t
val tst : t -> T.Term.state
val ty_st : t -> T.Ty.state
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠size:[ `Big | `Tiny | `Small ] -> ?⁠store_proof:bool -> theories:theory list -> T.Term.state -> T.Ty.state -> unit -> t

Create a new solver.

parameter theories

theories to load from the start.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val add_theory_p : t -> 'a theory_p -> 'a

Add the given theory and obtain its state

val add_theory_l : t -> theory list -> unit
val mk_atom_lit : t -> lit -> Atom.t
val mk_atom_t : t -> ?⁠sign:bool -> term -> Atom.t
val add_clause : t -> Atom.t Sidekick_util.IArray.t -> unit
val add_clause_l : t -> Atom.t list -> unit
type res =
| Sat of Model.t
| Unsat of {
proof : proof option lazy_t;
unsat_core : Atom.t list lazy_t;
}
| Unknown of Unknown.t

Result of solving for the current set of clauses

val solve : ?⁠on_exit:(unit -> unit) list -> ?⁠check:bool -> ?⁠on_progress:(t -> unit) -> assumptions:Atom.t list -> t -> res

solve s checks the satisfiability of the statement added so far to s

parameter check

if true, the model is checked before returning

parameter assumptions

a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

parameter on_exit

functions to be run before this returns

val pp_stats : t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/module-type-S/module-type-THEORY/index.html b/dev/sidekick/Sidekick_msat_solver/module-type-S/module-type-THEORY/index.html index b5cd90d9..a37dc1fc 100644 --- a/dev/sidekick/Sidekick_msat_solver/module-type-S/module-type-THEORY/index.html +++ b/dev/sidekick/Sidekick_msat_solver/module-type-S/module-type-THEORY/index.html @@ -1,2 +1,2 @@ -THEORY (sidekick.Sidekick_msat_solver.S.THEORY)

Module type S.THEORY

A theory

Theories are abstracted over the concrete implementation of the solver, so they can work with any implementation.

Typically a theory should be a functor taking an argument containing a SOLVER_INTERNAL and some additional views on terms, literals, etc. that are specific to the theory (e.g. to map terms to linear expressions). The theory can then be instantiated on any kind of solver for any term representation that also satisfies the additional theory-specific requirements. Instantiated theories (ie values of type Sidekick_core.SOLVER.theory) can be added to the solver.

type t

The theory's state

val name : string

Name of the theory

val create_and_setup : Solver_internal.t -> t

Instantiate the theory's state for the given (internal) solver, register callbacks, create keys, etc.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Pop backtracking levels, restoring the theory to its former state

\ No newline at end of file +THEORY (sidekick.Sidekick_msat_solver.S.THEORY)

Module type S.THEORY

A theory

Theories are abstracted over the concrete implementation of the solver, so they can work with any implementation.

Typically a theory should be a functor taking an argument containing a SOLVER_INTERNAL or even a full SOLVER, and some additional views on terms, literals, etc. that are specific to the theory (e.g. to map terms to linear expressions). The theory can then be instantiated on any kind of solver for any term representation that also satisfies the additional theory-specific requirements. Instantiated theories (ie values of type Sidekick_core.SOLVER.theory) can be added to the solver.

type t

The theory's state

val name : string

Name of the theory

val create_and_setup : Solver_internal.t -> t

Instantiate the theory's state for the given (internal) solver, register callbacks, create keys, etc.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Pop backtracking levels, restoring the theory to its former state

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_tef/.dune-keep b/dev/sidekick/Sidekick_tef/.dune-keep new file mode 100644 index 00000000..e69de29b diff --git a/dev/sidekick/Sidekick_tef/index.html b/dev/sidekick/Sidekick_tef/index.html new file mode 100644 index 00000000..d661b64a --- /dev/null +++ b/dev/sidekick/Sidekick_tef/index.html @@ -0,0 +1,2 @@ + +Sidekick_tef (sidekick.Sidekick_tef)

Module Sidekick_tef

Tracing Event Format

A nice profiling format based on json, useful for visualizing what goes on. See https://docs.google.com/document/d/1CvAClvFfyA5R-PhYUmn5OOQtYMH4h6I0nSsKchNAySU/

val setup : unit -> unit
val teardown : unit -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/Gensym/index.html b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/Gensym/index.html index 046cdd7e..bafbefc4 100644 --- a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/Gensym/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/Gensym/index.html @@ -1,2 +1,2 @@ -Gensym (sidekick.Sidekick_th_bool_static.Make.1-A.Gensym)

Module 1-A.Gensym

type t
val create : S.A.Term.state -> t
val fresh_term : t -> pre:string -> S.A.Ty.t -> term

Make a fresh term of the given type

\ No newline at end of file +Gensym (sidekick.Sidekick_th_bool_static.Make.1-A.Gensym)

Module 1-A.Gensym

type t
val create : S.T.Term.state -> t
val fresh_term : t -> pre:string -> S.T.Ty.t -> term

Make a fresh term of the given type

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/A/Fun/index.html b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/A/Fun/index.html deleted file mode 100644 index 0ea17ffc..00000000 --- a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/A/Fun/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Fun (sidekick.Sidekick_th_bool_static.Make.1-A.S.A.Fun)

Module A.Fun

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/A/Proof/index.html b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/A/Proof/index.html deleted file mode 100644 index e20ca6a7..00000000 --- a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/A/Proof/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Proof (sidekick.Sidekick_th_bool_static.Make.1-A.S.A.Proof)

Module A.Proof

type t
val pp : t Sidekick_core.Fmt.printer
val default : t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/A/Term/index.html b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/A/Term/index.html deleted file mode 100644 index 16b52378..00000000 --- a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/A/Term/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Term (sidekick.Sidekick_th_bool_static.Make.1-A.S.A.Term)

Module A.Term

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type state
val ty : t -> Ty.t
val bool : state -> bool -> t
val as_bool : t -> bool option
val abs : state -> t -> t * bool
val map_shallow : state -> (t -> t) -> t -> t

Map function on immediate subterms

val iter_dag : t -> (t -> unit) -> unit
module Tbl : CCHashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/A/Ty/index.html b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/A/Ty/index.html deleted file mode 100644 index 271866cb..00000000 --- a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/A/Ty/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Ty (sidekick.Sidekick_th_bool_static.Make.1-A.S.A.Ty)

Module A.Ty

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
val bool : t
val is_bool : t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/A/index.html b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/A/index.html deleted file mode 100644 index f57515aa..00000000 --- a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/A/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -A (sidekick.Sidekick_th_bool_static.Make.1-A.S.A)

Module S.A

include Sidekick_core.TERM
module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
module Proof : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Atom/index.html b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Atom/index.html index 7007098e..39aa4d01 100644 --- a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Atom/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Atom/index.html @@ -1,2 +1,2 @@ -Atom (sidekick.Sidekick_th_bool_static.Make.1-A.S.Atom)

Module S.Atom

Boolean Atoms

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t CCFormat.printer
\ No newline at end of file +Atom (sidekick.Sidekick_th_bool_static.Make.1-A.S.Atom)

Module S.Atom

Boolean Atoms

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t CCFormat.printer
val neg : t -> t
val formula : t -> lit
val sign : t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/CC_A/Actions/index.html b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/CC_A/Actions/index.html deleted file mode 100644 index bf433a58..00000000 --- a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/CC_A/Actions/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Actions (sidekick.Sidekick_th_bool_static.Make.1-A.S.CC_A.Actions)

Module CC_A.Actions

type t
val raise_conflict : t -> Lit.t list -> A.Proof.t -> 'a
val propagate : t -> Lit.t -> reason:(unit -> Lit.t list) -> A.Proof.t -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/CC_A/Lit/index.html b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/CC_A/Lit/index.html deleted file mode 100644 index a5b0095d..00000000 --- a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/CC_A/Lit/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Lit (sidekick.Sidekick_th_bool_static.Make.1-A.S.CC_A.Lit)

Module CC_A.Lit

type t
val term : t -> A.Term.t
val sign : t -> bool
val neg : t -> t
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/CC_A/index.html b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/CC_A/index.html deleted file mode 100644 index 2b275e25..00000000 --- a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/CC_A/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -CC_A (sidekick.Sidekick_th_bool_static.Make.1-A.S.CC_A)

Module S.CC_A

module A = A
val cc_view : A.Term.t -> (A.Fun.tA.Term.tA.Term.t Iter.t) Sidekick_core.CC_view.t

View the term through the lens of the congruence closure

module Lit : sig ... end
module Actions : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Lit/index.html b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Lit/index.html new file mode 100644 index 00000000..8f714312 --- /dev/null +++ b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Lit/index.html @@ -0,0 +1,2 @@ + +Lit (sidekick.Sidekick_th_bool_static.Make.1-A.S.Lit)

Module S.Lit

module T = T
type t
val term : t -> T.Term.t
val sign : t -> bool
val neg : t -> t
val abs : t -> t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Model/index.html b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Model/index.html index fb51dd14..1669bee8 100644 --- a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Model/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Model/index.html @@ -1,2 +1,2 @@ -Model (sidekick.Sidekick_th_bool_static.Make.1-A.S.Model)

Module S.Model

type t
val empty : t
val mem : term -> t -> bool
val find : term -> t -> Value.t option
val eval : t -> term -> Value.t option
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Model (sidekick.Sidekick_th_bool_static.Make.1-A.S.Model)

Module S.Model

type t
val empty : t
val mem : t -> term -> bool
val find : t -> term -> term option
val eval : t -> term -> term option
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/P/index.html b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/P/index.html new file mode 100644 index 00000000..617f83cd --- /dev/null +++ b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/P/index.html @@ -0,0 +1,2 @@ + +P (sidekick.Sidekick_th_bool_static.Make.1-A.S.P)

Module S.P

type t
val pp : t Sidekick_core.Fmt.printer
val default : t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Proof/index.html b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Proof/index.html index d8d81ef8..01038b01 100644 --- a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Proof/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Proof/index.html @@ -1,2 +1,2 @@ -Proof (sidekick.Sidekick_th_bool_static.Make.1-A.S.Proof)

Module S.Proof

type t
val check : t -> unit
val pp_dot : t Sidekick_core.Fmt.printer
\ No newline at end of file +Proof (sidekick.Sidekick_th_bool_static.Make.1-A.S.Proof)

Module S.Proof

type t
val check : t -> unit
val pp_dot : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Solver_internal/CC/Actions/index.html b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Solver_internal/CC/Actions/index.html new file mode 100644 index 00000000..ef0a7635 --- /dev/null +++ b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Solver_internal/CC/Actions/index.html @@ -0,0 +1,2 @@ + +Actions (sidekick.Sidekick_th_bool_static.Make.1-A.S.Solver_internal.CC.Actions)

Module CC.Actions

module T = T
module P = P
module Lit = Lit
type t = actions
val raise_conflict : t -> Lit.t list -> P.t -> 'a
val propagate : t -> Lit.t -> reason:(unit -> Lit.t list) -> P.t -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Solver_internal/CC/Expl/index.html b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Solver_internal/CC/Expl/index.html index 9e2d46d3..3e1dabe3 100644 --- a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Solver_internal/CC/Expl/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Solver_internal/CC/Expl/index.html @@ -1,2 +1,2 @@ -Expl (sidekick.Sidekick_th_bool_static.Make.1-A.S.Solver_internal.CC.Expl)

Module CC.Expl

type t
val pp : t Sidekick_core.Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
\ No newline at end of file +Expl (sidekick.Sidekick_th_bool_static.Make.1-A.S.Solver_internal.CC.Expl)

Module CC.Expl

type t
val pp : t Sidekick_core.Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
val mk_theory : t -> t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Solver_internal/CC/N/index.html b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Solver_internal/CC/N/index.html index bd1fb8e7..f5d11643 100644 --- a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Solver_internal/CC/N/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Solver_internal/CC/N/index.html @@ -1,2 +1,2 @@ -N (sidekick.Sidekick_th_bool_static.Make.1-A.S.Solver_internal.CC.N)

Module CC.N

An equivalence class is a set of terms that are currently equal in the partial model built by the solver. The class is represented by a collection of nodes, one of which is distinguished and is called the "representative".

All information pertaining to the whole equivalence class is stored in this representative's node.

When two classes become equal (are "merged"), one of the two representatives is picked as the representative of the new class. The new class contains the union of the two old classes' nodes.

We also allow theories to store additional information in the representative. This information can be used when two classes are merged, to detect conflicts and solve equations à la Shostak.

type t
val term : t -> term
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
val is_root : t -> bool

Is the node a root (ie the representative of its class)?

val iter_class : t -> t Iter.t

Traverse the congruence class. Precondition: is_root n (see find below)

val iter_parents : t -> t Iter.t

Traverse the parents of the class. Precondition: is_root n (see find below)

\ No newline at end of file +N (sidekick.Sidekick_th_bool_static.Make.1-A.S.Solver_internal.CC.N)

Module CC.N

An equivalence class is a set of terms that are currently equal in the partial model built by the solver. The class is represented by a collection of nodes, one of which is distinguished and is called the "representative".

All information pertaining to the whole equivalence class is stored in this representative's node.

When two classes become equal (are "merged"), one of the two representatives is picked as the representative of the new class. The new class contains the union of the two old classes' nodes.

We also allow theories to store additional information in the representative. This information can be used when two classes are merged, to detect conflicts and solve equations à la Shostak.

type t
val term : t -> term
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
val is_root : t -> bool

Is the node a root (ie the representative of its class)?

val iter_class : t -> t Iter.t

Traverse the congruence class. Precondition: is_root n (see find below)

val iter_parents : t -> t Iter.t

Traverse the parents of the class. Precondition: is_root n (see find below)

type bitfield

A field in the bitfield of this node. This should only be allocated when a theory is initialized.

All fields are initially 0, are backtracked automatically, and are merged automatically when classes are merged.

val get_field : bitfield -> t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Solver_internal/CC/index.html b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Solver_internal/CC/index.html index fb9bf943..b02f19e0 100644 --- a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Solver_internal/CC/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Solver_internal/CC/index.html @@ -1,2 +1,2 @@ -CC (sidekick.Sidekick_th_bool_static.Make.1-A.S.Solver_internal.CC)

Module Solver_internal.CC

module CC_A = CC_A
module A = CC_A.A
type term_state = A.Term.state
type term = A.Term.t
type fun_ = A.Fun.t
type lit = CC_A.Lit.t
type proof = A.Proof.t
type actions = CC_A.Actions.t
type t

Global state of the congruence closure

module N : sig ... end

An equivalence class is a set of terms that are currently equal in the partial model built by the solver. The class is represented by a collection of nodes, one of which is distinguished and is called the "representative".

module Expl : sig ... end
type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t
val term_state : t -> term_state
val find : t -> node -> repr

Current representative

val add_term : t -> term -> node

Add the term to the congruence closure, if not present already. Will be backtracked.

type ev_on_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit
type ev_on_new_term = t -> N.t -> term -> unit
type ev_on_conflict = t -> lit list -> unit
type ev_on_propagate = t -> lit -> (unit -> lit list) -> unit
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_merge:ev_on_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠size:[ `Small | `Big ] -> term_state -> t

Create a new congruence closure.

val on_merge : t -> ev_on_merge -> unit

Add a function to be called when two classes are merged

val on_new_term : t -> ev_on_new_term -> unit

Add a function to be called when a new node is created

val on_conflict : t -> ev_on_conflict -> unit

Called when the congruence closure finds a conflict

val on_propagate : t -> ev_on_propagate -> unit

Called when the congruence closure propagates a literal

val set_as_lit : t -> N.t -> lit -> unit

map the given node to a literal.

val find_t : t -> term -> repr

Current representative of the term.

raises Not_found

if the term is not already add-ed.

val add_seq : t -> term Iter.t -> unit

Add a sequence of terms to the congruence closure

val all_classes : t -> repr Iter.t

All current classes. This is costly, only use if there is no other solution

val assert_lit : t -> lit -> unit

Given a literal, assume it in the congruence closure and propagate its consequences. Will be backtracked.

Useful for the theory combination or the SAT solver's functor

val assert_lits : t -> lit Iter.t -> unit

Addition of many literals

val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given explanation it must be a theory tautology that expl ==> absurd. To be used in theories.

val merge : t -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val check : t -> actions -> unit

Perform all pending operations done via assert_eq, assert_lit, etc. Will use the actions to propagate literals, declare conflicts, etc.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Restore to state n calls to push_level earlier. Used during backtracking.

val get_model : t -> N.t Iter.t Iter.t

get all the equivalence classes so they can be merged in the model

\ No newline at end of file +CC (sidekick.Sidekick_th_bool_static.Make.1-A.S.Solver_internal.CC)

Module Solver_internal.CC

module T = T
module P = P
module Lit = Lit
module Actions : Sidekick_core.CC_ACTIONS with module T = T and module Lit = Lit and module P = P and type t = actions
type term_state = T.Term.state
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type proof = P.t
type actions = Actions.t
type t

Global state of the congruence closure

module N : sig ... end

An equivalence class is a set of terms that are currently equal in the partial model built by the solver. The class is represented by a collection of nodes, one of which is distinguished and is called the "representative".

module Expl : sig ... end
type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t
val term_state : t -> term_state
val find : t -> node -> repr

Current representative

val add_term : t -> term -> node

Add the term to the congruence closure, if not present already. Will be backtracked.

val mem_term : t -> term -> bool

Returns true if the term is explicitly present in the congruence closure

type ev_on_pre_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit
type ev_on_post_merge = t -> actions -> N.t -> N.t -> unit
type ev_on_new_term = t -> N.t -> term -> unit
type ev_on_conflict = t -> th:bool -> lit list -> unit
type ev_on_propagate = t -> lit -> (unit -> lit list) -> unit
type ev_on_is_subterm = N.t -> term -> unit
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_pre_merge:ev_on_pre_merge list -> ?⁠on_post_merge:ev_on_post_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠on_is_subterm:ev_on_is_subterm list -> ?⁠size:[ `Small | `Big ] -> term_state -> t

Create a new congruence closure.

val allocate_bitfield : descr:string -> t -> N.bitfield

Allocate a new bitfield for the nodes. See N.bitfield.

val set_bitfield : t -> N.bitfield -> bool -> N.t -> unit

Set the bitfield for the node. This will be backtracked. See N.bitfield.

val on_pre_merge : t -> ev_on_pre_merge -> unit

Add a function to be called when two classes are merged

val on_post_merge : t -> ev_on_post_merge -> unit

Add a function to be called when two classes are merged

val on_new_term : t -> ev_on_new_term -> unit

Add a function to be called when a new node is created

val on_conflict : t -> ev_on_conflict -> unit

Called when the congruence closure finds a conflict

val on_propagate : t -> ev_on_propagate -> unit

Called when the congruence closure propagates a literal

val on_is_subterm : t -> ev_on_is_subterm -> unit

Called on terms that are subterms of function symbols

val set_as_lit : t -> N.t -> lit -> unit

map the given node to a literal.

val find_t : t -> term -> repr

Current representative of the term.

raises Not_found

if the term is not already add-ed.

val add_seq : t -> term Iter.t -> unit

Add a sequence of terms to the congruence closure

val all_classes : t -> repr Iter.t

All current classes. This is costly, only use if there is no other solution

val assert_lit : t -> lit -> unit

Given a literal, assume it in the congruence closure and propagate its consequences. Will be backtracked.

Useful for the theory combination or the SAT solver's functor

val assert_lits : t -> lit Iter.t -> unit

Addition of many literals

val explain_eq : t -> N.t -> N.t -> lit list

Explain why the two nodes are equal. Fails if they are not, in an unspecified way

val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given explanation it must be a theory tautology that expl ==> absurd. To be used in theories.

val n_true : t -> N.t
val n_false : t -> N.t
val n_bool : t -> bool -> N.t
val merge : t -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val merge_t : t -> term -> term -> Expl.t -> unit

Shortcut for adding + merging

val check : t -> actions -> unit

Perform all pending operations done via assert_eq, assert_lit, etc. Will use the actions to propagate literals, declare conflicts, etc.

val new_merges : t -> bool

Called after check, returns true if some pairs of classes were merged.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Restore to state n calls to push_level earlier. Used during backtracking.

val get_model : t -> N.t Iter.t Iter.t

get all the equivalence classes so they can be merged in the model

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Solver_internal/Lit/index.html b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Solver_internal/Lit/index.html deleted file mode 100644 index 47cb9063..00000000 --- a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Solver_internal/Lit/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Lit (sidekick.Sidekick_th_bool_static.Make.1-A.S.Solver_internal.Lit)

Module Solver_internal.Lit

Literals

A literal is a (preprocessed) term along with its sign. It is directly manipulated by the SAT solver.

type t
val term : t -> term
val sign : t -> bool
val neg : t -> t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Solver_internal/Simplify/index.html b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Solver_internal/Simplify/index.html index d7247b3c..3acaaedd 100644 --- a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Solver_internal/Simplify/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Solver_internal/Simplify/index.html @@ -1,2 +1,2 @@ -Simplify (sidekick.Sidekick_th_bool_static.Make.1-A.S.Solver_internal.Simplify)

Module Solver_internal.Simplify

type t
val tst : t -> term_state
val clear : t -> unit

Reset internal cache, etc.

type hook = t -> term -> term option

Given a term, try to simplify it. Return None if it didn't change. Can also add clauses to the simplifier.

val normalize : t -> term -> term

Normalize a term using all the hooks.

\ No newline at end of file +Simplify (sidekick.Sidekick_th_bool_static.Make.1-A.S.Solver_internal.Simplify)

Module Solver_internal.Simplify

type t
val tst : t -> term_state
val ty_st : t -> ty_state
val clear : t -> unit

Reset internal cache, etc.

type hook = t -> term -> term option

Given a term, try to simplify it. Return None if it didn't change.

val normalize : t -> term -> term

Normalize a term using all the hooks.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Solver_internal/index.html b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Solver_internal/index.html index 03a463f9..9e8c964e 100644 --- a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Solver_internal/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Solver_internal/index.html @@ -1,2 +1,2 @@ -Solver_internal (sidekick.Sidekick_th_bool_static.Make.1-A.S.Solver_internal)

Module S.Solver_internal

Internal solver, available to theories.

module A = A
module CC_A = CC_A
module CC : Sidekick_core.CC_S with module CC_A = CC_A
type ty = A.Ty.t
type term = A.Term.t
type term_state = A.Term.state
type proof = A.Proof.t
type t

Main type for a solver

type solver = t
module Expl = CC.Expl
module N = CC.N
val tst : t -> term_state
val cc : t -> CC.t

Congruence closure for this solver

module Lit : sig ... end
type lit = Lit.t

Simplifiers

module Simplify : sig ... end
type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit
val simplifier : t -> Simplify.t
val simp_t : t -> term -> term

hooks for the theory

type actions
val propagate : t -> actions -> lit -> reason:(unit -> lit list) -> A.Proof.t -> unit
val raise_conflict : t -> actions -> lit list -> A.Proof.t -> 'a

Give a conflict clause to the solver

val propagate : t -> actions -> lit -> (unit -> lit list) -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> actions -> lit -> lit list -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> actions -> lit list -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : t -> actions -> lit list -> unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> actions -> ?⁠sign:bool -> term -> lit

Create a literal

val add_lit : t -> actions -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value

val add_lit_t : t -> actions -> ?⁠sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> N.t -> N.t

Find representative of the node

val cc_merge : t -> actions -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> actions -> term -> term -> Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> N.t

Add/retrieve congruence closure node for this term. To be used in theories

val on_cc_merge : t -> (CC.t -> actions -> N.t -> N.t -> Expl.t -> unit) -> unit

Callback for when two classes containing data for this key are merged

val on_cc_new_term : t -> (CC.t -> N.t -> term -> unit) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_conflict : t -> (CC.t -> lit list -> unit) -> unit

Callback called on every CC conflict

val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list) -> unit) -> unit

Callback called on every CC propagation

val on_partial_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

type preprocess_hook = t -> mk_lit:(term -> lit) -> add_clause:(lit list -> unit) -> term -> term option

Given a term, try to preprocess it. Return None if it didn't change. Can also add clauses to define new terms.

val add_preprocess : t -> preprocess_hook -> unit
\ No newline at end of file +Solver_internal (sidekick.Sidekick_th_bool_static.Make.1-A.S.Solver_internal)

Module S.Solver_internal

Internal solver, available to theories.

module T = T
module P = P
type ty = T.Ty.t
type term = T.Term.t
type term_state = T.Term.state
type ty_state = T.Ty.state
type proof = P.t
type t

Main type for a solver

type solver = t
val tst : t -> term_state
val ty_st : t -> ty_state
val stats : t -> Sidekick_util.Stat.t

Actions for the theories

type actions
module Lit = Lit
type lit = Lit.t

Congruence Closure

module CC : Sidekick_core.CC_S with module T = T and module P = P and module Lit = Lit and type Actions.t = actions
val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end
type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit
val simplifier : t -> Simplify.t
val simp_t : t -> term -> term

hooks for the theory

val propagate : t -> actions -> lit -> reason:(unit -> lit list) -> proof -> unit

Propagate a literal for a reason. This is similar to asserting the clause reason => lit, but more lightweight, and in a way that is backtrackable.

val raise_conflict : t -> actions -> lit list -> proof -> 'a

Give a conflict clause to the solver

val push_decision : t -> actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : t -> actions -> lit -> (unit -> lit list) -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> actions -> lit -> lit list -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> actions -> lit list -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : t -> actions -> lit list -> unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> actions -> ?⁠sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val preprocess_term : t -> add_clause:(Lit.t list -> unit) -> term -> term

Preprocess a term.

val add_lit : t -> actions -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value

val add_lit_t : t -> actions -> ?⁠sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit

Callback called on every CC conflict

val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list) -> unit) -> unit

Callback called on every CC propagation

val on_partial_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

type preprocess_hook = t -> mk_lit:(term -> lit) -> add_clause:(lit list -> unit) -> term -> term option

Given a term, try to preprocess it. Return None if it didn't change. Can also add clauses to define new terms.

parameter mk_lit

creates a new literal for a boolean term.

parameter add_clause

pushes a new clause into the SAT solver.

val on_preprocess : t -> preprocess_hook -> unit

Model production

type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option

A model-production hook. It takes the solver, a class, and returns a term for this class.

val on_model_gen : t -> model_hook -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/T/Fun/index.html b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/T/Fun/index.html new file mode 100644 index 00000000..e155bc8f --- /dev/null +++ b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/T/Fun/index.html @@ -0,0 +1,2 @@ + +Fun (sidekick.Sidekick_th_bool_static.Make.1-A.S.T.Fun)

Module T.Fun

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/T/Term/index.html b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/T/Term/index.html new file mode 100644 index 00000000..a0ce3fa1 --- /dev/null +++ b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/T/Term/index.html @@ -0,0 +1,2 @@ + +Term (sidekick.Sidekick_th_bool_static.Make.1-A.S.T.Term)

Module T.Term

type t
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type state
val ty : t -> Ty.t
val bool : state -> bool -> t
val as_bool : t -> bool option
val abs : state -> t -> t * bool
val map_shallow : state -> (t -> t) -> t -> t

Map function on immediate subterms

val iter_dag : t -> (t -> unit) -> unit
module Tbl : CCHashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/T/Ty/index.html b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/T/Ty/index.html new file mode 100644 index 00000000..486c00c6 --- /dev/null +++ b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/T/Ty/index.html @@ -0,0 +1,2 @@ + +Ty (sidekick.Sidekick_th_bool_static.Make.1-A.S.T.Ty)

Module T.Ty

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type state
val bool : state -> t
val is_bool : t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/T/index.html b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/T/index.html new file mode 100644 index 00000000..88bc3f3f --- /dev/null +++ b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/T/index.html @@ -0,0 +1,2 @@ + +T (sidekick.Sidekick_th_bool_static.Make.1-A.S.T)

Module S.T

module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Unknown/index.html b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Unknown/index.html index 65b8ccaf..c0006c2c 100644 --- a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Unknown/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Unknown/index.html @@ -1,2 +1,2 @@ -Unknown (sidekick.Sidekick_th_bool_static.Make.1-A.S.Unknown)

Module S.Unknown

type t
val pp : t CCFormat.printer
\ No newline at end of file +Unknown (sidekick.Sidekick_th_bool_static.Make.1-A.S.Unknown)

Module S.Unknown

type t
val pp : t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Value/index.html b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Value/index.html deleted file mode 100644 index 60c579f2..00000000 --- a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Value/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Value (sidekick.Sidekick_th_bool_static.Make.1-A.S.Value)

Module S.Value

Semantic values

type t
val equal : t -> t -> bool
val hash : t -> int
val ty : t -> ty
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/index.html b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/index.html index d2f7be5b..c497d17f 100644 --- a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/index.html @@ -1,2 +1,2 @@ -S (sidekick.Sidekick_th_bool_static.Make.1-A.S)

Module 1-A.S

module CC_A : Sidekick_core.CC_ARG with module A = A
module Solver_internal : Sidekick_core.SOLVER_INTERNAL with module A = A and module CC_A = CC_A

Internal solver, available to theories.

module Lit = Solver_internal.Lit
type t
type solver = t
type term = A.Term.t
type ty = A.Ty.t
type lit = Solver_internal.Lit.t
type lemma = A.Proof.t
module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

val mk_theory : name:string -> create_and_setup:(Solver_internal.t -> 'th) -> ?⁠push_level:('th -> unit) -> ?⁠pop_levels:('th -> int -> unit) -> unit -> theory

Helper to create a theory

module Atom : sig ... end
module Value : sig ... end
module Model : sig ... end
module Unknown : sig ... end
module Proof : sig ... end
type proof = Proof.t

Main API

val stats : t -> Sidekick_util.Stat.t
val tst : t -> A.Term.state
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠size:[ `Big | `Tiny | `Small ] -> ?⁠store_proof:bool -> theories:theory list -> A.Term.state -> unit -> t

Create a new solver.

parameter theories

theories to load from the start.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val mk_atom_lit : t -> lit -> Atom.t
val mk_atom_t : t -> ?⁠sign:bool -> term -> Atom.t
val add_clause : t -> Atom.t Sidekick_util.IArray.t -> unit
val add_clause_l : t -> Atom.t list -> unit
type res =
| Sat of Model.t
| Unsat of {
proof : proof option;
unsat_core : Atom.t list lazy_t;
}
| Unknown of Unknown.t

Result of solving for the current set of clauses

val solve : ?⁠on_exit:(unit -> unit) list -> ?⁠check:bool -> assumptions:Atom.t list -> t -> res

solve s checks the satisfiability of the statement added so far to s

parameter check

if true, the model is checked before returning

parameter assumptions

a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

parameter on_exit

functions to be run before this returns

val pp_term_graph : t CCFormat.printer
val pp_stats : t CCFormat.printer
\ No newline at end of file +S (sidekick.Sidekick_th_bool_static.Make.1-A.S)

Module 1-A.S

module Lit : Sidekick_core.LIT with module T = T
module Solver_internal : Sidekick_core.SOLVER_INTERNAL with module T = T and module P = P and module Lit = Lit

Internal solver, available to theories.

type t
type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t
type lemma = P.t
module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

type 'a theory_p = (module THEORY with type t = 'a)

A theory that can be used for this particular solver, with state of type 'a.

val mk_theory : name:string -> create_and_setup:(Solver_internal.t -> 'th) -> ?⁠push_level:('th -> unit) -> ?⁠pop_levels:('th -> int -> unit) -> unit -> theory

Helper to create a theory

module Atom : sig ... end
module Model : sig ... end
module Unknown : sig ... end
module Proof : sig ... end
type proof = Proof.t

Main API

val stats : t -> Sidekick_util.Stat.t
val tst : t -> T.Term.state
val ty_st : t -> T.Ty.state
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠size:[ `Big | `Tiny | `Small ] -> ?⁠store_proof:bool -> theories:theory list -> T.Term.state -> T.Ty.state -> unit -> t

Create a new solver.

parameter theories

theories to load from the start.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val add_theory_p : t -> 'a theory_p -> 'a

Add the given theory and obtain its state

val add_theory_l : t -> theory list -> unit
val mk_atom_lit : t -> lit -> Atom.t
val mk_atom_t : t -> ?⁠sign:bool -> term -> Atom.t
val add_clause : t -> Atom.t Sidekick_util.IArray.t -> unit
val add_clause_l : t -> Atom.t list -> unit
type res =
| Sat of Model.t
| Unsat of {
proof : proof option lazy_t;
unsat_core : Atom.t list lazy_t;
}
| Unknown of Unknown.t

Result of solving for the current set of clauses

val solve : ?⁠on_exit:(unit -> unit) list -> ?⁠check:bool -> ?⁠on_progress:(t -> unit) -> assumptions:Atom.t list -> t -> res

solve s checks the satisfiability of the statement added so far to s

parameter check

if true, the model is checked before returning

parameter assumptions

a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

parameter on_exit

functions to be run before this returns

val pp_stats : t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/module-type-THEORY/index.html b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/module-type-THEORY/index.html index a0b2221a..2da42b78 100644 --- a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/module-type-THEORY/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/module-type-THEORY/index.html @@ -1,2 +1,2 @@ -THEORY (sidekick.Sidekick_th_bool_static.Make.1-A.S.THEORY)

Module type S.THEORY

A theory

Theories are abstracted over the concrete implementation of the solver, so they can work with any implementation.

Typically a theory should be a functor taking an argument containing a SOLVER_INTERNAL and some additional views on terms, literals, etc. that are specific to the theory (e.g. to map terms to linear expressions). The theory can then be instantiated on any kind of solver for any term representation that also satisfies the additional theory-specific requirements. Instantiated theories (ie values of type Sidekick_core.SOLVER.theory) can be added to the solver.

type t

The theory's state

val name : string

Name of the theory

val create_and_setup : Solver_internal.t -> t

Instantiate the theory's state for the given (internal) solver, register callbacks, create keys, etc.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Pop backtracking levels, restoring the theory to its former state

\ No newline at end of file +THEORY (sidekick.Sidekick_th_bool_static.Make.1-A.S.THEORY)

Module type S.THEORY

A theory

Theories are abstracted over the concrete implementation of the solver, so they can work with any implementation.

Typically a theory should be a functor taking an argument containing a SOLVER_INTERNAL or even a full SOLVER, and some additional views on terms, literals, etc. that are specific to the theory (e.g. to map terms to linear expressions). The theory can then be instantiated on any kind of solver for any term representation that also satisfies the additional theory-specific requirements. Instantiated theories (ie values of type Sidekick_core.SOLVER.theory) can be added to the solver.

type t

The theory's state

val name : string

Name of the theory

val create_and_setup : Solver_internal.t -> t

Instantiate the theory's state for the given (internal) solver, register callbacks, create keys, etc.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Pop backtracking levels, restoring the theory to its former state

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/index.html b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/index.html index afa9702f..85a8f1ea 100644 --- a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/index.html @@ -1,2 +1,2 @@ -1-A (sidekick.Sidekick_th_bool_static.Make.1-A)

Parameter Make.1-A

type term = S.A.Term.t
val view_as_bool : term -> term bool_view

Project the term into the boolean view

val mk_bool : S.A.Term.state -> term bool_view -> term

Make a term from the given boolean view

module Gensym : sig ... end
\ No newline at end of file +1-A (sidekick.Sidekick_th_bool_static.Make.1-A)

Parameter Make.1-A

type term = S.T.Term.t
val view_as_bool : term -> (termterm Iter.t) bool_view

Project the term into the boolean view

val mk_bool : S.T.Term.state -> (termterm Sidekick_util.IArray.t) bool_view -> term

Make a term from the given boolean view

val check_congruence_classes : bool

Configuration: add final-check handler to verify if new boolean formulas are present in the congruence closure. Only enable if some theories are susceptible to create boolean formulas during the proof search.

module Gensym : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/Make/index.html b/dev/sidekick/Sidekick_th_bool_static/Make/index.html index 936f1209..27d7c40b 100644 --- a/dev/sidekick/Sidekick_th_bool_static/Make/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/Make/index.html @@ -1,2 +1,2 @@ -Make (sidekick.Sidekick_th_bool_static.Make)

Module Sidekick_th_bool_static.Make

Parameters

Signature

module A = A
module T = A.S.A.Term
type state
val create : T.state -> state
val simplify : state -> SI.simplify_hook

Simplify given term

val cnf : state -> SI.preprocess_hook

add clauses for the booleans within the term.

val theory : A.S.theory
\ No newline at end of file +Make (sidekick.Sidekick_th_bool_static.Make)

Module Sidekick_th_bool_static.Make

Parameters

Signature

module A = A
type state
val create : A.S.T.Term.state -> A.S.T.Ty.state -> state
val simplify : state -> A.S.Solver_internal.simplify_hook

Simplify given term

val cnf : state -> A.S.Solver_internal.preprocess_hook

add clauses for the booleans within the term.

val theory : A.S.theory
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/index.html b/dev/sidekick/Sidekick_th_bool_static/index.html index a3a6c8a9..c410d494 100644 --- a/dev/sidekick/Sidekick_th_bool_static/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/index.html @@ -1,2 +1,2 @@ -Sidekick_th_bool_static (sidekick.Sidekick_th_bool_static)

Module Sidekick_th_bool_static

Signatures for booleans

type 'a bool_view =
| B_bool of bool
| B_not of 'a
| B_and of 'a Sidekick_util.IArray.t
| B_or of 'a Sidekick_util.IArray.t
| B_imply of 'a Sidekick_util.IArray.t * 'a
| B_equiv of 'a * 'a
| B_eq of 'a * 'a
| B_ite of 'a * 'a * 'a
| B_atom of 'a
module type ARG = sig ... end
module type S = sig ... end
module Make : functor (A : ARG) -> S with module A = A
\ No newline at end of file +Sidekick_th_bool_static (sidekick.Sidekick_th_bool_static)

Module Sidekick_th_bool_static

Signatures for booleans

type ('a, 'args) bool_view =
| B_bool of bool
| B_not of 'a
| B_and of 'args
| B_or of 'args
| B_imply of 'args * 'a
| B_equiv of 'a * 'a
| B_xor of 'a * 'a
| B_eq of 'a * 'a
| B_neq of 'a * 'a
| B_ite of 'a * 'a * 'a
| B_opaque_bool of 'a
| B_atom of 'a
module type ARG = sig ... end
module type S = sig ... end
module Make : functor (A : ARG) -> S with module A = A
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/Gensym/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/Gensym/index.html index 759e506d..8288d7f9 100644 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/Gensym/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/Gensym/index.html @@ -1,2 +1,2 @@ -Gensym (sidekick.Sidekick_th_bool_static.ARG.Gensym)

Module ARG.Gensym

type t
val create : S.A.Term.state -> t
val fresh_term : t -> pre:string -> S.A.Ty.t -> term

Make a fresh term of the given type

\ No newline at end of file +Gensym (sidekick.Sidekick_th_bool_static.ARG.Gensym)

Module ARG.Gensym

type t
val create : S.T.Term.state -> t
val fresh_term : t -> pre:string -> S.T.Ty.t -> term

Make a fresh term of the given type

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/A/Fun/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/A/Fun/index.html deleted file mode 100644 index 5418d258..00000000 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/A/Fun/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Fun (sidekick.Sidekick_th_bool_static.ARG.S.A.Fun)

Module A.Fun

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/A/Proof/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/A/Proof/index.html deleted file mode 100644 index 72ccb841..00000000 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/A/Proof/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Proof (sidekick.Sidekick_th_bool_static.ARG.S.A.Proof)

Module A.Proof

type t
val pp : t Sidekick_core.Fmt.printer
val default : t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/A/Term/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/A/Term/index.html deleted file mode 100644 index 562a94d1..00000000 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/A/Term/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Term (sidekick.Sidekick_th_bool_static.ARG.S.A.Term)

Module A.Term

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type state
val ty : t -> Ty.t
val bool : state -> bool -> t
val as_bool : t -> bool option
val abs : state -> t -> t * bool
val map_shallow : state -> (t -> t) -> t -> t

Map function on immediate subterms

val iter_dag : t -> (t -> unit) -> unit
module Tbl : CCHashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/A/Ty/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/A/Ty/index.html deleted file mode 100644 index 4ff575c0..00000000 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/A/Ty/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Ty (sidekick.Sidekick_th_bool_static.ARG.S.A.Ty)

Module A.Ty

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
val bool : t
val is_bool : t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/A/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/A/index.html deleted file mode 100644 index a28c72a8..00000000 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/A/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -A (sidekick.Sidekick_th_bool_static.ARG.S.A)

Module S.A

include Sidekick_core.TERM
module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
module Proof : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Atom/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Atom/index.html index 60d42cdf..7c798b3d 100644 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Atom/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Atom/index.html @@ -1,2 +1,2 @@ -Atom (sidekick.Sidekick_th_bool_static.ARG.S.Atom)

Module S.Atom

Boolean Atoms

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t CCFormat.printer
\ No newline at end of file +Atom (sidekick.Sidekick_th_bool_static.ARG.S.Atom)

Module S.Atom

Boolean Atoms

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t CCFormat.printer
val neg : t -> t
val formula : t -> lit
val sign : t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/CC_A/Actions/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/CC_A/Actions/index.html deleted file mode 100644 index ce6ed5d7..00000000 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/CC_A/Actions/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Actions (sidekick.Sidekick_th_bool_static.ARG.S.CC_A.Actions)

Module CC_A.Actions

type t
val raise_conflict : t -> Lit.t list -> A.Proof.t -> 'a
val propagate : t -> Lit.t -> reason:(unit -> Lit.t list) -> A.Proof.t -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/CC_A/Lit/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/CC_A/Lit/index.html deleted file mode 100644 index e5cd75c5..00000000 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/CC_A/Lit/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Lit (sidekick.Sidekick_th_bool_static.ARG.S.CC_A.Lit)

Module CC_A.Lit

type t
val term : t -> A.Term.t
val sign : t -> bool
val neg : t -> t
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/CC_A/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/CC_A/index.html deleted file mode 100644 index b213ce94..00000000 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/CC_A/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -CC_A (sidekick.Sidekick_th_bool_static.ARG.S.CC_A)

Module S.CC_A

module A = A
val cc_view : A.Term.t -> (A.Fun.tA.Term.tA.Term.t Iter.t) Sidekick_core.CC_view.t

View the term through the lens of the congruence closure

module Lit : sig ... end
module Actions : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Lit/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Lit/index.html new file mode 100644 index 00000000..3fb6198c --- /dev/null +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Lit/index.html @@ -0,0 +1,2 @@ + +Lit (sidekick.Sidekick_th_bool_static.ARG.S.Lit)

Module S.Lit

module T = T
type t
val term : t -> T.Term.t
val sign : t -> bool
val neg : t -> t
val abs : t -> t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Model/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Model/index.html index a41034f2..cd40b934 100644 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Model/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Model/index.html @@ -1,2 +1,2 @@ -Model (sidekick.Sidekick_th_bool_static.ARG.S.Model)

Module S.Model

type t
val empty : t
val mem : term -> t -> bool
val find : term -> t -> Value.t option
val eval : t -> term -> Value.t option
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Model (sidekick.Sidekick_th_bool_static.ARG.S.Model)

Module S.Model

type t
val empty : t
val mem : t -> term -> bool
val find : t -> term -> term option
val eval : t -> term -> term option
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/P/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/P/index.html new file mode 100644 index 00000000..a6488c37 --- /dev/null +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/P/index.html @@ -0,0 +1,2 @@ + +P (sidekick.Sidekick_th_bool_static.ARG.S.P)

Module S.P

type t
val pp : t Sidekick_core.Fmt.printer
val default : t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Proof/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Proof/index.html index 6fcff7ef..80fc5443 100644 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Proof/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Proof/index.html @@ -1,2 +1,2 @@ -Proof (sidekick.Sidekick_th_bool_static.ARG.S.Proof)

Module S.Proof

type t
val check : t -> unit
val pp_dot : t Sidekick_core.Fmt.printer
\ No newline at end of file +Proof (sidekick.Sidekick_th_bool_static.ARG.S.Proof)

Module S.Proof

type t
val check : t -> unit
val pp_dot : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Solver_internal/CC/Actions/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Solver_internal/CC/Actions/index.html new file mode 100644 index 00000000..eb3d8aef --- /dev/null +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Solver_internal/CC/Actions/index.html @@ -0,0 +1,2 @@ + +Actions (sidekick.Sidekick_th_bool_static.ARG.S.Solver_internal.CC.Actions)

Module CC.Actions

module T = T
module P = P
module Lit = Lit
type t = actions
val raise_conflict : t -> Lit.t list -> P.t -> 'a
val propagate : t -> Lit.t -> reason:(unit -> Lit.t list) -> P.t -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Solver_internal/CC/Expl/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Solver_internal/CC/Expl/index.html index 5ef34833..b57c3ee3 100644 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Solver_internal/CC/Expl/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Solver_internal/CC/Expl/index.html @@ -1,2 +1,2 @@ -Expl (sidekick.Sidekick_th_bool_static.ARG.S.Solver_internal.CC.Expl)

Module CC.Expl

type t
val pp : t Sidekick_core.Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
\ No newline at end of file +Expl (sidekick.Sidekick_th_bool_static.ARG.S.Solver_internal.CC.Expl)

Module CC.Expl

type t
val pp : t Sidekick_core.Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
val mk_theory : t -> t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Solver_internal/CC/N/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Solver_internal/CC/N/index.html index 8db803ea..f3cfa369 100644 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Solver_internal/CC/N/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Solver_internal/CC/N/index.html @@ -1,2 +1,2 @@ -N (sidekick.Sidekick_th_bool_static.ARG.S.Solver_internal.CC.N)

Module CC.N

An equivalence class is a set of terms that are currently equal in the partial model built by the solver. The class is represented by a collection of nodes, one of which is distinguished and is called the "representative".

All information pertaining to the whole equivalence class is stored in this representative's node.

When two classes become equal (are "merged"), one of the two representatives is picked as the representative of the new class. The new class contains the union of the two old classes' nodes.

We also allow theories to store additional information in the representative. This information can be used when two classes are merged, to detect conflicts and solve equations à la Shostak.

type t
val term : t -> term
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
val is_root : t -> bool

Is the node a root (ie the representative of its class)?

val iter_class : t -> t Iter.t

Traverse the congruence class. Precondition: is_root n (see find below)

val iter_parents : t -> t Iter.t

Traverse the parents of the class. Precondition: is_root n (see find below)

\ No newline at end of file +N (sidekick.Sidekick_th_bool_static.ARG.S.Solver_internal.CC.N)

Module CC.N

An equivalence class is a set of terms that are currently equal in the partial model built by the solver. The class is represented by a collection of nodes, one of which is distinguished and is called the "representative".

All information pertaining to the whole equivalence class is stored in this representative's node.

When two classes become equal (are "merged"), one of the two representatives is picked as the representative of the new class. The new class contains the union of the two old classes' nodes.

We also allow theories to store additional information in the representative. This information can be used when two classes are merged, to detect conflicts and solve equations à la Shostak.

type t
val term : t -> term
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
val is_root : t -> bool

Is the node a root (ie the representative of its class)?

val iter_class : t -> t Iter.t

Traverse the congruence class. Precondition: is_root n (see find below)

val iter_parents : t -> t Iter.t

Traverse the parents of the class. Precondition: is_root n (see find below)

type bitfield

A field in the bitfield of this node. This should only be allocated when a theory is initialized.

All fields are initially 0, are backtracked automatically, and are merged automatically when classes are merged.

val get_field : bitfield -> t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Solver_internal/CC/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Solver_internal/CC/index.html index ba7a4bb4..af3b7943 100644 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Solver_internal/CC/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Solver_internal/CC/index.html @@ -1,2 +1,2 @@ -CC (sidekick.Sidekick_th_bool_static.ARG.S.Solver_internal.CC)

Module Solver_internal.CC

module CC_A = CC_A
module A = CC_A.A
type term_state = A.Term.state
type term = A.Term.t
type fun_ = A.Fun.t
type lit = CC_A.Lit.t
type proof = A.Proof.t
type actions = CC_A.Actions.t
type t

Global state of the congruence closure

module N : sig ... end

An equivalence class is a set of terms that are currently equal in the partial model built by the solver. The class is represented by a collection of nodes, one of which is distinguished and is called the "representative".

module Expl : sig ... end
type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t
val term_state : t -> term_state
val find : t -> node -> repr

Current representative

val add_term : t -> term -> node

Add the term to the congruence closure, if not present already. Will be backtracked.

type ev_on_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit
type ev_on_new_term = t -> N.t -> term -> unit
type ev_on_conflict = t -> lit list -> unit
type ev_on_propagate = t -> lit -> (unit -> lit list) -> unit
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_merge:ev_on_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠size:[ `Small | `Big ] -> term_state -> t

Create a new congruence closure.

val on_merge : t -> ev_on_merge -> unit

Add a function to be called when two classes are merged

val on_new_term : t -> ev_on_new_term -> unit

Add a function to be called when a new node is created

val on_conflict : t -> ev_on_conflict -> unit

Called when the congruence closure finds a conflict

val on_propagate : t -> ev_on_propagate -> unit

Called when the congruence closure propagates a literal

val set_as_lit : t -> N.t -> lit -> unit

map the given node to a literal.

val find_t : t -> term -> repr

Current representative of the term.

raises Not_found

if the term is not already add-ed.

val add_seq : t -> term Iter.t -> unit

Add a sequence of terms to the congruence closure

val all_classes : t -> repr Iter.t

All current classes. This is costly, only use if there is no other solution

val assert_lit : t -> lit -> unit

Given a literal, assume it in the congruence closure and propagate its consequences. Will be backtracked.

Useful for the theory combination or the SAT solver's functor

val assert_lits : t -> lit Iter.t -> unit

Addition of many literals

val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given explanation it must be a theory tautology that expl ==> absurd. To be used in theories.

val merge : t -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val check : t -> actions -> unit

Perform all pending operations done via assert_eq, assert_lit, etc. Will use the actions to propagate literals, declare conflicts, etc.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Restore to state n calls to push_level earlier. Used during backtracking.

val get_model : t -> N.t Iter.t Iter.t

get all the equivalence classes so they can be merged in the model

\ No newline at end of file +CC (sidekick.Sidekick_th_bool_static.ARG.S.Solver_internal.CC)

Module Solver_internal.CC

module T = T
module P = P
module Lit = Lit
module Actions : Sidekick_core.CC_ACTIONS with module T = T and module Lit = Lit and module P = P and type t = actions
type term_state = T.Term.state
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type proof = P.t
type actions = Actions.t
type t

Global state of the congruence closure

module N : sig ... end

An equivalence class is a set of terms that are currently equal in the partial model built by the solver. The class is represented by a collection of nodes, one of which is distinguished and is called the "representative".

module Expl : sig ... end
type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t
val term_state : t -> term_state
val find : t -> node -> repr

Current representative

val add_term : t -> term -> node

Add the term to the congruence closure, if not present already. Will be backtracked.

val mem_term : t -> term -> bool

Returns true if the term is explicitly present in the congruence closure

type ev_on_pre_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit
type ev_on_post_merge = t -> actions -> N.t -> N.t -> unit
type ev_on_new_term = t -> N.t -> term -> unit
type ev_on_conflict = t -> th:bool -> lit list -> unit
type ev_on_propagate = t -> lit -> (unit -> lit list) -> unit
type ev_on_is_subterm = N.t -> term -> unit
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_pre_merge:ev_on_pre_merge list -> ?⁠on_post_merge:ev_on_post_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠on_is_subterm:ev_on_is_subterm list -> ?⁠size:[ `Small | `Big ] -> term_state -> t

Create a new congruence closure.

val allocate_bitfield : descr:string -> t -> N.bitfield

Allocate a new bitfield for the nodes. See N.bitfield.

val set_bitfield : t -> N.bitfield -> bool -> N.t -> unit

Set the bitfield for the node. This will be backtracked. See N.bitfield.

val on_pre_merge : t -> ev_on_pre_merge -> unit

Add a function to be called when two classes are merged

val on_post_merge : t -> ev_on_post_merge -> unit

Add a function to be called when two classes are merged

val on_new_term : t -> ev_on_new_term -> unit

Add a function to be called when a new node is created

val on_conflict : t -> ev_on_conflict -> unit

Called when the congruence closure finds a conflict

val on_propagate : t -> ev_on_propagate -> unit

Called when the congruence closure propagates a literal

val on_is_subterm : t -> ev_on_is_subterm -> unit

Called on terms that are subterms of function symbols

val set_as_lit : t -> N.t -> lit -> unit

map the given node to a literal.

val find_t : t -> term -> repr

Current representative of the term.

raises Not_found

if the term is not already add-ed.

val add_seq : t -> term Iter.t -> unit

Add a sequence of terms to the congruence closure

val all_classes : t -> repr Iter.t

All current classes. This is costly, only use if there is no other solution

val assert_lit : t -> lit -> unit

Given a literal, assume it in the congruence closure and propagate its consequences. Will be backtracked.

Useful for the theory combination or the SAT solver's functor

val assert_lits : t -> lit Iter.t -> unit

Addition of many literals

val explain_eq : t -> N.t -> N.t -> lit list

Explain why the two nodes are equal. Fails if they are not, in an unspecified way

val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given explanation it must be a theory tautology that expl ==> absurd. To be used in theories.

val n_true : t -> N.t
val n_false : t -> N.t
val n_bool : t -> bool -> N.t
val merge : t -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val merge_t : t -> term -> term -> Expl.t -> unit

Shortcut for adding + merging

val check : t -> actions -> unit

Perform all pending operations done via assert_eq, assert_lit, etc. Will use the actions to propagate literals, declare conflicts, etc.

val new_merges : t -> bool

Called after check, returns true if some pairs of classes were merged.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Restore to state n calls to push_level earlier. Used during backtracking.

val get_model : t -> N.t Iter.t Iter.t

get all the equivalence classes so they can be merged in the model

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Solver_internal/Lit/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Solver_internal/Lit/index.html deleted file mode 100644 index 048a8e11..00000000 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Solver_internal/Lit/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Lit (sidekick.Sidekick_th_bool_static.ARG.S.Solver_internal.Lit)

Module Solver_internal.Lit

Literals

A literal is a (preprocessed) term along with its sign. It is directly manipulated by the SAT solver.

type t
val term : t -> term
val sign : t -> bool
val neg : t -> t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Solver_internal/Simplify/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Solver_internal/Simplify/index.html index dab6b6e2..756e1e17 100644 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Solver_internal/Simplify/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Solver_internal/Simplify/index.html @@ -1,2 +1,2 @@ -Simplify (sidekick.Sidekick_th_bool_static.ARG.S.Solver_internal.Simplify)

Module Solver_internal.Simplify

type t
val tst : t -> term_state
val clear : t -> unit

Reset internal cache, etc.

type hook = t -> term -> term option

Given a term, try to simplify it. Return None if it didn't change. Can also add clauses to the simplifier.

val normalize : t -> term -> term

Normalize a term using all the hooks.

\ No newline at end of file +Simplify (sidekick.Sidekick_th_bool_static.ARG.S.Solver_internal.Simplify)

Module Solver_internal.Simplify

type t
val tst : t -> term_state
val ty_st : t -> ty_state
val clear : t -> unit

Reset internal cache, etc.

type hook = t -> term -> term option

Given a term, try to simplify it. Return None if it didn't change.

val normalize : t -> term -> term

Normalize a term using all the hooks.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Solver_internal/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Solver_internal/index.html index a8547dbe..09453386 100644 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Solver_internal/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Solver_internal/index.html @@ -1,2 +1,2 @@ -Solver_internal (sidekick.Sidekick_th_bool_static.ARG.S.Solver_internal)

Module S.Solver_internal

Internal solver, available to theories.

module A = A
module CC_A = CC_A
module CC : Sidekick_core.CC_S with module CC_A = CC_A
type ty = A.Ty.t
type term = A.Term.t
type term_state = A.Term.state
type proof = A.Proof.t
type t

Main type for a solver

type solver = t
module Expl = CC.Expl
module N = CC.N
val tst : t -> term_state
val cc : t -> CC.t

Congruence closure for this solver

module Lit : sig ... end
type lit = Lit.t

Simplifiers

module Simplify : sig ... end
type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit
val simplifier : t -> Simplify.t
val simp_t : t -> term -> term

hooks for the theory

type actions
val propagate : t -> actions -> lit -> reason:(unit -> lit list) -> A.Proof.t -> unit
val raise_conflict : t -> actions -> lit list -> A.Proof.t -> 'a

Give a conflict clause to the solver

val propagate : t -> actions -> lit -> (unit -> lit list) -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> actions -> lit -> lit list -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> actions -> lit list -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : t -> actions -> lit list -> unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> actions -> ?⁠sign:bool -> term -> lit

Create a literal

val add_lit : t -> actions -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value

val add_lit_t : t -> actions -> ?⁠sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> N.t -> N.t

Find representative of the node

val cc_merge : t -> actions -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> actions -> term -> term -> Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> N.t

Add/retrieve congruence closure node for this term. To be used in theories

val on_cc_merge : t -> (CC.t -> actions -> N.t -> N.t -> Expl.t -> unit) -> unit

Callback for when two classes containing data for this key are merged

val on_cc_new_term : t -> (CC.t -> N.t -> term -> unit) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_conflict : t -> (CC.t -> lit list -> unit) -> unit

Callback called on every CC conflict

val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list) -> unit) -> unit

Callback called on every CC propagation

val on_partial_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

type preprocess_hook = t -> mk_lit:(term -> lit) -> add_clause:(lit list -> unit) -> term -> term option

Given a term, try to preprocess it. Return None if it didn't change. Can also add clauses to define new terms.

val add_preprocess : t -> preprocess_hook -> unit
\ No newline at end of file +Solver_internal (sidekick.Sidekick_th_bool_static.ARG.S.Solver_internal)

Module S.Solver_internal

Internal solver, available to theories.

module T = T
module P = P
type ty = T.Ty.t
type term = T.Term.t
type term_state = T.Term.state
type ty_state = T.Ty.state
type proof = P.t
type t

Main type for a solver

type solver = t
val tst : t -> term_state
val ty_st : t -> ty_state
val stats : t -> Sidekick_util.Stat.t

Actions for the theories

type actions
module Lit = Lit
type lit = Lit.t

Congruence Closure

module CC : Sidekick_core.CC_S with module T = T and module P = P and module Lit = Lit and type Actions.t = actions
val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end
type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit
val simplifier : t -> Simplify.t
val simp_t : t -> term -> term

hooks for the theory

val propagate : t -> actions -> lit -> reason:(unit -> lit list) -> proof -> unit

Propagate a literal for a reason. This is similar to asserting the clause reason => lit, but more lightweight, and in a way that is backtrackable.

val raise_conflict : t -> actions -> lit list -> proof -> 'a

Give a conflict clause to the solver

val push_decision : t -> actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : t -> actions -> lit -> (unit -> lit list) -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> actions -> lit -> lit list -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> actions -> lit list -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : t -> actions -> lit list -> unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> actions -> ?⁠sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val preprocess_term : t -> add_clause:(Lit.t list -> unit) -> term -> term

Preprocess a term.

val add_lit : t -> actions -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value

val add_lit_t : t -> actions -> ?⁠sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit

Callback called on every CC conflict

val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list) -> unit) -> unit

Callback called on every CC propagation

val on_partial_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

type preprocess_hook = t -> mk_lit:(term -> lit) -> add_clause:(lit list -> unit) -> term -> term option

Given a term, try to preprocess it. Return None if it didn't change. Can also add clauses to define new terms.

parameter mk_lit

creates a new literal for a boolean term.

parameter add_clause

pushes a new clause into the SAT solver.

val on_preprocess : t -> preprocess_hook -> unit

Model production

type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option

A model-production hook. It takes the solver, a class, and returns a term for this class.

val on_model_gen : t -> model_hook -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/T/Fun/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/T/Fun/index.html new file mode 100644 index 00000000..87981994 --- /dev/null +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/T/Fun/index.html @@ -0,0 +1,2 @@ + +Fun (sidekick.Sidekick_th_bool_static.ARG.S.T.Fun)

Module T.Fun

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/T/Term/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/T/Term/index.html new file mode 100644 index 00000000..a06397be --- /dev/null +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/T/Term/index.html @@ -0,0 +1,2 @@ + +Term (sidekick.Sidekick_th_bool_static.ARG.S.T.Term)

Module T.Term

type t
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type state
val ty : t -> Ty.t
val bool : state -> bool -> t
val as_bool : t -> bool option
val abs : state -> t -> t * bool
val map_shallow : state -> (t -> t) -> t -> t

Map function on immediate subterms

val iter_dag : t -> (t -> unit) -> unit
module Tbl : CCHashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/T/Ty/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/T/Ty/index.html new file mode 100644 index 00000000..3386dfcc --- /dev/null +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/T/Ty/index.html @@ -0,0 +1,2 @@ + +Ty (sidekick.Sidekick_th_bool_static.ARG.S.T.Ty)

Module T.Ty

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type state
val bool : state -> t
val is_bool : t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/T/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/T/index.html new file mode 100644 index 00000000..698d5c1b --- /dev/null +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/T/index.html @@ -0,0 +1,2 @@ + +T (sidekick.Sidekick_th_bool_static.ARG.S.T)

Module S.T

module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Unknown/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Unknown/index.html index 0f37cbe9..4f929614 100644 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Unknown/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Unknown/index.html @@ -1,2 +1,2 @@ -Unknown (sidekick.Sidekick_th_bool_static.ARG.S.Unknown)

Module S.Unknown

type t
val pp : t CCFormat.printer
\ No newline at end of file +Unknown (sidekick.Sidekick_th_bool_static.ARG.S.Unknown)

Module S.Unknown

type t
val pp : t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Value/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Value/index.html deleted file mode 100644 index ef8c7c5c..00000000 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Value/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Value (sidekick.Sidekick_th_bool_static.ARG.S.Value)

Module S.Value

Semantic values

type t
val equal : t -> t -> bool
val hash : t -> int
val ty : t -> ty
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/index.html index f25a7e85..91d8f019 100644 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/index.html @@ -1,2 +1,2 @@ -S (sidekick.Sidekick_th_bool_static.ARG.S)

Module ARG.S

module CC_A : Sidekick_core.CC_ARG with module A = A
module Solver_internal : Sidekick_core.SOLVER_INTERNAL with module A = A and module CC_A = CC_A

Internal solver, available to theories.

module Lit = Solver_internal.Lit
type t
type solver = t
type term = A.Term.t
type ty = A.Ty.t
type lit = Solver_internal.Lit.t
type lemma = A.Proof.t
module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

val mk_theory : name:string -> create_and_setup:(Solver_internal.t -> 'th) -> ?⁠push_level:('th -> unit) -> ?⁠pop_levels:('th -> int -> unit) -> unit -> theory

Helper to create a theory

module Atom : sig ... end
module Value : sig ... end
module Model : sig ... end
module Unknown : sig ... end
module Proof : sig ... end
type proof = Proof.t

Main API

val stats : t -> Sidekick_util.Stat.t
val tst : t -> A.Term.state
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠size:[ `Big | `Tiny | `Small ] -> ?⁠store_proof:bool -> theories:theory list -> A.Term.state -> unit -> t

Create a new solver.

parameter theories

theories to load from the start.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val mk_atom_lit : t -> lit -> Atom.t
val mk_atom_t : t -> ?⁠sign:bool -> term -> Atom.t
val add_clause : t -> Atom.t Sidekick_util.IArray.t -> unit
val add_clause_l : t -> Atom.t list -> unit
type res =
| Sat of Model.t
| Unsat of {
proof : proof option;
unsat_core : Atom.t list lazy_t;
}
| Unknown of Unknown.t

Result of solving for the current set of clauses

val solve : ?⁠on_exit:(unit -> unit) list -> ?⁠check:bool -> assumptions:Atom.t list -> t -> res

solve s checks the satisfiability of the statement added so far to s

parameter check

if true, the model is checked before returning

parameter assumptions

a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

parameter on_exit

functions to be run before this returns

val pp_term_graph : t CCFormat.printer
val pp_stats : t CCFormat.printer
\ No newline at end of file +S (sidekick.Sidekick_th_bool_static.ARG.S)

Module ARG.S

module Lit : Sidekick_core.LIT with module T = T
module Solver_internal : Sidekick_core.SOLVER_INTERNAL with module T = T and module P = P and module Lit = Lit

Internal solver, available to theories.

type t
type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t
type lemma = P.t
module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

type 'a theory_p = (module THEORY with type t = 'a)

A theory that can be used for this particular solver, with state of type 'a.

val mk_theory : name:string -> create_and_setup:(Solver_internal.t -> 'th) -> ?⁠push_level:('th -> unit) -> ?⁠pop_levels:('th -> int -> unit) -> unit -> theory

Helper to create a theory

module Atom : sig ... end
module Model : sig ... end
module Unknown : sig ... end
module Proof : sig ... end
type proof = Proof.t

Main API

val stats : t -> Sidekick_util.Stat.t
val tst : t -> T.Term.state
val ty_st : t -> T.Ty.state
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠size:[ `Big | `Tiny | `Small ] -> ?⁠store_proof:bool -> theories:theory list -> T.Term.state -> T.Ty.state -> unit -> t

Create a new solver.

parameter theories

theories to load from the start.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val add_theory_p : t -> 'a theory_p -> 'a

Add the given theory and obtain its state

val add_theory_l : t -> theory list -> unit
val mk_atom_lit : t -> lit -> Atom.t
val mk_atom_t : t -> ?⁠sign:bool -> term -> Atom.t
val add_clause : t -> Atom.t Sidekick_util.IArray.t -> unit
val add_clause_l : t -> Atom.t list -> unit
type res =
| Sat of Model.t
| Unsat of {
proof : proof option lazy_t;
unsat_core : Atom.t list lazy_t;
}
| Unknown of Unknown.t

Result of solving for the current set of clauses

val solve : ?⁠on_exit:(unit -> unit) list -> ?⁠check:bool -> ?⁠on_progress:(t -> unit) -> assumptions:Atom.t list -> t -> res

solve s checks the satisfiability of the statement added so far to s

parameter check

if true, the model is checked before returning

parameter assumptions

a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

parameter on_exit

functions to be run before this returns

val pp_stats : t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/module-type-THEORY/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/module-type-THEORY/index.html index 3afaacdd..3eda44d3 100644 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/module-type-THEORY/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/module-type-THEORY/index.html @@ -1,2 +1,2 @@ -THEORY (sidekick.Sidekick_th_bool_static.ARG.S.THEORY)

Module type S.THEORY

A theory

Theories are abstracted over the concrete implementation of the solver, so they can work with any implementation.

Typically a theory should be a functor taking an argument containing a SOLVER_INTERNAL and some additional views on terms, literals, etc. that are specific to the theory (e.g. to map terms to linear expressions). The theory can then be instantiated on any kind of solver for any term representation that also satisfies the additional theory-specific requirements. Instantiated theories (ie values of type Sidekick_core.SOLVER.theory) can be added to the solver.

type t

The theory's state

val name : string

Name of the theory

val create_and_setup : Solver_internal.t -> t

Instantiate the theory's state for the given (internal) solver, register callbacks, create keys, etc.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Pop backtracking levels, restoring the theory to its former state

\ No newline at end of file +THEORY (sidekick.Sidekick_th_bool_static.ARG.S.THEORY)

Module type S.THEORY

A theory

Theories are abstracted over the concrete implementation of the solver, so they can work with any implementation.

Typically a theory should be a functor taking an argument containing a SOLVER_INTERNAL or even a full SOLVER, and some additional views on terms, literals, etc. that are specific to the theory (e.g. to map terms to linear expressions). The theory can then be instantiated on any kind of solver for any term representation that also satisfies the additional theory-specific requirements. Instantiated theories (ie values of type Sidekick_core.SOLVER.theory) can be added to the solver.

type t

The theory's state

val name : string

Name of the theory

val create_and_setup : Solver_internal.t -> t

Instantiate the theory's state for the given (internal) solver, register callbacks, create keys, etc.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Pop backtracking levels, restoring the theory to its former state

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/index.html index 2d3892c4..b6b6aefb 100644 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/index.html @@ -1,2 +1,2 @@ -ARG (sidekick.Sidekick_th_bool_static.ARG)

Module type Sidekick_th_bool_static.ARG

type term = S.A.Term.t
val view_as_bool : term -> term bool_view

Project the term into the boolean view

val mk_bool : S.A.Term.state -> term bool_view -> term

Make a term from the given boolean view

module Gensym : sig ... end
\ No newline at end of file +ARG (sidekick.Sidekick_th_bool_static.ARG)

Module type Sidekick_th_bool_static.ARG

type term = S.T.Term.t
val view_as_bool : term -> (termterm Iter.t) bool_view

Project the term into the boolean view

val mk_bool : S.T.Term.state -> (termterm Sidekick_util.IArray.t) bool_view -> term

Make a term from the given boolean view

val check_congruence_classes : bool

Configuration: add final-check handler to verify if new boolean formulas are present in the congruence closure. Only enable if some theories are susceptible to create boolean formulas during the proof search.

module Gensym : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/Gensym/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/Gensym/index.html index 6cc6f060..d0970f74 100644 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/Gensym/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/Gensym/index.html @@ -1,2 +1,2 @@ -Gensym (sidekick.Sidekick_th_bool_static.S.A.Gensym)

Module A.Gensym

type t
val create : S.A.Term.state -> t
val fresh_term : t -> pre:string -> S.A.Ty.t -> term

Make a fresh term of the given type

\ No newline at end of file +Gensym (sidekick.Sidekick_th_bool_static.S.A.Gensym)

Module A.Gensym

type t
val create : S.T.Term.state -> t
val fresh_term : t -> pre:string -> S.T.Ty.t -> term

Make a fresh term of the given type

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/A/Fun/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/A/Fun/index.html deleted file mode 100644 index fee13d34..00000000 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/A/Fun/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Fun (sidekick.Sidekick_th_bool_static.S.A.S.A.Fun)

Module A.Fun

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/A/Proof/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/A/Proof/index.html deleted file mode 100644 index 74179230..00000000 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/A/Proof/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Proof (sidekick.Sidekick_th_bool_static.S.A.S.A.Proof)

Module A.Proof

type t
val pp : t Sidekick_core.Fmt.printer
val default : t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/A/Term/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/A/Term/index.html deleted file mode 100644 index f0bd5a19..00000000 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/A/Term/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Term (sidekick.Sidekick_th_bool_static.S.A.S.A.Term)

Module A.Term

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type state
val ty : t -> Ty.t
val bool : state -> bool -> t
val as_bool : t -> bool option
val abs : state -> t -> t * bool
val map_shallow : state -> (t -> t) -> t -> t

Map function on immediate subterms

val iter_dag : t -> (t -> unit) -> unit
module Tbl : CCHashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/A/Ty/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/A/Ty/index.html deleted file mode 100644 index 5d225416..00000000 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/A/Ty/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Ty (sidekick.Sidekick_th_bool_static.S.A.S.A.Ty)

Module A.Ty

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
val bool : t
val is_bool : t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/A/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/A/index.html deleted file mode 100644 index 404602d8..00000000 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/A/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -A (sidekick.Sidekick_th_bool_static.S.A.S.A)

Module S.A

include Sidekick_core.TERM
module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
module Proof : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Atom/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Atom/index.html index 992930df..b0df5bb7 100644 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Atom/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Atom/index.html @@ -1,2 +1,2 @@ -Atom (sidekick.Sidekick_th_bool_static.S.A.S.Atom)

Module S.Atom

Boolean Atoms

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t CCFormat.printer
\ No newline at end of file +Atom (sidekick.Sidekick_th_bool_static.S.A.S.Atom)

Module S.Atom

Boolean Atoms

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t CCFormat.printer
val neg : t -> t
val formula : t -> lit
val sign : t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/CC_A/Actions/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/CC_A/Actions/index.html deleted file mode 100644 index 5ce4c04c..00000000 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/CC_A/Actions/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Actions (sidekick.Sidekick_th_bool_static.S.A.S.CC_A.Actions)

Module CC_A.Actions

type t
val raise_conflict : t -> Lit.t list -> A.Proof.t -> 'a
val propagate : t -> Lit.t -> reason:(unit -> Lit.t list) -> A.Proof.t -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/CC_A/Lit/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/CC_A/Lit/index.html deleted file mode 100644 index cb43dbb7..00000000 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/CC_A/Lit/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Lit (sidekick.Sidekick_th_bool_static.S.A.S.CC_A.Lit)

Module CC_A.Lit

type t
val term : t -> A.Term.t
val sign : t -> bool
val neg : t -> t
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/CC_A/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/CC_A/index.html deleted file mode 100644 index b5cbc534..00000000 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/CC_A/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -CC_A (sidekick.Sidekick_th_bool_static.S.A.S.CC_A)

Module S.CC_A

module A = A
val cc_view : A.Term.t -> (A.Fun.tA.Term.tA.Term.t Iter.t) Sidekick_core.CC_view.t

View the term through the lens of the congruence closure

module Lit : sig ... end
module Actions : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Lit/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Lit/index.html new file mode 100644 index 00000000..bdde6612 --- /dev/null +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Lit/index.html @@ -0,0 +1,2 @@ + +Lit (sidekick.Sidekick_th_bool_static.S.A.S.Lit)

Module S.Lit

module T = T
type t
val term : t -> T.Term.t
val sign : t -> bool
val neg : t -> t
val abs : t -> t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Model/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Model/index.html index 4bb48add..f90dc343 100644 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Model/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Model/index.html @@ -1,2 +1,2 @@ -Model (sidekick.Sidekick_th_bool_static.S.A.S.Model)

Module S.Model

type t
val empty : t
val mem : term -> t -> bool
val find : term -> t -> Value.t option
val eval : t -> term -> Value.t option
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Model (sidekick.Sidekick_th_bool_static.S.A.S.Model)

Module S.Model

type t
val empty : t
val mem : t -> term -> bool
val find : t -> term -> term option
val eval : t -> term -> term option
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/P/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/P/index.html new file mode 100644 index 00000000..9a40686d --- /dev/null +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/P/index.html @@ -0,0 +1,2 @@ + +P (sidekick.Sidekick_th_bool_static.S.A.S.P)

Module S.P

type t
val pp : t Sidekick_core.Fmt.printer
val default : t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Proof/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Proof/index.html index 6d0a3f5a..9987fe66 100644 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Proof/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Proof/index.html @@ -1,2 +1,2 @@ -Proof (sidekick.Sidekick_th_bool_static.S.A.S.Proof)

Module S.Proof

type t
val check : t -> unit
val pp_dot : t Sidekick_core.Fmt.printer
\ No newline at end of file +Proof (sidekick.Sidekick_th_bool_static.S.A.S.Proof)

Module S.Proof

type t
val check : t -> unit
val pp_dot : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Solver_internal/CC/Actions/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Solver_internal/CC/Actions/index.html new file mode 100644 index 00000000..4b3135ca --- /dev/null +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Solver_internal/CC/Actions/index.html @@ -0,0 +1,2 @@ + +Actions (sidekick.Sidekick_th_bool_static.S.A.S.Solver_internal.CC.Actions)

Module CC.Actions

module T = T
module P = P
module Lit = Lit
type t = actions
val raise_conflict : t -> Lit.t list -> P.t -> 'a
val propagate : t -> Lit.t -> reason:(unit -> Lit.t list) -> P.t -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Solver_internal/CC/Expl/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Solver_internal/CC/Expl/index.html index 0da9d210..6cf7cdf7 100644 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Solver_internal/CC/Expl/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Solver_internal/CC/Expl/index.html @@ -1,2 +1,2 @@ -Expl (sidekick.Sidekick_th_bool_static.S.A.S.Solver_internal.CC.Expl)

Module CC.Expl

type t
val pp : t Sidekick_core.Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
\ No newline at end of file +Expl (sidekick.Sidekick_th_bool_static.S.A.S.Solver_internal.CC.Expl)

Module CC.Expl

type t
val pp : t Sidekick_core.Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
val mk_theory : t -> t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Solver_internal/CC/N/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Solver_internal/CC/N/index.html index fe26f4a1..c48b6021 100644 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Solver_internal/CC/N/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Solver_internal/CC/N/index.html @@ -1,2 +1,2 @@ -N (sidekick.Sidekick_th_bool_static.S.A.S.Solver_internal.CC.N)

Module CC.N

An equivalence class is a set of terms that are currently equal in the partial model built by the solver. The class is represented by a collection of nodes, one of which is distinguished and is called the "representative".

All information pertaining to the whole equivalence class is stored in this representative's node.

When two classes become equal (are "merged"), one of the two representatives is picked as the representative of the new class. The new class contains the union of the two old classes' nodes.

We also allow theories to store additional information in the representative. This information can be used when two classes are merged, to detect conflicts and solve equations à la Shostak.

type t
val term : t -> term
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
val is_root : t -> bool

Is the node a root (ie the representative of its class)?

val iter_class : t -> t Iter.t

Traverse the congruence class. Precondition: is_root n (see find below)

val iter_parents : t -> t Iter.t

Traverse the parents of the class. Precondition: is_root n (see find below)

\ No newline at end of file +N (sidekick.Sidekick_th_bool_static.S.A.S.Solver_internal.CC.N)

Module CC.N

An equivalence class is a set of terms that are currently equal in the partial model built by the solver. The class is represented by a collection of nodes, one of which is distinguished and is called the "representative".

All information pertaining to the whole equivalence class is stored in this representative's node.

When two classes become equal (are "merged"), one of the two representatives is picked as the representative of the new class. The new class contains the union of the two old classes' nodes.

We also allow theories to store additional information in the representative. This information can be used when two classes are merged, to detect conflicts and solve equations à la Shostak.

type t
val term : t -> term
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
val is_root : t -> bool

Is the node a root (ie the representative of its class)?

val iter_class : t -> t Iter.t

Traverse the congruence class. Precondition: is_root n (see find below)

val iter_parents : t -> t Iter.t

Traverse the parents of the class. Precondition: is_root n (see find below)

type bitfield

A field in the bitfield of this node. This should only be allocated when a theory is initialized.

All fields are initially 0, are backtracked automatically, and are merged automatically when classes are merged.

val get_field : bitfield -> t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Solver_internal/CC/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Solver_internal/CC/index.html index a4ac0416..d3b215ca 100644 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Solver_internal/CC/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Solver_internal/CC/index.html @@ -1,2 +1,2 @@ -CC (sidekick.Sidekick_th_bool_static.S.A.S.Solver_internal.CC)

Module Solver_internal.CC

module CC_A = CC_A
module A = CC_A.A
type term_state = A.Term.state
type term = A.Term.t
type fun_ = A.Fun.t
type lit = CC_A.Lit.t
type proof = A.Proof.t
type actions = CC_A.Actions.t
type t

Global state of the congruence closure

module N : sig ... end

An equivalence class is a set of terms that are currently equal in the partial model built by the solver. The class is represented by a collection of nodes, one of which is distinguished and is called the "representative".

module Expl : sig ... end
type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t
val term_state : t -> term_state
val find : t -> node -> repr

Current representative

val add_term : t -> term -> node

Add the term to the congruence closure, if not present already. Will be backtracked.

type ev_on_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit
type ev_on_new_term = t -> N.t -> term -> unit
type ev_on_conflict = t -> lit list -> unit
type ev_on_propagate = t -> lit -> (unit -> lit list) -> unit
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_merge:ev_on_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠size:[ `Small | `Big ] -> term_state -> t

Create a new congruence closure.

val on_merge : t -> ev_on_merge -> unit

Add a function to be called when two classes are merged

val on_new_term : t -> ev_on_new_term -> unit

Add a function to be called when a new node is created

val on_conflict : t -> ev_on_conflict -> unit

Called when the congruence closure finds a conflict

val on_propagate : t -> ev_on_propagate -> unit

Called when the congruence closure propagates a literal

val set_as_lit : t -> N.t -> lit -> unit

map the given node to a literal.

val find_t : t -> term -> repr

Current representative of the term.

raises Not_found

if the term is not already add-ed.

val add_seq : t -> term Iter.t -> unit

Add a sequence of terms to the congruence closure

val all_classes : t -> repr Iter.t

All current classes. This is costly, only use if there is no other solution

val assert_lit : t -> lit -> unit

Given a literal, assume it in the congruence closure and propagate its consequences. Will be backtracked.

Useful for the theory combination or the SAT solver's functor

val assert_lits : t -> lit Iter.t -> unit

Addition of many literals

val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given explanation it must be a theory tautology that expl ==> absurd. To be used in theories.

val merge : t -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val check : t -> actions -> unit

Perform all pending operations done via assert_eq, assert_lit, etc. Will use the actions to propagate literals, declare conflicts, etc.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Restore to state n calls to push_level earlier. Used during backtracking.

val get_model : t -> N.t Iter.t Iter.t

get all the equivalence classes so they can be merged in the model

\ No newline at end of file +CC (sidekick.Sidekick_th_bool_static.S.A.S.Solver_internal.CC)

Module Solver_internal.CC

module T = T
module P = P
module Lit = Lit
module Actions : Sidekick_core.CC_ACTIONS with module T = T and module Lit = Lit and module P = P and type t = actions
type term_state = T.Term.state
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type proof = P.t
type actions = Actions.t
type t

Global state of the congruence closure

module N : sig ... end

An equivalence class is a set of terms that are currently equal in the partial model built by the solver. The class is represented by a collection of nodes, one of which is distinguished and is called the "representative".

module Expl : sig ... end
type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t
val term_state : t -> term_state
val find : t -> node -> repr

Current representative

val add_term : t -> term -> node

Add the term to the congruence closure, if not present already. Will be backtracked.

val mem_term : t -> term -> bool

Returns true if the term is explicitly present in the congruence closure

type ev_on_pre_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit
type ev_on_post_merge = t -> actions -> N.t -> N.t -> unit
type ev_on_new_term = t -> N.t -> term -> unit
type ev_on_conflict = t -> th:bool -> lit list -> unit
type ev_on_propagate = t -> lit -> (unit -> lit list) -> unit
type ev_on_is_subterm = N.t -> term -> unit
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_pre_merge:ev_on_pre_merge list -> ?⁠on_post_merge:ev_on_post_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠on_is_subterm:ev_on_is_subterm list -> ?⁠size:[ `Small | `Big ] -> term_state -> t

Create a new congruence closure.

val allocate_bitfield : descr:string -> t -> N.bitfield

Allocate a new bitfield for the nodes. See N.bitfield.

val set_bitfield : t -> N.bitfield -> bool -> N.t -> unit

Set the bitfield for the node. This will be backtracked. See N.bitfield.

val on_pre_merge : t -> ev_on_pre_merge -> unit

Add a function to be called when two classes are merged

val on_post_merge : t -> ev_on_post_merge -> unit

Add a function to be called when two classes are merged

val on_new_term : t -> ev_on_new_term -> unit

Add a function to be called when a new node is created

val on_conflict : t -> ev_on_conflict -> unit

Called when the congruence closure finds a conflict

val on_propagate : t -> ev_on_propagate -> unit

Called when the congruence closure propagates a literal

val on_is_subterm : t -> ev_on_is_subterm -> unit

Called on terms that are subterms of function symbols

val set_as_lit : t -> N.t -> lit -> unit

map the given node to a literal.

val find_t : t -> term -> repr

Current representative of the term.

raises Not_found

if the term is not already add-ed.

val add_seq : t -> term Iter.t -> unit

Add a sequence of terms to the congruence closure

val all_classes : t -> repr Iter.t

All current classes. This is costly, only use if there is no other solution

val assert_lit : t -> lit -> unit

Given a literal, assume it in the congruence closure and propagate its consequences. Will be backtracked.

Useful for the theory combination or the SAT solver's functor

val assert_lits : t -> lit Iter.t -> unit

Addition of many literals

val explain_eq : t -> N.t -> N.t -> lit list

Explain why the two nodes are equal. Fails if they are not, in an unspecified way

val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given explanation it must be a theory tautology that expl ==> absurd. To be used in theories.

val n_true : t -> N.t
val n_false : t -> N.t
val n_bool : t -> bool -> N.t
val merge : t -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val merge_t : t -> term -> term -> Expl.t -> unit

Shortcut for adding + merging

val check : t -> actions -> unit

Perform all pending operations done via assert_eq, assert_lit, etc. Will use the actions to propagate literals, declare conflicts, etc.

val new_merges : t -> bool

Called after check, returns true if some pairs of classes were merged.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Restore to state n calls to push_level earlier. Used during backtracking.

val get_model : t -> N.t Iter.t Iter.t

get all the equivalence classes so they can be merged in the model

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Solver_internal/Lit/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Solver_internal/Lit/index.html deleted file mode 100644 index 4b1129a8..00000000 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Solver_internal/Lit/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Lit (sidekick.Sidekick_th_bool_static.S.A.S.Solver_internal.Lit)

Module Solver_internal.Lit

Literals

A literal is a (preprocessed) term along with its sign. It is directly manipulated by the SAT solver.

type t
val term : t -> term
val sign : t -> bool
val neg : t -> t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Solver_internal/Simplify/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Solver_internal/Simplify/index.html index 18c617db..0e1f4444 100644 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Solver_internal/Simplify/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Solver_internal/Simplify/index.html @@ -1,2 +1,2 @@ -Simplify (sidekick.Sidekick_th_bool_static.S.A.S.Solver_internal.Simplify)

Module Solver_internal.Simplify

type t
val tst : t -> term_state
val clear : t -> unit

Reset internal cache, etc.

type hook = t -> term -> term option

Given a term, try to simplify it. Return None if it didn't change. Can also add clauses to the simplifier.

val normalize : t -> term -> term

Normalize a term using all the hooks.

\ No newline at end of file +Simplify (sidekick.Sidekick_th_bool_static.S.A.S.Solver_internal.Simplify)

Module Solver_internal.Simplify

type t
val tst : t -> term_state
val ty_st : t -> ty_state
val clear : t -> unit

Reset internal cache, etc.

type hook = t -> term -> term option

Given a term, try to simplify it. Return None if it didn't change.

val normalize : t -> term -> term

Normalize a term using all the hooks.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Solver_internal/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Solver_internal/index.html index 8665fae7..3e290c34 100644 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Solver_internal/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Solver_internal/index.html @@ -1,2 +1,2 @@ -Solver_internal (sidekick.Sidekick_th_bool_static.S.A.S.Solver_internal)

Module S.Solver_internal

Internal solver, available to theories.

module A = A
module CC_A = CC_A
module CC : Sidekick_core.CC_S with module CC_A = CC_A
type ty = A.Ty.t
type term = A.Term.t
type term_state = A.Term.state
type proof = A.Proof.t
type t

Main type for a solver

type solver = t
module Expl = CC.Expl
module N = CC.N
val tst : t -> term_state
val cc : t -> CC.t

Congruence closure for this solver

module Lit : sig ... end
type lit = Lit.t

Simplifiers

module Simplify : sig ... end
type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit
val simplifier : t -> Simplify.t
val simp_t : t -> term -> term

hooks for the theory

type actions
val propagate : t -> actions -> lit -> reason:(unit -> lit list) -> A.Proof.t -> unit
val raise_conflict : t -> actions -> lit list -> A.Proof.t -> 'a

Give a conflict clause to the solver

val propagate : t -> actions -> lit -> (unit -> lit list) -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> actions -> lit -> lit list -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> actions -> lit list -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : t -> actions -> lit list -> unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> actions -> ?⁠sign:bool -> term -> lit

Create a literal

val add_lit : t -> actions -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value

val add_lit_t : t -> actions -> ?⁠sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> N.t -> N.t

Find representative of the node

val cc_merge : t -> actions -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> actions -> term -> term -> Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> N.t

Add/retrieve congruence closure node for this term. To be used in theories

val on_cc_merge : t -> (CC.t -> actions -> N.t -> N.t -> Expl.t -> unit) -> unit

Callback for when two classes containing data for this key are merged

val on_cc_new_term : t -> (CC.t -> N.t -> term -> unit) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_conflict : t -> (CC.t -> lit list -> unit) -> unit

Callback called on every CC conflict

val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list) -> unit) -> unit

Callback called on every CC propagation

val on_partial_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

type preprocess_hook = t -> mk_lit:(term -> lit) -> add_clause:(lit list -> unit) -> term -> term option

Given a term, try to preprocess it. Return None if it didn't change. Can also add clauses to define new terms.

val add_preprocess : t -> preprocess_hook -> unit
\ No newline at end of file +Solver_internal (sidekick.Sidekick_th_bool_static.S.A.S.Solver_internal)

Module S.Solver_internal

Internal solver, available to theories.

module T = T
module P = P
type ty = T.Ty.t
type term = T.Term.t
type term_state = T.Term.state
type ty_state = T.Ty.state
type proof = P.t
type t

Main type for a solver

type solver = t
val tst : t -> term_state
val ty_st : t -> ty_state
val stats : t -> Sidekick_util.Stat.t

Actions for the theories

type actions
module Lit = Lit
type lit = Lit.t

Congruence Closure

module CC : Sidekick_core.CC_S with module T = T and module P = P and module Lit = Lit and type Actions.t = actions
val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end
type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit
val simplifier : t -> Simplify.t
val simp_t : t -> term -> term

hooks for the theory

val propagate : t -> actions -> lit -> reason:(unit -> lit list) -> proof -> unit

Propagate a literal for a reason. This is similar to asserting the clause reason => lit, but more lightweight, and in a way that is backtrackable.

val raise_conflict : t -> actions -> lit list -> proof -> 'a

Give a conflict clause to the solver

val push_decision : t -> actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : t -> actions -> lit -> (unit -> lit list) -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> actions -> lit -> lit list -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> actions -> lit list -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : t -> actions -> lit list -> unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> actions -> ?⁠sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val preprocess_term : t -> add_clause:(Lit.t list -> unit) -> term -> term

Preprocess a term.

val add_lit : t -> actions -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value

val add_lit_t : t -> actions -> ?⁠sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit

Callback called on every CC conflict

val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list) -> unit) -> unit

Callback called on every CC propagation

val on_partial_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

type preprocess_hook = t -> mk_lit:(term -> lit) -> add_clause:(lit list -> unit) -> term -> term option

Given a term, try to preprocess it. Return None if it didn't change. Can also add clauses to define new terms.

parameter mk_lit

creates a new literal for a boolean term.

parameter add_clause

pushes a new clause into the SAT solver.

val on_preprocess : t -> preprocess_hook -> unit

Model production

type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option

A model-production hook. It takes the solver, a class, and returns a term for this class.

val on_model_gen : t -> model_hook -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/T/Fun/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/T/Fun/index.html new file mode 100644 index 00000000..bf741bb1 --- /dev/null +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/T/Fun/index.html @@ -0,0 +1,2 @@ + +Fun (sidekick.Sidekick_th_bool_static.S.A.S.T.Fun)

Module T.Fun

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/T/Term/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/T/Term/index.html new file mode 100644 index 00000000..b35b2332 --- /dev/null +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/T/Term/index.html @@ -0,0 +1,2 @@ + +Term (sidekick.Sidekick_th_bool_static.S.A.S.T.Term)

Module T.Term

type t
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type state
val ty : t -> Ty.t
val bool : state -> bool -> t
val as_bool : t -> bool option
val abs : state -> t -> t * bool
val map_shallow : state -> (t -> t) -> t -> t

Map function on immediate subterms

val iter_dag : t -> (t -> unit) -> unit
module Tbl : CCHashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/T/Ty/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/T/Ty/index.html new file mode 100644 index 00000000..0dd35db5 --- /dev/null +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/T/Ty/index.html @@ -0,0 +1,2 @@ + +Ty (sidekick.Sidekick_th_bool_static.S.A.S.T.Ty)

Module T.Ty

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type state
val bool : state -> t
val is_bool : t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/T/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/T/index.html new file mode 100644 index 00000000..64cf2da4 --- /dev/null +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/T/index.html @@ -0,0 +1,2 @@ + +T (sidekick.Sidekick_th_bool_static.S.A.S.T)

Module S.T

module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Unknown/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Unknown/index.html index 61133f9e..e38092c9 100644 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Unknown/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Unknown/index.html @@ -1,2 +1,2 @@ -Unknown (sidekick.Sidekick_th_bool_static.S.A.S.Unknown)

Module S.Unknown

type t
val pp : t CCFormat.printer
\ No newline at end of file +Unknown (sidekick.Sidekick_th_bool_static.S.A.S.Unknown)

Module S.Unknown

type t
val pp : t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Value/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Value/index.html deleted file mode 100644 index 908b96cb..00000000 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Value/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Value (sidekick.Sidekick_th_bool_static.S.A.S.Value)

Module S.Value

Semantic values

type t
val equal : t -> t -> bool
val hash : t -> int
val ty : t -> ty
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/index.html index f87b9c55..856a34cb 100644 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/index.html @@ -1,2 +1,2 @@ -S (sidekick.Sidekick_th_bool_static.S.A.S)

Module A.S

module CC_A : Sidekick_core.CC_ARG with module A = A
module Solver_internal : Sidekick_core.SOLVER_INTERNAL with module A = A and module CC_A = CC_A

Internal solver, available to theories.

module Lit = Solver_internal.Lit
type t
type solver = t
type term = A.Term.t
type ty = A.Ty.t
type lit = Solver_internal.Lit.t
type lemma = A.Proof.t
module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

val mk_theory : name:string -> create_and_setup:(Solver_internal.t -> 'th) -> ?⁠push_level:('th -> unit) -> ?⁠pop_levels:('th -> int -> unit) -> unit -> theory

Helper to create a theory

module Atom : sig ... end
module Value : sig ... end
module Model : sig ... end
module Unknown : sig ... end
module Proof : sig ... end
type proof = Proof.t

Main API

val stats : t -> Sidekick_util.Stat.t
val tst : t -> A.Term.state
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠size:[ `Big | `Tiny | `Small ] -> ?⁠store_proof:bool -> theories:theory list -> A.Term.state -> unit -> t

Create a new solver.

parameter theories

theories to load from the start.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val mk_atom_lit : t -> lit -> Atom.t
val mk_atom_t : t -> ?⁠sign:bool -> term -> Atom.t
val add_clause : t -> Atom.t Sidekick_util.IArray.t -> unit
val add_clause_l : t -> Atom.t list -> unit
type res =
| Sat of Model.t
| Unsat of {
proof : proof option;
unsat_core : Atom.t list lazy_t;
}
| Unknown of Unknown.t

Result of solving for the current set of clauses

val solve : ?⁠on_exit:(unit -> unit) list -> ?⁠check:bool -> assumptions:Atom.t list -> t -> res

solve s checks the satisfiability of the statement added so far to s

parameter check

if true, the model is checked before returning

parameter assumptions

a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

parameter on_exit

functions to be run before this returns

val pp_term_graph : t CCFormat.printer
val pp_stats : t CCFormat.printer
\ No newline at end of file +S (sidekick.Sidekick_th_bool_static.S.A.S)

Module A.S

module Lit : Sidekick_core.LIT with module T = T
module Solver_internal : Sidekick_core.SOLVER_INTERNAL with module T = T and module P = P and module Lit = Lit

Internal solver, available to theories.

type t
type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t
type lemma = P.t
module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

type 'a theory_p = (module THEORY with type t = 'a)

A theory that can be used for this particular solver, with state of type 'a.

val mk_theory : name:string -> create_and_setup:(Solver_internal.t -> 'th) -> ?⁠push_level:('th -> unit) -> ?⁠pop_levels:('th -> int -> unit) -> unit -> theory

Helper to create a theory

module Atom : sig ... end
module Model : sig ... end
module Unknown : sig ... end
module Proof : sig ... end
type proof = Proof.t

Main API

val stats : t -> Sidekick_util.Stat.t
val tst : t -> T.Term.state
val ty_st : t -> T.Ty.state
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠size:[ `Big | `Tiny | `Small ] -> ?⁠store_proof:bool -> theories:theory list -> T.Term.state -> T.Ty.state -> unit -> t

Create a new solver.

parameter theories

theories to load from the start.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val add_theory_p : t -> 'a theory_p -> 'a

Add the given theory and obtain its state

val add_theory_l : t -> theory list -> unit
val mk_atom_lit : t -> lit -> Atom.t
val mk_atom_t : t -> ?⁠sign:bool -> term -> Atom.t
val add_clause : t -> Atom.t Sidekick_util.IArray.t -> unit
val add_clause_l : t -> Atom.t list -> unit
type res =
| Sat of Model.t
| Unsat of {
proof : proof option lazy_t;
unsat_core : Atom.t list lazy_t;
}
| Unknown of Unknown.t

Result of solving for the current set of clauses

val solve : ?⁠on_exit:(unit -> unit) list -> ?⁠check:bool -> ?⁠on_progress:(t -> unit) -> assumptions:Atom.t list -> t -> res

solve s checks the satisfiability of the statement added so far to s

parameter check

if true, the model is checked before returning

parameter assumptions

a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

parameter on_exit

functions to be run before this returns

val pp_stats : t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/module-type-THEORY/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/module-type-THEORY/index.html index b7a6bd8b..b1c8b6aa 100644 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/module-type-THEORY/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/module-type-THEORY/index.html @@ -1,2 +1,2 @@ -THEORY (sidekick.Sidekick_th_bool_static.S.A.S.THEORY)

Module type S.THEORY

A theory

Theories are abstracted over the concrete implementation of the solver, so they can work with any implementation.

Typically a theory should be a functor taking an argument containing a SOLVER_INTERNAL and some additional views on terms, literals, etc. that are specific to the theory (e.g. to map terms to linear expressions). The theory can then be instantiated on any kind of solver for any term representation that also satisfies the additional theory-specific requirements. Instantiated theories (ie values of type Sidekick_core.SOLVER.theory) can be added to the solver.

type t

The theory's state

val name : string

Name of the theory

val create_and_setup : Solver_internal.t -> t

Instantiate the theory's state for the given (internal) solver, register callbacks, create keys, etc.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Pop backtracking levels, restoring the theory to its former state

\ No newline at end of file +THEORY (sidekick.Sidekick_th_bool_static.S.A.S.THEORY)

Module type S.THEORY

A theory

Theories are abstracted over the concrete implementation of the solver, so they can work with any implementation.

Typically a theory should be a functor taking an argument containing a SOLVER_INTERNAL or even a full SOLVER, and some additional views on terms, literals, etc. that are specific to the theory (e.g. to map terms to linear expressions). The theory can then be instantiated on any kind of solver for any term representation that also satisfies the additional theory-specific requirements. Instantiated theories (ie values of type Sidekick_core.SOLVER.theory) can be added to the solver.

type t

The theory's state

val name : string

Name of the theory

val create_and_setup : Solver_internal.t -> t

Instantiate the theory's state for the given (internal) solver, register callbacks, create keys, etc.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Pop backtracking levels, restoring the theory to its former state

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/index.html index 11d68c2a..05a137f9 100644 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/index.html @@ -1,2 +1,2 @@ -A (sidekick.Sidekick_th_bool_static.S.A)

Module S.A

type term = S.A.Term.t
val view_as_bool : term -> term bool_view

Project the term into the boolean view

val mk_bool : S.A.Term.state -> term bool_view -> term

Make a term from the given boolean view

module Gensym : sig ... end
\ No newline at end of file +A (sidekick.Sidekick_th_bool_static.S.A)

Module S.A

type term = S.T.Term.t
val view_as_bool : term -> (termterm Iter.t) bool_view

Project the term into the boolean view

val mk_bool : S.T.Term.state -> (termterm Sidekick_util.IArray.t) bool_view -> term

Make a term from the given boolean view

val check_congruence_classes : bool

Configuration: add final-check handler to verify if new boolean formulas are present in the congruence closure. Only enable if some theories are susceptible to create boolean formulas during the proof search.

module Gensym : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-S/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-S/index.html index 0d9dc8de..099a49cd 100644 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-S/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-S/index.html @@ -1,2 +1,2 @@ -S (sidekick.Sidekick_th_bool_static.S)

Module type Sidekick_th_bool_static.S

module A : ARG
module T = A.S.A.Term
type state
val create : T.state -> state
val simplify : state -> SI.simplify_hook

Simplify given term

val cnf : state -> SI.preprocess_hook

add clauses for the booleans within the term.

val theory : A.S.theory
\ No newline at end of file +S (sidekick.Sidekick_th_bool_static.S)

Module type Sidekick_th_bool_static.S

module A : ARG
type state
val create : A.S.T.Term.state -> A.S.T.Ty.state -> state
val simplify : state -> A.S.Solver_internal.simplify_hook

Simplify given term

val cnf : state -> A.S.Solver_internal.preprocess_hook

add clauses for the booleans within the term.

val theory : A.S.theory
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/.dune-keep b/dev/sidekick/Sidekick_th_cstor/.dune-keep new file mode 100644 index 00000000..e69de29b diff --git a/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Atom/index.html b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Atom/index.html new file mode 100644 index 00000000..381824ac --- /dev/null +++ b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Atom/index.html @@ -0,0 +1,2 @@ + +Atom (sidekick.Sidekick_th_cstor.Make.1-A.S.Atom)

Module S.Atom

Boolean Atoms

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t CCFormat.printer
val neg : t -> t
val formula : t -> lit
val sign : t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Lit/index.html b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Lit/index.html new file mode 100644 index 00000000..b1ffdb6d --- /dev/null +++ b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Lit/index.html @@ -0,0 +1,2 @@ + +Lit (sidekick.Sidekick_th_cstor.Make.1-A.S.Lit)

Module S.Lit

module T = T
type t
val term : t -> T.Term.t
val sign : t -> bool
val neg : t -> t
val abs : t -> t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Model/index.html b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Model/index.html new file mode 100644 index 00000000..0fad8afd --- /dev/null +++ b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Model/index.html @@ -0,0 +1,2 @@ + +Model (sidekick.Sidekick_th_cstor.Make.1-A.S.Model)

Module S.Model

type t
val empty : t
val mem : t -> term -> bool
val find : t -> term -> term option
val eval : t -> term -> term option
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/P/index.html b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/P/index.html new file mode 100644 index 00000000..2ff5b701 --- /dev/null +++ b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/P/index.html @@ -0,0 +1,2 @@ + +P (sidekick.Sidekick_th_cstor.Make.1-A.S.P)

Module S.P

type t
val pp : t Sidekick_core.Fmt.printer
val default : t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Proof/index.html b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Proof/index.html new file mode 100644 index 00000000..ec3a898f --- /dev/null +++ b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Proof/index.html @@ -0,0 +1,2 @@ + +Proof (sidekick.Sidekick_th_cstor.Make.1-A.S.Proof)

Module S.Proof

type t
val check : t -> unit
val pp_dot : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Solver_internal/CC/Actions/index.html b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Solver_internal/CC/Actions/index.html new file mode 100644 index 00000000..f430bc36 --- /dev/null +++ b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Solver_internal/CC/Actions/index.html @@ -0,0 +1,2 @@ + +Actions (sidekick.Sidekick_th_cstor.Make.1-A.S.Solver_internal.CC.Actions)

Module CC.Actions

module T = T
module P = P
module Lit = Lit
type t = actions
val raise_conflict : t -> Lit.t list -> P.t -> 'a
val propagate : t -> Lit.t -> reason:(unit -> Lit.t list) -> P.t -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Solver_internal/CC/Expl/index.html b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Solver_internal/CC/Expl/index.html new file mode 100644 index 00000000..ce52744b --- /dev/null +++ b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Solver_internal/CC/Expl/index.html @@ -0,0 +1,2 @@ + +Expl (sidekick.Sidekick_th_cstor.Make.1-A.S.Solver_internal.CC.Expl)

Module CC.Expl

type t
val pp : t Sidekick_core.Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
val mk_theory : t -> t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Solver_internal/CC/N/index.html b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Solver_internal/CC/N/index.html new file mode 100644 index 00000000..91d5d34e --- /dev/null +++ b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Solver_internal/CC/N/index.html @@ -0,0 +1,2 @@ + +N (sidekick.Sidekick_th_cstor.Make.1-A.S.Solver_internal.CC.N)

Module CC.N

An equivalence class is a set of terms that are currently equal in the partial model built by the solver. The class is represented by a collection of nodes, one of which is distinguished and is called the "representative".

All information pertaining to the whole equivalence class is stored in this representative's node.

When two classes become equal (are "merged"), one of the two representatives is picked as the representative of the new class. The new class contains the union of the two old classes' nodes.

We also allow theories to store additional information in the representative. This information can be used when two classes are merged, to detect conflicts and solve equations à la Shostak.

type t
val term : t -> term
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
val is_root : t -> bool

Is the node a root (ie the representative of its class)?

val iter_class : t -> t Iter.t

Traverse the congruence class. Precondition: is_root n (see find below)

val iter_parents : t -> t Iter.t

Traverse the parents of the class. Precondition: is_root n (see find below)

type bitfield

A field in the bitfield of this node. This should only be allocated when a theory is initialized.

All fields are initially 0, are backtracked automatically, and are merged automatically when classes are merged.

val get_field : bitfield -> t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Solver_internal/CC/index.html b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Solver_internal/CC/index.html new file mode 100644 index 00000000..8d7057f3 --- /dev/null +++ b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Solver_internal/CC/index.html @@ -0,0 +1,2 @@ + +CC (sidekick.Sidekick_th_cstor.Make.1-A.S.Solver_internal.CC)

Module Solver_internal.CC

module T = T
module P = P
module Lit = Lit
module Actions : Sidekick_core.CC_ACTIONS with module T = T and module Lit = Lit and module P = P and type t = actions
type term_state = T.Term.state
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type proof = P.t
type actions = Actions.t
type t

Global state of the congruence closure

module N : sig ... end

An equivalence class is a set of terms that are currently equal in the partial model built by the solver. The class is represented by a collection of nodes, one of which is distinguished and is called the "representative".

module Expl : sig ... end
type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t
val term_state : t -> term_state
val find : t -> node -> repr

Current representative

val add_term : t -> term -> node

Add the term to the congruence closure, if not present already. Will be backtracked.

val mem_term : t -> term -> bool

Returns true if the term is explicitly present in the congruence closure

type ev_on_pre_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit
type ev_on_post_merge = t -> actions -> N.t -> N.t -> unit
type ev_on_new_term = t -> N.t -> term -> unit
type ev_on_conflict = t -> th:bool -> lit list -> unit
type ev_on_propagate = t -> lit -> (unit -> lit list) -> unit
type ev_on_is_subterm = N.t -> term -> unit
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_pre_merge:ev_on_pre_merge list -> ?⁠on_post_merge:ev_on_post_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠on_is_subterm:ev_on_is_subterm list -> ?⁠size:[ `Small | `Big ] -> term_state -> t

Create a new congruence closure.

val allocate_bitfield : descr:string -> t -> N.bitfield

Allocate a new bitfield for the nodes. See N.bitfield.

val set_bitfield : t -> N.bitfield -> bool -> N.t -> unit

Set the bitfield for the node. This will be backtracked. See N.bitfield.

val on_pre_merge : t -> ev_on_pre_merge -> unit

Add a function to be called when two classes are merged

val on_post_merge : t -> ev_on_post_merge -> unit

Add a function to be called when two classes are merged

val on_new_term : t -> ev_on_new_term -> unit

Add a function to be called when a new node is created

val on_conflict : t -> ev_on_conflict -> unit

Called when the congruence closure finds a conflict

val on_propagate : t -> ev_on_propagate -> unit

Called when the congruence closure propagates a literal

val on_is_subterm : t -> ev_on_is_subterm -> unit

Called on terms that are subterms of function symbols

val set_as_lit : t -> N.t -> lit -> unit

map the given node to a literal.

val find_t : t -> term -> repr

Current representative of the term.

raises Not_found

if the term is not already add-ed.

val add_seq : t -> term Iter.t -> unit

Add a sequence of terms to the congruence closure

val all_classes : t -> repr Iter.t

All current classes. This is costly, only use if there is no other solution

val assert_lit : t -> lit -> unit

Given a literal, assume it in the congruence closure and propagate its consequences. Will be backtracked.

Useful for the theory combination or the SAT solver's functor

val assert_lits : t -> lit Iter.t -> unit

Addition of many literals

val explain_eq : t -> N.t -> N.t -> lit list

Explain why the two nodes are equal. Fails if they are not, in an unspecified way

val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given explanation it must be a theory tautology that expl ==> absurd. To be used in theories.

val n_true : t -> N.t
val n_false : t -> N.t
val n_bool : t -> bool -> N.t
val merge : t -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val merge_t : t -> term -> term -> Expl.t -> unit

Shortcut for adding + merging

val check : t -> actions -> unit

Perform all pending operations done via assert_eq, assert_lit, etc. Will use the actions to propagate literals, declare conflicts, etc.

val new_merges : t -> bool

Called after check, returns true if some pairs of classes were merged.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Restore to state n calls to push_level earlier. Used during backtracking.

val get_model : t -> N.t Iter.t Iter.t

get all the equivalence classes so they can be merged in the model

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Solver_internal/Simplify/index.html b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Solver_internal/Simplify/index.html new file mode 100644 index 00000000..65d0e5c5 --- /dev/null +++ b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Solver_internal/Simplify/index.html @@ -0,0 +1,2 @@ + +Simplify (sidekick.Sidekick_th_cstor.Make.1-A.S.Solver_internal.Simplify)

Module Solver_internal.Simplify

type t
val tst : t -> term_state
val ty_st : t -> ty_state
val clear : t -> unit

Reset internal cache, etc.

type hook = t -> term -> term option

Given a term, try to simplify it. Return None if it didn't change.

val normalize : t -> term -> term

Normalize a term using all the hooks.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Solver_internal/index.html b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Solver_internal/index.html new file mode 100644 index 00000000..62ffe1f6 --- /dev/null +++ b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Solver_internal/index.html @@ -0,0 +1,2 @@ + +Solver_internal (sidekick.Sidekick_th_cstor.Make.1-A.S.Solver_internal)

Module S.Solver_internal

Internal solver, available to theories.

module T = T
module P = P
type ty = T.Ty.t
type term = T.Term.t
type term_state = T.Term.state
type ty_state = T.Ty.state
type proof = P.t
type t

Main type for a solver

type solver = t
val tst : t -> term_state
val ty_st : t -> ty_state
val stats : t -> Sidekick_util.Stat.t

Actions for the theories

type actions
module Lit = Lit
type lit = Lit.t

Congruence Closure

module CC : Sidekick_core.CC_S with module T = T and module P = P and module Lit = Lit and type Actions.t = actions
val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end
type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit
val simplifier : t -> Simplify.t
val simp_t : t -> term -> term

hooks for the theory

val propagate : t -> actions -> lit -> reason:(unit -> lit list) -> proof -> unit

Propagate a literal for a reason. This is similar to asserting the clause reason => lit, but more lightweight, and in a way that is backtrackable.

val raise_conflict : t -> actions -> lit list -> proof -> 'a

Give a conflict clause to the solver

val push_decision : t -> actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : t -> actions -> lit -> (unit -> lit list) -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> actions -> lit -> lit list -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> actions -> lit list -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : t -> actions -> lit list -> unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> actions -> ?⁠sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val preprocess_term : t -> add_clause:(Lit.t list -> unit) -> term -> term

Preprocess a term.

val add_lit : t -> actions -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value

val add_lit_t : t -> actions -> ?⁠sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit

Callback called on every CC conflict

val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list) -> unit) -> unit

Callback called on every CC propagation

val on_partial_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

type preprocess_hook = t -> mk_lit:(term -> lit) -> add_clause:(lit list -> unit) -> term -> term option

Given a term, try to preprocess it. Return None if it didn't change. Can also add clauses to define new terms.

parameter mk_lit

creates a new literal for a boolean term.

parameter add_clause

pushes a new clause into the SAT solver.

val on_preprocess : t -> preprocess_hook -> unit

Model production

type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option

A model-production hook. It takes the solver, a class, and returns a term for this class.

val on_model_gen : t -> model_hook -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/T/Fun/index.html b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/T/Fun/index.html new file mode 100644 index 00000000..29e2961f --- /dev/null +++ b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/T/Fun/index.html @@ -0,0 +1,2 @@ + +Fun (sidekick.Sidekick_th_cstor.Make.1-A.S.T.Fun)

Module T.Fun

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/T/Term/index.html b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/T/Term/index.html new file mode 100644 index 00000000..66bdd81f --- /dev/null +++ b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/T/Term/index.html @@ -0,0 +1,2 @@ + +Term (sidekick.Sidekick_th_cstor.Make.1-A.S.T.Term)

Module T.Term

type t
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type state
val ty : t -> Ty.t
val bool : state -> bool -> t
val as_bool : t -> bool option
val abs : state -> t -> t * bool
val map_shallow : state -> (t -> t) -> t -> t

Map function on immediate subterms

val iter_dag : t -> (t -> unit) -> unit
module Tbl : CCHashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/T/Ty/index.html b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/T/Ty/index.html new file mode 100644 index 00000000..059f4537 --- /dev/null +++ b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/T/Ty/index.html @@ -0,0 +1,2 @@ + +Ty (sidekick.Sidekick_th_cstor.Make.1-A.S.T.Ty)

Module T.Ty

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type state
val bool : state -> t
val is_bool : t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/T/index.html b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/T/index.html new file mode 100644 index 00000000..c49aa022 --- /dev/null +++ b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/T/index.html @@ -0,0 +1,2 @@ + +T (sidekick.Sidekick_th_cstor.Make.1-A.S.T)

Module S.T

module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Unknown/index.html b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Unknown/index.html new file mode 100644 index 00000000..f1c64d94 --- /dev/null +++ b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Unknown/index.html @@ -0,0 +1,2 @@ + +Unknown (sidekick.Sidekick_th_cstor.Make.1-A.S.Unknown)

Module S.Unknown

type t
val pp : t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/index.html b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/index.html new file mode 100644 index 00000000..3b86beb8 --- /dev/null +++ b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/index.html @@ -0,0 +1,2 @@ + +S (sidekick.Sidekick_th_cstor.Make.1-A.S)

Module 1-A.S

module Lit : Sidekick_core.LIT with module T = T
module Solver_internal : Sidekick_core.SOLVER_INTERNAL with module T = T and module P = P and module Lit = Lit

Internal solver, available to theories.

type t
type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t
type lemma = P.t
module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

type 'a theory_p = (module THEORY with type t = 'a)

A theory that can be used for this particular solver, with state of type 'a.

val mk_theory : name:string -> create_and_setup:(Solver_internal.t -> 'th) -> ?⁠push_level:('th -> unit) -> ?⁠pop_levels:('th -> int -> unit) -> unit -> theory

Helper to create a theory

module Atom : sig ... end
module Model : sig ... end
module Unknown : sig ... end
module Proof : sig ... end
type proof = Proof.t

Main API

val stats : t -> Sidekick_util.Stat.t
val tst : t -> T.Term.state
val ty_st : t -> T.Ty.state
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠size:[ `Big | `Tiny | `Small ] -> ?⁠store_proof:bool -> theories:theory list -> T.Term.state -> T.Ty.state -> unit -> t

Create a new solver.

parameter theories

theories to load from the start.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val add_theory_p : t -> 'a theory_p -> 'a

Add the given theory and obtain its state

val add_theory_l : t -> theory list -> unit
val mk_atom_lit : t -> lit -> Atom.t
val mk_atom_t : t -> ?⁠sign:bool -> term -> Atom.t
val add_clause : t -> Atom.t Sidekick_util.IArray.t -> unit
val add_clause_l : t -> Atom.t list -> unit
type res =
| Sat of Model.t
| Unsat of {
proof : proof option lazy_t;
unsat_core : Atom.t list lazy_t;
}
| Unknown of Unknown.t

Result of solving for the current set of clauses

val solve : ?⁠on_exit:(unit -> unit) list -> ?⁠check:bool -> ?⁠on_progress:(t -> unit) -> assumptions:Atom.t list -> t -> res

solve s checks the satisfiability of the statement added so far to s

parameter check

if true, the model is checked before returning

parameter assumptions

a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

parameter on_exit

functions to be run before this returns

val pp_stats : t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/module-type-THEORY/index.html b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/module-type-THEORY/index.html new file mode 100644 index 00000000..791aa3b7 --- /dev/null +++ b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/module-type-THEORY/index.html @@ -0,0 +1,2 @@ + +THEORY (sidekick.Sidekick_th_cstor.Make.1-A.S.THEORY)

Module type S.THEORY

A theory

Theories are abstracted over the concrete implementation of the solver, so they can work with any implementation.

Typically a theory should be a functor taking an argument containing a SOLVER_INTERNAL or even a full SOLVER, and some additional views on terms, literals, etc. that are specific to the theory (e.g. to map terms to linear expressions). The theory can then be instantiated on any kind of solver for any term representation that also satisfies the additional theory-specific requirements. Instantiated theories (ie values of type Sidekick_core.SOLVER.theory) can be added to the solver.

type t

The theory's state

val name : string

Name of the theory

val create_and_setup : Solver_internal.t -> t

Instantiate the theory's state for the given (internal) solver, register callbacks, create keys, etc.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Pop backtracking levels, restoring the theory to its former state

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/index.html b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/index.html new file mode 100644 index 00000000..bbf0ab4a --- /dev/null +++ b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/index.html @@ -0,0 +1,2 @@ + +1-A (sidekick.Sidekick_th_cstor.Make.1-A)

Parameter Make.1-A

val view_as_cstor : S.T.Term.t -> (S.T.Fun.tS.T.Term.t) cstor_view
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/Make/index.html b/dev/sidekick/Sidekick_th_cstor/Make/index.html new file mode 100644 index 00000000..850120f2 --- /dev/null +++ b/dev/sidekick/Sidekick_th_cstor/Make/index.html @@ -0,0 +1,2 @@ + +Make (sidekick.Sidekick_th_cstor.Make)

Module Sidekick_th_cstor.Make

Parameters

Signature

module A = A
val theory : A.S.theory
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/index.html b/dev/sidekick/Sidekick_th_cstor/index.html new file mode 100644 index 00000000..0a08d33a --- /dev/null +++ b/dev/sidekick/Sidekick_th_cstor/index.html @@ -0,0 +1,2 @@ + +Sidekick_th_cstor (sidekick.Sidekick_th_cstor)

Module Sidekick_th_cstor

Theory for constructors

type ('c, 't) cstor_view =
| T_cstor of 'c * 't Sidekick_util.IArray.t
| T_other of 't
val name : string
module type ARG = sig ... end
module type S = sig ... end
module Make : functor (A : ARG) -> S with module A = A
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Atom/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Atom/index.html new file mode 100644 index 00000000..2b17e975 --- /dev/null +++ b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Atom/index.html @@ -0,0 +1,2 @@ + +Atom (sidekick.Sidekick_th_cstor.ARG.S.Atom)

Module S.Atom

Boolean Atoms

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t CCFormat.printer
val neg : t -> t
val formula : t -> lit
val sign : t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Lit/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Lit/index.html new file mode 100644 index 00000000..c2a32601 --- /dev/null +++ b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Lit/index.html @@ -0,0 +1,2 @@ + +Lit (sidekick.Sidekick_th_cstor.ARG.S.Lit)

Module S.Lit

module T = T
type t
val term : t -> T.Term.t
val sign : t -> bool
val neg : t -> t
val abs : t -> t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Model/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Model/index.html new file mode 100644 index 00000000..59f7dfae --- /dev/null +++ b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Model/index.html @@ -0,0 +1,2 @@ + +Model (sidekick.Sidekick_th_cstor.ARG.S.Model)

Module S.Model

type t
val empty : t
val mem : t -> term -> bool
val find : t -> term -> term option
val eval : t -> term -> term option
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/P/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/P/index.html new file mode 100644 index 00000000..7f68a6d6 --- /dev/null +++ b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/P/index.html @@ -0,0 +1,2 @@ + +P (sidekick.Sidekick_th_cstor.ARG.S.P)

Module S.P

type t
val pp : t Sidekick_core.Fmt.printer
val default : t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Proof/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Proof/index.html new file mode 100644 index 00000000..41e3de83 --- /dev/null +++ b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Proof/index.html @@ -0,0 +1,2 @@ + +Proof (sidekick.Sidekick_th_cstor.ARG.S.Proof)

Module S.Proof

type t
val check : t -> unit
val pp_dot : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Solver_internal/CC/Actions/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Solver_internal/CC/Actions/index.html new file mode 100644 index 00000000..db6a0994 --- /dev/null +++ b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Solver_internal/CC/Actions/index.html @@ -0,0 +1,2 @@ + +Actions (sidekick.Sidekick_th_cstor.ARG.S.Solver_internal.CC.Actions)

Module CC.Actions

module T = T
module P = P
module Lit = Lit
type t = actions
val raise_conflict : t -> Lit.t list -> P.t -> 'a
val propagate : t -> Lit.t -> reason:(unit -> Lit.t list) -> P.t -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Solver_internal/CC/Expl/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Solver_internal/CC/Expl/index.html new file mode 100644 index 00000000..b87ae892 --- /dev/null +++ b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Solver_internal/CC/Expl/index.html @@ -0,0 +1,2 @@ + +Expl (sidekick.Sidekick_th_cstor.ARG.S.Solver_internal.CC.Expl)

Module CC.Expl

type t
val pp : t Sidekick_core.Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
val mk_theory : t -> t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Solver_internal/CC/N/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Solver_internal/CC/N/index.html new file mode 100644 index 00000000..cc86249f --- /dev/null +++ b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Solver_internal/CC/N/index.html @@ -0,0 +1,2 @@ + +N (sidekick.Sidekick_th_cstor.ARG.S.Solver_internal.CC.N)

Module CC.N

An equivalence class is a set of terms that are currently equal in the partial model built by the solver. The class is represented by a collection of nodes, one of which is distinguished and is called the "representative".

All information pertaining to the whole equivalence class is stored in this representative's node.

When two classes become equal (are "merged"), one of the two representatives is picked as the representative of the new class. The new class contains the union of the two old classes' nodes.

We also allow theories to store additional information in the representative. This information can be used when two classes are merged, to detect conflicts and solve equations à la Shostak.

type t
val term : t -> term
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
val is_root : t -> bool

Is the node a root (ie the representative of its class)?

val iter_class : t -> t Iter.t

Traverse the congruence class. Precondition: is_root n (see find below)

val iter_parents : t -> t Iter.t

Traverse the parents of the class. Precondition: is_root n (see find below)

type bitfield

A field in the bitfield of this node. This should only be allocated when a theory is initialized.

All fields are initially 0, are backtracked automatically, and are merged automatically when classes are merged.

val get_field : bitfield -> t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Solver_internal/CC/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Solver_internal/CC/index.html new file mode 100644 index 00000000..cedf6489 --- /dev/null +++ b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Solver_internal/CC/index.html @@ -0,0 +1,2 @@ + +CC (sidekick.Sidekick_th_cstor.ARG.S.Solver_internal.CC)

Module Solver_internal.CC

module T = T
module P = P
module Lit = Lit
module Actions : Sidekick_core.CC_ACTIONS with module T = T and module Lit = Lit and module P = P and type t = actions
type term_state = T.Term.state
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type proof = P.t
type actions = Actions.t
type t

Global state of the congruence closure

module N : sig ... end

An equivalence class is a set of terms that are currently equal in the partial model built by the solver. The class is represented by a collection of nodes, one of which is distinguished and is called the "representative".

module Expl : sig ... end
type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t
val term_state : t -> term_state
val find : t -> node -> repr

Current representative

val add_term : t -> term -> node

Add the term to the congruence closure, if not present already. Will be backtracked.

val mem_term : t -> term -> bool

Returns true if the term is explicitly present in the congruence closure

type ev_on_pre_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit
type ev_on_post_merge = t -> actions -> N.t -> N.t -> unit
type ev_on_new_term = t -> N.t -> term -> unit
type ev_on_conflict = t -> th:bool -> lit list -> unit
type ev_on_propagate = t -> lit -> (unit -> lit list) -> unit
type ev_on_is_subterm = N.t -> term -> unit
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_pre_merge:ev_on_pre_merge list -> ?⁠on_post_merge:ev_on_post_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠on_is_subterm:ev_on_is_subterm list -> ?⁠size:[ `Small | `Big ] -> term_state -> t

Create a new congruence closure.

val allocate_bitfield : descr:string -> t -> N.bitfield

Allocate a new bitfield for the nodes. See N.bitfield.

val set_bitfield : t -> N.bitfield -> bool -> N.t -> unit

Set the bitfield for the node. This will be backtracked. See N.bitfield.

val on_pre_merge : t -> ev_on_pre_merge -> unit

Add a function to be called when two classes are merged

val on_post_merge : t -> ev_on_post_merge -> unit

Add a function to be called when two classes are merged

val on_new_term : t -> ev_on_new_term -> unit

Add a function to be called when a new node is created

val on_conflict : t -> ev_on_conflict -> unit

Called when the congruence closure finds a conflict

val on_propagate : t -> ev_on_propagate -> unit

Called when the congruence closure propagates a literal

val on_is_subterm : t -> ev_on_is_subterm -> unit

Called on terms that are subterms of function symbols

val set_as_lit : t -> N.t -> lit -> unit

map the given node to a literal.

val find_t : t -> term -> repr

Current representative of the term.

raises Not_found

if the term is not already add-ed.

val add_seq : t -> term Iter.t -> unit

Add a sequence of terms to the congruence closure

val all_classes : t -> repr Iter.t

All current classes. This is costly, only use if there is no other solution

val assert_lit : t -> lit -> unit

Given a literal, assume it in the congruence closure and propagate its consequences. Will be backtracked.

Useful for the theory combination or the SAT solver's functor

val assert_lits : t -> lit Iter.t -> unit

Addition of many literals

val explain_eq : t -> N.t -> N.t -> lit list

Explain why the two nodes are equal. Fails if they are not, in an unspecified way

val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given explanation it must be a theory tautology that expl ==> absurd. To be used in theories.

val n_true : t -> N.t
val n_false : t -> N.t
val n_bool : t -> bool -> N.t
val merge : t -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val merge_t : t -> term -> term -> Expl.t -> unit

Shortcut for adding + merging

val check : t -> actions -> unit

Perform all pending operations done via assert_eq, assert_lit, etc. Will use the actions to propagate literals, declare conflicts, etc.

val new_merges : t -> bool

Called after check, returns true if some pairs of classes were merged.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Restore to state n calls to push_level earlier. Used during backtracking.

val get_model : t -> N.t Iter.t Iter.t

get all the equivalence classes so they can be merged in the model

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Solver_internal/Simplify/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Solver_internal/Simplify/index.html new file mode 100644 index 00000000..b0f834be --- /dev/null +++ b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Solver_internal/Simplify/index.html @@ -0,0 +1,2 @@ + +Simplify (sidekick.Sidekick_th_cstor.ARG.S.Solver_internal.Simplify)

Module Solver_internal.Simplify

type t
val tst : t -> term_state
val ty_st : t -> ty_state
val clear : t -> unit

Reset internal cache, etc.

type hook = t -> term -> term option

Given a term, try to simplify it. Return None if it didn't change.

val normalize : t -> term -> term

Normalize a term using all the hooks.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Solver_internal/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Solver_internal/index.html new file mode 100644 index 00000000..1d128c3e --- /dev/null +++ b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Solver_internal/index.html @@ -0,0 +1,2 @@ + +Solver_internal (sidekick.Sidekick_th_cstor.ARG.S.Solver_internal)

Module S.Solver_internal

Internal solver, available to theories.

module T = T
module P = P
type ty = T.Ty.t
type term = T.Term.t
type term_state = T.Term.state
type ty_state = T.Ty.state
type proof = P.t
type t

Main type for a solver

type solver = t
val tst : t -> term_state
val ty_st : t -> ty_state
val stats : t -> Sidekick_util.Stat.t

Actions for the theories

type actions
module Lit = Lit
type lit = Lit.t

Congruence Closure

module CC : Sidekick_core.CC_S with module T = T and module P = P and module Lit = Lit and type Actions.t = actions
val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end
type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit
val simplifier : t -> Simplify.t
val simp_t : t -> term -> term

hooks for the theory

val propagate : t -> actions -> lit -> reason:(unit -> lit list) -> proof -> unit

Propagate a literal for a reason. This is similar to asserting the clause reason => lit, but more lightweight, and in a way that is backtrackable.

val raise_conflict : t -> actions -> lit list -> proof -> 'a

Give a conflict clause to the solver

val push_decision : t -> actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : t -> actions -> lit -> (unit -> lit list) -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> actions -> lit -> lit list -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> actions -> lit list -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : t -> actions -> lit list -> unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> actions -> ?⁠sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val preprocess_term : t -> add_clause:(Lit.t list -> unit) -> term -> term

Preprocess a term.

val add_lit : t -> actions -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value

val add_lit_t : t -> actions -> ?⁠sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit

Callback called on every CC conflict

val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list) -> unit) -> unit

Callback called on every CC propagation

val on_partial_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

type preprocess_hook = t -> mk_lit:(term -> lit) -> add_clause:(lit list -> unit) -> term -> term option

Given a term, try to preprocess it. Return None if it didn't change. Can also add clauses to define new terms.

parameter mk_lit

creates a new literal for a boolean term.

parameter add_clause

pushes a new clause into the SAT solver.

val on_preprocess : t -> preprocess_hook -> unit

Model production

type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option

A model-production hook. It takes the solver, a class, and returns a term for this class.

val on_model_gen : t -> model_hook -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/T/Fun/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/T/Fun/index.html new file mode 100644 index 00000000..8d62458d --- /dev/null +++ b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/T/Fun/index.html @@ -0,0 +1,2 @@ + +Fun (sidekick.Sidekick_th_cstor.ARG.S.T.Fun)

Module T.Fun

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/T/Term/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/T/Term/index.html new file mode 100644 index 00000000..84ceed1c --- /dev/null +++ b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/T/Term/index.html @@ -0,0 +1,2 @@ + +Term (sidekick.Sidekick_th_cstor.ARG.S.T.Term)

Module T.Term

type t
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type state
val ty : t -> Ty.t
val bool : state -> bool -> t
val as_bool : t -> bool option
val abs : state -> t -> t * bool
val map_shallow : state -> (t -> t) -> t -> t

Map function on immediate subterms

val iter_dag : t -> (t -> unit) -> unit
module Tbl : CCHashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/T/Ty/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/T/Ty/index.html new file mode 100644 index 00000000..dc339642 --- /dev/null +++ b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/T/Ty/index.html @@ -0,0 +1,2 @@ + +Ty (sidekick.Sidekick_th_cstor.ARG.S.T.Ty)

Module T.Ty

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type state
val bool : state -> t
val is_bool : t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/T/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/T/index.html new file mode 100644 index 00000000..65674d6d --- /dev/null +++ b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/T/index.html @@ -0,0 +1,2 @@ + +T (sidekick.Sidekick_th_cstor.ARG.S.T)

Module S.T

module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Unknown/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Unknown/index.html new file mode 100644 index 00000000..1d811f36 --- /dev/null +++ b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Unknown/index.html @@ -0,0 +1,2 @@ + +Unknown (sidekick.Sidekick_th_cstor.ARG.S.Unknown)

Module S.Unknown

type t
val pp : t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/index.html new file mode 100644 index 00000000..6bf13962 --- /dev/null +++ b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/index.html @@ -0,0 +1,2 @@ + +S (sidekick.Sidekick_th_cstor.ARG.S)

Module ARG.S

module Lit : Sidekick_core.LIT with module T = T
module Solver_internal : Sidekick_core.SOLVER_INTERNAL with module T = T and module P = P and module Lit = Lit

Internal solver, available to theories.

type t
type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t
type lemma = P.t
module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

type 'a theory_p = (module THEORY with type t = 'a)

A theory that can be used for this particular solver, with state of type 'a.

val mk_theory : name:string -> create_and_setup:(Solver_internal.t -> 'th) -> ?⁠push_level:('th -> unit) -> ?⁠pop_levels:('th -> int -> unit) -> unit -> theory

Helper to create a theory

module Atom : sig ... end
module Model : sig ... end
module Unknown : sig ... end
module Proof : sig ... end
type proof = Proof.t

Main API

val stats : t -> Sidekick_util.Stat.t
val tst : t -> T.Term.state
val ty_st : t -> T.Ty.state
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠size:[ `Big | `Tiny | `Small ] -> ?⁠store_proof:bool -> theories:theory list -> T.Term.state -> T.Ty.state -> unit -> t

Create a new solver.

parameter theories

theories to load from the start.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val add_theory_p : t -> 'a theory_p -> 'a

Add the given theory and obtain its state

val add_theory_l : t -> theory list -> unit
val mk_atom_lit : t -> lit -> Atom.t
val mk_atom_t : t -> ?⁠sign:bool -> term -> Atom.t
val add_clause : t -> Atom.t Sidekick_util.IArray.t -> unit
val add_clause_l : t -> Atom.t list -> unit
type res =
| Sat of Model.t
| Unsat of {
proof : proof option lazy_t;
unsat_core : Atom.t list lazy_t;
}
| Unknown of Unknown.t

Result of solving for the current set of clauses

val solve : ?⁠on_exit:(unit -> unit) list -> ?⁠check:bool -> ?⁠on_progress:(t -> unit) -> assumptions:Atom.t list -> t -> res

solve s checks the satisfiability of the statement added so far to s

parameter check

if true, the model is checked before returning

parameter assumptions

a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

parameter on_exit

functions to be run before this returns

val pp_stats : t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/module-type-THEORY/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/module-type-THEORY/index.html new file mode 100644 index 00000000..81cc5c53 --- /dev/null +++ b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/module-type-THEORY/index.html @@ -0,0 +1,2 @@ + +THEORY (sidekick.Sidekick_th_cstor.ARG.S.THEORY)

Module type S.THEORY

A theory

Theories are abstracted over the concrete implementation of the solver, so they can work with any implementation.

Typically a theory should be a functor taking an argument containing a SOLVER_INTERNAL or even a full SOLVER, and some additional views on terms, literals, etc. that are specific to the theory (e.g. to map terms to linear expressions). The theory can then be instantiated on any kind of solver for any term representation that also satisfies the additional theory-specific requirements. Instantiated theories (ie values of type Sidekick_core.SOLVER.theory) can be added to the solver.

type t

The theory's state

val name : string

Name of the theory

val create_and_setup : Solver_internal.t -> t

Instantiate the theory's state for the given (internal) solver, register callbacks, create keys, etc.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Pop backtracking levels, restoring the theory to its former state

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-ARG/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/index.html new file mode 100644 index 00000000..b4cd4842 --- /dev/null +++ b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/index.html @@ -0,0 +1,2 @@ + +ARG (sidekick.Sidekick_th_cstor.ARG)

Module type Sidekick_th_cstor.ARG

val view_as_cstor : S.T.Term.t -> (S.T.Fun.tS.T.Term.t) cstor_view
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Atom/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Atom/index.html new file mode 100644 index 00000000..37bc8d3c --- /dev/null +++ b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Atom/index.html @@ -0,0 +1,2 @@ + +Atom (sidekick.Sidekick_th_cstor.S.A.S.Atom)

Module S.Atom

Boolean Atoms

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t CCFormat.printer
val neg : t -> t
val formula : t -> lit
val sign : t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Lit/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Lit/index.html new file mode 100644 index 00000000..0ef604b5 --- /dev/null +++ b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Lit/index.html @@ -0,0 +1,2 @@ + +Lit (sidekick.Sidekick_th_cstor.S.A.S.Lit)

Module S.Lit

module T = T
type t
val term : t -> T.Term.t
val sign : t -> bool
val neg : t -> t
val abs : t -> t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Model/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Model/index.html new file mode 100644 index 00000000..e8959e93 --- /dev/null +++ b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Model/index.html @@ -0,0 +1,2 @@ + +Model (sidekick.Sidekick_th_cstor.S.A.S.Model)

Module S.Model

type t
val empty : t
val mem : t -> term -> bool
val find : t -> term -> term option
val eval : t -> term -> term option
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/P/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/P/index.html new file mode 100644 index 00000000..c866d0d2 --- /dev/null +++ b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/P/index.html @@ -0,0 +1,2 @@ + +P (sidekick.Sidekick_th_cstor.S.A.S.P)

Module S.P

type t
val pp : t Sidekick_core.Fmt.printer
val default : t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Proof/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Proof/index.html new file mode 100644 index 00000000..2a9e064d --- /dev/null +++ b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Proof/index.html @@ -0,0 +1,2 @@ + +Proof (sidekick.Sidekick_th_cstor.S.A.S.Proof)

Module S.Proof

type t
val check : t -> unit
val pp_dot : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Solver_internal/CC/Actions/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Solver_internal/CC/Actions/index.html new file mode 100644 index 00000000..852d4ba5 --- /dev/null +++ b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Solver_internal/CC/Actions/index.html @@ -0,0 +1,2 @@ + +Actions (sidekick.Sidekick_th_cstor.S.A.S.Solver_internal.CC.Actions)

Module CC.Actions

module T = T
module P = P
module Lit = Lit
type t = actions
val raise_conflict : t -> Lit.t list -> P.t -> 'a
val propagate : t -> Lit.t -> reason:(unit -> Lit.t list) -> P.t -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Solver_internal/CC/Expl/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Solver_internal/CC/Expl/index.html new file mode 100644 index 00000000..b163bf3e --- /dev/null +++ b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Solver_internal/CC/Expl/index.html @@ -0,0 +1,2 @@ + +Expl (sidekick.Sidekick_th_cstor.S.A.S.Solver_internal.CC.Expl)

Module CC.Expl

type t
val pp : t Sidekick_core.Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
val mk_theory : t -> t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Solver_internal/CC/N/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Solver_internal/CC/N/index.html new file mode 100644 index 00000000..5512b0cd --- /dev/null +++ b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Solver_internal/CC/N/index.html @@ -0,0 +1,2 @@ + +N (sidekick.Sidekick_th_cstor.S.A.S.Solver_internal.CC.N)

Module CC.N

An equivalence class is a set of terms that are currently equal in the partial model built by the solver. The class is represented by a collection of nodes, one of which is distinguished and is called the "representative".

All information pertaining to the whole equivalence class is stored in this representative's node.

When two classes become equal (are "merged"), one of the two representatives is picked as the representative of the new class. The new class contains the union of the two old classes' nodes.

We also allow theories to store additional information in the representative. This information can be used when two classes are merged, to detect conflicts and solve equations à la Shostak.

type t
val term : t -> term
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
val is_root : t -> bool

Is the node a root (ie the representative of its class)?

val iter_class : t -> t Iter.t

Traverse the congruence class. Precondition: is_root n (see find below)

val iter_parents : t -> t Iter.t

Traverse the parents of the class. Precondition: is_root n (see find below)

type bitfield

A field in the bitfield of this node. This should only be allocated when a theory is initialized.

All fields are initially 0, are backtracked automatically, and are merged automatically when classes are merged.

val get_field : bitfield -> t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Solver_internal/CC/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Solver_internal/CC/index.html new file mode 100644 index 00000000..3e7a2f75 --- /dev/null +++ b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Solver_internal/CC/index.html @@ -0,0 +1,2 @@ + +CC (sidekick.Sidekick_th_cstor.S.A.S.Solver_internal.CC)

Module Solver_internal.CC

module T = T
module P = P
module Lit = Lit
module Actions : Sidekick_core.CC_ACTIONS with module T = T and module Lit = Lit and module P = P and type t = actions
type term_state = T.Term.state
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type proof = P.t
type actions = Actions.t
type t

Global state of the congruence closure

module N : sig ... end

An equivalence class is a set of terms that are currently equal in the partial model built by the solver. The class is represented by a collection of nodes, one of which is distinguished and is called the "representative".

module Expl : sig ... end
type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t
val term_state : t -> term_state
val find : t -> node -> repr

Current representative

val add_term : t -> term -> node

Add the term to the congruence closure, if not present already. Will be backtracked.

val mem_term : t -> term -> bool

Returns true if the term is explicitly present in the congruence closure

type ev_on_pre_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit
type ev_on_post_merge = t -> actions -> N.t -> N.t -> unit
type ev_on_new_term = t -> N.t -> term -> unit
type ev_on_conflict = t -> th:bool -> lit list -> unit
type ev_on_propagate = t -> lit -> (unit -> lit list) -> unit
type ev_on_is_subterm = N.t -> term -> unit
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_pre_merge:ev_on_pre_merge list -> ?⁠on_post_merge:ev_on_post_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠on_is_subterm:ev_on_is_subterm list -> ?⁠size:[ `Small | `Big ] -> term_state -> t

Create a new congruence closure.

val allocate_bitfield : descr:string -> t -> N.bitfield

Allocate a new bitfield for the nodes. See N.bitfield.

val set_bitfield : t -> N.bitfield -> bool -> N.t -> unit

Set the bitfield for the node. This will be backtracked. See N.bitfield.

val on_pre_merge : t -> ev_on_pre_merge -> unit

Add a function to be called when two classes are merged

val on_post_merge : t -> ev_on_post_merge -> unit

Add a function to be called when two classes are merged

val on_new_term : t -> ev_on_new_term -> unit

Add a function to be called when a new node is created

val on_conflict : t -> ev_on_conflict -> unit

Called when the congruence closure finds a conflict

val on_propagate : t -> ev_on_propagate -> unit

Called when the congruence closure propagates a literal

val on_is_subterm : t -> ev_on_is_subterm -> unit

Called on terms that are subterms of function symbols

val set_as_lit : t -> N.t -> lit -> unit

map the given node to a literal.

val find_t : t -> term -> repr

Current representative of the term.

raises Not_found

if the term is not already add-ed.

val add_seq : t -> term Iter.t -> unit

Add a sequence of terms to the congruence closure

val all_classes : t -> repr Iter.t

All current classes. This is costly, only use if there is no other solution

val assert_lit : t -> lit -> unit

Given a literal, assume it in the congruence closure and propagate its consequences. Will be backtracked.

Useful for the theory combination or the SAT solver's functor

val assert_lits : t -> lit Iter.t -> unit

Addition of many literals

val explain_eq : t -> N.t -> N.t -> lit list

Explain why the two nodes are equal. Fails if they are not, in an unspecified way

val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given explanation it must be a theory tautology that expl ==> absurd. To be used in theories.

val n_true : t -> N.t
val n_false : t -> N.t
val n_bool : t -> bool -> N.t
val merge : t -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val merge_t : t -> term -> term -> Expl.t -> unit

Shortcut for adding + merging

val check : t -> actions -> unit

Perform all pending operations done via assert_eq, assert_lit, etc. Will use the actions to propagate literals, declare conflicts, etc.

val new_merges : t -> bool

Called after check, returns true if some pairs of classes were merged.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Restore to state n calls to push_level earlier. Used during backtracking.

val get_model : t -> N.t Iter.t Iter.t

get all the equivalence classes so they can be merged in the model

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Solver_internal/Simplify/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Solver_internal/Simplify/index.html new file mode 100644 index 00000000..35f054be --- /dev/null +++ b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Solver_internal/Simplify/index.html @@ -0,0 +1,2 @@ + +Simplify (sidekick.Sidekick_th_cstor.S.A.S.Solver_internal.Simplify)

Module Solver_internal.Simplify

type t
val tst : t -> term_state
val ty_st : t -> ty_state
val clear : t -> unit

Reset internal cache, etc.

type hook = t -> term -> term option

Given a term, try to simplify it. Return None if it didn't change.

val normalize : t -> term -> term

Normalize a term using all the hooks.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Solver_internal/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Solver_internal/index.html new file mode 100644 index 00000000..2eadf6c9 --- /dev/null +++ b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Solver_internal/index.html @@ -0,0 +1,2 @@ + +Solver_internal (sidekick.Sidekick_th_cstor.S.A.S.Solver_internal)

Module S.Solver_internal

Internal solver, available to theories.

module T = T
module P = P
type ty = T.Ty.t
type term = T.Term.t
type term_state = T.Term.state
type ty_state = T.Ty.state
type proof = P.t
type t

Main type for a solver

type solver = t
val tst : t -> term_state
val ty_st : t -> ty_state
val stats : t -> Sidekick_util.Stat.t

Actions for the theories

type actions
module Lit = Lit
type lit = Lit.t

Congruence Closure

module CC : Sidekick_core.CC_S with module T = T and module P = P and module Lit = Lit and type Actions.t = actions
val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end
type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit
val simplifier : t -> Simplify.t
val simp_t : t -> term -> term

hooks for the theory

val propagate : t -> actions -> lit -> reason:(unit -> lit list) -> proof -> unit

Propagate a literal for a reason. This is similar to asserting the clause reason => lit, but more lightweight, and in a way that is backtrackable.

val raise_conflict : t -> actions -> lit list -> proof -> 'a

Give a conflict clause to the solver

val push_decision : t -> actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : t -> actions -> lit -> (unit -> lit list) -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> actions -> lit -> lit list -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> actions -> lit list -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : t -> actions -> lit list -> unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> actions -> ?⁠sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val preprocess_term : t -> add_clause:(Lit.t list -> unit) -> term -> term

Preprocess a term.

val add_lit : t -> actions -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value

val add_lit_t : t -> actions -> ?⁠sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit

Callback called on every CC conflict

val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list) -> unit) -> unit

Callback called on every CC propagation

val on_partial_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

type preprocess_hook = t -> mk_lit:(term -> lit) -> add_clause:(lit list -> unit) -> term -> term option

Given a term, try to preprocess it. Return None if it didn't change. Can also add clauses to define new terms.

parameter mk_lit

creates a new literal for a boolean term.

parameter add_clause

pushes a new clause into the SAT solver.

val on_preprocess : t -> preprocess_hook -> unit

Model production

type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option

A model-production hook. It takes the solver, a class, and returns a term for this class.

val on_model_gen : t -> model_hook -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/T/Fun/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/T/Fun/index.html new file mode 100644 index 00000000..0f27b90b --- /dev/null +++ b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/T/Fun/index.html @@ -0,0 +1,2 @@ + +Fun (sidekick.Sidekick_th_cstor.S.A.S.T.Fun)

Module T.Fun

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/T/Term/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/T/Term/index.html new file mode 100644 index 00000000..6a29f5ac --- /dev/null +++ b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/T/Term/index.html @@ -0,0 +1,2 @@ + +Term (sidekick.Sidekick_th_cstor.S.A.S.T.Term)

Module T.Term

type t
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type state
val ty : t -> Ty.t
val bool : state -> bool -> t
val as_bool : t -> bool option
val abs : state -> t -> t * bool
val map_shallow : state -> (t -> t) -> t -> t

Map function on immediate subterms

val iter_dag : t -> (t -> unit) -> unit
module Tbl : CCHashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/T/Ty/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/T/Ty/index.html new file mode 100644 index 00000000..7251ed97 --- /dev/null +++ b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/T/Ty/index.html @@ -0,0 +1,2 @@ + +Ty (sidekick.Sidekick_th_cstor.S.A.S.T.Ty)

Module T.Ty

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type state
val bool : state -> t
val is_bool : t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/T/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/T/index.html new file mode 100644 index 00000000..2679a26a --- /dev/null +++ b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/T/index.html @@ -0,0 +1,2 @@ + +T (sidekick.Sidekick_th_cstor.S.A.S.T)

Module S.T

module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Unknown/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Unknown/index.html new file mode 100644 index 00000000..0711a967 --- /dev/null +++ b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Unknown/index.html @@ -0,0 +1,2 @@ + +Unknown (sidekick.Sidekick_th_cstor.S.A.S.Unknown)

Module S.Unknown

type t
val pp : t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/index.html new file mode 100644 index 00000000..127e5b2d --- /dev/null +++ b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/index.html @@ -0,0 +1,2 @@ + +S (sidekick.Sidekick_th_cstor.S.A.S)

Module A.S

module Lit : Sidekick_core.LIT with module T = T
module Solver_internal : Sidekick_core.SOLVER_INTERNAL with module T = T and module P = P and module Lit = Lit

Internal solver, available to theories.

type t
type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t
type lemma = P.t
module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

type 'a theory_p = (module THEORY with type t = 'a)

A theory that can be used for this particular solver, with state of type 'a.

val mk_theory : name:string -> create_and_setup:(Solver_internal.t -> 'th) -> ?⁠push_level:('th -> unit) -> ?⁠pop_levels:('th -> int -> unit) -> unit -> theory

Helper to create a theory

module Atom : sig ... end
module Model : sig ... end
module Unknown : sig ... end
module Proof : sig ... end
type proof = Proof.t

Main API

val stats : t -> Sidekick_util.Stat.t
val tst : t -> T.Term.state
val ty_st : t -> T.Ty.state
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠size:[ `Big | `Tiny | `Small ] -> ?⁠store_proof:bool -> theories:theory list -> T.Term.state -> T.Ty.state -> unit -> t

Create a new solver.

parameter theories

theories to load from the start.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val add_theory_p : t -> 'a theory_p -> 'a

Add the given theory and obtain its state

val add_theory_l : t -> theory list -> unit
val mk_atom_lit : t -> lit -> Atom.t
val mk_atom_t : t -> ?⁠sign:bool -> term -> Atom.t
val add_clause : t -> Atom.t Sidekick_util.IArray.t -> unit
val add_clause_l : t -> Atom.t list -> unit
type res =
| Sat of Model.t
| Unsat of {
proof : proof option lazy_t;
unsat_core : Atom.t list lazy_t;
}
| Unknown of Unknown.t

Result of solving for the current set of clauses

val solve : ?⁠on_exit:(unit -> unit) list -> ?⁠check:bool -> ?⁠on_progress:(t -> unit) -> assumptions:Atom.t list -> t -> res

solve s checks the satisfiability of the statement added so far to s

parameter check

if true, the model is checked before returning

parameter assumptions

a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

parameter on_exit

functions to be run before this returns

val pp_stats : t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/module-type-THEORY/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/module-type-THEORY/index.html new file mode 100644 index 00000000..ce9e52a2 --- /dev/null +++ b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/module-type-THEORY/index.html @@ -0,0 +1,2 @@ + +THEORY (sidekick.Sidekick_th_cstor.S.A.S.THEORY)

Module type S.THEORY

A theory

Theories are abstracted over the concrete implementation of the solver, so they can work with any implementation.

Typically a theory should be a functor taking an argument containing a SOLVER_INTERNAL or even a full SOLVER, and some additional views on terms, literals, etc. that are specific to the theory (e.g. to map terms to linear expressions). The theory can then be instantiated on any kind of solver for any term representation that also satisfies the additional theory-specific requirements. Instantiated theories (ie values of type Sidekick_core.SOLVER.theory) can be added to the solver.

type t

The theory's state

val name : string

Name of the theory

val create_and_setup : Solver_internal.t -> t

Instantiate the theory's state for the given (internal) solver, register callbacks, create keys, etc.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Pop backtracking levels, restoring the theory to its former state

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-S/A/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/index.html new file mode 100644 index 00000000..25e83d16 --- /dev/null +++ b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/index.html @@ -0,0 +1,2 @@ + +A (sidekick.Sidekick_th_cstor.S.A)

Module S.A

val view_as_cstor : S.T.Term.t -> (S.T.Fun.tS.T.Term.t) cstor_view
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-S/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-S/index.html new file mode 100644 index 00000000..36c9e919 --- /dev/null +++ b/dev/sidekick/Sidekick_th_cstor/module-type-S/index.html @@ -0,0 +1,2 @@ + +S (sidekick.Sidekick_th_cstor.S)

Module type Sidekick_th_cstor.S

module A : ARG
val theory : A.S.theory
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/.dune-keep b/dev/sidekick/Sidekick_th_data/.dune-keep new file mode 100644 index 00000000..e69de29b diff --git a/dev/sidekick/Sidekick_th_data/Make/argument-1-A/Cstor/index.html b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/Cstor/index.html new file mode 100644 index 00000000..72d96c2f --- /dev/null +++ b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/Cstor/index.html @@ -0,0 +1,2 @@ + +Cstor (sidekick.Sidekick_th_data.Make.1-A.Cstor)

Module 1-A.Cstor

type t
val ty_args : t -> S.T.Ty.t Iter.t
val pp : t Sidekick_util.Fmt.printer
val equal : t -> t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Atom/index.html b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Atom/index.html new file mode 100644 index 00000000..978ef2a4 --- /dev/null +++ b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Atom/index.html @@ -0,0 +1,2 @@ + +Atom (sidekick.Sidekick_th_data.Make.1-A.S.Atom)

Module S.Atom

Boolean Atoms

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t CCFormat.printer
val neg : t -> t
val formula : t -> lit
val sign : t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Lit/index.html b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Lit/index.html new file mode 100644 index 00000000..737c52cc --- /dev/null +++ b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Lit/index.html @@ -0,0 +1,2 @@ + +Lit (sidekick.Sidekick_th_data.Make.1-A.S.Lit)

Module S.Lit

module T = T
type t
val term : t -> T.Term.t
val sign : t -> bool
val neg : t -> t
val abs : t -> t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Model/index.html b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Model/index.html new file mode 100644 index 00000000..26ca4315 --- /dev/null +++ b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Model/index.html @@ -0,0 +1,2 @@ + +Model (sidekick.Sidekick_th_data.Make.1-A.S.Model)

Module S.Model

type t
val empty : t
val mem : t -> term -> bool
val find : t -> term -> term option
val eval : t -> term -> term option
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/P/index.html b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/P/index.html new file mode 100644 index 00000000..508e9689 --- /dev/null +++ b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/P/index.html @@ -0,0 +1,2 @@ + +P (sidekick.Sidekick_th_data.Make.1-A.S.P)

Module S.P

type t
val pp : t Sidekick_core.Fmt.printer
val default : t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Proof/index.html b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Proof/index.html new file mode 100644 index 00000000..b3122f1e --- /dev/null +++ b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Proof/index.html @@ -0,0 +1,2 @@ + +Proof (sidekick.Sidekick_th_data.Make.1-A.S.Proof)

Module S.Proof

type t
val check : t -> unit
val pp_dot : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Solver_internal/CC/Actions/index.html b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Solver_internal/CC/Actions/index.html new file mode 100644 index 00000000..a9a573a8 --- /dev/null +++ b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Solver_internal/CC/Actions/index.html @@ -0,0 +1,2 @@ + +Actions (sidekick.Sidekick_th_data.Make.1-A.S.Solver_internal.CC.Actions)

Module CC.Actions

module T = T
module P = P
module Lit = Lit
type t = actions
val raise_conflict : t -> Lit.t list -> P.t -> 'a
val propagate : t -> Lit.t -> reason:(unit -> Lit.t list) -> P.t -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Solver_internal/CC/Expl/index.html b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Solver_internal/CC/Expl/index.html new file mode 100644 index 00000000..615c8964 --- /dev/null +++ b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Solver_internal/CC/Expl/index.html @@ -0,0 +1,2 @@ + +Expl (sidekick.Sidekick_th_data.Make.1-A.S.Solver_internal.CC.Expl)

Module CC.Expl

type t
val pp : t Sidekick_core.Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
val mk_theory : t -> t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Solver_internal/CC/N/index.html b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Solver_internal/CC/N/index.html new file mode 100644 index 00000000..4b033802 --- /dev/null +++ b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Solver_internal/CC/N/index.html @@ -0,0 +1,2 @@ + +N (sidekick.Sidekick_th_data.Make.1-A.S.Solver_internal.CC.N)

Module CC.N

An equivalence class is a set of terms that are currently equal in the partial model built by the solver. The class is represented by a collection of nodes, one of which is distinguished and is called the "representative".

All information pertaining to the whole equivalence class is stored in this representative's node.

When two classes become equal (are "merged"), one of the two representatives is picked as the representative of the new class. The new class contains the union of the two old classes' nodes.

We also allow theories to store additional information in the representative. This information can be used when two classes are merged, to detect conflicts and solve equations à la Shostak.

type t
val term : t -> term
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
val is_root : t -> bool

Is the node a root (ie the representative of its class)?

val iter_class : t -> t Iter.t

Traverse the congruence class. Precondition: is_root n (see find below)

val iter_parents : t -> t Iter.t

Traverse the parents of the class. Precondition: is_root n (see find below)

type bitfield

A field in the bitfield of this node. This should only be allocated when a theory is initialized.

All fields are initially 0, are backtracked automatically, and are merged automatically when classes are merged.

val get_field : bitfield -> t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Solver_internal/CC/index.html b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Solver_internal/CC/index.html new file mode 100644 index 00000000..fad9557d --- /dev/null +++ b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Solver_internal/CC/index.html @@ -0,0 +1,2 @@ + +CC (sidekick.Sidekick_th_data.Make.1-A.S.Solver_internal.CC)

Module Solver_internal.CC

module T = T
module P = P
module Lit = Lit
module Actions : Sidekick_core.CC_ACTIONS with module T = T and module Lit = Lit and module P = P and type t = actions
type term_state = T.Term.state
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type proof = P.t
type actions = Actions.t
type t

Global state of the congruence closure

module N : sig ... end

An equivalence class is a set of terms that are currently equal in the partial model built by the solver. The class is represented by a collection of nodes, one of which is distinguished and is called the "representative".

module Expl : sig ... end
type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t
val term_state : t -> term_state
val find : t -> node -> repr

Current representative

val add_term : t -> term -> node

Add the term to the congruence closure, if not present already. Will be backtracked.

val mem_term : t -> term -> bool

Returns true if the term is explicitly present in the congruence closure

type ev_on_pre_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit
type ev_on_post_merge = t -> actions -> N.t -> N.t -> unit
type ev_on_new_term = t -> N.t -> term -> unit
type ev_on_conflict = t -> th:bool -> lit list -> unit
type ev_on_propagate = t -> lit -> (unit -> lit list) -> unit
type ev_on_is_subterm = N.t -> term -> unit
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_pre_merge:ev_on_pre_merge list -> ?⁠on_post_merge:ev_on_post_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠on_is_subterm:ev_on_is_subterm list -> ?⁠size:[ `Small | `Big ] -> term_state -> t

Create a new congruence closure.

val allocate_bitfield : descr:string -> t -> N.bitfield

Allocate a new bitfield for the nodes. See N.bitfield.

val set_bitfield : t -> N.bitfield -> bool -> N.t -> unit

Set the bitfield for the node. This will be backtracked. See N.bitfield.

val on_pre_merge : t -> ev_on_pre_merge -> unit

Add a function to be called when two classes are merged

val on_post_merge : t -> ev_on_post_merge -> unit

Add a function to be called when two classes are merged

val on_new_term : t -> ev_on_new_term -> unit

Add a function to be called when a new node is created

val on_conflict : t -> ev_on_conflict -> unit

Called when the congruence closure finds a conflict

val on_propagate : t -> ev_on_propagate -> unit

Called when the congruence closure propagates a literal

val on_is_subterm : t -> ev_on_is_subterm -> unit

Called on terms that are subterms of function symbols

val set_as_lit : t -> N.t -> lit -> unit

map the given node to a literal.

val find_t : t -> term -> repr

Current representative of the term.

raises Not_found

if the term is not already add-ed.

val add_seq : t -> term Iter.t -> unit

Add a sequence of terms to the congruence closure

val all_classes : t -> repr Iter.t

All current classes. This is costly, only use if there is no other solution

val assert_lit : t -> lit -> unit

Given a literal, assume it in the congruence closure and propagate its consequences. Will be backtracked.

Useful for the theory combination or the SAT solver's functor

val assert_lits : t -> lit Iter.t -> unit

Addition of many literals

val explain_eq : t -> N.t -> N.t -> lit list

Explain why the two nodes are equal. Fails if they are not, in an unspecified way

val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given explanation it must be a theory tautology that expl ==> absurd. To be used in theories.

val n_true : t -> N.t
val n_false : t -> N.t
val n_bool : t -> bool -> N.t
val merge : t -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val merge_t : t -> term -> term -> Expl.t -> unit

Shortcut for adding + merging

val check : t -> actions -> unit

Perform all pending operations done via assert_eq, assert_lit, etc. Will use the actions to propagate literals, declare conflicts, etc.

val new_merges : t -> bool

Called after check, returns true if some pairs of classes were merged.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Restore to state n calls to push_level earlier. Used during backtracking.

val get_model : t -> N.t Iter.t Iter.t

get all the equivalence classes so they can be merged in the model

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Solver_internal/Simplify/index.html b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Solver_internal/Simplify/index.html new file mode 100644 index 00000000..5d66f7a6 --- /dev/null +++ b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Solver_internal/Simplify/index.html @@ -0,0 +1,2 @@ + +Simplify (sidekick.Sidekick_th_data.Make.1-A.S.Solver_internal.Simplify)

Module Solver_internal.Simplify

type t
val tst : t -> term_state
val ty_st : t -> ty_state
val clear : t -> unit

Reset internal cache, etc.

type hook = t -> term -> term option

Given a term, try to simplify it. Return None if it didn't change.

val normalize : t -> term -> term

Normalize a term using all the hooks.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Solver_internal/index.html b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Solver_internal/index.html new file mode 100644 index 00000000..3140dd19 --- /dev/null +++ b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Solver_internal/index.html @@ -0,0 +1,2 @@ + +Solver_internal (sidekick.Sidekick_th_data.Make.1-A.S.Solver_internal)

Module S.Solver_internal

Internal solver, available to theories.

module T = T
module P = P
type ty = T.Ty.t
type term = T.Term.t
type term_state = T.Term.state
type ty_state = T.Ty.state
type proof = P.t
type t

Main type for a solver

type solver = t
val tst : t -> term_state
val ty_st : t -> ty_state
val stats : t -> Sidekick_util.Stat.t

Actions for the theories

type actions
module Lit = Lit
type lit = Lit.t

Congruence Closure

module CC : Sidekick_core.CC_S with module T = T and module P = P and module Lit = Lit and type Actions.t = actions
val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end
type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit
val simplifier : t -> Simplify.t
val simp_t : t -> term -> term

hooks for the theory

val propagate : t -> actions -> lit -> reason:(unit -> lit list) -> proof -> unit

Propagate a literal for a reason. This is similar to asserting the clause reason => lit, but more lightweight, and in a way that is backtrackable.

val raise_conflict : t -> actions -> lit list -> proof -> 'a

Give a conflict clause to the solver

val push_decision : t -> actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : t -> actions -> lit -> (unit -> lit list) -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> actions -> lit -> lit list -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> actions -> lit list -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : t -> actions -> lit list -> unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> actions -> ?⁠sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val preprocess_term : t -> add_clause:(Lit.t list -> unit) -> term -> term

Preprocess a term.

val add_lit : t -> actions -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value

val add_lit_t : t -> actions -> ?⁠sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit

Callback called on every CC conflict

val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list) -> unit) -> unit

Callback called on every CC propagation

val on_partial_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

type preprocess_hook = t -> mk_lit:(term -> lit) -> add_clause:(lit list -> unit) -> term -> term option

Given a term, try to preprocess it. Return None if it didn't change. Can also add clauses to define new terms.

parameter mk_lit

creates a new literal for a boolean term.

parameter add_clause

pushes a new clause into the SAT solver.

val on_preprocess : t -> preprocess_hook -> unit

Model production

type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option

A model-production hook. It takes the solver, a class, and returns a term for this class.

val on_model_gen : t -> model_hook -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/T/Fun/index.html b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/T/Fun/index.html new file mode 100644 index 00000000..698b169d --- /dev/null +++ b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/T/Fun/index.html @@ -0,0 +1,2 @@ + +Fun (sidekick.Sidekick_th_data.Make.1-A.S.T.Fun)

Module T.Fun

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/T/Term/index.html b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/T/Term/index.html new file mode 100644 index 00000000..11a605d6 --- /dev/null +++ b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/T/Term/index.html @@ -0,0 +1,2 @@ + +Term (sidekick.Sidekick_th_data.Make.1-A.S.T.Term)

Module T.Term

type t
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type state
val ty : t -> Ty.t
val bool : state -> bool -> t
val as_bool : t -> bool option
val abs : state -> t -> t * bool
val map_shallow : state -> (t -> t) -> t -> t

Map function on immediate subterms

val iter_dag : t -> (t -> unit) -> unit
module Tbl : CCHashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/T/Ty/index.html b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/T/Ty/index.html new file mode 100644 index 00000000..f82d410c --- /dev/null +++ b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/T/Ty/index.html @@ -0,0 +1,2 @@ + +Ty (sidekick.Sidekick_th_data.Make.1-A.S.T.Ty)

Module T.Ty

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type state
val bool : state -> t
val is_bool : t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/T/index.html b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/T/index.html new file mode 100644 index 00000000..844d87e2 --- /dev/null +++ b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/T/index.html @@ -0,0 +1,2 @@ + +T (sidekick.Sidekick_th_data.Make.1-A.S.T)

Module S.T

module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Unknown/index.html b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Unknown/index.html new file mode 100644 index 00000000..42f20839 --- /dev/null +++ b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Unknown/index.html @@ -0,0 +1,2 @@ + +Unknown (sidekick.Sidekick_th_data.Make.1-A.S.Unknown)

Module S.Unknown

type t
val pp : t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/index.html b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/index.html new file mode 100644 index 00000000..958ce69d --- /dev/null +++ b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/index.html @@ -0,0 +1,2 @@ + +S (sidekick.Sidekick_th_data.Make.1-A.S)

Module 1-A.S

module Lit : Sidekick_core.LIT with module T = T
module Solver_internal : Sidekick_core.SOLVER_INTERNAL with module T = T and module P = P and module Lit = Lit

Internal solver, available to theories.

type t
type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t
type lemma = P.t
module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

type 'a theory_p = (module THEORY with type t = 'a)

A theory that can be used for this particular solver, with state of type 'a.

val mk_theory : name:string -> create_and_setup:(Solver_internal.t -> 'th) -> ?⁠push_level:('th -> unit) -> ?⁠pop_levels:('th -> int -> unit) -> unit -> theory

Helper to create a theory

module Atom : sig ... end
module Model : sig ... end
module Unknown : sig ... end
module Proof : sig ... end
type proof = Proof.t

Main API

val stats : t -> Sidekick_util.Stat.t
val tst : t -> T.Term.state
val ty_st : t -> T.Ty.state
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠size:[ `Big | `Tiny | `Small ] -> ?⁠store_proof:bool -> theories:theory list -> T.Term.state -> T.Ty.state -> unit -> t

Create a new solver.

parameter theories

theories to load from the start.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val add_theory_p : t -> 'a theory_p -> 'a

Add the given theory and obtain its state

val add_theory_l : t -> theory list -> unit
val mk_atom_lit : t -> lit -> Atom.t
val mk_atom_t : t -> ?⁠sign:bool -> term -> Atom.t
val add_clause : t -> Atom.t Sidekick_util.IArray.t -> unit
val add_clause_l : t -> Atom.t list -> unit
type res =
| Sat of Model.t
| Unsat of {
proof : proof option lazy_t;
unsat_core : Atom.t list lazy_t;
}
| Unknown of Unknown.t

Result of solving for the current set of clauses

val solve : ?⁠on_exit:(unit -> unit) list -> ?⁠check:bool -> ?⁠on_progress:(t -> unit) -> assumptions:Atom.t list -> t -> res

solve s checks the satisfiability of the statement added so far to s

parameter check

if true, the model is checked before returning

parameter assumptions

a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

parameter on_exit

functions to be run before this returns

val pp_stats : t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/module-type-THEORY/index.html b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/module-type-THEORY/index.html new file mode 100644 index 00000000..2762ef3f --- /dev/null +++ b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/module-type-THEORY/index.html @@ -0,0 +1,2 @@ + +THEORY (sidekick.Sidekick_th_data.Make.1-A.S.THEORY)

Module type S.THEORY

A theory

Theories are abstracted over the concrete implementation of the solver, so they can work with any implementation.

Typically a theory should be a functor taking an argument containing a SOLVER_INTERNAL or even a full SOLVER, and some additional views on terms, literals, etc. that are specific to the theory (e.g. to map terms to linear expressions). The theory can then be instantiated on any kind of solver for any term representation that also satisfies the additional theory-specific requirements. Instantiated theories (ie values of type Sidekick_core.SOLVER.theory) can be added to the solver.

type t

The theory's state

val name : string

Name of the theory

val create_and_setup : Solver_internal.t -> t

Instantiate the theory's state for the given (internal) solver, register callbacks, create keys, etc.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Pop backtracking levels, restoring the theory to its former state

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/Make/argument-1-A/index.html b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/index.html new file mode 100644 index 00000000..2592be9e --- /dev/null +++ b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/index.html @@ -0,0 +1,2 @@ + +1-A (sidekick.Sidekick_th_data.Make.1-A)

Parameter Make.1-A

module Cstor : sig ... end
val as_datatype : S.T.Ty.t -> (Cstor.t Iter.tS.T.Ty.t) data_ty_view

Try to view type as a datatype (with its constructors)

val view_as_data : S.T.Term.t -> (Cstor.tS.T.Term.t) data_view

Try to view term as a datatype term

val mk_cstor : S.T.Term.state -> Cstor.t -> S.T.Term.t Sidekick_util.IArray.t -> S.T.Term.t

Make a constructor application term

val mk_is_a : S.T.Term.state -> Cstor.t -> S.T.Term.t -> S.T.Term.t

Make a is-a term

val mk_sel : S.T.Term.state -> Cstor.t -> int -> S.T.Term.t -> S.T.Term.t

Make a selector term

val mk_eq : S.T.Term.state -> S.T.Term.t -> S.T.Term.t -> S.T.Term.t

Make a term equality

val ty_is_finite : S.T.Ty.t -> bool

Is the given type known to be finite?

val ty_set_is_finite : S.T.Ty.t -> bool -> unit

Modify the "finite" field (see ty_is_finite)

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/Make/index.html b/dev/sidekick/Sidekick_th_data/Make/index.html new file mode 100644 index 00000000..cdc2a6b4 --- /dev/null +++ b/dev/sidekick/Sidekick_th_data/Make/index.html @@ -0,0 +1,2 @@ + +Make (sidekick.Sidekick_th_data.Make)

Module Sidekick_th_data.Make

Parameters

Signature

module A = A
val theory : A.S.theory
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/index.html b/dev/sidekick/Sidekick_th_data/index.html new file mode 100644 index 00000000..99374d43 --- /dev/null +++ b/dev/sidekick/Sidekick_th_data/index.html @@ -0,0 +1,2 @@ + +Sidekick_th_data (sidekick.Sidekick_th_data)

Module Sidekick_th_data

type ('c, 't) data_view =
| T_cstor of 'c * 't Sidekick_util.IArray.t
| T_select of 'c * int * 't
| T_is_a of 'c * 't
| T_other of 't

Datatype-oriented view of terms. 'c is the representation of constructors 't is the representation of terms

type ('c, 'ty) data_ty_view =
| Ty_arrow of 'ty Iter.t * 'ty
| Ty_app of {
args : 'ty Iter.t;
}
| Ty_data of {
cstors : 'c;
}
| Ty_other

View of types in a way that is directly useful for the theory of datatypes

module type ARG = sig ... end
module type S = sig ... end
module Make : functor (A : ARG) -> S with module A = A
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/module-type-ARG/Cstor/index.html b/dev/sidekick/Sidekick_th_data/module-type-ARG/Cstor/index.html new file mode 100644 index 00000000..1b6e49e7 --- /dev/null +++ b/dev/sidekick/Sidekick_th_data/module-type-ARG/Cstor/index.html @@ -0,0 +1,2 @@ + +Cstor (sidekick.Sidekick_th_data.ARG.Cstor)

Module ARG.Cstor

type t
val ty_args : t -> S.T.Ty.t Iter.t
val pp : t Sidekick_util.Fmt.printer
val equal : t -> t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Atom/index.html b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Atom/index.html new file mode 100644 index 00000000..b6599b4e --- /dev/null +++ b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Atom/index.html @@ -0,0 +1,2 @@ + +Atom (sidekick.Sidekick_th_data.ARG.S.Atom)

Module S.Atom

Boolean Atoms

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t CCFormat.printer
val neg : t -> t
val formula : t -> lit
val sign : t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Lit/index.html b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Lit/index.html new file mode 100644 index 00000000..562b34db --- /dev/null +++ b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Lit/index.html @@ -0,0 +1,2 @@ + +Lit (sidekick.Sidekick_th_data.ARG.S.Lit)

Module S.Lit

module T = T
type t
val term : t -> T.Term.t
val sign : t -> bool
val neg : t -> t
val abs : t -> t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Model/index.html b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Model/index.html new file mode 100644 index 00000000..c78bb237 --- /dev/null +++ b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Model/index.html @@ -0,0 +1,2 @@ + +Model (sidekick.Sidekick_th_data.ARG.S.Model)

Module S.Model

type t
val empty : t
val mem : t -> term -> bool
val find : t -> term -> term option
val eval : t -> term -> term option
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/module-type-ARG/S/P/index.html b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/P/index.html new file mode 100644 index 00000000..133b2162 --- /dev/null +++ b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/P/index.html @@ -0,0 +1,2 @@ + +P (sidekick.Sidekick_th_data.ARG.S.P)

Module S.P

type t
val pp : t Sidekick_core.Fmt.printer
val default : t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Proof/index.html b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Proof/index.html new file mode 100644 index 00000000..4fb6358c --- /dev/null +++ b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Proof/index.html @@ -0,0 +1,2 @@ + +Proof (sidekick.Sidekick_th_data.ARG.S.Proof)

Module S.Proof

type t
val check : t -> unit
val pp_dot : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Solver_internal/CC/Actions/index.html b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Solver_internal/CC/Actions/index.html new file mode 100644 index 00000000..d2fb9b2d --- /dev/null +++ b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Solver_internal/CC/Actions/index.html @@ -0,0 +1,2 @@ + +Actions (sidekick.Sidekick_th_data.ARG.S.Solver_internal.CC.Actions)

Module CC.Actions

module T = T
module P = P
module Lit = Lit
type t = actions
val raise_conflict : t -> Lit.t list -> P.t -> 'a
val propagate : t -> Lit.t -> reason:(unit -> Lit.t list) -> P.t -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Solver_internal/CC/Expl/index.html b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Solver_internal/CC/Expl/index.html new file mode 100644 index 00000000..73b5e2c9 --- /dev/null +++ b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Solver_internal/CC/Expl/index.html @@ -0,0 +1,2 @@ + +Expl (sidekick.Sidekick_th_data.ARG.S.Solver_internal.CC.Expl)

Module CC.Expl

type t
val pp : t Sidekick_core.Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
val mk_theory : t -> t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Solver_internal/CC/N/index.html b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Solver_internal/CC/N/index.html new file mode 100644 index 00000000..4efa6433 --- /dev/null +++ b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Solver_internal/CC/N/index.html @@ -0,0 +1,2 @@ + +N (sidekick.Sidekick_th_data.ARG.S.Solver_internal.CC.N)

Module CC.N

An equivalence class is a set of terms that are currently equal in the partial model built by the solver. The class is represented by a collection of nodes, one of which is distinguished and is called the "representative".

All information pertaining to the whole equivalence class is stored in this representative's node.

When two classes become equal (are "merged"), one of the two representatives is picked as the representative of the new class. The new class contains the union of the two old classes' nodes.

We also allow theories to store additional information in the representative. This information can be used when two classes are merged, to detect conflicts and solve equations à la Shostak.

type t
val term : t -> term
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
val is_root : t -> bool

Is the node a root (ie the representative of its class)?

val iter_class : t -> t Iter.t

Traverse the congruence class. Precondition: is_root n (see find below)

val iter_parents : t -> t Iter.t

Traverse the parents of the class. Precondition: is_root n (see find below)

type bitfield

A field in the bitfield of this node. This should only be allocated when a theory is initialized.

All fields are initially 0, are backtracked automatically, and are merged automatically when classes are merged.

val get_field : bitfield -> t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Solver_internal/CC/index.html b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Solver_internal/CC/index.html new file mode 100644 index 00000000..3bafe023 --- /dev/null +++ b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Solver_internal/CC/index.html @@ -0,0 +1,2 @@ + +CC (sidekick.Sidekick_th_data.ARG.S.Solver_internal.CC)

Module Solver_internal.CC

module T = T
module P = P
module Lit = Lit
module Actions : Sidekick_core.CC_ACTIONS with module T = T and module Lit = Lit and module P = P and type t = actions
type term_state = T.Term.state
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type proof = P.t
type actions = Actions.t
type t

Global state of the congruence closure

module N : sig ... end

An equivalence class is a set of terms that are currently equal in the partial model built by the solver. The class is represented by a collection of nodes, one of which is distinguished and is called the "representative".

module Expl : sig ... end
type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t
val term_state : t -> term_state
val find : t -> node -> repr

Current representative

val add_term : t -> term -> node

Add the term to the congruence closure, if not present already. Will be backtracked.

val mem_term : t -> term -> bool

Returns true if the term is explicitly present in the congruence closure

type ev_on_pre_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit
type ev_on_post_merge = t -> actions -> N.t -> N.t -> unit
type ev_on_new_term = t -> N.t -> term -> unit
type ev_on_conflict = t -> th:bool -> lit list -> unit
type ev_on_propagate = t -> lit -> (unit -> lit list) -> unit
type ev_on_is_subterm = N.t -> term -> unit
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_pre_merge:ev_on_pre_merge list -> ?⁠on_post_merge:ev_on_post_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠on_is_subterm:ev_on_is_subterm list -> ?⁠size:[ `Small | `Big ] -> term_state -> t

Create a new congruence closure.

val allocate_bitfield : descr:string -> t -> N.bitfield

Allocate a new bitfield for the nodes. See N.bitfield.

val set_bitfield : t -> N.bitfield -> bool -> N.t -> unit

Set the bitfield for the node. This will be backtracked. See N.bitfield.

val on_pre_merge : t -> ev_on_pre_merge -> unit

Add a function to be called when two classes are merged

val on_post_merge : t -> ev_on_post_merge -> unit

Add a function to be called when two classes are merged

val on_new_term : t -> ev_on_new_term -> unit

Add a function to be called when a new node is created

val on_conflict : t -> ev_on_conflict -> unit

Called when the congruence closure finds a conflict

val on_propagate : t -> ev_on_propagate -> unit

Called when the congruence closure propagates a literal

val on_is_subterm : t -> ev_on_is_subterm -> unit

Called on terms that are subterms of function symbols

val set_as_lit : t -> N.t -> lit -> unit

map the given node to a literal.

val find_t : t -> term -> repr

Current representative of the term.

raises Not_found

if the term is not already add-ed.

val add_seq : t -> term Iter.t -> unit

Add a sequence of terms to the congruence closure

val all_classes : t -> repr Iter.t

All current classes. This is costly, only use if there is no other solution

val assert_lit : t -> lit -> unit

Given a literal, assume it in the congruence closure and propagate its consequences. Will be backtracked.

Useful for the theory combination or the SAT solver's functor

val assert_lits : t -> lit Iter.t -> unit

Addition of many literals

val explain_eq : t -> N.t -> N.t -> lit list

Explain why the two nodes are equal. Fails if they are not, in an unspecified way

val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given explanation it must be a theory tautology that expl ==> absurd. To be used in theories.

val n_true : t -> N.t
val n_false : t -> N.t
val n_bool : t -> bool -> N.t
val merge : t -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val merge_t : t -> term -> term -> Expl.t -> unit

Shortcut for adding + merging

val check : t -> actions -> unit

Perform all pending operations done via assert_eq, assert_lit, etc. Will use the actions to propagate literals, declare conflicts, etc.

val new_merges : t -> bool

Called after check, returns true if some pairs of classes were merged.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Restore to state n calls to push_level earlier. Used during backtracking.

val get_model : t -> N.t Iter.t Iter.t

get all the equivalence classes so they can be merged in the model

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Solver_internal/Simplify/index.html b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Solver_internal/Simplify/index.html new file mode 100644 index 00000000..75cfaac4 --- /dev/null +++ b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Solver_internal/Simplify/index.html @@ -0,0 +1,2 @@ + +Simplify (sidekick.Sidekick_th_data.ARG.S.Solver_internal.Simplify)

Module Solver_internal.Simplify

type t
val tst : t -> term_state
val ty_st : t -> ty_state
val clear : t -> unit

Reset internal cache, etc.

type hook = t -> term -> term option

Given a term, try to simplify it. Return None if it didn't change.

val normalize : t -> term -> term

Normalize a term using all the hooks.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Solver_internal/index.html b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Solver_internal/index.html new file mode 100644 index 00000000..82cd782c --- /dev/null +++ b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Solver_internal/index.html @@ -0,0 +1,2 @@ + +Solver_internal (sidekick.Sidekick_th_data.ARG.S.Solver_internal)

Module S.Solver_internal

Internal solver, available to theories.

module T = T
module P = P
type ty = T.Ty.t
type term = T.Term.t
type term_state = T.Term.state
type ty_state = T.Ty.state
type proof = P.t
type t

Main type for a solver

type solver = t
val tst : t -> term_state
val ty_st : t -> ty_state
val stats : t -> Sidekick_util.Stat.t

Actions for the theories

type actions
module Lit = Lit
type lit = Lit.t

Congruence Closure

module CC : Sidekick_core.CC_S with module T = T and module P = P and module Lit = Lit and type Actions.t = actions
val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end
type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit
val simplifier : t -> Simplify.t
val simp_t : t -> term -> term

hooks for the theory

val propagate : t -> actions -> lit -> reason:(unit -> lit list) -> proof -> unit

Propagate a literal for a reason. This is similar to asserting the clause reason => lit, but more lightweight, and in a way that is backtrackable.

val raise_conflict : t -> actions -> lit list -> proof -> 'a

Give a conflict clause to the solver

val push_decision : t -> actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : t -> actions -> lit -> (unit -> lit list) -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> actions -> lit -> lit list -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> actions -> lit list -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : t -> actions -> lit list -> unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> actions -> ?⁠sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val preprocess_term : t -> add_clause:(Lit.t list -> unit) -> term -> term

Preprocess a term.

val add_lit : t -> actions -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value

val add_lit_t : t -> actions -> ?⁠sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit

Callback called on every CC conflict

val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list) -> unit) -> unit

Callback called on every CC propagation

val on_partial_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

type preprocess_hook = t -> mk_lit:(term -> lit) -> add_clause:(lit list -> unit) -> term -> term option

Given a term, try to preprocess it. Return None if it didn't change. Can also add clauses to define new terms.

parameter mk_lit

creates a new literal for a boolean term.

parameter add_clause

pushes a new clause into the SAT solver.

val on_preprocess : t -> preprocess_hook -> unit

Model production

type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option

A model-production hook. It takes the solver, a class, and returns a term for this class.

val on_model_gen : t -> model_hook -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/module-type-ARG/S/T/Fun/index.html b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/T/Fun/index.html new file mode 100644 index 00000000..464bb1fc --- /dev/null +++ b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/T/Fun/index.html @@ -0,0 +1,2 @@ + +Fun (sidekick.Sidekick_th_data.ARG.S.T.Fun)

Module T.Fun

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/module-type-ARG/S/T/Term/index.html b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/T/Term/index.html new file mode 100644 index 00000000..afc321dc --- /dev/null +++ b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/T/Term/index.html @@ -0,0 +1,2 @@ + +Term (sidekick.Sidekick_th_data.ARG.S.T.Term)

Module T.Term

type t
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type state
val ty : t -> Ty.t
val bool : state -> bool -> t
val as_bool : t -> bool option
val abs : state -> t -> t * bool
val map_shallow : state -> (t -> t) -> t -> t

Map function on immediate subterms

val iter_dag : t -> (t -> unit) -> unit
module Tbl : CCHashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/module-type-ARG/S/T/Ty/index.html b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/T/Ty/index.html new file mode 100644 index 00000000..44316351 --- /dev/null +++ b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/T/Ty/index.html @@ -0,0 +1,2 @@ + +Ty (sidekick.Sidekick_th_data.ARG.S.T.Ty)

Module T.Ty

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type state
val bool : state -> t
val is_bool : t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/module-type-ARG/S/T/index.html b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/T/index.html new file mode 100644 index 00000000..bfe4f8fa --- /dev/null +++ b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/T/index.html @@ -0,0 +1,2 @@ + +T (sidekick.Sidekick_th_data.ARG.S.T)

Module S.T

module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Unknown/index.html b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Unknown/index.html new file mode 100644 index 00000000..6c5eee8d --- /dev/null +++ b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Unknown/index.html @@ -0,0 +1,2 @@ + +Unknown (sidekick.Sidekick_th_data.ARG.S.Unknown)

Module S.Unknown

type t
val pp : t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/module-type-ARG/S/index.html b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/index.html new file mode 100644 index 00000000..88ddff0e --- /dev/null +++ b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/index.html @@ -0,0 +1,2 @@ + +S (sidekick.Sidekick_th_data.ARG.S)

Module ARG.S

module Lit : Sidekick_core.LIT with module T = T
module Solver_internal : Sidekick_core.SOLVER_INTERNAL with module T = T and module P = P and module Lit = Lit

Internal solver, available to theories.

type t
type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t
type lemma = P.t
module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

type 'a theory_p = (module THEORY with type t = 'a)

A theory that can be used for this particular solver, with state of type 'a.

val mk_theory : name:string -> create_and_setup:(Solver_internal.t -> 'th) -> ?⁠push_level:('th -> unit) -> ?⁠pop_levels:('th -> int -> unit) -> unit -> theory

Helper to create a theory

module Atom : sig ... end
module Model : sig ... end
module Unknown : sig ... end
module Proof : sig ... end
type proof = Proof.t

Main API

val stats : t -> Sidekick_util.Stat.t
val tst : t -> T.Term.state
val ty_st : t -> T.Ty.state
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠size:[ `Big | `Tiny | `Small ] -> ?⁠store_proof:bool -> theories:theory list -> T.Term.state -> T.Ty.state -> unit -> t

Create a new solver.

parameter theories

theories to load from the start.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val add_theory_p : t -> 'a theory_p -> 'a

Add the given theory and obtain its state

val add_theory_l : t -> theory list -> unit
val mk_atom_lit : t -> lit -> Atom.t
val mk_atom_t : t -> ?⁠sign:bool -> term -> Atom.t
val add_clause : t -> Atom.t Sidekick_util.IArray.t -> unit
val add_clause_l : t -> Atom.t list -> unit
type res =
| Sat of Model.t
| Unsat of {
proof : proof option lazy_t;
unsat_core : Atom.t list lazy_t;
}
| Unknown of Unknown.t

Result of solving for the current set of clauses

val solve : ?⁠on_exit:(unit -> unit) list -> ?⁠check:bool -> ?⁠on_progress:(t -> unit) -> assumptions:Atom.t list -> t -> res

solve s checks the satisfiability of the statement added so far to s

parameter check

if true, the model is checked before returning

parameter assumptions

a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

parameter on_exit

functions to be run before this returns

val pp_stats : t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/module-type-ARG/S/module-type-THEORY/index.html b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/module-type-THEORY/index.html new file mode 100644 index 00000000..15597ec7 --- /dev/null +++ b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/module-type-THEORY/index.html @@ -0,0 +1,2 @@ + +THEORY (sidekick.Sidekick_th_data.ARG.S.THEORY)

Module type S.THEORY

A theory

Theories are abstracted over the concrete implementation of the solver, so they can work with any implementation.

Typically a theory should be a functor taking an argument containing a SOLVER_INTERNAL or even a full SOLVER, and some additional views on terms, literals, etc. that are specific to the theory (e.g. to map terms to linear expressions). The theory can then be instantiated on any kind of solver for any term representation that also satisfies the additional theory-specific requirements. Instantiated theories (ie values of type Sidekick_core.SOLVER.theory) can be added to the solver.

type t

The theory's state

val name : string

Name of the theory

val create_and_setup : Solver_internal.t -> t

Instantiate the theory's state for the given (internal) solver, register callbacks, create keys, etc.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Pop backtracking levels, restoring the theory to its former state

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/module-type-ARG/index.html b/dev/sidekick/Sidekick_th_data/module-type-ARG/index.html new file mode 100644 index 00000000..8bf5f6b8 --- /dev/null +++ b/dev/sidekick/Sidekick_th_data/module-type-ARG/index.html @@ -0,0 +1,2 @@ + +ARG (sidekick.Sidekick_th_data.ARG)

Module type Sidekick_th_data.ARG

module Cstor : sig ... end
val as_datatype : S.T.Ty.t -> (Cstor.t Iter.tS.T.Ty.t) data_ty_view

Try to view type as a datatype (with its constructors)

val view_as_data : S.T.Term.t -> (Cstor.tS.T.Term.t) data_view

Try to view term as a datatype term

val mk_cstor : S.T.Term.state -> Cstor.t -> S.T.Term.t Sidekick_util.IArray.t -> S.T.Term.t

Make a constructor application term

val mk_is_a : S.T.Term.state -> Cstor.t -> S.T.Term.t -> S.T.Term.t

Make a is-a term

val mk_sel : S.T.Term.state -> Cstor.t -> int -> S.T.Term.t -> S.T.Term.t

Make a selector term

val mk_eq : S.T.Term.state -> S.T.Term.t -> S.T.Term.t -> S.T.Term.t

Make a term equality

val ty_is_finite : S.T.Ty.t -> bool

Is the given type known to be finite?

val ty_set_is_finite : S.T.Ty.t -> bool -> unit

Modify the "finite" field (see ty_is_finite)

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/module-type-S/A/Cstor/index.html b/dev/sidekick/Sidekick_th_data/module-type-S/A/Cstor/index.html new file mode 100644 index 00000000..582a1246 --- /dev/null +++ b/dev/sidekick/Sidekick_th_data/module-type-S/A/Cstor/index.html @@ -0,0 +1,2 @@ + +Cstor (sidekick.Sidekick_th_data.S.A.Cstor)

Module A.Cstor

type t
val ty_args : t -> S.T.Ty.t Iter.t
val pp : t Sidekick_util.Fmt.printer
val equal : t -> t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Atom/index.html b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Atom/index.html new file mode 100644 index 00000000..b72afa7f --- /dev/null +++ b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Atom/index.html @@ -0,0 +1,2 @@ + +Atom (sidekick.Sidekick_th_data.S.A.S.Atom)

Module S.Atom

Boolean Atoms

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t CCFormat.printer
val neg : t -> t
val formula : t -> lit
val sign : t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Lit/index.html b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Lit/index.html new file mode 100644 index 00000000..339d6b44 --- /dev/null +++ b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Lit/index.html @@ -0,0 +1,2 @@ + +Lit (sidekick.Sidekick_th_data.S.A.S.Lit)

Module S.Lit

module T = T
type t
val term : t -> T.Term.t
val sign : t -> bool
val neg : t -> t
val abs : t -> t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Model/index.html b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Model/index.html new file mode 100644 index 00000000..35c3fa3f --- /dev/null +++ b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Model/index.html @@ -0,0 +1,2 @@ + +Model (sidekick.Sidekick_th_data.S.A.S.Model)

Module S.Model

type t
val empty : t
val mem : t -> term -> bool
val find : t -> term -> term option
val eval : t -> term -> term option
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/module-type-S/A/S/P/index.html b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/P/index.html new file mode 100644 index 00000000..4523d516 --- /dev/null +++ b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/P/index.html @@ -0,0 +1,2 @@ + +P (sidekick.Sidekick_th_data.S.A.S.P)

Module S.P

type t
val pp : t Sidekick_core.Fmt.printer
val default : t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Proof/index.html b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Proof/index.html new file mode 100644 index 00000000..baa7054b --- /dev/null +++ b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Proof/index.html @@ -0,0 +1,2 @@ + +Proof (sidekick.Sidekick_th_data.S.A.S.Proof)

Module S.Proof

type t
val check : t -> unit
val pp_dot : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Solver_internal/CC/Actions/index.html b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Solver_internal/CC/Actions/index.html new file mode 100644 index 00000000..a0647d6e --- /dev/null +++ b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Solver_internal/CC/Actions/index.html @@ -0,0 +1,2 @@ + +Actions (sidekick.Sidekick_th_data.S.A.S.Solver_internal.CC.Actions)

Module CC.Actions

module T = T
module P = P
module Lit = Lit
type t = actions
val raise_conflict : t -> Lit.t list -> P.t -> 'a
val propagate : t -> Lit.t -> reason:(unit -> Lit.t list) -> P.t -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Solver_internal/CC/Expl/index.html b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Solver_internal/CC/Expl/index.html new file mode 100644 index 00000000..f6110696 --- /dev/null +++ b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Solver_internal/CC/Expl/index.html @@ -0,0 +1,2 @@ + +Expl (sidekick.Sidekick_th_data.S.A.S.Solver_internal.CC.Expl)

Module CC.Expl

type t
val pp : t Sidekick_core.Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
val mk_theory : t -> t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Solver_internal/CC/N/index.html b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Solver_internal/CC/N/index.html new file mode 100644 index 00000000..de281dc7 --- /dev/null +++ b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Solver_internal/CC/N/index.html @@ -0,0 +1,2 @@ + +N (sidekick.Sidekick_th_data.S.A.S.Solver_internal.CC.N)

Module CC.N

An equivalence class is a set of terms that are currently equal in the partial model built by the solver. The class is represented by a collection of nodes, one of which is distinguished and is called the "representative".

All information pertaining to the whole equivalence class is stored in this representative's node.

When two classes become equal (are "merged"), one of the two representatives is picked as the representative of the new class. The new class contains the union of the two old classes' nodes.

We also allow theories to store additional information in the representative. This information can be used when two classes are merged, to detect conflicts and solve equations à la Shostak.

type t
val term : t -> term
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
val is_root : t -> bool

Is the node a root (ie the representative of its class)?

val iter_class : t -> t Iter.t

Traverse the congruence class. Precondition: is_root n (see find below)

val iter_parents : t -> t Iter.t

Traverse the parents of the class. Precondition: is_root n (see find below)

type bitfield

A field in the bitfield of this node. This should only be allocated when a theory is initialized.

All fields are initially 0, are backtracked automatically, and are merged automatically when classes are merged.

val get_field : bitfield -> t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Solver_internal/CC/index.html b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Solver_internal/CC/index.html new file mode 100644 index 00000000..f77ec49e --- /dev/null +++ b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Solver_internal/CC/index.html @@ -0,0 +1,2 @@ + +CC (sidekick.Sidekick_th_data.S.A.S.Solver_internal.CC)

Module Solver_internal.CC

module T = T
module P = P
module Lit = Lit
module Actions : Sidekick_core.CC_ACTIONS with module T = T and module Lit = Lit and module P = P and type t = actions
type term_state = T.Term.state
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type proof = P.t
type actions = Actions.t
type t

Global state of the congruence closure

module N : sig ... end

An equivalence class is a set of terms that are currently equal in the partial model built by the solver. The class is represented by a collection of nodes, one of which is distinguished and is called the "representative".

module Expl : sig ... end
type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t
val term_state : t -> term_state
val find : t -> node -> repr

Current representative

val add_term : t -> term -> node

Add the term to the congruence closure, if not present already. Will be backtracked.

val mem_term : t -> term -> bool

Returns true if the term is explicitly present in the congruence closure

type ev_on_pre_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit
type ev_on_post_merge = t -> actions -> N.t -> N.t -> unit
type ev_on_new_term = t -> N.t -> term -> unit
type ev_on_conflict = t -> th:bool -> lit list -> unit
type ev_on_propagate = t -> lit -> (unit -> lit list) -> unit
type ev_on_is_subterm = N.t -> term -> unit
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_pre_merge:ev_on_pre_merge list -> ?⁠on_post_merge:ev_on_post_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠on_is_subterm:ev_on_is_subterm list -> ?⁠size:[ `Small | `Big ] -> term_state -> t

Create a new congruence closure.

val allocate_bitfield : descr:string -> t -> N.bitfield

Allocate a new bitfield for the nodes. See N.bitfield.

val set_bitfield : t -> N.bitfield -> bool -> N.t -> unit

Set the bitfield for the node. This will be backtracked. See N.bitfield.

val on_pre_merge : t -> ev_on_pre_merge -> unit

Add a function to be called when two classes are merged

val on_post_merge : t -> ev_on_post_merge -> unit

Add a function to be called when two classes are merged

val on_new_term : t -> ev_on_new_term -> unit

Add a function to be called when a new node is created

val on_conflict : t -> ev_on_conflict -> unit

Called when the congruence closure finds a conflict

val on_propagate : t -> ev_on_propagate -> unit

Called when the congruence closure propagates a literal

val on_is_subterm : t -> ev_on_is_subterm -> unit

Called on terms that are subterms of function symbols

val set_as_lit : t -> N.t -> lit -> unit

map the given node to a literal.

val find_t : t -> term -> repr

Current representative of the term.

raises Not_found

if the term is not already add-ed.

val add_seq : t -> term Iter.t -> unit

Add a sequence of terms to the congruence closure

val all_classes : t -> repr Iter.t

All current classes. This is costly, only use if there is no other solution

val assert_lit : t -> lit -> unit

Given a literal, assume it in the congruence closure and propagate its consequences. Will be backtracked.

Useful for the theory combination or the SAT solver's functor

val assert_lits : t -> lit Iter.t -> unit

Addition of many literals

val explain_eq : t -> N.t -> N.t -> lit list

Explain why the two nodes are equal. Fails if they are not, in an unspecified way

val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given explanation it must be a theory tautology that expl ==> absurd. To be used in theories.

val n_true : t -> N.t
val n_false : t -> N.t
val n_bool : t -> bool -> N.t
val merge : t -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val merge_t : t -> term -> term -> Expl.t -> unit

Shortcut for adding + merging

val check : t -> actions -> unit

Perform all pending operations done via assert_eq, assert_lit, etc. Will use the actions to propagate literals, declare conflicts, etc.

val new_merges : t -> bool

Called after check, returns true if some pairs of classes were merged.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Restore to state n calls to push_level earlier. Used during backtracking.

val get_model : t -> N.t Iter.t Iter.t

get all the equivalence classes so they can be merged in the model

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Solver_internal/Simplify/index.html b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Solver_internal/Simplify/index.html new file mode 100644 index 00000000..e6dc1a8d --- /dev/null +++ b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Solver_internal/Simplify/index.html @@ -0,0 +1,2 @@ + +Simplify (sidekick.Sidekick_th_data.S.A.S.Solver_internal.Simplify)

Module Solver_internal.Simplify

type t
val tst : t -> term_state
val ty_st : t -> ty_state
val clear : t -> unit

Reset internal cache, etc.

type hook = t -> term -> term option

Given a term, try to simplify it. Return None if it didn't change.

val normalize : t -> term -> term

Normalize a term using all the hooks.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Solver_internal/index.html b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Solver_internal/index.html new file mode 100644 index 00000000..8e4e81b6 --- /dev/null +++ b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Solver_internal/index.html @@ -0,0 +1,2 @@ + +Solver_internal (sidekick.Sidekick_th_data.S.A.S.Solver_internal)

Module S.Solver_internal

Internal solver, available to theories.

module T = T
module P = P
type ty = T.Ty.t
type term = T.Term.t
type term_state = T.Term.state
type ty_state = T.Ty.state
type proof = P.t
type t

Main type for a solver

type solver = t
val tst : t -> term_state
val ty_st : t -> ty_state
val stats : t -> Sidekick_util.Stat.t

Actions for the theories

type actions
module Lit = Lit
type lit = Lit.t

Congruence Closure

module CC : Sidekick_core.CC_S with module T = T and module P = P and module Lit = Lit and type Actions.t = actions
val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end
type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit
val simplifier : t -> Simplify.t
val simp_t : t -> term -> term

hooks for the theory

val propagate : t -> actions -> lit -> reason:(unit -> lit list) -> proof -> unit

Propagate a literal for a reason. This is similar to asserting the clause reason => lit, but more lightweight, and in a way that is backtrackable.

val raise_conflict : t -> actions -> lit list -> proof -> 'a

Give a conflict clause to the solver

val push_decision : t -> actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : t -> actions -> lit -> (unit -> lit list) -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> actions -> lit -> lit list -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> actions -> lit list -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : t -> actions -> lit list -> unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> actions -> ?⁠sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val preprocess_term : t -> add_clause:(Lit.t list -> unit) -> term -> term

Preprocess a term.

val add_lit : t -> actions -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value

val add_lit_t : t -> actions -> ?⁠sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit

Callback called on every CC conflict

val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list) -> unit) -> unit

Callback called on every CC propagation

val on_partial_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

type preprocess_hook = t -> mk_lit:(term -> lit) -> add_clause:(lit list -> unit) -> term -> term option

Given a term, try to preprocess it. Return None if it didn't change. Can also add clauses to define new terms.

parameter mk_lit

creates a new literal for a boolean term.

parameter add_clause

pushes a new clause into the SAT solver.

val on_preprocess : t -> preprocess_hook -> unit

Model production

type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option

A model-production hook. It takes the solver, a class, and returns a term for this class.

val on_model_gen : t -> model_hook -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/module-type-S/A/S/T/Fun/index.html b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/T/Fun/index.html new file mode 100644 index 00000000..ac3f3634 --- /dev/null +++ b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/T/Fun/index.html @@ -0,0 +1,2 @@ + +Fun (sidekick.Sidekick_th_data.S.A.S.T.Fun)

Module T.Fun

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/module-type-S/A/S/T/Term/index.html b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/T/Term/index.html new file mode 100644 index 00000000..1dc5fb03 --- /dev/null +++ b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/T/Term/index.html @@ -0,0 +1,2 @@ + +Term (sidekick.Sidekick_th_data.S.A.S.T.Term)

Module T.Term

type t
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type state
val ty : t -> Ty.t
val bool : state -> bool -> t
val as_bool : t -> bool option
val abs : state -> t -> t * bool
val map_shallow : state -> (t -> t) -> t -> t

Map function on immediate subterms

val iter_dag : t -> (t -> unit) -> unit
module Tbl : CCHashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/module-type-S/A/S/T/Ty/index.html b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/T/Ty/index.html new file mode 100644 index 00000000..bb47799e --- /dev/null +++ b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/T/Ty/index.html @@ -0,0 +1,2 @@ + +Ty (sidekick.Sidekick_th_data.S.A.S.T.Ty)

Module T.Ty

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type state
val bool : state -> t
val is_bool : t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/module-type-S/A/S/T/index.html b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/T/index.html new file mode 100644 index 00000000..0460fcf2 --- /dev/null +++ b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/T/index.html @@ -0,0 +1,2 @@ + +T (sidekick.Sidekick_th_data.S.A.S.T)

Module S.T

module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Unknown/index.html b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Unknown/index.html new file mode 100644 index 00000000..7d2c95cf --- /dev/null +++ b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Unknown/index.html @@ -0,0 +1,2 @@ + +Unknown (sidekick.Sidekick_th_data.S.A.S.Unknown)

Module S.Unknown

type t
val pp : t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/module-type-S/A/S/index.html b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/index.html new file mode 100644 index 00000000..51bfd341 --- /dev/null +++ b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/index.html @@ -0,0 +1,2 @@ + +S (sidekick.Sidekick_th_data.S.A.S)

Module A.S

module Lit : Sidekick_core.LIT with module T = T
module Solver_internal : Sidekick_core.SOLVER_INTERNAL with module T = T and module P = P and module Lit = Lit

Internal solver, available to theories.

type t
type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t
type lemma = P.t
module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

type 'a theory_p = (module THEORY with type t = 'a)

A theory that can be used for this particular solver, with state of type 'a.

val mk_theory : name:string -> create_and_setup:(Solver_internal.t -> 'th) -> ?⁠push_level:('th -> unit) -> ?⁠pop_levels:('th -> int -> unit) -> unit -> theory

Helper to create a theory

module Atom : sig ... end
module Model : sig ... end
module Unknown : sig ... end
module Proof : sig ... end
type proof = Proof.t

Main API

val stats : t -> Sidekick_util.Stat.t
val tst : t -> T.Term.state
val ty_st : t -> T.Ty.state
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠size:[ `Big | `Tiny | `Small ] -> ?⁠store_proof:bool -> theories:theory list -> T.Term.state -> T.Ty.state -> unit -> t

Create a new solver.

parameter theories

theories to load from the start.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val add_theory_p : t -> 'a theory_p -> 'a

Add the given theory and obtain its state

val add_theory_l : t -> theory list -> unit
val mk_atom_lit : t -> lit -> Atom.t
val mk_atom_t : t -> ?⁠sign:bool -> term -> Atom.t
val add_clause : t -> Atom.t Sidekick_util.IArray.t -> unit
val add_clause_l : t -> Atom.t list -> unit
type res =
| Sat of Model.t
| Unsat of {
proof : proof option lazy_t;
unsat_core : Atom.t list lazy_t;
}
| Unknown of Unknown.t

Result of solving for the current set of clauses

val solve : ?⁠on_exit:(unit -> unit) list -> ?⁠check:bool -> ?⁠on_progress:(t -> unit) -> assumptions:Atom.t list -> t -> res

solve s checks the satisfiability of the statement added so far to s

parameter check

if true, the model is checked before returning

parameter assumptions

a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

parameter on_exit

functions to be run before this returns

val pp_stats : t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/module-type-S/A/S/module-type-THEORY/index.html b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/module-type-THEORY/index.html new file mode 100644 index 00000000..73b98b3d --- /dev/null +++ b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/module-type-THEORY/index.html @@ -0,0 +1,2 @@ + +THEORY (sidekick.Sidekick_th_data.S.A.S.THEORY)

Module type S.THEORY

A theory

Theories are abstracted over the concrete implementation of the solver, so they can work with any implementation.

Typically a theory should be a functor taking an argument containing a SOLVER_INTERNAL or even a full SOLVER, and some additional views on terms, literals, etc. that are specific to the theory (e.g. to map terms to linear expressions). The theory can then be instantiated on any kind of solver for any term representation that also satisfies the additional theory-specific requirements. Instantiated theories (ie values of type Sidekick_core.SOLVER.theory) can be added to the solver.

type t

The theory's state

val name : string

Name of the theory

val create_and_setup : Solver_internal.t -> t

Instantiate the theory's state for the given (internal) solver, register callbacks, create keys, etc.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Pop backtracking levels, restoring the theory to its former state

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/module-type-S/A/index.html b/dev/sidekick/Sidekick_th_data/module-type-S/A/index.html new file mode 100644 index 00000000..e5017ba0 --- /dev/null +++ b/dev/sidekick/Sidekick_th_data/module-type-S/A/index.html @@ -0,0 +1,2 @@ + +A (sidekick.Sidekick_th_data.S.A)

Module S.A

module Cstor : sig ... end
val as_datatype : S.T.Ty.t -> (Cstor.t Iter.tS.T.Ty.t) data_ty_view

Try to view type as a datatype (with its constructors)

val view_as_data : S.T.Term.t -> (Cstor.tS.T.Term.t) data_view

Try to view term as a datatype term

val mk_cstor : S.T.Term.state -> Cstor.t -> S.T.Term.t Sidekick_util.IArray.t -> S.T.Term.t

Make a constructor application term

val mk_is_a : S.T.Term.state -> Cstor.t -> S.T.Term.t -> S.T.Term.t

Make a is-a term

val mk_sel : S.T.Term.state -> Cstor.t -> int -> S.T.Term.t -> S.T.Term.t

Make a selector term

val mk_eq : S.T.Term.state -> S.T.Term.t -> S.T.Term.t -> S.T.Term.t

Make a term equality

val ty_is_finite : S.T.Ty.t -> bool

Is the given type known to be finite?

val ty_set_is_finite : S.T.Ty.t -> bool -> unit

Modify the "finite" field (see ty_is_finite)

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/module-type-S/index.html b/dev/sidekick/Sidekick_th_data/module-type-S/index.html new file mode 100644 index 00000000..7750fb35 --- /dev/null +++ b/dev/sidekick/Sidekick_th_data/module-type-S/index.html @@ -0,0 +1,2 @@ + +S (sidekick.Sidekick_th_data.S)

Module type Sidekick_th_data.S

module A : ARG
val theory : A.S.theory
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data__/.dune-keep b/dev/sidekick/Sidekick_th_data__/.dune-keep new file mode 100644 index 00000000..e69de29b diff --git a/dev/sidekick/Sidekick_th_data__/Types/index.html b/dev/sidekick/Sidekick_th_data__/Types/index.html new file mode 100644 index 00000000..6b34299a --- /dev/null +++ b/dev/sidekick/Sidekick_th_data__/Types/index.html @@ -0,0 +1,2 @@ + +Types (sidekick.Sidekick_th_data__.Types)

Module Sidekick_th_data__.Types

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data__/index.html b/dev/sidekick/Sidekick_th_data__/index.html new file mode 100644 index 00000000..f3b89a58 --- /dev/null +++ b/dev/sidekick/Sidekick_th_data__/index.html @@ -0,0 +1,2 @@ + +Sidekick_th_data__ (sidekick.Sidekick_th_data__)

Module Sidekick_th_data__

module Types : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data__Types/.dune-keep b/dev/sidekick/Sidekick_th_data__Types/.dune-keep new file mode 100644 index 00000000..e69de29b diff --git a/dev/sidekick/Sidekick_th_data__Types/index.html b/dev/sidekick/Sidekick_th_data__Types/index.html new file mode 100644 index 00000000..c4f05231 --- /dev/null +++ b/dev/sidekick/Sidekick_th_data__Types/index.html @@ -0,0 +1,2 @@ + +Sidekick_th_data__Types (sidekick.Sidekick_th_data__Types)

Module Sidekick_th_data__Types

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util/Backtrack_stack/index.html b/dev/sidekick/Sidekick_util/Backtrack_stack/index.html index 6e3a2900..f65cdada 100644 --- a/dev/sidekick/Sidekick_util/Backtrack_stack/index.html +++ b/dev/sidekick/Sidekick_util/Backtrack_stack/index.html @@ -1,2 +1,2 @@ -Backtrack_stack (sidekick.Sidekick_util.Backtrack_stack)

Module Sidekick_util.Backtrack_stack

A backtracking stack

type 'a t
val create : unit -> 'a t
val push : 'a t -> 'a -> unit

Push an element onto the stack

val push_if_nonzero_level : 'a t -> 'a -> unit

Push an element onto the stack if level > 0

val n_levels : _ t -> int

Number of levels

val push_level : _ t -> unit

Push a backtracking point

val pop_levels : 'a t -> int -> f:('a -> unit) -> unit

pop_levels st n ~f removes n levels, calling f on every removed item

\ No newline at end of file +Backtrack_stack (sidekick.Sidekick_util.Backtrack_stack)

Module Sidekick_util.Backtrack_stack

A backtracking stack

type 'a t
val create : unit -> 'a t
val push : 'a t -> 'a -> unit

Push an element onto the stack

val push_if_nonzero_level : 'a t -> 'a -> unit

Push an element onto the stack if level > 0

val n_levels : _ t -> int

Number of levels

val push_level : _ t -> unit

Push a backtracking point

val pop_levels : 'a t -> int -> f:('a -> unit) -> unit

pop_levels st n ~f removes n levels, calling f on every removed item

val iter : f:('a -> unit) -> 'a t -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util/Backtrackable_tbl/Make/argument-1-A/index.html b/dev/sidekick/Sidekick_util/Backtrackable_tbl/Make/argument-1-A/index.html new file mode 100644 index 00000000..9d23df37 --- /dev/null +++ b/dev/sidekick/Sidekick_util/Backtrackable_tbl/Make/argument-1-A/index.html @@ -0,0 +1,2 @@ + +1-A (sidekick.Sidekick_util.Backtrackable_tbl.Make.1-A)

Parameter Make.1-A

type t
val equal : t -> t -> bool
val hash : t -> int
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util/Backtrackable_tbl/Make/index.html b/dev/sidekick/Sidekick_util/Backtrackable_tbl/Make/index.html new file mode 100644 index 00000000..85d5b5cb --- /dev/null +++ b/dev/sidekick/Sidekick_util/Backtrackable_tbl/Make/index.html @@ -0,0 +1,2 @@ + +Make (sidekick.Sidekick_util.Backtrackable_tbl.Make)

Module Backtrackable_tbl.Make

Parameters

Signature

type key = A.t
type 'a t
val create : ?⁠size:int -> unit -> 'a t
val find : 'a t -> key -> 'a
raises Not_found

if the key is not present

val get : 'a t -> key -> 'a option
val mem : _ t -> key -> bool
val length : _ t -> int
val iter : (key -> 'a -> unit) -> 'a t -> unit
val to_iter : 'a t -> (key * 'a) Iter.t
val add : 'a t -> key -> 'a -> unit
val remove : _ t -> key -> unit
val push_level : _ t -> unit
val pop_levels : _ t -> int -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util/Backtrackable_tbl/index.html b/dev/sidekick/Sidekick_util/Backtrackable_tbl/index.html new file mode 100644 index 00000000..358f6022 --- /dev/null +++ b/dev/sidekick/Sidekick_util/Backtrackable_tbl/index.html @@ -0,0 +1,2 @@ + +Backtrackable_tbl (sidekick.Sidekick_util.Backtrackable_tbl)

Module Sidekick_util.Backtrackable_tbl

A backtrackable hashtable

module type S = sig ... end
module type ARG = sig ... end
module Make : functor (A : ARG) -> S with type key = A.t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util/Backtrackable_tbl/module-type-ARG/index.html b/dev/sidekick/Sidekick_util/Backtrackable_tbl/module-type-ARG/index.html new file mode 100644 index 00000000..838b1dd2 --- /dev/null +++ b/dev/sidekick/Sidekick_util/Backtrackable_tbl/module-type-ARG/index.html @@ -0,0 +1,2 @@ + +ARG (sidekick.Sidekick_util.Backtrackable_tbl.ARG)

Module type Backtrackable_tbl.ARG

type t
val equal : t -> t -> bool
val hash : t -> int
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util/Backtrackable_tbl/module-type-S/index.html b/dev/sidekick/Sidekick_util/Backtrackable_tbl/module-type-S/index.html new file mode 100644 index 00000000..4014e245 --- /dev/null +++ b/dev/sidekick/Sidekick_util/Backtrackable_tbl/module-type-S/index.html @@ -0,0 +1,2 @@ + +S (sidekick.Sidekick_util.Backtrackable_tbl.S)

Module type Backtrackable_tbl.S

type key
type 'a t
val create : ?⁠size:int -> unit -> 'a t
val find : 'a t -> key -> 'a
raises Not_found

if the key is not present

val get : 'a t -> key -> 'a option
val mem : _ t -> key -> bool
val length : _ t -> int
val iter : (key -> 'a -> unit) -> 'a t -> unit
val to_iter : 'a t -> (key * 'a) Iter.t
val add : 'a t -> key -> 'a -> unit
val remove : _ t -> key -> unit
val push_level : _ t -> unit
val pop_levels : _ t -> int -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util/Bag/index.html b/dev/sidekick/Sidekick_util/Bag/index.html index 0fdbde4d..7be1b518 100644 --- a/dev/sidekick/Sidekick_util/Bag/index.html +++ b/dev/sidekick/Sidekick_util/Bag/index.html @@ -1,2 +1,2 @@ -Bag (sidekick.Sidekick_util.Bag)

Module Sidekick_util.Bag

Ordered Bag of Elements

A data structure where we can have duplicate elements, optimized for fast concatenation and size.

type +'a t = private
| E
| L of 'a
| N of 'a t * 'a t
val empty : 'a t
val is_empty : _ t -> bool
val return : 'a -> 'a t
val cons : 'a -> 'a t -> 'a t
val append : 'a t -> 'a t -> 'a t
val to_seq : 'a t -> 'a Iter.t
val fold : ('a -> 'b -> 'a) -> 'a -> 'b t -> 'a
val iter : ('a -> unit) -> 'a t -> unit
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

Are the two bags equal, element wise?

\ No newline at end of file +Bag (sidekick.Sidekick_util.Bag)

Module Sidekick_util.Bag

Ordered Bag of Elements

A data structure where we can have duplicate elements, optimized for fast concatenation and size.

type +'a t = private
| E
| L of 'a
| N of 'a t * 'a t
val empty : 'a t
val is_empty : _ t -> bool
val return : 'a -> 'a t
val cons : 'a -> 'a t -> 'a t
val append : 'a t -> 'a t -> 'a t
val to_iter : 'a t -> 'a Iter.t
val fold : ('a -> 'b -> 'a) -> 'a -> 'b t -> 'a
val iter : ('a -> unit) -> 'a t -> unit
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

Are the two bags equal, element wise?

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util/Error/index.html b/dev/sidekick/Sidekick_util/Error/index.html index f99e6c3a..fd50bec0 100644 --- a/dev/sidekick/Sidekick_util/Error/index.html +++ b/dev/sidekick/Sidekick_util/Error/index.html @@ -1,2 +1,2 @@ -Error (sidekick.Sidekick_util.Error)

Module Sidekick_util.Error

exception Error of string
val errorf : ('a, Format.formatter, unit, 'b) Pervasives.format4 -> 'a
raises Error

when called

\ No newline at end of file +Error (sidekick.Sidekick_util.Error)

Module Sidekick_util.Error

exception Error of string
val errorf : ('a, Stdlib.Format.formatter, unit, 'b) Stdlib.format4 -> 'a
raises Error

when called

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util/Hash/index.html b/dev/sidekick/Sidekick_util/Hash/index.html new file mode 100644 index 00000000..5cd29add --- /dev/null +++ b/dev/sidekick/Sidekick_util/Hash/index.html @@ -0,0 +1,2 @@ + +Hash (sidekick.Sidekick_util.Hash)

Module Sidekick_util.Hash

type 'a t = 'a -> int
val bool : bool t
val int : int t
val string : string t
val combine : 'a t -> int -> 'a -> int
val pair : 'a t -> 'b t -> ('a * 'b) t
val opt : 'a t -> 'a option t
val list : 'a t -> 'a list t
val array : 'a t -> 'a array t
val iarray : 'a t -> 'a IArray.t t
val seq : 'a t -> 'a Iter.t t
val combine2 : int -> int -> int
val combine3 : int -> int -> int -> int
val combine4 : int -> int -> int -> int -> int
val poly : 'a t

the regular polymorphic hash function

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util/IArray/index.html b/dev/sidekick/Sidekick_util/IArray/index.html index 1587b94f..a0aa479c 100644 --- a/dev/sidekick/Sidekick_util/IArray/index.html +++ b/dev/sidekick/Sidekick_util/IArray/index.html @@ -1,2 +1,2 @@ -IArray (sidekick.Sidekick_util.IArray)

Module Sidekick_util.IArray

type 'a t = private 'a array

Array of values of type 'a. The underlying type really is an array, but it will never be modified.

It should be covariant but OCaml will not accept it.

val empty : 'a t
val is_empty : _ t -> bool
val length : _ t -> int
val sub : 'a t -> int -> int -> 'a t
val singleton : 'a -> 'a t
val doubleton : 'a -> 'a -> 'a t
val make : int -> 'a -> 'a t

make n x makes an array of n times x

val init : int -> (int -> 'a) -> 'a t

init n f makes the array [| f 0; f 1; ... ; f (n-1) |].

raises Invalid_argument

if n < 0

val get : 'a t -> int -> 'a

Access the element

val unsafe_get : 'a t -> int -> 'a

Unsafe access, not bound-checked. Use with caution

val set : 'a t -> int -> 'a -> 'a t

Copy the array and modify its copy

val map : ('a -> 'b) -> 'a t -> 'b t
val mapi : (int -> 'a -> 'b) -> 'a t -> 'b t
val append : 'a t -> 'a t -> 'a t
val iter : ('a -> unit) -> 'a t -> unit
val iteri : (int -> 'a -> unit) -> 'a t -> unit
val foldi : ('a -> int -> 'b -> 'a) -> 'a -> 'b t -> 'a
val fold : ('a -> 'b -> 'a) -> 'a -> 'b t -> 'a
val for_all : ('a -> bool) -> 'a t -> bool
val exists : ('a -> bool) -> 'a t -> bool

Conversions

type 'a sequence = ('a -> unit) -> unit
type 'a gen = unit -> 'a option
val of_list : 'a list -> 'a t
val to_list : 'a t -> 'a list
val of_list_map : ('a -> 'b) -> 'a list -> 'b t
val to_list_map : ('a -> 'b) -> 'a t -> 'b list
val of_array_map : ('a -> 'b) -> 'a array -> 'b t
val to_array_map : ('a -> 'b) -> 'a t -> 'b array
val of_array_unsafe : 'a array -> 'a t

Take ownership of the given array. Careful, the array must NOT be modified afterwards!

val to_seq : 'a t -> 'a sequence
val of_seq : 'a sequence -> 'a t
val of_gen : 'a gen -> 'a t
val to_gen : 'a t -> 'a gen

IO

type 'a printer = Format.formatter -> 'a -> unit
val print : ?⁠start:string -> ?⁠stop:string -> ?⁠sep:string -> 'a printer -> 'a t printer

Binary

val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val for_all2 : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val exists2 : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val map2 : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t
val fold2 : ('acc -> 'a -> 'b -> 'acc) -> 'acc -> 'a t -> 'b t -> 'acc
val iter2 : ('a -> 'b -> unit) -> 'a t -> 'b t -> unit
\ No newline at end of file +IArray (sidekick.Sidekick_util.IArray)

Module Sidekick_util.IArray

type 'a t = private 'a array

Array of values of type 'a. The underlying type really is an array, but it will never be modified.

It should be covariant but OCaml will not accept it.

val empty : 'a t
val is_empty : _ t -> bool
val length : _ t -> int
val sub : 'a t -> int -> int -> 'a t
val singleton : 'a -> 'a t
val doubleton : 'a -> 'a -> 'a t
val make : int -> 'a -> 'a t

make n x makes an array of n times x

val init : int -> (int -> 'a) -> 'a t

init n f makes the array [| f 0; f 1; ... ; f (n-1) |].

raises Invalid_argument

if n < 0

val get : 'a t -> int -> 'a

Access the element

val unsafe_get : 'a t -> int -> 'a

Unsafe access, not bound-checked. Use with caution

val set : 'a t -> int -> 'a -> 'a t

Copy the array and modify its copy

val map : ('a -> 'b) -> 'a t -> 'b t
val mapi : (int -> 'a -> 'b) -> 'a t -> 'b t
val append : 'a t -> 'a t -> 'a t
val iter : ('a -> unit) -> 'a t -> unit
val iteri : (int -> 'a -> unit) -> 'a t -> unit
val foldi : ('a -> int -> 'b -> 'a) -> 'a -> 'b t -> 'a
val fold : ('a -> 'b -> 'a) -> 'a -> 'b t -> 'a
val for_all : ('a -> bool) -> 'a t -> bool
val exists : ('a -> bool) -> 'a t -> bool

Conversions

type 'a iter = ('a -> unit) -> unit
type 'a gen = unit -> 'a option
val of_list : 'a list -> 'a t
val to_list : 'a t -> 'a list
val of_list_map : ('a -> 'b) -> 'a list -> 'b t
val to_list_map : ('a -> 'b) -> 'a t -> 'b list
val of_array_map : ('a -> 'b) -> 'a array -> 'b t
val to_array_map : ('a -> 'b) -> 'a t -> 'b array
val of_array_unsafe : 'a array -> 'a t

Take ownership of the given array. Careful, the array must NOT be modified afterwards!

val to_iter : 'a t -> 'a iter
val to_iter_sub : 'a t -> int -> int -> 'a iter
val of_iter : 'a iter -> 'a t
val of_gen : 'a gen -> 'a t
val to_gen : 'a t -> 'a gen

IO

type 'a printer = Stdlib.Format.formatter -> 'a -> unit
val print : ?⁠start:string -> ?⁠stop:string -> ?⁠sep:string -> 'a printer -> 'a t printer

Binary

val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val for_all2 : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val exists2 : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val map2 : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t
val fold2 : ('acc -> 'a -> 'b -> 'acc) -> 'acc -> 'a t -> 'b t -> 'acc
val iter2 : ('a -> 'b -> unit) -> 'a t -> 'b t -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util/Intf/index.html b/dev/sidekick/Sidekick_util/Intf/index.html index 67a2dbb8..5c87342c 100644 --- a/dev/sidekick/Sidekick_util/Intf/index.html +++ b/dev/sidekick/Sidekick_util/Intf/index.html @@ -1,2 +1,2 @@ -Intf (sidekick.Sidekick_util.Intf)

Module Sidekick_util.Intf

module type EQ = sig ... end
module type ORD = sig ... end
module type HASH = sig ... end
module type PRINT = sig ... end
type 'a printer = Format.formatter -> 'a -> unit
\ No newline at end of file +Intf (sidekick.Sidekick_util.Intf)

Module Sidekick_util.Intf

module type EQ = sig ... end
module type ORD = sig ... end
module type HASH = sig ... end
module type PRINT = sig ... end
type 'a printer = Stdlib.Format.formatter -> 'a -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util/Intf/module-type-EQ/index.html b/dev/sidekick/Sidekick_util/Intf/module-type-EQ/index.html index bd737ff5..e0d2c0af 100644 --- a/dev/sidekick/Sidekick_util/Intf/module-type-EQ/index.html +++ b/dev/sidekick/Sidekick_util/Intf/module-type-EQ/index.html @@ -1,2 +1,2 @@ -EQ (sidekick.Sidekick_util.Intf.EQ)

Module type Intf.EQ

type t
val equal : t -> t -> bool
\ No newline at end of file +EQ (sidekick.Sidekick_util.Intf.EQ)

Module type Intf.EQ

type t
val equal : t -> t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util/Intf/module-type-HASH/index.html b/dev/sidekick/Sidekick_util/Intf/module-type-HASH/index.html index 0b063569..e02c7a85 100644 --- a/dev/sidekick/Sidekick_util/Intf/module-type-HASH/index.html +++ b/dev/sidekick/Sidekick_util/Intf/module-type-HASH/index.html @@ -1,2 +1,2 @@ -HASH (sidekick.Sidekick_util.Intf.HASH)

Module type Intf.HASH

type t
val hash : t -> int
\ No newline at end of file +HASH (sidekick.Sidekick_util.Intf.HASH)

Module type Intf.HASH

type t
val hash : t -> int
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util/Intf/module-type-ORD/index.html b/dev/sidekick/Sidekick_util/Intf/module-type-ORD/index.html index c139e20e..85c00473 100644 --- a/dev/sidekick/Sidekick_util/Intf/module-type-ORD/index.html +++ b/dev/sidekick/Sidekick_util/Intf/module-type-ORD/index.html @@ -1,2 +1,2 @@ -ORD (sidekick.Sidekick_util.Intf.ORD)

Module type Intf.ORD

type t
val compare : t -> t -> int
\ No newline at end of file +ORD (sidekick.Sidekick_util.Intf.ORD)

Module type Intf.ORD

type t
val compare : t -> t -> int
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util/Intf/module-type-PRINT/index.html b/dev/sidekick/Sidekick_util/Intf/module-type-PRINT/index.html index 4783bf5f..b4689b06 100644 --- a/dev/sidekick/Sidekick_util/Intf/module-type-PRINT/index.html +++ b/dev/sidekick/Sidekick_util/Intf/module-type-PRINT/index.html @@ -1,2 +1,2 @@ -PRINT (sidekick.Sidekick_util.Intf.PRINT)

Module type Intf.PRINT

type t
val pp : t CCFormat.printer
\ No newline at end of file +PRINT (sidekick.Sidekick_util.Intf.PRINT)

Module type Intf.PRINT

type t
val pp : t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util/Profile/Control/index.html b/dev/sidekick/Sidekick_util/Profile/Control/index.html new file mode 100644 index 00000000..129e3f44 --- /dev/null +++ b/dev/sidekick/Sidekick_util/Profile/Control/index.html @@ -0,0 +1,2 @@ + +Control (sidekick.Sidekick_util.Profile.Control)

Module Profile.Control

val setup : backend option -> unit
val teardown : unit -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util/Profile/index.html b/dev/sidekick/Sidekick_util/Profile/index.html new file mode 100644 index 00000000..a0556ec3 --- /dev/null +++ b/dev/sidekick/Sidekick_util/Profile/index.html @@ -0,0 +1,2 @@ + +Profile (sidekick.Sidekick_util.Profile)

Module Sidekick_util.Profile

Profiling probes

type probe
val null_probe : probe
val enabled : unit -> bool
val instant : string -> unit
val begin_ : string -> probe
val exit : probe -> unit
val with_ : string -> (unit -> 'a) -> 'a
val with1 : string -> ('a -> 'b) -> 'a -> 'b
module type BACKEND = sig ... end
type backend = (module BACKEND)
module Control : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util/Profile/module-type-BACKEND/index.html b/dev/sidekick/Sidekick_util/Profile/module-type-BACKEND/index.html new file mode 100644 index 00000000..ccc0ee2d --- /dev/null +++ b/dev/sidekick/Sidekick_util/Profile/module-type-BACKEND/index.html @@ -0,0 +1,2 @@ + +BACKEND (sidekick.Sidekick_util.Profile.BACKEND)

Module type Profile.BACKEND

val get_ts : unit -> float
val emit_duration_event : name:string -> start:float -> end_:float -> unit -> unit
val emit_instant_event : name:string -> ts:float -> unit -> unit
val teardown : unit -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util/Stat/index.html b/dev/sidekick/Sidekick_util/Stat/index.html index 91c25c58..2d67e4f5 100644 --- a/dev/sidekick/Sidekick_util/Stat/index.html +++ b/dev/sidekick/Sidekick_util/Stat/index.html @@ -1,2 +1,2 @@ -Stat (sidekick.Sidekick_util.Stat)

Module Sidekick_util.Stat

Statistics

module Fmt = CCFormat
type t
val create : unit -> t
type 'a counter
val mk_int : t -> string -> int counter
val mk_float : t -> string -> float counter
val incr : int counter -> unit
val incr_f : float counter -> float -> unit
type ex_counter

Existential counter

val all : t -> ex_counter Iter.t
val pp_all : ex_counter Iter.t Fmt.printer
val global : t

Global statistics, by default

\ No newline at end of file +Stat (sidekick.Sidekick_util.Stat)

Module Sidekick_util.Stat

Statistics

module Fmt = CCFormat
type t
val create : unit -> t
type 'a counter
val mk_int : t -> string -> int counter
val mk_float : t -> string -> float counter
val incr : int counter -> unit
val incr_f : float counter -> float -> unit
val set : 'a counter -> 'a -> unit
type ex_counter

Existential counter

val all : t -> ex_counter Iter.t
val pp_all : ex_counter Iter.t Fmt.printer
val global : t

Global statistics, by default

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util/Util/index.html b/dev/sidekick/Sidekick_util/Util/index.html index f78143fd..22e95bad 100644 --- a/dev/sidekick/Sidekick_util/Util/index.html +++ b/dev/sidekick/Sidekick_util/Util/index.html @@ -1,2 +1,2 @@ -Util (sidekick.Sidekick_util.Util)

Module Sidekick_util.Util

Utils

type 'a printer = 'a CCFormat.printer
val pp_list : ?⁠sep:string -> 'a printer -> 'a list printer
val pp_seq : ?⁠sep:string -> 'a printer -> 'a Iter.t printer
val pp_array : ?⁠sep:string -> 'a printer -> 'a array printer
val pp_pair : ?⁠sep:string -> 'a printer -> 'b printer -> ('a * 'b) printer
val pp_iarray : ?⁠sep:string -> 'a CCFormat.printer -> 'a IArray.t CCFormat.printer
val flat_map_l_ia : ('a -> 'b IArray.t) -> 'a list -> 'b list
val setup_gc : unit -> unit

Change parameters of the GC

module Int_set : CCSet.S with type Int_set.elt = int
module Int_map : CCMap.S with type Int_map.key = int
module Int_tbl : CCHashtbl.S with type Int_tbl.key = int
val _CHECK_INVARIANTS : bool
\ No newline at end of file +Util (sidekick.Sidekick_util.Util)

Module Sidekick_util.Util

Utils

type 'a printer = 'a CCFormat.printer
val pp_list : ?⁠sep:string -> 'a printer -> 'a list printer
val pp_iter : ?⁠sep:string -> 'a printer -> 'a Iter.t printer
val pp_array : ?⁠sep:string -> 'a printer -> 'a array printer
val pp_pair : ?⁠sep:string -> 'a printer -> 'b printer -> ('a * 'b) printer
val pp_iarray : ?⁠sep:string -> 'a CCFormat.printer -> 'a IArray.t CCFormat.printer
val flat_map_l_ia : ('a -> 'b IArray.t) -> 'a list -> 'b list
val setup_gc : unit -> unit

Change parameters of the GC

module Int_set : CCSet.S with type Int_set.elt = int
module Int_map : CCMap.S with type Int_map.key = int
module Int_tbl : CCHashtbl.S with type Int_tbl.key = int
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util/index.html b/dev/sidekick/Sidekick_util/index.html index 18a5ec45..a56f9b7d 100644 --- a/dev/sidekick/Sidekick_util/index.html +++ b/dev/sidekick/Sidekick_util/index.html @@ -1,2 +1,2 @@ -Sidekick_util (sidekick.Sidekick_util)

Module Sidekick_util

module Fmt = CCFormat
module Vec = Msat.Vec
module Log = Msat.Log
module Util : sig ... end
module Backtrack_stack : sig ... end
module Error : sig ... end
module IArray : sig ... end
module Intf : sig ... end
module Bag : sig ... end
module Stat : sig ... end
\ No newline at end of file +Sidekick_util (sidekick.Sidekick_util)

Module Sidekick_util

module Fmt = CCFormat
module Vec = Msat.Vec
module Log = Msat.Log
module Util : sig ... end
module Backtrack_stack : sig ... end
module Backtrackable_tbl : sig ... end
module Error : sig ... end
module IArray : sig ... end
module Intf : sig ... end
module Bag : sig ... end
module Stat : sig ... end
module Hash : sig ... end
module Profile : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__/Backtrack_stack/index.html b/dev/sidekick/Sidekick_util__/Backtrack_stack/index.html index a91accdb..1ca79c01 100644 --- a/dev/sidekick/Sidekick_util__/Backtrack_stack/index.html +++ b/dev/sidekick/Sidekick_util__/Backtrack_stack/index.html @@ -1,2 +1,2 @@ -Backtrack_stack (sidekick.Sidekick_util__.Backtrack_stack)

Module Sidekick_util__.Backtrack_stack

A backtracking stack

type 'a t
val create : unit -> 'a t
val push : 'a t -> 'a -> unit

Push an element onto the stack

val push_if_nonzero_level : 'a t -> 'a -> unit

Push an element onto the stack if level > 0

val n_levels : _ t -> int

Number of levels

val push_level : _ t -> unit

Push a backtracking point

val pop_levels : 'a t -> int -> f:('a -> unit) -> unit

pop_levels st n ~f removes n levels, calling f on every removed item

\ No newline at end of file +Backtrack_stack (sidekick.Sidekick_util__.Backtrack_stack)

Module Sidekick_util__.Backtrack_stack

A backtracking stack

type 'a t
val create : unit -> 'a t
val push : 'a t -> 'a -> unit

Push an element onto the stack

val push_if_nonzero_level : 'a t -> 'a -> unit

Push an element onto the stack if level > 0

val n_levels : _ t -> int

Number of levels

val push_level : _ t -> unit

Push a backtracking point

val pop_levels : 'a t -> int -> f:('a -> unit) -> unit

pop_levels st n ~f removes n levels, calling f on every removed item

val iter : f:('a -> unit) -> 'a t -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__/Backtrackable_tbl/Make/argument-1-A/index.html b/dev/sidekick/Sidekick_util__/Backtrackable_tbl/Make/argument-1-A/index.html new file mode 100644 index 00000000..037bc949 --- /dev/null +++ b/dev/sidekick/Sidekick_util__/Backtrackable_tbl/Make/argument-1-A/index.html @@ -0,0 +1,2 @@ + +1-A (sidekick.Sidekick_util__.Backtrackable_tbl.Make.1-A)

Parameter Make.1-A

type t
val equal : t -> t -> bool
val hash : t -> int
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__/Backtrackable_tbl/Make/index.html b/dev/sidekick/Sidekick_util__/Backtrackable_tbl/Make/index.html new file mode 100644 index 00000000..dc755e5a --- /dev/null +++ b/dev/sidekick/Sidekick_util__/Backtrackable_tbl/Make/index.html @@ -0,0 +1,2 @@ + +Make (sidekick.Sidekick_util__.Backtrackable_tbl.Make)

Module Backtrackable_tbl.Make

Parameters

Signature

type key = A.t
type 'a t
val create : ?⁠size:int -> unit -> 'a t
val find : 'a t -> key -> 'a
raises Not_found

if the key is not present

val get : 'a t -> key -> 'a option
val mem : _ t -> key -> bool
val length : _ t -> int
val iter : (key -> 'a -> unit) -> 'a t -> unit
val to_iter : 'a t -> (key * 'a) Iter.t
val add : 'a t -> key -> 'a -> unit
val remove : _ t -> key -> unit
val push_level : _ t -> unit
val pop_levels : _ t -> int -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__/Backtrackable_tbl/index.html b/dev/sidekick/Sidekick_util__/Backtrackable_tbl/index.html new file mode 100644 index 00000000..be2c3414 --- /dev/null +++ b/dev/sidekick/Sidekick_util__/Backtrackable_tbl/index.html @@ -0,0 +1,2 @@ + +Backtrackable_tbl (sidekick.Sidekick_util__.Backtrackable_tbl)

Module Sidekick_util__.Backtrackable_tbl

A backtrackable hashtable

module type S = sig ... end
module type ARG = sig ... end
module Make : functor (A : ARG) -> S with type key = A.t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__/Backtrackable_tbl/module-type-ARG/index.html b/dev/sidekick/Sidekick_util__/Backtrackable_tbl/module-type-ARG/index.html new file mode 100644 index 00000000..7a73c82b --- /dev/null +++ b/dev/sidekick/Sidekick_util__/Backtrackable_tbl/module-type-ARG/index.html @@ -0,0 +1,2 @@ + +ARG (sidekick.Sidekick_util__.Backtrackable_tbl.ARG)

Module type Backtrackable_tbl.ARG

type t
val equal : t -> t -> bool
val hash : t -> int
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__/Backtrackable_tbl/module-type-S/index.html b/dev/sidekick/Sidekick_util__/Backtrackable_tbl/module-type-S/index.html new file mode 100644 index 00000000..2a6a4def --- /dev/null +++ b/dev/sidekick/Sidekick_util__/Backtrackable_tbl/module-type-S/index.html @@ -0,0 +1,2 @@ + +S (sidekick.Sidekick_util__.Backtrackable_tbl.S)

Module type Backtrackable_tbl.S

type key
type 'a t
val create : ?⁠size:int -> unit -> 'a t
val find : 'a t -> key -> 'a
raises Not_found

if the key is not present

val get : 'a t -> key -> 'a option
val mem : _ t -> key -> bool
val length : _ t -> int
val iter : (key -> 'a -> unit) -> 'a t -> unit
val to_iter : 'a t -> (key * 'a) Iter.t
val add : 'a t -> key -> 'a -> unit
val remove : _ t -> key -> unit
val push_level : _ t -> unit
val pop_levels : _ t -> int -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__/Bag/index.html b/dev/sidekick/Sidekick_util__/Bag/index.html index c5323f66..820d59d7 100644 --- a/dev/sidekick/Sidekick_util__/Bag/index.html +++ b/dev/sidekick/Sidekick_util__/Bag/index.html @@ -1,2 +1,2 @@ -Bag (sidekick.Sidekick_util__.Bag)

Module Sidekick_util__.Bag

Ordered Bag of Elements

A data structure where we can have duplicate elements, optimized for fast concatenation and size.

type +'a t = private
| E
| L of 'a
| N of 'a t * 'a t
val empty : 'a t
val is_empty : _ t -> bool
val return : 'a -> 'a t
val cons : 'a -> 'a t -> 'a t
val append : 'a t -> 'a t -> 'a t
val to_seq : 'a t -> 'a Iter.t
val fold : ('a -> 'b -> 'a) -> 'a -> 'b t -> 'a
val iter : ('a -> unit) -> 'a t -> unit
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

Are the two bags equal, element wise?

\ No newline at end of file +Bag (sidekick.Sidekick_util__.Bag)

Module Sidekick_util__.Bag

Ordered Bag of Elements

A data structure where we can have duplicate elements, optimized for fast concatenation and size.

type +'a t = private
| E
| L of 'a
| N of 'a t * 'a t
val empty : 'a t
val is_empty : _ t -> bool
val return : 'a -> 'a t
val cons : 'a -> 'a t -> 'a t
val append : 'a t -> 'a t -> 'a t
val to_iter : 'a t -> 'a Iter.t
val fold : ('a -> 'b -> 'a) -> 'a -> 'b t -> 'a
val iter : ('a -> unit) -> 'a t -> unit
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

Are the two bags equal, element wise?

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__/Error/index.html b/dev/sidekick/Sidekick_util__/Error/index.html index 7276084c..efec20a7 100644 --- a/dev/sidekick/Sidekick_util__/Error/index.html +++ b/dev/sidekick/Sidekick_util__/Error/index.html @@ -1,2 +1,2 @@ -Error (sidekick.Sidekick_util__.Error)

Module Sidekick_util__.Error

exception Error of string
val errorf : ('a, Format.formatter, unit, 'b) Pervasives.format4 -> 'a
raises Error

when called

\ No newline at end of file +Error (sidekick.Sidekick_util__.Error)

Module Sidekick_util__.Error

exception Error of string
val errorf : ('a, Stdlib.Format.formatter, unit, 'b) Stdlib.format4 -> 'a
raises Error

when called

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__/Event/Emitter/index.html b/dev/sidekick/Sidekick_util__/Event/Emitter/index.html deleted file mode 100644 index 21df3977..00000000 --- a/dev/sidekick/Sidekick_util__/Event/Emitter/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Emitter (sidekick.Sidekick_util__.Event.Emitter)

Module Event.Emitter

type 'a t
val fire : 'a t -> 'a -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__/Event/index.html b/dev/sidekick/Sidekick_util__/Event/index.html deleted file mode 100644 index f6ce1b20..00000000 --- a/dev/sidekick/Sidekick_util__/Event/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Event (sidekick.Sidekick_util__.Event)

Module Sidekick_util__.Event

Observer pattern

type 'a t
val on : 'a t -> ('a -> unit) -> unit
module Emitter : sig ... end
val make : unit -> 'a t * 'a Emitter.t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__/Hash/index.html b/dev/sidekick/Sidekick_util__/Hash/index.html new file mode 100644 index 00000000..370e75e8 --- /dev/null +++ b/dev/sidekick/Sidekick_util__/Hash/index.html @@ -0,0 +1,2 @@ + +Hash (sidekick.Sidekick_util__.Hash)

Module Sidekick_util__.Hash

type 'a t = 'a -> int
val bool : bool t
val int : int t
val string : string t
val combine : 'a t -> int -> 'a -> int
val pair : 'a t -> 'b t -> ('a * 'b) t
val opt : 'a t -> 'a option t
val list : 'a t -> 'a list t
val array : 'a t -> 'a array t
val iarray : 'a t -> 'a Sidekick_util.IArray.t t
val seq : 'a t -> 'a Iter.t t
val combine2 : int -> int -> int
val combine3 : int -> int -> int -> int
val combine4 : int -> int -> int -> int -> int
val poly : 'a t

the regular polymorphic hash function

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__/IArray/index.html b/dev/sidekick/Sidekick_util__/IArray/index.html index abc1b2c2..54c65e4e 100644 --- a/dev/sidekick/Sidekick_util__/IArray/index.html +++ b/dev/sidekick/Sidekick_util__/IArray/index.html @@ -1,2 +1,2 @@ -IArray (sidekick.Sidekick_util__.IArray)

Module Sidekick_util__.IArray

type 'a t = private 'a array

Array of values of type 'a. The underlying type really is an array, but it will never be modified.

It should be covariant but OCaml will not accept it.

val empty : 'a t
val is_empty : _ t -> bool
val length : _ t -> int
val sub : 'a t -> int -> int -> 'a t
val singleton : 'a -> 'a t
val doubleton : 'a -> 'a -> 'a t
val make : int -> 'a -> 'a t

make n x makes an array of n times x

val init : int -> (int -> 'a) -> 'a t

init n f makes the array [| f 0; f 1; ... ; f (n-1) |].

raises Invalid_argument

if n < 0

val get : 'a t -> int -> 'a

Access the element

val unsafe_get : 'a t -> int -> 'a

Unsafe access, not bound-checked. Use with caution

val set : 'a t -> int -> 'a -> 'a t

Copy the array and modify its copy

val map : ('a -> 'b) -> 'a t -> 'b t
val mapi : (int -> 'a -> 'b) -> 'a t -> 'b t
val append : 'a t -> 'a t -> 'a t
val iter : ('a -> unit) -> 'a t -> unit
val iteri : (int -> 'a -> unit) -> 'a t -> unit
val foldi : ('a -> int -> 'b -> 'a) -> 'a -> 'b t -> 'a
val fold : ('a -> 'b -> 'a) -> 'a -> 'b t -> 'a
val for_all : ('a -> bool) -> 'a t -> bool
val exists : ('a -> bool) -> 'a t -> bool

Conversions

type 'a sequence = ('a -> unit) -> unit
type 'a gen = unit -> 'a option
val of_list : 'a list -> 'a t
val to_list : 'a t -> 'a list
val of_list_map : ('a -> 'b) -> 'a list -> 'b t
val to_list_map : ('a -> 'b) -> 'a t -> 'b list
val of_array_map : ('a -> 'b) -> 'a array -> 'b t
val to_array_map : ('a -> 'b) -> 'a t -> 'b array
val of_array_unsafe : 'a array -> 'a t

Take ownership of the given array. Careful, the array must NOT be modified afterwards!

val to_seq : 'a t -> 'a sequence
val of_seq : 'a sequence -> 'a t
val of_gen : 'a gen -> 'a t
val to_gen : 'a t -> 'a gen

IO

type 'a printer = Format.formatter -> 'a -> unit
val print : ?⁠start:string -> ?⁠stop:string -> ?⁠sep:string -> 'a printer -> 'a t printer

Binary

val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val for_all2 : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val exists2 : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val map2 : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t
val fold2 : ('acc -> 'a -> 'b -> 'acc) -> 'acc -> 'a t -> 'b t -> 'acc
val iter2 : ('a -> 'b -> unit) -> 'a t -> 'b t -> unit
\ No newline at end of file +IArray (sidekick.Sidekick_util__.IArray)

Module Sidekick_util__.IArray

type 'a t = private 'a array

Array of values of type 'a. The underlying type really is an array, but it will never be modified.

It should be covariant but OCaml will not accept it.

val empty : 'a t
val is_empty : _ t -> bool
val length : _ t -> int
val sub : 'a t -> int -> int -> 'a t
val singleton : 'a -> 'a t
val doubleton : 'a -> 'a -> 'a t
val make : int -> 'a -> 'a t

make n x makes an array of n times x

val init : int -> (int -> 'a) -> 'a t

init n f makes the array [| f 0; f 1; ... ; f (n-1) |].

raises Invalid_argument

if n < 0

val get : 'a t -> int -> 'a

Access the element

val unsafe_get : 'a t -> int -> 'a

Unsafe access, not bound-checked. Use with caution

val set : 'a t -> int -> 'a -> 'a t

Copy the array and modify its copy

val map : ('a -> 'b) -> 'a t -> 'b t
val mapi : (int -> 'a -> 'b) -> 'a t -> 'b t
val append : 'a t -> 'a t -> 'a t
val iter : ('a -> unit) -> 'a t -> unit
val iteri : (int -> 'a -> unit) -> 'a t -> unit
val foldi : ('a -> int -> 'b -> 'a) -> 'a -> 'b t -> 'a
val fold : ('a -> 'b -> 'a) -> 'a -> 'b t -> 'a
val for_all : ('a -> bool) -> 'a t -> bool
val exists : ('a -> bool) -> 'a t -> bool

Conversions

type 'a iter = ('a -> unit) -> unit
type 'a gen = unit -> 'a option
val of_list : 'a list -> 'a t
val to_list : 'a t -> 'a list
val of_list_map : ('a -> 'b) -> 'a list -> 'b t
val to_list_map : ('a -> 'b) -> 'a t -> 'b list
val of_array_map : ('a -> 'b) -> 'a array -> 'b t
val to_array_map : ('a -> 'b) -> 'a t -> 'b array
val of_array_unsafe : 'a array -> 'a t

Take ownership of the given array. Careful, the array must NOT be modified afterwards!

val to_iter : 'a t -> 'a iter
val to_iter_sub : 'a t -> int -> int -> 'a iter
val of_iter : 'a iter -> 'a t
val of_gen : 'a gen -> 'a t
val to_gen : 'a t -> 'a gen

IO

type 'a printer = Stdlib.Format.formatter -> 'a -> unit
val print : ?⁠start:string -> ?⁠stop:string -> ?⁠sep:string -> 'a printer -> 'a t printer

Binary

val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val for_all2 : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val exists2 : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val map2 : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t
val fold2 : ('acc -> 'a -> 'b -> 'acc) -> 'acc -> 'a t -> 'b t -> 'acc
val iter2 : ('a -> 'b -> unit) -> 'a t -> 'b t -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__/Intf/index.html b/dev/sidekick/Sidekick_util__/Intf/index.html index 29154d95..768959d7 100644 --- a/dev/sidekick/Sidekick_util__/Intf/index.html +++ b/dev/sidekick/Sidekick_util__/Intf/index.html @@ -1,2 +1,2 @@ -Intf (sidekick.Sidekick_util__.Intf)

Module Sidekick_util__.Intf

module type EQ = sig ... end
module type ORD = sig ... end
module type HASH = sig ... end
module type PRINT = sig ... end
type 'a printer = Format.formatter -> 'a -> unit
\ No newline at end of file +Intf (sidekick.Sidekick_util__.Intf)

Module Sidekick_util__.Intf

module type EQ = sig ... end
module type ORD = sig ... end
module type HASH = sig ... end
module type PRINT = sig ... end
type 'a printer = Stdlib.Format.formatter -> 'a -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__/Intf/module-type-EQ/index.html b/dev/sidekick/Sidekick_util__/Intf/module-type-EQ/index.html index 9600725e..14f7cee7 100644 --- a/dev/sidekick/Sidekick_util__/Intf/module-type-EQ/index.html +++ b/dev/sidekick/Sidekick_util__/Intf/module-type-EQ/index.html @@ -1,2 +1,2 @@ -EQ (sidekick.Sidekick_util__.Intf.EQ)

Module type Intf.EQ

type t
val equal : t -> t -> bool
\ No newline at end of file +EQ (sidekick.Sidekick_util__.Intf.EQ)

Module type Intf.EQ

type t
val equal : t -> t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__/Intf/module-type-HASH/index.html b/dev/sidekick/Sidekick_util__/Intf/module-type-HASH/index.html index 9e7b6ebe..593c5fe2 100644 --- a/dev/sidekick/Sidekick_util__/Intf/module-type-HASH/index.html +++ b/dev/sidekick/Sidekick_util__/Intf/module-type-HASH/index.html @@ -1,2 +1,2 @@ -HASH (sidekick.Sidekick_util__.Intf.HASH)

Module type Intf.HASH

type t
val hash : t -> int
\ No newline at end of file +HASH (sidekick.Sidekick_util__.Intf.HASH)

Module type Intf.HASH

type t
val hash : t -> int
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__/Intf/module-type-ORD/index.html b/dev/sidekick/Sidekick_util__/Intf/module-type-ORD/index.html index 2bb257bd..46b50d48 100644 --- a/dev/sidekick/Sidekick_util__/Intf/module-type-ORD/index.html +++ b/dev/sidekick/Sidekick_util__/Intf/module-type-ORD/index.html @@ -1,2 +1,2 @@ -ORD (sidekick.Sidekick_util__.Intf.ORD)

Module type Intf.ORD

type t
val compare : t -> t -> int
\ No newline at end of file +ORD (sidekick.Sidekick_util__.Intf.ORD)

Module type Intf.ORD

type t
val compare : t -> t -> int
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__/Intf/module-type-PRINT/index.html b/dev/sidekick/Sidekick_util__/Intf/module-type-PRINT/index.html index 8385ba05..6acad00d 100644 --- a/dev/sidekick/Sidekick_util__/Intf/module-type-PRINT/index.html +++ b/dev/sidekick/Sidekick_util__/Intf/module-type-PRINT/index.html @@ -1,2 +1,2 @@ -PRINT (sidekick.Sidekick_util__.Intf.PRINT)

Module type Intf.PRINT

type t
val pp : t CCFormat.printer
\ No newline at end of file +PRINT (sidekick.Sidekick_util__.Intf.PRINT)

Module type Intf.PRINT

type t
val pp : t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__/Profile/Control/index.html b/dev/sidekick/Sidekick_util__/Profile/Control/index.html new file mode 100644 index 00000000..61b5acec --- /dev/null +++ b/dev/sidekick/Sidekick_util__/Profile/Control/index.html @@ -0,0 +1,2 @@ + +Control (sidekick.Sidekick_util__.Profile.Control)

Module Profile.Control

val setup : backend option -> unit
val teardown : unit -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__/Profile/index.html b/dev/sidekick/Sidekick_util__/Profile/index.html new file mode 100644 index 00000000..3831f730 --- /dev/null +++ b/dev/sidekick/Sidekick_util__/Profile/index.html @@ -0,0 +1,2 @@ + +Profile (sidekick.Sidekick_util__.Profile)

Module Sidekick_util__.Profile

Profiling probes

type probe
val null_probe : probe
val enabled : unit -> bool
val instant : string -> unit
val begin_ : string -> probe
val exit : probe -> unit
val with_ : string -> (unit -> 'a) -> 'a
val with1 : string -> ('a -> 'b) -> 'a -> 'b
module type BACKEND = sig ... end
type backend = (module BACKEND)
module Control : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__/Profile/module-type-BACKEND/index.html b/dev/sidekick/Sidekick_util__/Profile/module-type-BACKEND/index.html new file mode 100644 index 00000000..213f370b --- /dev/null +++ b/dev/sidekick/Sidekick_util__/Profile/module-type-BACKEND/index.html @@ -0,0 +1,2 @@ + +BACKEND (sidekick.Sidekick_util__.Profile.BACKEND)

Module type Profile.BACKEND

val get_ts : unit -> float
val emit_duration_event : name:string -> start:float -> end_:float -> unit -> unit
val emit_instant_event : name:string -> ts:float -> unit -> unit
val teardown : unit -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__/Stat/index.html b/dev/sidekick/Sidekick_util__/Stat/index.html index 7dd3f86a..1e430148 100644 --- a/dev/sidekick/Sidekick_util__/Stat/index.html +++ b/dev/sidekick/Sidekick_util__/Stat/index.html @@ -1,2 +1,2 @@ -Stat (sidekick.Sidekick_util__.Stat)

Module Sidekick_util__.Stat

Statistics

module Fmt = CCFormat
type t
val create : unit -> t
type 'a counter
val mk_int : t -> string -> int counter
val mk_float : t -> string -> float counter
val incr : int counter -> unit
val incr_f : float counter -> float -> unit
type ex_counter

Existential counter

val all : t -> ex_counter Iter.t
val pp_all : ex_counter Iter.t Fmt.printer
val global : t

Global statistics, by default

\ No newline at end of file +Stat (sidekick.Sidekick_util__.Stat)

Module Sidekick_util__.Stat

Statistics

module Fmt = CCFormat
type t
val create : unit -> t
type 'a counter
val mk_int : t -> string -> int counter
val mk_float : t -> string -> float counter
val incr : int counter -> unit
val incr_f : float counter -> float -> unit
val set : 'a counter -> 'a -> unit
type ex_counter

Existential counter

val all : t -> ex_counter Iter.t
val pp_all : ex_counter Iter.t Fmt.printer
val global : t

Global statistics, by default

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__/Util/index.html b/dev/sidekick/Sidekick_util__/Util/index.html index 38c52074..f5f2f292 100644 --- a/dev/sidekick/Sidekick_util__/Util/index.html +++ b/dev/sidekick/Sidekick_util__/Util/index.html @@ -1,2 +1,2 @@ -Util (sidekick.Sidekick_util__.Util)

Module Sidekick_util__.Util

Utils

type 'a printer = 'a CCFormat.printer
val pp_list : ?⁠sep:string -> 'a printer -> 'a list printer
val pp_seq : ?⁠sep:string -> 'a printer -> 'a Iter.t printer
val pp_array : ?⁠sep:string -> 'a printer -> 'a array printer
val pp_pair : ?⁠sep:string -> 'a printer -> 'b printer -> ('a * 'b) printer
val pp_iarray : ?⁠sep:string -> 'a CCFormat.printer -> 'a Sidekick_util.IArray.t CCFormat.printer
val flat_map_l_ia : ('a -> 'b Sidekick_util.IArray.t) -> 'a list -> 'b list
val setup_gc : unit -> unit

Change parameters of the GC

module Int_set : CCSet.S with type Int_set.elt = int
module Int_map : CCMap.S with type Int_map.key = int
module Int_tbl : CCHashtbl.S with type Int_tbl.key = int
val _CHECK_INVARIANTS : bool
\ No newline at end of file +Util (sidekick.Sidekick_util__.Util)

Module Sidekick_util__.Util

Utils

type 'a printer = 'a CCFormat.printer
val pp_list : ?⁠sep:string -> 'a printer -> 'a list printer
val pp_iter : ?⁠sep:string -> 'a printer -> 'a Iter.t printer
val pp_array : ?⁠sep:string -> 'a printer -> 'a array printer
val pp_pair : ?⁠sep:string -> 'a printer -> 'b printer -> ('a * 'b) printer
val pp_iarray : ?⁠sep:string -> 'a CCFormat.printer -> 'a Sidekick_util.IArray.t CCFormat.printer
val flat_map_l_ia : ('a -> 'b Sidekick_util.IArray.t) -> 'a list -> 'b list
val setup_gc : unit -> unit

Change parameters of the GC

module Int_set : CCSet.S with type Int_set.elt = int
module Int_map : CCMap.S with type Int_map.key = int
module Int_tbl : CCHashtbl.S with type Int_tbl.key = int
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__/index.html b/dev/sidekick/Sidekick_util__/index.html index 8f1bb6d3..be767bfd 100644 --- a/dev/sidekick/Sidekick_util__/index.html +++ b/dev/sidekick/Sidekick_util__/index.html @@ -1,2 +1,2 @@ -Sidekick_util__ (sidekick.Sidekick_util__)

Module Sidekick_util__

module Backtrack_stack : sig ... end
module Bag : sig ... end
module Error : sig ... end
module Event : sig ... end
module IArray : sig ... end
module Intf : sig ... end
module Stat : sig ... end
module Util : sig ... end
\ No newline at end of file +Sidekick_util__ (sidekick.Sidekick_util__)

Module Sidekick_util__

module Backtrack_stack : sig ... end
module Backtrackable_tbl : sig ... end
module Bag : sig ... end
module Error : sig ... end
module Hash : sig ... end
module IArray : sig ... end
module Intf : sig ... end
module Profile : sig ... end
module Stat : sig ... end
module Util : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__Backtrack_stack/index.html b/dev/sidekick/Sidekick_util__Backtrack_stack/index.html index eb363319..85c625cf 100644 --- a/dev/sidekick/Sidekick_util__Backtrack_stack/index.html +++ b/dev/sidekick/Sidekick_util__Backtrack_stack/index.html @@ -1,2 +1,2 @@ -Sidekick_util__Backtrack_stack (sidekick.Sidekick_util__Backtrack_stack)

Module Sidekick_util__Backtrack_stack

A backtracking stack

type 'a t
val create : unit -> 'a t
val push : 'a t -> 'a -> unit

Push an element onto the stack

val push_if_nonzero_level : 'a t -> 'a -> unit

Push an element onto the stack if level > 0

val n_levels : _ t -> int

Number of levels

val push_level : _ t -> unit

Push a backtracking point

val pop_levels : 'a t -> int -> f:('a -> unit) -> unit

pop_levels st n ~f removes n levels, calling f on every removed item

\ No newline at end of file +Sidekick_util__Backtrack_stack (sidekick.Sidekick_util__Backtrack_stack)

Module Sidekick_util__Backtrack_stack

A backtracking stack

type 'a t
val create : unit -> 'a t
val push : 'a t -> 'a -> unit

Push an element onto the stack

val push_if_nonzero_level : 'a t -> 'a -> unit

Push an element onto the stack if level > 0

val n_levels : _ t -> int

Number of levels

val push_level : _ t -> unit

Push a backtracking point

val pop_levels : 'a t -> int -> f:('a -> unit) -> unit

pop_levels st n ~f removes n levels, calling f on every removed item

val iter : f:('a -> unit) -> 'a t -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__Backtrackable_tbl/.dune-keep b/dev/sidekick/Sidekick_util__Backtrackable_tbl/.dune-keep new file mode 100644 index 00000000..e69de29b diff --git a/dev/sidekick/Sidekick_util__Backtrackable_tbl/Make/argument-1-A/index.html b/dev/sidekick/Sidekick_util__Backtrackable_tbl/Make/argument-1-A/index.html new file mode 100644 index 00000000..a267572f --- /dev/null +++ b/dev/sidekick/Sidekick_util__Backtrackable_tbl/Make/argument-1-A/index.html @@ -0,0 +1,2 @@ + +1-A (sidekick.Sidekick_util__Backtrackable_tbl.Make.1-A)

Parameter Make.1-A

type t
val equal : t -> t -> bool
val hash : t -> int
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__Backtrackable_tbl/Make/index.html b/dev/sidekick/Sidekick_util__Backtrackable_tbl/Make/index.html new file mode 100644 index 00000000..92e25310 --- /dev/null +++ b/dev/sidekick/Sidekick_util__Backtrackable_tbl/Make/index.html @@ -0,0 +1,2 @@ + +Make (sidekick.Sidekick_util__Backtrackable_tbl.Make)

Module Sidekick_util__Backtrackable_tbl.Make

Parameters

Signature

type key = A.t
type 'a t
val create : ?⁠size:int -> unit -> 'a t
val find : 'a t -> key -> 'a
raises Not_found

if the key is not present

val get : 'a t -> key -> 'a option
val mem : _ t -> key -> bool
val length : _ t -> int
val iter : (key -> 'a -> unit) -> 'a t -> unit
val to_iter : 'a t -> (key * 'a) Iter.t
val add : 'a t -> key -> 'a -> unit
val remove : _ t -> key -> unit
val push_level : _ t -> unit
val pop_levels : _ t -> int -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__Backtrackable_tbl/index.html b/dev/sidekick/Sidekick_util__Backtrackable_tbl/index.html new file mode 100644 index 00000000..85b24f02 --- /dev/null +++ b/dev/sidekick/Sidekick_util__Backtrackable_tbl/index.html @@ -0,0 +1,2 @@ + +Sidekick_util__Backtrackable_tbl (sidekick.Sidekick_util__Backtrackable_tbl)

Module Sidekick_util__Backtrackable_tbl

A backtrackable hashtable

module type S = sig ... end
module type ARG = sig ... end
module Make : functor (A : ARG) -> S with type key = A.t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__Backtrackable_tbl/module-type-ARG/index.html b/dev/sidekick/Sidekick_util__Backtrackable_tbl/module-type-ARG/index.html new file mode 100644 index 00000000..9cbef29e --- /dev/null +++ b/dev/sidekick/Sidekick_util__Backtrackable_tbl/module-type-ARG/index.html @@ -0,0 +1,2 @@ + +ARG (sidekick.Sidekick_util__Backtrackable_tbl.ARG)

Module type Sidekick_util__Backtrackable_tbl.ARG

type t
val equal : t -> t -> bool
val hash : t -> int
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__Backtrackable_tbl/module-type-S/index.html b/dev/sidekick/Sidekick_util__Backtrackable_tbl/module-type-S/index.html new file mode 100644 index 00000000..cf70ecd5 --- /dev/null +++ b/dev/sidekick/Sidekick_util__Backtrackable_tbl/module-type-S/index.html @@ -0,0 +1,2 @@ + +S (sidekick.Sidekick_util__Backtrackable_tbl.S)

Module type Sidekick_util__Backtrackable_tbl.S

type key
type 'a t
val create : ?⁠size:int -> unit -> 'a t
val find : 'a t -> key -> 'a
raises Not_found

if the key is not present

val get : 'a t -> key -> 'a option
val mem : _ t -> key -> bool
val length : _ t -> int
val iter : (key -> 'a -> unit) -> 'a t -> unit
val to_iter : 'a t -> (key * 'a) Iter.t
val add : 'a t -> key -> 'a -> unit
val remove : _ t -> key -> unit
val push_level : _ t -> unit
val pop_levels : _ t -> int -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__Bag/index.html b/dev/sidekick/Sidekick_util__Bag/index.html index c78e2f59..4f2be7f0 100644 --- a/dev/sidekick/Sidekick_util__Bag/index.html +++ b/dev/sidekick/Sidekick_util__Bag/index.html @@ -1,2 +1,2 @@ -Sidekick_util__Bag (sidekick.Sidekick_util__Bag)

Module Sidekick_util__Bag

Ordered Bag of Elements

A data structure where we can have duplicate elements, optimized for fast concatenation and size.

type +'a t = private
| E
| L of 'a
| N of 'a t * 'a t
val empty : 'a t
val is_empty : _ t -> bool
val return : 'a -> 'a t
val cons : 'a -> 'a t -> 'a t
val append : 'a t -> 'a t -> 'a t
val to_seq : 'a t -> 'a Iter.t
val fold : ('a -> 'b -> 'a) -> 'a -> 'b t -> 'a
val iter : ('a -> unit) -> 'a t -> unit
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

Are the two bags equal, element wise?

\ No newline at end of file +Sidekick_util__Bag (sidekick.Sidekick_util__Bag)

Module Sidekick_util__Bag

Ordered Bag of Elements

A data structure where we can have duplicate elements, optimized for fast concatenation and size.

type +'a t = private
| E
| L of 'a
| N of 'a t * 'a t
val empty : 'a t
val is_empty : _ t -> bool
val return : 'a -> 'a t
val cons : 'a -> 'a t -> 'a t
val append : 'a t -> 'a t -> 'a t
val to_iter : 'a t -> 'a Iter.t
val fold : ('a -> 'b -> 'a) -> 'a -> 'b t -> 'a
val iter : ('a -> unit) -> 'a t -> unit
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

Are the two bags equal, element wise?

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__Error/index.html b/dev/sidekick/Sidekick_util__Error/index.html index 15fa2f95..2caa703f 100644 --- a/dev/sidekick/Sidekick_util__Error/index.html +++ b/dev/sidekick/Sidekick_util__Error/index.html @@ -1,2 +1,2 @@ -Sidekick_util__Error (sidekick.Sidekick_util__Error)

Module Sidekick_util__Error

exception Error of string
val errorf : ('a, Format.formatter, unit, 'b) Pervasives.format4 -> 'a
raises Error

when called

\ No newline at end of file +Sidekick_util__Error (sidekick.Sidekick_util__Error)

Module Sidekick_util__Error

exception Error of string
val errorf : ('a, Stdlib.Format.formatter, unit, 'b) Stdlib.format4 -> 'a
raises Error

when called

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__Event/Emitter/index.html b/dev/sidekick/Sidekick_util__Event/Emitter/index.html deleted file mode 100644 index 8d61bd8f..00000000 --- a/dev/sidekick/Sidekick_util__Event/Emitter/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Emitter (sidekick.Sidekick_util__Event.Emitter)

Module Sidekick_util__Event.Emitter

type 'a t
val fire : 'a t -> 'a -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__Event/index.html b/dev/sidekick/Sidekick_util__Event/index.html deleted file mode 100644 index 2a200a0a..00000000 --- a/dev/sidekick/Sidekick_util__Event/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Sidekick_util__Event (sidekick.Sidekick_util__Event)

Module Sidekick_util__Event

Observer pattern

type 'a t
val on : 'a t -> ('a -> unit) -> unit
module Emitter : sig ... end
val make : unit -> 'a t * 'a Emitter.t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__Hash/.dune-keep b/dev/sidekick/Sidekick_util__Hash/.dune-keep new file mode 100644 index 00000000..e69de29b diff --git a/dev/sidekick/Sidekick_util__Hash/index.html b/dev/sidekick/Sidekick_util__Hash/index.html new file mode 100644 index 00000000..9a94f591 --- /dev/null +++ b/dev/sidekick/Sidekick_util__Hash/index.html @@ -0,0 +1,2 @@ + +Sidekick_util__Hash (sidekick.Sidekick_util__Hash)

Module Sidekick_util__Hash

type 'a t = 'a -> int
val bool : bool t
val int : int t
val string : string t
val combine : 'a t -> int -> 'a -> int
val pair : 'a t -> 'b t -> ('a * 'b) t
val opt : 'a t -> 'a option t
val list : 'a t -> 'a list t
val array : 'a t -> 'a array t
val iarray : 'a t -> 'a Sidekick_util.IArray.t t
val seq : 'a t -> 'a Iter.t t
val combine2 : int -> int -> int
val combine3 : int -> int -> int -> int
val combine4 : int -> int -> int -> int -> int
val poly : 'a t

the regular polymorphic hash function

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__IArray/index.html b/dev/sidekick/Sidekick_util__IArray/index.html index de0153b3..106078f1 100644 --- a/dev/sidekick/Sidekick_util__IArray/index.html +++ b/dev/sidekick/Sidekick_util__IArray/index.html @@ -1,2 +1,2 @@ -Sidekick_util__IArray (sidekick.Sidekick_util__IArray)

Module Sidekick_util__IArray

type 'a t = private 'a array

Array of values of type 'a. The underlying type really is an array, but it will never be modified.

It should be covariant but OCaml will not accept it.

val empty : 'a t
val is_empty : _ t -> bool
val length : _ t -> int
val sub : 'a t -> int -> int -> 'a t
val singleton : 'a -> 'a t
val doubleton : 'a -> 'a -> 'a t
val make : int -> 'a -> 'a t

make n x makes an array of n times x

val init : int -> (int -> 'a) -> 'a t

init n f makes the array [| f 0; f 1; ... ; f (n-1) |].

raises Invalid_argument

if n < 0

val get : 'a t -> int -> 'a

Access the element

val unsafe_get : 'a t -> int -> 'a

Unsafe access, not bound-checked. Use with caution

val set : 'a t -> int -> 'a -> 'a t

Copy the array and modify its copy

val map : ('a -> 'b) -> 'a t -> 'b t
val mapi : (int -> 'a -> 'b) -> 'a t -> 'b t
val append : 'a t -> 'a t -> 'a t
val iter : ('a -> unit) -> 'a t -> unit
val iteri : (int -> 'a -> unit) -> 'a t -> unit
val foldi : ('a -> int -> 'b -> 'a) -> 'a -> 'b t -> 'a
val fold : ('a -> 'b -> 'a) -> 'a -> 'b t -> 'a
val for_all : ('a -> bool) -> 'a t -> bool
val exists : ('a -> bool) -> 'a t -> bool

Conversions

type 'a sequence = ('a -> unit) -> unit
type 'a gen = unit -> 'a option
val of_list : 'a list -> 'a t
val to_list : 'a t -> 'a list
val of_list_map : ('a -> 'b) -> 'a list -> 'b t
val to_list_map : ('a -> 'b) -> 'a t -> 'b list
val of_array_map : ('a -> 'b) -> 'a array -> 'b t
val to_array_map : ('a -> 'b) -> 'a t -> 'b array
val of_array_unsafe : 'a array -> 'a t

Take ownership of the given array. Careful, the array must NOT be modified afterwards!

val to_seq : 'a t -> 'a sequence
val of_seq : 'a sequence -> 'a t
val of_gen : 'a gen -> 'a t
val to_gen : 'a t -> 'a gen

IO

type 'a printer = Format.formatter -> 'a -> unit
val print : ?⁠start:string -> ?⁠stop:string -> ?⁠sep:string -> 'a printer -> 'a t printer

Binary

val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val for_all2 : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val exists2 : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val map2 : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t
val fold2 : ('acc -> 'a -> 'b -> 'acc) -> 'acc -> 'a t -> 'b t -> 'acc
val iter2 : ('a -> 'b -> unit) -> 'a t -> 'b t -> unit
\ No newline at end of file +Sidekick_util__IArray (sidekick.Sidekick_util__IArray)

Module Sidekick_util__IArray

type 'a t = private 'a array

Array of values of type 'a. The underlying type really is an array, but it will never be modified.

It should be covariant but OCaml will not accept it.

val empty : 'a t
val is_empty : _ t -> bool
val length : _ t -> int
val sub : 'a t -> int -> int -> 'a t
val singleton : 'a -> 'a t
val doubleton : 'a -> 'a -> 'a t
val make : int -> 'a -> 'a t

make n x makes an array of n times x

val init : int -> (int -> 'a) -> 'a t

init n f makes the array [| f 0; f 1; ... ; f (n-1) |].

raises Invalid_argument

if n < 0

val get : 'a t -> int -> 'a

Access the element

val unsafe_get : 'a t -> int -> 'a

Unsafe access, not bound-checked. Use with caution

val set : 'a t -> int -> 'a -> 'a t

Copy the array and modify its copy

val map : ('a -> 'b) -> 'a t -> 'b t
val mapi : (int -> 'a -> 'b) -> 'a t -> 'b t
val append : 'a t -> 'a t -> 'a t
val iter : ('a -> unit) -> 'a t -> unit
val iteri : (int -> 'a -> unit) -> 'a t -> unit
val foldi : ('a -> int -> 'b -> 'a) -> 'a -> 'b t -> 'a
val fold : ('a -> 'b -> 'a) -> 'a -> 'b t -> 'a
val for_all : ('a -> bool) -> 'a t -> bool
val exists : ('a -> bool) -> 'a t -> bool

Conversions

type 'a iter = ('a -> unit) -> unit
type 'a gen = unit -> 'a option
val of_list : 'a list -> 'a t
val to_list : 'a t -> 'a list
val of_list_map : ('a -> 'b) -> 'a list -> 'b t
val to_list_map : ('a -> 'b) -> 'a t -> 'b list
val of_array_map : ('a -> 'b) -> 'a array -> 'b t
val to_array_map : ('a -> 'b) -> 'a t -> 'b array
val of_array_unsafe : 'a array -> 'a t

Take ownership of the given array. Careful, the array must NOT be modified afterwards!

val to_iter : 'a t -> 'a iter
val to_iter_sub : 'a t -> int -> int -> 'a iter
val of_iter : 'a iter -> 'a t
val of_gen : 'a gen -> 'a t
val to_gen : 'a t -> 'a gen

IO

type 'a printer = Stdlib.Format.formatter -> 'a -> unit
val print : ?⁠start:string -> ?⁠stop:string -> ?⁠sep:string -> 'a printer -> 'a t printer

Binary

val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val for_all2 : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val exists2 : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val map2 : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t
val fold2 : ('acc -> 'a -> 'b -> 'acc) -> 'acc -> 'a t -> 'b t -> 'acc
val iter2 : ('a -> 'b -> unit) -> 'a t -> 'b t -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__Intf/index.html b/dev/sidekick/Sidekick_util__Intf/index.html index 1e0dd8fd..1bd71cdf 100644 --- a/dev/sidekick/Sidekick_util__Intf/index.html +++ b/dev/sidekick/Sidekick_util__Intf/index.html @@ -1,2 +1,2 @@ -Sidekick_util__Intf (sidekick.Sidekick_util__Intf)

Module Sidekick_util__Intf

module type EQ = sig ... end
module type ORD = sig ... end
module type HASH = sig ... end
module type PRINT = sig ... end
type 'a printer = Format.formatter -> 'a -> unit
\ No newline at end of file +Sidekick_util__Intf (sidekick.Sidekick_util__Intf)

Module Sidekick_util__Intf

module type EQ = sig ... end
module type ORD = sig ... end
module type HASH = sig ... end
module type PRINT = sig ... end
type 'a printer = Stdlib.Format.formatter -> 'a -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__Intf/module-type-EQ/index.html b/dev/sidekick/Sidekick_util__Intf/module-type-EQ/index.html index 09a830f7..252dd8fd 100644 --- a/dev/sidekick/Sidekick_util__Intf/module-type-EQ/index.html +++ b/dev/sidekick/Sidekick_util__Intf/module-type-EQ/index.html @@ -1,2 +1,2 @@ -EQ (sidekick.Sidekick_util__Intf.EQ)

Module type Sidekick_util__Intf.EQ

type t
val equal : t -> t -> bool
\ No newline at end of file +EQ (sidekick.Sidekick_util__Intf.EQ)

Module type Sidekick_util__Intf.EQ

type t
val equal : t -> t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__Intf/module-type-HASH/index.html b/dev/sidekick/Sidekick_util__Intf/module-type-HASH/index.html index d05c850b..0cedb4ec 100644 --- a/dev/sidekick/Sidekick_util__Intf/module-type-HASH/index.html +++ b/dev/sidekick/Sidekick_util__Intf/module-type-HASH/index.html @@ -1,2 +1,2 @@ -HASH (sidekick.Sidekick_util__Intf.HASH)

Module type Sidekick_util__Intf.HASH

type t
val hash : t -> int
\ No newline at end of file +HASH (sidekick.Sidekick_util__Intf.HASH)

Module type Sidekick_util__Intf.HASH

type t
val hash : t -> int
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__Intf/module-type-ORD/index.html b/dev/sidekick/Sidekick_util__Intf/module-type-ORD/index.html index bd98f28b..b76308ec 100644 --- a/dev/sidekick/Sidekick_util__Intf/module-type-ORD/index.html +++ b/dev/sidekick/Sidekick_util__Intf/module-type-ORD/index.html @@ -1,2 +1,2 @@ -ORD (sidekick.Sidekick_util__Intf.ORD)

Module type Sidekick_util__Intf.ORD

type t
val compare : t -> t -> int
\ No newline at end of file +ORD (sidekick.Sidekick_util__Intf.ORD)

Module type Sidekick_util__Intf.ORD

type t
val compare : t -> t -> int
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__Intf/module-type-PRINT/index.html b/dev/sidekick/Sidekick_util__Intf/module-type-PRINT/index.html index 33200a8d..9bca654b 100644 --- a/dev/sidekick/Sidekick_util__Intf/module-type-PRINT/index.html +++ b/dev/sidekick/Sidekick_util__Intf/module-type-PRINT/index.html @@ -1,2 +1,2 @@ -PRINT (sidekick.Sidekick_util__Intf.PRINT)

Module type Sidekick_util__Intf.PRINT

type t
val pp : t CCFormat.printer
\ No newline at end of file +PRINT (sidekick.Sidekick_util__Intf.PRINT)

Module type Sidekick_util__Intf.PRINT

type t
val pp : t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__Profile/.dune-keep b/dev/sidekick/Sidekick_util__Profile/.dune-keep new file mode 100644 index 00000000..e69de29b diff --git a/dev/sidekick/Sidekick_util__Profile/Control/index.html b/dev/sidekick/Sidekick_util__Profile/Control/index.html new file mode 100644 index 00000000..3a2a64df --- /dev/null +++ b/dev/sidekick/Sidekick_util__Profile/Control/index.html @@ -0,0 +1,2 @@ + +Control (sidekick.Sidekick_util__Profile.Control)

Module Sidekick_util__Profile.Control

val setup : backend option -> unit
val teardown : unit -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__Profile/index.html b/dev/sidekick/Sidekick_util__Profile/index.html new file mode 100644 index 00000000..7f151278 --- /dev/null +++ b/dev/sidekick/Sidekick_util__Profile/index.html @@ -0,0 +1,2 @@ + +Sidekick_util__Profile (sidekick.Sidekick_util__Profile)

Module Sidekick_util__Profile

Profiling probes

type probe
val null_probe : probe
val enabled : unit -> bool
val instant : string -> unit
val begin_ : string -> probe
val exit : probe -> unit
val with_ : string -> (unit -> 'a) -> 'a
val with1 : string -> ('a -> 'b) -> 'a -> 'b
module type BACKEND = sig ... end
type backend = (module BACKEND)
module Control : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__Profile/module-type-BACKEND/index.html b/dev/sidekick/Sidekick_util__Profile/module-type-BACKEND/index.html new file mode 100644 index 00000000..1756db33 --- /dev/null +++ b/dev/sidekick/Sidekick_util__Profile/module-type-BACKEND/index.html @@ -0,0 +1,2 @@ + +BACKEND (sidekick.Sidekick_util__Profile.BACKEND)

Module type Sidekick_util__Profile.BACKEND

val get_ts : unit -> float
val emit_duration_event : name:string -> start:float -> end_:float -> unit -> unit
val emit_instant_event : name:string -> ts:float -> unit -> unit
val teardown : unit -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__Stat/index.html b/dev/sidekick/Sidekick_util__Stat/index.html index 6e1d6d8d..f1bb9c56 100644 --- a/dev/sidekick/Sidekick_util__Stat/index.html +++ b/dev/sidekick/Sidekick_util__Stat/index.html @@ -1,2 +1,2 @@ -Sidekick_util__Stat (sidekick.Sidekick_util__Stat)

Module Sidekick_util__Stat

Statistics

module Fmt = CCFormat
type t
val create : unit -> t
type 'a counter
val mk_int : t -> string -> int counter
val mk_float : t -> string -> float counter
val incr : int counter -> unit
val incr_f : float counter -> float -> unit
type ex_counter

Existential counter

val all : t -> ex_counter Iter.t
val pp_all : ex_counter Iter.t Fmt.printer
val global : t

Global statistics, by default

\ No newline at end of file +Sidekick_util__Stat (sidekick.Sidekick_util__Stat)

Module Sidekick_util__Stat

Statistics

module Fmt = CCFormat
type t
val create : unit -> t
type 'a counter
val mk_int : t -> string -> int counter
val mk_float : t -> string -> float counter
val incr : int counter -> unit
val incr_f : float counter -> float -> unit
val set : 'a counter -> 'a -> unit
type ex_counter

Existential counter

val all : t -> ex_counter Iter.t
val pp_all : ex_counter Iter.t Fmt.printer
val global : t

Global statistics, by default

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__Util/index.html b/dev/sidekick/Sidekick_util__Util/index.html index b75ca351..89f73500 100644 --- a/dev/sidekick/Sidekick_util__Util/index.html +++ b/dev/sidekick/Sidekick_util__Util/index.html @@ -1,2 +1,2 @@ -Sidekick_util__Util (sidekick.Sidekick_util__Util)

Module Sidekick_util__Util

Utils

type 'a printer = 'a CCFormat.printer
val pp_list : ?⁠sep:string -> 'a printer -> 'a list printer
val pp_seq : ?⁠sep:string -> 'a printer -> 'a Iter.t printer
val pp_array : ?⁠sep:string -> 'a printer -> 'a array printer
val pp_pair : ?⁠sep:string -> 'a printer -> 'b printer -> ('a * 'b) printer
val pp_iarray : ?⁠sep:string -> 'a CCFormat.printer -> 'a Sidekick_util.IArray.t CCFormat.printer
val flat_map_l_ia : ('a -> 'b Sidekick_util.IArray.t) -> 'a list -> 'b list
val setup_gc : unit -> unit

Change parameters of the GC

module Int_set : CCSet.S with type Int_set.elt = int
module Int_map : CCMap.S with type Int_map.key = int
module Int_tbl : CCHashtbl.S with type Int_tbl.key = int
val _CHECK_INVARIANTS : bool
\ No newline at end of file +Sidekick_util__Util (sidekick.Sidekick_util__Util)

Module Sidekick_util__Util

Utils

type 'a printer = 'a CCFormat.printer
val pp_list : ?⁠sep:string -> 'a printer -> 'a list printer
val pp_iter : ?⁠sep:string -> 'a printer -> 'a Iter.t printer
val pp_array : ?⁠sep:string -> 'a printer -> 'a array printer
val pp_pair : ?⁠sep:string -> 'a printer -> 'b printer -> ('a * 'b) printer
val pp_iarray : ?⁠sep:string -> 'a CCFormat.printer -> 'a Sidekick_util.IArray.t CCFormat.printer
val flat_map_l_ia : ('a -> 'b Sidekick_util.IArray.t) -> 'a list -> 'b list
val setup_gc : unit -> unit

Change parameters of the GC

module Int_set : CCSet.S with type Int_set.elt = int
module Int_map : CCMap.S with type Int_map.key = int
module Int_tbl : CCHashtbl.S with type Int_tbl.key = int
\ No newline at end of file diff --git a/dev/sidekick/index.html b/dev/sidekick/index.html index 87bedc7d..d4b40352 100644 --- a/dev/sidekick/index.html +++ b/dev/sidekick/index.html @@ -1,2 +1,2 @@ -index (sidekick.index)

sidekick index

Library sidekick.base-term

The entry point of this library is the module: Sidekick_base_term.

Library sidekick.cc

The entry point of this library is the module: Sidekick_cc.

Library sidekick.core

The entry point of this library is the module: Sidekick_core.

Library sidekick.mini-cc

The entry point of this library is the module: Sidekick_mini_cc.

Library sidekick.msat-solver

The entry point of this library is the module: Sidekick_msat_solver.

Library sidekick.th-bool-static

The entry point of this library is the module: Sidekick_th_bool_static.

Library sidekick.util

The entry point of this library is the module: Sidekick_util.

\ No newline at end of file +index (sidekick.index)

sidekick index

Library sidekick.cc

The entry point of this library is the module: Sidekick_cc.

Library sidekick.core

The entry point of this library is the module: Sidekick_core.

Library sidekick.mini-cc

The entry point of this library is the module: Sidekick_mini_cc.

Library sidekick.msat-solver

The entry point of this library is the module: Sidekick_msat_solver.

Library sidekick.tef

The entry point of this library is the module: Sidekick_tef.

Library sidekick.th-bool-static

The entry point of this library is the module: Sidekick_th_bool_static.

Library sidekick.th-cstor

The entry point of this library is the module: Sidekick_th_cstor.

Library sidekick.th-data

The entry point of this library is the module: Sidekick_th_data.

Library sidekick.util

The entry point of this library is the module: Sidekick_util.

\ No newline at end of file