<!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: LFSCBoolProof.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 <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">LFSCBoolProof.cpp</div> </div> </div> <div class="contents"> <a href="LFSCBoolProof_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 "<a class="code" href="LFSCBoolProof_8h.html">LFSCBoolProof.h</a>"</span> <a name="l00002"></a>00002 <a name="l00003"></a>00003 <span class="preprocessor">#include "<a class="code" href="LFSCUtilProof_8h.html">LFSCUtilProof.h</a>"</span> <a name="l00004"></a>00004 <a name="l00005"></a>00005 <span class="comment">//LFSCBoolRes ...</span> <a name="l00006"></a>00006 <a name="l00007"></a><a class="code" href="classLFSCBoolRes.html#a6d09024324b4d619bd9f34e178ac57d5">00007</a> <span class="keywordtype">void</span> <a class="code" href="classLFSCBoolRes.html#a6d09024324b4d619bd9f34e178ac57d5">LFSCBoolRes::print_pf</a>( std::ostream& s, <span class="keywordtype">int</span> ind ){ <a name="l00008"></a>00008 <span class="keywordflow">if</span>( <a class="code" href="classLFSCBoolRes.html#a3dd333196cf99c1a5771ca50b5d45942">d_col</a> ){ <a name="l00009"></a>00009 s << <span class="stringliteral">"(cRR _ _ _ _ @a"</span> << <a class="code" href="namespaceCVC3.html#a39fc111339d6dffdc98d6a25b68dff0e">abs</a>( <a class="code" href="classLFSCBoolRes.html#aa2fc185fb1a1658b1933b91ae9f10b9c">d_var</a> ); <a name="l00010"></a>00010 s << <span class="stringliteral">" "</span>; <a name="l00011"></a>00011 <a class="code" href="classLFSCBoolRes.html#ae045081b1f204a71e589fb246985f786">d_children</a>[0]->print(s, ind+1); <a name="l00012"></a>00012 s <<<span class="stringliteral">" "</span>; <a name="l00013"></a>00013 <a class="code" href="classLFSCBoolRes.html#ae045081b1f204a71e589fb246985f786">d_children</a>[1]->print(s, ind+1); <a name="l00014"></a>00014 s <<<span class="stringliteral">")"</span>; <a name="l00015"></a>00015 }<span class="keywordflow">else</span>{ <a name="l00016"></a>00016 s <<<span class="stringliteral">"("</span> << (<a class="code" href="classLFSCBoolRes.html#aa2fc185fb1a1658b1933b91ae9f10b9c">d_var</a>>0 ? <span class="stringliteral">"R"</span> : <span class="stringliteral">"Q"</span> ) << <span class="stringliteral">" _ _ "</span>; <a name="l00017"></a>00017 <a class="code" href="classLFSCBoolRes.html#ae045081b1f204a71e589fb246985f786">d_children</a>[0]->print(s, ind+1); <a name="l00018"></a>00018 s <<<span class="stringliteral">" "</span>; <a name="l00019"></a>00019 <a class="code" href="classLFSCBoolRes.html#ae045081b1f204a71e589fb246985f786">d_children</a>[1]->print(s, ind+1); <a name="l00020"></a>00020 s <<<span class="stringliteral">" @b"</span> << <a class="code" href="namespaceCVC3.html#a39fc111339d6dffdc98d6a25b68dff0e">abs</a>( <a class="code" href="classLFSCBoolRes.html#aa2fc185fb1a1658b1933b91ae9f10b9c">d_var</a> ) << <span class="stringliteral">")"</span>; <a name="l00021"></a>00021 } <a name="l00022"></a>00022 } <a name="l00023"></a>00023 <a name="l00024"></a><a class="code" href="classLFSCBoolRes.html#a9b6c2508cb389bd861357b832bde2502">00024</a> <span class="keywordtype">void</span> <a class="code" href="classLFSCBoolRes.html#a9b6c2508cb389bd861357b832bde2502">LFSCBoolRes::print_struct</a>( std::ostream& s, <span class="keywordtype">int</span> ind ){ <a name="l00025"></a>00025 s << <span class="stringliteral">"(res "</span> << <a class="code" href="classLFSCBoolRes.html#aa2fc185fb1a1658b1933b91ae9f10b9c">d_var</a>; <a name="l00026"></a>00026 <a class="code" href="classLFSCBoolRes.html#ae045081b1f204a71e589fb246985f786">d_children</a>[0]->print_structure(s, ind+1); <a name="l00027"></a>00027 s <<<span class="stringliteral">" "</span>; <a name="l00028"></a>00028 <a class="code" href="classLFSCBoolRes.html#ae045081b1f204a71e589fb246985f786">d_children</a>[1]->print_structure(s, ind+1); <a name="l00029"></a>00029 s << <span class="stringliteral">")"</span>; <a name="l00030"></a>00030 } <a name="l00031"></a>00031 <a name="l00032"></a><a class="code" href="classLFSCBoolRes.html#a721ac95de042a1be9fcfe6d7b6e5df71">00032</a> <a class="code" href="classLFSCProof.html">LFSCProof</a>* <a class="code" href="classLFSCBoolRes.html#a721ac95de042a1be9fcfe6d7b6e5df71">LFSCBoolRes::Make</a>(<a class="code" href="classLFSCProof.html">LFSCProof</a>* pf1, <a class="code" href="classLFSCProof.html">LFSCProof</a>* pf2, <span class="keywordtype">int</span> v, <span class="keywordtype">bool</span> col){ <a name="l00033"></a>00033 <span class="keywordflow">if</span>( pf1-><a class="code" href="classLFSCProof.html#a094c8c12bcb8ee3b1ec7a51b5568c355">isTrivial</a>() ) <a name="l00034"></a>00034 <span class="keywordflow">return</span> pf2; <a name="l00035"></a>00035 <span class="keywordflow">else</span> <span class="keywordflow">if</span>( pf2-><a class="code" href="classLFSCProof.html#a094c8c12bcb8ee3b1ec7a51b5568c355">isTrivial</a>() ) <a name="l00036"></a>00036 <span class="keywordflow">return</span> pf1; <a name="l00037"></a>00037 <span class="keywordflow">else</span> <a name="l00038"></a>00038 <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="classLFSCBoolRes.html#ad015663423be640b082ed9d787b011e0">LFSCBoolRes</a>( pf1, pf2, v, col ); <a name="l00039"></a>00039 } <a name="l00040"></a>00040 <a name="l00041"></a><a class="code" href="classLFSCBoolRes.html#af17c4cbbc04604af6bdd4a893d07b1b0">00041</a> <span class="keywordtype">int</span> <a class="code" href="classLFSCBoolRes.html#af17c4cbbc04604af6bdd4a893d07b1b0">LFSCBoolRes::checkBoolRes</a>( std::vector< int >& clause ){ <a name="l00042"></a>00042 std::vector< int > c[2]; <a name="l00043"></a>00043 <span class="keywordflow">for</span>( <span class="keywordtype">int</span> a=0; a<2; a++ ){ <a name="l00044"></a>00044 <a class="code" href="classLFSCBoolRes.html#ae045081b1f204a71e589fb246985f786">d_children</a>[a]->checkBoolRes( c[a] ); <a name="l00045"></a>00045 <span class="keywordtype">bool</span> success = <span class="keyword">false</span>; <a name="l00046"></a>00046 <span class="keywordflow">for</span>( <span class="keywordtype">int</span> b=0; b<(int)c[a].size(); b++ ){ <a name="l00047"></a>00047 <span class="keywordflow">if</span>( c[a][b]==<a class="code" href="classLFSCBoolRes.html#aa2fc185fb1a1658b1933b91ae9f10b9c">d_var</a> ){ <a name="l00048"></a>00048 c[a].erase( c[a].begin() + b, c[a].begin() + b + 1 ); <a name="l00049"></a>00049 b--; <a name="l00050"></a>00050 success = <span class="keyword">true</span>; <a name="l00051"></a>00051 } <a name="l00052"></a>00052 } <a name="l00053"></a>00053 <span class="keywordflow">if</span>( ! success ){ <a name="l00054"></a>00054 <a class="code" href="classObj.html#a7a13d6281d09d895f9db31157fe62f0d">print_error</a>( <span class="stringliteral">"A check-in failed "</span>, cout ); <a name="l00055"></a>00055 <span class="keywordflow">return</span> -1; <a name="l00056"></a>00056 } <a name="l00057"></a>00057 <span class="keywordflow">for</span>( <span class="keywordtype">int</span> b=0; b<(int)c[a].size(); b++ ){ <a name="l00058"></a>00058 <span class="keywordflow">if</span>( std::find( clause.begin(), clause.end(), c[a][b] )==clause.end() ){ <a name="l00059"></a>00059 clause.push_back( c[a][b] ); <a name="l00060"></a>00060 } <a name="l00061"></a>00061 } <a name="l00062"></a>00062 } <a name="l00063"></a>00063 <span class="keywordflow">return</span> 0; <a name="l00064"></a>00064 } <a name="l00065"></a>00065 <a name="l00066"></a><a class="code" href="classLFSCBoolRes.html#ae797c000a0cf94255d99ef40ac24b735">00066</a> <a class="code" href="classLFSCProof.html">LFSCProof</a>* <a class="code" href="classLFSCBoolRes.html#a721ac95de042a1be9fcfe6d7b6e5df71">LFSCBoolRes::Make</a>( <a class="code" href="classLFSCProof.html">LFSCProof</a>* p1, <a class="code" href="classLFSCProof.html">LFSCProof</a>* p2, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>& res, <a name="l00067"></a>00067 <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> cascadeOr ) <a name="l00068"></a>00068 { <a name="l00069"></a>00069 <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> cres = <a class="code" href="classLFSCObj.html#a9d972614227f1b88721d36b33f04750f">cascade_expr</a>( res ); <a name="l00070"></a>00070 <span class="keywordflow">if</span>( cres.<a class="code" href="group__ExprPkg.html#ga7814e4f55f65c7ca860c637413df5f4d">getKind</a>()==<a class="code" href="kinds_8h.html#aa10c9e8951b8ccf714a59ec321bdac5ba96727447c0ad447987df1c6415aef074">OR</a> && cascadeOr ) <a name="l00071"></a>00071 { <a name="l00072"></a>00072 <span class="keywordflow">return</span> <a class="code" href="classLFSCBoolRes.html#a721ac95de042a1be9fcfe6d7b6e5df71">Make</a>( <a class="code" href="classLFSCBoolRes.html#a6313b796f9dbbf3352cdb113eb83d42d">MakeC</a>( p1, cres ), p2, <a class="code" href="classLFSCObj.html#ab0f17f592443a6a15fe2cb7446308e65">queryM</a>( cres ), <span class="keyword">true</span> ); <a name="l00073"></a>00073 } <a name="l00074"></a>00074 <span class="keywordflow">else</span> <span class="keywordflow">if</span>( cres.<a class="code" href="group__ExprPkg.html#ga1a898858ccadce833df5a294c7740f11">isNot</a>() && cres[0].<a class="code" href="group__ExprPkg.html#ga7814e4f55f65c7ca860c637413df5f4d">getKind</a>()==<a class="code" href="kinds_8h.html#aa10c9e8951b8ccf714a59ec321bdac5ba96727447c0ad447987df1c6415aef074">OR</a> && cascadeOr ) <a name="l00075"></a>00075 { <a name="l00076"></a>00076 <span class="keywordflow">return</span> <a class="code" href="classLFSCBoolRes.html#a721ac95de042a1be9fcfe6d7b6e5df71">Make</a>( <a class="code" href="classLFSCBoolRes.html#a6313b796f9dbbf3352cdb113eb83d42d">MakeC</a>( p2, cres[0] ), p1, <a class="code" href="classLFSCObj.html#ab0f17f592443a6a15fe2cb7446308e65">queryM</a>( cres[0] ), <span class="keyword">true</span> ); <a name="l00077"></a>00077 } <a name="l00078"></a>00078 <span class="keywordflow">else</span> <span class="keywordflow">if</span>( cres.<a class="code" href="group__ExprPkg.html#ga1a898858ccadce833df5a294c7740f11">isNot</a>() && cres[0].<a class="code" href="group__ExprPkg.html#ga1a898858ccadce833df5a294c7740f11">isNot</a>() ) <a name="l00079"></a>00079 { <a name="l00080"></a>00080 ostringstream ose; <a name="l00081"></a>00081 ose << <span class="stringliteral">"Error: Resolving on double negation"</span> << cres; <a name="l00082"></a>00082 <a class="code" href="classObj.html#a7a13d6281d09d895f9db31157fe62f0d">print_error</a>( ose.str().c_str(), cout ); <a name="l00083"></a>00083 } <a name="l00084"></a>00084 <span class="keywordtype">int</span> m = <a class="code" href="classLFSCObj.html#ab0f17f592443a6a15fe2cb7446308e65">queryM</a>( cres ); <a name="l00085"></a>00085 <span class="comment">//if( abs( m )==13 ){</span> <a name="l00086"></a>00086 <span class="comment">// cout << endl;</span> <a name="l00087"></a>00087 <span class="comment">// debug_print_res_struct( pf, 0 );</span> <a name="l00088"></a>00088 <span class="comment">//}</span> <a name="l00089"></a>00089 <span class="comment">//cout << "res on " << cres << std::endl;</span> <a name="l00090"></a>00090 <span class="keywordflow">return</span> <a class="code" href="classLFSCBoolRes.html#a721ac95de042a1be9fcfe6d7b6e5df71">Make</a>( p1, p2, m, <span class="keyword">false</span> ); <a name="l00091"></a>00091 } <a name="l00092"></a>00092 <a name="l00093"></a><a class="code" href="classLFSCBoolRes.html#a6313b796f9dbbf3352cdb113eb83d42d">00093</a> <a class="code" href="classLFSCProof.html">LFSCProof</a>* <a class="code" href="classLFSCBoolRes.html#a6313b796f9dbbf3352cdb113eb83d42d">LFSCBoolRes::MakeC</a>( <a class="code" href="classLFSCProof.html">LFSCProof</a>* p, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>& res ){ <a name="l00094"></a>00094 <span class="keywordflow">if</span>( res.<a class="code" href="group__ExprPkg.html#ga36f1eff876808586db368dc1b6da5f56">isOr</a>() ){ <a name="l00095"></a>00095 ostringstream os1, os2; <a name="l00096"></a>00096 <span class="keywordtype">int</span> m = <a class="code" href="classLFSCObj.html#ab0f17f592443a6a15fe2cb7446308e65">queryM</a>( res[0] ); <a name="l00097"></a>00097 os1 << <span class="stringliteral">"(c"</span> << (m>0 ? <span class="stringliteral">"R"</span> : <span class="stringliteral">"Q"</span> ); <a name="l00098"></a>00098 os1 << <span class="stringliteral">" _ _ _ _ @a"</span> << <a class="code" href="namespaceCVC3.html#a39fc111339d6dffdc98d6a25b68dff0e">abs</a>( m ); <a name="l00099"></a>00099 os2 << <span class="stringliteral">")"</span>; <a name="l00100"></a>00100 <span class="keywordflow">return</span> <a class="code" href="classLFSCBoolRes.html#a721ac95de042a1be9fcfe6d7b6e5df71">LFSCProofGeneric::Make</a>( os1.str(), <a class="code" href="classLFSCBoolRes.html#a6313b796f9dbbf3352cdb113eb83d42d">MakeC</a>( p, res[1] ), os2.str() ); <a name="l00101"></a>00101 }<span class="keywordflow">else</span>{ <a name="l00102"></a>00102 ostringstream os1, os2; <a name="l00103"></a>00103 <span class="keywordtype">int</span> m = <a class="code" href="classLFSCObj.html#ab0f17f592443a6a15fe2cb7446308e65">queryM</a>( res ); <a name="l00104"></a>00104 os1 << <span class="stringliteral">"(c"</span> << (m>0 ? <span class="stringliteral">"R"</span> : <span class="stringliteral">"Q"</span> ); <a name="l00105"></a>00105 os1 << <span class="stringliteral">"0 _ _ _ @a"</span> << <a class="code" href="namespaceCVC3.html#a39fc111339d6dffdc98d6a25b68dff0e">abs</a>( m ); <a name="l00106"></a>00106 os2 << <span class="stringliteral">")"</span>; <a name="l00107"></a>00107 <span class="keywordflow">return</span> <a class="code" href="classLFSCBoolRes.html#a721ac95de042a1be9fcfe6d7b6e5df71">LFSCProofGeneric::Make</a>( os1.str(), p, os2.str() ); <a name="l00108"></a>00108 } <a name="l00109"></a>00109 } <a name="l00110"></a>00110 <a name="l00111"></a>00111 <a name="l00112"></a>00112 <span class="comment">// LFSCClausify ...</span> <a name="l00113"></a>00113 <a name="l00114"></a><a class="code" href="classLFSCClausify.html#a571d958b1b69082a99ee3e8c2e1e5a82">00114</a> <span class="keywordtype">void</span> <a class="code" href="classLFSCClausify.html#a571d958b1b69082a99ee3e8c2e1e5a82">LFSCClausify::print_pf</a>( std::ostream& s, <span class="keywordtype">int</span> ind ){ <a name="l00115"></a>00115 s << <span class="stringliteral">"(clausify_form"</span> << (<a class="code" href="classLFSCClausify.html#a84a1963e40def721dc6844f24c6a20f9">d_var</a><0 ? <span class="stringliteral">"_not"</span> : <span class="stringliteral">""</span>) << <span class="stringliteral">" _ _ @a"</span> << <a class="code" href="namespaceCVC3.html#a39fc111339d6dffdc98d6a25b68dff0e">abs</a>( <a class="code" href="classLFSCClausify.html#a84a1963e40def721dc6844f24c6a20f9">d_var</a> ) << <span class="stringliteral">" "</span>; <a name="l00116"></a>00116 <a class="code" href="classLFSCClausify.html#a4860ffb7bc3a8a3273e3a8d474e33d71">d_pf</a>->print( s ); <a name="l00117"></a>00117 s << <span class="stringliteral">")"</span>; <a name="l00118"></a>00118 } <a name="l00119"></a>00119 <a name="l00120"></a>00120 <span class="comment">//p should prove e, return a proof that is the clausal form for e</span> <a name="l00121"></a><a class="code" href="classLFSCClausify.html#abaec88f39f6f56cc6f21887c35b61beb">00121</a> <a class="code" href="classLFSCProof.html">LFSCProof</a>* <a class="code" href="classLFSCClausify.html#a976ffe7504641550090b29a9b5cf5732">LFSCClausify::Make</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 class="code" href="classLFSCProof.html">LFSCProof</a>* p, <span class="keywordtype">bool</span> cascadeOr ) <a name="l00122"></a>00122 { <a name="l00123"></a>00123 <span class="keywordflow">if</span>( cascadeOr ){ <a name="l00124"></a>00124 std::vector< Expr > exprs; <a name="l00125"></a>00125 <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> end; <a name="l00126"></a>00126 <span class="keywordflow">if</span>( e.<a class="code" href="group__ExprPkg.html#ga28b901d05e52a5c646f83a95cc74f94b">arity</a>()>0 ) <a name="l00127"></a>00127 end = <a class="code" href="classLFSCObj.html#a9d972614227f1b88721d36b33f04750f">cascade_expr</a>( e[e.<a class="code" href="group__ExprPkg.html#ga28b901d05e52a5c646f83a95cc74f94b">arity</a>()-1] ); <a name="l00128"></a>00128 <span class="keywordflow">return</span> <a class="code" href="classLFSCClausify.html#af22d08150cb2f47d017ed68e3c31093a">Make_i</a>( <a class="code" href="classLFSCObj.html#a9d972614227f1b88721d36b33f04750f">cascade_expr</a>( e ), p, exprs, end ); <a name="l00129"></a>00129 }<span class="keywordflow">else</span>{ <a name="l00130"></a>00130 <span class="keywordflow">return</span> <a class="code" href="classLFSCClausify.html#a976ffe7504641550090b29a9b5cf5732">Make</a>( <a class="code" href="classLFSCObj.html#ab0f17f592443a6a15fe2cb7446308e65">queryM</a>( e ), p ); <a name="l00131"></a>00131 } <a name="l00132"></a>00132 } <a name="l00133"></a>00133 <a name="l00134"></a><a class="code" href="classLFSCClausify.html#af22d08150cb2f47d017ed68e3c31093a">00134</a> <a class="code" href="classLFSCProof.html">LFSCProof</a>* <a class="code" href="classLFSCClausify.html#af22d08150cb2f47d017ed68e3c31093a">LFSCClausify::Make_i</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 class="code" href="classLFSCProof.html">LFSCProof</a>* p, std::vector< Expr >& exprs, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>& end ) <a name="l00135"></a>00135 { <a name="l00136"></a>00136 <span class="keywordflow">if</span>( e.<a class="code" href="group__ExprPkg.html#ga7814e4f55f65c7ca860c637413df5f4d">getKind</a>()==<a class="code" href="kinds_8h.html#aa10c9e8951b8ccf714a59ec321bdac5ba96727447c0ad447987df1c6415aef074">OR</a> && e!=end ) <a name="l00137"></a>00137 { <a name="l00138"></a>00138 exprs.push_back( e[0] ); <a name="l00139"></a>00139 <span class="keywordflow">return</span> <a class="code" href="classLFSCClausify.html#a976ffe7504641550090b29a9b5cf5732">LFSCAssume::Make</a>( <a class="code" href="classLFSCObj.html#ab0f17f592443a6a15fe2cb7446308e65">queryM</a>( e[0] ), <a class="code" href="classLFSCClausify.html#af22d08150cb2f47d017ed68e3c31093a">Make_i</a>( e[1], p, exprs, end ), <span class="keyword">false</span> ); <a name="l00140"></a>00140 } <a name="l00141"></a>00141 <span class="keywordflow">else</span> <a name="l00142"></a>00142 { <a name="l00143"></a>00143 <span class="keywordflow">for</span>( <span class="keywordtype">int</span> a=0; a<(int)exprs.size(); a++ ){ <a name="l00144"></a>00144 ostringstream os1, os2; <a name="l00145"></a>00145 os1 << <span class="stringliteral">"(or_elim_1 _ _ "</span>; <a name="l00146"></a>00146 <span class="keywordtype">int</span> m = <a class="code" href="classLFSCObj.html#ab0f17f592443a6a15fe2cb7446308e65">queryM</a>( exprs[a] ); <a name="l00147"></a>00147 <span class="comment">//introduce double negation to satisfy or_elim requirement</span> <a name="l00148"></a>00148 os1 << ( m<0 ? <span class="stringliteral">"(not_not_intro _ "</span> : <span class="stringliteral">""</span> ); <a name="l00149"></a>00149 os1 << <span class="stringliteral">"@v"</span> << <a class="code" href="namespaceCVC3.html#a39fc111339d6dffdc98d6a25b68dff0e">abs</a>( m ); <a name="l00150"></a>00150 os1 << ( m<0 ? <span class="stringliteral">")"</span> : <span class="stringliteral">""</span> ); <a name="l00151"></a>00151 os1 << <span class="stringliteral">" "</span>; <a name="l00152"></a>00152 os2 << <span class="stringliteral">")"</span>; <a name="l00153"></a>00153 p = <a class="code" href="classLFSCClausify.html#a976ffe7504641550090b29a9b5cf5732">LFSCProofGeneric::Make</a>( os1.str(), p, os2.str() ); <a name="l00154"></a>00154 } <a name="l00155"></a>00155 <span class="keywordflow">return</span> <a class="code" href="classLFSCClausify.html#a976ffe7504641550090b29a9b5cf5732">Make</a>( <a class="code" href="classLFSCObj.html#ab0f17f592443a6a15fe2cb7446308e65">queryM</a>( e ), p ); <a name="l00156"></a>00156 } <a name="l00157"></a>00157 } <a name="l00158"></a>00158 <a name="l00159"></a>00159 <span class="comment">// LFSCAssume ...</span> <a name="l00160"></a>00160 <a name="l00161"></a><a class="code" href="classLFSCAssume.html#ab8bc3cbf1aef169b856d704eceef4be6">00161</a> <span class="keywordtype">void</span> <a class="code" href="classLFSCAssume.html#ab8bc3cbf1aef169b856d704eceef4be6">LFSCAssume::print_pf</a>( std::ostream& s, <span class="keywordtype">int</span> ind ){ <a name="l00162"></a>00162 <span class="keywordtype">int</span> m = <a class="code" href="classLFSCAssume.html#ad12dc19473bae44f36547594096ec3b2">d_assm</a> ? <a class="code" href="classLFSCAssume.html#af94fac0616eadaef230e68e417d12f32">d_var</a> : -<a class="code" href="classLFSCAssume.html#af94fac0616eadaef230e68e417d12f32">d_var</a>; <a name="l00163"></a>00163 <span class="keywordflow">if</span>( <a class="code" href="classLFSCAssume.html#a9ed812125981b8f0379eaa0b9b3f9ad7">d_type</a>==3 ) <a name="l00164"></a>00164 s << <span class="stringliteral">"(as"</span> << (m>0 ? <span class="stringliteral">"t"</span> : <span class="stringliteral">"f"</span>) << <span class="stringliteral">" _ _ _ @a"</span> << <a class="code" href="namespaceCVC3.html#a39fc111339d6dffdc98d6a25b68dff0e">abs</a>( m ); <a name="l00165"></a>00165 <span class="keywordflow">else</span> <a name="l00166"></a>00166 s << <span class="stringliteral">"(th_as"</span> << (m>0 ? <span class="stringliteral">"t"</span> : <span class="stringliteral">"f"</span>) << <span class="stringliteral">" _ "</span>; <a name="l00167"></a>00167 s << <span class="stringliteral">" (\\ @v"</span> << <a class="code" href="namespaceCVC3.html#a39fc111339d6dffdc98d6a25b68dff0e">abs</a>( m ) << <span class="stringliteral">" "</span>; <a name="l00168"></a>00168 <a class="code" href="classLFSCAssume.html#aa3b39dbcb72090c1e629b79c9f247220">d_pf</a>->print( s ); <a name="l00169"></a>00169 s << <span class="stringliteral">"))"</span>; <a name="l00170"></a>00170 } <a name="l00171"></a>00171 <a name="l00172"></a><a class="code" href="classLFSCAssume.html#a61b64cc4b4ded52c63db33fa821ec20d">00172</a> <span class="keywordtype">void</span> <a class="code" href="classLFSCAssume.html#a61b64cc4b4ded52c63db33fa821ec20d">LFSCAssume::print_struct</a>( std::ostream& s, <span class="keywordtype">int</span> ind ){ <a name="l00173"></a>00173 s << <span class="stringliteral">"(as "</span> << ( <a class="code" href="classLFSCAssume.html#ad12dc19473bae44f36547594096ec3b2">d_assm</a> ? <a class="code" href="classLFSCAssume.html#af94fac0616eadaef230e68e417d12f32">d_var</a> : -<a class="code" href="classLFSCAssume.html#af94fac0616eadaef230e68e417d12f32">d_var</a> ); <a name="l00174"></a>00174 <a class="code" href="classLFSCAssume.html#aa3b39dbcb72090c1e629b79c9f247220">d_pf</a>->print_structure( s, ind+1 ); <a name="l00175"></a>00175 s << <span class="stringliteral">")"</span>; <a name="l00176"></a>00176 } </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>