Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 583ffa4ba069126c3ba0bc565dc0485a > files > 80

cvc3-doc-2.4.1-1.fc15.noarch.rpm

<!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: bitvector_proof_rules.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&#160;<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&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;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&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
<div class="header">
  <div class="headertitle">
<div class="title">bitvector_proof_rules.h</div>  </div>
</div>
<div class="contents">
<a href="bitvector__proof__rules_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 bitvector_proof_rules.h</span>
<a name="l00004"></a>00004 <span class="comment"> * \brief Arithmetic proof rules</span>
<a name="l00005"></a>00005 <span class="comment"> *</span>
<a name="l00006"></a>00006 <span class="comment"> * Author: Vijay Ganesh.</span>
<a name="l00007"></a>00007 <span class="comment"> *</span>
<a name="l00008"></a>00008 <span class="comment"> * Created:Wed May  5 15:47:28 PST 2004</span>
<a name="l00009"></a>00009 <span class="comment"> *</span>
<a name="l00010"></a>00010 <span class="comment"> * &lt;hr&gt;</span>
<a name="l00011"></a>00011 <span class="comment"> *</span>
<a name="l00012"></a>00012 <span class="comment"> * License to use, copy, modify, sell and/or distribute this software</span>
<a name="l00013"></a>00013 <span class="comment"> * and its documentation for any purpose is hereby granted without</span>
<a name="l00014"></a>00014 <span class="comment"> * royalty, subject to the terms and conditions defined in the \ref</span>
<a name="l00015"></a>00015 <span class="comment"> * LICENSE file provided with this distribution.</span>
<a name="l00016"></a>00016 <span class="comment"> *</span>
<a name="l00017"></a>00017 <span class="comment"> * &lt;hr&gt;</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">/*****************************************************************************/</span>
<a name="l00021"></a>00021 
<a name="l00022"></a>00022 <span class="preprocessor">#ifndef _cvc3__bitvector_proof_rules_h_</span>
<a name="l00023"></a>00023 <span class="preprocessor"></span><span class="preprocessor">#define _cvc3__bitvector_proof_rules_h_</span>
<a name="l00024"></a>00024 <span class="preprocessor"></span>
<a name="l00025"></a>00025 <span class="preprocessor">#include &lt;string&gt;</span>
<a name="l00026"></a>00026 <span class="preprocessor">#include &lt;vector&gt;</span>
<a name="l00027"></a>00027 
<a name="l00028"></a>00028 <span class="keyword">namespace </span>CVC3 {
<a name="l00029"></a>00029 
<a name="l00030"></a>00030   <span class="keyword">class </span>Expr;
<a name="l00031"></a>00031   <span class="keyword">class </span>Theorem;
<a name="l00032"></a>00032 
<a name="l00033"></a><a class="code" href="classCVC3_1_1BitvectorProofRules.html">00033</a>   <span class="keyword">class </span><a class="code" href="classCVC3_1_1BitvectorProofRules.html">BitvectorProofRules</a> {
<a name="l00034"></a>00034   <span class="keyword">public</span>:
<a name="l00035"></a>00035     <span class="comment">// Destructor</span>
<a name="l00036"></a><a class="code" href="classCVC3_1_1BitvectorProofRules.html#a7b9613e9ffdee59c9f70bd06e1a6f29e">00036</a>     <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#a7b9613e9ffdee59c9f70bd06e1a6f29e">~BitvectorProofRules</a>() { }
<a name="l00037"></a>00037 <span class="comment"></span>
<a name="l00038"></a>00038 <span class="comment">    ////////////////////////////////////////////////////////////////////</span>
<a name="l00039"></a>00039 <span class="comment"></span>    <span class="comment">// Bitblasting rules for equations</span><span class="comment"></span>
<a name="l00040"></a>00040 <span class="comment">    ////////////////////////////////////////////////////////////////////</span>
<a name="l00041"></a>00041 <span class="comment"></span><span class="comment"></span>
<a name="l00042"></a>00042 <span class="comment">    /*! \param thm input theorem: (e1[i]&lt;=&gt;e2[i])&lt;=&gt;false</span>
<a name="l00043"></a>00043 <span class="comment">     *</span>
<a name="l00044"></a>00044 <span class="comment">     *  \result (e1=e2)&lt;=&gt;false</span>
<a name="l00045"></a>00045 <span class="comment">     */</span>
<a name="l00046"></a>00046     <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#a6536981ca57bbf915b88a818ad56a1f3">bitvectorFalseRule</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a>&amp; thm) = 0;
<a name="l00047"></a>00047 <span class="comment"></span>
<a name="l00048"></a>00048 <span class="comment">    /*! \param thm input theorem: (~e1[i]&lt;=&gt;e2[i])&lt;=&gt;true</span>
<a name="l00049"></a>00049 <span class="comment">     *</span>
<a name="l00050"></a>00050 <span class="comment">     *  \result (e1!=e2)&lt;=&gt;true</span>
<a name="l00051"></a>00051 <span class="comment">     */</span>
<a name="l00052"></a>00052     <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#a27a79309cbbf8554394d32c9773472cc">bitvectorTrueRule</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a>&amp; thm) = 0;
<a name="l00053"></a>00053 
<a name="l00054"></a>00054 <span class="comment"></span>
<a name="l00055"></a>00055 <span class="comment">    //! t1=t2 ==&gt; AND_i(t1[i:i] = t2[i:i])</span>
<a name="l00056"></a>00056 <span class="comment"></span><span class="comment">    /*!</span>
<a name="l00057"></a>00057 <span class="comment">     * \param e is a Expr(t1=t2)</span>
<a name="l00058"></a>00058 <span class="comment">     *</span>
<a name="l00059"></a>00059 <span class="comment">     * \param f is the resulting expression AND_i(t1[i:i] = t2[i:i])</span>
<a name="l00060"></a>00060 <span class="comment">     * is passed to the rule for efficiency.</span>
<a name="l00061"></a>00061 <span class="comment">     */</span>
<a name="l00062"></a>00062     <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#a596c0779b2f39d41816ff658eef9203b" title="t1=t2 ==&gt; AND_i(t1[i:i] = t2[i:i])">bitBlastEqnRule</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; f) = 0;<span class="comment"></span>
<a name="l00063"></a>00063 <span class="comment">    //! t1/=t2 ==&gt; OR_i(NOT t1[i]&lt;=&gt;t2[i])</span>
<a name="l00064"></a>00064 <span class="comment"></span><span class="comment">    /*!</span>
<a name="l00065"></a>00065 <span class="comment">     * \param e is a Theorem(t1/=t2)</span>
<a name="l00066"></a>00066 <span class="comment">     *</span>
<a name="l00067"></a>00067 <span class="comment">     * \param f is the resulting expression OR_i(NOT t1[i]&lt;=&gt;t2[i]),</span>
<a name="l00068"></a>00068 <span class="comment">     * passed to the rule for efficiency.</span>
<a name="l00069"></a>00069 <span class="comment">     */</span>
<a name="l00070"></a>00070     <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#aefb184e963398f43e9dd7a0799563350" title="t1/=t2 ==&gt; OR_i(NOT t1[i]&lt;=&gt;t2[i])">bitBlastDisEqnRule</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a>&amp; e, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; f) = 0;
<a name="l00071"></a>00071 
<a name="l00072"></a>00072 <span class="comment"></span>
<a name="l00073"></a>00073 <span class="comment">    ////////////////////////////////////////////////////////////////////</span>
<a name="l00074"></a>00074 <span class="comment"></span>    <span class="comment">// Bitblasting and rewrite rules for Inequations</span><span class="comment"></span>
<a name="l00075"></a>00075 <span class="comment">    ////////////////////////////////////////////////////////////////////</span>
<a name="l00076"></a>00076 <span class="comment"></span><span class="comment"></span>
<a name="l00077"></a>00077 <span class="comment">    //! sign extend the input SX(e) appropriately</span>
<a name="l00078"></a>00078 <span class="comment"></span>    <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#a06405edfaf820f9b2940ce7bf406615f" title="sign extend the input SX(e) appropriately">signExtendRule</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e) = 0;
<a name="l00079"></a>00079 <span class="comment"></span>
<a name="l00080"></a>00080 <span class="comment">    //! Pad the kids of BVLT/BVLE to make their length equal</span>
<a name="l00081"></a>00081 <span class="comment"></span>    <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#a5ca10099b3728f472fc70efbe03fce11" title="Pad the kids of BVLT/BVLE to make their length equal.">padBVLTRule</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e, <span class="keywordtype">int</span> len) = 0;
<a name="l00082"></a>00082 <span class="comment"></span>
<a name="l00083"></a>00083 <span class="comment">    //! Sign Extend the kids of BVSLT/BVSLE to make their length equal</span>
<a name="l00084"></a>00084 <span class="comment"></span>    <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#a9a4fef11fae7f9d9b281876569c3ecaf" title="Sign Extend the kids of BVSLT/BVSLE to make their length equal.">padBVSLTRule</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e, <span class="keywordtype">int</span> len) = 0;
<a name="l00085"></a>00085 <span class="comment"></span>
<a name="l00086"></a>00086 <span class="comment">    /*! input: e0 &lt;=(s) e1. output depends on whether the topbits(MSB) of</span>
<a name="l00087"></a>00087 <span class="comment">     *  e0 and e1 are constants. If they are constants then optimizations</span>
<a name="l00088"></a>00088 <span class="comment">     *  are done, otherwise the following rule is implemented.</span>
<a name="l00089"></a>00089 <span class="comment">     *</span>
<a name="l00090"></a>00090 <span class="comment">     *  e0 &lt;=(s) e1 &lt;==&gt; (e0[n-1] AND NOT e1[n-1]) OR</span>
<a name="l00091"></a>00091 <span class="comment">     *                   (e0[n-1] AND e1[n-1] AND e1[n-2:0] &lt;= e0[n-2:0]) OR</span>
<a name="l00092"></a>00092 <span class="comment">     *                   (NOT e0[n-1] AND NOT e1[n-1] AND e0[n-2:0] &lt;= e1[n-2:0])</span>
<a name="l00093"></a>00093 <span class="comment">     */</span>
<a name="l00094"></a>00094     <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#af472ab5f550394b03c264675181ac1c9">signBVLTRule</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e,
<a name="l00095"></a>00095          <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a>&amp; topBit0,
<a name="l00096"></a>00096          <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a>&amp; topBit1) = 0;
<a name="l00097"></a>00097 <span class="comment"></span>
<a name="l00098"></a>00098 <span class="comment">    /*! NOT(e[0][0] = e[0][1]) &lt;==&gt; e[0][0] = ~e[0][1]</span>
<a name="l00099"></a>00099 <span class="comment">     */</span>
<a name="l00100"></a>00100     <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#a7fdf91656d5a4d1b9278e8a974a2578e">notBVEQ1Rule</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e) = 0;
<a name="l00101"></a>00101 <span class="comment"></span>
<a name="l00102"></a>00102 <span class="comment">    /*! NOT(e[0][0] &lt; e[0][1]) &lt;==&gt; (e[0][1] &lt;= e[0][0]),</span>
<a name="l00103"></a>00103 <span class="comment">     *  NOT(e[0][0] &lt;= e[0][1]) &lt;==&gt; (e[0][1] &lt; e[0][0])</span>
<a name="l00104"></a>00104 <span class="comment">     */</span>
<a name="l00105"></a>00105     <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#a328733af3be6889566b4ab81c7dd4759">notBVLTRule</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e) = 0;
<a name="l00106"></a>00106 <span class="comment"></span>
<a name="l00107"></a>00107 <span class="comment">    //! if(lhs==rhs) then we have (lhs &lt; rhs &lt;==&gt; false),(lhs &lt;= rhs &lt;==&gt; true)</span>
<a name="l00108"></a>00108 <span class="comment"></span>    <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#a4be7745b6e05010590d15b0ae9f87212" title="if(lhs==rhs) then we have (lhs &lt; rhs &lt;==&gt; false),(lhs &lt;= rhs &lt;==&gt; true)">lhsEqRhsIneqn</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e, <span class="keywordtype">int</span> kind) = 0;
<a name="l00109"></a>00109 
<a name="l00110"></a>00110 
<a name="l00111"></a>00111     <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#a7536abc5b7725abfec2d93987cf86a6b">zeroLeq</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e) = 0;
<a name="l00112"></a>00112     <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#a3ce4fc360b44dec2f89d8d597244c305">bvConstIneqn</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e, <span class="keywordtype">int</span> kind) = 0;
<a name="l00113"></a>00113 
<a name="l00114"></a>00114     <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#a666ed19d6d57236061243c0951ee6228">generalIneqn</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e,
<a name="l00115"></a>00115          <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a>&amp; e0,
<a name="l00116"></a>00116          <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a>&amp; e1, <span class="keywordtype">int</span> kind) = 0;
<a name="l00117"></a>00117 
<a name="l00118"></a>00118 <span class="comment"></span>
<a name="l00119"></a>00119 <span class="comment">    ////////////////////////////////////////////////////////////////////</span>
<a name="l00120"></a>00120 <span class="comment"></span>    <span class="comment">// Bitblast rules for terms</span><span class="comment"></span>
<a name="l00121"></a>00121 <span class="comment">    ////////////////////////////////////////////////////////////////////</span>
<a name="l00122"></a>00122 <span class="comment"></span>
<a name="l00123"></a>00123     <span class="comment">// Input: |- BOOLEXTRACT(a,0) &lt;=&gt; bc_0, ... BOOLEXTRACT(a,n-1) &lt;=&gt; bc_(n-1)</span>
<a name="l00124"></a>00124     <span class="comment">// where each bc_0 is TRUE or FALSE</span>
<a name="l00125"></a>00125     <span class="comment">// Output: |- a = c</span>
<a name="l00126"></a>00126     <span class="comment">// where c is an n-bit constant made from the values bc_0..bc_(n-1)</span>
<a name="l00127"></a>00127     <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#ad63871213ec8c864a622bb3d2248b043">bitExtractAllToConstEq</a>(std::vector&lt;Theorem&gt;&amp; thms) = 0;
<a name="l00128"></a>00128 <span class="comment"></span>
<a name="l00129"></a>00129 <span class="comment">    //! t[i] ==&gt; t[i:i] = 0bin1   or    NOT t[i] ==&gt; t[i:i] = 0bin0</span>
<a name="l00130"></a>00130 <span class="comment"></span><span class="comment">    /*! \param thm is a Theorem(t[i]) or Theorem(NOT t[i]), where t[i]</span>
<a name="l00131"></a>00131 <span class="comment">     * is BOOLEXTRACT(t, i).</span>
<a name="l00132"></a>00132 <span class="comment">     */</span>
<a name="l00133"></a>00133     <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#a77c82c6fccba740e2df14739edb40a02" title="t[i] ==&gt; t[i:i] = 0bin1 or NOT t[i] ==&gt; t[i:i] = 0bin0">bitExtractToExtract</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a>&amp; thm) = 0;
<a name="l00134"></a>00134 <span class="comment"></span>
<a name="l00135"></a>00135 <span class="comment">    //! t[i] &lt;=&gt; t[i:i][0]   (to use rewriter for simplifying t[i:i])</span>
<a name="l00136"></a>00136 <span class="comment"></span>    <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#a79a44f95f79735f733cd75f289887da9" title="t[i] &lt;=&gt; t[i:i][0] (to use rewriter for simplifying t[i:i])">bitExtractRewrite</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; x) = 0;
<a name="l00137"></a>00137 <span class="comment"></span>
<a name="l00138"></a>00138 <span class="comment">    /*! \param x is bitvector constant</span>
<a name="l00139"></a>00139 <span class="comment">     *  \param i is extracted bitposition</span>
<a name="l00140"></a>00140 <span class="comment">     *</span>
<a name="l00141"></a>00141 <span class="comment">     *  \result \f[ \frac{}{\mathrm{BOOLEXTRACT(x,i)} \iff</span>
<a name="l00142"></a>00142 <span class="comment">     *  \mathrm{TRUE}} \f], if bitposition has a 1; \f[</span>
<a name="l00143"></a>00143 <span class="comment">     *  \frac{}{\mathrm{BOOLEXTRACT(x,i)} \iff \mathrm{FALSE}} \f], if</span>
<a name="l00144"></a>00144 <span class="comment">     *  the bitposition has a 0</span>
<a name="l00145"></a>00145 <span class="comment">     */</span>
<a name="l00146"></a>00146     <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#ace62b8eacaad88c90231099943a49090">bitExtractConstant</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> &amp; x, <span class="keywordtype">int</span> i)= 0;
<a name="l00147"></a>00147 <span class="comment"></span>
<a name="l00148"></a>00148 <span class="comment">    /*! \param x is bitvector binary concatenation</span>
<a name="l00149"></a>00149 <span class="comment">     *  \param i is extracted bitposition</span>
<a name="l00150"></a>00150 <span class="comment">     *</span>
<a name="l00151"></a>00151 <span class="comment">     *  \result \f[ \frac{}{(t_{[m]}@q_{[n]})[i] \iff (q_{[n]})[i]}</span>
<a name="l00152"></a>00152 <span class="comment">     *  \f], where \f[ 0 \geq i \geq n-1 \f], another case of</span>
<a name="l00153"></a>00153 <span class="comment">     *  boolextract over concatenation is:</span>
<a name="l00154"></a>00154 <span class="comment">     *  \f[\frac{}{(t_{[m]}@q_{[n]})[i] \iff (t_{[m]})[i-n]} \f],</span>
<a name="l00155"></a>00155 <span class="comment">     *  where \f[ n \geq i \geq m+n-1 \f]</span>
<a name="l00156"></a>00156 <span class="comment">     */</span>
<a name="l00157"></a>00157     <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#a14d171b56b3318b1a070fc2c0798f038">bitExtractConcatenation</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> &amp; x,
<a name="l00158"></a>00158               <span class="keywordtype">int</span> i)= 0;
<a name="l00159"></a>00159 <span class="comment"></span>
<a name="l00160"></a>00160 <span class="comment">    /*! \param t is bitvector binary BVMULT. x[0] must be BVCONST</span>
<a name="l00161"></a>00161 <span class="comment">     *  \param i is extracted bitposition</span>
<a name="l00162"></a>00162 <span class="comment">     *</span>
<a name="l00163"></a>00163 <span class="comment">     *  \result bitblast of BVMULT</span>
<a name="l00164"></a>00164 <span class="comment">     */</span>
<a name="l00165"></a>00165     <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#a14a48b5e0170be003c5a52585654fa6c">bitExtractConstBVMult</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; t, <span class="keywordtype">int</span> i)= 0;
<a name="l00166"></a>00166 <span class="comment"></span>
<a name="l00167"></a>00167 <span class="comment">    /*! \param t : input1 is bitvector binary BVMULT. t[0] must not be BVCONST</span>
<a name="l00168"></a>00168 <span class="comment">     *  \param i : input2 is extracted bitposition</span>
<a name="l00169"></a>00169 <span class="comment">     *</span>
<a name="l00170"></a>00170 <span class="comment">     *  \result bitblast of BVMULT</span>
<a name="l00171"></a>00171 <span class="comment">     */</span>
<a name="l00172"></a>00172     <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#ac473ab04bc4692de3ff7f19940d4a3a2">bitExtractBVMult</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; t, <span class="keywordtype">int</span> i) = 0;
<a name="l00173"></a>00173 <span class="comment"></span>
<a name="l00174"></a>00174 <span class="comment">    /*! \param x is bitvector extraction e[k:j]</span>
<a name="l00175"></a>00175 <span class="comment">     *  \param i is extracted bitposition</span>
<a name="l00176"></a>00176 <span class="comment">     *</span>
<a name="l00177"></a>00177 <span class="comment">     *  \result \f[ \frac{}{(t_{[n]}[k:j])[i] \iff (t_{[n]})[i+j]}</span>
<a name="l00178"></a>00178 <span class="comment">     *  \f], where \f[ 0 \geq j \geq k &lt; n, 0 \geq i &lt; k-j \f]</span>
<a name="l00179"></a>00179 <span class="comment">     */</span>
<a name="l00180"></a>00180     <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#ae46b941cbb7c67aec7a96a45b33e73ab">bitExtractExtraction</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> &amp; x, <span class="keywordtype">int</span> i)= 0;
<a name="l00181"></a>00181 <span class="comment"></span>
<a name="l00182"></a>00182 <span class="comment">    /*! \param t1 is vector of bitblasts of t, from bit i-1 to 0</span>
<a name="l00183"></a>00183 <span class="comment">     *  \param t2 is vector of bitblasts of q, from bit i-1 to 0</span>
<a name="l00184"></a>00184 <span class="comment">     *  \param bvPlusTerm is BVPLUS term: BVPLUS(n,t,q)</span>
<a name="l00185"></a>00185 <span class="comment">     *  \param i is extracted bitposition</span>
<a name="l00186"></a>00186 <span class="comment">     *</span>
<a name="l00187"></a>00187 <span class="comment">     *  \result The base case is: \f[</span>
<a name="l00188"></a>00188 <span class="comment">     *  \frac{}{(\mathrm{BVPLUS}(n,t,q))[0] \iff t[0] \oplus q[0]}</span>
<a name="l00189"></a>00189 <span class="comment">     *  \f], when \f[ 0 &lt; i \leq n-1 \f], we have \f[</span>
<a name="l00190"></a>00190 <span class="comment">     *  \frac{}{(\mathrm{BVPLUS}(n,t,q))[i] \iff t[i] \oplus q[i]</span>
<a name="l00191"></a>00191 <span class="comment">     *  \oplus c(t,q,i)} \f], where c(t,q,i) is the carry generated</span>
<a name="l00192"></a>00192 <span class="comment">     *  by the addition of bits from 0 to i-1</span>
<a name="l00193"></a>00193 <span class="comment">     */</span>
<a name="l00194"></a>00194     <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#ab60522e7672d31bcf2957d1cbd118208">bitExtractBVPlus</a>(<span class="keyword">const</span> std::vector&lt;Theorem&gt;&amp; t1,
<a name="l00195"></a>00195            <span class="keyword">const</span> std::vector&lt;Theorem&gt;&amp; t2,
<a name="l00196"></a>00196            <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; bvPlusTerm, <span class="keywordtype">int</span> i) = 0;
<a name="l00197"></a>00197 
<a name="l00198"></a>00198 
<a name="l00199"></a>00199     <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#ab521ae872e2a877f5e30ec9f1b8ded8f">bitExtractBVPlusPreComputed</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a>&amp; t1_i,
<a name="l00200"></a>00200             <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a>&amp; t2_i,
<a name="l00201"></a>00201             <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; bvPlusTerm,
<a name="l00202"></a>00202             <span class="keywordtype">int</span> bitPos,
<a name="l00203"></a>00203             <span class="keywordtype">int</span> precomputed) = 0;
<a name="l00204"></a>00204 
<a name="l00205"></a>00205 <span class="comment"></span>
<a name="l00206"></a>00206 <span class="comment">    /*! \param bvPlusTerm : input1 is bvPlusTerm, a BVPLUS term with</span>
<a name="l00207"></a>00207 <span class="comment">     *  arity &gt; 2</span>
<a name="l00208"></a>00208 <span class="comment">     *</span>
<a name="l00209"></a>00209 <span class="comment">     *  \result : output is iff-Theorem: bvPlusTerm &lt;==&gt; outputTerm,</span>
<a name="l00210"></a>00210 <span class="comment">     *  where outputTerm is an equivalent BINARY bvplus.</span>
<a name="l00211"></a>00211 <span class="comment">     */</span>
<a name="l00212"></a>00212     <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#a0836ea2282578bd221ade4a06d0abc2e">bvPlusAssociativityRule</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; bvPlusTerm)= 0;
<a name="l00213"></a>00213 <span class="comment"></span>
<a name="l00214"></a>00214 <span class="comment">    /*! \param x : input1 is bitwise NEGATION</span>
<a name="l00215"></a>00215 <span class="comment">     *  \param i : input2 is extracted bitposition</span>
<a name="l00216"></a>00216 <span class="comment">     *</span>
<a name="l00217"></a>00217 <span class="comment">     *  \result \f[ \frac{}{(\sim t_{[n]})[i] \iff \neg (t_{[n]}[i])}</span>
<a name="l00218"></a>00218 <span class="comment">     *  \f]</span>
<a name="l00219"></a>00219 <span class="comment">     */</span>
<a name="l00220"></a>00220     <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#a40fd98cf00aa03114e7bdf0e164abe69">bitExtractNot</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> &amp; x, <span class="keywordtype">int</span> i)= 0;
<a name="l00221"></a>00221 <span class="comment"></span>
<a name="l00222"></a>00222 <span class="comment">    //! Extract from bitwise AND, OR, or XOR</span>
<a name="l00223"></a>00223 <span class="comment"></span>    <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#a9f09c5a49fd132f26a01ec7d96168e42" title="Extract from bitwise AND, OR, or XOR.">bitExtractBitwise</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> &amp; x, <span class="keywordtype">int</span> i, <span class="keywordtype">int</span> kind)= 0;
<a name="l00224"></a>00224 <span class="comment"></span>
<a name="l00225"></a>00225 <span class="comment">    /*! \param x : input1 is bitvector FIXED SHIFT \f[ e_{[n]} \ll k \f]</span>
<a name="l00226"></a>00226 <span class="comment">     *  \param i : input2 is extracted bitposition</span>
<a name="l00227"></a>00227 <span class="comment">     *</span>
<a name="l00228"></a>00228 <span class="comment">     *  \result \f[\frac{}{(e_{[n]} \ll k)[i] \iff \mathrm{FALSE}}</span>
<a name="l00229"></a>00229 <span class="comment">     *  \f], if 0 &lt;= i &lt; k. however, if k &lt;= i &lt; n then, result is</span>
<a name="l00230"></a>00230 <span class="comment">     *  \f[\frac{}{(e_{[n]} \ll k)[i] \iff e_{[n]}[i]} \f]</span>
<a name="l00231"></a>00231 <span class="comment">     */</span>
<a name="l00232"></a>00232     <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#a3c7217656c1f4bdd8ab08e415ef3dc7d">bitExtractFixedLeftShift</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> &amp; x,
<a name="l00233"></a>00233                <span class="keywordtype">int</span> i)= 0;
<a name="l00234"></a>00234 
<a name="l00235"></a>00235     <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#a8671b7ed4e5e09402cf5a732fb13a373">bitExtractFixedRightShift</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> &amp; x,
<a name="l00236"></a>00236                 <span class="keywordtype">int</span> i)= 0;
<a name="l00237"></a>00237     <span class="comment">// BOOLEXTRACT(bvshl(t,s),i) &lt;=&gt; ((s = 0) AND BOOLEXTRACT(t,i)) OR</span>
<a name="l00238"></a>00238     <span class="comment">//                               ((s = 1) AND BOOLEXTRACT(t,i-1)) OR ...</span>
<a name="l00239"></a>00239     <span class="comment">//                               ((s = i) AND BOOLEXTRACT(t,0))</span>
<a name="l00240"></a>00240     <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#afcd3c4de329e1b2912d83853be46130a">bitExtractBVSHL</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> &amp; x, <span class="keywordtype">int</span> i) = 0;
<a name="l00241"></a>00241 
<a name="l00242"></a>00242     <span class="comment">// BOOLEXTRACT(bvlshr(t,s),i) &lt;=&gt; ((s = 0) AND BOOLEXTRACT(t,i)) OR</span>
<a name="l00243"></a>00243     <span class="comment">//                                ((s = 1) AND BOOLEXTRACT(t,i+1)) OR ...</span>
<a name="l00244"></a>00244     <span class="comment">//                                ((s = n-1-i) AND BOOLEXTRACT(t,n-1))</span>
<a name="l00245"></a>00245     <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#aebe59090c69f529aa1450a64f2d80538">bitExtractBVLSHR</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> &amp; x, <span class="keywordtype">int</span> i) = 0;
<a name="l00246"></a>00246 
<a name="l00247"></a>00247     <span class="comment">// BOOLEXTRACT(bvashr(t,s),i) &lt;=&gt; ((s = 0) AND BOOLEXTRACT(t,i)) OR</span>
<a name="l00248"></a>00248     <span class="comment">//                                ((s = 1) AND BOOLEXTRACT(t,i+1)) OR ...</span>
<a name="l00249"></a>00249     <span class="comment">//                                ((s &gt;= n-1-i) AND BOOLEXTRACT(t,n-1))</span>
<a name="l00250"></a>00250     <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#a95f41581d03d993ec02541ec78fbd655">bitExtractBVASHR</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> &amp; x, <span class="keywordtype">int</span> i) = 0;
<a name="l00251"></a>00251 <span class="comment"></span>
<a name="l00252"></a>00252 <span class="comment">    /*! \param e : input1 is bitvector term</span>
<a name="l00253"></a>00253 <span class="comment">     *  \param r : input2 is extracted bitposition</span>
<a name="l00254"></a>00254 <span class="comment">     *</span>
<a name="l00255"></a>00255 <span class="comment">     *  \result we check if r &gt; bvlength(e). if yes, then return</span>
<a name="l00256"></a>00256 <span class="comment">     *  BOOLEXTRACT(e,r) &lt;==&gt; FALSE; else raise soundness</span>
<a name="l00257"></a>00257 <span class="comment">     *  exception. (Note: this rule is used in BVPLUS bitblast</span>
<a name="l00258"></a>00258 <span class="comment">     *  function)</span>
<a name="l00259"></a>00259 <span class="comment">     */</span>
<a name="l00260"></a>00260     <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#ae806df67b545215d677ccd81b68c9b16">zeroPaddingRule</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e, <span class="keywordtype">int</span> r)= 0;
<a name="l00261"></a>00261 
<a name="l00262"></a>00262 
<a name="l00263"></a>00263     <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#a0520e4a3cf5ce89aaa0cf24c1cf5dd9a">bitExtractSXRule</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e, <span class="keywordtype">int</span> i) = 0;
<a name="l00264"></a>00264 <span class="comment"></span>
<a name="l00265"></a>00265 <span class="comment">    ///////////////////////////////////////////////////////////////////</span>
<a name="l00266"></a>00266 <span class="comment">    /////  Special case rewrite rules</span>
<a name="l00267"></a>00267 <span class="comment">    ///////////////////////////////////////////////////////////////////</span>
<a name="l00268"></a>00268 <span class="comment"></span><span class="comment"></span>
<a name="l00269"></a>00269 <span class="comment">    //! c1=c2 &lt;=&gt; TRUE/FALSE (equality of constant bitvectors)</span>
<a name="l00270"></a>00270 <span class="comment"></span>    <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#ad88adf2f899f5eab5c0de7c09892178f" title="c1=c2 &lt;=&gt; TRUE/FALSE (equality of constant bitvectors)">eqConst</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e) = 0;<span class="comment"></span>
<a name="l00271"></a>00271 <span class="comment">    //! |- c1=c2 ==&gt; |- AND(c1[i:i] = c2[i:i]) - expanding equalities into bits</span>
<a name="l00272"></a>00272 <span class="comment"></span>    <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#a72537952b59dbed6451fe20803e565a6" title="|- c1=c2 ==&gt; |- AND(c1[i:i] = c2[i:i]) - expanding equalities into bits">eqToBits</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a>&amp; eq) = 0;<span class="comment"></span>
<a name="l00273"></a>00273 <span class="comment">    //! t&lt;&lt;n = c @ 0bin00...00, takes e == (t&lt;&lt;n)</span>
<a name="l00274"></a>00274 <span class="comment"></span>    <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#a2944e9810307f39e543f8fa6b973f0a8" title="t&lt;&lt;n = c @ 0bin00...00, takes e == (t&lt;&lt;n)">leftShiftToConcat</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e) = 0;<span class="comment"></span>
<a name="l00275"></a>00275 <span class="comment">    //! t&lt;&lt;n = c @ 0bin00...00, takes e == (t&lt;&lt;n)</span>
<a name="l00276"></a>00276 <span class="comment"></span>    <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#aaf79659bd7a160d20c3d27d7746d9ca3" title="t&lt;&lt;n = c @ 0bin00...00, takes e == (t&lt;&lt;n)">constWidthLeftShiftToConcat</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e) = 0;<span class="comment"></span>
<a name="l00277"></a>00277 <span class="comment">    //! t&gt;&gt;m = 0bin00...00 @ t[bvlength-1:m], takes e == (t&gt;&gt;n)</span>
<a name="l00278"></a>00278 <span class="comment"></span>    <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#ab2d4f1d9f2f71845d0e2efb2e9ab0f02" title="t&gt;&gt;m = 0bin00...00 @ t[bvlength-1:m], takes e == (t&gt;&gt;n)">rightShiftToConcat</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e) = 0;<span class="comment"></span>
<a name="l00279"></a>00279 <span class="comment">    //! BVSHL(t,c) = t[n-c,0] @ 0bin00...00</span>
<a name="l00280"></a>00280 <span class="comment"></span>    <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#aa665d97eb8067ae68741a6e25135e307" title="BVSHL(t,c) = t[n-c,0] @ 0bin00...00.">bvshlToConcat</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e) = 0;<span class="comment"></span>
<a name="l00281"></a>00281 <span class="comment">    //! BVSHL(t,c) = IF (c = 0) THEN t ELSE IF (c = 1) ...</span>
<a name="l00282"></a>00282 <span class="comment"></span>    <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#ab3a7d61a6e1627433906f527f89e300b" title="BVSHL(t,c) = IF (c = 0) THEN t ELSE IF (c = 1) ...">bvshlSplit</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e) = 0;<span class="comment"></span>
<a name="l00283"></a>00283 <span class="comment">    //! BVLSHR(t,c) = 0bin00...00 @ t[n-1,c]</span>
<a name="l00284"></a>00284 <span class="comment"></span>    <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#a994aa73b02c523cd2e9e76a4880a167b" title="BVLSHR(t,c) = 0bin00...00 @ t[n-1,c].">bvlshrToConcat</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e) = 0;<span class="comment"></span>
<a name="l00285"></a>00285 <span class="comment">    //! Any shift over a zero  = 0</span>
<a name="l00286"></a>00286 <span class="comment"></span>    <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#a52acdd1024ed2ab0737c7747102fa7fe" title="Any shift over a zero = 0.">bvShiftZero</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e) = 0;<span class="comment"></span>
<a name="l00287"></a>00287 <span class="comment">    //! BVASHR(t,c) = SX(t[n-1,c], n-1)</span>
<a name="l00288"></a>00288 <span class="comment"></span>    <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#a42639e0098377ce718308a2ae833430b" title="BVASHR(t,c) = SX(t[n-1,c], n-1)">bvashrToConcat</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e) = 0;<span class="comment"></span>
<a name="l00289"></a>00289 <span class="comment">    //! a XNOR b &lt;=&gt; (~a &amp; ~b) | (a &amp; b)</span>
<a name="l00290"></a>00290 <span class="comment"></span>    <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#af126175b4dbb92231ec44c14f32d8b21" title="a XNOR b &lt;=&gt; (~a &amp; ~b) | (a &amp; b)">rewriteXNOR</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e) = 0;<span class="comment"></span>
<a name="l00291"></a>00291 <span class="comment">    //! a NAND b &lt;=&gt; ~(a &amp; b)</span>
<a name="l00292"></a>00292 <span class="comment"></span>    <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#a53c8279d20f7d229437790ce6c0da2da" title="a NAND b &lt;=&gt; ~(a &amp; b)">rewriteNAND</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e) = 0;<span class="comment"></span>
<a name="l00293"></a>00293 <span class="comment">    //! a NOR b &lt;=&gt; ~(a | b)</span>
<a name="l00294"></a>00294 <span class="comment"></span>    <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#a8e2d34a4c387bd5eace8b7e6237bd936" title="a NOR b &lt;=&gt; ~(a | b)">rewriteNOR</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e) = 0;<span class="comment"></span>
<a name="l00295"></a>00295 <span class="comment">    //! BVCOMP(a,b) &lt;=&gt; ITE(a=b,0bin1,0bin0)</span>
<a name="l00296"></a>00296 <span class="comment"></span>    <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#acccc78337e0a0143b9635e1cd49ac657" title="BVCOMP(a,b) &lt;=&gt; ITE(a=b,0bin1,0bin0)">rewriteBVCOMP</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e) = 0;<span class="comment"></span>
<a name="l00297"></a>00297 <span class="comment">    //! a - b &lt;=&gt; a + (-b)</span>
<a name="l00298"></a>00298 <span class="comment"></span>    <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#a693f8801e36967bf64a0fef0290cad5a" title="a - b &lt;=&gt; a + (-b)">rewriteBVSub</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e) = 0;<span class="comment"></span>
<a name="l00299"></a>00299 <span class="comment">    //! k*t = BVPLUS(n, &lt;sum of shifts of t&gt;) -- translation of k*t to BVPLUS</span>
<a name="l00300"></a>00300 <span class="comment"></span><span class="comment">    /*! If k = 2^m, return k*t = t\@0...0 */</span>
<a name="l00301"></a>00301     <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#ac132cce6c99ee7626ee4696010e77aa6" title="k*t = BVPLUS(n, &lt;sum of shifts of t&gt;) -- translation of k*t to BVPLUS">constMultToPlus</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e) = 0;<span class="comment"></span>
<a name="l00302"></a>00302 <span class="comment">    //! 0bin0...0 @ BVPLUS(n, args) = BVPLUS(n+k, args)</span>
<a name="l00303"></a>00303 <span class="comment"></span><span class="comment">    /*! provided that m+ceil(log2(l)) &lt;= n, where k is the size of the</span>
<a name="l00304"></a>00304 <span class="comment">     * 0bin0...0, m is the max. length of each argument, and l is the</span>
<a name="l00305"></a>00305 <span class="comment">     * number of arguments.</span>
<a name="l00306"></a>00306 <span class="comment">     */</span>
<a name="l00307"></a>00307     <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#a425296e1ac48c9698802b9a7513745d5" title="0bin0...0 @ BVPLUS(n, args) = BVPLUS(n+k, args)">bvplusZeroConcatRule</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e) = 0;
<a name="l00308"></a>00308 
<a name="l00309"></a>00309 <span class="comment"></span>
<a name="l00310"></a>00310 <span class="comment">    ///////////////////////////////////////////////////////////////////</span>
<a name="l00311"></a>00311 <span class="comment">    /////  Bvplus Normal Form rules</span>
<a name="l00312"></a>00312 <span class="comment">    ///////////////////////////////////////////////////////////////////</span>
<a name="l00313"></a>00313 <span class="comment"></span>    <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#a0dacf60fcac4bbbcc45019a5c58d576c">zeroCoeffBVMult</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e)=0;
<a name="l00314"></a>00314     <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#a99efc60c900f6818e718eaa76634f82d">oneCoeffBVMult</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e)=0;
<a name="l00315"></a>00315     <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#ae17fc2f1a86046cc389e4f828ce6043c">flipBVMult</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e) = 0;<span class="comment"></span>
<a name="l00316"></a>00316 <span class="comment">    //! Make args the same length as the result (zero-extend)</span>
<a name="l00317"></a>00317 <span class="comment"></span>    <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#a534b8599309b8a1f04355f974450eb44" title="Make args the same length as the result (zero-extend)">padBVPlus</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e) = 0;<span class="comment"></span>
<a name="l00318"></a>00318 <span class="comment">    //! Make args the same length as the result (zero-extend)</span>
<a name="l00319"></a>00319 <span class="comment"></span>    <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#a185de05a96896134fb0c204bfa2b701f" title="Make args the same length as the result (zero-extend)">padBVMult</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e) = 0;
<a name="l00320"></a>00320     <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#a47645c759c4c43b1336d6aa8ea4bef24">bvConstMultAssocRule</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e) = 0;
<a name="l00321"></a>00321     <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#a06eb338d6dbad205f7ce886b94866e01">bvMultAssocRule</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e) = 0;
<a name="l00322"></a>00322     <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#a0a00757ccf2b0b5115003629085752f5">bvMultDistRule</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e) = 0;
<a name="l00323"></a>00323     <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#a5c1a3b38a87b8cdf2fe7674b0c50c8ed">flattenBVPlus</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e) = 0;
<a name="l00324"></a>00324     <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#a88dbf100f26bd80ac71b976513cf5ed0">combineLikeTermsRule</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e) = 0;
<a name="l00325"></a>00325     <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#ad7df7b16e4ba8d0a84163dac7a3fd29d">lhsMinusRhsRule</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e) = 0;<span class="comment"></span>
<a name="l00326"></a>00326 <span class="comment">    //! (x *[n] y)[m:k] = (x *[m+1] y)[m:k], where m &lt; n</span>
<a name="l00327"></a>00327 <span class="comment"></span>    <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#aa3c6172968875b9189228eb7f8c50187" title="(x *[n] y)[m:k] = (x *[m+1] y)[m:k], where m &lt; n">extractBVMult</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e) = 0;<span class="comment"></span>
<a name="l00328"></a>00328 <span class="comment">    //! (x +[n] y)[m:k] = (x +[m+1] y)[m:k], where m &lt; n</span>
<a name="l00329"></a>00329 <span class="comment"></span>    <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#a144383710caebde013be9b2cefce5a4c" title="(x +[n] y)[m:k] = (x +[m+1] y)[m:k], where m &lt; n">extractBVPlus</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e) = 0;<span class="comment"></span>
<a name="l00330"></a>00330 <span class="comment">    //! ite(c,t1,t2)[i:j] &lt;=&gt; ite(c,t1[i:j],t2[i:j])</span>
<a name="l00331"></a>00331 <span class="comment"></span>    <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#adabf3a32d5a2444ca64e2f66a414f185" title="ite(c,t1,t2)[i:j] &lt;=&gt; ite(c,t1[i:j],t2[i:j])">iteExtractRule</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e) = 0;<span class="comment"></span>
<a name="l00332"></a>00332 <span class="comment">    //! ~ite(c,t1,t2) &lt;=&gt; ite(c,~t1,~t2)</span>
<a name="l00333"></a>00333 <span class="comment"></span>    <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#ae25244a21bbc10ad069c9c98ac49590e" title="~ite(c,t1,t2) &lt;=&gt; ite(c,~t1,~t2)">iteBVnegRule</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e) = 0;
<a name="l00334"></a>00334 
<a name="l00335"></a>00335     <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#afb6657218e31843d4f9fb55494133a51">bvuminusBVConst</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e) = 0;
<a name="l00336"></a>00336     <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#ae96c6008f1ded31a7d8985264594cbbc">bvuminusBVMult</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e) = 0;
<a name="l00337"></a>00337     <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#a331e5974d6b4cf1458501aba9c4a2556">bvuminusBVUminus</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e) = 0;
<a name="l00338"></a>00338     <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#aaa564090b043862b11ce47d777a9c959">bvuminusVar</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e) = 0;
<a name="l00339"></a>00339     <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#a63c42dbedb2f04af9dd61d6b104c42f0">bvmultBVUminus</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e) = 0;<span class="comment"></span>
<a name="l00340"></a>00340 <span class="comment">    //! -t &lt;==&gt; ~t+1</span>
<a name="l00341"></a>00341 <span class="comment"></span>    <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#ab7d869044d0d907fb1066e706039ca68">bvuminusToBVPlus</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e) = 0;<span class="comment"></span>
<a name="l00342"></a>00342 <span class="comment">    //! -(c1*t1+...+cn*tn) &lt;==&gt; (-(c1*t1)+...+-(cn*tn))</span>
<a name="l00343"></a>00343 <span class="comment"></span>    <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#ac77eea8dcc7f833bb3f426fd3f021a93">bvuminusBVPlus</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e) = 0;
<a name="l00344"></a>00344 
<a name="l00345"></a>00345 
<a name="l00346"></a>00346 <span class="comment"></span>
<a name="l00347"></a>00347 <span class="comment">    ///////////////////////////////////////////////////////////////////</span>
<a name="l00348"></a>00348 <span class="comment">    /////  Concatenation Normal Form rules</span>
<a name="l00349"></a>00349 <span class="comment">    ///////////////////////////////////////////////////////////////////</span>
<a name="l00350"></a>00350 <span class="comment"></span>
<a name="l00351"></a>00351     <span class="comment">// Extraction rules</span>
<a name="l00352"></a>00352 <span class="comment"></span>
<a name="l00353"></a>00353 <span class="comment">    //! c1[i:j] = c  (extraction from a constant bitvector)</span>
<a name="l00354"></a>00354 <span class="comment"></span>    <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#a56770462de38c0c8eed61d1f33c77d6c" title="c1[i:j] = c (extraction from a constant bitvector)">extractConst</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e) = 0;<span class="comment"></span>
<a name="l00355"></a>00355 <span class="comment">    //! t[n-1:0] = t  for n-bit t</span>
<a name="l00356"></a>00356 <span class="comment"></span>    <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#ae9d9e1338cf24b20f8eb713fbd9b0219" title="t[n-1:0] = t for n-bit t">extractWhole</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e) = 0;<span class="comment"></span>
<a name="l00357"></a>00357 <span class="comment">    //! t[i:j][k:l] = t[k+j:l+j]  (eliminate double extraction)</span>
<a name="l00358"></a>00358 <span class="comment"></span>    <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#a7fc72894f97ec709bf1558254e40903e" title="t[i:j][k:l] = t[k+j:l+j] (eliminate double extraction)">extractExtract</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e) = 0;<span class="comment"></span>
<a name="l00359"></a>00359 <span class="comment">    //! (t1 @ t2)[i:j] = t1[...] @ t2[...]  (push extraction through concat)</span>
<a name="l00360"></a>00360 <span class="comment"></span>    <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#a483af962d2b2c8390207e94bd2ae6dc1" title="(t1 @ t2)[i:j] = t1[...] @ t2[...] (push extraction through concat)">extractConcat</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e) = 0;<span class="comment"></span>
<a name="l00361"></a>00361 <span class="comment">    //! (t1 &amp; t2)[i:j] = t1[i:j] &amp; t2[i:j]  (push extraction through OR)</span>
<a name="l00362"></a>00362 <span class="comment"></span>    <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#a9c8be2deedd7168a29b288737cd050a8" title="(t1 &amp; t2)[i:j] = t1[i:j] &amp; t2[i:j] (push extraction through OR)">extractAnd</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e) = 0;<span class="comment"></span>
<a name="l00363"></a>00363 <span class="comment">    //! (t1 | t2)[i:j] = t1[i:j] | t2[i:j]  (push extraction through AND)</span>
<a name="l00364"></a>00364 <span class="comment"></span>    <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#a7cdfdc4ac2ed578d2c584549b8a374a7" title="(t1 | t2)[i:j] = t1[i:j] | t2[i:j] (push extraction through AND)">extractOr</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e) = 0;<span class="comment"></span>
<a name="l00365"></a>00365 <span class="comment">    //! (~t)[i:j] = ~(t[i:j]) (push extraction through NEG)</span>
<a name="l00366"></a>00366 <span class="comment"></span>    <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#ac258a650188de30470eae5c53116abfd" title="(~t)[i:j] = ~(t[i:j]) (push extraction through NEG)">extractNeg</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e) = 0;<span class="comment"></span>
<a name="l00367"></a>00367 <span class="comment">    //! Auxiliary function: (t1 op t2)[i:j] = t1[i:j] op t2[i:j]</span>
<a name="l00368"></a>00368 <span class="comment"></span>    <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#a548cc7ab83b3d604226f09235d2097bf" title="Auxiliary function: (t1 op t2)[i:j] = t1[i:j] op t2[i:j].">extractBitwise</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e,
<a name="l00369"></a>00369            <span class="keywordtype">int</span> kind, <span class="keyword">const</span> std::string&amp; name) = 0;
<a name="l00370"></a>00370 
<a name="l00371"></a>00371     <span class="comment">// Negation rules</span>
<a name="l00372"></a>00372 <span class="comment"></span>
<a name="l00373"></a>00373 <span class="comment">    //! ~c1 = c  (bit-wise negation of a constant bitvector)</span>
<a name="l00374"></a>00374 <span class="comment"></span>    <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#a76151013db10b5faa12ba32ad2374fc6" title="~c1 = c (bit-wise negation of a constant bitvector)">negConst</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e) = 0;<span class="comment"></span>
<a name="l00375"></a>00375 <span class="comment">    //! ~(t1\@...\@tn) = (~t1)\@...\@(~tn) -- push negation through concat</span>
<a name="l00376"></a>00376 <span class="comment"></span>    <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#a9c4a53c0c1961951e3d847394bfa1b20" title="~(t1@...@tn) = (~t1)@...@(~tn) -- push negation through concat">negConcat</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e) = 0;<span class="comment"></span>
<a name="l00377"></a>00377 <span class="comment">    //! ~(~t) = t  -- eliminate double negation</span>
<a name="l00378"></a>00378 <span class="comment"></span>    <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#ac6cbc581e757d482483d62366e84afb9" title="~(~t) = t -- eliminate double negation">negNeg</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e) = 0;<span class="comment"></span>
<a name="l00379"></a>00379 <span class="comment">    //! ~t = -1*t + 1 -- eliminate negation</span>
<a name="l00380"></a>00380 <span class="comment"></span>    <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#a13eeb7dac6de93650d885b61eb72e0ad" title="~t = -1*t + 1 -- eliminate negation">negElim</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e) = 0;<span class="comment"></span>
<a name="l00381"></a>00381 <span class="comment">    //! ~(t1 &amp; t2) &lt;=&gt; ~t1 | ~t2 -- DeMorgan&#39;s Laws</span>
<a name="l00382"></a>00382 <span class="comment"></span>    <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#a4fb78e904f25388d54eb0ba54ced536d" title="~(t1 &amp; t2) &lt;=&gt; ~t1 | ~t2 -- DeMorgan&#39;s Laws">negBVand</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e) = 0;<span class="comment"></span>
<a name="l00383"></a>00383 <span class="comment">    //! ~(t1 | t2) &lt;=&gt; ~t1 &amp; ~t2 -- DeMorgan&#39;s Laws</span>
<a name="l00384"></a>00384 <span class="comment"></span>    <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#a5763889eb6cd07ab04d4c98686db01cf" title="~(t1 | t2) &lt;=&gt; ~t1 &amp; ~t2 -- DeMorgan&#39;s Laws">negBVor</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e) = 0;<span class="comment"></span>
<a name="l00385"></a>00385 <span class="comment">    //! ~(t1 xor t2) = ~t1 xor t2</span>
<a name="l00386"></a>00386 <span class="comment"></span>    <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#a2b4170a86c6978a77c338dbf832929ad" title="~(t1 xor t2) = ~t1 xor t2">negBVxor</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e) = 0;<span class="comment"></span>
<a name="l00387"></a>00387 <span class="comment">    //! ~(t1 xnor t2) = t1 xor t2</span>
<a name="l00388"></a>00388 <span class="comment"></span>    <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#accade48c8a792079d97d49d92dc2abee" title="~(t1 xnor t2) = t1 xor t2">negBVxnor</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e) = 0;
<a name="l00389"></a>00389 <span class="comment"></span>
<a name="l00390"></a>00390 <span class="comment">    //! Combine constants in bitwise AND, OR, XOR</span>
<a name="l00391"></a>00391 <span class="comment"></span>    <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#abc8792717d3f194aa05f279f63033ec1" title="Combine constants in bitwise AND, OR, XOR.">bitwiseConst</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e,
<a name="l00392"></a>00392                                  <span class="keyword">const</span> std::vector&lt;int&gt;&amp; idxs,
<a name="l00393"></a>00393                                  <span class="keywordtype">int</span> kind) = 0;<span class="comment"></span>
<a name="l00394"></a>00394 <span class="comment">    //! Lifts concatenation above bitwise operators.</span>
<a name="l00395"></a>00395 <span class="comment"></span>    <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#a29d3cce157edf35040c7c237570e37c9" title="Lifts concatenation above bitwise operators.">bitwiseConcat</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e, <span class="keywordtype">int</span> kind) = 0;<span class="comment"></span>
<a name="l00396"></a>00396 <span class="comment">    //! Flatten bitwise operation</span>
<a name="l00397"></a>00397 <span class="comment"></span>    <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#a78d58f8b598713266bad87dcfba0d93b" title="Flatten bitwise operation.">bitwiseFlatten</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e, <span class="keywordtype">int</span> kind) = 0;<span class="comment"></span>
<a name="l00398"></a>00398 <span class="comment">    //! Simplify bitwise operator containing a constant child</span>
<a name="l00399"></a>00399 <span class="comment"></span><span class="comment">    /*! \param e is the bit-wise expr</span>
<a name="l00400"></a>00400 <span class="comment">     *  \param idx is the index of the constant bitvector</span>
<a name="l00401"></a>00401 <span class="comment">     *  \param kind is the kind of e</span>
<a name="l00402"></a>00402 <span class="comment">     */</span>
<a name="l00403"></a>00403     <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#ab67de0bd797585c3a5cfa3d80a4bfa42" title="Simplify bitwise operator containing a constant child.">bitwiseConstElim</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e, <span class="keywordtype">int</span> idx, <span class="keywordtype">int</span> kind) = 0;
<a name="l00404"></a>00404 
<a name="l00405"></a>00405     <span class="comment">// Concatenation rules</span>
<a name="l00406"></a>00406 <span class="comment"></span>
<a name="l00407"></a>00407 <span class="comment">    //! c1\@c2\@...\@cn = c  (concatenation of constant bitvectors)</span>
<a name="l00408"></a>00408 <span class="comment"></span>    <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#a067fc47b8a688b6a08b94c5044d2faf5" title="c1@c2@...@cn = c (concatenation of constant bitvectors)">concatConst</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e) = 0;<span class="comment"></span>
<a name="l00409"></a>00409 <span class="comment">    //! Flatten one level of nested concatenation, e.g.: x\@(y\@z)\@w = x\@y\@z\@w</span>
<a name="l00410"></a>00410 <span class="comment"></span>    <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#a06461d9c64f09ce1dc9acf6cb0628977" title="Flatten one level of nested concatenation, e.g.: x@(y@z)@w = x@y@z@w.">concatFlatten</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e) = 0;<span class="comment"></span>
<a name="l00411"></a>00411 <span class="comment">    //! Merge n-ary concat. of adjacent extractions: x[15:8]\@x[7:0] = x[15:0]</span>
<a name="l00412"></a>00412 <span class="comment"></span>    <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#adec7f3c93376d5e5c0abb20fc3b44eb9" title="Merge n-ary concat. of adjacent extractions: x[15:8]@x[7:0] = x[15:0].">concatMergeExtract</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e) = 0;
<a name="l00413"></a>00413 <span class="comment"></span>
<a name="l00414"></a>00414 <span class="comment">    ///////////////////////////////////////////////////////////////////</span>
<a name="l00415"></a>00415 <span class="comment">    /////  Modulo arithmetic rules</span>
<a name="l00416"></a>00416 <span class="comment">    ///////////////////////////////////////////////////////////////////</span>
<a name="l00417"></a>00417 <span class="comment"></span><span class="comment"></span>
<a name="l00418"></a>00418 <span class="comment">    //! BVPLUS(n, c1,c2,...,cn) = c  (bit-vector plus of constant bitvectors)</span>
<a name="l00419"></a>00419 <span class="comment"></span>    <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#a70ff8e2477ef2d049bd33d1a4bab482e" title="BVPLUS(n, c1,c2,...,cn) = c (bit-vector plus of constant bitvectors)">bvplusConst</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e) = 0;<span class="comment"></span>
<a name="l00420"></a>00420 <span class="comment">    /*! @brief n*c1 = c, where n &gt;= 0 (multiplication of a constant</span>
<a name="l00421"></a>00421 <span class="comment">     *  bitvector by a non-negative constant) */</span>
<a name="l00422"></a>00422     <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#ae0c8cdf3fade0ff0824c6112f4bdec0c" title="n*c1 = c, where n &gt;= 0 (multiplication of a constant bitvector by a non-negative constant)">bvmultConst</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e) = 0;
<a name="l00423"></a>00423 <span class="comment"></span>
<a name="l00424"></a>00424 <span class="comment">    ///////////////////////////////////////////////////////////////////</span>
<a name="l00425"></a>00425 <span class="comment">    /////  Type predicate rules</span>
<a name="l00426"></a>00426 <span class="comment">    ///////////////////////////////////////////////////////////////////</span>
<a name="l00427"></a>00427 <span class="comment"></span><span class="comment"></span>
<a name="l00428"></a>00428 <span class="comment">    //! |- t=0 OR t=1  for any 1-bit bitvector t</span>
<a name="l00429"></a>00429 <span class="comment"></span>    <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#a2096bde76317290227a520452a3ab4c4" title="|- t=0 OR t=1 for any 1-bit bitvector t">typePredBit</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e) = 0;<span class="comment"></span>
<a name="l00430"></a>00430 <span class="comment">    //! Expand the type predicate wrapper (compute the actual type predicate)</span>
<a name="l00431"></a>00431 <span class="comment"></span>    <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#acff4dd7561fb19a337f76edfa024c1aa" title="Expand the type predicate wrapper (compute the actual type predicate)">expandTypePred</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a>&amp; tp) = 0;
<a name="l00432"></a>00432 
<a name="l00433"></a>00433     <span class="comment">/*Beginning of Lorenzo PLatania&#39;s methods*/</span>
<a name="l00434"></a>00434 
<a name="l00435"></a>00435     <span class="comment">//    virtual Theorem multiply_coeff( Rational mult_inv, const Expr&amp; e)=0;</span>
<a name="l00436"></a>00436 <span class="comment"></span>
<a name="l00437"></a>00437 <span class="comment">    //! isolate a variable with coefficient = 1 on the Lhs of an</span>
<a name="l00438"></a>00438 <span class="comment"></span>    <span class="comment">//equality expression</span>
<a name="l00439"></a>00439     <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#aef8e88512f778d081ade97e6304f1d18" title="isolate a variable with coefficient = 1 on the Lhs of an">isolate_var</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e)=0;
<a name="l00440"></a>00440 
<a name="l00441"></a>00441     <span class="comment">// BVPLUS(N, a@b, y) = BVPLUS(N-n,a,BVPLUS(N,b,y)[N-1:n])@BVPLUS(n,b,y)</span>
<a name="l00442"></a>00442     <span class="comment">// where n = BVSize(b), a != 0</span>
<a name="l00443"></a>00443     <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#a17c15204dfec661af091bb07f44c4f51">liftConcatBVMult</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e)=0;
<a name="l00444"></a>00444 <span class="comment"></span>
<a name="l00445"></a>00445 <span class="comment">    //! canonize BVMult expressions in order to get one coefficient</span>
<a name="l00446"></a>00446 <span class="comment"></span>    <span class="comment">//multiplying the variable(s) in the expression</span>
<a name="l00447"></a>00447     <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#a74f5018affcab70b831029b390692552" title="canonize BVMult expressions in order to get one coefficient">canonBVMult</a>( <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e )=0;
<a name="l00448"></a>00448 
<a name="l00449"></a>00449     <span class="comment">// BVPLUS(N, a@b, y) = BVPLUS(N-n,a,BVPLUS(N,b,y)[N-1:n])@BVPLUS(n,b,y)</span>
<a name="l00450"></a>00450     <span class="comment">// where n = BVSize(b)</span>
<a name="l00451"></a>00451     <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#affb1cdfd198f4140f1943f9296b1b97c">liftConcatBVPlus</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e)=0;
<a name="l00452"></a>00452 <span class="comment"></span>
<a name="l00453"></a>00453 <span class="comment">    //! canonize BVPlus expressions in order to get just one</span>
<a name="l00454"></a>00454 <span class="comment"></span>    <span class="comment">//coefficient multiplying each variable in the expression</span>
<a name="l00455"></a>00455     <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#a07f756438b45b15b493497341944bbb4" title="canonize BVPlus expressions in order to get just one">canonBVPlus</a>( <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e )=0;
<a name="l00456"></a>00456     <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#acb966a104436262e81299cea86bc21bb">canonBVUMinus</a>( <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e )=0;
<a name="l00457"></a>00457     <span class="comment">// Input: t[hi:lo] = rhs</span>
<a name="l00458"></a>00458     <span class="comment">// if t appears as leaf in rhs, then:</span>
<a name="l00459"></a>00459     <span class="comment">//    t[hi:lo] = rhs |- Exists x,y,z. (t = x @ y @ z AND y = rhs), solvedForm = false</span>
<a name="l00460"></a>00460     <span class="comment">// else</span>
<a name="l00461"></a>00461     <span class="comment">//    t[hi:lo] = rhs |- Exists x,y,z. (t = x @ rhs @ z AND y = rhs), solvedForm = true</span>
<a name="l00462"></a>00462     <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#ac018d05ae792d761195fbcc9731017d0">processExtract</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a>&amp; e, <span class="keywordtype">bool</span>&amp; solvedForm)=0;
<a name="l00463"></a>00463     <span class="comment">// normalizes equation</span>
<a name="l00464"></a>00464     <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#a04f65b94c6a9ca2b84a6063aac0d082f">canonBVEQ</a>( <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e, <span class="keywordtype">int</span> maxEffort = 3 )=0;
<a name="l00465"></a>00465 <span class="comment"></span>
<a name="l00466"></a>00466 <span class="comment">    //! apply the distributive rule on the BVMULT expression e</span>
<a name="l00467"></a>00467 <span class="comment"></span>    <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#a11422aabc07aa0721cf17b2297a97b40" title="apply the distributive rule on the BVMULT expression e">distributive_rule</a>( <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e )=0;
<a name="l00468"></a>00468     <span class="comment">//    virtual Theorem BVMultConstTerm( const Expr&amp; e1, const Expr&amp; e2)=0;</span>
<a name="l00469"></a>00469     <span class="comment">// recursively reorder subterms in a BVMULT term</span>
<a name="l00470"></a>00470     <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#aaeb132de41aad56b3bbb5a0c9fcede80">BVMult_order_subterms</a>( <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e ) = 0;
<a name="l00471"></a>00471     <span class="comment">// rewrites the equation in the form 0 = Expr</span>
<a name="l00472"></a>00472     <span class="comment">// this is needed for TheoryBitvector::solve</span>
<a name="l00473"></a>00473     <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#a02032b49999aa3913265a22cac129045">MarkNonSolvableEq</a>( <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e) = 0;
<a name="l00474"></a>00474     <span class="comment">/*End of Lorenzo PLatania&#39;s methods*/</span>
<a name="l00475"></a>00475 
<a name="l00476"></a>00476     <span class="comment">// rewrite BVZEROEXTEND into CONCAT</span>
<a name="l00477"></a>00477     <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#a0e4bd4a89095a5c275cc898b624b9346">zeroExtendRule</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e) = 0;
<a name="l00478"></a>00478     <span class="comment">// rewrite BVREPEAT into CONCAT</span>
<a name="l00479"></a>00479     <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#aed9f65e2eed1299d80b6ec63274568a4">repeatRule</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e) = 0;
<a name="l00480"></a>00480     <span class="comment">// rewrite BVROTL into CONCAT</span>
<a name="l00481"></a>00481     <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#a9a9c214170ee9595f2eb0b0552b6130f">rotlRule</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e) = 0;
<a name="l00482"></a>00482     <span class="comment">// rewrite BVROTR into CONCAT</span>
<a name="l00483"></a>00483     <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#aca310d258dd22e4e50b19274047c6528">rotrRule</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e) = 0;
<a name="l00484"></a>00484 <span class="comment"></span>
<a name="l00485"></a>00485 <span class="comment">    /**</span>
<a name="l00486"></a>00486 <span class="comment">     * Divide a with b unsigned and return the bit-vector constant result</span>
<a name="l00487"></a>00487 <span class="comment">     */</span>
<a name="l00488"></a>00488     <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#a95920e0fd327bc9630d41784449bae0a">bvUDivConst</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; divExpr) = 0;
<a name="l00489"></a>00489 <span class="comment"></span>
<a name="l00490"></a>00490 <span class="comment">    /**</span>
<a name="l00491"></a>00491 <span class="comment">     * Rewrite a/b with a fresh variable d and add the constraints to make it be a divider.</span>
<a name="l00492"></a>00492 <span class="comment">     */</span>
<a name="l00493"></a>00493     <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#ab1b7fd737bbf85300e149a0ca1dce266">bvUDivTheorem</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; divExpr) = 0;
<a name="l00494"></a>00494 <span class="comment"></span>
<a name="l00495"></a>00495 <span class="comment">    /**</span>
<a name="l00496"></a>00496 <span class="comment">     * Divide a with b unsigned and return the bit-vector constant result</span>
<a name="l00497"></a>00497 <span class="comment">     */</span>
<a name="l00498"></a>00498     <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#a3cf92f9619244e27a40a6b218887cad0">bvURemConst</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; remExpr) = 0;
<a name="l00499"></a>00499 <span class="comment"></span>
<a name="l00500"></a>00500 <span class="comment">    /**</span>
<a name="l00501"></a>00501 <span class="comment">     * Rewrite a%b in terms of a/b, i.e. a - a/b</span>
<a name="l00502"></a>00502 <span class="comment">     */</span>
<a name="l00503"></a>00503     <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#a0e0a89d5b866cb77e50cc24c20f5d053">bvURemRewrite</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; divExpr) = 0;
<a name="l00504"></a>00504 <span class="comment"></span>
<a name="l00505"></a>00505 <span class="comment">    /**</span>
<a name="l00506"></a>00506 <span class="comment">     * Rewrite the signed divide in terms of the unsigned one.</span>
<a name="l00507"></a>00507 <span class="comment">     */</span>
<a name="l00508"></a>00508     <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#a8737b8dee3cf693cba13dd073b132294">bvSDivRewrite</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; sDivExpr) = 0;
<a name="l00509"></a>00509 <span class="comment"></span>
<a name="l00510"></a>00510 <span class="comment">    /**</span>
<a name="l00511"></a>00511 <span class="comment">     * Rewrite the signed remainder in terms of the unsigned one.</span>
<a name="l00512"></a>00512 <span class="comment">     */</span>
<a name="l00513"></a>00513     <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#a41766b9dbe8dd7e8ebf5cf0349cf2e9e">bvSRemRewrite</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; sRemExpr) = 0;
<a name="l00514"></a>00514 <span class="comment"></span>
<a name="l00515"></a>00515 <span class="comment">    /**</span>
<a name="l00516"></a>00516 <span class="comment">     * Rewrite the signed mod in terms of the unsigned one.</span>
<a name="l00517"></a>00517 <span class="comment">     */</span>
<a name="l00518"></a>00518     <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#af8734beba48ae58dd465efd808f73117">bvSModRewrite</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; sModExpr) = 0;
<a name="l00519"></a>00519 <span class="comment"></span>
<a name="l00520"></a>00520 <span class="comment">    /**</span>
<a name="l00521"></a>00521 <span class="comment">     * Bit-blast the multiplication a_times_b given the bits in a_bits and b_bits.</span>
<a name="l00522"></a>00522 <span class="comment">     * The resulting output bits will be in the vector output_bits. The return value</span>
<a name="l00523"></a>00523 <span class="comment">     * is a theorem saying there is no overflow for this multiplication. (TODO, it&#39;s</span>
<a name="l00524"></a>00524 <span class="comment">     * just an empty theorem for now).</span>
<a name="l00525"></a>00525 <span class="comment">     */</span>
<a name="l00526"></a>00526     <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#a05dd94575cc5674452e2ff63106e2a40">bitblastBVMult</a>(<span class="keyword">const</span> std::vector&lt;Theorem&gt;&amp; a_bits,
<a name="l00527"></a>00527                                <span class="keyword">const</span> std::vector&lt;Theorem&gt;&amp; b_bits,
<a name="l00528"></a>00528                                <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; a_times_b,
<a name="l00529"></a>00529                                std::vector&lt;Theorem&gt;&amp; output_bits) = 0;
<a name="l00530"></a>00530 <span class="comment"></span>
<a name="l00531"></a>00531 <span class="comment">    /**</span>
<a name="l00532"></a>00532 <span class="comment">     * Bit-blast the sum a_times_b given the bits in a_bits and b_bits.</span>
<a name="l00533"></a>00533 <span class="comment">     * The resulting output bits will be in the vector output_bits. The return value</span>
<a name="l00534"></a>00534 <span class="comment">     * is a theorem saying there is no overflow for this sum. (TODO, it&#39;s</span>
<a name="l00535"></a>00535 <span class="comment">     * just an empty theorem for now).</span>
<a name="l00536"></a>00536 <span class="comment">     */</span>
<a name="l00537"></a>00537     <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#a613cf0998893c8b66e40acf63b40a825">bitblastBVPlus</a>(<span class="keyword">const</span> std::vector&lt;Theorem&gt;&amp; a_bits,
<a name="l00538"></a>00538                                <span class="keyword">const</span> std::vector&lt;Theorem&gt;&amp; b_bits,
<a name="l00539"></a>00539                                <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; a_plus_b,
<a name="l00540"></a>00540                                std::vector&lt;Theorem&gt;&amp; output_bits) = 0;
<a name="l00541"></a>00541 <span class="comment"></span>
<a name="l00542"></a>00542 <span class="comment">    /**</span>
<a name="l00543"></a>00543 <span class="comment">     * Rewrite \f[x_1 \vee x_2 \vee \ldots \vee x_n = 0\f] into</span>
<a name="l00544"></a>00544 <span class="comment">     * \f[x_1 = 0 \wedge x_2 = 0 \wedge \ldots \wedge x_n = 0\f].</span>
<a name="l00545"></a>00545 <span class="comment">     */</span>
<a name="l00546"></a>00546     <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#a91229b0364c30d73cfdb5eba138ba712">zeroBVOR</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; orEqZero) = 0;
<a name="l00547"></a>00547 <span class="comment"></span>
<a name="l00548"></a>00548 <span class="comment">    /**</span>
<a name="l00549"></a>00549 <span class="comment">     * Rewrite \f[x_1 \wedge x_2 \wedge \ldots \wedge x_n = 1^n\f] into</span>
<a name="l00550"></a>00550 <span class="comment">     * \f[x_1 = 1^n \wedge x_2 = 1^n \wedge \ldots \wedge x_n = 1^n\f].</span>
<a name="l00551"></a>00551 <span class="comment">     */</span>
<a name="l00552"></a>00552     <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#a94e717097d7f4156e647893dd506b91d">oneBVAND</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; andEqOne) = 0;
<a name="l00553"></a>00553 <span class="comment"></span>
<a name="l00554"></a>00554 <span class="comment">    /**</span>
<a name="l00555"></a>00555 <span class="comment">     * Equalities over constants go to true/false.</span>
<a name="l00556"></a>00556 <span class="comment">     */</span>
<a name="l00557"></a>00557     <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#a30e4cf2ef646b5fbc1e0b2b6fb88115a">constEq</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; eq) = 0;
<a name="l00558"></a>00558 <span class="comment"></span>
<a name="l00559"></a>00559 <span class="comment">    /**</span>
<a name="l00560"></a>00560 <span class="comment">     * Returns true if equation is of the form x[i:j] = x[k:l], where the</span>
<a name="l00561"></a>00561 <span class="comment">     * extracted segments overlap, i.e. i &gt; j &gt;= k &gt; l or k &gt; i &gt;= l &gt; j.</span>
<a name="l00562"></a>00562 <span class="comment">     */</span>
<a name="l00563"></a>00563     <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#a3b3ae2372cab5026feec302b6bdaa7d6">solveExtractOverlapApplies</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; eq) = 0;
<a name="l00564"></a>00564 <span class="comment"></span>
<a name="l00565"></a>00565 <span class="comment">    /**</span>
<a name="l00566"></a>00566 <span class="comment">     * Returns the theorem that simplifies the equality of two overlapping</span>
<a name="l00567"></a>00567 <span class="comment">     * extracts over the same term.</span>
<a name="l00568"></a>00568 <span class="comment">     */</span>
<a name="l00569"></a>00569     <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1BitvectorProofRules.html#a4e491d1c488cb38d6e22ec21ac894f46">solveExtractOverlap</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; eq) = 0;
<a name="l00570"></a>00570 
<a name="l00571"></a>00571   }; <span class="comment">// end of class BitvectorProofRules</span>
<a name="l00572"></a>00572 } <span class="comment">// end of name-space CVC3</span>
<a name="l00573"></a>00573 
<a name="l00574"></a>00574 <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&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>