<!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: Util.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">Util.h</div> </div> </div> <div class="contents"> <a href="Util_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 UTIL_H_</span> <a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define UTIL_H_</span> <a name="l00003"></a>00003 <span class="preprocessor"></span> <a name="l00004"></a>00004 <span class="preprocessor">#include "<a class="code" href="Object_8h.html">Object.h</a>"</span> <a name="l00005"></a>00005 <a name="l00006"></a>00006 <span class="comment">// helper utility functions</span> <a name="l00007"></a>00007 <span class="keywordtype">void</span> <a class="code" href="Util_8cpp.html#ab8bd5749c28399aa4697c3708238736e">ajr_debug_print</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="l00008"></a>00008 <span class="keywordtype">string</span> <a class="code" href="Util_8cpp.html#af0ed1bf9d4012011aa2b42be9c26a0b5">kind_to_str</a>(<span class="keywordtype">int</span> knd ); <a name="l00009"></a>00009 <span class="keywordtype">bool</span> <a class="code" href="Util_8cpp.html#a5462f02c7d83367f4d9e1b99f1975cb7">is_eq_kind</a>( <span class="keywordtype">int</span> knd ); <a name="l00010"></a>00010 <span class="keywordtype">bool</span> <a class="code" href="Util_8cpp.html#af74f6bead5859a676a98fa1759117c3b">is_smt_kind</a>( <span class="keywordtype">int</span> knd ); <a name="l00011"></a>00011 <a name="l00012"></a>00012 <span class="comment">//equation types ( a ~ b ) that are normalized to (b-a) ~' 0</span> <a name="l00013"></a>00013 <span class="keywordtype">bool</span> <a class="code" href="Util_8cpp.html#a1b08319c48e19ef89eb32d27801c9bfb">is_opposite</a>( <span class="keywordtype">int</span> knd ); <a name="l00014"></a>00014 <span class="keywordtype">bool</span> <a class="code" href="Util_8cpp.html#a30860522c71b3bd189f3c5789c42a9d7">is_comparison</a>( <span class="keywordtype">int</span> knd ); <a name="l00015"></a>00015 <span class="keywordtype">int</span> <a class="code" href="Util_8cpp.html#a796942d5524726336add29080f902785">get_not</a>( <span class="keywordtype">int</span> knd ); <a name="l00016"></a>00016 <a name="l00017"></a>00017 <span class="comment">//order in LFSC signature for rules when order does not matter (such as lra_add)</span> <a name="l00018"></a>00018 <span class="keywordtype">int</span> <a class="code" href="Util_8cpp.html#a0372a92d5751b352ddaec681fd16ec03">get_knd_order</a>( <span class="keywordtype">int</span> knd ); <a name="l00019"></a>00019 <span class="keywordtype">int</span> <a class="code" href="Util_8cpp.html#a667a5939ed7f0fba1d9a06f52a674832">get_normalized</a>( <span class="keywordtype">int</span> knd, <span class="keywordtype">bool</span> isnot = <span class="keyword">false</span> ); <a name="l00020"></a>00020 <a name="l00021"></a>00021 <span class="comment">//should only be called on normalized ops</span> <a name="l00022"></a>00022 <span class="keywordtype">int</span> <a class="code" href="Util_8cpp.html#a801074ec6fbda15a3cf5535e664ebff1">get_knd_result</a>( <span class="keywordtype">int</span> knd1, <span class="keywordtype">int</span> knd2 ); <a name="l00023"></a>00023 <a name="l00024"></a>00024 <span class="comment">//print helpers</span> <a name="l00025"></a>00025 <span class="keywordtype">void</span> <a class="code" href="Util_8cpp.html#a847e8dfbf47e6d87ff28150bdf1929a8">print_mpq</a>(<span class="keywordtype">int</span> num, <span class="keywordtype">int</span> den, std::ostream& s ); <a name="l00026"></a>00026 <span class="keywordtype">void</span> <a class="code" href="Util_8cpp.html#a64021a0f1532b0f4dfb19867114c6efb">print_rational</a>( <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Rational.html">Rational</a>& r, std::ostream& s ); <a name="l00027"></a>00027 <span class="keywordtype">void</span> <a class="code" href="Util_8cpp.html#a66ede87ea272764bfc26b0d071adb43b">print_rational_divide</a>( <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Rational.html">Rational</a>& n, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Rational.html">Rational</a>& d, std::ostream& s ); <a name="l00028"></a>00028 <a name="l00029"></a>00029 <span class="keywordtype">bool</span> <a class="code" href="Util_8cpp.html#af21313ed2a43de0c39929e2cc95e58da">getRat</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="classCVC3_1_1Rational.html">Rational</a>& r ); <a name="l00030"></a>00030 <span class="keywordtype">bool</span> <a class="code" href="Util_8cpp.html#a5819a489ec3343b741a726ddc05039d9">isFlat</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="l00031"></a>00031 <span class="keywordtype">void</span> <a class="code" href="Util_8cpp.html#a35060ea394384633174483dd94a830e6">make_flatten_expr</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="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>& pe, <span class="keywordtype">int</span> knd ); <a name="l00032"></a>00032 <a name="l00033"></a>00033 <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>