Sophie

Sophie

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

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: theory.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">theory.h</div>  </div>
</div>
<div class="contents">
<a href="theory_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 theory.h</span>
<a name="l00004"></a>00004 <span class="comment"> * \brief Generic API for Theories plus methods commonly used by theories</span>
<a name="l00005"></a>00005 <span class="comment"> * </span>
<a name="l00006"></a>00006 <span class="comment"> * Author: Clark Barrett</span>
<a name="l00007"></a>00007 <span class="comment"> * </span>
<a name="l00008"></a>00008 <span class="comment"> * Created: Sat Nov 30 23:30:15 2002</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__include__theory_h_</span>
<a name="l00023"></a>00023 <span class="preprocessor"></span><span class="preprocessor">#define _cvc3__include__theory_h_</span>
<a name="l00024"></a>00024 <span class="preprocessor"></span>
<a name="l00025"></a>00025 <span class="preprocessor">#include &quot;<a class="code" href="expr__stream_8h.html">expr_stream.h</a>&quot;</span>
<a name="l00026"></a>00026 <span class="preprocessor">#include &quot;<a class="code" href="common__proof__rules_8h.html">common_proof_rules.h</a>&quot;</span>
<a name="l00027"></a>00027 <span class="preprocessor">#include &quot;<a class="code" href="cdlist_8h.html">cdlist.h</a>&quot;</span>
<a name="l00028"></a>00028 
<a name="l00029"></a>00029 <span class="keyword">namespace </span>CVC3 {
<a name="l00030"></a>00030 
<a name="l00031"></a>00031 <span class="keyword">class </span>TheoryCore;
<a name="l00032"></a>00032 <span class="keyword">class </span>Theorem;
<a name="l00033"></a>00033 <span class="keyword">class </span>Type;
<a name="l00034"></a>00034 
<a name="l00035"></a>00035 <span class="comment">/************************************************************************/</span><span class="comment"></span>
<a name="l00036"></a>00036 <span class="comment">/*!</span>
<a name="l00037"></a>00037 <span class="comment"> *\defgroup Theories Theories</span>
<a name="l00038"></a>00038 <span class="comment"> *\ingroup VC</span>
<a name="l00039"></a>00039 <span class="comment"> *\brief Theories</span>
<a name="l00040"></a>00040 <span class="comment"> *@{</span>
<a name="l00041"></a>00041 <span class="comment"> */</span>
<a name="l00042"></a>00042 <span class="comment">/***********************************************************************/</span>
<a name="l00043"></a>00043 
<a name="l00044"></a>00044 <span class="comment">/*****************************************************************************/</span><span class="comment"></span>
<a name="l00045"></a>00045 <span class="comment">/*!</span>
<a name="l00046"></a>00046 <span class="comment"> *\anchor Theory</span>
<a name="l00047"></a>00047 <span class="comment"> *\class Theory</span>
<a name="l00048"></a>00048 <span class="comment"> *\brief Base class for theories</span>
<a name="l00049"></a>00049 <span class="comment"> *</span>
<a name="l00050"></a>00050 <span class="comment"> * Author: Clark Barrett</span>
<a name="l00051"></a>00051 <span class="comment"> *</span>
<a name="l00052"></a>00052 <span class="comment"> * Created: Thu Jan 30 16:37:56 2003</span>
<a name="l00053"></a>00053 <span class="comment"> *</span>
<a name="l00054"></a>00054 <span class="comment"> * This is an abstract class which all theories should inherit from.  In</span>
<a name="l00055"></a>00055 <span class="comment"> * addition to providing an abstract theory interface, it provides access</span>
<a name="l00056"></a>00056 <span class="comment"> * functions to core functionality.  However, in order to avoid duplicating the</span>
<a name="l00057"></a>00057 <span class="comment"> * data structures which implement this functionality, all the functionality is</span>
<a name="l00058"></a>00058 <span class="comment"> * stored in a separate class (which actually derives from this one) called</span>
<a name="l00059"></a>00059 <span class="comment"> * TheoryCore.  These two classes work closely together to provide the core</span>
<a name="l00060"></a>00060 <span class="comment"> * functionality.</span>
<a name="l00061"></a>00061 <span class="comment"> */</span>
<a name="l00062"></a>00062 <span class="comment">/*****************************************************************************/</span>
<a name="l00063"></a>00063 
<a name="l00064"></a><a class="code" href="classCVC3_1_1Theory.html">00064</a> <span class="keyword">class </span><a class="code" href="classCVC3_1_1Theory.html" title="Base class for theories.">Theory</a> {
<a name="l00065"></a><a class="code" href="classCVC3_1_1Theory.html#acaa2f18ede56d1a823f3f28bcdeccde2">00065</a>   <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classCVC3_1_1TheoryCore.html" title="This theory handles the built-in logical connectives plus equality. It also handles the registration ...">TheoryCore</a>;
<a name="l00066"></a>00066 <span class="keyword">private</span>:
<a name="l00067"></a><a class="code" href="classCVC3_1_1Theory.html#ad756f41e88f25eec335c9c1c004ae61f">00067</a>   <a class="code" href="classCVC3_1_1ExprManager.html">ExprManager</a>* <a class="code" href="classCVC3_1_1Theory.html#ad756f41e88f25eec335c9c1c004ae61f">d_em</a>;
<a name="l00068"></a><a class="code" href="classCVC3_1_1Theory.html#a61d131675cc0db6a1743f1fe32b327dc">00068</a>   <a class="code" href="classCVC3_1_1TheoryCore.html" title="This theory handles the built-in logical connectives plus equality. It also handles the registration ...">TheoryCore</a>* <a class="code" href="classCVC3_1_1Theory.html#a61d131675cc0db6a1743f1fe32b327dc" title="Provides the core functionality.">d_theoryCore</a>; <span class="comment">//!&lt; Provides the core functionality</span>
<a name="l00069"></a><a class="code" href="classCVC3_1_1Theory.html#a59d055f2cf01f484ce36d56ddb82c8f8">00069</a> <span class="comment"></span>  <a class="code" href="classCVC3_1_1CommonProofRules.html">CommonProofRules</a>* <a class="code" href="classCVC3_1_1Theory.html#a59d055f2cf01f484ce36d56ddb82c8f8" title="Commonly used proof rules.">d_commonRules</a>; <span class="comment">//!&lt; Commonly used proof rules</span>
<a name="l00070"></a><a class="code" href="classCVC3_1_1Theory.html#a1e1919bd500a53974258165b80119836">00070</a> <span class="comment"></span>  std::string <a class="code" href="classCVC3_1_1Theory.html#a1e1919bd500a53974258165b80119836" title="Name of the theory (for debugging)">d_name</a>; <span class="comment">//!&lt; Name of the theory (for debugging)</span>
<a name="l00071"></a>00071 <span class="comment"></span><span class="comment"></span>
<a name="l00072"></a>00072 <span class="comment">  //! Private default constructor.</span>
<a name="l00073"></a>00073 <span class="comment"></span><span class="comment">  /*! Everyone besides TheoryCore has to use the public constructor</span>
<a name="l00074"></a>00074 <span class="comment">    which sets up all the provided functionality automatically.</span>
<a name="l00075"></a>00075 <span class="comment">  */</span>
<a name="l00076"></a>00076   <a class="code" href="classCVC3_1_1Theory.html#a088f7f57d4e8db8e46af066e245c5ca9" title="Private default constructor.">Theory</a>(<span class="keywordtype">void</span>);
<a name="l00077"></a>00077 
<a name="l00078"></a>00078 <span class="keyword">protected</span>:
<a name="l00079"></a><a class="code" href="classCVC3_1_1Theory.html#a262fdc338527489b376ec181ecc38ddc">00079</a>   <span class="keywordtype">bool</span> <a class="code" href="classCVC3_1_1Theory.html#a262fdc338527489b376ec181ecc38ddc">d_theoryUsed</a>; <span class="comment">//! Whether theory has been used (for smtlib translator)</span>
<a name="l00080"></a>00080 <span class="comment"></span>
<a name="l00081"></a>00081 <span class="keyword">public</span>:<span class="comment"></span>
<a name="l00082"></a>00082 <span class="comment">  //! Exposed constructor.</span>
<a name="l00083"></a>00083 <span class="comment"></span><span class="comment">  /*! Note that each instance of Theory must have a name (mostly for</span>
<a name="l00084"></a>00084 <span class="comment">    debugging purposes). */</span>
<a name="l00085"></a>00085   <a class="code" href="classCVC3_1_1Theory.html#a088f7f57d4e8db8e46af066e245c5ca9" title="Private default constructor.">Theory</a>(<a class="code" href="classCVC3_1_1TheoryCore.html" title="This theory handles the built-in logical connectives plus equality. It also handles the registration ...">TheoryCore</a>* <a class="code" href="classCVC3_1_1Theory.html#a90684d2a97738341c00f8f9c99af7b66" title="Get a pointer to theoryCore.">theoryCore</a>, <span class="keyword">const</span> std::string&amp; name);<span class="comment"></span>
<a name="l00086"></a>00086 <span class="comment">  //! Destructor</span>
<a name="l00087"></a>00087 <span class="comment"></span>  <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theory.html#ac4527f940d280bca9ae279520fd1bc17" title="Destructor.">~Theory</a>(<span class="keywordtype">void</span>);
<a name="l00088"></a>00088 <span class="comment"></span>
<a name="l00089"></a>00089 <span class="comment">  //! Access to ExprManager</span>
<a name="l00090"></a><a class="code" href="classCVC3_1_1Theory.html#abc2e30308c9e1f3cf752cfe8d939df1e">00090</a> <span class="comment"></span>  <a class="code" href="classCVC3_1_1ExprManager.html">ExprManager</a>* <a class="code" href="classCVC3_1_1Theory.html#abc2e30308c9e1f3cf752cfe8d939df1e" title="Access to ExprManager.">getEM</a>() { <span class="keywordflow">return</span> <a class="code" href="classCVC3_1_1Theory.html#ad756f41e88f25eec335c9c1c004ae61f">d_em</a>; }
<a name="l00091"></a>00091 <span class="comment"></span>
<a name="l00092"></a>00092 <span class="comment">  //! Get a pointer to theoryCore</span>
<a name="l00093"></a><a class="code" href="classCVC3_1_1Theory.html#a90684d2a97738341c00f8f9c99af7b66">00093</a> <span class="comment"></span>  <a class="code" href="classCVC3_1_1TheoryCore.html" title="This theory handles the built-in logical connectives plus equality. It also handles the registration ...">TheoryCore</a>* <a class="code" href="classCVC3_1_1Theory.html#a90684d2a97738341c00f8f9c99af7b66" title="Get a pointer to theoryCore.">theoryCore</a>() { <span class="keywordflow">return</span> <a class="code" href="classCVC3_1_1Theory.html#a61d131675cc0db6a1743f1fe32b327dc" title="Provides the core functionality.">d_theoryCore</a>; }
<a name="l00094"></a>00094 <span class="comment"></span>
<a name="l00095"></a>00095 <span class="comment">  //! Get a pointer to common proof rules</span>
<a name="l00096"></a><a class="code" href="classCVC3_1_1Theory.html#a50802b148e8192178cf790e6c45ddff3">00096</a> <span class="comment"></span>  <a class="code" href="classCVC3_1_1CommonProofRules.html">CommonProofRules</a>* <a class="code" href="classCVC3_1_1Theory.html#a50802b148e8192178cf790e6c45ddff3" title="Get a pointer to common proof rules.">getCommonRules</a>() { <span class="keywordflow">return</span> <a class="code" href="classCVC3_1_1Theory.html#a59d055f2cf01f484ce36d56ddb82c8f8" title="Commonly used proof rules.">d_commonRules</a>; }
<a name="l00097"></a>00097 <span class="comment"></span>
<a name="l00098"></a>00098 <span class="comment">  //! Get the name of the theory (for debugging purposes)</span>
<a name="l00099"></a><a class="code" href="classCVC3_1_1Theory.html#a4270eb556496ee10472b478b5792751c">00099</a> <span class="comment"></span>  <span class="keyword">const</span> std::string&amp; <a class="code" href="classCVC3_1_1Theory.html#a4270eb556496ee10472b478b5792751c" title="Get the name of the theory (for debugging purposes)">getName</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classCVC3_1_1Theory.html#a1e1919bd500a53974258165b80119836" title="Name of the theory (for debugging)">d_name</a>; }
<a name="l00100"></a>00100 <span class="comment"></span>
<a name="l00101"></a>00101 <span class="comment">  //! Set the &quot;used&quot; flag on this theory (for smtlib translator)</span>
<a name="l00102"></a><a class="code" href="classCVC3_1_1Theory.html#adaea4aa951adbe1561f7b445517378b6">00102</a> <span class="comment"></span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classCVC3_1_1Theory.html#adaea4aa951adbe1561f7b445517378b6" title="Set the &quot;used&quot; flag on this theory (for smtlib translator)">setUsed</a>() { <a class="code" href="classCVC3_1_1Theory.html#a262fdc338527489b376ec181ecc38ddc">d_theoryUsed</a> = <span class="keyword">true</span>; }<span class="comment"></span>
<a name="l00103"></a>00103 <span class="comment">  //! Get whether theory has been used (for smtlib translator)</span>
<a name="l00104"></a><a class="code" href="classCVC3_1_1Theory.html#a5dad9fa356483782703a1ef1024d2a74">00104</a> <span class="comment"></span>  <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classCVC3_1_1Theory.html#a5dad9fa356483782703a1ef1024d2a74" title="Get whether theory has been used (for smtlib translator)">theoryUsed</a>() { <span class="keywordflow">return</span> <a class="code" href="classCVC3_1_1Theory.html#a262fdc338527489b376ec181ecc38ddc">d_theoryUsed</a>; }
<a name="l00105"></a>00105 
<a name="l00106"></a>00106   <span class="comment">/***************************************************************************/</span><span class="comment"></span>
<a name="l00107"></a>00107 <span class="comment">  /*!</span>
<a name="l00108"></a>00108 <span class="comment">   *\defgroup Theory_API Abstract Theory Interface</span>
<a name="l00109"></a>00109 <span class="comment">   *\anchor theory_api</span>
<a name="l00110"></a>00110 <span class="comment">   *\ingroup Theories</span>
<a name="l00111"></a>00111 <span class="comment">   *\brief Abstract Theory Interface</span>
<a name="l00112"></a>00112 <span class="comment">   *</span>
<a name="l00113"></a>00113 <span class="comment">   * These are the theory-specific methods which provide the decision procedure</span>
<a name="l00114"></a>00114 <span class="comment">   * functionality for a new theory.  At the very least, a theory must</span>
<a name="l00115"></a>00115 <span class="comment">   * implement the checkSat method.  The other methods can be used to make the</span>
<a name="l00116"></a>00116 <span class="comment">   * implementation more convenient.  For more information on this API, see</span>
<a name="l00117"></a>00117 <span class="comment">   * Clark Barrett&#39;s PhD dissertation and \ref theory_api_howto.</span>
<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>
<a name="l00121"></a>00121 <span class="comment"></span>
<a name="l00122"></a>00122 <span class="comment">  //! Notify theory of a new shared term</span>
<a name="l00123"></a>00123 <span class="comment"></span><span class="comment">  /*! When a term e associated with theory i occurs as a child of an expression</span>
<a name="l00124"></a>00124 <span class="comment">    associated with theory j, the framework calls i-&gt;addSharedTerm(e) and</span>
<a name="l00125"></a>00125 <span class="comment">    j-&gt;addSharedTerm(e)</span>
<a name="l00126"></a>00126 <span class="comment">  */</span>
<a name="l00127"></a><a class="code" href="group__Theory__API.html#ga664e787b0eb7e5e6fdb03efeb409d38a">00127</a>   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="group__Theory__API.html#ga664e787b0eb7e5e6fdb03efeb409d38a" title="Notify theory of a new shared term.">addSharedTerm</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="l00128"></a>00128 <span class="comment"></span>
<a name="l00129"></a>00129 <span class="comment">  //! Assert a new fact to the decision procedure</span>
<a name="l00130"></a>00130 <span class="comment"></span><span class="comment">  /*! Each fact that makes it into the core framework is assigned to exactly</span>
<a name="l00131"></a>00131 <span class="comment">    one theory: the theory associated with that fact.  assertFact is called to</span>
<a name="l00132"></a>00132 <span class="comment">    inform the theory that a new fact has been assigned to the theory.</span>
<a name="l00133"></a>00133 <span class="comment">  */</span>
<a name="l00134"></a>00134   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="group__Theory__API.html#ga58de37714dd855f4d50de15108b8dbc7" title="Assert a new fact to the decision procedure.">assertFact</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a>&amp; e) = 0;
<a name="l00135"></a>00135 <span class="comment"></span>
<a name="l00136"></a>00136 <span class="comment">  //! Check for satisfiability in the theory</span>
<a name="l00137"></a>00137 <span class="comment"></span><span class="comment">  /*! \param fullEffort when it is false, checkSat can do as much or</span>
<a name="l00138"></a>00138 <span class="comment">   as little work as it likes, though simple inferences and checks for</span>
<a name="l00139"></a>00139 <span class="comment">   consistency should be done to increase efficiency.  If fullEffort is true,</span>
<a name="l00140"></a>00140 <span class="comment">   checkSat must check whether the set of facts given by assertFact together</span>
<a name="l00141"></a>00141 <span class="comment">   with the arrangement of shared terms (provided by addSharedTerm) induced by</span>
<a name="l00142"></a>00142 <span class="comment">   the global find database equivalence relation are satisfiable.  If</span>
<a name="l00143"></a>00143 <span class="comment">   satisfiable, checkSat does nothing.</span>
<a name="l00144"></a>00144 <span class="comment"></span>
<a name="l00145"></a>00145 <span class="comment">   If satisfiability can be acheived by merging some of the shared terms, a new</span>
<a name="l00146"></a>00146 <span class="comment">   fact must be enqueued using enqueueFact (this fact need not be a literal).</span>
<a name="l00147"></a>00147 <span class="comment">   If there is no way to make things satisfiable, setInconsistent must be called.</span>
<a name="l00148"></a>00148 <span class="comment">  */</span>
<a name="l00149"></a>00149   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="group__Theory__API.html#gae0bb3d506dad8d69da546777cae27228" title="Check for satisfiability in the theory.">checkSat</a>(<span class="keywordtype">bool</span> fullEffort) = 0;
<a name="l00150"></a>00150 <span class="comment"></span>
<a name="l00151"></a>00151 <span class="comment">  //! Theory-specific rewrite rules.  </span>
<a name="l00152"></a>00152 <span class="comment"></span><span class="comment">  /*! By default, rewrite just returns a reflexive theorem stating that the</span>
<a name="l00153"></a>00153 <span class="comment">    input expression is equivalent to itself.  However, rewrite is allowed to</span>
<a name="l00154"></a>00154 <span class="comment">    return any theorem which describes how the input expression is equivalent</span>
<a name="l00155"></a>00155 <span class="comment">    to some new expression.  rewrite should be used to perform simplifications,</span>
<a name="l00156"></a>00156 <span class="comment">    normalization, and any other preprocessing on theory-specific expressions</span>
<a name="l00157"></a>00157 <span class="comment">    that needs to be done.</span>
<a name="l00158"></a>00158 <span class="comment">  */</span>
<a name="l00159"></a><a class="code" href="group__Theory__API.html#gaa6475baeb444915fa3b2f5c58dc5148a">00159</a>   <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="group__Theory__API.html#gaa6475baeb444915fa3b2f5c58dc5148a" title="Theory-specific rewrite rules.">rewrite</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="keywordflow">return</span> <a class="code" href="classCVC3_1_1Theory.html#af860f5d5e01423628c97c399606916ff" title="==&gt; a == a">reflexivityRule</a>(e); }
<a name="l00160"></a>00160 <span class="comment"></span>
<a name="l00161"></a>00161 <span class="comment">  //! Theory-specific preprocessing</span>
<a name="l00162"></a>00162 <span class="comment"></span><span class="comment">  /*! This gets called each time a new assumption or query is preprocessed.</span>
<a name="l00163"></a>00163 <span class="comment">    By default it does nothing. */</span>
<a name="l00164"></a><a class="code" href="group__Theory__API.html#gab66d477fcc5c27075a25dbfec4988537">00164</a>   <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="group__Theory__API.html#gab66d477fcc5c27075a25dbfec4988537" title="Theory-specific preprocessing.">theoryPreprocess</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="keywordflow">return</span> <a class="code" href="classCVC3_1_1Theory.html#af860f5d5e01423628c97c399606916ff" title="==&gt; a == a">reflexivityRule</a>(e); }
<a name="l00165"></a>00165 <span class="comment"></span>
<a name="l00166"></a>00166 <span class="comment">  //! Set up the term e for call-backs when e or its children change.</span>
<a name="l00167"></a>00167 <span class="comment"></span><span class="comment">  /*! setup is called once for each expression associated with the theory.  It</span>
<a name="l00168"></a>00168 <span class="comment">    is typically used to setup theory-specific data for an expression and to</span>
<a name="l00169"></a>00169 <span class="comment">    add call-back information for use with update.</span>
<a name="l00170"></a>00170 <span class="comment">    \sa update</span>
<a name="l00171"></a>00171 <span class="comment">  */</span>
<a name="l00172"></a><a class="code" href="group__Theory__API.html#ga6896845c1e25b3452238059d779fc4c8">00172</a>   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="group__Theory__API.html#ga6896845c1e25b3452238059d779fc4c8" title="Set up the term e for call-backs when e or its children change.">setup</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="l00173"></a>00173 <span class="comment"></span>
<a name="l00174"></a>00174 <span class="comment">  //! Notify a theory of a new equality</span>
<a name="l00175"></a>00175 <span class="comment"></span><span class="comment">  /*! update is a call-back used by the notify mechanism of the core theory.</span>
<a name="l00176"></a>00176 <span class="comment">    It works as follows.  When an equation t1 = t2 makes it into the core</span>
<a name="l00177"></a>00177 <span class="comment">    framework, the two find equivalence classes for t1 and t2 are merged.  The</span>
<a name="l00178"></a>00178 <span class="comment">    result is that t2 is the new equivalence class representative and t1 is no</span>
<a name="l00179"></a>00179 <span class="comment">    longer an equivalence class representative.  When this happens, the notify</span>
<a name="l00180"></a>00180 <span class="comment">    list of t1 is traversed.  Notify list entries consist of a theory and an</span>
<a name="l00181"></a>00181 <span class="comment">    expression d.  For each entry (i,d), i-&gt;update(e, d) is called, where e is</span>
<a name="l00182"></a>00182 <span class="comment">    the theorem corresponding to the equality t1=t2.</span>
<a name="l00183"></a>00183 <span class="comment"></span>
<a name="l00184"></a>00184 <span class="comment">    To add the entry (i,d) to a term t1&#39;s notify list, a call must be made to</span>
<a name="l00185"></a>00185 <span class="comment">    t1.addNotify(i,d).  This is typically done in setup.</span>
<a name="l00186"></a>00186 <span class="comment"></span>
<a name="l00187"></a>00187 <span class="comment">    \sa setup</span>
<a name="l00188"></a>00188 <span class="comment">  */</span>
<a name="l00189"></a><a class="code" href="group__Theory__API.html#gac41af6a90290fe83b2ee6c53cbfc4a62">00189</a>   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="group__Theory__API.html#gac41af6a90290fe83b2ee6c53cbfc4a62" title="Notify a theory of a new equality.">update</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; d) {}
<a name="l00190"></a>00190 <span class="comment"></span>
<a name="l00191"></a>00191 <span class="comment">  //! An optional solver.</span>
<a name="l00192"></a>00192 <span class="comment"></span><span class="comment">  /*! The solve method can be used to implement a Shostak-style solver.  Since</span>
<a name="l00193"></a>00193 <span class="comment">    solvers do not in general combine, the following technique is used.  One</span>
<a name="l00194"></a>00194 <span class="comment">    theory is designated as the primary solver (in our case, it is the theory</span>
<a name="l00195"></a>00195 <span class="comment">    of arithmetic).  For each equation that enters the core framework, the</span>
<a name="l00196"></a>00196 <span class="comment">    primary solver is called to ensure that the equation is in solved form with</span>
<a name="l00197"></a>00197 <span class="comment">    respect to the primary theory.</span>
<a name="l00198"></a>00198 <span class="comment"></span>
<a name="l00199"></a>00199 <span class="comment">    After the primary solver, the solver for the theory associated with the</span>
<a name="l00200"></a>00200 <span class="comment">    equation is called.  This solver can do whatever it likes, as long as the</span>
<a name="l00201"></a>00201 <span class="comment">    result is still in solved form with respect to the primary solver.  This is</span>
<a name="l00202"></a>00202 <span class="comment">    a slight generalization of what is described in my (Clark)&#39;s PhD thesis.</span>
<a name="l00203"></a>00203 <span class="comment">  */</span>
<a name="l00204"></a><a class="code" href="group__Theory__API.html#ga3908ecb66d7ba9830e7cf5d1a8ab91c3">00204</a>   <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="group__Theory__API.html#ga3908ecb66d7ba9830e7cf5d1a8ab91c3" title="An optional solver.">solve</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a>&amp; e) { <span class="keywordflow">return</span> e; }<span class="comment"></span>
<a name="l00205"></a>00205 <span class="comment">  //! A debug check used by the primary solver</span>
<a name="l00206"></a><a class="code" href="group__Theory__API.html#gacdab59f42f5124655275d2e08e7aa0e3">00206</a> <span class="comment"></span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="group__Theory__API.html#gacdab59f42f5124655275d2e08e7aa0e3" title="A debug check used by the primary solver.">checkAssertEqInvariant</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a>&amp; e) { }
<a name="l00207"></a>00207 <span class="comment"></span>
<a name="l00208"></a>00208 <span class="comment">  /////////////////////////////////</span>
<a name="l00209"></a>00209 <span class="comment"></span>  <span class="comment">// Extensions to original API: //</span><span class="comment"></span>
<a name="l00210"></a>00210 <span class="comment">  /////////////////////////////////</span>
<a name="l00211"></a>00211 <span class="comment"></span><span class="comment"></span>
<a name="l00212"></a>00212 <span class="comment">  //! Recursive simplification step</span>
<a name="l00213"></a>00213 <span class="comment"></span><span class="comment">  /*!</span>
<a name="l00214"></a>00214 <span class="comment">   * INVARIANT: the result is a Theorem(e=e&#39;), where e&#39; is a fully</span>
<a name="l00215"></a>00215 <span class="comment">   * simplified version of e.  To simplify subexpressions recursively,</span>
<a name="l00216"></a>00216 <span class="comment">   * call simplify() function.</span>
<a name="l00217"></a>00217 <span class="comment">   *</span>
<a name="l00218"></a>00218 <span class="comment">   * This theory-specific method is called when the simplifier</span>
<a name="l00219"></a>00219 <span class="comment">   * descends top-down into the expression.  Normally, every kid is</span>
<a name="l00220"></a>00220 <span class="comment">   * simplified recursively, and the results are combined into the new</span>
<a name="l00221"></a>00221 <span class="comment">   * parent with the same operator (Op).  This functionality is</span>
<a name="l00222"></a>00222 <span class="comment">   * provided with the default implementation.</span>
<a name="l00223"></a>00223 <span class="comment">   *</span>
<a name="l00224"></a>00224 <span class="comment">   * However, in some expressions some kids may not matter in the</span>
<a name="l00225"></a>00225 <span class="comment">   * result, and can be skipped.  For instance, if the first kid in a</span>
<a name="l00226"></a>00226 <span class="comment">   * long AND simplifies to FALSE, then the entire expression</span>
<a name="l00227"></a>00227 <span class="comment">   * simplifies to FALSE, and the remaining kids do not need to be</span>
<a name="l00228"></a>00228 <span class="comment">   * simplified.</span>
<a name="l00229"></a>00229 <span class="comment">   *</span>
<a name="l00230"></a>00230 <span class="comment">   * This call is a chance for a DP to provide these types of</span>
<a name="l00231"></a>00231 <span class="comment">   * optimizations during the top-down phase of simplification.</span>
<a name="l00232"></a>00232 <span class="comment">   */</span>
<a name="l00233"></a>00233   <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="group__Theory__API.html#ga55b82868b8e9e60906756e797da9355a" title="Recursive simplification step.">simplifyOp</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="l00234"></a>00234 <span class="comment"></span>
<a name="l00235"></a>00235 <span class="comment">  //! Check that e is a valid Type expr</span>
<a name="l00236"></a><a class="code" href="group__Theory__API.html#gac22e5fff02a4681c3972e3637bd15748">00236</a> <span class="comment"></span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="group__Theory__API.html#gac22e5fff02a4681c3972e3637bd15748" title="Check that e is a valid Type expr.">checkType</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="l00237"></a>00237     { <span class="keywordflow">throw</span> <a class="code" href="classCVC3_1_1Exception.html">Exception</a>(<span class="stringliteral">&quot;Cannot construct type from expr: &quot;</span>+e.<a class="code" href="group__ExprPkg.html#gaf3028bb1619f8cc69b66ec712e1adb54" title="Print the expression to a string.">toString</a>()); }
<a name="l00238"></a>00238 <span class="comment"></span>
<a name="l00239"></a>00239 <span class="comment">  //! Compute information related to finiteness of types</span>
<a name="l00240"></a>00240 <span class="comment"></span><span class="comment">  /*! Used by the TypeComputer defined in TheoryCore (theories should not call this</span>
<a name="l00241"></a>00241 <span class="comment">   *  funtion directly -- they should use the methods in Type instead).  Each theory</span>
<a name="l00242"></a>00242 <span class="comment">   *  should implement this if it contains any types that could be non-infinite.</span>
<a name="l00243"></a>00243 <span class="comment">   *</span>
<a name="l00244"></a>00244 <span class="comment">   * 1. Returns Cardinality of the type (finite, infinite, or unknown)</span>
<a name="l00245"></a>00245 <span class="comment">   * 2. If cardinality = finite and enumerate is true,</span>
<a name="l00246"></a>00246 <span class="comment">   *    sets e to the nth element of the type if it can</span>
<a name="l00247"></a>00247 <span class="comment">   *    sets e to NULL if n is out of bounds or if unable to compute nth element</span>
<a name="l00248"></a>00248 <span class="comment">   * 3. If cardinality = finite and computeSize is true,</span>
<a name="l00249"></a>00249 <span class="comment">   *    sets n to the size of the type if it can</span>
<a name="l00250"></a>00250 <span class="comment">   *    sets n to 0 otherwise</span>
<a name="l00251"></a>00251 <span class="comment">   */</span>
<a name="l00252"></a><a class="code" href="group__Theory__API.html#ga166b2a0c7ec3b09e079c2f84bb6087bc">00252</a>   <span class="keyword">virtual</span> <a class="code" href="namespaceCVC3.html#af969e724f8b7016909f5804e8cea3e54" title="Enum for cardinality of types.">Cardinality</a> <a class="code" href="group__Theory__API.html#ga166b2a0c7ec3b09e079c2f84bb6087bc" title="Compute information related to finiteness of types.">finiteTypeInfo</a>(<a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e, <a class="code" href="classCVC3_1_1Unsigned.html">Unsigned</a>&amp; n,
<a name="l00253"></a>00253                                      <span class="keywordtype">bool</span> enumerate, <span class="keywordtype">bool</span> computeSize)
<a name="l00254"></a>00254   { <span class="keywordflow">return</span> <a class="code" href="namespaceCVC3.html#af969e724f8b7016909f5804e8cea3e54ad4a45eb68b0ebb32f0c805f6d2abf6d6">CARD_INFINITE</a>; }
<a name="l00255"></a>00255 <span class="comment"></span>
<a name="l00256"></a>00256 <span class="comment">  //! Compute and store the type of e</span>
<a name="l00257"></a>00257 <span class="comment"></span><span class="comment">  /*!</span>
<a name="l00258"></a>00258 <span class="comment">   * \param e is the expression whose type is computed.  </span>
<a name="l00259"></a>00259 <span class="comment">   *</span>
<a name="l00260"></a>00260 <span class="comment">   * This function computes the type of the top-level operator of e,</span>
<a name="l00261"></a>00261 <span class="comment">   * and recurses into children using getType(), if necessary.</span>
<a name="l00262"></a>00262 <span class="comment">   */</span>
<a name="l00263"></a><a class="code" href="group__Theory__API.html#gabaed6b47e6fdea3ae1e53ff75f1882db">00263</a>   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="group__Theory__API.html#gabaed6b47e6fdea3ae1e53ff75f1882db" title="Compute and store the type of e.">computeType</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="comment"></span>
<a name="l00264"></a>00264 <span class="comment">  //! Compute the base type of the top-level operator of an arbitrary type</span>
<a name="l00265"></a><a class="code" href="group__Theory__API.html#gaa29925192ee19a6d1f0644174cfd07af">00265</a> <span class="comment"></span>  <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a> <a class="code" href="group__Theory__API.html#gaa29925192ee19a6d1f0644174cfd07af" title="Compute the base type of the top-level operator of an arbitrary type.">computeBaseType</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a>&amp; tp) { <span class="keywordflow">return</span> tp; }<span class="comment"></span>
<a name="l00266"></a>00266 <span class="comment">  /*! @brief  Theory specific computation of the subtyping predicate for </span>
<a name="l00267"></a>00267 <span class="comment">   *  type t applied to the expression e.</span>
<a name="l00268"></a>00268 <span class="comment">   */</span> <span class="comment"></span>
<a name="l00269"></a>00269 <span class="comment">  /*! By default returns true. Each theory needs to compute subtype predicates</span>
<a name="l00270"></a>00270 <span class="comment">   *  for the types associated with it. So, for example, the theory of records</span>
<a name="l00271"></a>00271 <span class="comment">   *  will take a record type [# f1: T1, f2: T2 #] and an expression e</span>
<a name="l00272"></a>00272 <span class="comment">   *  and will return the subtyping predicate for e, namely:</span>
<a name="l00273"></a>00273 <span class="comment">   *  computeTypePred(T1, e.f1) AND computeTypePred(T2, e.f2)</span>
<a name="l00274"></a>00274 <span class="comment">   */</span> 
<a name="l00275"></a><a class="code" href="group__Theory__API.html#ga19d53b411ccc48276f6666183b3c5887">00275</a>   <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> <a class="code" href="group__Theory__API.html#ga19d53b411ccc48276f6666183b3c5887" title="Theory specific computation of the subtyping predicate for type t applied to the expression e...">computeTypePred</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a>&amp; t, <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="l00276"></a>00276     { <span class="keywordflow">return</span> e.<a class="code" href="group__ExprPkg.html#gab57ce3dfa78947a906241d090c7cf34d">getEM</a>()-&gt;<a class="code" href="group__EM__Priv.html#ga4471fca49c2acbb7b4cf71e72bc55d6a" title="TRUE Expr.">trueExpr</a>(); }<span class="comment"></span>
<a name="l00277"></a>00277 <span class="comment">  //! Compute and cache the TCC of e.</span>
<a name="l00278"></a>00278 <span class="comment"></span><span class="comment">  /*! </span>
<a name="l00279"></a>00279 <span class="comment">   * \param e is an expression (term or formula).  This function</span>
<a name="l00280"></a>00280 <span class="comment">   * computes the TCC of e which is true iff the expression is defined.</span>
<a name="l00281"></a>00281 <span class="comment">   *</span>
<a name="l00282"></a>00282 <span class="comment">   * This function computes the TCC or predicate of the top-level</span>
<a name="l00283"></a>00283 <span class="comment">   * operator of e, and recurses into children using getTCC(), if</span>
<a name="l00284"></a>00284 <span class="comment">   * necessary.</span>
<a name="l00285"></a>00285 <span class="comment">   *</span>
<a name="l00286"></a>00286 <span class="comment">   * The default implementation is to compute TCCs recursively for all</span>
<a name="l00287"></a>00287 <span class="comment">   * children, and return their conjunction.</span>
<a name="l00288"></a>00288 <span class="comment">   */</span>
<a name="l00289"></a>00289   <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> <a class="code" href="group__Theory__API.html#ga9278ad3a6eb8351865a71acd7bb7f968" title="Compute and cache the TCC of e.">computeTCC</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="l00290"></a>00290 <span class="comment"></span>
<a name="l00291"></a>00291 <span class="comment">  //! Theory-specific parsing implemented by the DP</span>
<a name="l00292"></a><a class="code" href="group__Theory__API.html#ga378bef078620e67fc80f36fa79320d91">00292</a> <span class="comment"></span>  <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> <a class="code" href="group__Theory__API.html#ga378bef078620e67fc80f36fa79320d91" title="Theory-specific parsing implemented by the DP.">parseExprOp</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="keywordflow">return</span> e; }
<a name="l00293"></a>00293 <span class="comment"></span>
<a name="l00294"></a>00294 <span class="comment">  //! Theory-specific pretty-printing.</span>
<a name="l00295"></a>00295 <span class="comment"></span><span class="comment">  /*! By default, print the top node in AST, and resume</span>
<a name="l00296"></a>00296 <span class="comment">    pretty-printing the children.  The same call e.print(os) can be</span>
<a name="l00297"></a>00297 <span class="comment">    used in DP-specific printers to use AST printing for the given</span>
<a name="l00298"></a>00298 <span class="comment">    node.  In fact, it is strongly recommended to add e.print(os) as</span>
<a name="l00299"></a>00299 <span class="comment">    the default for all the cases/kinds that are not handled by the</span>
<a name="l00300"></a>00300 <span class="comment">    particular pretty-printer.</span>
<a name="l00301"></a>00301 <span class="comment">  */</span>
<a name="l00302"></a><a class="code" href="group__Theory__API.html#ga49009744d64bbc47785f3fc5fa6884ca">00302</a>   <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1ExprStream.html" title="Pretty-printing output stream for Expr. READ THE DOCS BEFORE USING!">ExprStream</a>&amp; <a class="code" href="group__Theory__API.html#ga49009744d64bbc47785f3fc5fa6884ca" title="Theory-specific pretty-printing.">print</a>(<a class="code" href="classCVC3_1_1ExprStream.html" title="Pretty-printing output stream for Expr. READ THE DOCS BEFORE USING!">ExprStream</a>&amp; os, <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="l00303"></a>00303     <span class="keywordflow">return</span> e.<a class="code" href="group__ExprPkg.html#ga092308b0a88e12a5c7ff2fc0a2eca818" title="Print the top node and then recurse through the children */.">printAST</a>(os);
<a name="l00304"></a>00304   }
<a name="l00305"></a>00305 <span class="comment"></span>
<a name="l00306"></a>00306 <span class="comment">  //! Add variables from &#39;e&#39; to &#39;v&#39; for constructing a concrete model</span>
<a name="l00307"></a>00307 <span class="comment"></span><span class="comment">  /*! If e is already of primitive type, do NOT add it to v. */</span>
<a name="l00308"></a>00308   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="group__Theory__API.html#ga37309ea20a161f2529cbb0ab79f9ed3f" title="Add variables from &#39;e&#39; to &#39;v&#39; for constructing a concrete model.">computeModelTerm</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, std::vector&lt;Expr&gt;&amp; v);<span class="comment"></span>
<a name="l00309"></a>00309 <span class="comment">  //! Process disequalities from the arrangement for model generation</span>
<a name="l00310"></a><a class="code" href="group__Theory__API.html#gab23238889b7f68caa0715e6ab5d31775">00310</a> <span class="comment"></span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="group__Theory__API.html#gab23238889b7f68caa0715e6ab5d31775" title="Process disequalities from the arrangement for model generation.">refineCounterExample</a>() {}<span class="comment"></span>
<a name="l00311"></a>00311 <span class="comment">  //! Assign concrete values to basic-type variables in v</span>
<a name="l00312"></a><a class="code" href="group__Theory__API.html#ga6a6bc2982a8c71475cd9f1b6a4aa388e">00312</a> <span class="comment"></span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="group__Theory__API.html#ga6a6bc2982a8c71475cd9f1b6a4aa388e" title="Assign concrete values to basic-type variables in v.">computeModelBasic</a>(<span class="keyword">const</span> std::vector&lt;Expr&gt;&amp; v) {}<span class="comment"></span>
<a name="l00313"></a>00313 <span class="comment">  //! Compute the value of a compound variable from the more primitive ones</span>
<a name="l00314"></a>00314 <span class="comment"></span><span class="comment">  /*! The more primitive variables for e are already assigned concrete</span>
<a name="l00315"></a>00315 <span class="comment">   * values, and are available through getModelValue().</span>
<a name="l00316"></a>00316 <span class="comment">   *</span>
<a name="l00317"></a>00317 <span class="comment">   * The new value for e must be assigned using assignValue() method.</span>
<a name="l00318"></a>00318 <span class="comment">   *</span>
<a name="l00319"></a>00319 <span class="comment">   * \param e is the compound type expression to assign a value;</span>
<a name="l00320"></a>00320 <span class="comment">   *</span>
<a name="l00321"></a>00321 <span class="comment">   * \param vars are the variables actually assigned.  Normally, &#39;e&#39;</span>
<a name="l00322"></a>00322 <span class="comment">   * is the only element of vars.  However, e.g. in the case of</span>
<a name="l00323"></a>00323 <span class="comment">   * uninterpreted functions, assigning &#39;f&#39; means assigning all</span>
<a name="l00324"></a>00324 <span class="comment">   * relevant applications of &#39;f&#39; to constant values (f(0), f(5),</span>
<a name="l00325"></a>00325 <span class="comment">   * etc.).  Such applications might not be known before the model is</span>
<a name="l00326"></a>00326 <span class="comment">   * constructed (they may be of the form f(x), f(y+z), etc., where</span>
<a name="l00327"></a>00327 <span class="comment">   * x,y,z are still unassigned).</span>
<a name="l00328"></a>00328 <span class="comment">   *</span>
<a name="l00329"></a>00329 <span class="comment">   * Populating &#39;vars&#39; is an opportunity for a DP to change the set of</span>
<a name="l00330"></a>00330 <span class="comment">   * top-level &quot;variables&quot; to assign, if needed.  In particular, it</span>
<a name="l00331"></a>00331 <span class="comment">   * may drop &#39;e&#39; from the model entirely, if it is already a concrete</span>
<a name="l00332"></a>00332 <span class="comment">   * value by itself.</span>
<a name="l00333"></a>00333 <span class="comment">   */</span>
<a name="l00334"></a><a class="code" href="group__Theory__API.html#ga4a5b9fff88df80582fc76fd3def55002">00334</a>   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="group__Theory__API.html#ga4a5b9fff88df80582fc76fd3def55002" title="Compute the value of a compound variable from the more primitive ones.">computeModel</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, std::vector&lt;Expr&gt;&amp; vars) {
<a name="l00335"></a>00335     <a class="code" href="classCVC3_1_1Theory.html#a917b117d28514f486b296568fcd1cfd1" title="Assigns t a concrete value val. Used in model generation.">assignValue</a>(<a class="code" href="classCVC3_1_1Theory.html#ac59f888b3b3f973580e061ffd803b6bb" title="Return the theorem that e is equal to its find.">find</a>(e));
<a name="l00336"></a>00336     vars.push_back(e);
<a name="l00337"></a>00337   }
<a name="l00338"></a>00338 <span class="comment"></span>
<a name="l00339"></a>00339 <span class="comment">  //! Receives all the type predicates for the types of the given theory</span>
<a name="l00340"></a>00340 <span class="comment"></span><span class="comment">  /*! Type predicates may be expensive to enqueue eagerly, and DPs may</span>
<a name="l00341"></a>00341 <span class="comment">    choose to postpone them, or transform them to something more</span>
<a name="l00342"></a>00342 <span class="comment">    efficient.  By default, the asserted type predicate is</span>
<a name="l00343"></a>00343 <span class="comment">    immediately enqueued as a new fact.</span>
<a name="l00344"></a>00344 <span class="comment"></span>
<a name="l00345"></a>00345 <span class="comment">    Note: Used only by bitvector theory.</span>
<a name="l00346"></a>00346 <span class="comment"></span>
<a name="l00347"></a>00347 <span class="comment">    \param e is the expression for which the type predicate is computed</span>
<a name="l00348"></a>00348 <span class="comment">    \param pred is the predicate theorem P(e)</span>
<a name="l00349"></a>00349 <span class="comment">  */</span>
<a name="l00350"></a><a class="code" href="group__Theory__API.html#ga4ce2fe1baec76fcb6120bbd86623ecd2">00350</a>   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="group__Theory__API.html#ga4ce2fe1baec76fcb6120bbd86623ecd2" title="Receives all the type predicates for the types of the given theory.">assertTypePred</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_1Theorem.html">Theorem</a>&amp; pred)
<a name="l00351"></a>00351     { <a class="code" href="classCVC3_1_1Theory.html#a93856c9af82b2c25c51b3c36bafb71f4" title="Submit a derived fact to the core from a decision procedure.">enqueueFact</a>(pred); }
<a name="l00352"></a>00352 <span class="comment"></span>
<a name="l00353"></a>00353 <span class="comment">  //! Theory-specific rewrites for atomic formulas</span>
<a name="l00354"></a>00354 <span class="comment"></span><span class="comment">  /*! The intended use is to convert complex atomic formulas into an</span>
<a name="l00355"></a>00355 <span class="comment">   * equivalent Boolean combination of simpler formulas.  Such</span>
<a name="l00356"></a>00356 <span class="comment">   * conversion may be harmful for algebraic rewrites, and is not</span>
<a name="l00357"></a>00357 <span class="comment">   * always desirable to have in rewrite() method.</span>
<a name="l00358"></a>00358 <span class="comment">   *</span>
<a name="l00359"></a>00359 <span class="comment">   * Note: Used only by bitvector theory and rewriteLiteral in core.</span>
<a name="l00360"></a>00360 <span class="comment">   *</span>
<a name="l00361"></a>00361 <span class="comment">   * However, if rewrite() alone cannot solve the problem, and the SAT</span>
<a name="l00362"></a>00362 <span class="comment">   * solver needs to be envoked, these additional rewrites may ease</span>
<a name="l00363"></a>00363 <span class="comment">   * the job for the SAT solver.</span>
<a name="l00364"></a>00364 <span class="comment">   */</span>
<a name="l00365"></a><a class="code" href="group__Theory__API.html#gaacb9782eae3d1121c415cd4b7650025c">00365</a>   <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="group__Theory__API.html#gaacb9782eae3d1121c415cd4b7650025c" title="Theory-specific rewrites for atomic formulas.">rewriteAtomic</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="keywordflow">return</span> <a class="code" href="classCVC3_1_1Theory.html#af860f5d5e01423628c97c399606916ff" title="==&gt; a == a">reflexivityRule</a>(e); }
<a name="l00366"></a>00366 <span class="comment"></span>
<a name="l00367"></a>00367 <span class="comment">  //! Notification of conflict</span>
<a name="l00368"></a>00368 <span class="comment"></span><span class="comment">  /*!</span>
<a name="l00369"></a>00369 <span class="comment">   * Decision procedures implement this method when they want to be</span>
<a name="l00370"></a>00370 <span class="comment">   * notified about a conflict.</span>
<a name="l00371"></a>00371 <span class="comment">   *</span>
<a name="l00372"></a>00372 <span class="comment">   * Note: Used only by quantifier theory</span>
<a name="l00373"></a>00373 <span class="comment">   *</span>
<a name="l00374"></a>00374 <span class="comment">   * \param thm is the theorem of FALSE given to setInconsistent()</span>
<a name="l00375"></a>00375 <span class="comment">   */</span>
<a name="l00376"></a><a class="code" href="group__Theory__API.html#ga30a5750a0c38416c847e411c7400214a">00376</a>   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="group__Theory__API.html#ga30a5750a0c38416c847e411c7400214a" title="Notification of conflict.">notifyInconsistent</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a>&amp; thm) { }
<a name="l00377"></a>00377 
<a name="l00378"></a>00378   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="group__Theory__API.html#gafb1431aa8258f6663ad948ebb08e5330">registerAtom</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_1Theorem.html">Theorem</a>&amp; thm);
<a name="l00379"></a>00379 <span class="comment"></span>
<a name="l00380"></a>00380 <span class="comment">  //! Theory-specific registration of atoms</span>
<a name="l00381"></a>00381 <span class="comment"></span><span class="comment">  /*!</span>
<a name="l00382"></a>00382 <span class="comment">   * If a theory wants to implement its own theory propagation, it</span>
<a name="l00383"></a>00383 <span class="comment">   * should implement this method and use it to collect all atoms</span>
<a name="l00384"></a>00384 <span class="comment">   * that the core is interested in.  If the theory can deduce the atom</span>
<a name="l00385"></a>00385 <span class="comment">   * or its negation, it should do so (using enqueueFact).</span>
<a name="l00386"></a>00386 <span class="comment">   */</span>
<a name="l00387"></a><a class="code" href="group__Theory__API.html#gaae6aca3030e9857d149b8ea26c44b535">00387</a>   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="group__Theory__API.html#gaae6aca3030e9857d149b8ea26c44b535" title="Theory-specific registration of atoms.">registerAtom</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="l00388"></a>00388 
<a name="l00389"></a>00389 
<a name="l00390"></a>00390 <span class="preprocessor">#ifdef _CVC3_DEBUG_MODE</span>
<a name="l00391"></a>00391 <span class="preprocessor"></span><span class="comment">  //! Theory-specific debug function</span>
<a name="l00392"></a>00392 <span class="comment"></span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> debug(<span class="keywordtype">int</span> i) { }<span class="comment"></span>
<a name="l00393"></a>00393 <span class="comment">  //! help function, as debug(int i). yeting</span>
<a name="l00394"></a>00394 <span class="comment"></span>  <span class="keyword">virtual</span> <span class="keywordtype">int</span> help(<span class="keywordtype">int</span> i) { <span class="keywordflow">return</span> 9999 ;} ;
<a name="l00395"></a>00395 <span class="preprocessor">#endif</span>
<a name="l00396"></a>00396 <span class="preprocessor"></span><span class="comment"></span>
<a name="l00397"></a>00397 <span class="comment">  /*@}*/</span> <span class="comment">// End of Theory_API group</span>
<a name="l00398"></a>00398 
<a name="l00399"></a>00399   <span class="comment">/***************************************************************************/</span><span class="comment"></span>
<a name="l00400"></a>00400 <span class="comment">  /*!</span>
<a name="l00401"></a>00401 <span class="comment">   *\name Core Framework Functionality</span>
<a name="l00402"></a>00402 <span class="comment">   * These methods provide convenient access to core functionality for the</span>
<a name="l00403"></a>00403 <span class="comment">   * benefit of decision procedures.</span>
<a name="l00404"></a>00404 <span class="comment">   *@{</span>
<a name="l00405"></a>00405 <span class="comment">   */</span>
<a name="l00406"></a>00406   <span class="comment">/***************************************************************************/</span>
<a name="l00407"></a>00407 <span class="comment"></span>
<a name="l00408"></a>00408 <span class="comment">  //! Check if the current context is inconsistent</span>
<a name="l00409"></a>00409 <span class="comment"></span>  <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classCVC3_1_1Theory.html#ab85541a91803599b7495f709c72c28c5" title="Check if the current context is inconsistent.">inconsistent</a>();<span class="comment"></span>
<a name="l00410"></a>00410 <span class="comment">  //! Make the context inconsistent; The formula proved by e must FALSE.</span>
<a name="l00411"></a>00411 <span class="comment"></span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classCVC3_1_1Theory.html#a89f8e1e02e22ef524c286ce8b87bdea4" title="Make the context inconsistent; The formula proved by e must FALSE.">setInconsistent</a>(<span class="keyword">const</span> Theorem&amp; e);
<a name="l00412"></a>00412 <span class="comment"></span>
<a name="l00413"></a>00413 <span class="comment">  //! Mark the current decision branch as possibly incomplete</span>
<a name="l00414"></a>00414 <span class="comment"></span><span class="comment">  /*!</span>
<a name="l00415"></a>00415 <span class="comment">   * This should be set when a decision procedure uses an incomplete</span>
<a name="l00416"></a>00416 <span class="comment">   * algorithm, and cannot guarantee satisfiability after the final</span>
<a name="l00417"></a>00417 <span class="comment">   * checkSat() call with full effort.  An example would be</span>
<a name="l00418"></a>00418 <span class="comment">   * instantiation of universal quantifiers.</span>
<a name="l00419"></a>00419 <span class="comment">   *</span>
<a name="l00420"></a>00420 <span class="comment">   * A decision procedure can provide a reason for incompleteness,</span>
<a name="l00421"></a>00421 <span class="comment">   * which will be reported back to the user.</span>
<a name="l00422"></a>00422 <span class="comment">   */</span>
<a name="l00423"></a>00423   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classCVC3_1_1Theory.html#a08cc815e21d2972f54f8c1e70ce8ab51" title="Mark the current decision branch as possibly incomplete.">setIncomplete</a>(<span class="keyword">const</span> std::string&amp; reason);
<a name="l00424"></a>00424 <span class="comment"></span>
<a name="l00425"></a>00425 <span class="comment">  //! Simplify a term e and return a Theorem(e==e&#39;)</span>
<a name="l00426"></a>00426 <span class="comment"></span><span class="comment">  /*! \sa simplifyExpr() */</span>
<a name="l00427"></a>00427   <span class="keyword">virtual</span> Theorem <a class="code" href="classCVC3_1_1Theory.html#a52158688456f8605b064fbbf7a46039c" title="Simplify a term e and return a Theorem(e==e&#39;)">simplify</a>(<span class="keyword">const</span> Expr&amp; e);<span class="comment"></span>
<a name="l00428"></a>00428 <span class="comment">  //! Simplify a term e w.r.t. the current context</span>
<a name="l00429"></a>00429 <span class="comment"></span><span class="comment">  /*! \sa simplify */</span>
<a name="l00430"></a><a class="code" href="classCVC3_1_1Theory.html#a9d441225b287419426c80a0374d6c6cb">00430</a>   <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> <a class="code" href="classCVC3_1_1Theory.html#a9d441225b287419426c80a0374d6c6cb" title="Simplify a term e w.r.t. the current context.">simplifyExpr</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="l00431"></a>00431     { <span class="keywordflow">return</span> <a class="code" href="classCVC3_1_1Theory.html#a52158688456f8605b064fbbf7a46039c" title="Simplify a term e and return a Theorem(e==e&#39;)">simplify</a>(e).<a class="code" href="classCVC3_1_1Theorem.html#a97d957fcbf9094480851b1d2e5d3729f">getRHS</a>(); }
<a name="l00432"></a>00432 <span class="comment"></span>
<a name="l00433"></a>00433 <span class="comment">  //! Submit a derived fact to the core from a decision procedure</span>
<a name="l00434"></a>00434 <span class="comment"></span><span class="comment">  /*! \param e is the Theorem for the new fact </span>
<a name="l00435"></a>00435 <span class="comment">   */</span>
<a name="l00436"></a>00436   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classCVC3_1_1Theory.html#a93856c9af82b2c25c51b3c36bafb71f4" title="Submit a derived fact to the core from a decision procedure.">enqueueFact</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a>&amp; e);
<a name="l00437"></a>00437   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classCVC3_1_1Theory.html#af833743a1332ba2b84bdc4118a05300f" title="Check if the current context is inconsistent.">enqueueSE</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a>&amp; e);
<a name="l00438"></a>00438 <span class="comment"></span>
<a name="l00439"></a>00439 <span class="comment">  //! Handle new equalities (usually asserted through addFact)</span>
<a name="l00440"></a>00440 <span class="comment"></span><span class="comment">  /*!</span>
<a name="l00441"></a>00441 <span class="comment">   * INVARIANT: the Theorem &#39;e&#39; is an equality e1==e2, where e2 is</span>
<a name="l00442"></a>00442 <span class="comment">   * i-leaf simplified in the current context, or a conjunction of</span>
<a name="l00443"></a>00443 <span class="comment">   * such equalities.</span>
<a name="l00444"></a>00444 <span class="comment">   *</span>
<a name="l00445"></a>00445 <span class="comment">   */</span>
<a name="l00446"></a>00446   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classCVC3_1_1Theory.html#a135cfab97004ee025a7840d72b6c4e1d" title="Handle new equalities (usually asserted through addFact)">assertEqualities</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a>&amp; e);
<a name="l00447"></a>00447 <span class="comment"></span>
<a name="l00448"></a>00448 <span class="comment">  //! Parse the generic expression.</span>
<a name="l00449"></a>00449 <span class="comment"></span><span class="comment">  /*! This method should be used in parseExprOp() for recursive calls</span>
<a name="l00450"></a>00450 <span class="comment">   *  to subexpressions, and is the method called by the command</span>
<a name="l00451"></a>00451 <span class="comment">   *  processor.</span>
<a name="l00452"></a>00452 <span class="comment">   */</span>
<a name="l00453"></a>00453   <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> <a class="code" href="classCVC3_1_1Theory.html#abd5a64ee867dda0c216a04e9fc7fbd6c" title="Parse the generic expression.">parseExpr</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="l00454"></a>00454 <span class="comment"></span>
<a name="l00455"></a>00455 <span class="comment">  //! Assigns t a concrete value val.  Used in model generation.</span>
<a name="l00456"></a>00456 <span class="comment"></span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classCVC3_1_1Theory.html#a917b117d28514f486b296568fcd1cfd1" title="Assigns t a concrete value val. Used in model generation.">assignValue</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="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; val);<span class="comment"></span>
<a name="l00457"></a>00457 <span class="comment">  //! Record a derived assignment to a variable (LHS).</span>
<a name="l00458"></a>00458 <span class="comment"></span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classCVC3_1_1Theory.html#a917b117d28514f486b296568fcd1cfd1" title="Assigns t a concrete value val. Used in model generation.">assignValue</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a>&amp; thm);
<a name="l00459"></a>00459 <span class="comment"></span>
<a name="l00460"></a>00460 <span class="comment">  /*@}*/</span> <span class="comment">// End of Core Framework Functionality</span>
<a name="l00461"></a>00461 
<a name="l00462"></a>00462   <span class="comment">/***************************************************************************/</span><span class="comment"></span>
<a name="l00463"></a>00463 <span class="comment">  /*!</span>
<a name="l00464"></a>00464 <span class="comment">   *\name Theory Helper Methods</span>
<a name="l00465"></a>00465 <span class="comment">   * These methods provide basic functionality needed by all theories.</span>
<a name="l00466"></a>00466 <span class="comment">   *@{</span>
<a name="l00467"></a>00467 <span class="comment">   */</span>
<a name="l00468"></a>00468   <span class="comment">/***************************************************************************/</span>
<a name="l00469"></a>00469 <span class="comment"></span>
<a name="l00470"></a>00470 <span class="comment">  //! Register new kinds with the given theory</span>
<a name="l00471"></a>00471 <span class="comment"></span>  <span class="keywordtype">void</span> <a class="code" href="classCVC3_1_1Theory.html#a41499be2b31d82e7bec5efc880126510" title="Register new kinds with the given theory.">registerKinds</a>(<a class="code" href="classCVC3_1_1Theory.html" title="Base class for theories.">Theory</a>* theory, std::vector&lt;int&gt;&amp; kinds);<span class="comment"></span>
<a name="l00472"></a>00472 <span class="comment">  //! Unregister kinds for a theory</span>
<a name="l00473"></a>00473 <span class="comment"></span>  <span class="keywordtype">void</span> <a class="code" href="classCVC3_1_1Theory.html#aafdee81857fde584632759c78ed821f5" title="Unregister kinds for a theory.">unregisterKinds</a>(<a class="code" href="classCVC3_1_1Theory.html" title="Base class for theories.">Theory</a>* theory, std::vector&lt;int&gt;&amp; kinds);<span class="comment"></span>
<a name="l00474"></a>00474 <span class="comment">  //! Register a new theory</span>
<a name="l00475"></a>00475 <span class="comment"></span>  <span class="keywordtype">void</span> <a class="code" href="classCVC3_1_1Theory.html#a97a6f8e09f71513da969fa7847346c6f" title="Register a new theory.">registerTheory</a>(<a class="code" href="classCVC3_1_1Theory.html" title="Base class for theories.">Theory</a>* theory, std::vector&lt;int&gt;&amp; kinds,
<a name="l00476"></a>00476           <span class="keywordtype">bool</span> hasSolver=<span class="keyword">false</span>);<span class="comment"></span>
<a name="l00477"></a>00477 <span class="comment">  //! Unregister a theory</span>
<a name="l00478"></a>00478 <span class="comment"></span>  <span class="keywordtype">void</span> <a class="code" href="classCVC3_1_1Theory.html#a6bdcdfdf6d658b1b1b7c548ea4782e6e" title="Unregister a theory.">unregisterTheory</a>(<a class="code" href="classCVC3_1_1Theory.html" title="Base class for theories.">Theory</a>* theory, std::vector&lt;int&gt;&amp; kinds,
<a name="l00479"></a>00479                         <span class="keywordtype">bool</span> hasSolver);
<a name="l00480"></a>00480 <span class="comment"></span>
<a name="l00481"></a>00481 <span class="comment">  //! Return the number of registered theories</span>
<a name="l00482"></a>00482 <span class="comment"></span>  <span class="keywordtype">int</span> <a class="code" href="classCVC3_1_1Theory.html#ab7c83d1e21c1553ff229447fe6d51530" title="Return the number of registered theories.">getNumTheories</a>();
<a name="l00483"></a>00483 <span class="comment"></span>
<a name="l00484"></a>00484 <span class="comment">  //! Test whether a kind maps to any theory</span>
<a name="l00485"></a>00485 <span class="comment"></span>  <span class="keywordtype">bool</span> <a class="code" href="classCVC3_1_1Theory.html#a8dc9b3350f948ce5b6112a4812819696" title="Test whether a kind maps to any theory.">hasTheory</a>(<span class="keywordtype">int</span> kind);<span class="comment"></span>
<a name="l00486"></a>00486 <span class="comment">  //! Return the theory associated with a kind</span>
<a name="l00487"></a>00487 <span class="comment"></span>  <a class="code" href="classCVC3_1_1Theory.html" title="Base class for theories.">Theory</a>* <a class="code" href="classCVC3_1_1Theory.html#a01fa8047ed1f649dc98831cb536187e4" title="Return the theory associated with a kind.">theoryOf</a>(<span class="keywordtype">int</span> kind);<span class="comment"></span>
<a name="l00488"></a>00488 <span class="comment">  //! Return the theory associated with a type</span>
<a name="l00489"></a>00489 <span class="comment"></span>  <a class="code" href="classCVC3_1_1Theory.html" title="Base class for theories.">Theory</a>* <a class="code" href="classCVC3_1_1Theory.html#a01fa8047ed1f649dc98831cb536187e4" title="Return the theory associated with a kind.">theoryOf</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a>&amp; e);<span class="comment"></span>
<a name="l00490"></a>00490 <span class="comment">  //! Return the theory associated with an Expr</span>
<a name="l00491"></a>00491 <span class="comment"></span>  <a class="code" href="classCVC3_1_1Theory.html" title="Base class for theories.">Theory</a>* <a class="code" href="classCVC3_1_1Theory.html#a01fa8047ed1f649dc98831cb536187e4" title="Return the theory associated with a kind.">theoryOf</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="l00492"></a>00492 <span class="comment"></span>
<a name="l00493"></a>00493 <span class="comment">  //! Return the theorem that e is equal to its find</span>
<a name="l00494"></a>00494 <span class="comment"></span>  <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1Theory.html#ac59f888b3b3f973580e061ffd803b6bb" title="Return the theorem that e is equal to its find.">find</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="comment"></span>
<a name="l00495"></a>00495 <span class="comment">  //! Return the find as a reference: expr must have a find</span>
<a name="l00496"></a>00496 <span class="comment"></span>  <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a>&amp; <a class="code" href="classCVC3_1_1Theory.html#a89a91d7480d5783fb0c0f67f2fdb7873" title="Return the find as a reference: expr must have a find.">findRef</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="l00497"></a>00497 <span class="comment"></span>
<a name="l00498"></a>00498 <span class="comment">  //! Return find-reduced version of e</span>
<a name="l00499"></a>00499 <span class="comment"></span>  <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1Theory.html#ab46ce7e7b6c9425a42df38ccf56642b6" title="Return find-reduced version of e.">findReduce</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="comment"></span>
<a name="l00500"></a>00500 <span class="comment">  //! Return true iff e is find-reduced</span>
<a name="l00501"></a>00501 <span class="comment"></span>  <span class="keywordtype">bool</span> <a class="code" href="classCVC3_1_1Theory.html#ad0f5335bae1a358802ec5b958e77934e" title="Return true iff e is find-reduced.">findReduced</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="comment"></span>
<a name="l00502"></a>00502 <span class="comment">  //! Return the find of e, or e if it has no find</span>
<a name="l00503"></a><a class="code" href="classCVC3_1_1Theory.html#a08412b310cb743536f7edd9fccd60e46">00503</a> <span class="comment"></span>  <span class="keyword">inline</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> <a class="code" href="classCVC3_1_1Theory.html#a08412b310cb743536f7edd9fccd60e46" title="Return the find of e, or e if it has no find.">findExpr</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="l00504"></a>00504     { <span class="keywordflow">return</span> e.<a class="code" href="group__ExprPkg.html#ga4dc94c33ae308ff8d9d004f49df8f42b">hasFind</a>() ? <a class="code" href="classCVC3_1_1Theory.html#ac59f888b3b3f973580e061ffd803b6bb" title="Return the theorem that e is equal to its find.">find</a>(e).<a class="code" href="classCVC3_1_1Theorem.html#a97d957fcbf9094480851b1d2e5d3729f">getRHS</a>() : e; }
<a name="l00505"></a>00505 <span class="comment"></span>
<a name="l00506"></a>00506 <span class="comment">  //! Compute the TCC of e, or the subtyping predicate, if e is a type</span>
<a name="l00507"></a>00507 <span class="comment"></span>  <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> <a class="code" href="classCVC3_1_1Theory.html#af38bdeb162a9ab9bd81ce40f598f608f" title="Compute the TCC of e, or the subtyping predicate, if e is a type.">getTCC</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="comment"></span>
<a name="l00508"></a>00508 <span class="comment">  //! Compute (or look up in cache) the base type of e and return the result</span>
<a name="l00509"></a>00509 <span class="comment"></span>  <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a> <a class="code" href="classCVC3_1_1Theory.html#aa408fe61c3d28f4333b78a3027606bb8" title="Compute (or look up in cache) the base type of e and return the result.">getBaseType</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="comment"></span>
<a name="l00510"></a>00510 <span class="comment">  //! Compute the base type from an arbitrary type</span>
<a name="l00511"></a>00511 <span class="comment"></span>  <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a> <a class="code" href="classCVC3_1_1Theory.html#aa408fe61c3d28f4333b78a3027606bb8" title="Compute (or look up in cache) the base type of e and return the result.">getBaseType</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a>&amp; tp);<span class="comment"></span>
<a name="l00512"></a>00512 <span class="comment">  //! Calls the correct theory to compute a type predicate</span>
<a name="l00513"></a>00513 <span class="comment"></span>  <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> <a class="code" href="classCVC3_1_1Theory.html#a39539e895f8aade88ae5bc05bbcc9302" title="Calls the correct theory to compute a type predicate.">getTypePred</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a>&amp; t, <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="l00514"></a>00514 <span class="comment"></span>
<a name="l00515"></a>00515 <span class="comment">  //! Update the children of the term e</span>
<a name="l00516"></a>00516 <span class="comment"></span><span class="comment">  /*! When a decision procedure receives a call to update() because a</span>
<a name="l00517"></a>00517 <span class="comment">    child of a term &#39;e&#39; has changed, this method can be called to</span>
<a name="l00518"></a>00518 <span class="comment">    compute the new value of &#39;e&#39;.</span>
<a name="l00519"></a>00519 <span class="comment">    \sa update</span>
<a name="l00520"></a>00520 <span class="comment">  */</span>
<a name="l00521"></a>00521   <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1Theory.html#ad6cb45844df7f1b08a53e41e40a362e3" title="Update the children of the term e.">updateHelper</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="comment"></span>
<a name="l00522"></a>00522 <span class="comment">  //! Setup a term for congruence closure (must have sig and rep attributes)</span>
<a name="l00523"></a>00523 <span class="comment"></span>  <span class="keywordtype">void</span> <a class="code" href="classCVC3_1_1Theory.html#a29cc343040a52a299a4f20123edf4c75" title="Setup a term for congruence closure (must have sig and rep attributes)">setupCC</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="comment"></span>
<a name="l00524"></a>00524 <span class="comment">  //! Update a term w.r.t. congruence closure (must be setup with setupCC())</span>
<a name="l00525"></a>00525 <span class="comment"></span>  <span class="keywordtype">void</span> <a class="code" href="classCVC3_1_1Theory.html#a0b9e5a75b0e23a334563392f075df9e2" title="Update a term w.r.t. congruence closure (must be setup with setupCC())">updateCC</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; d);<span class="comment"></span>
<a name="l00526"></a>00526 <span class="comment">  //! Rewrite a term w.r.t. congruence closure (must be setup with setupCC())</span>
<a name="l00527"></a>00527 <span class="comment"></span>  <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1Theory.html#a2d91d71489b0c0a9822cef765326bc89" title="Rewrite a term w.r.t. congruence closure (must be setup with setupCC())">rewriteCC</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="l00528"></a>00528 <span class="comment"></span>
<a name="l00529"></a>00529 <span class="comment">  /*! @brief Calls the correct theory to get all of the terms that</span>
<a name="l00530"></a>00530 <span class="comment">    need to be assigned values in the concrete model */</span>
<a name="l00531"></a>00531   <span class="keywordtype">void</span> <a class="code" href="classCVC3_1_1Theory.html#ad8b27aeea37d99def7a3c0348ded3e66" title="Calls the correct theory to get all of the terms that need to be assigned values in the concrete mode...">getModelTerm</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, std::vector&lt;Expr&gt;&amp; v);<span class="comment"></span>
<a name="l00532"></a>00532 <span class="comment">  //! Fetch the concrete assignment to the variable during model generation</span>
<a name="l00533"></a>00533 <span class="comment"></span>  <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1Theory.html#a4867f332c809f6efe8f01ffa45c32db3" title="Fetch the concrete assignment to the variable during model generation.">getModelValue</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="l00534"></a>00534 <span class="comment"></span>
<a name="l00535"></a>00535 <span class="comment">  //! Suggest a splitter to the SearchEngine</span>
<a name="l00536"></a>00536 <span class="comment"></span>  <span class="keywordtype">void</span> <a class="code" href="classCVC3_1_1Theory.html#a605e960d2442b587046c562723b7f03a" title="Suggest a splitter to the SearchEngine.">addSplitter</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> priority = 0);
<a name="l00537"></a>00537 <span class="comment"></span>
<a name="l00538"></a>00538 <span class="comment">  //! Add a global lemma</span>
<a name="l00539"></a>00539 <span class="comment"></span>  <span class="keywordtype">void</span> <a class="code" href="classCVC3_1_1Theory.html#a688cd0c0b669ab9719f8a99cb207ad2c" title="Add a global lemma.">addGlobalLemma</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a>&amp; thm, <span class="keywordtype">int</span> priority = 0);
<a name="l00540"></a>00540 <span class="comment"></span>
<a name="l00541"></a>00541 <span class="comment">  /*@}*/</span> <span class="comment">// End of Theory Helper Methods</span>
<a name="l00542"></a>00542 
<a name="l00543"></a>00543   <span class="comment">/***************************************************************************/</span><span class="comment"></span>
<a name="l00544"></a>00544 <span class="comment">  /*!</span>
<a name="l00545"></a>00545 <span class="comment">   *\name Core Testers</span>
<a name="l00546"></a>00546 <span class="comment">   *@{</span>
<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"></span>
<a name="l00550"></a>00550 <span class="comment">  //! Test if e is an i-leaf term for the current theory</span>
<a name="l00551"></a>00551 <span class="comment"></span><span class="comment">  /*! A term &#39;e&#39; is an i-leaf for a theory &#39;i&#39;, if it is a variable,</span>
<a name="l00552"></a>00552 <span class="comment">    or &#39;e&#39; belongs to a different theory.  This definition makes sense</span>
<a name="l00553"></a>00553 <span class="comment">    for a larger term which by itself belongs to the current theory</span>
<a name="l00554"></a>00554 <span class="comment">    &#39;i&#39;, but (some of) its children are variables or belong to</span>
<a name="l00555"></a>00555 <span class="comment">    different theories. */</span>
<a name="l00556"></a><a class="code" href="classCVC3_1_1Theory.html#a8d466120560b7b91dc279e657fe3c433">00556</a>   <span class="keywordtype">bool</span> <a class="code" href="classCVC3_1_1Theory.html#a8d466120560b7b91dc279e657fe3c433" title="Test if e is an i-leaf term for the current theory.">isLeaf</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="keywordflow">return</span> e.<a class="code" href="group__ExprPkg.html#ga55b6a203b4375e64598306596851d9ae">isVar</a>() || <a class="code" href="classCVC3_1_1Theory.html#a01fa8047ed1f649dc98831cb536187e4" title="Return the theory associated with a kind.">theoryOf</a>(e) != <span class="keyword">this</span>; }
<a name="l00557"></a>00557 <span class="comment"></span>
<a name="l00558"></a>00558 <span class="comment">  //! Test if e1 is an i-leaf in e2</span>
<a name="l00559"></a>00559 <span class="comment"></span><span class="comment">  /*! \sa isLeaf */</span>
<a name="l00560"></a>00560   <span class="keywordtype">bool</span> <a class="code" href="classCVC3_1_1Theory.html#aa0ef53bc2009d92763e0916c38aaf692" title="Test if e1 is an i-leaf in e2.">isLeafIn</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e1, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e2);
<a name="l00561"></a>00561 <span class="comment"></span>
<a name="l00562"></a>00562 <span class="comment">  //! Test if all i-leaves of e are simplified</span>
<a name="l00563"></a>00563 <span class="comment"></span><span class="comment">  /*! \sa isLeaf */</span>
<a name="l00564"></a>00564   <span class="keywordtype">bool</span> <a class="code" href="classCVC3_1_1Theory.html#a8dd39cad11cf866afc6282475cfc81b7" title="Test if all i-leaves of e are simplified.">leavesAreSimp</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="l00565"></a>00565 <span class="comment"></span>
<a name="l00566"></a>00566 <span class="comment">  /*@}*/</span> <span class="comment">// End of Core Testers</span>
<a name="l00567"></a>00567 
<a name="l00568"></a>00568   <span class="comment">/***************************************************************************/</span><span class="comment"></span>
<a name="l00569"></a>00569 <span class="comment">  /*!</span>
<a name="l00570"></a>00570 <span class="comment">   *\name Common Type and Expr Methods</span>
<a name="l00571"></a>00571 <span class="comment">   *@{</span>
<a name="l00572"></a>00572 <span class="comment">   */</span>
<a name="l00573"></a>00573   <span class="comment">/***************************************************************************/</span>
<a name="l00574"></a>00574 <span class="comment"></span>
<a name="l00575"></a>00575 <span class="comment">  //! Return BOOLEAN type</span>
<a name="l00576"></a><a class="code" href="classCVC3_1_1Theory.html#a705d998884ec8a53c22220373472d868">00576</a> <span class="comment"></span>  <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a> <a class="code" href="classCVC3_1_1Theory.html#a705d998884ec8a53c22220373472d868" title="Return BOOLEAN type.">boolType</a>() { <span class="keywordflow">return</span> <a class="code" href="classCVC3_1_1Type.html#a20b55d497b79ffc60b68ffe512dc2b56">Type::typeBool</a>(<a class="code" href="classCVC3_1_1Theory.html#ad756f41e88f25eec335c9c1c004ae61f">d_em</a>); }
<a name="l00577"></a>00577 <span class="comment"></span>
<a name="l00578"></a>00578 <span class="comment">  //! Return FALSE Expr</span>
<a name="l00579"></a><a class="code" href="classCVC3_1_1Theory.html#a0bbf7c5b6079fc99a0f759e5809fe6f5">00579</a> <span class="comment"></span>  <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; <a class="code" href="classCVC3_1_1Theory.html#a0bbf7c5b6079fc99a0f759e5809fe6f5" title="Return FALSE Expr.">falseExpr</a>() { <span class="keywordflow">return</span> <a class="code" href="classCVC3_1_1Theory.html#ad756f41e88f25eec335c9c1c004ae61f">d_em</a>-&gt;<a class="code" href="group__EM__Priv.html#gaae9db4c93c67cbf8bbf5d1e60e94f1ae" title="FALSE Expr.">falseExpr</a>(); }
<a name="l00580"></a>00580 <span class="comment"></span>
<a name="l00581"></a>00581 <span class="comment">  //! Return TRUE Expr</span>
<a name="l00582"></a><a class="code" href="classCVC3_1_1Theory.html#ab8835beee96db67f3c26a604d96f2fe8">00582</a> <span class="comment"></span>  <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; <a class="code" href="classCVC3_1_1Theory.html#ab8835beee96db67f3c26a604d96f2fe8" title="Return TRUE Expr.">trueExpr</a>() { <span class="keywordflow">return</span> <a class="code" href="classCVC3_1_1Theory.html#ad756f41e88f25eec335c9c1c004ae61f">d_em</a>-&gt;<a class="code" href="group__EM__Priv.html#ga4471fca49c2acbb7b4cf71e72bc55d6a" title="TRUE Expr.">trueExpr</a>(); }
<a name="l00583"></a>00583 <span class="comment"></span>
<a name="l00584"></a>00584 <span class="comment">  //! Create a new variable given its name and type</span>
<a name="l00585"></a>00585 <span class="comment"></span><span class="comment">  /*! Add the variable to the database for resolving IDs in parseExpr</span>
<a name="l00586"></a>00586 <span class="comment">   */</span>
<a name="l00587"></a>00587   <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> <a class="code" href="classCVC3_1_1Theory.html#a4f82b4903d68da2bd83afb104c2c62cc" title="Create a new variable given its name and type.">newVar</a>(<span class="keyword">const</span> std::string&amp; name, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a>&amp; type);<span class="comment"></span>
<a name="l00588"></a>00588 <span class="comment">  //! Create a new named expression given its name, type, and definition</span>
<a name="l00589"></a>00589 <span class="comment"></span><span class="comment">  /*! Add the definition to the database for resolving IDs in parseExpr</span>
<a name="l00590"></a>00590 <span class="comment">   */</span>
<a name="l00591"></a>00591   <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> <a class="code" href="classCVC3_1_1Theory.html#a4f82b4903d68da2bd83afb104c2c62cc" title="Create a new variable given its name and type.">newVar</a>(<span class="keyword">const</span> std::string&amp; name, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a>&amp; type, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; def);
<a name="l00592"></a>00592 <span class="comment"></span>
<a name="l00593"></a>00593 <span class="comment">  //! Create a new uninterpreted function</span>
<a name="l00594"></a>00594 <span class="comment"></span><span class="comment">  /*! Add the definition to the database for resolving IDs in parseExpr</span>
<a name="l00595"></a>00595 <span class="comment">   */</span>
<a name="l00596"></a>00596   <a class="code" href="classCVC3_1_1Op.html">Op</a> <a class="code" href="classCVC3_1_1Theory.html#a97642364c244b753d33b551fc8c3bb9a" title="Create a new uninterpreted function.">newFunction</a>(<span class="keyword">const</span> std::string&amp; name, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a>&amp; type,
<a name="l00597"></a>00597                  <span class="keywordtype">bool</span> computeTransClosure);
<a name="l00598"></a>00598 <span class="comment"></span>
<a name="l00599"></a>00599 <span class="comment">  //! Look up a function by name.</span>
<a name="l00600"></a>00600 <span class="comment"></span><span class="comment">  /*! Returns the function and sets type to the type of the function if it</span>
<a name="l00601"></a>00601 <span class="comment">   * exists.  If not, returns a NULL Op object.</span>
<a name="l00602"></a>00602 <span class="comment">   */</span>
<a name="l00603"></a>00603   <a class="code" href="classCVC3_1_1Op.html">Op</a> <a class="code" href="classCVC3_1_1Theory.html#a61a4a3159152e1ff93dea55a33441557" title="Look up a function by name.">lookupFunction</a>(<span class="keyword">const</span> std::string&amp; name, <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a>* type);
<a name="l00604"></a>00604 <span class="comment"></span>
<a name="l00605"></a>00605 <span class="comment">  //! Create a new defined function</span>
<a name="l00606"></a>00606 <span class="comment"></span><span class="comment">  /*! Add the definition to the database for resolving IDs in parseExpr</span>
<a name="l00607"></a>00607 <span class="comment">   */</span>
<a name="l00608"></a>00608   <a class="code" href="classCVC3_1_1Op.html">Op</a> <a class="code" href="classCVC3_1_1Theory.html#a97642364c244b753d33b551fc8c3bb9a" title="Create a new uninterpreted function.">newFunction</a>(<span class="keyword">const</span> std::string&amp; name, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a>&amp; type, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; def);
<a name="l00609"></a>00609 <span class="comment"></span>
<a name="l00610"></a>00610 <span class="comment">  //! Create and add a new bound variable to the stack, for parseExprOp().</span>
<a name="l00611"></a>00611 <span class="comment"></span><span class="comment">  /*!</span>
<a name="l00612"></a>00612 <span class="comment">   * The stack is popped automatically upon return from the</span>
<a name="l00613"></a>00613 <span class="comment">   * parseExprOp() which used this method.</span>
<a name="l00614"></a>00614 <span class="comment">   *</span>
<a name="l00615"></a>00615 <span class="comment">   * Bound variable names may repeat, in which case the latest</span>
<a name="l00616"></a>00616 <span class="comment">   * declaration takes precedence.</span>
<a name="l00617"></a>00617 <span class="comment">   */</span>
<a name="l00618"></a>00618   <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> <a class="code" href="classCVC3_1_1Theory.html#a13ba9024a22362cc96760519a84f2316" title="Create and add a new bound variable to the stack, for parseExprOp().">addBoundVar</a>(<span class="keyword">const</span> std::string&amp; name, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a>&amp; type);<span class="comment"></span>
<a name="l00619"></a>00619 <span class="comment">  //! Create and add a new bound named def to the stack, for parseExprOp().</span>
<a name="l00620"></a>00620 <span class="comment"></span><span class="comment">  /*!</span>
<a name="l00621"></a>00621 <span class="comment">   * The stack is popped automatically upon return from the</span>
<a name="l00622"></a>00622 <span class="comment">   * parseExprOp() which used this method.</span>
<a name="l00623"></a>00623 <span class="comment">   *</span>
<a name="l00624"></a>00624 <span class="comment">   * Bound variable names may repeat, in which case the latest</span>
<a name="l00625"></a>00625 <span class="comment">   * declaration takes precedence.</span>
<a name="l00626"></a>00626 <span class="comment">   *</span>
<a name="l00627"></a>00627 <span class="comment">   * The type may be Null, but &#39;def&#39; must always be a valid Expr</span>
<a name="l00628"></a>00628 <span class="comment">   */</span>
<a name="l00629"></a>00629   <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> <a class="code" href="classCVC3_1_1Theory.html#a13ba9024a22362cc96760519a84f2316" title="Create and add a new bound variable to the stack, for parseExprOp().">addBoundVar</a>(<span class="keyword">const</span> std::string&amp; name, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a>&amp; type, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; def);
<a name="l00630"></a>00630 <span class="comment"></span>
<a name="l00631"></a>00631 <span class="comment">  /*! @brief Lookup variable and return it and its type.  Return NULL Expr if</span>
<a name="l00632"></a>00632 <span class="comment">    it doesn&#39;t exist yet. */</span>
<a name="l00633"></a>00633   <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> <a class="code" href="classCVC3_1_1Theory.html#a4b58aeebc3a62e41f0ce71ba01fa3961" title="Lookup variable and return it and its type. Return NULL Expr if it doesn&#39;t exist yet.">lookupVar</a>(<span class="keyword">const</span> std::string&amp; name, <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a>* type);
<a name="l00634"></a>00634 <span class="comment"></span>
<a name="l00635"></a>00635 <span class="comment">  //! Create a new uninterpreted type with the given name</span>
<a name="l00636"></a>00636 <span class="comment"></span><span class="comment">  /*! Add the name to the global variable database d_globals</span>
<a name="l00637"></a>00637 <span class="comment">   */</span>
<a name="l00638"></a>00638   <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a> <a class="code" href="classCVC3_1_1Theory.html#aadde006d0dea508fec039b8092b14ed6" title="Create a new uninterpreted type with the given name.">newTypeExpr</a>(<span class="keyword">const</span> std::string&amp; name);<span class="comment"></span>
<a name="l00639"></a>00639 <span class="comment">  //! Lookup type by name.  Return Null if no such type exists.</span>
<a name="l00640"></a>00640 <span class="comment"></span>  <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a> <a class="code" href="classCVC3_1_1Theory.html#a4e57c5fb189f51c6e5abeeb0bcb1baef" title="Lookup type by name. Return Null if no such type exists.">lookupTypeExpr</a>(<span class="keyword">const</span> std::string&amp; name);<span class="comment"></span>
<a name="l00641"></a>00641 <span class="comment">  //! Create a new type abbreviation with the given name </span>
<a name="l00642"></a>00642 <span class="comment"></span>  <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a> <a class="code" href="classCVC3_1_1Theory.html#aadde006d0dea508fec039b8092b14ed6" title="Create a new uninterpreted type with the given name.">newTypeExpr</a>(<span class="keyword">const</span> std::string&amp; name, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a>&amp; def);
<a name="l00643"></a>00643 <span class="comment"></span>
<a name="l00644"></a>00644 <span class="comment">  //! Create a new subtype expression</span>
<a name="l00645"></a>00645 <span class="comment"></span>  <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a> <a class="code" href="classCVC3_1_1Theory.html#af85a563480c411b1e8eb280de9f39bb2" title="Create a new subtype expression.">newSubtypeExpr</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; pred, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; witness);
<a name="l00646"></a>00646 <span class="comment"></span>
<a name="l00647"></a>00647 <span class="comment">  //! Resolve an identifier, for use in parseExprOp()</span>
<a name="l00648"></a>00648 <span class="comment"></span><span class="comment">  /*!</span>
<a name="l00649"></a>00649 <span class="comment">   * First, search the bound variable stack, and if the name is not</span>
<a name="l00650"></a>00650 <span class="comment">   * found, search the global constant and type declarations.  </span>
<a name="l00651"></a>00651 <span class="comment">   *</span>
<a name="l00652"></a>00652 <span class="comment">   * \return an expression to use in place of the identifier, or Null</span>
<a name="l00653"></a>00653 <span class="comment">   * if cannot resolve the name.</span>
<a name="l00654"></a>00654 <span class="comment">   */</span>
<a name="l00655"></a>00655   <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> <a class="code" href="classCVC3_1_1Theory.html#a07b326cd94b2bb8bafa39faf07caaec5" title="Resolve an identifier, for use in parseExprOp()">resolveID</a>(<span class="keyword">const</span> std::string&amp; name);
<a name="l00656"></a>00656 <span class="comment"></span>
<a name="l00657"></a>00657 <span class="comment">  //! Install name as a new identifier associated with Expr e</span>
<a name="l00658"></a>00658 <span class="comment"></span>  <span class="keywordtype">void</span> <a class="code" href="classCVC3_1_1Theory.html#a6b1c155465b0c24885213e7442dd0882" title="Install name as a new identifier associated with Expr e.">installID</a>(<span class="keyword">const</span> std::string&amp; name, <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="l00659"></a>00659 
<a name="l00660"></a>00660   <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1Theory.html#a090c2b079f3b90b4f5da3d8606b14d16" title="Return BOOLEAN type.">typePred</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="l00661"></a>00661 <span class="comment"></span>
<a name="l00662"></a>00662 <span class="comment">  /*@}*/</span> <span class="comment">// End of Common Type and Expr Methods</span>
<a name="l00663"></a>00663 
<a name="l00664"></a>00664   <span class="comment">/***************************************************************************/</span><span class="comment"></span>
<a name="l00665"></a>00665 <span class="comment">  /*!</span>
<a name="l00666"></a>00666 <span class="comment">   *\name Commonly Used Proof Rules</span>
<a name="l00667"></a>00667 <span class="comment">   *\anchor theory_api_core_proof_rules</span>
<a name="l00668"></a>00668 <span class="comment">   *@{</span>
<a name="l00669"></a>00669 <span class="comment">   */</span>
<a name="l00670"></a>00670   <span class="comment">/***************************************************************************/</span>
<a name="l00671"></a>00671 <span class="comment"></span>
<a name="l00672"></a>00672 <span class="comment">  //!  ==&gt; a == a</span>
<a name="l00673"></a><a class="code" href="classCVC3_1_1Theory.html#af860f5d5e01423628c97c399606916ff">00673</a> <span class="comment"></span>  <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1Theory.html#af860f5d5e01423628c97c399606916ff" title="==&gt; a == a">reflexivityRule</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; a)
<a name="l00674"></a>00674     { <span class="keywordflow">return</span> <a class="code" href="classCVC3_1_1Theory.html#a59d055f2cf01f484ce36d56ddb82c8f8" title="Commonly used proof rules.">d_commonRules</a>-&gt;<a class="code" href="classCVC3_1_1CommonProofRules.html#a61c1fe56b4ed9744006883a7784ddb71">reflexivityRule</a>(a); }
<a name="l00675"></a>00675 <span class="comment"></span>
<a name="l00676"></a>00676 <span class="comment">  //!  a1 == a2 ==&gt; a2 == a1</span>
<a name="l00677"></a><a class="code" href="classCVC3_1_1Theory.html#a7440711981ac1bba2bed7476c0fa4e0b">00677</a> <span class="comment"></span>  <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1Theory.html#a7440711981ac1bba2bed7476c0fa4e0b" title="a1 == a2 ==&gt; a2 == a1">symmetryRule</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a>&amp; a1_eq_a2)
<a name="l00678"></a>00678     { <span class="keywordflow">return</span> <a class="code" href="classCVC3_1_1Theory.html#a59d055f2cf01f484ce36d56ddb82c8f8" title="Commonly used proof rules.">d_commonRules</a>-&gt;<a class="code" href="classCVC3_1_1CommonProofRules.html#a0a87e88508f49b73037e0024afa841bf" title=" (same for IFF)">symmetryRule</a>(a1_eq_a2); }
<a name="l00679"></a>00679 <span class="comment"></span>
<a name="l00680"></a>00680 <span class="comment">  //! (a1 == a2) &amp; (a2 == a3) ==&gt; (a1 == a3)</span>
<a name="l00681"></a><a class="code" href="classCVC3_1_1Theory.html#a76f6507116e36f46dab074781fb9bf2d">00681</a> <span class="comment"></span>  <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1Theory.html#a76f6507116e36f46dab074781fb9bf2d" title="(a1 == a2) &amp; (a2 == a3) ==&gt; (a1 == a3)">transitivityRule</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a>&amp; a1_eq_a2,
<a name="l00682"></a>00682          <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a>&amp; a2_eq_a3)
<a name="l00683"></a>00683     { <span class="keywordflow">return</span> <a class="code" href="classCVC3_1_1Theory.html#a59d055f2cf01f484ce36d56ddb82c8f8" title="Commonly used proof rules.">d_commonRules</a>-&gt;<a class="code" href="classCVC3_1_1CommonProofRules.html#a4a4e90cd69ce24e83ba2c217907c277a" title=" (same for IFF)">transitivityRule</a>(a1_eq_a2, a2_eq_a3); }
<a name="l00684"></a>00684 <span class="comment"></span>
<a name="l00685"></a>00685 <span class="comment">  //! (c_1 == d_1) &amp; ... &amp; (c_n == d_n) ==&gt; op(c_1,...,c_n) == op(d_1,...,d_n)</span>
<a name="l00686"></a><a class="code" href="classCVC3_1_1Theory.html#a92e2da5223d7fb620cce85b2813e047f">00686</a> <span class="comment"></span>  <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1Theory.html#a92e2da5223d7fb620cce85b2813e047f" title="(c_1 == d_1) &amp; ... &amp; (c_n == d_n) ==&gt; op(c_1,...,c_n) == op(d_1,...,d_n)">substitutivityRule</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Op.html">Op</a>&amp; op,
<a name="l00687"></a>00687            <span class="keyword">const</span> std::vector&lt;Theorem&gt;&amp; thms)
<a name="l00688"></a>00688     { <span class="keywordflow">return</span> <a class="code" href="classCVC3_1_1Theory.html#a59d055f2cf01f484ce36d56ddb82c8f8" title="Commonly used proof rules.">d_commonRules</a>-&gt;<a class="code" href="classCVC3_1_1CommonProofRules.html#a776c827bb6e3b889234429c49ae9ad6f" title="Optimized case for expr with one child.">substitutivityRule</a>(op, thms); }
<a name="l00689"></a>00689 <span class="comment"></span>
<a name="l00690"></a>00690 <span class="comment">  //! Special case for unary operators</span>
<a name="l00691"></a><a class="code" href="classCVC3_1_1Theory.html#a83a1a0b30a27f887cef4c394544b30b0">00691</a> <span class="comment"></span>  <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1Theory.html#a92e2da5223d7fb620cce85b2813e047f" title="(c_1 == d_1) &amp; ... &amp; (c_n == d_n) ==&gt; op(c_1,...,c_n) == op(d_1,...,d_n)">substitutivityRule</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="l00692"></a>00692                              <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a>&amp; t)
<a name="l00693"></a>00693     { <span class="keywordflow">return</span> <a class="code" href="classCVC3_1_1Theory.html#a59d055f2cf01f484ce36d56ddb82c8f8" title="Commonly used proof rules.">d_commonRules</a>-&gt;<a class="code" href="classCVC3_1_1CommonProofRules.html#a776c827bb6e3b889234429c49ae9ad6f" title="Optimized case for expr with one child.">substitutivityRule</a>(e, t); }
<a name="l00694"></a>00694 <span class="comment"></span>
<a name="l00695"></a>00695 <span class="comment">  //! Special case for binary operators</span>
<a name="l00696"></a><a class="code" href="classCVC3_1_1Theory.html#abddfe81d6d08a46f1d1b3aa80ac565d5">00696</a> <span class="comment"></span>  <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1Theory.html#a92e2da5223d7fb620cce85b2813e047f" title="(c_1 == d_1) &amp; ... &amp; (c_n == d_n) ==&gt; op(c_1,...,c_n) == op(d_1,...,d_n)">substitutivityRule</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="l00697"></a>00697                              <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a>&amp; t1,
<a name="l00698"></a>00698                              <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a>&amp; t2)
<a name="l00699"></a>00699     { <span class="keywordflow">return</span> <a class="code" href="classCVC3_1_1Theory.html#a59d055f2cf01f484ce36d56ddb82c8f8" title="Commonly used proof rules.">d_commonRules</a>-&gt;<a class="code" href="classCVC3_1_1CommonProofRules.html#a776c827bb6e3b889234429c49ae9ad6f" title="Optimized case for expr with one child.">substitutivityRule</a>(e, t1, t2); }
<a name="l00700"></a>00700 <span class="comment"></span>
<a name="l00701"></a>00701 <span class="comment">  //! Optimized: only positions which changed are included</span>
<a name="l00702"></a><a class="code" href="classCVC3_1_1Theory.html#a8ab61a1574ac8c29db7ddb5b0d45235b">00702</a> <span class="comment"></span>  <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1Theory.html#a92e2da5223d7fb620cce85b2813e047f" title="(c_1 == d_1) &amp; ... &amp; (c_n == d_n) ==&gt; op(c_1,...,c_n) == op(d_1,...,d_n)">substitutivityRule</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="l00703"></a>00703            <span class="keyword">const</span> std::vector&lt;unsigned&gt;&amp; changed,
<a name="l00704"></a>00704            <span class="keyword">const</span> std::vector&lt;Theorem&gt;&amp; thms)
<a name="l00705"></a>00705     { <span class="keywordflow">return</span> <a class="code" href="classCVC3_1_1Theory.html#a59d055f2cf01f484ce36d56ddb82c8f8" title="Commonly used proof rules.">d_commonRules</a>-&gt;<a class="code" href="classCVC3_1_1CommonProofRules.html#a776c827bb6e3b889234429c49ae9ad6f" title="Optimized case for expr with one child.">substitutivityRule</a>(e, changed, thms); }
<a name="l00706"></a>00706 <span class="comment"></span>
<a name="l00707"></a>00707 <span class="comment">  //! Optimized: only a single position changed</span>
<a name="l00708"></a><a class="code" href="classCVC3_1_1Theory.html#a56f710c79a9b3464189e8bb4d9d8a8c2">00708</a> <span class="comment"></span>  <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1Theory.html#a92e2da5223d7fb620cce85b2813e047f" title="(c_1 == d_1) &amp; ... &amp; (c_n == d_n) ==&gt; op(c_1,...,c_n) == op(d_1,...,d_n)">substitutivityRule</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="l00709"></a>00709                              <span class="keywordtype">int</span> changed,
<a name="l00710"></a>00710                              <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a>&amp; thm)
<a name="l00711"></a>00711     { <span class="keywordflow">return</span> <a class="code" href="classCVC3_1_1Theory.html#a59d055f2cf01f484ce36d56ddb82c8f8" title="Commonly used proof rules.">d_commonRules</a>-&gt;<a class="code" href="classCVC3_1_1CommonProofRules.html#a776c827bb6e3b889234429c49ae9ad6f" title="Optimized case for expr with one child.">substitutivityRule</a>(e, changed, thm); }
<a name="l00712"></a>00712 <span class="comment"></span>
<a name="l00713"></a>00713 <span class="comment">  //! e1 AND (e1 IFF e2) ==&gt; e2</span>
<a name="l00714"></a><a class="code" href="classCVC3_1_1Theory.html#aeda4c57dfbe357a80a348da9ffa71072">00714</a> <span class="comment"></span>  <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1Theory.html#aeda4c57dfbe357a80a348da9ffa71072" title="e1 AND (e1 IFF e2) ==&gt; e2">iffMP</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a>&amp; e1, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a>&amp; e1_iff_e2) {
<a name="l00715"></a>00715     <span class="keywordflow">return</span> <a class="code" href="classCVC3_1_1Theory.html#a59d055f2cf01f484ce36d56ddb82c8f8" title="Commonly used proof rules.">d_commonRules</a>-&gt;<a class="code" href="classCVC3_1_1CommonProofRules.html#aebbcd4a194e4fdca0bcd16143fb03a75">iffMP</a>(e1, e1_iff_e2);
<a name="l00716"></a>00716   }
<a name="l00717"></a>00717 <span class="comment"></span>
<a name="l00718"></a>00718 <span class="comment">  //! ==&gt; AND(e1,e2) IFF [simplified expr]</span>
<a name="l00719"></a><a class="code" href="classCVC3_1_1Theory.html#aba1822f2d985b50f6405c290c3814c1a">00719</a> <span class="comment"></span>  <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1Theory.html#aba1822f2d985b50f6405c290c3814c1a" title="==&gt; AND(e1,e2) IFF [simplified expr]">rewriteAnd</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="l00720"></a>00720     <span class="keywordflow">return</span> <a class="code" href="classCVC3_1_1Theory.html#a59d055f2cf01f484ce36d56ddb82c8f8" title="Commonly used proof rules.">d_commonRules</a>-&gt;<a class="code" href="classCVC3_1_1CommonProofRules.html#afb2ae30738c04b088459281d259a6d3a" title="==&gt; AND(e1,e2) IFF [simplified expr]">rewriteAnd</a>(e);
<a name="l00721"></a>00721   }
<a name="l00722"></a>00722 <span class="comment"></span>
<a name="l00723"></a>00723 <span class="comment">  //! ==&gt; OR(e1,...,en) IFF [simplified expr]</span>
<a name="l00724"></a><a class="code" href="classCVC3_1_1Theory.html#ad58c336212c2669f3cf32c0915ee3788">00724</a> <span class="comment"></span>  <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1Theory.html#ad58c336212c2669f3cf32c0915ee3788" title="==&gt; OR(e1,...,en) IFF [simplified expr]">rewriteOr</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="l00725"></a>00725     <span class="keywordflow">return</span> <a class="code" href="classCVC3_1_1Theory.html#a59d055f2cf01f484ce36d56ddb82c8f8" title="Commonly used proof rules.">d_commonRules</a>-&gt;<a class="code" href="classCVC3_1_1CommonProofRules.html#aa3cfb7d47a6d6bc84c85c7fa6a3e1242" title="==&gt; OR(e1,...,en) IFF [simplified expr]">rewriteOr</a>(e);
<a name="l00726"></a>00726   }
<a name="l00727"></a>00727   <span class="comment"></span>
<a name="l00728"></a>00728 <span class="comment">  //! Derived rule for rewriting ITE</span>
<a name="l00729"></a>00729 <span class="comment"></span>  <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1Theory.html#a0f2e0c6647ff6282ee2f65116a82e13b" title="Derived rule for rewriting ITE.">rewriteIte</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="l00730"></a>00730 <span class="comment"></span>
<a name="l00731"></a>00731 <span class="comment">  //! Derived rule to create a new name for an expression</span>
<a name="l00732"></a>00732 <span class="comment"></span>  <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1Theory.html#a07c2391015494b5f71def510c1fb6e26" title="Derived rule to create a new name for an expression.">renameExpr</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="l00733"></a>00733   <span class="comment"></span>
<a name="l00734"></a>00734 <span class="comment">  /*@}*/</span> <span class="comment">// End of Commonly Used Proof Rules</span>
<a name="l00735"></a>00735 
<a name="l00736"></a>00736 
<a name="l00737"></a>00737 };
<a name="l00738"></a>00738 <span class="comment"></span>
<a name="l00739"></a>00739 <span class="comment">/*@}*/</span> <span class="comment">// End of group Theories</span>
<a name="l00740"></a>00740 
<a name="l00741"></a>00741 }
<a name="l00742"></a>00742 
<a name="l00743"></a>00743 <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>