Sophie

Sophie

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

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: TReturn.cpp 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">TReturn.cpp</div>  </div>
</div>
<div class="contents">
<a href="TReturn_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#include &quot;<a class="code" href="TReturn_8h.html">TReturn.h</a>&quot;</span>
<a name="l00002"></a>00002 
<a name="l00003"></a>00003 <span class="preprocessor">#include &quot;<a class="code" href="LFSCUtilProof_8h.html">LFSCUtilProof.h</a>&quot;</span>
<a name="l00004"></a>00004 <span class="preprocessor">#include &quot;<a class="code" href="LFSCLraProof_8h.html">LFSCLraProof.h</a>&quot;</span>
<a name="l00005"></a>00005 <span class="preprocessor">#include &quot;<a class="code" href="LFSCBoolProof_8h.html">LFSCBoolProof.h</a>&quot;</span>
<a name="l00006"></a>00006 <span class="preprocessor">#include &quot;<a class="code" href="LFSCPrinter_8h.html">LFSCPrinter.h</a>&quot;</span>
<a name="l00007"></a>00007 
<a name="l00008"></a><a class="code" href="classTReturn.html#a9554576fa26fd8e19942ff4a2f566bbf">00008</a> <a class="code" href="classTReturn.html#a9554576fa26fd8e19942ff4a2f566bbf">TReturn::TReturn</a>(<a class="code" href="classLFSCProof.html">LFSCProof</a>* lfsc_pf, std::vector&lt;int&gt;&amp; L, std::vector&lt;int&gt;&amp; Lused, <a class="code" href="classCVC3_1_1Rational.html">Rational</a> r, <span class="keywordtype">bool</span> hasR, <span class="keywordtype">int</span> pvY):
<a name="l00009"></a>00009                 d_lfsc_pf(lfsc_pf), d_c( r ), d_provesY(pvY){
<a name="l00010"></a>00010   <a class="code" href="classTReturn.html#a3aeca59a077b015fe579ad447ac94e29">d_hasRt</a> = hasR;
<a name="l00011"></a>00011   <span class="keywordflow">for</span>( <span class="keywordtype">int</span> a=0; a&lt;(int)L.size(); a++ )
<a name="l00012"></a>00012     <a class="code" href="classTReturn.html#a7b8e49b2d097ca45103e11e0dd2019aa">d_L</a>.push_back( L[a] );
<a name="l00013"></a>00013   <span class="keywordflow">for</span>( <span class="keywordtype">int</span> a=0; a&lt;(int)Lused.size(); a++ )
<a name="l00014"></a>00014     <a class="code" href="classTReturn.html#ab2e40626799f04887f80159b0d74521a">d_L_used</a>.push_back( Lused[a] );
<a name="l00015"></a>00015 
<a name="l00016"></a>00016 <span class="preprocessor">#ifdef DEBUG_MEM_STATS</span>
<a name="l00017"></a>00017 <span class="preprocessor"></span>  <span class="keyword">static</span> <span class="keywordtype">int</span> counter = 0;
<a name="l00018"></a>00018   counter++;
<a name="l00019"></a>00019   cout &lt;&lt; <span class="stringliteral">&quot;make a tret &quot;</span> &lt;&lt; counter &lt;&lt; <a class="code" href="group__ExprStream__Manip.html#ga05b0ea7353ec24fa8e7e272d7a7875d8" title="Print the end-of-line.">std::endl</a>;
<a name="l00020"></a>00020 <span class="preprocessor">#endif</span>
<a name="l00021"></a>00021 <span class="preprocessor"></span>  <a class="code" href="classTReturn.html#aa05c68c3ad6926cb6bd48335092c9c4e">lcalced</a> = <span class="keyword">false</span>;
<a name="l00022"></a>00022 }
<a name="l00023"></a>00023 
<a name="l00024"></a><a class="code" href="classTReturn.html#ac7a0e50d750845a8cfd72bc9faf4949d">00024</a> <a class="code" href="classCVC3_1_1Rational.html">Rational</a> <a class="code" href="classTReturn.html#ac7a0e50d750845a8cfd72bc9faf4949d">TReturn::mult_rational</a>( <a class="code" href="classTReturn.html">TReturn</a>* lhs )
<a name="l00025"></a>00025 {
<a name="l00026"></a>00026   <span class="keywordflow">if</span>( !<a class="code" href="classTReturn.html#abae84e878863b3a6978d7dde0d52522a">hasRational</a>() &amp;&amp; lhs-&gt;<a class="code" href="classTReturn.html#abae84e878863b3a6978d7dde0d52522a">hasRational</a>() )
<a name="l00027"></a>00027     <span class="keywordflow">return</span> lhs-&gt;<a class="code" href="classTReturn.html#ac7a0e50d750845a8cfd72bc9faf4949d">mult_rational</a>( <span class="keyword">this</span> );
<a name="l00028"></a>00028   <span class="keywordflow">else</span> <span class="keywordflow">if</span>( <a class="code" href="classTReturn.html#abae84e878863b3a6978d7dde0d52522a">hasRational</a>() ){
<a name="l00029"></a>00029     <span class="keywordflow">if</span>( lhs-&gt;<a class="code" href="classTReturn.html#abae84e878863b3a6978d7dde0d52522a">hasRational</a>() )
<a name="l00030"></a>00030       <span class="keywordflow">return</span> <a class="code" href="classTReturn.html#a2306f247630ba7d133db2e63651a584a">d_c</a>*lhs-&gt;<a class="code" href="classTReturn.html#a2306f247630ba7d133db2e63651a584a">d_c</a>;
<a name="l00031"></a>00031     <span class="keywordflow">else</span>
<a name="l00032"></a>00032       <span class="keywordflow">return</span> <a class="code" href="classTReturn.html#a2306f247630ba7d133db2e63651a584a">d_c</a>;
<a name="l00033"></a>00033   }<span class="keywordflow">else</span>
<a name="l00034"></a>00034     <span class="keywordflow">return</span> lhs-&gt;<a class="code" href="classTReturn.html#a2306f247630ba7d133db2e63651a584a">d_c</a>;
<a name="l00035"></a>00035 }
<a name="l00036"></a>00036 
<a name="l00037"></a><a class="code" href="classTReturn.html#ab5fe603ed277f47bdc014df335f33a44">00037</a> <span class="keywordtype">void</span> <a class="code" href="classTReturn.html#ab5fe603ed277f47bdc014df335f33a44">TReturn::getL</a>( std::vector&lt; int &gt;&amp; lget, std::vector&lt; int &gt;&amp; lgetu ){
<a name="l00038"></a>00038 <span class="preprocessor">#ifndef OPTIMIZE</span>
<a name="l00039"></a>00039 <span class="preprocessor"></span>  std::vector&lt; int &gt;::iterator i;
<a name="l00040"></a>00040   <span class="keywordflow">for</span>( <span class="keywordtype">int</span> a=0; a&lt;(int)<a class="code" href="classTReturn.html#a7b8e49b2d097ca45103e11e0dd2019aa">d_L</a>.size(); a++ ){
<a name="l00041"></a>00041     i = std::find( lget.begin(), lget.end(), <a class="code" href="classTReturn.html#a7b8e49b2d097ca45103e11e0dd2019aa">d_L</a>[a] );
<a name="l00042"></a>00042     <span class="keywordflow">if</span>( i==lget.end() ){
<a name="l00043"></a>00043       lget.push_back( <a class="code" href="classTReturn.html#a7b8e49b2d097ca45103e11e0dd2019aa">d_L</a>[a] );
<a name="l00044"></a>00044     }
<a name="l00045"></a>00045   }
<a name="l00046"></a>00046   <span class="keywordflow">for</span>( <span class="keywordtype">int</span> a=0; a&lt;(int)<a class="code" href="classTReturn.html#ab2e40626799f04887f80159b0d74521a">d_L_used</a>.size(); a++ ){
<a name="l00047"></a>00047     i = std::find( lgetu.begin(), lgetu.end(), <a class="code" href="classTReturn.html#ab2e40626799f04887f80159b0d74521a">d_L_used</a>[a] );
<a name="l00048"></a>00048     <span class="keywordflow">if</span>( i==lgetu.end() ){
<a name="l00049"></a>00049       lgetu.push_back( <a class="code" href="classTReturn.html#ab2e40626799f04887f80159b0d74521a">d_L_used</a>[a] );
<a name="l00050"></a>00050     }
<a name="l00051"></a>00051   }
<a name="l00052"></a>00052 <span class="preprocessor">#endif</span>
<a name="l00053"></a>00053 <span class="preprocessor"></span>}
<a name="l00054"></a>00054 
<a name="l00055"></a>00055 <span class="preprocessor">#ifdef OPTIMIZE</span>
<a name="l00056"></a>00056 <span class="preprocessor"></span><span class="keywordtype">void</span> TReturn::calcL( std::vector&lt; int &gt;&amp; lget, std::vector&lt; int &gt;&amp; lgetu ){
<a name="l00057"></a>00057   <span class="keywordflow">if</span>( !<a class="code" href="classTReturn.html#aa05c68c3ad6926cb6bd48335092c9c4e">lcalced</a> ){
<a name="l00058"></a>00058     <a class="code" href="classTReturn.html#a7b8e49b2d097ca45103e11e0dd2019aa">d_L</a>.clear();
<a name="l00059"></a>00059     <a class="code" href="classTReturn.html#ab2e40626799f04887f80159b0d74521a">d_L_used</a>.clear();
<a name="l00060"></a>00060     <a class="code" href="classTReturn.html#a934ee85a303379f5c699b88be35224ad">d_lfsc_pf</a>-&gt;calcL( <a class="code" href="classTReturn.html#a7b8e49b2d097ca45103e11e0dd2019aa">d_L</a>, <a class="code" href="classTReturn.html#ab2e40626799f04887f80159b0d74521a">d_L_used</a> );
<a name="l00061"></a>00061     <a class="code" href="classTReturn.html#aa05c68c3ad6926cb6bd48335092c9c4e">lcalced</a> = <span class="keyword">true</span>;
<a name="l00062"></a>00062   }
<a name="l00063"></a>00063   std::vector&lt; int &gt;::iterator i;
<a name="l00064"></a>00064   <span class="keywordflow">for</span>( <span class="keywordtype">int</span> a=0; a&lt;(int)<a class="code" href="classTReturn.html#a7b8e49b2d097ca45103e11e0dd2019aa">d_L</a>.size(); a++ ){
<a name="l00065"></a>00065     i = std::find( lget.begin(), lget.end(), <a class="code" href="classTReturn.html#a7b8e49b2d097ca45103e11e0dd2019aa">d_L</a>[a] );
<a name="l00066"></a>00066     <span class="keywordflow">if</span>( i==lget.end() ){
<a name="l00067"></a>00067       lget.push_back( <a class="code" href="classTReturn.html#a7b8e49b2d097ca45103e11e0dd2019aa">d_L</a>[a] );
<a name="l00068"></a>00068     }
<a name="l00069"></a>00069   }
<a name="l00070"></a>00070   <span class="keywordflow">for</span>( <span class="keywordtype">int</span> a=0; a&lt;(int)<a class="code" href="classTReturn.html#ab2e40626799f04887f80159b0d74521a">d_L_used</a>.size(); a++ ){
<a name="l00071"></a>00071     i = std::find( lgetu.begin(), lgetu.end(), <a class="code" href="classTReturn.html#ab2e40626799f04887f80159b0d74521a">d_L_used</a>[a] );
<a name="l00072"></a>00072     <span class="keywordflow">if</span>( i==lgetu.end() ){
<a name="l00073"></a>00073       lgetu.push_back( <a class="code" href="classTReturn.html#ab2e40626799f04887f80159b0d74521a">d_L_used</a>[a] );
<a name="l00074"></a>00074     }
<a name="l00075"></a>00075   }
<a name="l00076"></a>00076 }
<a name="l00077"></a>00077 <span class="preprocessor">#endif</span>
<a name="l00078"></a>00078 <span class="preprocessor"></span>
<a name="l00079"></a>00079 
<a name="l00080"></a>00080 <span class="comment">// make it so that the two TReturns agree on what they are proving</span>
<a name="l00081"></a>00081 <span class="comment">// t1 proves pf1, Y( pf1 ), or Y2( pf1 )</span>
<a name="l00082"></a>00082 <span class="comment">// t2 proves pf2, Y( pf2 ), or Y2( pf2 )</span>
<a name="l00083"></a>00083 <span class="comment">// on return, t1-&gt;d_proveY should equal t2-&gt;d_proveY</span>
<a name="l00084"></a><a class="code" href="classTReturn.html#adf5d458ca36004015a91b8be7dbd341b">00084</a> <span class="keywordtype">int</span> <a class="code" href="classTReturn.html#adf5d458ca36004015a91b8be7dbd341b">TReturn::normalize_tret</a>( <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; pf1, <a class="code" href="classTReturn.html">TReturn</a>*&amp; t1, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; pf2, <a class="code" href="classTReturn.html">TReturn</a>*&amp; t2, <span class="keywordtype">bool</span> rev_pol )
<a name="l00085"></a>00085 {
<a name="l00086"></a>00086   <span class="keywordflow">if</span>( t1-&gt;<a class="code" href="classTReturn.html#adfcacf33921f81fe720ef5b30b184153">getProvesY</a>()!=t2-&gt;<a class="code" href="classTReturn.html#adfcacf33921f81fe720ef5b30b184153">getProvesY</a>() )
<a name="l00087"></a>00087   {
<a name="l00088"></a>00088     <span class="keywordflow">if</span>( t1-&gt;<a class="code" href="classTReturn.html#adfcacf33921f81fe720ef5b30b184153">getProvesY</a>()&gt;t2-&gt;<a class="code" href="classTReturn.html#adfcacf33921f81fe720ef5b30b184153">getProvesY</a>() )
<a name="l00089"></a>00089       <span class="keywordflow">return</span> <a class="code" href="classTReturn.html#adf5d458ca36004015a91b8be7dbd341b">normalize_tret</a>( pf2, t2, pf1, t1, rev_pol );
<a name="l00090"></a>00090     <span class="keywordflow">else</span>
<a name="l00091"></a>00091     {
<a name="l00092"></a>00092       <span class="keywordflow">if</span>( <a class="code" href="classLFSCObj.html#ac43ede316cf83e0eb037d3f5291f4074">debug_conv</a> )
<a name="l00093"></a>00093         cout &lt;&lt; <span class="stringliteral">&quot;normalizing proofs &quot;</span> &lt;&lt; t1-&gt;<a class="code" href="classTReturn.html#adfcacf33921f81fe720ef5b30b184153">getProvesY</a>() &lt;&lt; <span class="stringliteral">&quot; &quot;</span> &lt;&lt; t2-&gt;<a class="code" href="classTReturn.html#adfcacf33921f81fe720ef5b30b184153">getProvesY</a>() &lt;&lt; <span class="stringliteral">&quot; &quot;</span> &lt;&lt; rev_pol &lt;&lt; <a class="code" href="group__ExprStream__Manip.html#ga05b0ea7353ec24fa8e7e272d7a7875d8" title="Print the end-of-line.">std::endl</a>;
<a name="l00094"></a>00094 
<a name="l00095"></a>00095       <span class="keywordflow">if</span>( t1-&gt;<a class="code" href="classTReturn.html#adfcacf33921f81fe720ef5b30b184153">getProvesY</a>()==0 &amp;&amp; t2-&gt;<a class="code" href="classTReturn.html#adfcacf33921f81fe720ef5b30b184153">getProvesY</a>()==2 )
<a name="l00096"></a>00096         <a class="code" href="classTReturn.html#a76fa4cdab1d66c56bc96d3630150f030">normalize_tr</a>( pf1, t1, 2, rev_pol );
<a name="l00097"></a>00097       <span class="keywordflow">if</span>( t1-&gt;<a class="code" href="classTReturn.html#adfcacf33921f81fe720ef5b30b184153">getProvesY</a>()==1 &amp;&amp; t2-&gt;<a class="code" href="classTReturn.html#adfcacf33921f81fe720ef5b30b184153">getProvesY</a>()==2 )
<a name="l00098"></a>00098         <a class="code" href="classTReturn.html#a76fa4cdab1d66c56bc96d3630150f030">normalize_tr</a>( pf1, t1, 2, rev_pol );
<a name="l00099"></a>00099       <span class="keywordflow">if</span>( t1-&gt;<a class="code" href="classTReturn.html#adfcacf33921f81fe720ef5b30b184153">getProvesY</a>()==0 &amp;&amp; t2-&gt;<a class="code" href="classTReturn.html#adfcacf33921f81fe720ef5b30b184153">getProvesY</a>()==1 ){
<a name="l00100"></a>00100         <span class="keywordflow">if</span>( <a class="code" href="classTReturn.html#a76fa4cdab1d66c56bc96d3630150f030">normalize_tr</a>( pf1, t1, 1, rev_pol, <span class="keyword">false</span> )==-1 ){     <span class="comment">//try to go 0 to 1 (optional)</span>
<a name="l00101"></a>00101           <span class="keywordflow">if</span>( <a class="code" href="classTReturn.html#a76fa4cdab1d66c56bc96d3630150f030">normalize_tr</a>( pf2, t2, 0, rev_pol, <span class="keyword">false</span> )==-1 ){   <span class="comment">//try to go 1 to 0 immediately (optional)</span>
<a name="l00102"></a>00102             <a class="code" href="classTReturn.html#a76fa4cdab1d66c56bc96d3630150f030">normalize_tr</a>( pf1, t1, 2, rev_pol );
<a name="l00103"></a>00103             <a class="code" href="classTReturn.html#a76fa4cdab1d66c56bc96d3630150f030">normalize_tr</a>( pf2, t2, 2, rev_pol );
<a name="l00104"></a>00104           }
<a name="l00105"></a>00105         }
<a name="l00106"></a>00106       }
<a name="l00107"></a>00107       <span class="keywordflow">if</span>( t2-&gt;<a class="code" href="classTReturn.html#adfcacf33921f81fe720ef5b30b184153">getProvesY</a>()==3 ){
<a name="l00108"></a>00108         <a class="code" href="classTReturn.html#a76fa4cdab1d66c56bc96d3630150f030">normalize_tr</a>( pf1, t1, 3, rev_pol );
<a name="l00109"></a>00109       }
<a name="l00110"></a>00110 
<a name="l00111"></a>00111       <span class="keywordflow">if</span>( t1-&gt;<a class="code" href="classTReturn.html#adfcacf33921f81fe720ef5b30b184153">getProvesY</a>()!=t2-&gt;<a class="code" href="classTReturn.html#adfcacf33921f81fe720ef5b30b184153">getProvesY</a>() ){
<a name="l00112"></a>00112         ostringstream os;
<a name="l00113"></a>00113         os &lt;&lt; <span class="stringliteral">&quot;ERROR:normalize_tret: Could not normalize proofs &quot;</span> &lt;&lt; t1-&gt;<a class="code" href="classTReturn.html#adfcacf33921f81fe720ef5b30b184153">getProvesY</a>() &lt;&lt; <span class="stringliteral">&quot; &quot;</span> &lt;&lt; t2-&gt;<a class="code" href="classTReturn.html#adfcacf33921f81fe720ef5b30b184153">getProvesY</a>() &lt;&lt; <a class="code" href="group__ExprStream__Manip.html#ga05b0ea7353ec24fa8e7e272d7a7875d8" title="Print the end-of-line.">std::endl</a>;
<a name="l00114"></a>00114         os &lt;&lt; pf1[0] &lt;&lt; <span class="stringliteral">&quot; &quot;</span> &lt;&lt; pf2[0] &lt;&lt; <a class="code" href="group__ExprStream__Manip.html#ga05b0ea7353ec24fa8e7e272d7a7875d8" title="Print the end-of-line.">std::endl</a>;
<a name="l00115"></a>00115         <a class="code" href="classObj.html#a7a13d6281d09d895f9db31157fe62f0d">print_error</a>( os.str().c_str(), cout );
<a name="l00116"></a>00116         <span class="keywordflow">return</span> -1;
<a name="l00117"></a>00117       }<span class="keywordflow">else</span>{
<a name="l00118"></a>00118         <span class="keywordflow">return</span> t1-&gt;<a class="code" href="classTReturn.html#adfcacf33921f81fe720ef5b30b184153">getProvesY</a>();
<a name="l00119"></a>00119       }
<a name="l00120"></a>00120     }
<a name="l00121"></a>00121   }
<a name="l00122"></a>00122   <span class="keywordflow">return</span> t1-&gt;<a class="code" href="classTReturn.html#adfcacf33921f81fe720ef5b30b184153">getProvesY</a>();
<a name="l00123"></a>00123 }
<a name="l00124"></a>00124  
<a name="l00125"></a><a class="code" href="classTReturn.html#a76fa4cdab1d66c56bc96d3630150f030">00125</a> <span class="keywordtype">int</span> <a class="code" href="classTReturn.html#a76fa4cdab1d66c56bc96d3630150f030">TReturn::normalize_tr</a>( <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; pf1, <a class="code" href="classTReturn.html">TReturn</a>*&amp; t1, <span class="keywordtype">int</span> y, <span class="keywordtype">bool</span> rev_pol, <span class="keywordtype">bool</span> printErr )
<a name="l00126"></a>00126 {
<a name="l00127"></a>00127   <a class="code" href="classTReturn.html">TReturn</a>* torig = t1;
<a name="l00128"></a>00128 
<a name="l00129"></a>00129   <span class="keywordtype">int</span> chOp = t1-&gt;<a class="code" href="classTReturn.html#a75ec103851040bcd454dde054227a3c2">getLFSCProof</a>()-&gt;<a class="code" href="classLFSCProof.html#a6b95ef9fff90f5410755fdb628c6897c">getChOp</a>();
<a name="l00130"></a>00130   std::vector&lt; int &gt; emptyL;
<a name="l00131"></a>00131   std::vector&lt; int &gt; emptyLUsed;
<a name="l00132"></a>00132   t1-&gt;<a class="code" href="classTReturn.html#ab5fe603ed277f47bdc014df335f33a44">getL</a>( emptyL, emptyLUsed );
<a name="l00133"></a>00133 
<a name="l00134"></a>00134   <span class="keywordflow">if</span>( t1-&gt;<a class="code" href="classTReturn.html#adfcacf33921f81fe720ef5b30b184153">getProvesY</a>()!=y )
<a name="l00135"></a>00135   {
<a name="l00136"></a>00136     <span class="keywordflow">if</span>( <a class="code" href="classLFSCObj.html#ac43ede316cf83e0eb037d3f5291f4074">debug_conv</a> ){
<a name="l00137"></a>00137       cout &lt;&lt; <span class="stringliteral">&quot;normalizing tr &quot;</span> &lt;&lt; t1-&gt;<a class="code" href="classTReturn.html#adfcacf33921f81fe720ef5b30b184153">getProvesY</a>() &lt;&lt; <span class="stringliteral">&quot; to &quot;</span> &lt;&lt; y &lt;&lt; <span class="stringliteral">&quot; rev_pol = &quot;</span> &lt;&lt; rev_pol &lt;&lt; <a class="code" href="group__ExprStream__Manip.html#ga05b0ea7353ec24fa8e7e272d7a7875d8" title="Print the end-of-line.">std::endl</a>;
<a name="l00138"></a>00138     }
<a name="l00139"></a>00139     <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> e;
<a name="l00140"></a>00140     <span class="keywordflow">if</span>( <a class="code" href="classLFSCObj.html#a99916378da692faa903591fd5e460c69">what_is_proven</a>( pf1, e ) )
<a name="l00141"></a>00141     {
<a name="l00142"></a>00142       e = <a class="code" href="classLFSCObj.html#af30e3e73af0d18b0775f0ccc6ddb9441">queryElimNotNot</a>( e );
<a name="l00143"></a>00143       <span class="keywordflow">if</span>( rev_pol ){
<a name="l00144"></a>00144         <span class="keywordflow">if</span>( e.<a class="code" href="group__ExprPkg.html#gabe385fb97505cccb75702378511c5375">isIff</a>() ){
<a name="l00145"></a>00145           <span class="comment">//cout &lt;&lt; &quot;Warning: rev_pol called on IFF, 0 normalize to &quot; &lt;&lt; y &lt;&lt; std::endl;</span>
<a name="l00146"></a>00146           e = <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>( <a class="code" href="kinds_8h.html#aa10c9e8951b8ccf714a59ec321bdac5ba527cb185631442655c4486d51522b5a7">IFF</a>, e[1], e[0] );
<a name="l00147"></a>00147         }<span class="keywordflow">else</span> <span class="keywordflow">if</span>( e.<a class="code" href="group__ExprPkg.html#ga9067c706c6454ea1761ace7d7837af46">isImpl</a>() ){
<a name="l00148"></a>00148           e = <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>( <a class="code" href="kinds_8h.html#aa10c9e8951b8ccf714a59ec321bdac5ba7338bb59b9aa936104a6d2f631d4d8db">IMPLIES</a>, e[1], e[0] );
<a name="l00149"></a>00149         }
<a name="l00150"></a>00150       }
<a name="l00151"></a>00151       <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> eb = <a class="code" href="classLFSCObj.html#a024a42781132867e23a7f6e65e6d0f98">queryAtomic</a>( e, <span class="keyword">true</span> );
<a name="l00152"></a>00152       <span class="keywordflow">if</span>( y==3 )
<a name="l00153"></a>00153       {
<a name="l00154"></a>00154         <span class="keywordflow">if</span>( t1-&gt;<a class="code" href="classTReturn.html#adfcacf33921f81fe720ef5b30b184153">getProvesY</a>()!=2 ){
<a name="l00155"></a>00155           <span class="keywordflow">if</span>( <a class="code" href="classTReturn.html#a76fa4cdab1d66c56bc96d3630150f030">normalize_tr</a>( pf1, t1, 2, rev_pol )==-1 ){
<a name="l00156"></a>00156             <span class="keywordflow">return</span> -1;
<a name="l00157"></a>00157           }
<a name="l00158"></a>00158         }
<a name="l00159"></a>00159         <span class="keywordflow">if</span>( e.<a class="code" href="group__ExprPkg.html#gabe385fb97505cccb75702378511c5375">isIff</a>() ){
<a name="l00160"></a>00160           e = <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>( <a class="code" href="kinds_8h.html#aa10c9e8951b8ccf714a59ec321bdac5ba7338bb59b9aa936104a6d2f631d4d8db">IMPLIES</a>, e[0], e[1] );
<a name="l00161"></a>00161         }
<a name="l00162"></a>00162         <span class="comment">//clausify what t1 is proving</span>
<a name="l00163"></a>00163         t1 = <span class="keyword">new</span> <a class="code" href="classTReturn.html#a9554576fa26fd8e19942ff4a2f566bbf">TReturn</a>( <a class="code" href="classLFSCClausify.html#a976ffe7504641550090b29a9b5cf5732">LFSCClausify::Make</a>( e, t1-&gt;<a class="code" href="classTReturn.html#a75ec103851040bcd454dde054227a3c2">getLFSCProof</a>() ), emptyL, emptyLUsed, <a class="code" href="classLFSCObj.html#a379c9c653101afe6c2db9c58cd4c81e1">nullRat</a>, <span class="keyword">false</span>, 3 );
<a name="l00164"></a>00164       }
<a name="l00165"></a>00165       <span class="keywordflow">else</span> <span class="keywordflow">if</span>( y==1 )
<a name="l00166"></a>00166       {
<a name="l00167"></a>00167         <span class="keywordflow">if</span>( t1-&gt;<a class="code" href="classTReturn.html#adfcacf33921f81fe720ef5b30b184153">getProvesY</a>()==0 || t1-&gt;<a class="code" href="classTReturn.html#adfcacf33921f81fe720ef5b30b184153">getProvesY</a>()==2 ){
<a name="l00168"></a>00168           <span class="keywordflow">if</span>( <a class="code" href="classLFSCObj.html#a38fba3c1b92848531100ff1a0f2c0e6a">can_pnorm</a>( eb ) )
<a name="l00169"></a>00169           {
<a name="l00170"></a>00170             t1 = <span class="keyword">new</span> <a class="code" href="classTReturn.html#a9554576fa26fd8e19942ff4a2f566bbf">TReturn</a>( <a class="code" href="classLFSCLraPoly.html#ac525239ecb136141bfa7e2b2f2b0391d">LFSCLraPoly::Make</a>( e, t1-&gt;<a class="code" href="classTReturn.html#a75ec103851040bcd454dde054227a3c2">getLFSCProof</a>() ), emptyL, emptyLUsed,
<a name="l00171"></a>00171                               t1-&gt;<a class="code" href="classTReturn.html#afc199e16f310243abfdf0f08f248401b">getRational</a>(), t1-&gt;<a class="code" href="classTReturn.html#abae84e878863b3a6978d7dde0d52522a">hasRational</a>(), 1 );
<a name="l00172"></a>00172           }<span class="keywordflow">else</span>{
<a name="l00173"></a>00173             <span class="comment">//cout &lt;&lt; &quot;nrt kind = &quot; &lt;&lt; kind_to_str( eb.getKind() ) &lt;&lt; std::endl;</span>
<a name="l00174"></a>00174           }
<a name="l00175"></a>00175         }
<a name="l00176"></a>00176       }
<a name="l00177"></a>00177       <span class="keywordflow">else</span> <span class="keywordflow">if</span>( y==0 )
<a name="l00178"></a>00178       {
<a name="l00179"></a>00179         <span class="keywordflow">if</span>( <a class="code" href="Util_8cpp.html#a5462f02c7d83367f4d9e1b99f1975cb7">is_eq_kind</a>( eb.<a class="code" href="group__ExprPkg.html#ga7814e4f55f65c7ca860c637413df5f4d">getKind</a>() ) ){
<a name="l00180"></a>00180           <a class="code" href="classTReturn.html#a4cb0fc0f38683bd372e4111771c273ef">normalize_to_tf</a>( e, t1, 0 );
<a name="l00181"></a>00181         }<span class="keywordflow">else</span> <span class="keywordflow">if</span>( e[0]==e[1] ){
<a name="l00182"></a>00182           ostringstream os1, os2;
<a name="l00183"></a>00183           os1 &lt;&lt; <span class="stringliteral">&quot;(iff_refl &quot;</span>;
<a name="l00184"></a>00184           <a class="code" href="classRefPtr.html">RefPtr&lt; LFSCProof &gt;</a> p = <a class="code" href="classLFSCProofExpr.html#a5889c9d07ff4346fe7cd9533a236839a">LFSCProofExpr::Make</a>( e[0] );
<a name="l00185"></a>00185           os2 &lt;&lt; <span class="stringliteral">&quot;)&quot;</span>;
<a name="l00186"></a>00186           t1 = <span class="keyword">new</span> <a class="code" href="classTReturn.html#a9554576fa26fd8e19942ff4a2f566bbf">TReturn</a>( <a class="code" href="classLFSCProofGeneric.html#a1bf5343c88454d1ffb552a3e2f59ddc8">LFSCProofGeneric::Make</a>( os1.str(), p.<a class="code" href="classRefPtr.html#a2b987fbb75b20a1da1bd959325635e7e">get</a>(), os2.str() ),
<a name="l00187"></a>00187                             emptyL, emptyLUsed, <a class="code" href="classLFSCObj.html#a379c9c653101afe6c2db9c58cd4c81e1">nullRat</a>, <span class="keyword">false</span>, 0 );
<a name="l00188"></a>00188         }<span class="keywordflow">else</span>{
<a name="l00189"></a>00189           <span class="keywordflow">if</span>( t1-&gt;<a class="code" href="classTReturn.html#adfcacf33921f81fe720ef5b30b184153">getProvesY</a>()==1 ){
<a name="l00190"></a>00190 <span class="preprocessor">#ifdef PRINT_MAJOR_METHODS</span>
<a name="l00191"></a>00191 <span class="preprocessor"></span>            cout &lt;&lt; <span class="stringliteral">&quot;;[M]: Normalize 1 to 0, iff&quot;</span> &lt;&lt; <a class="code" href="group__ExprStream__Manip.html#ga05b0ea7353ec24fa8e7e272d7a7875d8" title="Print the end-of-line.">std::endl</a>;
<a name="l00192"></a>00192 <span class="preprocessor">#endif</span>
<a name="l00193"></a>00193 <span class="preprocessor"></span>            <span class="keywordflow">if</span>( e[1].isFalse() )
<a name="l00194"></a>00194             {
<a name="l00195"></a>00195               <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> ea = <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>( <a class="code" href="kinds_8h.html#aa10c9e8951b8ccf714a59ec321bdac5ba0378ebc895849163b249d0b330257dd6">NOT</a>, e[0] );
<a name="l00196"></a>00196               <a class="code" href="classTReturn.html#a4cb0fc0f38683bd372e4111771c273ef">normalize_to_tf</a>( ea, t1, 0 );
<a name="l00197"></a>00197               ostringstream os1, os2;
<a name="l00198"></a>00198               os1 &lt;&lt; <span class="stringliteral">&quot;(&quot;</span> &lt;&lt; ( e[0].<a class="code" href="group__ExprPkg.html#ga7814e4f55f65c7ca860c637413df5f4d">getKind</a>()==<a class="code" href="kinds_8h.html#aa10c9e8951b8ccf714a59ec321bdac5ba0378ebc895849163b249d0b330257dd6">NOT</a> ? <span class="stringliteral">&quot;not_to_iff&quot;</span> : <span class="stringliteral">&quot;iff_not_false&quot;</span> );
<a name="l00199"></a>00199               os1 &lt;&lt; <span class="stringliteral">&quot; _ &quot;</span>;
<a name="l00200"></a>00200               os2 &lt;&lt; <span class="stringliteral">&quot;)&quot;</span>;
<a name="l00201"></a>00201               t1 = <span class="keyword">new</span> <a class="code" href="classTReturn.html#a9554576fa26fd8e19942ff4a2f566bbf">TReturn</a>( <a class="code" href="classLFSCProofGeneric.html#a1bf5343c88454d1ffb552a3e2f59ddc8">LFSCProofGeneric::Make</a>( os1.str(), t1-&gt;<a class="code" href="classTReturn.html#a75ec103851040bcd454dde054227a3c2">getLFSCProof</a>(), os2.str() ), 
<a name="l00202"></a>00202                                 emptyL, emptyLUsed, <a class="code" href="classLFSCObj.html#a379c9c653101afe6c2db9c58cd4c81e1">nullRat</a>, <span class="keyword">false</span>, 0 );
<a name="l00203"></a>00203             }
<a name="l00204"></a>00204             <span class="keywordflow">else</span> <span class="keywordflow">if</span>( e[1].isTrue() )
<a name="l00205"></a>00205             {
<a name="l00206"></a>00206               <a class="code" href="classTReturn.html#a4cb0fc0f38683bd372e4111771c273ef">normalize_to_tf</a>( e[0], t1, 0 );
<a name="l00207"></a>00207               ostringstream os1, os2;
<a name="l00208"></a>00208               os1 &lt;&lt; <span class="stringliteral">&quot;(iff_true _ &quot;</span>;
<a name="l00209"></a>00209               os2 &lt;&lt; <span class="stringliteral">&quot;)&quot;</span>;
<a name="l00210"></a>00210               t1 = <span class="keyword">new</span> <a class="code" href="classTReturn.html#a9554576fa26fd8e19942ff4a2f566bbf">TReturn</a>( <a class="code" href="classLFSCProofGeneric.html#a1bf5343c88454d1ffb552a3e2f59ddc8">LFSCProofGeneric::Make</a>( os1.str(), t1-&gt;<a class="code" href="classTReturn.html#a75ec103851040bcd454dde054227a3c2">getLFSCProof</a>(), os2.str() ), 
<a name="l00211"></a>00211                                 emptyL, emptyLUsed, <a class="code" href="classLFSCObj.html#a379c9c653101afe6c2db9c58cd4c81e1">nullRat</a>, <span class="keyword">false</span>, 0 );
<a name="l00212"></a>00212             }
<a name="l00213"></a>00213             <span class="keywordflow">else</span> <span class="keywordflow">if</span>( printErr )
<a name="l00214"></a>00214             {
<a name="l00215"></a>00215               <a class="code" href="classTReturn.html">TReturn</a>* torg = <span class="keyword">new</span> <a class="code" href="classTReturn.html#a9554576fa26fd8e19942ff4a2f566bbf">TReturn</a>( <a class="code" href="classLFSCPfVar.html#ac7b68737c0763fbc46619c54bd1df148">LFSCPfVar::Make</a>( <span class="stringliteral">&quot;@V&quot;</span>, 0 ), emptyL, emptyLUsed,
<a name="l00216"></a>00216                                           t1-&gt;<a class="code" href="classTReturn.html#afc199e16f310243abfdf0f08f248401b">getRational</a>(), t1-&gt;<a class="code" href="classTReturn.html#abae84e878863b3a6978d7dde0d52522a">hasRational</a>(), t1-&gt;<a class="code" href="classTReturn.html#adfcacf33921f81fe720ef5b30b184153">getProvesY</a>() );
<a name="l00217"></a>00217               <a class="code" href="classTReturn.html">TReturn</a> *ti1, *ti2;
<a name="l00218"></a>00218               <a class="code" href="classTReturn.html">TReturn</a>* to = torg;
<a name="l00219"></a>00219               <span class="keywordflow">if</span>( <a class="code" href="classTReturn.html#a76fa4cdab1d66c56bc96d3630150f030">normalize_tr</a>( pf1, to, 2, rev_pol ) )
<a name="l00220"></a>00220               {
<a name="l00221"></a>00221                 ti1 = to;
<a name="l00222"></a>00222                 to = torg;
<a name="l00223"></a>00223                 <span class="keywordflow">if</span>( <a class="code" href="classTReturn.html#a76fa4cdab1d66c56bc96d3630150f030">normalize_tr</a>( pf1, to, 2, !rev_pol ) )
<a name="l00224"></a>00224                 {
<a name="l00225"></a>00225                   ti2 = to;
<a name="l00226"></a>00226                   ostringstream os1, os2, os3, os4;
<a name="l00227"></a>00227                   os1 &lt;&lt; <span class="stringliteral">&quot;(impl_elim _ _ &quot;</span>;
<a name="l00228"></a>00228                   os2 &lt;&lt; <span class="stringliteral">&quot;(impl_intro _ _ (\\ @V0 (iff_intro _ _ &quot;</span>;
<a name="l00229"></a>00229                   os3 &lt;&lt; <span class="stringliteral">&quot; &quot;</span>;
<a name="l00230"></a>00230                   os4 &lt;&lt; <span class="stringliteral">&quot;))))&quot;</span>;
<a name="l00231"></a>00231                   std::vector&lt; RefPtr&lt; LFSCProof &gt; &gt; pfs;
<a name="l00232"></a>00232                   pfs.push_back( t1-&gt;<a class="code" href="classTReturn.html#a75ec103851040bcd454dde054227a3c2">getLFSCProof</a>() );
<a name="l00233"></a>00233                   pfs.push_back( ti1-&gt;getLFSCProof() );
<a name="l00234"></a>00234                   pfs.push_back( ti2-&gt;getLFSCProof() );
<a name="l00235"></a>00235                   std::vector&lt; string &gt; strs;
<a name="l00236"></a>00236                   strs.push_back( os1.str() );
<a name="l00237"></a>00237                   strs.push_back( os2.str() );
<a name="l00238"></a>00238                   strs.push_back( os3.str() );
<a name="l00239"></a>00239                   strs.push_back( os4.str() );
<a name="l00240"></a>00240                   t1 = <span class="keyword">new</span> <a class="code" href="classTReturn.html#a9554576fa26fd8e19942ff4a2f566bbf">TReturn</a>( <a class="code" href="classLFSCProofGeneric.html#a1bf5343c88454d1ffb552a3e2f59ddc8">LFSCProofGeneric::Make</a>( pfs, strs ), emptyL, emptyLUsed, <a class="code" href="classLFSCObj.html#a379c9c653101afe6c2db9c58cd4c81e1">nullRat</a>, <span class="keyword">false</span>, 0 );
<a name="l00241"></a>00241                 }
<a name="l00242"></a>00242               }
<a name="l00243"></a>00243             }
<a name="l00244"></a>00244           }
<a name="l00245"></a>00245         }
<a name="l00246"></a>00246       }
<a name="l00247"></a>00247       <span class="keywordflow">else</span> <span class="keywordflow">if</span>( y==2 )
<a name="l00248"></a>00248       {
<a name="l00249"></a>00249         <span class="keywordflow">if</span>( t1-&gt;<a class="code" href="classTReturn.html#adfcacf33921f81fe720ef5b30b184153">getProvesY</a>()==0 )
<a name="l00250"></a>00250         {
<a name="l00251"></a>00251           <a class="code" href="classRefPtr.html">RefPtr&lt; LFSCProof &gt;</a> p;
<a name="l00252"></a>00252           <span class="keywordflow">if</span>( e.<a class="code" href="group__ExprPkg.html#gabe385fb97505cccb75702378511c5375">isIff</a>() ){
<a name="l00253"></a>00253             ostringstream os1, os2;
<a name="l00254"></a>00254             os1 &lt;&lt; <span class="stringliteral">&quot;(iff_elim_1 _ _ &quot;</span>;
<a name="l00255"></a>00255             os2 &lt;&lt; <span class="stringliteral">&quot;)&quot;</span>;
<a name="l00256"></a>00256             p = <a class="code" href="classLFSCProofGeneric.html#a1bf5343c88454d1ffb552a3e2f59ddc8">LFSCProofGeneric::Make</a>( os1.str(), t1-&gt;<a class="code" href="classTReturn.html#a75ec103851040bcd454dde054227a3c2">getLFSCProof</a>(), os2.str() );
<a name="l00257"></a>00257           }<span class="keywordflow">else</span>{
<a name="l00258"></a>00258             <span class="comment">//cout &lt;&lt; &quot;actually I can just drop it &quot; &lt;&lt; e &lt;&lt; std::endl;</span>
<a name="l00259"></a>00259             p = t1-&gt;<a class="code" href="classTReturn.html#a75ec103851040bcd454dde054227a3c2">getLFSCProof</a>();
<a name="l00260"></a>00260           }
<a name="l00261"></a>00261           t1 = <span class="keyword">new</span> <a class="code" href="classTReturn.html#a9554576fa26fd8e19942ff4a2f566bbf">TReturn</a>( p.<a class="code" href="classRefPtr.html#a2b987fbb75b20a1da1bd959325635e7e">get</a>(), emptyL, emptyLUsed, <a class="code" href="classLFSCObj.html#a379c9c653101afe6c2db9c58cd4c81e1">nullRat</a>, <span class="keyword">false</span>, 2 );
<a name="l00262"></a>00262         }
<a name="l00263"></a>00263         <span class="keywordflow">else</span> <span class="keywordflow">if</span>( t1-&gt;<a class="code" href="classTReturn.html#adfcacf33921f81fe720ef5b30b184153">getProvesY</a>()==1 )
<a name="l00264"></a>00264         {
<a name="l00265"></a>00265           <span class="keywordflow">if</span>( <a class="code" href="Util_8cpp.html#a5462f02c7d83367f4d9e1b99f1975cb7">is_eq_kind</a>( eb.<a class="code" href="group__ExprPkg.html#ga7814e4f55f65c7ca860c637413df5f4d">getKind</a>() ) ){
<a name="l00266"></a>00266             <a class="code" href="classTReturn.html#a4cb0fc0f38683bd372e4111771c273ef">normalize_to_tf</a>( e, t1, 2 );
<a name="l00267"></a>00267           }<span class="keywordflow">else</span> <span class="keywordflow">if</span>( e.<a class="code" href="group__ExprPkg.html#gabe385fb97505cccb75702378511c5375">isIff</a>() || e.<a class="code" href="group__ExprPkg.html#ga9067c706c6454ea1761ace7d7837af46">isImpl</a>() ){
<a name="l00268"></a>00268             <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> eatom1 = <a class="code" href="classLFSCObj.html#a024a42781132867e23a7f6e65e6d0f98">queryAtomic</a>( e[0] );
<a name="l00269"></a>00269             <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> eatom2 = <a class="code" href="classLFSCObj.html#a024a42781132867e23a7f6e65e6d0f98">queryAtomic</a>( e[1] );
<a name="l00270"></a>00270             <span class="comment">//Expr ebase1 = queryAtomic( eatom1, true );</span>
<a name="l00271"></a>00271             <span class="comment">//Expr ebase2 = queryAtomic( eatom2, true );</span>
<a name="l00272"></a>00272             <span class="keywordtype">int</span> val1 = <a class="code" href="classLFSCObj.html#ab0f17f592443a6a15fe2cb7446308e65">queryM</a>( e[0] );
<a name="l00273"></a>00273             <span class="keywordtype">int</span> val2 = <a class="code" href="classLFSCObj.html#ab0f17f592443a6a15fe2cb7446308e65">queryM</a>( e[1] );
<a name="l00274"></a>00274             <span class="keywordtype">int</span> k1 = eatom1.<a class="code" href="group__ExprPkg.html#ga7814e4f55f65c7ca860c637413df5f4d">getKind</a>();
<a name="l00275"></a>00275             <span class="keywordtype">int</span> k2 = eatom2.<a class="code" href="group__ExprPkg.html#ga7814e4f55f65c7ca860c637413df5f4d">getKind</a>();
<a name="l00276"></a>00276 
<a name="l00277"></a>00277             <span class="keywordflow">if</span>( e[0]==e[1] ){
<a name="l00278"></a>00278               ostringstream os;
<a name="l00279"></a>00279               os &lt;&lt; <span class="stringliteral">&quot;(impl_refl_atom&quot;</span> &lt;&lt; (val1&lt;0 ? <span class="stringliteral">&quot;_not&quot;</span> : <span class="stringliteral">&quot;&quot;</span> );
<a name="l00280"></a>00280               os &lt;&lt; <span class="stringliteral">&quot; _ _ @a&quot;</span> &lt;&lt; <a class="code" href="namespaceCVC3.html#a39fc111339d6dffdc98d6a25b68dff0e">abs</a>( val1 ) &lt;&lt; <span class="stringliteral">&quot;)&quot;</span>;
<a name="l00281"></a>00281               <span class="comment">//d_formulas_printed[queryAtomic( e[0], true )] = true;</span>
<a name="l00282"></a>00282               t1 = <span class="keyword">new</span> <a class="code" href="classTReturn.html#a9554576fa26fd8e19942ff4a2f566bbf">TReturn</a>( <a class="code" href="classLFSCProofGeneric.html#abf29b3cdedf8439a6ee65ebc137340f5">LFSCProofGeneric::MakeStr</a>( os.str().c_str()),
<a name="l00283"></a>00283                                 emptyL, emptyLUsed, <a class="code" href="classLFSCObj.html#a379c9c653101afe6c2db9c58cd4c81e1">nullRat</a>, <span class="keyword">false</span>, 2 );
<a name="l00284"></a>00284             }<span class="keywordflow">else</span> <span class="keywordflow">if</span>( eatom2.<a class="code" href="group__ExprPkg.html#ga6173f64b22cba76472cd0c814bbf6dae">isFalse</a>() || eatom2.<a class="code" href="group__ExprPkg.html#gadf8596df73fa69ff8e6a22b9321f5c34">isTrue</a>() ){
<a name="l00285"></a>00285               <span class="keywordflow">if</span>( eatom1.<a class="code" href="group__ExprPkg.html#ga7814e4f55f65c7ca860c637413df5f4d">getKind</a>()==eatom2.<a class="code" href="group__ExprPkg.html#ga7814e4f55f65c7ca860c637413df5f4d">getKind</a>() )
<a name="l00286"></a>00286               {
<a name="l00287"></a>00287 <span class="preprocessor">#ifdef PRINT_MAJOR_METHODS</span>
<a name="l00288"></a>00288 <span class="preprocessor"></span>                cout &lt;&lt; <span class="stringliteral">&quot;;[M]: Normalize 1 to 2, iff/impl double logical iff&quot;</span> &lt;&lt; <a class="code" href="group__ExprStream__Manip.html#ga05b0ea7353ec24fa8e7e272d7a7875d8" title="Print the end-of-line.">std::endl</a>;
<a name="l00289"></a>00289 <span class="preprocessor">#endif</span>
<a name="l00290"></a>00290 <span class="preprocessor"></span>                <span class="keywordflow">if</span>( e[0]!=e[1] ){
<a name="l00291"></a>00291                   ostringstream ose;
<a name="l00292"></a>00292                   ose &lt;&lt; <span class="stringliteral">&quot;Warning: normalize logical atoms, not equal &quot;</span>;
<a name="l00293"></a>00293                   ose &lt;&lt; e[0] &lt;&lt; <span class="stringliteral">&quot; &quot;</span> &lt;&lt; e[1] &lt;&lt; <a class="code" href="group__ExprStream__Manip.html#ga05b0ea7353ec24fa8e7e272d7a7875d8" title="Print the end-of-line.">std::endl</a>;
<a name="l00294"></a>00294                   <a class="code" href="classObj.html#a7a13d6281d09d895f9db31157fe62f0d">print_error</a>( ose.str().c_str(), cout );
<a name="l00295"></a>00295                 }
<a name="l00296"></a>00296                 ostringstream os;
<a name="l00297"></a>00297                 os &lt;&lt; <span class="stringliteral">&quot;impl_refl_&quot;</span> &lt;&lt; ( eatom2.<a class="code" href="group__ExprPkg.html#ga6173f64b22cba76472cd0c814bbf6dae">isFalse</a>() ? <span class="stringliteral">&quot;false&quot;</span> : <span class="stringliteral">&quot;true&quot;</span> );
<a name="l00298"></a>00298                 t1 = <span class="keyword">new</span> <a class="code" href="classTReturn.html#a9554576fa26fd8e19942ff4a2f566bbf">TReturn</a>( <a class="code" href="classLFSCProofGeneric.html#abf29b3cdedf8439a6ee65ebc137340f5">LFSCProofGeneric::MakeStr</a>(os.str().c_str()),
<a name="l00299"></a>00299                                   emptyL, emptyLUsed, <a class="code" href="classLFSCObj.html#a379c9c653101afe6c2db9c58cd4c81e1">nullRat</a>, <span class="keyword">false</span>, 2 );
<a name="l00300"></a>00300               }
<a name="l00301"></a>00301               <span class="keywordflow">else</span> <span class="keywordflow">if</span>( eatom2.<a class="code" href="group__ExprPkg.html#gadf8596df73fa69ff8e6a22b9321f5c34">isTrue</a>() )
<a name="l00302"></a>00302               {
<a name="l00303"></a>00303                 <a class="code" href="classTReturn.html#a4cb0fc0f38683bd372e4111771c273ef">normalize_to_tf</a>( e[0], t1, 2 );
<a name="l00304"></a>00304                 ostringstream oss1, oss2;
<a name="l00305"></a>00305                 oss1 &lt;&lt; <span class="stringliteral">&quot;(iff_true_impl _ &quot;</span>;
<a name="l00306"></a>00306                 oss2 &lt;&lt; <span class="stringliteral">&quot;)&quot;</span>;
<a name="l00307"></a>00307                 t1 = <span class="keyword">new</span> <a class="code" href="classTReturn.html#a9554576fa26fd8e19942ff4a2f566bbf">TReturn</a>( <a class="code" href="classLFSCProofGeneric.html#a1bf5343c88454d1ffb552a3e2f59ddc8">LFSCProofGeneric::Make</a>( oss1.str(), t1-&gt;<a class="code" href="classTReturn.html#a75ec103851040bcd454dde054227a3c2">getLFSCProof</a>(), oss2.str() ),
<a name="l00308"></a>00308                                   emptyL, emptyLUsed, <a class="code" href="classLFSCObj.html#a379c9c653101afe6c2db9c58cd4c81e1">nullRat</a>, <span class="keyword">false</span>, 2 );
<a name="l00309"></a>00309               }
<a name="l00310"></a>00310               <span class="keywordflow">else</span> <span class="keywordflow">if</span>( eatom2.<a class="code" href="group__ExprPkg.html#ga6173f64b22cba76472cd0c814bbf6dae">isFalse</a>() )
<a name="l00311"></a>00311               {
<a name="l00312"></a>00312 <span class="preprocessor">#ifdef PRINT_MAJOR_METHODS</span>
<a name="l00313"></a>00313 <span class="preprocessor"></span>               <span class="comment">// cout &lt;&lt; &quot;;[M]: Normalize 1 to 2, iff/impl logical iff&quot; &lt;&lt; std::endl;</span>
<a name="l00314"></a>00314 <span class="preprocessor">#endif</span>
<a name="l00315"></a>00315 <span class="preprocessor"></span>                <span class="comment">//make proof for assumption</span>
<a name="l00316"></a>00316                 <a class="code" href="classRefPtr.html">RefPtr&lt; LFSCProof &gt;</a> p = <a class="code" href="classLFSCPfVar.html#ac7b68737c0763fbc46619c54bd1df148">LFSCPfVar::Make</a>( <span class="stringliteral">&quot;@v&quot;</span>, <a class="code" href="namespaceCVC3.html#a39fc111339d6dffdc98d6a25b68dff0e">abs</a>( val1 ) );
<a name="l00317"></a>00317                 p = <a class="code" href="classLFSCLraPoly.html#ac525239ecb136141bfa7e2b2f2b0391d">LFSCLraPoly::Make</a>( e[0], p.<a class="code" href="classRefPtr.html#a2b987fbb75b20a1da1bd959325635e7e">get</a>() );
<a name="l00318"></a>00318 
<a name="l00319"></a>00319                 p = <a class="code" href="classLFSCLraAdd.html#aa1d14054914f4333c90cf53a0d23de76">LFSCLraAdd::Make</a>( p.get(), t1-&gt;<a class="code" href="classTReturn.html#a75ec103851040bcd454dde054227a3c2">getLFSCProof</a>(),
<a name="l00320"></a>00320                                       <a class="code" href="Util_8cpp.html#a667a5939ed7f0fba1d9a06f52a674832">get_normalized</a>( k1 ),
<a name="l00321"></a>00321                                       <a class="code" href="Util_8cpp.html#a667a5939ed7f0fba1d9a06f52a674832">get_normalized</a>( k1, <span class="keyword">true</span> ) );
<a name="l00322"></a>00322                 p = <a class="code" href="classLFSCLraContra.html#aa561c53b9672b46c4490329b65b1f5fd">LFSCLraContra::Make</a>( p.get(), <a class="code" href="Util_8cpp.html#a30860522c71b3bd189f3c5789c42a9d7">is_comparison</a>( k1 ) ? (int)<a class="code" href="namespaceCVC3.html#a32d50a30de0e9e5bc4c2451de0107024a589b68b2d271254aa9fd3d89b4bf33b9">GT</a> : (<span class="keywordtype">int</span>)<a class="code" href="kinds_8h.html#aa10c9e8951b8ccf714a59ec321bdac5baa23a9880eca693f679c969556249925f">DISTINCT</a> );
<a name="l00323"></a>00323 
<a name="l00324"></a>00324                 ostringstream oss1, oss2;
<a name="l00325"></a>00325                 <span class="comment">//oss1 &lt;&lt; std::endl &lt;&lt; &quot;this is a normalization proof of &quot; &lt;&lt; e[0] &lt;&lt; &quot;-&gt;&quot; &lt;&lt; e[1] &lt;&lt; std::endl;</span>
<a name="l00326"></a>00326                 <span class="comment">//oss1 &lt;&lt; &quot;or a proof of &quot; &lt;&lt; eatom1 &lt;&lt; &quot; -&gt; &quot; &lt;&lt; eatom2 &lt;&lt; std::endl;</span>
<a name="l00327"></a>00327                 oss1 &lt;&lt; <span class="stringliteral">&quot;(impl_intro&quot;</span>; <span class="comment">// &lt;&lt; ( eatom2.isTrue() ? &quot;_not&quot; : &quot;&quot; );</span>
<a name="l00328"></a>00328                 oss1 &lt;&lt; <span class="stringliteral">&quot; _ _ (\\ @v&quot;</span> &lt;&lt; <a class="code" href="namespaceCVC3.html#a39fc111339d6dffdc98d6a25b68dff0e">abs</a>( val1 ) &lt;&lt; <span class="stringliteral">&quot; &quot;</span>;
<a name="l00329"></a>00329                 oss1 &lt;&lt; <span class="stringliteral">&quot;(bottom_elim &quot;</span>;
<a name="l00330"></a>00330                 <a class="code" href="classLFSCObj.html#a2c02fa7d095d8fd333578ca552c5ef04">printer</a>-&gt;<a class="code" href="classLFSCPrinter.html#a7fe298845c79612bd07a93c7501ef3c4">print_formula</a>( e[1], oss1 );
<a name="l00331"></a>00331                 oss1 &lt;&lt; <span class="stringliteral">&quot; &quot;</span>;
<a name="l00332"></a>00332 
<a name="l00333"></a>00333                 oss2 &lt;&lt; <span class="stringliteral">&quot;)))&quot;</span>;
<a name="l00334"></a>00334                 p = <a class="code" href="classLFSCProofGeneric.html#a1bf5343c88454d1ffb552a3e2f59ddc8">LFSCProofGeneric::Make</a>( oss1.str(), p.get(), oss2.str() );
<a name="l00335"></a>00335                 <span class="comment">//p = LFSCAssume::Make( val1, p.get(), false, 1 );</span>
<a name="l00336"></a>00336 
<a name="l00337"></a>00337                 t1 = <span class="keyword">new</span> <a class="code" href="classTReturn.html#a9554576fa26fd8e19942ff4a2f566bbf">TReturn</a>( p.get(), emptyL, emptyLUsed, <a class="code" href="classLFSCObj.html#a379c9c653101afe6c2db9c58cd4c81e1">nullRat</a>, <span class="keyword">false</span>, 2 );
<a name="l00338"></a>00338               }
<a name="l00339"></a>00339             }
<a name="l00340"></a>00340             <span class="keywordflow">else</span> <span class="keywordflow">if</span>( <a class="code" href="Util_8cpp.html#a5462f02c7d83367f4d9e1b99f1975cb7">is_eq_kind</a>( k1 ) &amp;&amp; <a class="code" href="Util_8cpp.html#a5462f02c7d83367f4d9e1b99f1975cb7">is_eq_kind</a>( k2 ) )
<a name="l00341"></a>00341             {
<a name="l00342"></a>00342 <span class="preprocessor">#ifdef PRINT_MAJOR_METHODS</span>
<a name="l00343"></a>00343 <span class="preprocessor"></span>              <span class="comment">//cout &lt;&lt; &quot;;[M]: Normalize 1 to 2, iff/impl&quot; &lt;&lt; std::endl;</span>
<a name="l00344"></a>00344 <span class="preprocessor">#endif</span>
<a name="l00345"></a>00345 <span class="preprocessor"></span>              <a class="code" href="classRefPtr.html">RefPtr&lt; LFSCProof &gt;</a> p;
<a name="l00346"></a>00346               <span class="comment">//assume1</span>
<a name="l00347"></a>00347               ostringstream os1, os2;
<a name="l00348"></a>00348               <span class="comment">//os1 &lt;&lt; &quot;this is a normalization proof of &quot; &lt;&lt; e[0] &lt;&lt; &quot;-&gt;&quot; &lt;&lt; e[1] &lt;&lt; std::endl;</span>
<a name="l00349"></a>00349               <span class="comment">//os1 &lt;&lt; &quot;or a proof of &quot; &lt;&lt; eatom1 &lt;&lt; &quot; -&gt; &quot; &lt;&lt; eatom2 &lt;&lt; std::endl;</span>
<a name="l00350"></a>00350               os1 &lt;&lt; <span class="stringliteral">&quot;(impl_intro&quot;</span>;
<a name="l00351"></a>00351               os1 &lt;&lt; <span class="stringliteral">&quot; _ _ (\\ &quot;</span>;
<a name="l00352"></a>00352               os1 &lt;&lt; <span class="stringliteral">&quot;@v&quot;</span> &lt;&lt; <a class="code" href="namespaceCVC3.html#a39fc111339d6dffdc98d6a25b68dff0e">abs</a>( val1 ) &lt;&lt; <span class="stringliteral">&quot; &quot;</span>;
<a name="l00353"></a>00353               os2 &lt;&lt; <span class="stringliteral">&quot;))&quot;</span>;
<a name="l00354"></a>00354 
<a name="l00355"></a>00355               <span class="comment">//make proof for assumption</span>
<a name="l00356"></a>00356               <a class="code" href="classRefPtr.html">RefPtr&lt; LFSCProof &gt;</a> p1 = <a class="code" href="classLFSCPfVar.html#ac7b68737c0763fbc46619c54bd1df148">LFSCPfVar::Make</a>( <span class="stringliteral">&quot;@v&quot;</span>, <a class="code" href="namespaceCVC3.html#a39fc111339d6dffdc98d6a25b68dff0e">abs</a>( val1 ) );
<a name="l00357"></a>00357               <a class="code" href="classRefPtr.html">RefPtr&lt; LFSCProof &gt;</a> p2 = <a class="code" href="classLFSCPfVar.html#ac7b68737c0763fbc46619c54bd1df148">LFSCPfVar::Make</a>( <span class="stringliteral">&quot;@v&quot;</span>, <a class="code" href="namespaceCVC3.html#a39fc111339d6dffdc98d6a25b68dff0e">abs</a>( val2 ) );
<a name="l00358"></a>00358 
<a name="l00359"></a>00359               <span class="comment">//convert to polynomial proofs</span>
<a name="l00360"></a>00360               p1 = <a class="code" href="classLFSCLraPoly.html#ac525239ecb136141bfa7e2b2f2b0391d">LFSCLraPoly::Make</a>( e[0], p1.<a class="code" href="classRefPtr.html#a2b987fbb75b20a1da1bd959325635e7e">get</a>() );
<a name="l00361"></a>00361               <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> ea2 = <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>( <a class="code" href="kinds_8h.html#aa10c9e8951b8ccf714a59ec321bdac5ba0378ebc895849163b249d0b330257dd6">NOT</a>, e[1] );
<a name="l00362"></a>00362               p2 = <a class="code" href="classLFSCLraPoly.html#ac525239ecb136141bfa7e2b2f2b0391d">LFSCLraPoly::Make</a>( ea2, p2.<a class="code" href="classRefPtr.html#a2b987fbb75b20a1da1bd959325635e7e">get</a>() );
<a name="l00363"></a>00363 
<a name="l00364"></a>00364               <span class="keywordflow">if</span>( t1-&gt;<a class="code" href="classTReturn.html#abae84e878863b3a6978d7dde0d52522a">hasRational</a>() ){
<a name="l00365"></a>00365                 <span class="keywordflow">if</span>( rev_pol )
<a name="l00366"></a>00366                   p2 = <a class="code" href="classLFSCLraMulC.html#ab2262ccc40a6212bbc9182700a2b0e73">LFSCLraMulC::Make</a>( p2.<a class="code" href="classRefPtr.html#a2b987fbb75b20a1da1bd959325635e7e">get</a>(), t1-&gt;<a class="code" href="classTReturn.html#afc199e16f310243abfdf0f08f248401b">getRational</a>(), <a class="code" href="Util_8cpp.html#a667a5939ed7f0fba1d9a06f52a674832">get_normalized</a>( k2, <span class="keyword">true</span> ) );
<a name="l00367"></a>00367                 <span class="keywordflow">else</span>
<a name="l00368"></a>00368                   p1 = <a class="code" href="classLFSCLraMulC.html#ab2262ccc40a6212bbc9182700a2b0e73">LFSCLraMulC::Make</a>( p1.get(), t1-&gt;<a class="code" href="classTReturn.html#afc199e16f310243abfdf0f08f248401b">getRational</a>(), <a class="code" href="Util_8cpp.html#a667a5939ed7f0fba1d9a06f52a674832">get_normalized</a>( k1 ) );
<a name="l00369"></a>00369               }
<a name="l00370"></a>00370 
<a name="l00371"></a>00371               p = <a class="code" href="classLFSCLraAdd.html#aa1d14054914f4333c90cf53a0d23de76">LFSCLraAdd::Make</a>( p1.<a class="code" href="classRefPtr.html#a2b987fbb75b20a1da1bd959325635e7e">get</a>(), p2.<a class="code" href="classRefPtr.html#a2b987fbb75b20a1da1bd959325635e7e">get</a>(),
<a name="l00372"></a>00372                                     <a class="code" href="Util_8cpp.html#a667a5939ed7f0fba1d9a06f52a674832">get_normalized</a>( k1 ),
<a name="l00373"></a>00373                                     <a class="code" href="Util_8cpp.html#a667a5939ed7f0fba1d9a06f52a674832">get_normalized</a>( k2, <span class="keyword">true</span> ) );
<a name="l00374"></a>00374 
<a name="l00375"></a>00375               p = <a class="code" href="classLFSCLraSub.html#a66b3327a7dadc49a0e072b6d1f6f6289">LFSCLraSub::Make</a>( p.get(), t1-&gt;<a class="code" href="classTReturn.html#a75ec103851040bcd454dde054227a3c2">getLFSCProof</a>(),
<a name="l00376"></a>00376                                     <a class="code" href="Util_8cpp.html#a30860522c71b3bd189f3c5789c42a9d7">is_comparison</a>( k1 ) ? (int)<a class="code" href="namespaceCVC3.html#a32d50a30de0e9e5bc4c2451de0107024a589b68b2d271254aa9fd3d89b4bf33b9">GT</a> : (<span class="keywordtype">int</span>)<a class="code" href="kinds_8h.html#aa10c9e8951b8ccf714a59ec321bdac5baa23a9880eca693f679c969556249925f">DISTINCT</a>, <a class="code" href="kinds_8h.html#aa10c9e8951b8ccf714a59ec321bdac5ba9efdc855f3c1477957fb50affec07f8f">EQ</a> );
<a name="l00377"></a>00377               p = <a class="code" href="classLFSCLraContra.html#aa561c53b9672b46c4490329b65b1f5fd">LFSCLraContra::Make</a>( p.get(),
<a name="l00378"></a>00378                                        <a class="code" href="Util_8cpp.html#a30860522c71b3bd189f3c5789c42a9d7">is_comparison</a>( k1 ) ? (int)<a class="code" href="namespaceCVC3.html#a32d50a30de0e9e5bc4c2451de0107024a589b68b2d271254aa9fd3d89b4bf33b9">GT</a> : (<span class="keywordtype">int</span>)<a class="code" href="kinds_8h.html#aa10c9e8951b8ccf714a59ec321bdac5baa23a9880eca693f679c969556249925f">DISTINCT</a> );
<a name="l00379"></a>00379 
<a name="l00380"></a>00380               p = <a class="code" href="classLFSCAssume.html#a1936e5119fa84aec4acc5d8ba83bc30b">LFSCAssume::Make</a>( val2, p.get(), <span class="keyword">false</span>, 1 );   
<a name="l00381"></a>00381 
<a name="l00382"></a>00382               p = <a class="code" href="classLFSCProofGeneric.html#a1bf5343c88454d1ffb552a3e2f59ddc8">LFSCProofGeneric::Make</a>( os1.str(), p.get(), os2.str() );
<a name="l00383"></a>00383 
<a name="l00384"></a>00384               t1 = <span class="keyword">new</span> <a class="code" href="classTReturn.html#a9554576fa26fd8e19942ff4a2f566bbf">TReturn</a>( p.get(), emptyL, emptyLUsed, <a class="code" href="classLFSCObj.html#a379c9c653101afe6c2db9c58cd4c81e1">nullRat</a>, <span class="keyword">false</span>, 2 );
<a name="l00385"></a>00385             }
<a name="l00386"></a>00386             <span class="keywordflow">else</span>
<a name="l00387"></a>00387             {
<a name="l00388"></a>00388               ostringstream ose;
<a name="l00389"></a>00389               ose &lt;&lt; <span class="stringliteral">&quot;NTret 12 could not handle &quot;</span> &lt;&lt; eatom1 &lt;&lt; <span class="stringliteral">&quot; &quot;</span> &lt;&lt; eatom2;
<a name="l00390"></a>00390               <a class="code" href="classObj.html#a7a13d6281d09d895f9db31157fe62f0d">print_error</a>( ose.str().c_str(), cout );
<a name="l00391"></a>00391             }
<a name="l00392"></a>00392           }
<a name="l00393"></a>00393         }
<a name="l00394"></a>00394       }
<a name="l00395"></a>00395     }
<a name="l00396"></a>00396   }
<a name="l00397"></a>00397   t1-&gt;<a class="code" href="classTReturn.html#a75ec103851040bcd454dde054227a3c2">getLFSCProof</a>()-&gt;<a class="code" href="classLFSCProof.html#a5152d42d473b2305cae68012da611208">setChOp</a>( chOp );
<a name="l00398"></a>00398   <span class="keywordflow">if</span>( t1-&gt;<a class="code" href="classTReturn.html#adfcacf33921f81fe720ef5b30b184153">getProvesY</a>()!=y )
<a name="l00399"></a>00399   {
<a name="l00400"></a>00400     <span class="keywordflow">if</span>( printErr || <a class="code" href="classLFSCObj.html#ac43ede316cf83e0eb037d3f5291f4074">debug_conv</a> ){
<a name="l00401"></a>00401       ostringstream ose;
<a name="l00402"></a>00402       ose &lt;&lt; <span class="stringliteral">&quot;Failed normalize_tr &quot;</span> &lt;&lt; t1-&gt;<a class="code" href="classTReturn.html#adfcacf33921f81fe720ef5b30b184153">getProvesY</a>() &lt;&lt; <span class="stringliteral">&quot; &quot;</span> &lt;&lt; y &lt;&lt; <a class="code" href="group__ExprStream__Manip.html#ga05b0ea7353ec24fa8e7e272d7a7875d8" title="Print the end-of-line.">std::endl</a>;
<a name="l00403"></a>00403       <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> e;
<a name="l00404"></a>00404       <span class="keywordflow">if</span>( <a class="code" href="classLFSCObj.html#a99916378da692faa903591fd5e460c69">what_is_proven</a>( pf1, e ) )
<a name="l00405"></a>00405        ose &lt;&lt; <span class="stringliteral">&quot;proven_expr = &quot;</span> &lt;&lt; e &lt;&lt; <a class="code" href="group__ExprStream__Manip.html#ga05b0ea7353ec24fa8e7e272d7a7875d8" title="Print the end-of-line.">std::endl</a>;
<a name="l00406"></a>00406       <a class="code" href="classObj.html#a7a13d6281d09d895f9db31157fe62f0d">print_error</a>( ose.str().c_str(), cout );
<a name="l00407"></a>00407     }
<a name="l00408"></a>00408     <span class="keywordflow">return</span> -1;
<a name="l00409"></a>00409   }
<a name="l00410"></a>00410   <span class="keywordflow">else</span>
<a name="l00411"></a>00411   {
<a name="l00412"></a>00412 <span class="preprocessor">#ifdef IGNORE_NORMALIZE</span>
<a name="l00413"></a>00413 <span class="preprocessor"></span>  t1 = <span class="keyword">new</span> <a class="code" href="classTReturn.html#a9554576fa26fd8e19942ff4a2f566bbf">TReturn</a>( torig-&gt;<a class="code" href="classTReturn.html#a75ec103851040bcd454dde054227a3c2">getLFSCProof</a>(), emptyL, emptyLUsed,
<a name="l00414"></a>00414                     torig-&gt;<a class="code" href="classTReturn.html#afc199e16f310243abfdf0f08f248401b">getRational</a>(), torig-&gt;<a class="code" href="classTReturn.html#abae84e878863b3a6978d7dde0d52522a">hasRational</a>(), y );
<a name="l00415"></a>00415   t1-&gt;<a class="code" href="classTReturn.html#a75ec103851040bcd454dde054227a3c2">getLFSCProof</a>()-&gt;<a class="code" href="classLFSCProof.html#a5152d42d473b2305cae68012da611208">setChOp</a>( chOp );
<a name="l00416"></a>00416   <span class="keywordflow">return</span> t1-&gt;<a class="code" href="classTReturn.html#adfcacf33921f81fe720ef5b30b184153">getProvesY</a>();
<a name="l00417"></a>00417 <span class="preprocessor">#else</span>
<a name="l00418"></a>00418 <span class="preprocessor"></span>    <span class="keywordflow">return</span> t1-&gt;<a class="code" href="classTReturn.html#adfcacf33921f81fe720ef5b30b184153">getProvesY</a>();
<a name="l00419"></a>00419 <span class="preprocessor">#endif</span>
<a name="l00420"></a>00420 <span class="preprocessor"></span>  }
<a name="l00421"></a>00421 }
<a name="l00422"></a>00422 
<a name="l00423"></a><a class="code" href="classTReturn.html#a4cb0fc0f38683bd372e4111771c273ef">00423</a> <span class="keywordtype">void</span> <a class="code" href="classTReturn.html#a4cb0fc0f38683bd372e4111771c273ef">TReturn::normalize_to_tf</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 class="code" href="classTReturn.html">TReturn</a>*&amp; t1, <span class="keywordtype">int</span> y )
<a name="l00424"></a>00424 {
<a name="l00425"></a>00425   <span class="keywordtype">int</span> chOp = t1-&gt;<a class="code" href="classTReturn.html#a75ec103851040bcd454dde054227a3c2">getLFSCProof</a>()-&gt;<a class="code" href="classLFSCProof.html#a6b95ef9fff90f5410755fdb628c6897c">getChOp</a>();
<a name="l00426"></a>00426   <span class="keywordflow">if</span>( t1-&gt;<a class="code" href="classTReturn.html#adfcacf33921f81fe720ef5b30b184153">getProvesY</a>()!=1 ){
<a name="l00427"></a>00427     ostringstream ose;
<a name="l00428"></a>00428     ose &lt;&lt; <span class="stringliteral">&quot;Bad mode for norm to tf &quot;</span> &lt;&lt; t1-&gt;<a class="code" href="classTReturn.html#adfcacf33921f81fe720ef5b30b184153">getProvesY</a>() &lt;&lt; <a class="code" href="group__ExprStream__Manip.html#ga05b0ea7353ec24fa8e7e272d7a7875d8" title="Print the end-of-line.">std::endl</a>;
<a name="l00429"></a>00429     <a class="code" href="classObj.html#a7a13d6281d09d895f9db31157fe62f0d">print_error</a>( ose.str().c_str(), cout );
<a name="l00430"></a>00430   }
<a name="l00431"></a>00431   std::vector&lt; int &gt; emptyL;
<a name="l00432"></a>00432   std::vector&lt; int &gt; emptyLUsed;
<a name="l00433"></a>00433   t1-&gt;<a class="code" href="classTReturn.html#ab5fe603ed277f47bdc014df335f33a44">getL</a>( emptyL, emptyLUsed );
<a name="l00434"></a>00434 
<a name="l00435"></a>00435   <span class="keywordflow">if</span>( t1-&gt;<a class="code" href="classTReturn.html#a75ec103851040bcd454dde054227a3c2">getLFSCProof</a>()-&gt;<a class="code" href="classLFSCProof.html#a13a5d84e3c02842c331c0093689edd58">AsLFSCLraPoly</a>() &amp;&amp; false )
<a name="l00436"></a>00436   {
<a name="l00437"></a>00437 <span class="preprocessor">#ifdef PRINT_MAJOR_METHODS</span>
<a name="l00438"></a>00438 <span class="preprocessor"></span>    cout &lt;&lt; <span class="stringliteral">&quot;;[M]: Normalize 1 to &quot;</span> &lt;&lt; y &lt;&lt; <span class="stringliteral">&quot;, simplify case&quot;</span> &lt;&lt; <a class="code" href="group__ExprStream__Manip.html#ga05b0ea7353ec24fa8e7e272d7a7875d8" title="Print the end-of-line.">std::endl</a>;
<a name="l00439"></a>00439 <span class="preprocessor">#endif</span>
<a name="l00440"></a>00440 <span class="preprocessor"></span>    t1 = <span class="keyword">new</span> <a class="code" href="classTReturn.html#a9554576fa26fd8e19942ff4a2f566bbf">TReturn</a>( t1-&gt;<a class="code" href="classTReturn.html#a75ec103851040bcd454dde054227a3c2">getLFSCProof</a>()-&gt;<a class="code" href="classLFSCProof.html#ac60cfef82cf6aaa935668cbfab2ecd10">getChild</a>( 0 ), emptyL, emptyLUsed, <a class="code" href="classLFSCObj.html#a379c9c653101afe6c2db9c58cd4c81e1">nullRat</a>, <span class="keyword">false</span>, y );
<a name="l00441"></a>00441   }
<a name="l00442"></a>00442   <span class="keywordflow">else</span>
<a name="l00443"></a>00443   {
<a name="l00444"></a>00444 
<a name="l00445"></a>00445 <span class="preprocessor">#ifdef PRINT_MAJOR_METHODS</span>
<a name="l00446"></a>00446 <span class="preprocessor"></span>    cout &lt;&lt; <span class="stringliteral">&quot;;[M]: Normalize 1 to &quot;</span> &lt;&lt; y &lt;&lt; <span class="stringliteral">&quot;, iff/impl, atom&quot;</span> &lt;&lt; <a class="code" href="group__ExprStream__Manip.html#ga05b0ea7353ec24fa8e7e272d7a7875d8" title="Print the end-of-line.">std::endl</a>;
<a name="l00447"></a>00447 <span class="preprocessor">#endif</span>
<a name="l00448"></a>00448 <span class="preprocessor"></span>
<a name="l00449"></a>00449     <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> eatom = <a class="code" href="classLFSCObj.html#a024a42781132867e23a7f6e65e6d0f98">queryAtomic</a>( e );
<a name="l00450"></a>00450     <span class="keywordtype">int</span> val = <a class="code" href="classLFSCObj.html#ab0f17f592443a6a15fe2cb7446308e65">queryM</a>( e );
<a name="l00451"></a>00451     <span class="keywordtype">int</span> knd = eatom.<a class="code" href="group__ExprPkg.html#ga7814e4f55f65c7ca860c637413df5f4d">getKind</a>();
<a name="l00452"></a>00452 
<a name="l00453"></a>00453     <span class="comment">//make proof for assumption</span>
<a name="l00454"></a>00454     <a class="code" href="classRefPtr.html">RefPtr&lt; LFSCProof &gt;</a> p = <a class="code" href="classLFSCPfVar.html#ac7b68737c0763fbc46619c54bd1df148">LFSCPfVar::Make</a>( <span class="stringliteral">&quot;@v&quot;</span>, <a class="code" href="namespaceCVC3.html#a39fc111339d6dffdc98d6a25b68dff0e">abs</a>( val ) );
<a name="l00455"></a>00455     <span class="comment">//convert to polynomial proof</span>
<a name="l00456"></a>00456     <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> ea = <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>( <a class="code" href="kinds_8h.html#aa10c9e8951b8ccf714a59ec321bdac5ba0378ebc895849163b249d0b330257dd6">NOT</a>, e );
<a name="l00457"></a>00457     p = <a class="code" href="classLFSCLraPoly.html#ac525239ecb136141bfa7e2b2f2b0391d">LFSCLraPoly::Make</a>( ea, p.<a class="code" href="classRefPtr.html#a2b987fbb75b20a1da1bd959325635e7e">get</a>() );
<a name="l00458"></a>00458 
<a name="l00459"></a>00459     p = <a class="code" href="classLFSCLraContra.html#aa561c53b9672b46c4490329b65b1f5fd">LFSCLraContra::Make</a>(
<a name="l00460"></a>00460           <a class="code" href="classLFSCLraAdd.html#aa1d14054914f4333c90cf53a0d23de76">LFSCLraAdd::Make</a>( p.get(), t1-&gt;<a class="code" href="classTReturn.html#a75ec103851040bcd454dde054227a3c2">getLFSCProof</a>(),
<a name="l00461"></a>00461                             <a class="code" href="Util_8cpp.html#a667a5939ed7f0fba1d9a06f52a674832">get_normalized</a>( knd, (val&lt;0) ),
<a name="l00462"></a>00462                             <a class="code" href="Util_8cpp.html#a667a5939ed7f0fba1d9a06f52a674832">get_normalized</a>( knd, !(val&lt;0) ) ),
<a name="l00463"></a>00463           <a class="code" href="Util_8cpp.html#a30860522c71b3bd189f3c5789c42a9d7">is_comparison</a>( knd ) ? (int)<a class="code" href="namespaceCVC3.html#a32d50a30de0e9e5bc4c2451de0107024a589b68b2d271254aa9fd3d89b4bf33b9">GT</a> : (<span class="keywordtype">int</span>)<a class="code" href="kinds_8h.html#aa10c9e8951b8ccf714a59ec321bdac5baa23a9880eca693f679c969556249925f">DISTINCT</a> );
<a name="l00464"></a>00464 
<a name="l00465"></a>00465     p = <a class="code" href="classLFSCAssume.html#a1936e5119fa84aec4acc5d8ba83bc30b">LFSCAssume::Make</a>( val, p.get(), <span class="keyword">false</span>, 1 );
<a name="l00466"></a>00466 
<a name="l00467"></a>00467     <span class="comment">//ostringstream os1, os2;</span>
<a name="l00468"></a>00468     <span class="comment">//os1 &lt;&lt; &quot;This is the atomization of &quot; &lt;&lt; e &lt;&lt; &quot;:&quot;;</span>
<a name="l00469"></a>00469     <span class="comment">//os2 &lt;&lt; &quot; &quot;;</span>
<a name="l00470"></a>00470     <span class="comment">//p = LFSCProofGeneric::Make( os1.str(), p.get(), os2.str() );</span>
<a name="l00471"></a>00471 
<a name="l00472"></a>00472     <span class="comment">//we have concluded e</span>
<a name="l00473"></a>00473     t1 = <span class="keyword">new</span> <a class="code" href="classTReturn.html#a9554576fa26fd8e19942ff4a2f566bbf">TReturn</a>( p.get(), emptyL, emptyLUsed, <a class="code" href="classLFSCObj.html#a379c9c653101afe6c2db9c58cd4c81e1">nullRat</a>, <span class="keyword">false</span>, y );
<a name="l00474"></a>00474   }
<a name="l00475"></a>00475   t1-&gt;<a class="code" href="classTReturn.html#a75ec103851040bcd454dde054227a3c2">getLFSCProof</a>()-&gt;<a class="code" href="classLFSCProof.html#a5152d42d473b2305cae68012da611208">setChOp</a>( chOp );
<a name="l00476"></a>00476 }
</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>