<!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: LFSCConvert.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">LFSCConvert.h</div> </div> </div> <div class="contents"> <a href="LFSCConvert_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_CONVERT_H_</span> <a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define LFSC_CONVERT_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 <a name="l00006"></a><a class="code" href="classLFSCConvert.html">00006</a> <span class="keyword">class </span><a class="code" href="classLFSCConvert.html">LFSCConvert</a> : <span class="keyword">public</span> <a class="code" href="classLFSCObj.html">LFSCObj</a> <a name="l00007"></a>00007 { <a name="l00008"></a>00008 <span class="keyword">private</span>: <a name="l00009"></a>00009 <span class="comment">//the converted LFSCProof</span> <a name="l00010"></a><a class="code" href="classLFSCConvert.html#ac93000eef387bdfa14a2b3994a241c00">00010</a> <a class="code" href="classRefPtr.html">RefPtr< LFSCProof ></a> <a class="code" href="classLFSCConvert.html#ac93000eef387bdfa14a2b3994a241c00">pfinal</a>; <a name="l00011"></a>00011 <span class="comment">// translations of proofs for cvc3_to_lfsc : if a proof has already been done,</span> <a name="l00012"></a>00012 <span class="comment">// return the TReturn store for it</span> <a name="l00013"></a><a class="code" href="classLFSCConvert.html#a10db6bada50083de6660a11f68e4431d">00013</a> <a class="code" href="classCVC3_1_1ExprMap.html">ExprMap<bool></a> <a class="code" href="classLFSCConvert.html#a10db6bada50083de6660a11f68e4431d">d_th_trans</a>; <a name="l00014"></a><a class="code" href="classLFSCConvert.html#a21833bc8f1a0982794266a2f24abf3d8">00014</a> <a class="code" href="classCVC3_1_1ExprMap.html">ExprMap<TReturn*></a> <a class="code" href="classLFSCConvert.html#a21833bc8f1a0982794266a2f24abf3d8">d_th_trans_map</a>[2]; <a name="l00015"></a>00015 <span class="comment">// these are the current TReturns we need to make into lambdas</span> <a name="l00016"></a><a class="code" href="classLFSCConvert.html#ab6740d10097cad6ab22f2d5976163c30">00016</a> std::map<TReturn*, bool> <a class="code" href="classLFSCConvert.html#ab6740d10097cad6ab22f2d5976163c30">d_th_trans_lam</a>[2]; <a name="l00017"></a>00017 <span class="comment">//counts for theory/non-theory</span> <a name="l00018"></a><a class="code" href="classLFSCConvert.html#a56e0bda1943b3a0dbe37fedb9ec95bb7">00018</a> <span class="keywordtype">int</span> <a class="code" href="classLFSCConvert.html#a56e0bda1943b3a0dbe37fedb9ec95bb7">nodeCount</a>; <a name="l00019"></a><a class="code" href="classLFSCConvert.html#ad79a7dc7af33a6a7f0168d7c5ed9a60e">00019</a> <span class="keywordtype">int</span> <a class="code" href="classLFSCConvert.html#ad79a7dc7af33a6a7f0168d7c5ed9a60e">nodeCountTh</a>; <a name="l00020"></a><a class="code" href="classLFSCConvert.html#a30a3b3353b977cc9b3e359f3aa8e2876">00020</a> <span class="keywordtype">int</span> <a class="code" href="classLFSCConvert.html#a30a3b3353b977cc9b3e359f3aa8e2876">unodeCount</a>; <a name="l00021"></a><a class="code" href="classLFSCConvert.html#afc452237398520ff33c13c05d95d3083">00021</a> <span class="keywordtype">int</span> <a class="code" href="classLFSCConvert.html#afc452237398520ff33c13c05d95d3083">unodeCountTh</a>; <a name="l00022"></a>00022 <span class="comment">//whether to ignore theory lemmas</span> <a name="l00023"></a><a class="code" href="classLFSCConvert.html#a49a4bb15eeceb470be396b6742f0c974">00023</a> <span class="keywordtype">bool</span> <a class="code" href="classLFSCConvert.html#a49a4bb15eeceb470be396b6742f0c974">ignore_theory_lemmas</a>; <a name="l00024"></a>00024 <a name="l00025"></a>00025 <span class="comment">// other helper methods</span> <a name="l00026"></a>00026 <span class="keywordtype">bool</span> <a class="code" href="classLFSCConvert.html#a07f851b2f599d57a9eb6406939486a49">isTrivialTheoryAxiom</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>& expr, <span class="keywordtype">bool</span> checkBody = <span class="keyword">false</span> ); <a name="l00027"></a>00027 <span class="keywordtype">bool</span> <a class="code" href="classLFSCConvert.html#a0a154ba73b0cb1d375e4149dcd2178f5">isTrivialBooleanAxiom</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 name="l00028"></a>00028 <span class="keywordtype">bool</span> <a class="code" href="classLFSCConvert.html#a979ce0b6389586f13820f9e02ba5cd85">isIgnoredRule</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 name="l00029"></a>00029 <a name="l00030"></a>00030 <span class="comment">// main method to implement T transformation:</span> <a name="l00031"></a>00031 <span class="comment">// cvc3 proof syntax tree to lfsc proof syntax tree</span> <a name="l00032"></a>00032 <span class="comment">// beneath_lc is whether you are beneath a learned clause</span> <a name="l00033"></a>00033 <span class="comment">// rev_pol is whether you should prove ~psi2 V psi1 in the provesY = 2 case (reverse the implication)</span> <a name="l00034"></a>00034 <a class="code" href="classTReturn.html">TReturn</a>* <a class="code" href="classLFSCConvert.html#a70747a7c0f9de54f8d29784fa99c3987">cvc3_to_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, <span class="keywordtype">bool</span> beneath_lc = <span class="keyword">false</span>, <span class="keywordtype">bool</span> rev_pol=<span class="keyword">false</span>); <a name="l00035"></a>00035 <a class="code" href="classTReturn.html">TReturn</a>* <a class="code" href="classLFSCConvert.html#afb93601f9c8e8ca8c09f796af341cf76">cvc3_to_lfsc_h</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>& pf, <span class="keywordtype">bool</span> beneath_lc = <span class="keyword">false</span>, <span class="keywordtype">bool</span> rev_pol=<span class="keyword">false</span>); <a name="l00036"></a>00036 <span class="comment">//do basic subst op procedure</span> <a name="l00037"></a>00037 <a class="code" href="classTReturn.html">TReturn</a>* <a class="code" href="classLFSCConvert.html#a751648ad72a06ae67e86a2cbbf798641">do_bso</a>( <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>& pf, <span class="keywordtype">bool</span> beneath_lc, <span class="keywordtype">bool</span> rev_pol, <a class="code" href="classTReturn.html">TReturn</a>* t1, <a class="code" href="classTReturn.html">TReturn</a>* t2, ostringstream& ose ); <a name="l00038"></a>00038 <span class="comment">//get proof type</span> <a name="l00039"></a>00039 <span class="keywordtype">int</span> <a class="code" href="classLFSCConvert.html#ac0a8b733a7e2dcaf23b7489a22c9e171">get_proof_pattern</a>( <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>& pf, <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>& modE ); <a name="l00040"></a>00040 <span class="comment">//make the let proof</span> <a name="l00041"></a>00041 <a class="code" href="classLFSCProof.html">LFSCProof</a>* <a class="code" href="classLFSCConvert.html#a4632b62661448d6fde086cbe7d260398">make_let_proof</a>( <a class="code" href="classLFSCProof.html">LFSCProof</a>* p ); <a name="l00042"></a>00042 <span class="comment">//make trusted</span> <a name="l00043"></a>00043 <a class="code" href="classTReturn.html">TReturn</a>* <a class="code" href="classLFSCConvert.html#a973be3db649311c32e126e0c15c8e51e">make_trusted</a>( <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>& pf ); <a name="l00044"></a>00044 <a name="l00045"></a><a class="code" href="classLFSCConvert.html#af9bfb12729fecdac8e9ce8b301b58209">00045</a> <span class="keyword">virtual</span> <a class="code" href="classLFSCConvert.html#af9bfb12729fecdac8e9ce8b301b58209">~LFSCConvert</a>(){} <a name="l00046"></a>00046 <span class="keyword">public</span>: <a name="l00047"></a>00047 <a class="code" href="classLFSCConvert.html#a7e5801505c585084591a7ed38eb33deb">LFSCConvert</a>( <span class="keywordtype">int</span> lfscm ); <a name="l00048"></a>00048 <span class="comment">//main conversion function</span> <a name="l00049"></a>00049 <span class="keywordtype">void</span> <a class="code" href="classLFSCConvert.html#acedb89ecccd0488bb5e8425aa8ca5a14">convert</a>( <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>& pf ); <a name="l00050"></a>00050 <span class="comment">//get the results</span> <a name="l00051"></a><a class="code" href="classLFSCConvert.html#ad27ba1f700e2b8950d11e4fa8edd325b">00051</a> <a class="code" href="classLFSCProof.html">LFSCProof</a>* <a class="code" href="classLFSCConvert.html#ad27ba1f700e2b8950d11e4fa8edd325b">getLFSCProof</a>() { <span class="keywordflow">return</span> <a class="code" href="classLFSCConvert.html#ac93000eef387bdfa14a2b3994a241c00">pfinal</a>.<a class="code" href="classRefPtr.html#a2b987fbb75b20a1da1bd959325635e7e">get</a>(); } <a name="l00052"></a>00052 }; <a name="l00053"></a>00053 <a name="l00054"></a>00054 <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>