Sophie

Sophie

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

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: LFSCPrinter.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">LFSCPrinter.cpp</div>  </div>
</div>
<div class="contents">
<a href="LFSCPrinter_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="LFSCPrinter_8h.html">LFSCPrinter.h</a>&quot;</span>
<a name="l00002"></a>00002 
<a name="l00003"></a>00003 
<a name="l00004"></a><a class="code" href="classLFSCPrinter.html#aeddb67b48143c3bb632f49794a8f9f15">00004</a> <a class="code" href="classLFSCPrinter.html#aeddb67b48143c3bb632f49794a8f9f15">LFSCPrinter::LFSCPrinter</a>( <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> pf_expr, <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> qExpr, std::vector&lt;Expr&gt; assumps,
<a name="l00005"></a>00005                           <span class="keywordtype">int</span> lfscm, <a class="code" href="classCVC3_1_1CommonProofRules.html">CommonProofRules</a>* commonRules ):
<a name="l00006"></a>00006                             d_user_assumptions(assumps),
<a name="l00007"></a>00007                             d_common_pf_rules(commonRules){
<a name="l00008"></a>00008 
<a name="l00009"></a>00009   <a class="code" href="classLFSCObj.html#a2c02fa7d095d8fd333578ca552c5ef04">printer</a> = <span class="keyword">this</span>;
<a name="l00010"></a>00010 
<a name="l00011"></a>00011   <span class="keywordflow">if</span>( !qExpr.<a class="code" href="group__ExprPkg.html#ga6173f64b22cba76472cd0c814bbf6dae">isFalse</a>() ){
<a name="l00012"></a>00012     <a class="code" href="classLFSCPrinter.html#a4e399466cf7f1cfe191ad238ed0a3f07">d_user_assumptions</a>.push_back( <a class="code" href="classLFSCObj.html#a9d972614227f1b88721d36b33f04750f">cascade_expr</a>( <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>, qExpr ) ) );
<a name="l00013"></a>00013   }
<a name="l00014"></a>00014 
<a name="l00015"></a>00015   <a class="code" href="classObj.html#a6bbb1d0fa8c4fc2d8a574ff9c4adf918">Obj::initialize</a>();
<a name="l00016"></a>00016 
<a name="l00017"></a>00017   <a class="code" href="classLFSCPrinter.html#a185f22113db67fdde7adffb3b31bb903">let_i</a> = 1;
<a name="l00018"></a>00018   <a class="code" href="classObj.html#a6bbb1d0fa8c4fc2d8a574ff9c4adf918">LFSCObj::initialize</a>( pf_expr, lfscm );
<a name="l00019"></a>00019   <a class="code" href="classLFSCPrinter.html#a93694bfb6a553f8f34d9b4fc9a1f7d7e">converter</a> = <span class="keyword">new</span> <a class="code" href="classLFSCConvert.html">LFSCConvert</a>( lfscm );
<a name="l00020"></a>00020 }
<a name="l00021"></a>00021 <span class="comment"></span>
<a name="l00022"></a>00022 <span class="comment">///////////////////////////////////////</span>
<a name="l00023"></a>00023 <span class="comment"></span><span class="comment">// main print method</span><span class="comment"></span>
<a name="l00024"></a>00024 <span class="comment">///////////////////////////////////////</span>
<a name="l00025"></a>00025 <span class="comment"></span>
<a name="l00026"></a><a class="code" href="classLFSCPrinter.html#a726e72561b6c3dc2257af189667c17a6">00026</a> <span class="keywordtype">void</span> <a class="code" href="classLFSCPrinter.html#a726e72561b6c3dc2257af189667c17a6">LFSCPrinter::print_LFSC</a>( <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; pf )
<a name="l00027"></a>00027 {
<a name="l00028"></a>00028   ostringstream cparen;
<a name="l00029"></a>00029 
<a name="l00030"></a>00030   <span class="comment">//(AJR-1) Print the input formula and (: bottom ascription</span>
<a name="l00031"></a>00031 
<a name="l00032"></a>00032   cout &lt;&lt; <span class="stringliteral">&quot;(check &quot;</span> &lt;&lt; <a class="code" href="group__ExprStream__Manip.html#ga05b0ea7353ec24fa8e7e272d7a7875d8" title="Print the end-of-line.">endl</a>;
<a name="l00033"></a>00033   cparen &lt;&lt; <span class="stringliteral">&quot;)&quot;</span>;
<a name="l00034"></a>00034 
<a name="l00035"></a>00035   <span class="comment">// collecting variables from assumptions</span>
<a name="l00036"></a>00036   std::vector&lt;Expr&gt;::iterator a = <a class="code" href="classLFSCPrinter.html#a4e399466cf7f1cfe191ad238ed0a3f07">d_user_assumptions</a>.begin(), aend = <a class="code" href="classLFSCPrinter.html#a4e399466cf7f1cfe191ad238ed0a3f07">d_user_assumptions</a>.end();
<a name="l00037"></a>00037   <span class="keywordflow">while</span>(a!=aend){
<a name="l00038"></a>00038     <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> ce = <a class="code" href="classLFSCObj.html#a9d972614227f1b88721d36b33f04750f">cascade_expr</a>( *a );
<a name="l00039"></a>00039     <a class="code" href="classLFSCObj.html#ab0f17f592443a6a15fe2cb7446308e65">queryM</a>( ce );
<a name="l00040"></a>00040     <a class="code" href="classLFSCObj.html#ad8e86790f4adb2570714da3d4f7eb8c5">d_assump_map</a>[ ce ] = <span class="keyword">true</span>;
<a name="l00041"></a>00041     <a class="code" href="classLFSCObj.html#af95a913ddd8f4f9282386096e14de00c">collect_vars</a>(*a);
<a name="l00042"></a>00042     a++;
<a name="l00043"></a>00043   }
<a name="l00044"></a>00044 <span class="comment"></span>
<a name="l00045"></a>00045 <span class="comment">  //////scan for the assumptions</span>
<a name="l00046"></a>00046 <span class="comment"></span>  <span class="comment">//std::vector&lt; Expr &gt; assumps;</span>
<a name="l00047"></a>00047   <span class="comment">//collect_assumptions( pf, assumps );</span><span class="comment"></span>
<a name="l00048"></a>00048 <span class="comment">  ////we must record skolemizations</span>
<a name="l00049"></a>00049 <span class="comment"></span>  <span class="comment">//for( int a=1; a&lt;(int)assumps.size(); a++ ){</span>
<a name="l00050"></a>00050   <span class="comment">//  if( !d_assump_map[ assumps[a] ] ){</span>
<a name="l00051"></a>00051   <span class="comment">//    ostringstream ose;</span>
<a name="l00052"></a>00052   <span class="comment">//    ose &lt;&lt; &quot;Unexpected non-discharged assumption &quot; &lt;&lt; assumps[a];</span>
<a name="l00053"></a>00053   <span class="comment">//    print_error( ose.str().c_str(), cout );</span>
<a name="l00054"></a>00054   <span class="comment">//  }</span>
<a name="l00055"></a>00055   <span class="comment">//}</span>
<a name="l00056"></a>00056 
<a name="l00057"></a>00057   <span class="comment">//printing variables</span>
<a name="l00058"></a>00058   <a class="code" href="classCVC3_1_1ExprMap.html">ExprMap&lt;bool&gt;::iterator</a> v = <a class="code" href="classLFSCObj.html#ae7a9bf905373af442a0ef70db558440c">input_vars</a>.<a class="code" href="classCVC3_1_1ExprMap.html#a3db85401f8535daf4054fde531cd46b1">begin</a>(), vend = <a class="code" href="classLFSCObj.html#ae7a9bf905373af442a0ef70db558440c">input_vars</a>.<a class="code" href="classCVC3_1_1ExprMap.html#a283ae6c44308cbdda0d82da5a16e52c8">end</a>();
<a name="l00059"></a>00059   <span class="keywordflow">while</span>(v!= vend){
<a name="l00060"></a>00060     cout&lt;&lt;<span class="stringliteral">&quot;(% &quot;</span>&lt;&lt;(*v).first&lt;&lt;<span class="stringliteral">&quot; var_real&quot;</span>&lt;&lt;<a class="code" href="group__ExprStream__Manip.html#ga05b0ea7353ec24fa8e7e272d7a7875d8" title="Print the end-of-line.">endl</a>;
<a name="l00061"></a>00061     v++;
<a name="l00062"></a>00062     cparen&lt;&lt;<span class="stringliteral">&quot;)&quot;</span>;
<a name="l00063"></a>00063   }
<a name="l00064"></a>00064   v = <a class="code" href="classLFSCObj.html#a0b89bc2bbc7e2bb9474026ff4b111302">input_preds</a>.<a class="code" href="classCVC3_1_1ExprMap.html#a3db85401f8535daf4054fde531cd46b1">begin</a>(), vend = <a class="code" href="classLFSCObj.html#a0b89bc2bbc7e2bb9474026ff4b111302">input_preds</a>.<a class="code" href="classCVC3_1_1ExprMap.html#a283ae6c44308cbdda0d82da5a16e52c8">end</a>();
<a name="l00065"></a>00065   <span class="keywordflow">while</span>(v!= vend){
<a name="l00066"></a>00066     cout&lt;&lt;<span class="stringliteral">&quot;(% &quot;</span>&lt;&lt;(*v).first&lt;&lt;<span class="stringliteral">&quot; formula&quot;</span>&lt;&lt;<a class="code" href="group__ExprStream__Manip.html#ga05b0ea7353ec24fa8e7e272d7a7875d8" title="Print the end-of-line.">endl</a>;
<a name="l00067"></a>00067     v++;
<a name="l00068"></a>00068     cparen&lt;&lt;<span class="stringliteral">&quot;)&quot;</span>;
<a name="l00069"></a>00069   }
<a name="l00070"></a>00070   <span class="comment">//cout &lt;&lt; &quot;here1&quot; &lt;&lt; std::endl;</span>
<a name="l00071"></a>00071   <span class="comment">//(AJR-2) Run T0( pf )</span>
<a name="l00072"></a>00072   <a class="code" href="classLFSCObj.html#a2a8667f109db440dc7d05933fdf2c857">define_skolem_vars</a>( pf );
<a name="l00073"></a>00073   <span class="comment">//cout &lt;&lt; &quot;here2&quot; &lt;&lt; std::endl;</span>
<a name="l00074"></a>00074   <span class="comment">//convert the proof</span>
<a name="l00075"></a>00075   <a class="code" href="classLFSCPrinter.html#a93694bfb6a553f8f34d9b4fc9a1f7d7e">converter</a>-&gt;convert( pf );
<a name="l00076"></a>00076 
<a name="l00077"></a>00077   <span class="comment">//make the let map for input formulas</span>
<a name="l00078"></a>00078   a = <a class="code" href="classLFSCPrinter.html#a4e399466cf7f1cfe191ad238ed0a3f07">d_user_assumptions</a>.begin();
<a name="l00079"></a>00079   <span class="keywordflow">while</span>(a!=aend){
<a name="l00080"></a>00080     <a class="code" href="classLFSCPrinter.html#a411ca081d553c254903811d65e56b6d2">make_let_map</a>( <a class="code" href="classLFSCObj.html#a9d972614227f1b88721d36b33f04750f">cascade_expr</a>( *a ) );
<a name="l00081"></a>00081     a++;
<a name="l00082"></a>00082   }
<a name="l00083"></a>00083   <span class="comment">//make the let map for trusted formulas</span>
<a name="l00084"></a>00084   <a class="code" href="classCVC3_1_1ExprMap.html">ExprMap&lt;int&gt;::iterator</a> j = <a class="code" href="classLFSCObj.html#aa62d284471e6be2f733711bc01037ded">d_trusted</a>.<a class="code" href="classCVC3_1_1ExprMap.html#a3db85401f8535daf4054fde531cd46b1">begin</a>(), jend = <a class="code" href="classLFSCObj.html#aa62d284471e6be2f733711bc01037ded">d_trusted</a>.<a class="code" href="classCVC3_1_1ExprMap.html#a283ae6c44308cbdda0d82da5a16e52c8">end</a>();
<a name="l00085"></a>00085   <span class="keywordflow">while</span>( j != jend){
<a name="l00086"></a>00086     <a class="code" href="classLFSCPrinter.html#a411ca081d553c254903811d65e56b6d2">make_let_map</a>( <a class="code" href="classLFSCObj.html#a9d972614227f1b88721d36b33f04750f">cascade_expr</a>( (*j).first ) );
<a name="l00087"></a>00087     j++;
<a name="l00088"></a>00088   }
<a name="l00089"></a>00089   <span class="comment">//make the let map for output atomic formulas and terms</span>
<a name="l00090"></a>00090   <a class="code" href="classCVC3_1_1ExprMap.html">ExprMap&lt;bool&gt;::iterator</a> j2 = <a class="code" href="classLFSCObj.html#af9962ba4dfb9b457c96365924e018ff3">d_formulas_printed</a>.<a class="code" href="classCVC3_1_1ExprMap.html#a3db85401f8535daf4054fde531cd46b1">begin</a>(), j2end = <a class="code" href="classLFSCObj.html#af9962ba4dfb9b457c96365924e018ff3">d_formulas_printed</a>.<a class="code" href="classCVC3_1_1ExprMap.html#a283ae6c44308cbdda0d82da5a16e52c8">end</a>();
<a name="l00091"></a>00091   <span class="keywordflow">while</span>( j2 != j2end){
<a name="l00092"></a>00092     <span class="keywordflow">if</span>( (*j2).second ){
<a name="l00093"></a>00093       <a class="code" href="classLFSCPrinter.html#a411ca081d553c254903811d65e56b6d2">make_let_map</a>( <a class="code" href="classLFSCObj.html#a9d972614227f1b88721d36b33f04750f">cascade_expr</a>( (*j2).first ) );
<a name="l00094"></a>00094     }
<a name="l00095"></a>00095     j2++;
<a name="l00096"></a>00096   }
<a name="l00097"></a>00097   <span class="comment">//j = d_terms.begin(), jend = d_terms.end();</span>
<a name="l00098"></a>00098   <span class="comment">//while( j != jend){</span>
<a name="l00099"></a>00099   <span class="comment">//  make_let_map((*j).first);</span>
<a name="l00100"></a>00100   <span class="comment">//  j++;</span>
<a name="l00101"></a>00101   <span class="comment">//}</span>
<a name="l00102"></a>00102 <span class="comment"></span>
<a name="l00103"></a>00103 <span class="comment">  ////output skolem vars</span>
<a name="l00104"></a>00104 <span class="comment"></span>  <span class="comment">//j = skolem_vars.begin(), jend = skolem_vars.end();</span>
<a name="l00105"></a>00105   <span class="comment">//while( j != jend ){</span>
<a name="l00106"></a>00106   <span class="comment">//  if( (*j).second!=0 ){</span>
<a name="l00107"></a>00107   <span class="comment">//    cout&lt;&lt;&quot;(% &quot;&lt;&lt;(*j).first&lt;&lt;&quot; var_real&quot;&lt;&lt;endl;</span>
<a name="l00108"></a>00108   <span class="comment">//    cparen &lt;&lt; &quot;)&quot;;</span>
<a name="l00109"></a>00109   <span class="comment">//  }</span>
<a name="l00110"></a>00110   <span class="comment">//  j++;</span>
<a name="l00111"></a>00111   <span class="comment">//}</span>
<a name="l00112"></a>00112 
<a name="l00113"></a>00113   <span class="comment">//output let definitions</span>
<a name="l00114"></a>00114   j2 = <a class="code" href="classLFSCPrinter.html#a2c18450d20b692790f011b926b973701">d_print_visited_map</a>.<a class="code" href="classCVC3_1_1ExprMap.html#a3db85401f8535daf4054fde531cd46b1">begin</a>(), j2end = <a class="code" href="classLFSCPrinter.html#a2c18450d20b692790f011b926b973701">d_print_visited_map</a>.<a class="code" href="classCVC3_1_1ExprMap.html#a283ae6c44308cbdda0d82da5a16e52c8">end</a>();
<a name="l00115"></a>00115   <span class="keywordflow">while</span>( j2 != j2end ){
<a name="l00116"></a>00116     <span class="keywordtype">int</span> val = <a class="code" href="classLFSCPrinter.html#a2916344961fd57a2e5ebecb0a313c67e">d_print_map</a>[(*j2).first];
<a name="l00117"></a>00117     <span class="keywordflow">if</span>( val!=0 ){
<a name="l00118"></a>00118       cout &lt;&lt; <span class="stringliteral">&quot;(@ &quot;</span>;
<a name="l00119"></a>00119       <a class="code" href="classLFSCPrinter.html#a2916344961fd57a2e5ebecb0a313c67e">d_print_map</a>[(*j2).first] = 0;
<a name="l00120"></a>00120       <span class="keywordflow">if</span>( <a class="code" href="classLFSCObj.html#ace5ae3c05a540f101645ecfbacdd2928">isFormula</a>( (*j2).first ) ){
<a name="l00121"></a>00121         cout &lt;&lt; <span class="stringliteral">&quot;@f&quot;</span> &lt;&lt; val &lt;&lt; <span class="stringliteral">&quot; &quot;</span>;
<a name="l00122"></a>00122         <a class="code" href="classLFSCPrinter.html#a7fe298845c79612bd07a93c7501ef3c4">print_formula</a>( (*j2).first, cout );
<a name="l00123"></a>00123       }<span class="keywordflow">else</span>{
<a name="l00124"></a>00124         cout &lt;&lt; <span class="stringliteral">&quot;@x&quot;</span> &lt;&lt; val &lt;&lt; <span class="stringliteral">&quot; &quot;</span>;
<a name="l00125"></a>00125         <a class="code" href="classLFSCPrinter.html#a6958896855c0e0f3dfbc1e014e73fde5">print_terms</a>( (*j2).first, cout );
<a name="l00126"></a>00126       }
<a name="l00127"></a>00127       <a class="code" href="classLFSCPrinter.html#a2916344961fd57a2e5ebecb0a313c67e">d_print_map</a>[(*j2).first] = val;
<a name="l00128"></a>00128       cout &lt;&lt; <a class="code" href="group__ExprStream__Manip.html#ga05b0ea7353ec24fa8e7e272d7a7875d8" title="Print the end-of-line.">endl</a>;
<a name="l00129"></a>00129       cparen &lt;&lt; <span class="stringliteral">&quot;)&quot;</span>;
<a name="l00130"></a>00130     }
<a name="l00131"></a>00131     j2++;
<a name="l00132"></a>00132   }
<a name="l00133"></a>00133   <span class="keywordflow">if</span>( !<a class="code" href="classLFSCPrinter.html#a2916344961fd57a2e5ebecb0a313c67e">d_print_map</a>.<a class="code" href="classCVC3_1_1ExprMap.html#a292270a9283cbdcfd5a3ddccd4e33262">empty</a>() )
<a name="l00134"></a>00134     cout &lt;&lt; endl;
<a name="l00135"></a>00135 
<a name="l00136"></a>00136   <span class="comment">// printing user assumptions</span>
<a name="l00137"></a>00137   a = <a class="code" href="classLFSCPrinter.html#a4e399466cf7f1cfe191ad238ed0a3f07">d_user_assumptions</a>.begin();
<a name="l00138"></a>00138   <span class="keywordtype">int</span> m = 1;
<a name="l00139"></a>00139   <span class="keywordflow">while</span>(a!=aend){
<a name="l00140"></a>00140     cout&lt;&lt;<span class="stringliteral">&quot;(% @F&quot;</span>&lt;&lt;m&lt;&lt;<span class="stringliteral">&quot; (th_holds &quot;</span>;
<a name="l00141"></a>00141     <a class="code" href="classLFSCPrinter.html#a7fe298845c79612bd07a93c7501ef3c4">print_formula</a>(*a, cout);
<a name="l00142"></a>00142     cout&lt;&lt;<span class="stringliteral">&quot;)&quot;</span>&lt;&lt;<a class="code" href="group__ExprStream__Manip.html#ga05b0ea7353ec24fa8e7e272d7a7875d8" title="Print the end-of-line.">endl</a>;
<a name="l00143"></a>00143     a++;
<a name="l00144"></a>00144     m++;
<a name="l00145"></a>00145     cparen &lt;&lt; <span class="stringliteral">&quot;)&quot;</span>;
<a name="l00146"></a>00146   }
<a name="l00147"></a>00147 
<a name="l00148"></a>00148   <span class="comment">//print trusted formulas</span>
<a name="l00149"></a>00149   j = <a class="code" href="classLFSCObj.html#aa62d284471e6be2f733711bc01037ded">d_trusted</a>.<a class="code" href="classCVC3_1_1ExprMap.html#a3db85401f8535daf4054fde531cd46b1">begin</a>(), jend = <a class="code" href="classLFSCObj.html#aa62d284471e6be2f733711bc01037ded">d_trusted</a>.<a class="code" href="classCVC3_1_1ExprMap.html#a283ae6c44308cbdda0d82da5a16e52c8">end</a>();
<a name="l00150"></a>00150   <span class="keywordflow">while</span>( j != jend){
<a name="l00151"></a>00151     cout &lt;&lt;<span class="stringliteral">&quot;(% @T&quot;</span> &lt;&lt; (*j).second &lt;&lt;<span class="stringliteral">&quot; (th_holds &quot;</span>;
<a name="l00152"></a>00152     <a class="code" href="classLFSCPrinter.html#a7fe298845c79612bd07a93c7501ef3c4">print_formula</a>((*j).first, cout);
<a name="l00153"></a>00153     cout&lt;&lt;<span class="stringliteral">&quot;)&quot;</span>&lt;&lt;<a class="code" href="group__ExprStream__Manip.html#ga05b0ea7353ec24fa8e7e272d7a7875d8" title="Print the end-of-line.">endl</a>;
<a name="l00154"></a>00154     cparen &lt;&lt; <span class="stringliteral">&quot;)&quot;</span>;
<a name="l00155"></a>00155     j++;
<a name="l00156"></a>00156   }
<a name="l00157"></a>00157 
<a name="l00158"></a>00158   cout &lt;&lt; <span class="stringliteral">&quot;(: bottom&quot;</span> &lt;&lt; <a class="code" href="group__ExprStream__Manip.html#ga05b0ea7353ec24fa8e7e272d7a7875d8" title="Print the end-of-line.">endl</a>;
<a name="l00159"></a>00159   cparen &lt;&lt; <span class="stringliteral">&quot;)&quot;</span>;
<a name="l00160"></a>00160 
<a name="l00161"></a>00161 
<a name="l00162"></a>00162   <span class="comment">//outer lambda abstractions</span>
<a name="l00163"></a>00163   <span class="comment">//cout &lt;&lt; &quot;number of outer lam abstractions = &quot; &lt;&lt; LFSCProof::lambdaCounter &lt;&lt; std::endl;</span>
<a name="l00164"></a>00164   <a class="code" href="classRefPtr.html">RefPtr&lt; LFSCProof &gt;</a> lambda_pf = <a class="code" href="classLFSCPrinter.html#a93694bfb6a553f8f34d9b4fc9a1f7d7e">converter</a>-&gt;getLFSCProof();
<a name="l00165"></a>00165 
<a name="l00166"></a>00166 <span class="comment"></span>
<a name="l00167"></a>00167 <span class="comment">  ////debug----</span>
<a name="l00168"></a>00168 <span class="comment"></span>  <span class="comment">//j = d_formulas.begin(), jend = d_formulas.end();</span>
<a name="l00169"></a>00169   <span class="comment">//while( j != jend){</span>
<a name="l00170"></a>00170   <span class="comment">//  ExprMap&lt; int &gt;::iterator jPrev = j;</span>
<a name="l00171"></a>00171   <span class="comment">//  j++;</span>
<a name="l00172"></a>00172   <span class="comment">//  while( j != jend ){</span>
<a name="l00173"></a>00173   <span class="comment">//    Expr e1 = cascade_expr( (*j).first );</span>
<a name="l00174"></a>00174   <span class="comment">//    Expr e2 = cascade_expr( (*jPrev).first );</span>
<a name="l00175"></a>00175   <span class="comment">//    if( e1==e2 ){</span>
<a name="l00176"></a>00176   <span class="comment">//      ostringstream ose;</span>
<a name="l00177"></a>00177   <span class="comment">//      ose &lt;&lt; &quot;Warning: Atomizing identical formulas &quot; &lt;&lt; (*j).second &lt;&lt; &quot; &quot; &lt;&lt; (*jPrev).second &lt;&lt; std::endl;</span>
<a name="l00178"></a>00178   <span class="comment">//      print_error( ose.str().c_str(), cout );</span>
<a name="l00179"></a>00179   <span class="comment">//    }</span>
<a name="l00180"></a>00180   <span class="comment">//    j++;</span>
<a name="l00181"></a>00181   <span class="comment">//  }</span>
<a name="l00182"></a>00182   <span class="comment">//  j = jPrev;</span>
<a name="l00183"></a>00183   <span class="comment">//  j++;</span>
<a name="l00184"></a>00184   <span class="comment">//}</span><span class="comment"></span>
<a name="l00185"></a>00185 <span class="comment">  ////debug----</span>
<a name="l00186"></a>00186 <span class="comment"></span>
<a name="l00187"></a>00187   <span class="comment">//(AJR-3) Print the atoms used in the proof, these are contained in M.</span>
<a name="l00188"></a>00188   j = <a class="code" href="classLFSCObj.html#a9741b35e18a1dc2dd135fb85face8288">d_formulas</a>.<a class="code" href="classCVC3_1_1ExprMap.html#a3db85401f8535daf4054fde531cd46b1">begin</a>(), jend = <a class="code" href="classLFSCObj.html#a9741b35e18a1dc2dd135fb85face8288">d_formulas</a>.<a class="code" href="classCVC3_1_1ExprMap.html#a283ae6c44308cbdda0d82da5a16e52c8">end</a>();
<a name="l00189"></a>00189   <span class="keywordflow">while</span>( j != jend){
<a name="l00190"></a>00190     cout &lt;&lt;<span class="stringliteral">&quot;(decl_atom &quot;</span>;
<a name="l00191"></a>00191     <span class="comment">//if( d_formulas_printed[(*j).first] ){     //HACK to ignore this</span>
<a name="l00192"></a>00192       <a class="code" href="classLFSCPrinter.html#a7fe298845c79612bd07a93c7501ef3c4">print_formula</a>( (*j).first, cout );
<a name="l00193"></a>00193     <span class="comment">//}else{</span>
<a name="l00194"></a>00194     <span class="comment">//  cout &lt;&lt; &quot;_&quot;;</span>
<a name="l00195"></a>00195     <span class="comment">//}</span>
<a name="l00196"></a>00196     cout&lt;&lt; <span class="stringliteral">&quot; (\\ @b&quot;</span>&lt;&lt;(*j).second&lt;&lt;<span class="stringliteral">&quot; (\\ @a&quot;</span>&lt;&lt;(*j).second&lt;&lt;<a class="code" href="group__ExprStream__Manip.html#ga05b0ea7353ec24fa8e7e272d7a7875d8" title="Print the end-of-line.">endl</a>;
<a name="l00197"></a>00197     cparen &lt;&lt; <span class="stringliteral">&quot;)))&quot;</span>;
<a name="l00198"></a>00198     j++;
<a name="l00199"></a>00199   }
<a name="l00200"></a>00200   <span class="comment">//need to print out atomized terms too</span>
<a name="l00201"></a>00201   j = <a class="code" href="classLFSCObj.html#aa8ad0677d224a27c6b7376619a9a037d">d_terms</a>.<a class="code" href="classCVC3_1_1ExprMap.html#a3db85401f8535daf4054fde531cd46b1">begin</a>(), jend = <a class="code" href="classLFSCObj.html#aa8ad0677d224a27c6b7376619a9a037d">d_terms</a>.<a class="code" href="classCVC3_1_1ExprMap.html#a283ae6c44308cbdda0d82da5a16e52c8">end</a>();
<a name="l00202"></a>00202   <span class="keywordflow">while</span>( j != jend){
<a name="l00203"></a>00203     cout &lt;&lt;<span class="stringliteral">&quot;(decl_term_atom &quot;</span>;
<a name="l00204"></a>00204     <a class="code" href="classLFSCPrinter.html#a6958896855c0e0f3dfbc1e014e73fde5">print_terms</a>( (*j).first, cout );
<a name="l00205"></a>00205     cout&lt;&lt; <span class="stringliteral">&quot; (\\ @bt&quot;</span>&lt;&lt;(*j).second&lt;&lt;<span class="stringliteral">&quot; (\\ @at&quot;</span>&lt;&lt;(*j).second&lt;&lt;<a class="code" href="group__ExprStream__Manip.html#ga05b0ea7353ec24fa8e7e272d7a7875d8" title="Print the end-of-line.">endl</a>;
<a name="l00206"></a>00206     cparen &lt;&lt; <span class="stringliteral">&quot;)))&quot;</span>;
<a name="l00207"></a>00207     j++;
<a name="l00208"></a>00208   }
<a name="l00209"></a>00209 
<a name="l00210"></a>00210   <span class="comment">//(AJR-4) Print all polynomial normalization proofs.  These are stored in M_t.</span>
<a name="l00211"></a>00211   <span class="comment">//print out the term normalizations</span>
<a name="l00212"></a>00212   j = <a class="code" href="classLFSCObj.html#aa4fa55b8acd57b674418c69dee792fd7">d_pn_form</a>.<a class="code" href="classCVC3_1_1ExprMap.html#a3db85401f8535daf4054fde531cd46b1">begin</a>(), jend = <a class="code" href="classLFSCObj.html#aa4fa55b8acd57b674418c69dee792fd7">d_pn_form</a>.<a class="code" href="classCVC3_1_1ExprMap.html#a283ae6c44308cbdda0d82da5a16e52c8">end</a>();
<a name="l00213"></a>00213   <span class="keywordflow">while</span>(j !=jend ){
<a name="l00214"></a>00214     <a class="code" href="classLFSCObj.html#a03e6dd5795f3ad53cb25667fecd692a7">pntNeeded</a>[ (*j).second ] = <span class="keyword">true</span>;
<a name="l00215"></a>00215     j++;
<a name="l00216"></a>00216   }
<a name="l00217"></a>00217   j = <a class="code" href="classLFSCObj.html#a53e3990d17d606c9dd5b28b7950d5cd5">d_pn</a>.<a class="code" href="classCVC3_1_1ExprMap.html#a3db85401f8535daf4054fde531cd46b1">begin</a>(), jend = <a class="code" href="classLFSCObj.html#a53e3990d17d606c9dd5b28b7950d5cd5">d_pn</a>.<a class="code" href="classCVC3_1_1ExprMap.html#a283ae6c44308cbdda0d82da5a16e52c8">end</a>();
<a name="l00218"></a>00218   <span class="keywordflow">while</span>(j !=jend){
<a name="l00219"></a>00219     <span class="keywordflow">if</span>( <a class="code" href="classLFSCObj.html#a81a07dd023d7a37bff9fa514fff9a787">cvc3_mimic</a> || <a class="code" href="classLFSCObj.html#a03e6dd5795f3ad53cb25667fecd692a7">pntNeeded</a>[ (*j).second ] ){
<a name="l00220"></a>00220       cout &lt;&lt; <span class="stringliteral">&quot;(pn_let _ _ &quot;</span>;
<a name="l00221"></a>00221       <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> ce = <a class="code" href="classLFSCObj.html#a9d972614227f1b88721d36b33f04750f">cascade_expr</a>( (*j).first );
<a name="l00222"></a>00222       <a class="code" href="classLFSCPrinter.html#a891d2d3c46415112ac1cfca27ccb4724">print_poly_norm</a>( ce, cout);
<a name="l00223"></a>00223       cout &lt;&lt; <span class="stringliteral">&quot;(\\ @pnt&quot;</span> &lt;&lt; (*j).second &lt;&lt; <a class="code" href="group__ExprStream__Manip.html#ga05b0ea7353ec24fa8e7e272d7a7875d8" title="Print the end-of-line.">endl</a>;
<a name="l00224"></a>00224       cparen &lt;&lt; <span class="stringliteral">&quot;))&quot;</span>;
<a name="l00225"></a>00225     }
<a name="l00226"></a>00226     j++;
<a name="l00227"></a>00227   }
<a name="l00228"></a>00228 
<a name="l00229"></a>00229   <span class="comment">//print out the equation normalizations</span>
<a name="l00230"></a>00230   j = <a class="code" href="classLFSCObj.html#aa4fa55b8acd57b674418c69dee792fd7">d_pn_form</a>.<a class="code" href="classCVC3_1_1ExprMap.html#a3db85401f8535daf4054fde531cd46b1">begin</a>(), jend = <a class="code" href="classLFSCObj.html#aa4fa55b8acd57b674418c69dee792fd7">d_pn_form</a>.<a class="code" href="classCVC3_1_1ExprMap.html#a283ae6c44308cbdda0d82da5a16e52c8">end</a>();
<a name="l00231"></a>00231   <span class="keywordflow">while</span>(j !=jend){
<a name="l00232"></a>00232     cout &lt;&lt; <span class="stringliteral">&quot;(poly_norm_&quot;</span> &lt;&lt; <a class="code" href="Util_8cpp.html#af0ed1bf9d4012011aa2b42be9c26a0b5">kind_to_str</a>( (*j).first.getKind() ) &lt;&lt; <span class="stringliteral">&quot; _ _ _ @pnt&quot;</span>;
<a name="l00233"></a>00233     <span class="comment">//mapped to the polynomial norm proof</span>
<a name="l00234"></a>00234     cout &lt;&lt; (*j).second &lt;&lt; <span class="stringliteral">&quot; &quot;</span>;
<a name="l00235"></a>00235     <span class="comment">//print out the same number as the equation in M</span>
<a name="l00236"></a>00236     cout &lt;&lt; <span class="stringliteral">&quot;(\\ @pn&quot;</span> &lt;&lt; <a class="code" href="namespaceCVC3.html#a39fc111339d6dffdc98d6a25b68dff0e">abs</a>( <a class="code" href="classLFSCObj.html#ab0f17f592443a6a15fe2cb7446308e65">queryM</a>( (*j).first ) ) &lt;&lt; <a class="code" href="group__ExprStream__Manip.html#ga05b0ea7353ec24fa8e7e272d7a7875d8" title="Print the end-of-line.">endl</a>;
<a name="l00237"></a>00237     cparen &lt;&lt; <span class="stringliteral">&quot;))&quot;</span>;
<a name="l00238"></a>00238     j++;
<a name="l00239"></a>00239   }
<a name="l00240"></a>00240 
<a name="l00241"></a>00241   <span class="comment">//(AJR-5) print the proof and closing parentheses.</span>
<a name="l00242"></a>00242   <span class="keywordflow">if</span>( <a class="code" href="classLFSCObj.html#ae9fad86fecb58ee3be0b330a37acecae">lfsc_mode</a>%10==7 ){
<a name="l00243"></a>00243     <a class="code" href="classObj.html#a83c066ea827186c7008bc7de2a50431a">LFSCProof::indentFlag</a> = <span class="keyword">true</span>;
<a name="l00244"></a>00244     lambda_pf-&gt;print_structure( cout );
<a name="l00245"></a>00245   }<span class="keywordflow">else</span>
<a name="l00246"></a>00246     lambda_pf-&gt;print( cout );
<a name="l00247"></a>00247   cout &lt;&lt; <a class="code" href="group__ExprStream__Manip.html#ga05b0ea7353ec24fa8e7e272d7a7875d8" title="Print the end-of-line.">endl</a>;
<a name="l00248"></a>00248 
<a name="l00249"></a>00249 
<a name="l00250"></a>00250   <span class="comment">//print closing parentheses</span>
<a name="l00251"></a>00251   cout &lt;&lt; cparen.str() &lt;&lt; <a class="code" href="group__ExprStream__Manip.html#ga05b0ea7353ec24fa8e7e272d7a7875d8" title="Print the end-of-line.">endl</a>;
<a name="l00252"></a>00252 }
<a name="l00253"></a>00253 
<a name="l00254"></a>00254 
<a name="l00255"></a><a class="code" href="classLFSCPrinter.html#a891d2d3c46415112ac1cfca27ccb4724">00255</a> <span class="keywordtype">void</span> <a class="code" href="classLFSCPrinter.html#a891d2d3c46415112ac1cfca27ccb4724">LFSCPrinter::print_poly_norm</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; expr, std::ostream&amp; s, <span class="keywordtype">bool</span> pnRat, <span class="keywordtype">bool</span> ratNeg ){
<a name="l00256"></a>00256   <span class="comment">// if +, -, etc.</span>
<a name="l00257"></a>00257   <span class="keywordflow">if</span>(expr.<a class="code" href="group__ExprPkg.html#ga28b901d05e52a5c646f83a95cc74f94b">arity</a>()==2 ){
<a name="l00258"></a>00258     <span class="keywordflow">if</span>( expr.<a class="code" href="group__ExprPkg.html#ga7814e4f55f65c7ca860c637413df5f4d">getKind</a>()==<a class="code" href="namespaceCVC3.html#a32d50a30de0e9e5bc4c2451de0107024ad77e825b0133e40de2760344377ee1fa">MULT</a> ){
<a name="l00259"></a>00259       ostringstream cparen;
<a name="l00260"></a>00260       <span class="keywordtype">int</span> nrIndex = -1;    <span class="comment">//the non-rational child</span>
<a name="l00261"></a>00261       <span class="keywordflow">for</span>( <span class="keywordtype">int</span> a=0; a&lt;2; a++ ){
<a name="l00262"></a>00262         <span class="keywordflow">if</span>( nrIndex==-1 )
<a name="l00263"></a>00263         {
<a name="l00264"></a>00264           <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> ec = expr[a];
<a name="l00265"></a>00265           <span class="keywordtype">bool</span> rNeg = ratNeg;
<a name="l00266"></a>00266           <span class="keywordflow">while</span>( ec.<a class="code" href="group__ExprPkg.html#ga7814e4f55f65c7ca860c637413df5f4d">getKind</a>()==<a class="code" href="namespaceCVC3.html#a32d50a30de0e9e5bc4c2451de0107024a0b79738a0067780987896f3b91e8b0f1">UMINUS</a> ){
<a name="l00267"></a>00267             ec = ec[0];
<a name="l00268"></a>00268             <span class="keywordflow">if</span>( !<a class="code" href="classLFSCObj.html#a81a07dd023d7a37bff9fa514fff9a787">cvc3_mimic</a> )
<a name="l00269"></a>00269               rNeg = !rNeg;
<a name="l00270"></a>00270           }
<a name="l00271"></a>00271           <span class="keywordflow">if</span>( ec.<a class="code" href="group__ExprPkg.html#gac5ced6adc7a60945ea6707ef494aa28f">isRational</a>() || ec.<a class="code" href="group__ExprPkg.html#ga7814e4f55f65c7ca860c637413df5f4d">getKind</a>()==<a class="code" href="namespaceCVC3.html#a32d50a30de0e9e5bc4c2451de0107024ac3c38ad296d5671b7fde3373fdd87ea1">DIVIDE</a> )
<a name="l00272"></a>00272           {
<a name="l00273"></a>00273             s&lt;&lt;<span class="stringliteral">&quot;(pn_mul_&quot;</span>;
<a name="l00274"></a>00274             <span class="keywordflow">if</span>( <a class="code" href="classLFSCObj.html#a81a07dd023d7a37bff9fa514fff9a787">cvc3_mimic</a> &amp;&amp; expr[a].getKind()==<a class="code" href="namespaceCVC3.html#a32d50a30de0e9e5bc4c2451de0107024a0b79738a0067780987896f3b91e8b0f1">UMINUS</a> ){
<a name="l00275"></a>00275               s &lt;&lt; <span class="stringliteral">&quot;u-_&quot;</span>;
<a name="l00276"></a>00276             }
<a name="l00277"></a>00277             s&lt;&lt; <span class="stringliteral">&quot;c_&quot;</span> &lt;&lt; ( a==0 ? <span class="stringliteral">&quot;L&quot;</span> : <span class="stringliteral">&quot;R&quot;</span> );
<a name="l00278"></a>00278             s&lt;&lt;<span class="stringliteral">&quot; _ _ _ &quot;</span>;
<a name="l00279"></a>00279             <a class="code" href="classLFSCPrinter.html#a891d2d3c46415112ac1cfca27ccb4724">print_poly_norm</a>( ec, s, <span class="keyword">false</span>, rNeg );
<a name="l00280"></a>00280             s &lt;&lt; <span class="stringliteral">&quot; &quot;</span>;
<a name="l00281"></a>00281             nrIndex = (1-a);
<a name="l00282"></a>00282             cparen &lt;&lt; <span class="stringliteral">&quot;)&quot;</span>;
<a name="l00283"></a>00283           }
<a name="l00284"></a>00284         }
<a name="l00285"></a>00285       }
<a name="l00286"></a>00286       <span class="keywordflow">if</span>( nrIndex==-1 )
<a name="l00287"></a>00287       {
<a name="l00288"></a>00288         ostringstream ose;
<a name="l00289"></a>00289         ose &lt;&lt; <span class="stringliteral">&quot;ERROR: Multiplying by non-constant &quot;</span> &lt;&lt; expr;
<a name="l00290"></a>00290         <a class="code" href="classObj.html#a7a13d6281d09d895f9db31157fe62f0d">print_error</a>( ose.str().c_str(), s );
<a name="l00291"></a>00291       }
<a name="l00292"></a>00292       <span class="keywordflow">else</span>
<a name="l00293"></a>00293       {
<a name="l00294"></a>00294         <a class="code" href="classLFSCPrinter.html#a891d2d3c46415112ac1cfca27ccb4724">print_poly_norm</a>(expr[nrIndex],s);
<a name="l00295"></a>00295       }
<a name="l00296"></a>00296       s &lt;&lt; cparen.str();
<a name="l00297"></a>00297     }
<a name="l00298"></a>00298     <span class="keywordflow">else</span> <span class="keywordflow">if</span>( expr.<a class="code" href="group__ExprPkg.html#ga7814e4f55f65c7ca860c637413df5f4d">getKind</a>()==<a class="code" href="namespaceCVC3.html#a32d50a30de0e9e5bc4c2451de0107024ac3c38ad296d5671b7fde3373fdd87ea1">DIVIDE</a> )
<a name="l00299"></a>00299     {
<a name="l00300"></a>00300       <span class="comment">//this should be 2 constants</span>
<a name="l00301"></a>00301       <span class="keywordflow">if</span>( expr[0].<a class="code" href="namespaceCVC3.html#ac0334a083d6782caa17ca0d337fddddf">isRational</a>() &amp;&amp; expr[1].<a class="code" href="group__ExprPkg.html#gac5ced6adc7a60945ea6707ef494aa28f">isRational</a>() )
<a name="l00302"></a>00302       {
<a name="l00303"></a>00303         <span class="keywordflow">if</span>( pnRat )
<a name="l00304"></a>00304           s&lt;&lt;<span class="stringliteral">&quot;(pn_const &quot;</span>;
<a name="l00305"></a>00305         <a class="code" href="classCVC3_1_1Rational.html">Rational</a> r = expr[0].<a class="code" href="group__ExprPkg.html#gab0eee70e4a7f97c09954dc61b71b65e5" title="Get the Rational value out of RATIONAL_EXPR.">getRational</a>();
<a name="l00306"></a>00306         <a class="code" href="Util_8cpp.html#a66ede87ea272764bfc26b0d071adb43b">print_rational_divide</a>( ratNeg ? -r : r, expr[1].getRational(), s );
<a name="l00307"></a>00307         <span class="keywordflow">if</span>( pnRat )
<a name="l00308"></a>00308           s &lt;&lt; <span class="stringliteral">&quot;)&quot;</span>;
<a name="l00309"></a>00309       }
<a name="l00310"></a>00310       <span class="keywordflow">else</span>
<a name="l00311"></a>00311       {
<a name="l00312"></a>00312         <a class="code" href="classObj.html#a7a13d6281d09d895f9db31157fe62f0d">print_error</a>(<span class="stringliteral">&quot;ERROR: Pn Dividing by non-constant&quot;</span>, s );
<a name="l00313"></a>00313       }
<a name="l00314"></a>00314     }
<a name="l00315"></a>00315     <span class="keywordflow">else</span>
<a name="l00316"></a>00316     {
<a name="l00317"></a>00317       <span class="comment">//TODO: checks for appropriate op</span>
<a name="l00318"></a>00318       <span class="comment">//cout&lt;&lt;&quot;e0 and e1&quot;&lt;&lt;expr[0]&lt;&lt;&quot; &quot;&lt;&lt;expr[1]&lt;&lt;endl;</span>
<a name="l00319"></a>00319       s&lt;&lt;<span class="stringliteral">&quot;(pn_&quot;</span>&lt;&lt;<a class="code" href="Util_8cpp.html#af0ed1bf9d4012011aa2b42be9c26a0b5">kind_to_str</a>(expr.<a class="code" href="group__ExprPkg.html#ga7814e4f55f65c7ca860c637413df5f4d">getKind</a>())&lt;&lt;<span class="stringliteral">&quot; _ _ _ _ _ &quot;</span>;
<a name="l00320"></a>00320       <a class="code" href="classLFSCPrinter.html#a891d2d3c46415112ac1cfca27ccb4724">print_poly_norm</a>(expr[0],s);
<a name="l00321"></a>00321       s&lt;&lt;<span class="stringliteral">&quot; &quot;</span>;
<a name="l00322"></a>00322       <a class="code" href="classLFSCPrinter.html#a891d2d3c46415112ac1cfca27ccb4724">print_poly_norm</a>(expr[1],s);
<a name="l00323"></a>00323       s&lt;&lt;<span class="stringliteral">&quot;)&quot;</span>;
<a name="l00324"></a>00324     }
<a name="l00325"></a>00325   }<span class="keywordflow">else</span> <span class="keywordflow">if</span>(expr.<a class="code" href="group__ExprPkg.html#ga7814e4f55f65c7ca860c637413df5f4d">getKind</a>()==<a class="code" href="namespaceCVC3.html#a32d50a30de0e9e5bc4c2451de0107024a0b79738a0067780987896f3b91e8b0f1">UMINUS</a> ){
<a name="l00326"></a>00326     <span class="keywordflow">if</span>( !<a class="code" href="classLFSCObj.html#a81a07dd023d7a37bff9fa514fff9a787">cvc3_mimic</a> )
<a name="l00327"></a>00327       <a class="code" href="classLFSCPrinter.html#a891d2d3c46415112ac1cfca27ccb4724">print_poly_norm</a>( expr[0], s, pnRat, !ratNeg );
<a name="l00328"></a>00328     <span class="keywordflow">else</span>{
<a name="l00329"></a>00329       s &lt;&lt; <span class="stringliteral">&quot;(pn_u- _ _ _ &quot;</span>;
<a name="l00330"></a>00330       <a class="code" href="classLFSCPrinter.html#a891d2d3c46415112ac1cfca27ccb4724">print_poly_norm</a>( expr[0], s, pnRat, ratNeg );
<a name="l00331"></a>00331       s &lt;&lt; <span class="stringliteral">&quot;)&quot;</span>;
<a name="l00332"></a>00332     }
<a name="l00333"></a>00333   }<span class="keywordflow">else</span> <span class="keywordflow">if</span>(expr.<a class="code" href="group__ExprPkg.html#gac5ced6adc7a60945ea6707ef494aa28f">isRational</a>()){
<a name="l00334"></a>00334     <span class="keywordflow">if</span>( pnRat )
<a name="l00335"></a>00335       s&lt;&lt;<span class="stringliteral">&quot;(pn_const &quot;</span>;
<a name="l00336"></a>00336     <a class="code" href="classCVC3_1_1Rational.html">Rational</a> r = expr.<a class="code" href="group__ExprPkg.html#gab0eee70e4a7f97c09954dc61b71b65e5" title="Get the Rational value out of RATIONAL_EXPR.">getRational</a>();
<a name="l00337"></a>00337     <a class="code" href="Util_8cpp.html#a64021a0f1532b0f4dfb19867114c6efb">print_rational</a>( ratNeg ? -r : r, s );
<a name="l00338"></a>00338     <span class="keywordflow">if</span>( pnRat )
<a name="l00339"></a>00339       s &lt;&lt; <span class="stringliteral">&quot;)&quot;</span>;
<a name="l00340"></a>00340   }
<a name="l00341"></a>00341   <span class="keywordflow">else</span> <span class="keywordflow">if</span>( expr.<a class="code" href="group__ExprPkg.html#ga7814e4f55f65c7ca860c637413df5f4d">getKind</a>()==<a class="code" href="kinds_8h.html#aa10c9e8951b8ccf714a59ec321bdac5ba73072b2c6fef896d006d6691e932cf37">SKOLEM_VAR</a> )
<a name="l00342"></a>00342   {
<a name="l00343"></a>00343     <span class="keywordtype">bool</span> success = <span class="keyword">false</span>;
<a name="l00344"></a>00344     <span class="keywordflow">if</span>( <a class="code" href="classLFSCObj.html#a43226f1b59b50c73af82f2f1f7a8b2d2">skolem_vars</a>.<a class="code" href="classCVC3_1_1ExprMap.html#ae50ab1874dd63b575553e7db769abe28">find</a>( expr )!=<a class="code" href="classLFSCObj.html#a43226f1b59b50c73af82f2f1f7a8b2d2">skolem_vars</a>.<a class="code" href="classCVC3_1_1ExprMap.html#a283ae6c44308cbdda0d82da5a16e52c8">end</a>() )
<a name="l00345"></a>00345     {
<a name="l00346"></a>00346       <span class="keywordtype">int</span> val = <a class="code" href="classLFSCObj.html#aa8ad0677d224a27c6b7376619a9a037d">d_terms</a>[<a class="code" href="classLFSCObj.html#a43226f1b59b50c73af82f2f1f7a8b2d2">skolem_vars</a>[expr]];
<a name="l00347"></a>00347       <span class="keywordflow">if</span>( val!=0 ){
<a name="l00348"></a>00348         success = <span class="keyword">true</span>;
<a name="l00349"></a>00349         s &lt;&lt; <span class="stringliteral">&quot;(pn_var_atom _ _ @at&quot;</span> &lt;&lt; val &lt;&lt; <span class="stringliteral">&quot;)&quot;</span>;
<a name="l00350"></a>00350       }
<a name="l00351"></a>00351     }
<a name="l00352"></a>00352     <span class="keywordflow">if</span>( !success ){
<a name="l00353"></a>00353       ostringstream ose;
<a name="l00354"></a>00354       ose &lt;&lt; <span class="stringliteral">&quot;Trying to pn_var_atom a non-atomized skolem var &quot;</span> &lt;&lt; expr;
<a name="l00355"></a>00355       <a class="code" href="classObj.html#a7a13d6281d09d895f9db31157fe62f0d">print_error</a>( ose.str().c_str(), cout );
<a name="l00356"></a>00356     }
<a name="l00357"></a>00357   }
<a name="l00358"></a>00358   <span class="keywordflow">else</span> <span class="keywordflow">if</span>( expr.<a class="code" href="group__ExprPkg.html#ga7814e4f55f65c7ca860c637413df5f4d">getKind</a>()==<a class="code" href="kinds_8h.html#aa10c9e8951b8ccf714a59ec321bdac5ba3a4cfaf3eae8eac1dc2fd27d9f0994dc">ITE</a> ){
<a name="l00359"></a>00359     <span class="keywordtype">int</span> val = <a class="code" href="classLFSCObj.html#aa8ad0677d224a27c6b7376619a9a037d">d_terms</a>[expr];
<a name="l00360"></a>00360     <span class="keywordflow">if</span>( val!=0 ){
<a name="l00361"></a>00361       s &lt;&lt; <span class="stringliteral">&quot;(pn_var_atom _ _ @at&quot;</span> &lt;&lt; val &lt;&lt; <span class="stringliteral">&quot;)&quot;</span>;
<a name="l00362"></a>00362     }<span class="keywordflow">else</span>{
<a name="l00363"></a>00363       ostringstream ose;
<a name="l00364"></a>00364       ose &lt;&lt; <span class="stringliteral">&quot;Trying to pn_var_atom a non-atomized ITE &quot;</span> &lt;&lt; expr;
<a name="l00365"></a>00365       <a class="code" href="classObj.html#a7a13d6281d09d895f9db31157fe62f0d">print_error</a>( ose.str().c_str(), cout );
<a name="l00366"></a>00366     }
<a name="l00367"></a>00367   }<span class="keywordflow">else</span> <span class="keywordflow">if</span>(expr.<a class="code" href="group__ExprPkg.html#ga55b6a203b4375e64598306596851d9ae">isVar</a>()){
<a name="l00368"></a>00368     s&lt;&lt;<span class="stringliteral">&quot;(pn_var &quot;</span>&lt;&lt;expr&lt;&lt;<span class="stringliteral">&quot;)&quot;</span>;
<a name="l00369"></a>00369   }
<a name="l00370"></a>00370   <span class="keywordflow">else</span>{
<a name="l00371"></a>00371     ostringstream ose;
<a name="l00372"></a>00372     ose&lt;&lt;<span class="stringliteral">&quot;ERROR printing polynomial norm for &quot;</span>&lt;&lt;expr;
<a name="l00373"></a>00373     <a class="code" href="classObj.html#a7a13d6281d09d895f9db31157fe62f0d">print_error</a>( ose.str().c_str(), s );
<a name="l00374"></a>00374   }
<a name="l00375"></a>00375 }
<a name="l00376"></a>00376 
<a name="l00377"></a>00377 <span class="comment">// recursively prints arithm terms</span>
<a name="l00378"></a><a class="code" href="classLFSCPrinter.html#a81c0275b2b68de34acfd478555775c14">00378</a> <span class="keywordtype">void</span> <a class="code" href="classLFSCPrinter.html#a81c0275b2b68de34acfd478555775c14">LFSCPrinter::print_terms_h</a>( <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; expr,std::ostream&amp; s ){
<a name="l00379"></a>00379   <span class="keywordtype">int</span> val = <a class="code" href="classLFSCPrinter.html#a2916344961fd57a2e5ebecb0a313c67e">d_print_map</a>[expr];
<a name="l00380"></a>00380   <span class="keywordflow">if</span>( val!=0 ){
<a name="l00381"></a>00381     s &lt;&lt; <span class="stringliteral">&quot;@x&quot;</span> &lt;&lt; val;
<a name="l00382"></a>00382   }<span class="keywordflow">else</span> <span class="keywordflow">if</span>(expr.<a class="code" href="group__ExprPkg.html#gac5ced6adc7a60945ea6707ef494aa28f">isRational</a>()){
<a name="l00383"></a>00383     s&lt;&lt;<span class="stringliteral">&quot;(a_real &quot;</span>;
<a name="l00384"></a>00384     <a class="code" href="Util_8cpp.html#a64021a0f1532b0f4dfb19867114c6efb">print_rational</a>( expr.<a class="code" href="group__ExprPkg.html#gab0eee70e4a7f97c09954dc61b71b65e5" title="Get the Rational value out of RATIONAL_EXPR.">getRational</a>(), s );
<a name="l00385"></a>00385     s&lt;&lt;<span class="stringliteral">&quot;)&quot;</span>;
<a name="l00386"></a>00386   }<span class="keywordflow">else</span> <span class="keywordflow">if</span>(expr.<a class="code" href="group__ExprPkg.html#ga55b6a203b4375e64598306596851d9ae">isVar</a>()){
<a name="l00387"></a>00387     s&lt;&lt;<span class="stringliteral">&quot;(a_var_real &quot;</span>&lt;&lt;expr&lt;&lt;<span class="stringliteral">&quot;)&quot;</span>;
<a name="l00388"></a>00388   }<span class="keywordflow">else</span> <span class="keywordflow">if</span>(expr.<a class="code" href="group__ExprPkg.html#ga28b901d05e52a5c646f83a95cc74f94b">arity</a>()==2 ){
<a name="l00389"></a>00389     <span class="keywordflow">if</span>( expr.<a class="code" href="group__ExprPkg.html#ga7814e4f55f65c7ca860c637413df5f4d">getKind</a>()==<a class="code" href="namespaceCVC3.html#a32d50a30de0e9e5bc4c2451de0107024ac3c38ad296d5671b7fde3373fdd87ea1">DIVIDE</a> ){
<a name="l00390"></a>00390       <span class="keywordflow">if</span>( expr[0].<a class="code" href="namespaceCVC3.html#ac0334a083d6782caa17ca0d337fddddf">isRational</a>() &amp;&amp; expr[1].<a class="code" href="group__ExprPkg.html#gac5ced6adc7a60945ea6707ef494aa28f">isRational</a>() ){
<a name="l00391"></a>00391         s&lt;&lt;<span class="stringliteral">&quot;(a_real &quot;</span>;
<a name="l00392"></a>00392         <a class="code" href="Util_8cpp.html#a66ede87ea272764bfc26b0d071adb43b">print_rational_divide</a>( expr[0].getRational(), expr[1].getRational(), s );
<a name="l00393"></a>00393         s&lt;&lt;<span class="stringliteral">&quot;)&quot;</span>;
<a name="l00394"></a>00394       }<span class="keywordflow">else</span>{
<a name="l00395"></a>00395         <a class="code" href="classObj.html#a7a13d6281d09d895f9db31157fe62f0d">print_error</a>( <span class="stringliteral">&quot;ERROR: Dividing by non constant&quot;</span>, s );
<a name="l00396"></a>00396       }
<a name="l00397"></a>00397     }<span class="keywordflow">else</span>{
<a name="l00398"></a>00398       <span class="comment">//TODO: checks for appropriate op</span>
<a name="l00399"></a>00399       s&lt;&lt;<span class="stringliteral">&quot;(&quot;</span>&lt;&lt;<a class="code" href="Util_8cpp.html#af0ed1bf9d4012011aa2b42be9c26a0b5">kind_to_str</a>(expr.<a class="code" href="group__ExprPkg.html#ga7814e4f55f65c7ca860c637413df5f4d">getKind</a>())&lt;&lt;<span class="stringliteral">&quot;_Real &quot;</span>;
<a name="l00400"></a>00400       <a class="code" href="classLFSCPrinter.html#a81c0275b2b68de34acfd478555775c14">print_terms_h</a>(expr[0],s);
<a name="l00401"></a>00401       s&lt;&lt; <span class="stringliteral">&quot; &quot;</span>;
<a name="l00402"></a>00402       <a class="code" href="classLFSCPrinter.html#a81c0275b2b68de34acfd478555775c14">print_terms_h</a>(expr[1],s);
<a name="l00403"></a>00403       s&lt;&lt;<span class="stringliteral">&quot;)&quot;</span>;
<a name="l00404"></a>00404     }
<a name="l00405"></a>00405   }<span class="keywordflow">else</span> <span class="keywordflow">if</span>( expr.<a class="code" href="group__ExprPkg.html#ga7814e4f55f65c7ca860c637413df5f4d">getKind</a>()==<a class="code" href="kinds_8h.html#aa10c9e8951b8ccf714a59ec321bdac5ba3a4cfaf3eae8eac1dc2fd27d9f0994dc">ITE</a> ){
<a name="l00406"></a>00406     s &lt;&lt; <span class="stringliteral">&quot;(ite Real &quot;</span>;
<a name="l00407"></a>00407     <a class="code" href="classLFSCPrinter.html#ab1c88d9dd182df30352f3ab702a0608f">print_formula_h</a>( expr[0], s );
<a name="l00408"></a>00408     s &lt;&lt; <span class="stringliteral">&quot; &quot;</span>;
<a name="l00409"></a>00409     <a class="code" href="classLFSCPrinter.html#a81c0275b2b68de34acfd478555775c14">print_terms_h</a>( expr[1], s );
<a name="l00410"></a>00410     s &lt;&lt; <span class="stringliteral">&quot; &quot;</span>;
<a name="l00411"></a>00411     <a class="code" href="classLFSCPrinter.html#a81c0275b2b68de34acfd478555775c14">print_terms_h</a>( expr[2], s );
<a name="l00412"></a>00412     s &lt;&lt; <span class="stringliteral">&quot;)&quot;</span>;
<a name="l00413"></a>00413   }<span class="keywordflow">else</span> <span class="keywordflow">if</span>( expr.<a class="code" href="group__ExprPkg.html#ga7814e4f55f65c7ca860c637413df5f4d">getKind</a>()==<a class="code" href="namespaceCVC3.html#a32d50a30de0e9e5bc4c2451de0107024a0b79738a0067780987896f3b91e8b0f1">UMINUS</a> ){
<a name="l00414"></a>00414     <span class="keywordflow">if</span>( !<a class="code" href="classLFSCObj.html#a81a07dd023d7a37bff9fa514fff9a787">cvc3_mimic</a> ){ 
<a name="l00415"></a>00415       s&lt;&lt;<span class="stringliteral">&quot;(a_real &quot;</span>;
<a name="l00416"></a>00416       <span class="keywordflow">if</span>( expr[0].<a class="code" href="namespaceCVC3.html#ac0334a083d6782caa17ca0d337fddddf">isRational</a>() ){
<a name="l00417"></a>00417         <a class="code" href="classCVC3_1_1Rational.html">Rational</a> r = expr[0].<a class="code" href="group__ExprPkg.html#gab0eee70e4a7f97c09954dc61b71b65e5" title="Get the Rational value out of RATIONAL_EXPR.">getRational</a>();
<a name="l00418"></a>00418         r = -r;
<a name="l00419"></a>00419         <a class="code" href="Util_8cpp.html#a64021a0f1532b0f4dfb19867114c6efb">print_rational</a>( r, s );
<a name="l00420"></a>00420       }<span class="keywordflow">else</span> <span class="keywordflow">if</span>( expr[0].getKind()==<a class="code" href="namespaceCVC3.html#a32d50a30de0e9e5bc4c2451de0107024ac3c38ad296d5671b7fde3373fdd87ea1">DIVIDE</a> &amp;&amp; expr[0][0].<a class="code" href="namespaceCVC3.html#ac0334a083d6782caa17ca0d337fddddf">isRational</a>() &amp;&amp; expr[0][1].<a class="code" href="namespaceCVC3.html#ac0334a083d6782caa17ca0d337fddddf">isRational</a>() ){
<a name="l00421"></a>00421         <a class="code" href="Util_8cpp.html#a66ede87ea272764bfc26b0d071adb43b">print_rational_divide</a>( -expr[0][0].getRational(), expr[0][1].getRational(), s );
<a name="l00422"></a>00422       }<span class="keywordflow">else</span>{
<a name="l00423"></a>00423         cout &lt;&lt; <span class="stringliteral">&quot;cannot determine rational &quot;</span> &lt;&lt; expr &lt;&lt; <a class="code" href="group__ExprStream__Manip.html#ga05b0ea7353ec24fa8e7e272d7a7875d8" title="Print the end-of-line.">endl</a>;
<a name="l00424"></a>00424       }
<a name="l00425"></a>00425       s&lt;&lt;<span class="stringliteral">&quot;)&quot;</span>;
<a name="l00426"></a>00426     }<span class="keywordflow">else</span>{
<a name="l00427"></a>00427       s&lt;&lt;<span class="stringliteral">&quot;(u-_Real &quot;</span>;
<a name="l00428"></a>00428       <a class="code" href="classLFSCPrinter.html#a81c0275b2b68de34acfd478555775c14">print_terms_h</a>( expr[0], s );
<a name="l00429"></a>00429       s&lt;&lt;<span class="stringliteral">&quot;)&quot;</span>;
<a name="l00430"></a>00430     }
<a name="l00431"></a>00431   }<span class="keywordflow">else</span> <span class="keywordflow">if</span>(expr.<a class="code" href="group__ExprPkg.html#ga28b901d05e52a5c646f83a95cc74f94b">arity</a>()&gt;2){
<a name="l00432"></a>00432     <span class="comment">//cout&lt;&lt;&quot;term debug&quot;&lt;&lt;expr&lt;&lt;&quot; &quot;&lt;&lt;expr.arity()&lt;&lt;endl;</span>
<a name="l00433"></a>00433     vector&lt;Expr&gt; kids = expr.<a class="code" href="group__ExprPkg.html#ga1e18ae89889e781591eb2874a4196b73">getKids</a>();
<a name="l00434"></a>00434     vector&lt;Expr&gt;::iterator i = kids.begin(), iend= kids.end();
<a name="l00435"></a>00435     <span class="keywordflow">while</span>(i+1!=iend){
<a name="l00436"></a>00436       s&lt;&lt;<span class="stringliteral">&quot;(&quot;</span>&lt;&lt;<a class="code" href="Util_8cpp.html#af0ed1bf9d4012011aa2b42be9c26a0b5">kind_to_str</a>(expr.<a class="code" href="group__ExprPkg.html#ga7814e4f55f65c7ca860c637413df5f4d">getKind</a>())&lt;&lt;<span class="stringliteral">&quot;_Real &quot;</span>;
<a name="l00437"></a>00437       <a class="code" href="classLFSCPrinter.html#a81c0275b2b68de34acfd478555775c14">print_terms_h</a>(*i,s);
<a name="l00438"></a>00438       i++;
<a name="l00439"></a>00439       s &lt;&lt; <span class="stringliteral">&quot; &quot;</span>;
<a name="l00440"></a>00440     }
<a name="l00441"></a>00441     <a class="code" href="classLFSCPrinter.html#a81c0275b2b68de34acfd478555775c14">print_terms_h</a>(*i,s);
<a name="l00442"></a>00442     <span class="keywordflow">for</span>(<span class="keywordtype">int</span> j=0; j&lt;expr.<a class="code" href="group__ExprPkg.html#ga28b901d05e52a5c646f83a95cc74f94b">arity</a>();j++){
<a name="l00443"></a>00443       s&lt;&lt;<span class="stringliteral">&quot;)&quot;</span>;
<a name="l00444"></a>00444 
<a name="l00445"></a>00445     }
<a name="l00446"></a>00446   }<span class="keywordflow">else</span>{
<a name="l00447"></a>00447     ostringstream os;
<a name="l00448"></a>00448     os &lt;&lt; <span class="stringliteral">&quot;ERROR printing term &quot;</span>&lt;&lt;expr&lt;&lt;<span class="stringliteral">&quot; &quot;</span>&lt;&lt;expr.<a class="code" href="group__ExprPkg.html#ga28b901d05e52a5c646f83a95cc74f94b">arity</a>();
<a name="l00449"></a>00449     <a class="code" href="classObj.html#a7a13d6281d09d895f9db31157fe62f0d">print_error</a>( os.str().c_str(), s );
<a name="l00450"></a>00450   }
<a name="l00451"></a>00451 }
<a name="l00452"></a>00452 
<a name="l00453"></a><a class="code" href="classLFSCPrinter.html#ab1c88d9dd182df30352f3ab702a0608f">00453</a> <span class="keywordtype">void</span> <a class="code" href="classLFSCPrinter.html#ab1c88d9dd182df30352f3ab702a0608f">LFSCPrinter::print_formula_h</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; clause, std::ostream&amp; s){
<a name="l00454"></a>00454   <span class="keywordtype">int</span> val = <a class="code" href="classLFSCPrinter.html#a2916344961fd57a2e5ebecb0a313c67e">d_print_map</a>[clause];
<a name="l00455"></a>00455   <span class="keywordflow">if</span>( val!=0 ){
<a name="l00456"></a>00456     s &lt;&lt; <span class="stringliteral">&quot;@f&quot;</span> &lt;&lt; val;
<a name="l00457"></a>00457   }<span class="keywordflow">else</span> <span class="keywordflow">if</span>(clause.<a class="code" href="group__ExprPkg.html#ga1a898858ccadce833df5a294c7740f11">isNot</a>()){
<a name="l00458"></a>00458     s&lt;&lt;<span class="stringliteral">&quot;(not &quot;</span>;
<a name="l00459"></a>00459     <a class="code" href="classLFSCPrinter.html#ab1c88d9dd182df30352f3ab702a0608f">print_formula_h</a>(clause[0],s);
<a name="l00460"></a>00460     s&lt;&lt;<span class="stringliteral">&quot;)&quot;</span>;
<a name="l00461"></a>00461   }<span class="keywordflow">else</span> <span class="keywordflow">if</span>(clause.<a class="code" href="group__ExprPkg.html#ga36f1eff876808586db368dc1b6da5f56">isOr</a>()){
<a name="l00462"></a>00462     s&lt;&lt;<span class="stringliteral">&quot;(or &quot;</span>;
<a name="l00463"></a>00463     <a class="code" href="classLFSCPrinter.html#ab1c88d9dd182df30352f3ab702a0608f">print_formula_h</a>(clause[0],s);
<a name="l00464"></a>00464     s &lt;&lt; <span class="stringliteral">&quot; &quot;</span>;
<a name="l00465"></a>00465     <a class="code" href="classLFSCPrinter.html#ab1c88d9dd182df30352f3ab702a0608f">print_formula_h</a>(clause[1],s);
<a name="l00466"></a>00466     s&lt;&lt;<span class="stringliteral">&quot;)&quot;</span>;
<a name="l00467"></a>00467   }<span class="keywordflow">else</span> <span class="keywordflow">if</span>(clause.<a class="code" href="group__ExprPkg.html#ga383260cf4f8919728e2712e6e11f21fa">isAnd</a>()){
<a name="l00468"></a>00468     s&lt;&lt;<span class="stringliteral">&quot;(and &quot;</span>;
<a name="l00469"></a>00469     <a class="code" href="classLFSCPrinter.html#ab1c88d9dd182df30352f3ab702a0608f">print_formula_h</a>(clause[0],s);
<a name="l00470"></a>00470     s &lt;&lt; <span class="stringliteral">&quot; &quot;</span>;
<a name="l00471"></a>00471     <a class="code" href="classLFSCPrinter.html#ab1c88d9dd182df30352f3ab702a0608f">print_formula_h</a>(clause[1],s);
<a name="l00472"></a>00472     s&lt;&lt;<span class="stringliteral">&quot;)&quot;</span>;
<a name="l00473"></a>00473   }<span class="keywordflow">else</span> <span class="keywordflow">if</span>(clause.<a class="code" href="group__ExprPkg.html#ga9067c706c6454ea1761ace7d7837af46">isImpl</a>()){
<a name="l00474"></a>00474     s&lt;&lt;<span class="stringliteral">&quot;(impl &quot;</span>;
<a name="l00475"></a>00475     <a class="code" href="classLFSCPrinter.html#ab1c88d9dd182df30352f3ab702a0608f">print_formula_h</a>(clause[0],s);
<a name="l00476"></a>00476     s &lt;&lt; <span class="stringliteral">&quot; &quot;</span>;
<a name="l00477"></a>00477     <a class="code" href="classLFSCPrinter.html#ab1c88d9dd182df30352f3ab702a0608f">print_formula_h</a>(clause[1],s);
<a name="l00478"></a>00478     s&lt;&lt;<span class="stringliteral">&quot;)&quot;</span>;
<a name="l00479"></a>00479   }<span class="keywordflow">else</span> <span class="keywordflow">if</span>(clause.<a class="code" href="group__ExprPkg.html#gabe385fb97505cccb75702378511c5375">isIff</a>()){
<a name="l00480"></a>00480     s&lt;&lt;<span class="stringliteral">&quot;(iff &quot;</span>;
<a name="l00481"></a>00481     <a class="code" href="classLFSCPrinter.html#ab1c88d9dd182df30352f3ab702a0608f">print_formula_h</a>(clause[0],s);
<a name="l00482"></a>00482     s &lt;&lt; <span class="stringliteral">&quot; &quot;</span>;
<a name="l00483"></a>00483     <a class="code" href="classLFSCPrinter.html#ab1c88d9dd182df30352f3ab702a0608f">print_formula_h</a>(clause[1],s);
<a name="l00484"></a>00484     s&lt;&lt;<span class="stringliteral">&quot;)&quot;</span>;
<a name="l00485"></a>00485   }<span class="keywordflow">else</span> <span class="keywordflow">if</span>(clause.<a class="code" href="group__ExprPkg.html#ga7814e4f55f65c7ca860c637413df5f4d">getKind</a>()==<a class="code" href="kinds_8h.html#aa10c9e8951b8ccf714a59ec321bdac5ba3a4cfaf3eae8eac1dc2fd27d9f0994dc">ITE</a>){
<a name="l00486"></a>00486     s&lt;&lt;<span class="stringliteral">&quot;(ifte &quot;</span>;
<a name="l00487"></a>00487     <a class="code" href="classLFSCPrinter.html#ab1c88d9dd182df30352f3ab702a0608f">print_formula_h</a>( clause[0], s );
<a name="l00488"></a>00488     s &lt;&lt; <span class="stringliteral">&quot; &quot;</span>;
<a name="l00489"></a>00489     <a class="code" href="classLFSCPrinter.html#ab1c88d9dd182df30352f3ab702a0608f">print_formula_h</a>( clause[1], s );
<a name="l00490"></a>00490     s &lt;&lt; <span class="stringliteral">&quot; &quot;</span>;
<a name="l00491"></a>00491     <a class="code" href="classLFSCPrinter.html#ab1c88d9dd182df30352f3ab702a0608f">print_formula_h</a>( clause[2], s );
<a name="l00492"></a>00492     s &lt;&lt; <span class="stringliteral">&quot;)&quot;</span>;
<a name="l00493"></a>00493   }<span class="keywordflow">else</span> <span class="keywordflow">if</span>( <a class="code" href="Util_8cpp.html#a5462f02c7d83367f4d9e1b99f1975cb7">is_eq_kind</a>( clause.<a class="code" href="group__ExprPkg.html#ga7814e4f55f65c7ca860c637413df5f4d">getKind</a>() ) ){
<a name="l00494"></a>00494     <span class="keywordtype">int</span> k = clause.<a class="code" href="group__ExprPkg.html#ga7814e4f55f65c7ca860c637413df5f4d">getKind</a>();
<a name="l00495"></a>00495     s&lt;&lt;<span class="stringliteral">&quot;(&quot;</span>&lt;&lt;<a class="code" href="Util_8cpp.html#af0ed1bf9d4012011aa2b42be9c26a0b5">kind_to_str</a>(k);
<a name="l00496"></a>00496     s&lt;&lt;(<a class="code" href="Util_8cpp.html#af74f6bead5859a676a98fa1759117c3b">is_smt_kind</a>( k ) ? <span class="stringliteral">&quot; &quot;</span> : <span class="stringliteral">&quot;_&quot;</span> );
<a name="l00497"></a>00497     s&lt;&lt;<span class="stringliteral">&quot;Real &quot;</span>;
<a name="l00498"></a>00498     <a class="code" href="classLFSCPrinter.html#a81c0275b2b68de34acfd478555775c14">print_terms_h</a>(clause[0],s);
<a name="l00499"></a>00499     s &lt;&lt; <span class="stringliteral">&quot; &quot;</span>;
<a name="l00500"></a>00500     <a class="code" href="classLFSCPrinter.html#a81c0275b2b68de34acfd478555775c14">print_terms_h</a>(clause[1],s);
<a name="l00501"></a>00501     s&lt;&lt;<span class="stringliteral">&quot;)&quot;</span>;
<a name="l00502"></a>00502   }<span class="keywordflow">else</span> <span class="keywordflow">if</span>( clause.<a class="code" href="group__ExprPkg.html#ga6173f64b22cba76472cd0c814bbf6dae">isFalse</a>() ){
<a name="l00503"></a>00503     s &lt;&lt; <span class="stringliteral">&quot;false&quot;</span>;
<a name="l00504"></a>00504   }<span class="keywordflow">else</span> <span class="keywordflow">if</span>( clause.<a class="code" href="group__ExprPkg.html#gadf8596df73fa69ff8e6a22b9321f5c34">isTrue</a>() ){
<a name="l00505"></a>00505     s &lt;&lt; <span class="stringliteral">&quot;true&quot;</span>;
<a name="l00506"></a>00506   }<span class="keywordflow">else</span>{
<a name="l00507"></a>00507     s &lt;&lt; clause;
<a name="l00508"></a>00508   }
<a name="l00509"></a>00509 }
<a name="l00510"></a>00510 
<a name="l00511"></a><a class="code" href="classLFSCPrinter.html#a411ca081d553c254903811d65e56b6d2">00511</a> <span class="keywordtype">void</span> <a class="code" href="classLFSCPrinter.html#a411ca081d553c254903811d65e56b6d2">LFSCPrinter::make_let_map</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="l00512"></a>00512   <span class="keywordflow">if</span>( e.<a class="code" href="group__ExprPkg.html#ga28b901d05e52a5c646f83a95cc74f94b">arity</a>()&lt;=1 || <a class="code" href="classLFSCPrinter.html#a2c18450d20b692790f011b926b973701">d_print_visited_map</a>.<a class="code" href="classCVC3_1_1ExprMap.html#ae50ab1874dd63b575553e7db769abe28">find</a>( e )==<a class="code" href="classLFSCPrinter.html#a2c18450d20b692790f011b926b973701">d_print_visited_map</a>.<a class="code" href="classCVC3_1_1ExprMap.html#a283ae6c44308cbdda0d82da5a16e52c8">end</a>() ){
<a name="l00513"></a>00513     <span class="keywordflow">for</span>( <span class="keywordtype">int</span> a=0; a&lt;(int)e.<a class="code" href="group__ExprPkg.html#ga28b901d05e52a5c646f83a95cc74f94b">arity</a>(); a++ ){
<a name="l00514"></a>00514       <a class="code" href="classLFSCPrinter.html#a411ca081d553c254903811d65e56b6d2">make_let_map</a>( e[a] );
<a name="l00515"></a>00515     }
<a name="l00516"></a>00516     <span class="keywordflow">if</span>( e.<a class="code" href="group__ExprPkg.html#ga28b901d05e52a5c646f83a95cc74f94b">arity</a>()&gt;1 ){
<a name="l00517"></a>00517       <span class="keywordflow">if</span>( <a class="code" href="classLFSCPrinter.html#a2916344961fd57a2e5ebecb0a313c67e">d_print_map</a>[e]==0 ){
<a name="l00518"></a>00518         <a class="code" href="classLFSCPrinter.html#a2916344961fd57a2e5ebecb0a313c67e">d_print_map</a>[e] = <a class="code" href="classLFSCPrinter.html#a185f22113db67fdde7adffb3b31bb903">let_i</a>;
<a name="l00519"></a>00519         <a class="code" href="classLFSCPrinter.html#a185f22113db67fdde7adffb3b31bb903">let_i</a>++;
<a name="l00520"></a>00520       }
<a name="l00521"></a>00521       <a class="code" href="classLFSCPrinter.html#a2c18450d20b692790f011b926b973701">d_print_visited_map</a>[e] = <span class="keyword">true</span>;
<a name="l00522"></a>00522     }
<a name="l00523"></a>00523   }
<a name="l00524"></a>00524 }
</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>