Sophie

Sophie

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

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: theorem_producer.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.4 -->
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">CVC3&#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">theorem_producer.h</div>  </div>
</div>
<div class="contents">
<a href="theorem__producer_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*****************************************************************************/</span><span class="comment"></span>
<a name="l00002"></a>00002 <span class="comment">/*!</span>
<a name="l00003"></a>00003 <span class="comment"> * \file theorem_producer.h</span>
<a name="l00004"></a>00004 <span class="comment"> *</span>
<a name="l00005"></a>00005 <span class="comment"> * Author: Sergey Berezin</span>
<a name="l00006"></a>00006 <span class="comment"> *</span>
<a name="l00007"></a>00007 <span class="comment"> * Created: Dec 10 00:37:49 GMT 2002</span>
<a name="l00008"></a>00008 <span class="comment"> *</span>
<a name="l00009"></a>00009 <span class="comment"> * &lt;hr&gt;</span>
<a name="l00010"></a>00010 <span class="comment"> *</span>
<a name="l00011"></a>00011 <span class="comment"> * License to use, copy, modify, sell and/or distribute this software</span>
<a name="l00012"></a>00012 <span class="comment"> * and its documentation for any purpose is hereby granted without</span>
<a name="l00013"></a>00013 <span class="comment"> * royalty, subject to the terms and conditions defined in the \ref</span>
<a name="l00014"></a>00014 <span class="comment"> * LICENSE file provided with this distribution.</span>
<a name="l00015"></a>00015 <span class="comment"> *</span>
<a name="l00016"></a>00016 <span class="comment"> * &lt;hr&gt;</span>
<a name="l00017"></a>00017 <span class="comment"> *</span>
<a name="l00018"></a>00018 <span class="comment"> */</span>
<a name="l00019"></a>00019 <span class="comment">/*****************************************************************************/</span>
<a name="l00020"></a>00020 <span class="comment">// CLASS: Theorem_Producer</span>
<a name="l00021"></a>00021 <span class="comment">//</span>
<a name="l00022"></a>00022 <span class="comment">// AUTHOR: Sergey Berezin, 07/05/02</span>
<a name="l00023"></a>00023 <span class="comment">//</span>
<a name="l00024"></a>00024 <span class="comment">// Abstract:</span>
<a name="l00025"></a>00025 <span class="comment">//</span>
<a name="l00026"></a>00026 <span class="comment">// This class is the only one that can create new Theorem classes.</span>
<a name="l00027"></a>00027 <span class="comment">//</span>
<a name="l00028"></a>00028 <span class="comment">// Only TRUSTED code can use it; a symbol _CVC3_TRUSTED_ must be</span>
<a name="l00029"></a>00029 <span class="comment">// defined in *.cpp file before including this one; otherwise you&#39;ll</span>
<a name="l00030"></a>00030 <span class="comment">// get a compiler warning.  Custom header files (*.h) which include</span>
<a name="l00031"></a>00031 <span class="comment">// this file should NOT define _CVC3_TRUSTED_.  This practice enforces</span>
<a name="l00032"></a>00032 <span class="comment">// the programmer to be aware of which part of his/her code is</span>
<a name="l00033"></a>00033 <span class="comment">// trusted.</span>
<a name="l00034"></a>00034 <span class="comment">//</span>
<a name="l00035"></a>00035 <span class="comment">// It defines a protected NON-virtual method newTheorem() so that any</span>
<a name="l00036"></a>00036 <span class="comment">// subclass can create a new Theorem.  This means that no untrusted</span>
<a name="l00037"></a>00037 <span class="comment">// decision procedure&#39;s code should see this interface.</span>
<a name="l00038"></a>00038 <span class="comment">// Unfortunately, this has to be a coding policy rather than something</span>
<a name="l00039"></a>00039 <span class="comment">// we can enforce by C++ class structure.</span>
<a name="l00040"></a>00040 <span class="comment">//</span>
<a name="l00041"></a>00041 <span class="comment">// The intended use of this class is to make a subclass and define new</span>
<a name="l00042"></a>00042 <span class="comment">// methods corresponding to proof rules (they take theorems and</span>
<a name="l00043"></a>00043 <span class="comment">// generate new theorems).  Each decision procedure should have such a</span>
<a name="l00044"></a>00044 <span class="comment">// subclass for its trusted core.  Each new proof rule must be sound;</span>
<a name="l00045"></a>00045 <span class="comment">// that is, each new theorem that it generates must logically follow</span>
<a name="l00046"></a>00046 <span class="comment">// from the theorems in the arguments, or the new theorem must be a</span>
<a name="l00047"></a>00047 <span class="comment">// tautology.</span>
<a name="l00048"></a>00048 <span class="comment">//</span>
<a name="l00049"></a>00049 <span class="comment">// Each such subclass must also inherit from a decision</span>
<a name="l00050"></a>00050 <span class="comment">// procedure-specific abstract interface which declares the new</span>
<a name="l00051"></a>00051 <span class="comment">// methods (other than newTheorem). The decision procedure should only</span>
<a name="l00052"></a>00052 <span class="comment">// use the new abstract interface.  Thus, the DP will not even see</span>
<a name="l00053"></a>00053 <span class="comment">// newTheorem() method.</span>
<a name="l00054"></a>00054 <span class="comment">//</span>
<a name="l00055"></a>00055 <span class="comment">// This way the untrusted part of the code will not be able to create</span>
<a name="l00056"></a>00056 <span class="comment">// an unsound theorem.</span>
<a name="l00057"></a>00057 <span class="comment">//</span>
<a name="l00058"></a>00058 <span class="comment">// Proof rules may expect theorems in the arguments be of a certain</span>
<a name="l00059"></a>00059 <span class="comment">// form; if the expectations are not met, the right thing to do is to</span>
<a name="l00060"></a>00060 <span class="comment">// fail in DebugAssert with the appropriate message.  In other words,</span>
<a name="l00061"></a>00061 <span class="comment">// it is a coding bug to pass wrong theorems to the wrong rules.</span>
<a name="l00062"></a>00062 <span class="comment">//</span>
<a name="l00063"></a>00063 <span class="comment">// It is also a bug if a wrong theorem is passed but not detected by</span>
<a name="l00064"></a>00064 <span class="comment">// the proof rule, unless such checks are explicitly turned off</span>
<a name="l00065"></a>00065 <span class="comment">// globally for efficiency.</span><span class="comment"></span>
<a name="l00066"></a>00066 <span class="comment">////////////////////////////////////////////////////////////////////////</span>
<a name="l00067"></a>00067 <span class="comment"></span>
<a name="l00068"></a>00068 <span class="preprocessor">#ifndef _CVC3_TRUSTED_</span>
<a name="l00069"></a>00069 <span class="preprocessor"></span><span class="preprocessor">#warning &quot;This file should be included only by TRUSTED code.  Define _CVC3_TRUSTED_ before including this file.&quot;</span>
<a name="l00070"></a>00070 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00071"></a>00071 <span class="preprocessor"></span>
<a name="l00072"></a>00072 <span class="preprocessor">#ifndef _cvc3__theorem_producer_h_</span>
<a name="l00073"></a>00073 <span class="preprocessor"></span><span class="preprocessor">#define _cvc3__theorem_producer_h_</span>
<a name="l00074"></a>00074 <span class="preprocessor"></span>
<a name="l00075"></a>00075 <span class="preprocessor">#include &quot;<a class="code" href="assumptions_8h.html">assumptions.h</a>&quot;</span>
<a name="l00076"></a>00076 <span class="preprocessor">#include &quot;<a class="code" href="theorem__manager_8h.html">theorem_manager.h</a>&quot;</span>
<a name="l00077"></a>00077 <span class="preprocessor">#include &quot;<a class="code" href="exception_8h.html">exception.h</a>&quot;</span>
<a name="l00078"></a>00078 
<a name="l00079"></a>00079 <span class="comment">// Macro to check for soundness.  It should only be executed within a</span>
<a name="l00080"></a>00080 <span class="comment">// TheoremProducer class, and only if the -check-proofs option is set.</span>
<a name="l00081"></a>00081 <span class="comment">// When its &#39;cond&#39; is violated, it will call a function which will</span>
<a name="l00082"></a>00082 <span class="comment">// eventually throw a soundness exception.</span>
<a name="l00083"></a><a class="code" href="theorem__producer_8h.html#a03dbe872f723d32fd975528f811d646e">00083</a> <span class="preprocessor">#define CHECK_SOUND(cond, msg) { if(!(cond)) \</span>
<a name="l00084"></a>00084 <span class="preprocessor"> soundError(__FILE__, __LINE__, #cond, msg); }</span>
<a name="l00085"></a>00085 <span class="preprocessor"></span>
<a name="l00086"></a>00086 <span class="comment">// Flag whether to check soundness or not</span>
<a name="l00087"></a><a class="code" href="theorem__producer_8h.html#a74a97b789e1a9e6c016291960c657445">00087</a> <span class="preprocessor">#define CHECK_PROOFS *d_checkProofs</span>
<a name="l00088"></a>00088 <span class="preprocessor"></span>
<a name="l00089"></a>00089 <span class="keyword">namespace </span>CVC3 {
<a name="l00090"></a>00090 
<a name="l00091"></a><a class="code" href="classCVC3_1_1TheoremProducer.html">00091</a>   <span class="keyword">class </span><a class="code" href="classCVC3_1_1TheoremProducer.html">TheoremProducer</a> {
<a name="l00092"></a>00092 
<a name="l00093"></a>00093   <span class="keyword">protected</span>:
<a name="l00094"></a><a class="code" href="classCVC3_1_1TheoremProducer.html#a27015759e6bdfced928fc5a2d9877b7d">00094</a>     <a class="code" href="classCVC3_1_1TheoremManager.html">TheoremManager</a>* <a class="code" href="classCVC3_1_1TheoremProducer.html#a27015759e6bdfced928fc5a2d9877b7d">d_tm</a>;
<a name="l00095"></a><a class="code" href="classCVC3_1_1TheoremProducer.html#a1b706238281ad141a57363a6890f14a5">00095</a>     <a class="code" href="classCVC3_1_1ExprManager.html">ExprManager</a>* <a class="code" href="classCVC3_1_1TheoremProducer.html#a1b706238281ad141a57363a6890f14a5">d_em</a>;
<a name="l00096"></a>00096 
<a name="l00097"></a>00097     <span class="comment">// Command-line option whether to check for soundness</span>
<a name="l00098"></a><a class="code" href="classCVC3_1_1TheoremProducer.html#a8b023af23ac984c27c8eae1f79fb1e2d">00098</a>     <span class="keyword">const</span> <span class="keywordtype">bool</span>* <a class="code" href="classCVC3_1_1TheoremProducer.html#a8b023af23ac984c27c8eae1f79fb1e2d">d_checkProofs</a>;
<a name="l00099"></a>00099     <span class="comment">// Operator for creating proof terms</span>
<a name="l00100"></a><a class="code" href="classCVC3_1_1TheoremProducer.html#adcb2b6244c679d22b4a684fb39fd3558">00100</a>     <a class="code" href="classCVC3_1_1Op.html">Op</a> <a class="code" href="classCVC3_1_1TheoremProducer.html#adcb2b6244c679d22b4a684fb39fd3558">d_pfOp</a>;
<a name="l00101"></a>00101     <span class="comment">// Expr for filling in &quot;condition&quot; arguments in flea proofs</span>
<a name="l00102"></a><a class="code" href="classCVC3_1_1TheoremProducer.html#aee4a05e25306885dbaa6f67fc92f119d">00102</a>     <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> <a class="code" href="classCVC3_1_1TheoremProducer.html#aee4a05e25306885dbaa6f67fc92f119d">d_hole</a>;
<a name="l00103"></a>00103 
<a name="l00104"></a>00104     <span class="comment">// Make it possible for the subclasses to create theorems directly.</span>
<a name="l00105"></a>00105 <span class="comment"></span>
<a name="l00106"></a>00106 <span class="comment">    //! Create a new theorem.  See also newRWTheorem() and newReflTheorem()</span>
<a name="l00107"></a><a class="code" href="classCVC3_1_1TheoremProducer.html#ab3afa2471d244b129865548afe06ca89">00107</a> <span class="comment"></span>    <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1TheoremProducer.html#ab3afa2471d244b129865548afe06ca89" title="Create a new theorem. See also newRWTheorem() and newReflTheorem()">newTheorem</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; thm,
<a name="l00108"></a>00108            <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Assumptions.html">Assumptions</a>&amp; assump,
<a name="l00109"></a>00109            <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Proof.html">Proof</a>&amp; pf) {
<a name="l00110"></a>00110       <a class="code" href="debug_8h.html#a600cb2d68efe7cc413cccbb5714c7016">IF_DEBUG</a>(<span class="keywordflow">if</span>(!thm.<a class="code" href="group__ExprPkg.html#gac4af2026c180da0f18d66ac616f61f3a">isEq</a>() &amp;&amp; !thm.<a class="code" href="group__ExprPkg.html#gabe385fb97505cccb75702378511c5375">isIff</a>()) {
<a name="l00111"></a>00111   <a class="code" href="kinds_8h.html#aa10c9e8951b8ccf714a59ec321bdac5ba7fa27e82c6c4f69434225ed81e5d151e">TRACE</a>(<span class="stringliteral">&quot;newTheorem&quot;</span>, <span class="stringliteral">&quot;newTheorem(&quot;</span>, thm, <span class="stringliteral">&quot;)&quot;</span>);
<a name="l00112"></a>00112   debugger.counter(<span class="stringliteral">&quot;newTheorem() called on equality&quot;</span>)++;
<a name="l00113"></a>00113       })
<a name="l00114"></a>00114       <span class="keywordflow">return</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a>(<a class="code" href="classCVC3_1_1TheoremProducer.html#a27015759e6bdfced928fc5a2d9877b7d">d_tm</a>, thm, assump, pf);
<a name="l00115"></a>00115     }
<a name="l00116"></a>00116 <span class="comment"></span>
<a name="l00117"></a>00117 <span class="comment">    //! Create a rewrite theorem: lhs = rhs</span>
<a name="l00118"></a><a class="code" href="classCVC3_1_1TheoremProducer.html#a1b12639479f7d06736c643d43d714e90">00118</a> <span class="comment"></span>    <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1TheoremProducer.html#a1b12639479f7d06736c643d43d714e90" title="Create a rewrite theorem: lhs = rhs.">newRWTheorem</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; lhs, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; rhs,
<a name="l00119"></a>00119        <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Assumptions.html">Assumptions</a>&amp; assump,
<a name="l00120"></a>00120        <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Proof.html">Proof</a>&amp; pf) {
<a name="l00121"></a>00121       <span class="keywordflow">return</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a>(<a class="code" href="classCVC3_1_1TheoremProducer.html#a27015759e6bdfced928fc5a2d9877b7d">d_tm</a>, lhs, rhs, assump, pf);
<a name="l00122"></a>00122     }
<a name="l00123"></a>00123 <span class="comment"></span>
<a name="l00124"></a>00124 <span class="comment">    //! Create a reflexivity theorem</span>
<a name="l00125"></a><a class="code" href="classCVC3_1_1TheoremProducer.html#a0670b7f9cfb6e1420227b5df652d6e79">00125</a> <span class="comment"></span>    <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1TheoremProducer.html#a0670b7f9cfb6e1420227b5df652d6e79" title="Create a reflexivity theorem.">newReflTheorem</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="l00126"></a>00126       <span class="keywordflow">return</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a>(e);
<a name="l00127"></a>00127     }
<a name="l00128"></a>00128 
<a name="l00129"></a><a class="code" href="classCVC3_1_1TheoremProducer.html#ae6f0d46a632906b24cca2d5f648ae329">00129</a>     <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1TheoremProducer.html#ae6f0d46a632906b24cca2d5f648ae329">newAssumption</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; thm, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Proof.html">Proof</a>&amp; pf, <span class="keywordtype">int</span> scope = -1) {
<a name="l00130"></a>00130       <span class="keywordflow">return</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a>(<a class="code" href="classCVC3_1_1TheoremProducer.html#a27015759e6bdfced928fc5a2d9877b7d">d_tm</a>, thm, <a class="code" href="classCVC3_1_1Assumptions.html#af309a39e2e013cc62b6d94c5812ad86b">Assumptions::emptyAssump</a>(), pf, <span class="keyword">true</span>, scope);
<a name="l00131"></a>00131     }
<a name="l00132"></a>00132 
<a name="l00133"></a><a class="code" href="classCVC3_1_1TheoremProducer.html#aec0760db9fcf381bf3886dbb1801662d">00133</a>     <a class="code" href="classCVC3_1_1Theorem3.html" title="Theorem3.">Theorem3</a> <a class="code" href="classCVC3_1_1TheoremProducer.html#aec0760db9fcf381bf3886dbb1801662d">newTheorem3</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; thm,
<a name="l00134"></a>00134        <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Assumptions.html">Assumptions</a>&amp; assump,
<a name="l00135"></a>00135        <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Proof.html">Proof</a>&amp; pf) {
<a name="l00136"></a>00136       <a class="code" href="debug_8h.html#a600cb2d68efe7cc413cccbb5714c7016">IF_DEBUG</a>(<span class="keywordflow">if</span>(!thm.<a class="code" href="group__ExprPkg.html#gac4af2026c180da0f18d66ac616f61f3a">isEq</a>() &amp;&amp; !thm.<a class="code" href="group__ExprPkg.html#gabe385fb97505cccb75702378511c5375">isIff</a>()) {
<a name="l00137"></a>00137   <a class="code" href="kinds_8h.html#aa10c9e8951b8ccf714a59ec321bdac5ba7fa27e82c6c4f69434225ed81e5d151e">TRACE</a>(<span class="stringliteral">&quot;newTheorem&quot;</span>, <span class="stringliteral">&quot;newTheorem3(&quot;</span>, thm, <span class="stringliteral">&quot;)&quot;</span>);
<a name="l00138"></a>00138   debugger.counter(<span class="stringliteral">&quot;newTheorem3() called on equality&quot;</span>)++;
<a name="l00139"></a>00139       })
<a name="l00140"></a>00140       <span class="keywordflow">return</span> <a class="code" href="classCVC3_1_1Theorem3.html" title="Theorem3.">Theorem3</a>(<a class="code" href="classCVC3_1_1TheoremProducer.html#a27015759e6bdfced928fc5a2d9877b7d">d_tm</a>, thm, assump, pf);
<a name="l00141"></a>00141     }
<a name="l00142"></a>00142 
<a name="l00143"></a><a class="code" href="classCVC3_1_1TheoremProducer.html#aaaca425811ff3137c21a040a8ce1b69e">00143</a>     <a class="code" href="classCVC3_1_1Theorem3.html" title="Theorem3.">Theorem3</a> <a class="code" href="classCVC3_1_1TheoremProducer.html#aaaca425811ff3137c21a040a8ce1b69e">newRWTheorem3</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; lhs, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; rhs,
<a name="l00144"></a>00144          <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Assumptions.html">Assumptions</a>&amp; assump,
<a name="l00145"></a>00145          <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Proof.html">Proof</a>&amp; pf) {
<a name="l00146"></a>00146       <span class="keywordflow">return</span> <a class="code" href="classCVC3_1_1Theorem3.html" title="Theorem3.">Theorem3</a>(<a class="code" href="classCVC3_1_1TheoremProducer.html#a27015759e6bdfced928fc5a2d9877b7d">d_tm</a>, lhs, rhs, assump, pf);
<a name="l00147"></a>00147     }
<a name="l00148"></a>00148 
<a name="l00149"></a>00149     <span class="keywordtype">void</span> <a class="code" href="classCVC3_1_1TheoremProducer.html#a8f74c8badd61cf70ebeb05183c00d608">soundError</a>(<span class="keyword">const</span> std::string&amp; file, <span class="keywordtype">int</span> line,
<a name="l00150"></a>00150         <span class="keyword">const</span> std::string&amp; cond, <span class="keyword">const</span> std::string&amp; msg);
<a name="l00151"></a>00151 
<a name="l00152"></a>00152   <span class="keyword">public</span>:
<a name="l00153"></a>00153     <span class="comment">// Constructor</span>
<a name="l00154"></a>00154     <a class="code" href="classCVC3_1_1TheoremProducer.html#a5b69feb3bf1ce90107295b5731f847d7">TheoremProducer</a>(<a class="code" href="classCVC3_1_1TheoremManager.html">TheoremManager</a> *tm);
<a name="l00155"></a>00155     <span class="comment">// Destructor</span>
<a name="l00156"></a><a class="code" href="classCVC3_1_1TheoremProducer.html#ae21722ca8449f4480e01566982cd4d61">00156</a>     <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1TheoremProducer.html#ae21722ca8449f4480e01566982cd4d61">~TheoremProducer</a>() { }
<a name="l00157"></a>00157 <span class="comment"></span>
<a name="l00158"></a>00158 <span class="comment">    //! Testing whether to generate proofs</span>
<a name="l00159"></a><a class="code" href="classCVC3_1_1TheoremProducer.html#aceb1eeebc6b491b3241f463488471f3a">00159</a> <span class="comment"></span>    <span class="keywordtype">bool</span> <a class="code" href="classCVC3_1_1TheoremProducer.html#aceb1eeebc6b491b3241f463488471f3a" title="Testing whether to generate proofs.">withProof</a>() { <span class="keywordflow">return</span> <a class="code" href="classCVC3_1_1TheoremProducer.html#a27015759e6bdfced928fc5a2d9877b7d">d_tm</a>-&gt;<a class="code" href="classCVC3_1_1TheoremManager.html#a462f27eb0eca420b334354a9ddc7a257">withProof</a>(); }
<a name="l00160"></a>00160 <span class="comment"></span>
<a name="l00161"></a>00161 <span class="comment">    //! Testing whether to generate assumptions</span>
<a name="l00162"></a><a class="code" href="classCVC3_1_1TheoremProducer.html#a32afe6d99e661b5c70082036e40d48bc">00162</a> <span class="comment"></span>    <span class="keywordtype">bool</span> <a class="code" href="classCVC3_1_1TheoremProducer.html#a32afe6d99e661b5c70082036e40d48bc" title="Testing whether to generate assumptions.">withAssumptions</a>() { <span class="keywordflow">return</span> <a class="code" href="classCVC3_1_1TheoremProducer.html#a27015759e6bdfced928fc5a2d9877b7d">d_tm</a>-&gt;<a class="code" href="classCVC3_1_1TheoremManager.html#a0a4f7d2aac078ca32b1dacb5d0af25c4">withAssumptions</a>(); }
<a name="l00163"></a>00163 <span class="comment"></span>
<a name="l00164"></a>00164 <span class="comment">    //! Create a new proof label (bound variable) for an assumption (formula)</span>
<a name="l00165"></a>00165 <span class="comment"></span>    <a class="code" href="classCVC3_1_1Proof.html">Proof</a> <a class="code" href="classCVC3_1_1TheoremProducer.html#af4bdd16428b49f295b3d21208dffc0cd" title="Create a new proof label (bound variable) for an assumption (formula)">newLabel</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="l00166"></a>00166 <span class="comment"></span>
<a name="l00167"></a>00167 <span class="comment">    //////////////////////////////////////////////////////////////////</span>
<a name="l00168"></a>00168 <span class="comment"></span>    <span class="comment">// Functions to create proof terms</span><span class="comment"></span>
<a name="l00169"></a>00169 <span class="comment">    //////////////////////////////////////////////////////////////////</span>
<a name="l00170"></a>00170 <span class="comment"></span>
<a name="l00171"></a>00171     <span class="comment">// Apply a rule named &#39;name&#39; to its arguments, Proofs or Exprs</span>
<a name="l00172"></a>00172     <a class="code" href="classCVC3_1_1Proof.html">Proof</a> <a class="code" href="classCVC3_1_1TheoremProducer.html#a9a8e67b1fb33d5dfe428a659d8c66651">newPf</a>(<span class="keyword">const</span> std::string&amp; name);
<a name="l00173"></a>00173     <a class="code" href="classCVC3_1_1Proof.html">Proof</a> <a class="code" href="classCVC3_1_1TheoremProducer.html#a9a8e67b1fb33d5dfe428a659d8c66651">newPf</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="l00174"></a>00174     <a class="code" href="classCVC3_1_1Proof.html">Proof</a> <a class="code" href="classCVC3_1_1TheoremProducer.html#a9a8e67b1fb33d5dfe428a659d8c66651">newPf</a>(<span class="keyword">const</span> std::string&amp; name, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Proof.html">Proof</a>&amp; pf);
<a name="l00175"></a>00175     <a class="code" href="classCVC3_1_1Proof.html">Proof</a> <a class="code" href="classCVC3_1_1TheoremProducer.html#a9a8e67b1fb33d5dfe428a659d8c66651">newPf</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; 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="l00176"></a>00176     <a class="code" href="classCVC3_1_1Proof.html">Proof</a> <a class="code" href="classCVC3_1_1TheoremProducer.html#a9a8e67b1fb33d5dfe428a659d8c66651">newPf</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, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Proof.html">Proof</a>&amp; pf);
<a name="l00177"></a>00177     <a class="code" href="classCVC3_1_1Proof.html">Proof</a> <a class="code" href="classCVC3_1_1TheoremProducer.html#a9a8e67b1fb33d5dfe428a659d8c66651">newPf</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; e1,
<a name="l00178"></a>00178     <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e2, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e3);
<a name="l00179"></a>00179     <a class="code" href="classCVC3_1_1Proof.html">Proof</a> <a class="code" href="classCVC3_1_1TheoremProducer.html#a9a8e67b1fb33d5dfe428a659d8c66651">newPf</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; e1,
<a name="l00180"></a>00180     <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e2, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Proof.html">Proof</a>&amp; pf);
<a name="l00181"></a>00181 
<a name="l00182"></a>00182     <span class="comment">// Methods with iterators.</span>
<a name="l00183"></a>00183 
<a name="l00184"></a>00184     <span class="comment">// Iterators are preferred to vectors, since they are often</span>
<a name="l00185"></a>00185     <span class="comment">// efficient</span>
<a name="l00186"></a>00186 
<a name="l00187"></a>00187     <a class="code" href="classCVC3_1_1Proof.html">Proof</a> <a class="code" href="classCVC3_1_1TheoremProducer.html#a9a8e67b1fb33d5dfe428a659d8c66651">newPf</a>(<span class="keyword">const</span> std::string&amp; name,
<a name="l00188"></a>00188     <a class="code" href="classCVC3_1_1Expr_1_1iterator.html">Expr::iterator</a> begin, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr_1_1iterator.html">Expr::iterator</a> &amp;end);
<a name="l00189"></a>00189     <a class="code" href="classCVC3_1_1Proof.html">Proof</a> <a class="code" href="classCVC3_1_1TheoremProducer.html#a9a8e67b1fb33d5dfe428a659d8c66651">newPf</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="l00190"></a>00190     <a class="code" href="classCVC3_1_1Expr_1_1iterator.html">Expr::iterator</a> begin, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr_1_1iterator.html">Expr::iterator</a> &amp;end);
<a name="l00191"></a>00191     <a class="code" href="classCVC3_1_1Proof.html">Proof</a> <a class="code" href="classCVC3_1_1TheoremProducer.html#a9a8e67b1fb33d5dfe428a659d8c66651">newPf</a>(<span class="keyword">const</span> std::string&amp; name,
<a name="l00192"></a>00192     <a class="code" href="classCVC3_1_1Expr_1_1iterator.html">Expr::iterator</a> begin, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr_1_1iterator.html">Expr::iterator</a> &amp;end,
<a name="l00193"></a>00193     <span class="keyword">const</span> std::vector&lt;Proof&gt;&amp; pfs);
<a name="l00194"></a>00194 
<a name="l00195"></a>00195     <span class="comment">// Methods with vectors.</span>
<a name="l00196"></a>00196     <a class="code" href="classCVC3_1_1Proof.html">Proof</a> <a class="code" href="classCVC3_1_1TheoremProducer.html#a9a8e67b1fb33d5dfe428a659d8c66651">newPf</a>(<span class="keyword">const</span> std::string&amp; name, <span class="keyword">const</span> std::vector&lt;Expr&gt;&amp; args);
<a name="l00197"></a>00197     <a class="code" href="classCVC3_1_1Proof.html">Proof</a> <a class="code" href="classCVC3_1_1TheoremProducer.html#a9a8e67b1fb33d5dfe428a659d8c66651">newPf</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="l00198"></a>00198     <span class="keyword">const</span> std::vector&lt;Expr&gt;&amp; args);
<a name="l00199"></a>00199     <a class="code" href="classCVC3_1_1Proof.html">Proof</a> <a class="code" href="classCVC3_1_1TheoremProducer.html#a9a8e67b1fb33d5dfe428a659d8c66651">newPf</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="l00200"></a>00200     <span class="keyword">const</span> std::vector&lt;Proof&gt;&amp; pfs);
<a name="l00201"></a>00201     <a class="code" href="classCVC3_1_1Proof.html">Proof</a> <a class="code" href="classCVC3_1_1TheoremProducer.html#a9a8e67b1fb33d5dfe428a659d8c66651">newPf</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; 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="l00202"></a>00202     <span class="keyword">const</span> std::vector&lt;Proof&gt;&amp; pfs);
<a name="l00203"></a>00203     <a class="code" href="classCVC3_1_1Proof.html">Proof</a> <a class="code" href="classCVC3_1_1TheoremProducer.html#a9a8e67b1fb33d5dfe428a659d8c66651">newPf</a>(<span class="keyword">const</span> std::string&amp; name, <span class="keyword">const</span> std::vector&lt;Proof&gt;&amp; pfs);
<a name="l00204"></a>00204     <a class="code" href="classCVC3_1_1Proof.html">Proof</a> <a class="code" href="classCVC3_1_1TheoremProducer.html#a9a8e67b1fb33d5dfe428a659d8c66651">newPf</a>(<span class="keyword">const</span> std::string&amp; name, <span class="keyword">const</span> std::vector&lt;Expr&gt;&amp; args,
<a name="l00205"></a>00205     <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Proof.html">Proof</a>&amp; pf);
<a name="l00206"></a>00206     <a class="code" href="classCVC3_1_1Proof.html">Proof</a> <a class="code" href="classCVC3_1_1TheoremProducer.html#a9a8e67b1fb33d5dfe428a659d8c66651">newPf</a>(<span class="keyword">const</span> std::string&amp; name, <span class="keyword">const</span> std::vector&lt;Expr&gt;&amp; args,
<a name="l00207"></a>00207     <span class="keyword">const</span> std::vector&lt;Proof&gt;&amp; pfs);
<a name="l00208"></a>00208 <span class="comment"></span>
<a name="l00209"></a>00209 <span class="comment">    //! Creating LAMBDA-abstraction (LAMBDA label formula proof)</span>
<a name="l00210"></a>00210 <span class="comment"></span><span class="comment">    /*! The label must be a variable with a formula as a type, and</span>
<a name="l00211"></a>00211 <span class="comment">     * matching the given &quot;frm&quot;. */</span>
<a name="l00212"></a>00212     <a class="code" href="classCVC3_1_1Proof.html">Proof</a> <a class="code" href="classCVC3_1_1TheoremProducer.html#a9a8e67b1fb33d5dfe428a659d8c66651">newPf</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Proof.html">Proof</a>&amp; label, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; frm, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Proof.html">Proof</a>&amp; pf);
<a name="l00213"></a>00213 <span class="comment"></span>
<a name="l00214"></a>00214 <span class="comment">    //! Creating LAMBDA-abstraction (LAMBDA label proof).</span>
<a name="l00215"></a>00215 <span class="comment"></span><span class="comment">    /*! The label must be a variable with a formula as a type. */</span>
<a name="l00216"></a>00216     <a class="code" href="classCVC3_1_1Proof.html">Proof</a> <a class="code" href="classCVC3_1_1TheoremProducer.html#a9a8e67b1fb33d5dfe428a659d8c66651">newPf</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Proof.html">Proof</a>&amp; label, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Proof.html">Proof</a>&amp; pf);
<a name="l00217"></a>00217 <span class="comment"></span>
<a name="l00218"></a>00218 <span class="comment">    /*! @brief Similarly, multi-argument lambda-abstractions:</span>
<a name="l00219"></a>00219 <span class="comment">     * (LAMBDA (u1,...,un): (f1,...,fn). pf) */</span>
<a name="l00220"></a>00220     <a class="code" href="classCVC3_1_1Proof.html">Proof</a> <a class="code" href="classCVC3_1_1TheoremProducer.html#a9a8e67b1fb33d5dfe428a659d8c66651">newPf</a>(<span class="keyword">const</span> std::vector&lt;Proof&gt;&amp; labels,
<a name="l00221"></a>00221     <span class="keyword">const</span> std::vector&lt;Expr&gt;&amp; frms,
<a name="l00222"></a>00222     <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Proof.html">Proof</a>&amp; pf);
<a name="l00223"></a>00223 
<a name="l00224"></a>00224     <a class="code" href="classCVC3_1_1Proof.html">Proof</a> <a class="code" href="classCVC3_1_1TheoremProducer.html#a9a8e67b1fb33d5dfe428a659d8c66651">newPf</a>(<span class="keyword">const</span> std::vector&lt;Proof&gt;&amp; labels,
<a name="l00225"></a>00225     <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Proof.html">Proof</a>&amp; pf);
<a name="l00226"></a>00226 
<a name="l00227"></a>00227   }; <span class="comment">// end of Theorem_Producer class</span>
<a name="l00228"></a>00228 
<a name="l00229"></a>00229 }  <span class="comment">// end of namespace CVC3</span>
<a name="l00230"></a>00230 <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>