<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <title>CVC3: core_theorem_producer.h Source File</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="doxygen.css" rel="stylesheet" type="text/css"/> </head> <body> <!-- Generated by Doxygen 1.7.4 --> <div id="top"> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">CVC3 <span id="projectnumber">2.4.1</span></div> </td> </tr> </tbody> </table> </div> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="modules.html"><span>Modules</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li><a href="annotated.html"><span>Classes</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> </ul> </div> <div id="navrow2" class="tabs2"> <ul class="tablist"> <li><a href="files.html"><span>File List</span></a></li> <li><a href="globals.html"><span>File Members</span></a></li> </ul> </div> <div class="header"> <div class="headertitle"> <div class="title">core_theorem_producer.h</div> </div> </div> <div class="contents"> <a href="core__theorem__producer_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*****************************************************************************/</span><span class="comment"></span> <a name="l00002"></a>00002 <span class="comment">/*!</span> <a name="l00003"></a>00003 <span class="comment"> * \file core_theorem_producer.h</span> <a name="l00004"></a>00004 <span class="comment"> * </span> <a name="l00005"></a>00005 <span class="comment"> * Author: Sergey Berezin</span> <a name="l00006"></a>00006 <span class="comment"> * </span> <a name="l00007"></a>00007 <span class="comment"> * Created: Feb 05 03:40:36 GMT 2003</span> <a name="l00008"></a>00008 <span class="comment"> *</span> <a name="l00009"></a>00009 <span class="comment"> * <hr></span> <a name="l00010"></a>00010 <span class="comment"> *</span> <a name="l00011"></a>00011 <span class="comment"> * License to use, copy, modify, sell and/or distribute this software</span> <a name="l00012"></a>00012 <span class="comment"> * and its documentation for any purpose is hereby granted without</span> <a name="l00013"></a>00013 <span class="comment"> * royalty, subject to the terms and conditions defined in the \ref</span> <a name="l00014"></a>00014 <span class="comment"> * LICENSE file provided with this distribution.</span> <a name="l00015"></a>00015 <span class="comment"> * </span> <a name="l00016"></a>00016 <span class="comment"> * <hr></span> <a name="l00017"></a>00017 <span class="comment"> * </span> <a name="l00018"></a>00018 <span class="comment"> */</span> <a name="l00019"></a>00019 <span class="comment">/*****************************************************************************/</span> <a name="l00020"></a>00020 <span class="comment">// CLASS: CoreTheoremProducer</span> <a name="l00021"></a>00021 <span class="comment">//</span> <a name="l00022"></a>00022 <span class="comment">// AUTHOR: Sergey Berezin, 12/09/2002</span> <a name="l00023"></a>00023 <span class="comment">//</span> <a name="l00024"></a>00024 <span class="comment">// Description: Implementation of the proof rules for ground</span> <a name="l00025"></a>00025 <span class="comment">// equational logic (reflexivity, symmetry, transitivity, and</span> <a name="l00026"></a>00026 <span class="comment">// substitutivity).</span> <a name="l00027"></a>00027 <span class="comment">//</span><span class="comment"></span> <a name="l00028"></a>00028 <span class="comment">///////////////////////////////////////////////////////////////////////////////</span> <a name="l00029"></a>00029 <span class="comment"></span> <a name="l00030"></a>00030 <span class="preprocessor">#ifndef _cvc3__core_theorem_producer_h_</span> <a name="l00031"></a>00031 <span class="preprocessor"></span><span class="preprocessor">#define _cvc3__core_theorem_producer_h_</span> <a name="l00032"></a>00032 <span class="preprocessor"></span> <a name="l00033"></a>00033 <span class="preprocessor">#include "<a class="code" href="core__proof__rules_8h.html" title="Proof rules used by theory_core.">core_proof_rules.h</a>"</span> <a name="l00034"></a>00034 <span class="preprocessor">#include "<a class="code" href="theorem__producer_8h.html">theorem_producer.h</a>"</span> <a name="l00035"></a>00035 <a name="l00036"></a>00036 <span class="keyword">namespace </span>CVC3 { <a name="l00037"></a>00037 <a name="l00038"></a>00038 <span class="keyword">class </span>TheoryCore; <a name="l00039"></a>00039 <a name="l00040"></a><a class="code" href="classCVC3_1_1CoreTheoremProducer.html">00040</a> <span class="keyword">class </span><a class="code" href="classCVC3_1_1CoreTheoremProducer.html">CoreTheoremProducer</a>: <span class="keyword">public</span> <a class="code" href="classCVC3_1_1CoreProofRules.html">CoreProofRules</a>, <span class="keyword">public</span> <a class="code" href="classCVC3_1_1TheoremProducer.html">TheoremProducer</a> { <a name="l00041"></a>00041 <span class="keyword">private</span>:<span class="comment"></span> <a name="l00042"></a>00042 <span class="comment"> //! pointer to theory core</span> <a name="l00043"></a><a class="code" href="classCVC3_1_1CoreTheoremProducer.html#a800f23429437fab5c80e9243de6c5c11">00043</a> <span class="comment"></span> <a class="code" href="classCVC3_1_1TheoryCore.html" title="This theory handles the built-in logical connectives plus equality. It also handles the registration ...">TheoryCore</a>* <a class="code" href="classCVC3_1_1CoreTheoremProducer.html#a800f23429437fab5c80e9243de6c5c11" title="pointer to theory core">d_core</a>; <a name="l00044"></a>00044 <a name="l00045"></a>00045 <span class="keyword">public</span>: <a name="l00046"></a><a class="code" href="classCVC3_1_1CoreTheoremProducer.html#ade8689298e574b416d296d03ed44c051">00046</a> <a class="code" href="classCVC3_1_1CoreTheoremProducer.html#ade8689298e574b416d296d03ed44c051">CoreTheoremProducer</a>(<a class="code" href="classCVC3_1_1TheoremManager.html">TheoremManager</a>* tm, <a class="code" href="classCVC3_1_1TheoryCore.html" title="This theory handles the built-in logical connectives plus equality. It also handles the registration ...">TheoryCore</a>* core) <a name="l00047"></a>00047 : <a class="code" href="classCVC3_1_1TheoremProducer.html">TheoremProducer</a>(tm), <a class="code" href="classCVC3_1_1CoreTheoremProducer.html#a800f23429437fab5c80e9243de6c5c11" title="pointer to theory core">d_core</a>(core) { } <a name="l00048"></a><a class="code" href="classCVC3_1_1CoreTheoremProducer.html#a31ee45df90c9144296b9312c9b5c4a97">00048</a> <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1CoreTheoremProducer.html#a31ee45df90c9144296b9312c9b5c4a97">~CoreTheoremProducer</a>() { } <a name="l00049"></a>00049 <a name="l00050"></a>00050 <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1CoreTheoremProducer.html#a0b6d312ded517ab466308ec5981d250e" title="e: T ==> |- typePred_T(e) [deriving the type predicate of e]">typePred</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>& e); <a name="l00051"></a>00051 <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1CoreTheoremProducer.html#a222db72dc6f637e582dfb9b8dd4e362c" title="Replace LETDECL with its definition.">rewriteLetDecl</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>& e); <a name="l00052"></a>00052 <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1CoreTheoremProducer.html#a66f5d185eca0ccf417b4bf5ed4448f72" title="==> NOT (AND e1 ... en) IFF (OR !e1 ... !en), takes (AND ...)">rewriteNotAnd</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>& e); <a name="l00053"></a>00053 <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1CoreTheoremProducer.html#a5ce6abeb6a346d20f5d5860a30a33e28" title="==> NOT (OR e1 ... en) IFF (AND !e1 ... !en), takes (OR ...)">rewriteNotOr</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>& e); <a name="l00054"></a>00054 <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1CoreTheoremProducer.html#a7da16f5874fbc0870f57a9deeeec80b8" title="==> NOT IFF(e1,e2) IFF IFF(e1,NOT e2)">rewriteNotIff</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>& e); <a name="l00055"></a>00055 <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1CoreTheoremProducer.html#accd799779aa02c5d84352cc48e975b3d" title="==> NOT ITE(a,b,c) IFF ITE(a,NOT b,NOT c)">rewriteNotIte</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>& e); <a name="l00056"></a>00056 <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1CoreTheoremProducer.html#a490808acd89e0732678d570599c93165" title="a |- b == d ==> ITE(a, b, c) == ITE(a, d, c)">rewriteIteThen</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>& e, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a>& thenThm); <a name="l00057"></a>00057 <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1CoreTheoremProducer.html#ae1092dc92aef4300caf926b48ac2ec65" title="!a |- c == d ==> ITE(a, b, c) == ITE(a, b, d)">rewriteIteElse</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>& e, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a>& elseThm); <a name="l00058"></a>00058 <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1CoreTheoremProducer.html#ac888377c574a056b251446902c010352" title="==> ITE(c, e1, e2) <=> (c => e1) AND (!c => e2)">rewriteIteBool</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>& c, <a name="l00059"></a>00059 <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>& e1, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>& e2); <a name="l00060"></a>00060 <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1CoreTheoremProducer.html#a84abfb7cac1d339c43b322b097aa574c" title="|= (A & B1) | (A & B2) | ... | (A & bn) <=> A & (B1 | B2 | ...| Bn)">orDistributivityRule</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>& e); <a name="l00061"></a>00061 <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1CoreTheoremProducer.html#af5e5fb97e5fe6197e42c2c44e1757bb3" title="|= (A | B1) & (A | B2) & ... & (A | bn) <=> A | (B1 & B2 & ...& Bn)">andDistributivityRule</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>& e); <a name="l00062"></a>00062 <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1CoreTheoremProducer.html#ac88efa4d7c591f187d3212c7162ef9a5" title="==> IMPLIES(e1,e2) IFF OR(!e1, e2)">rewriteImplies</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>& e); <a name="l00063"></a>00063 <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1CoreTheoremProducer.html#a17536e7c7ffa8d9a34981458a20f21ff" title="==> DISTINCT(e1,...,en) IFF AND 1 <= i < j <= n (e[i] /= e[j])">rewriteDistinct</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>& e); <a name="l00064"></a>00064 <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1CoreTheoremProducer.html#a287bd6f15c149c66f1aea020cd144571" title="==> NOT(e) == ITE(e, FALSE, TRUE)">NotToIte</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>& not_e); <a name="l00065"></a>00065 <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1CoreTheoremProducer.html#a23a4580e5eb68d197db655776c5e8b0a" title="==> Or(e) == ITE(e[1], TRUE, e[0])">OrToIte</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>& e); <a name="l00066"></a>00066 <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1CoreTheoremProducer.html#aaa435d07458188d1380e42d51c70b419" title="==> And(e) == ITE(e[1], e[0], FALSE)">AndToIte</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>& e); <a name="l00067"></a>00067 <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1CoreTheoremProducer.html#af0a98459d73dbd5b89582d803f304aac" title="==> IFF(a,b) == ITE(a, b, !b)">IffToIte</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>& e); <a name="l00068"></a>00068 <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1CoreTheoremProducer.html#aa5abdd3bfe669a3a0b28a92d28e8958a" title="==> IMPLIES(a,b) == ITE(a, b, TRUE)">ImpToIte</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>& e); <a name="l00069"></a>00069 <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1CoreTheoremProducer.html#a27d39117a5ede71d9c460b0232bdd469" title="==> ITE(e, FALSE, TRUE) IFF NOT(e)">rewriteIteToNot</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>& e); <a name="l00070"></a>00070 <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1CoreTheoremProducer.html#a2db95a382b0141d9a5098e9ca9ddd0f7" title="==> ITE(a, TRUE, b) IFF OR(a, b)">rewriteIteToOr</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>& e); <a name="l00071"></a>00071 <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1CoreTheoremProducer.html#ae681f89828ece60f9725c5696204cd72" title="==> ITE(a, b, FALSE) IFF AND(a, b)">rewriteIteToAnd</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>& e); <a name="l00072"></a>00072 <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1CoreTheoremProducer.html#abba61fa631a3e3fd6ae8761754f01c72" title="==> ITE(a, b, !b) IFF IFF(a, b)">rewriteIteToIff</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>& e); <a name="l00073"></a>00073 <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1CoreTheoremProducer.html#af0468c432ee5bfc5f82675f4b50e2002" title="==> ITE(a, b, TRUE) IFF IMPLIES(a, b)">rewriteIteToImp</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>& e); <a name="l00074"></a>00074 <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1CoreTheoremProducer.html#acc27c290c53fdaab6977d43d765b10e3" title="==> ITE(a, b(a), c(a)) IFF ITE(a, b(TRUE), c(FALSE))">rewriteIteCond</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>& e); <a name="l00075"></a>00075 <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1CoreTheoremProducer.html#ac4ef57871856386e38e514d65e3b2c5e" title="|- op(ITE(cond,a,b)) =/<=> ITE(cond,op(a),op(b))">ifLiftUnaryRule</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>& e); <a name="l00076"></a>00076 <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1CoreTheoremProducer.html#a93299fd86567941880c6566e1d3af6b8" title="((a|b)<=>(a|c))<=>(a|(b<=>c)); takes ((a|b)<=>(a|c)) as 'iff'">iffOrDistrib</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>& iff); <a name="l00077"></a>00077 <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1CoreTheoremProducer.html#aecd467f33f9bcb736eadfa77f1a517aa" title="((a&b)<=>(a&c))<=>(!a|(b<=>c)); takes ((a&b)<=>(a&c)) as 'iff'">iffAndDistrib</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>& iff); <a name="l00078"></a>00078 <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1CoreTheoremProducer.html#a8c67942a0f72ee11abe27c992e0833c1" title="(a & b) <=> a & b[a/true]; takes the index of a">rewriteAndSubterms</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>& e, <span class="keywordtype">int</span> idx); <a name="l00079"></a>00079 <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1CoreTheoremProducer.html#ae6b1fd56b11dbe24218cd2f5c74518c9" title="(a | b) <=> a | b[a/false]; takes the index of a">rewriteOrSubterms</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>& e, <span class="keywordtype">int</span> idx); <a name="l00080"></a>00080 <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1CoreTheoremProducer.html#a1990709421517a01d824217eed8d1021" title="Temporary cheat for building theorems.">dummyTheorem</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>& e); <a name="l00081"></a>00081 <a name="l00082"></a>00082 }; <span class="comment">// end of class CoreTheoremProducer</span> <a name="l00083"></a>00083 <a name="l00084"></a>00084 } <span class="comment">// end of namespace CVC3</span> <a name="l00085"></a>00085 <a name="l00086"></a>00086 <span class="preprocessor">#endif</span> </pre></div></div> </div> <hr class="footer"/><address class="footer"><small>Generated on Wed Sep 7 2011 for CVC3 by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address> </body> </html>