<!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.h Source File</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="doxygen.css" rel="stylesheet" type="text/css"/> </head> <body> <!-- Generated by Doxygen 1.7.4 --> <div id="top"> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">CVC3 <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 Page</span></a></li> <li><a href="pages.html"><span>Related 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 List</span></a></li> <li><a href="globals.html"><span>File Members</span></a></li> </ul> </div> <div class="header"> <div class="headertitle"> <div class="title">LFSCPrinter.h</div> </div> </div> <div class="contents"> <a href="LFSCPrinter_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef LFSC_PRINTER_H_</span> <a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define LFSC_PRINTER_H_</span> <a name="l00003"></a>00003 <span class="preprocessor"></span> <a name="l00004"></a>00004 <span class="preprocessor">#include "<a class="code" href="TReturn_8h.html">TReturn.h</a>"</span> <a name="l00005"></a>00005 <span class="preprocessor">#include "<a class="code" href="LFSCConvert_8h.html">LFSCConvert.h</a>"</span> <a name="l00006"></a>00006 <a name="l00007"></a><a class="code" href="classLFSCPrinter.html">00007</a> <span class="keyword">class </span><a class="code" href="classLFSCPrinter.html">LFSCPrinter</a> : <span class="keyword">public</span> <a class="code" href="classLFSCObj.html">LFSCObj</a>{ <a name="l00008"></a>00008 <span class="keyword">private</span>: <a name="l00009"></a>00009 <span class="comment">//user assumptions</span> <a name="l00010"></a><a class="code" href="classLFSCPrinter.html#a4e399466cf7f1cfe191ad238ed0a3f07">00010</a> std::vector <Expr> <a class="code" href="classLFSCPrinter.html#a4e399466cf7f1cfe191ad238ed0a3f07">d_user_assumptions</a>; <a name="l00011"></a>00011 <span class="comment">//the converter object</span> <a name="l00012"></a><a class="code" href="classLFSCPrinter.html#a93694bfb6a553f8f34d9b4fc9a1f7d7e">00012</a> <a class="code" href="classRefPtr.html">RefPtr< LFSCConvert ></a> <a class="code" href="classLFSCPrinter.html#a93694bfb6a553f8f34d9b4fc9a1f7d7e">converter</a>; <a name="l00013"></a>00013 <span class="comment">//count for lets</span> <a name="l00014"></a><a class="code" href="classLFSCPrinter.html#a185f22113db67fdde7adffb3b31bb903">00014</a> <span class="keywordtype">int</span> <a class="code" href="classLFSCPrinter.html#a185f22113db67fdde7adffb3b31bb903">let_i</a>; <a name="l00015"></a>00015 <span class="comment">//common proof rules (need this?)</span> <a name="l00016"></a><a class="code" href="classLFSCPrinter.html#a5d8e71cb63c19020dd2e3e7caaf6aa9a">00016</a> <a class="code" href="classCVC3_1_1CommonProofRules.html">CommonProofRules</a>* <a class="code" href="classLFSCPrinter.html#a5d8e71cb63c19020dd2e3e7caaf6aa9a">d_common_pf_rules</a>; <a name="l00017"></a>00017 <span class="comment">//for printing formulas</span> <a name="l00018"></a><a class="code" href="classLFSCPrinter.html#a2916344961fd57a2e5ebecb0a313c67e">00018</a> <a class="code" href="classCVC3_1_1ExprMap.html">ExprMap<int></a> <a class="code" href="classLFSCPrinter.html#a2916344961fd57a2e5ebecb0a313c67e">d_print_map</a>; <a name="l00019"></a><a class="code" href="classLFSCPrinter.html#a2c18450d20b692790f011b926b973701">00019</a> <a class="code" href="classCVC3_1_1ExprMap.html">ExprMap<bool></a> <a class="code" href="classLFSCPrinter.html#a2c18450d20b692790f011b926b973701">d_print_visited_map</a>; <a name="l00020"></a>00020 <span class="comment">//make the expr into possible let's</span> <a name="l00021"></a>00021 <span class="keywordtype">void</span> <a class="code" href="classLFSCPrinter.html#a411ca081d553c254903811d65e56b6d2">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>& e ); <a name="l00022"></a>00022 <span class="comment">//print the polynomial normalization</span> <a name="l00023"></a>00023 <span class="keywordtype">void</span> <a class="code" href="classLFSCPrinter.html#a891d2d3c46415112ac1cfca27ccb4724">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>& expr, std::ostream& s, <span class="keywordtype">bool</span> pnRat = <span class="keyword">true</span>, <span class="keywordtype">bool</span> ratNeg = <span class="keyword">false</span> ); <a name="l00024"></a>00024 <span class="keywordtype">void</span> <a class="code" href="classLFSCPrinter.html#a81c0275b2b68de34acfd478555775c14">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>& expr,std::ostream& s ); <a name="l00025"></a>00025 <span class="keywordtype">void</span> <a class="code" href="classLFSCPrinter.html#ab1c88d9dd182df30352f3ab702a0608f">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>& clause, std::ostream& s ); <a name="l00026"></a>00026 <span class="keyword">public</span>: <a name="l00027"></a>00027 <a class="code" href="classLFSCPrinter.html#aeddb67b48143c3bb632f49794a8f9f15">LFSCPrinter</a>(<span class="keyword">const</span> <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<Expr> assumps, <span class="keywordtype">int</span> lfscm, <a class="code" href="classCVC3_1_1CommonProofRules.html">CommonProofRules</a>* commonRules); <a name="l00028"></a>00028 <a name="l00029"></a>00029 <span class="comment">//print the LFSC proof for the cvc3 proof</span> <a name="l00030"></a>00030 <span class="keywordtype">void</span> <a class="code" href="classLFSCPrinter.html#a726e72561b6c3dc2257af189667c17a6">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>& pf_expr); <a name="l00031"></a>00031 <a name="l00032"></a>00032 <span class="comment">//this is an expression that will be printed</span> <a name="l00033"></a><a class="code" href="classLFSCPrinter.html#ad48a25f1c4ed18de22b9f3bdde99f21f">00033</a> <span class="keywordtype">void</span> <a class="code" href="classLFSCPrinter.html#ad48a25f1c4ed18de22b9f3bdde99f21f">set_print_expr</a>( <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>& expr ) { <a class="code" href="classLFSCPrinter.html#a411ca081d553c254903811d65e56b6d2">make_let_map</a>( expr ); } <a name="l00034"></a>00034 <span class="comment">//print expression</span> <a name="l00035"></a><a class="code" href="classLFSCPrinter.html#a3403cdbc9ea3db99b3b49c490a7f8562">00035</a> <span class="keywordtype">void</span> <a class="code" href="classLFSCPrinter.html#a3403cdbc9ea3db99b3b49c490a7f8562">print_expr</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>& expr, std::ostream& s){ <a name="l00036"></a>00036 <span class="keywordflow">if</span>( <a class="code" href="classLFSCObj.html#ace5ae3c05a540f101645ecfbacdd2928">isFormula</a>( expr ) ) <a name="l00037"></a>00037 <a class="code" href="classLFSCPrinter.html#a7fe298845c79612bd07a93c7501ef3c4">print_formula</a>( expr, s ); <a name="l00038"></a>00038 <span class="keywordflow">else</span> <a name="l00039"></a>00039 <a class="code" href="classLFSCPrinter.html#a6958896855c0e0f3dfbc1e014e73fde5">print_terms</a>( expr, s ); <a name="l00040"></a>00040 } <a name="l00041"></a>00041 <span class="comment">//print formula</span> <a name="l00042"></a><a class="code" href="classLFSCPrinter.html#a7fe298845c79612bd07a93c7501ef3c4">00042</a> <span class="keywordtype">void</span> <a class="code" href="classLFSCPrinter.html#a7fe298845c79612bd07a93c7501ef3c4">print_formula</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>& clause, std::ostream& s ){ <a name="l00043"></a>00043 <span class="comment">//if( clause!=cascade_expr( clause, false ) )</span> <a name="l00044"></a>00044 <span class="comment">// cout << "Warning: printing non-cascaded formula " << clause << std::endl;</span> <a name="l00045"></a>00045 <a class="code" href="classLFSCPrinter.html#ab1c88d9dd182df30352f3ab702a0608f">print_formula_h</a>( <a class="code" href="classLFSCObj.html#a9d972614227f1b88721d36b33f04750f">cascade_expr</a>( clause ), s ); <a name="l00046"></a>00046 } <a name="l00047"></a>00047 <span class="comment">//print term</span> <a name="l00048"></a><a class="code" href="classLFSCPrinter.html#a6958896855c0e0f3dfbc1e014e73fde5">00048</a> <span class="keywordtype">void</span> <a class="code" href="classLFSCPrinter.html#a6958896855c0e0f3dfbc1e014e73fde5">print_terms</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>& expr,std::ostream& s ){ <a name="l00049"></a>00049 <span class="comment">//if( expr!=cascade_expr( expr, false ) )</span> <a name="l00050"></a>00050 <span class="comment">// cout << "Warning: printing non-cascaded term " << expr << std::endl;</span> <a name="l00051"></a>00051 <a class="code" href="classLFSCPrinter.html#a81c0275b2b68de34acfd478555775c14">print_terms_h</a>( <a class="code" href="classLFSCObj.html#a9d972614227f1b88721d36b33f04750f">cascade_expr</a>( expr ), s ); <a name="l00052"></a>00052 } <a name="l00053"></a>00053 }; <a name="l00054"></a>00054 <a name="l00055"></a>00055 <a name="l00056"></a>00056 <span class="preprocessor">#endif</span> </pre></div></div> </div> <hr class="footer"/><address class="footer"><small>Generated on Wed Sep 7 2011 for CVC3 by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address> </body> </html>