<!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: expr_value.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">expr_value.cpp</div> </div> </div> <div class="contents"> <a href="expr__value_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*****************************************************************************/</span><span class="comment"></span> <a name="l00002"></a>00002 <span class="comment">/*!</span> <a name="l00003"></a>00003 <span class="comment"> * \file expr_value.cpp</span> <a name="l00004"></a>00004 <span class="comment"> * </span> <a name="l00005"></a>00005 <span class="comment"> * Author: Sergey Berezin</span> <a name="l00006"></a>00006 <span class="comment"> * </span> <a name="l00007"></a>00007 <span class="comment"> * Created: Fri Feb 7 22:29:04 2003</span> <a name="l00008"></a>00008 <span class="comment"> *</span> <a name="l00009"></a>00009 <span class="comment"> * <hr></span> <a name="l00010"></a>00010 <span class="comment"> *</span> <a name="l00011"></a>00011 <span class="comment"> * License to use, copy, modify, sell and/or distribute this software</span> <a name="l00012"></a>00012 <span class="comment"> * and its documentation for any purpose is hereby granted without</span> <a name="l00013"></a>00013 <span class="comment"> * royalty, subject to the terms and conditions defined in the \ref</span> <a name="l00014"></a>00014 <span class="comment"> * LICENSE file provided with this distribution.</span> <a name="l00015"></a>00015 <span class="comment"> * </span> <a name="l00016"></a>00016 <span class="comment"> * <hr></span> <a name="l00017"></a>00017 <span class="comment"> * </span> <a name="l00018"></a>00018 <span class="comment"> */</span> <a name="l00019"></a>00019 <span class="comment">/*****************************************************************************/</span> <a name="l00020"></a>00020 <a name="l00021"></a>00021 <span class="preprocessor">#include "<a class="code" href="expr__value_8h.html">expr_value.h</a>"</span> <a name="l00022"></a>00022 <span class="preprocessor">#include "<a class="code" href="notifylist_8h.html">notifylist.h</a>"</span> <a name="l00023"></a>00023 <a name="l00024"></a>00024 <span class="keyword">using namespace </span>std; <a name="l00025"></a>00025 <a name="l00026"></a>00026 <span class="keyword">namespace </span>CVC3 { <a name="l00027"></a>00027 <span class="comment"></span> <a name="l00028"></a>00028 <span class="comment">////////////////////////////////////////////////////////////////////////</span> <a name="l00029"></a>00029 <span class="comment"></span><span class="comment">// Class ExprValue static members</span><span class="comment"></span> <a name="l00030"></a>00030 <span class="comment">////////////////////////////////////////////////////////////////////////</span> <a name="l00031"></a>00031 <span class="comment"></span> <a name="l00032"></a>00032 <a class="code" href="structHash_1_1hash_3_01char_01_5_01_4.html">std::hash<char*></a> ExprValue::s_charHash; <a name="l00033"></a>00033 <a class="code" href="structHash_1_1hash.html">std::hash<long int></a> ExprValue::s_intHash; <a name="l00034"></a>00034 <span class="comment"></span> <a name="l00035"></a>00035 <span class="comment">////////////////////////////////////////////////////////////////////////</span> <a name="l00036"></a>00036 <span class="comment"></span><span class="comment">// Class ExprValue methods</span><span class="comment"></span> <a name="l00037"></a>00037 <span class="comment">////////////////////////////////////////////////////////////////////////</span> <a name="l00038"></a>00038 <span class="comment"></span> <a name="l00039"></a>00039 <a name="l00040"></a>00040 <span class="comment">// Destructor</span> <a name="l00041"></a><a class="code" href="classCVC3_1_1ExprValue.html#af42b0ab5786382e69be8a9043504bdc2">00041</a> ExprValue::~ExprValue() { <a name="l00042"></a>00042 <span class="comment">// Be careful deleting the attributes: first set them to NULL, then</span> <a name="l00043"></a>00043 <span class="comment">// delete, to avoid circular destructor calls</span> <a name="l00044"></a>00044 <span class="keywordflow">if</span> (d_find) { <a name="l00045"></a>00045 <a class="code" href="classCVC3_1_1CDO.html">CDO<Theorem></a>* find = d_find; <a name="l00046"></a>00046 d_find = NULL; <a name="l00047"></a>00047 <span class="keyword">delete</span> find; <a name="l00048"></a>00048 free(find); <a name="l00049"></a>00049 } <a name="l00050"></a>00050 <span class="keywordflow">if</span> (d_eqNext) { <a name="l00051"></a>00051 <a class="code" href="classCVC3_1_1CDO.html">CDO<Theorem></a>* eqNext = d_eqNext; <a name="l00052"></a>00052 d_eqNext = NULL; <a name="l00053"></a>00053 <span class="keyword">delete</span> eqNext; <a name="l00054"></a>00054 free(eqNext); <a name="l00055"></a>00055 } <a name="l00056"></a>00056 <span class="keywordflow">if</span>(d_notifyList != NULL) { <a name="l00057"></a>00057 <a class="code" href="classCVC3_1_1NotifyList.html">NotifyList</a>* nl = d_notifyList; <a name="l00058"></a>00058 d_notifyList = NULL; <a name="l00059"></a>00059 <span class="keyword">delete</span> nl; <a name="l00060"></a>00060 } <a name="l00061"></a>00061 <span class="comment">// Set all smart pointers to Null</span> <a name="l00062"></a>00062 d_type = <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a>(); <a name="l00063"></a>00063 d_simpCache=<a class="code" href="classCVC3_1_1Theorem.html">Theorem</a>(); <a name="l00064"></a>00064 <span class="comment">// d_simpFrom=Expr();</span> <a name="l00065"></a>00065 } <a name="l00066"></a>00066 <a name="l00067"></a>00067 <span class="comment">// Equality between any two ExprValue objects (including subclasses)</span> <a name="l00068"></a><a class="code" href="classCVC3_1_1ExprValue.html#abdbf51b85cc77255679ac90af34a865f">00068</a> <span class="keywordtype">bool</span> <a class="code" href="namespaceCVC3.html#a8e164436388f2d87c971d9bbde973c58">ExprValue::operator==</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1ExprValue.html" title="The base class for holding the actual data in expressions.">ExprValue</a>& ev2)<span class="keyword"> const </span>{ <a name="l00069"></a>00069 <a class="code" href="debug_8h.html#a40dac3bdb2166ffc852ee8b1489d2b56">DebugAssert</a>(getMMIndex() == <a class="code" href="namespaceCVC3.html#a492cd44a88003acd985d3c05cbd36ea8a45728d440ceb44bdb47f21351a153e88">EXPR_VALUE</a>, <a name="l00070"></a>00070 <span class="stringliteral">"ExprValue::operator==() called from a subclass"</span>); <a name="l00071"></a>00071 <span class="keywordflow">if</span>(getMMIndex() != ev2.<a class="code" href="classCVC3_1_1ExprValue.html#af4280c2539ba1dd4a089f0537f7ef3d4" title="Get unique memory manager ID.">getMMIndex</a>()) <a name="l00072"></a>00072 <span class="keywordflow">return</span> <span class="keyword">false</span>; <a name="l00073"></a>00073 <a name="l00074"></a>00074 <span class="keywordflow">return</span> (d_kind == ev2.<a class="code" href="classCVC3_1_1ExprValue.html#a4984ceea8831c2c175530910174985b4" title="The kind of the expression. In particular, it determines which subclass of ExprValue is used to store...">d_kind</a>); <a name="l00075"></a>00075 } <a name="l00076"></a>00076 <a name="l00077"></a>00077 <a name="l00078"></a><a class="code" href="classCVC3_1_1ExprValue.html#a2e152d0473e881c1eb47f5baeb546525">00078</a> <a class="code" href="classCVC3_1_1ExprValue.html" title="The base class for holding the actual data in expressions.">ExprValue</a>* ExprValue::copy(<a class="code" href="classCVC3_1_1ExprManager.html">ExprManager</a>* em, <a class="code" href="namespaceCVC3.html#a4233916514848331ee104548acbab912" title="Expression index type.">ExprIndex</a> idx)<span class="keyword"> const </span>{ <a name="l00079"></a>00079 <a class="code" href="debug_8h.html#a40dac3bdb2166ffc852ee8b1489d2b56">DebugAssert</a>(getMMIndex() == <a class="code" href="namespaceCVC3.html#a492cd44a88003acd985d3c05cbd36ea8a45728d440ceb44bdb47f21351a153e88">EXPR_VALUE</a>, <a name="l00080"></a>00080 <span class="stringliteral">"ExprValue::copy() called from a subclass"</span>); <a name="l00081"></a>00081 <span class="keywordflow">return</span> <span class="keyword">new</span>(em-><a class="code" href="group__EM__Priv.html#ga721fc26fe37460f80e6d614cfe0d6fd8" title="Return a MemoryManager for the given ExprValue type.">getMM</a>(<a class="code" href="namespaceCVC3.html#a492cd44a88003acd985d3c05cbd36ea8a45728d440ceb44bdb47f21351a153e88">EXPR_VALUE</a>)) <a class="code" href="classCVC3_1_1ExprValue.html" title="The base class for holding the actual data in expressions.">ExprValue</a>(em, d_kind, idx); <a name="l00082"></a>00082 } <a name="l00083"></a>00083 <a name="l00084"></a>00084 <a name="l00085"></a><a class="code" href="classCVC3_1_1ExprNodeTmp.html#a27ded0c9ddba00025c1f84d181327893">00085</a> <span class="keywordtype">bool</span> <a class="code" href="namespaceCVC3.html#a8e164436388f2d87c971d9bbde973c58">ExprNodeTmp::operator==</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1ExprValue.html" title="The base class for holding the actual data in expressions.">ExprValue</a>& ev2)<span class="keyword"> const </span>{ <a name="l00086"></a>00086 <span class="keywordflow">return</span> getMMIndex() == ev2.<a class="code" href="classCVC3_1_1ExprValue.html#af4280c2539ba1dd4a089f0537f7ef3d4" title="Get unique memory manager ID.">getMMIndex</a>() && <a name="l00087"></a>00087 d_kind == ev2.<a class="code" href="classCVC3_1_1ExprValue.html#af395e6f6a67e80f2fbd1dc4bee29989c" title="Get the kind of the expression.">getKind</a>() && <a name="l00088"></a>00088 getKids() == ev2.<a class="code" href="classCVC3_1_1ExprValue.html#a9599f84777bbbacdf953986ece645c2d" title="Get kids: by default, returns a ref to an empty vector.">getKids</a>(); <a name="l00089"></a>00089 } <a name="l00090"></a>00090 <a name="l00091"></a><a class="code" href="classCVC3_1_1ExprNodeTmp.html#a5327d514d06f1c3a799e29d61f8d7de3">00091</a> <a class="code" href="classCVC3_1_1ExprValue.html" title="The base class for holding the actual data in expressions.">ExprValue</a>* ExprNodeTmp::copy(<a class="code" href="classCVC3_1_1ExprManager.html">ExprManager</a>* em, <a class="code" href="namespaceCVC3.html#a4233916514848331ee104548acbab912" title="Expression index type.">ExprIndex</a> idx)<span class="keyword"> const </span>{ <a name="l00092"></a>00092 <span class="keywordflow">if</span> (d_em != em) { <a name="l00093"></a>00093 vector<Expr> children; <a name="l00094"></a>00094 vector<Expr>::const_iterator <a name="l00095"></a>00095 i = d_children.begin(), iend = d_children.end(); <a name="l00096"></a>00096 <span class="keywordflow">for</span> (; i != iend; ++i) <a name="l00097"></a>00097 children.push_back(rebuild(*i, em)); <a name="l00098"></a>00098 <span class="keywordflow">return</span> <span class="keyword">new</span>(em-><a class="code" href="group__EM__Priv.html#ga721fc26fe37460f80e6d614cfe0d6fd8" title="Return a MemoryManager for the given ExprValue type.">getMM</a>(getMMIndex())) <a class="code" href="classCVC3_1_1ExprNode.html">ExprNode</a>(em, d_kind, children, idx); <a name="l00099"></a>00099 } <a name="l00100"></a>00100 <span class="keywordflow">return</span> <span class="keyword">new</span>(em-><a class="code" href="group__EM__Priv.html#ga721fc26fe37460f80e6d614cfe0d6fd8" title="Return a MemoryManager for the given ExprValue type.">getMM</a>(getMMIndex())) <a class="code" href="classCVC3_1_1ExprNode.html">ExprNode</a>(em, d_kind, d_children, idx); <a name="l00101"></a>00101 } <a name="l00102"></a>00102 <a name="l00103"></a>00103 <a name="l00104"></a><a class="code" href="classCVC3_1_1ExprNode.html#aee6df4d83cacabe09f5321ae323b24af">00104</a> ExprNode::~ExprNode() <a name="l00105"></a>00105 { <a name="l00106"></a>00106 <span class="comment">// Be careful deleting the attributes: first set them to NULL, then</span> <a name="l00107"></a>00107 <span class="comment">// delete, to avoid circular destructor calls</span> <a name="l00108"></a>00108 <span class="keywordflow">if</span> (d_sig) { <a name="l00109"></a>00109 <a class="code" href="classCVC3_1_1CDO.html">CDO<Theorem></a>* sig = d_sig; <a name="l00110"></a>00110 d_sig = NULL; <a name="l00111"></a>00111 <span class="keyword">delete</span> sig; <a name="l00112"></a>00112 free(sig); <a name="l00113"></a>00113 } <a name="l00114"></a>00114 <span class="keywordflow">if</span> (d_rep) { <a name="l00115"></a>00115 <a class="code" href="classCVC3_1_1CDO.html">CDO<Theorem></a>* rep = d_rep; <a name="l00116"></a>00116 d_rep = NULL; <a name="l00117"></a>00117 <span class="keyword">delete</span> rep; <a name="l00118"></a>00118 free(rep); <a name="l00119"></a>00119 } <a name="l00120"></a>00120 } <a name="l00121"></a>00121 <a name="l00122"></a>00122 <a name="l00123"></a><a class="code" href="classCVC3_1_1ExprNode.html#a0871972a81dffc313075887a9b933494">00123</a> <span class="keywordtype">bool</span> <a class="code" href="namespaceCVC3.html#a8e164436388f2d87c971d9bbde973c58">ExprNode::operator==</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1ExprValue.html" title="The base class for holding the actual data in expressions.">ExprValue</a>& ev2)<span class="keyword"> const </span>{ <a name="l00124"></a>00124 <span class="keywordflow">if</span>(getMMIndex() != ev2.<a class="code" href="classCVC3_1_1ExprValue.html#af4280c2539ba1dd4a089f0537f7ef3d4" title="Get unique memory manager ID.">getMMIndex</a>()) <a name="l00125"></a>00125 <span class="keywordflow">return</span> <span class="keyword">false</span>; <a name="l00126"></a>00126 <a name="l00127"></a>00127 <span class="keywordflow">return</span> (d_kind == ev2.<a class="code" href="classCVC3_1_1ExprValue.html#af395e6f6a67e80f2fbd1dc4bee29989c" title="Get the kind of the expression.">getKind</a>()) <a name="l00128"></a>00128 && (getKids() == ev2.<a class="code" href="classCVC3_1_1ExprValue.html#a9599f84777bbbacdf953986ece645c2d" title="Get kids: by default, returns a ref to an empty vector.">getKids</a>()); <a name="l00129"></a>00129 } <a name="l00130"></a>00130 <a name="l00131"></a><a class="code" href="classCVC3_1_1ExprNode.html#a310b7e3f394047f33c9dfe341f976547">00131</a> <a class="code" href="classCVC3_1_1ExprValue.html" title="The base class for holding the actual data in expressions.">ExprValue</a>* ExprNode::copy(<a class="code" href="classCVC3_1_1ExprManager.html">ExprManager</a>* em, <a class="code" href="namespaceCVC3.html#a4233916514848331ee104548acbab912" title="Expression index type.">ExprIndex</a> idx)<span class="keyword"> const </span>{ <a name="l00132"></a>00132 <span class="keywordflow">if</span> (d_em != em) { <a name="l00133"></a>00133 vector<Expr> children; <a name="l00134"></a>00134 vector<Expr>::const_iterator <a name="l00135"></a>00135 i = d_children.begin(), iend = d_children.end(); <a name="l00136"></a>00136 <span class="keywordflow">for</span> (; i != iend; ++i) <a name="l00137"></a>00137 children.push_back(rebuild(*i, em)); <a name="l00138"></a>00138 <span class="keywordflow">return</span> <span class="keyword">new</span>(em-><a class="code" href="group__EM__Priv.html#ga721fc26fe37460f80e6d614cfe0d6fd8" title="Return a MemoryManager for the given ExprValue type.">getMM</a>(getMMIndex())) <a class="code" href="classCVC3_1_1ExprNode.html">ExprNode</a>(em, d_kind, children, idx); <a name="l00139"></a>00139 } <a name="l00140"></a>00140 <span class="keywordflow">return</span> <span class="keyword">new</span>(em-><a class="code" href="group__EM__Priv.html#ga721fc26fe37460f80e6d614cfe0d6fd8" title="Return a MemoryManager for the given ExprValue type.">getMM</a>(getMMIndex())) <a class="code" href="classCVC3_1_1ExprNode.html">ExprNode</a>(em, d_kind, d_children, idx); <a name="l00141"></a>00141 } <a name="l00142"></a>00142 <a name="l00143"></a>00143 <a name="l00144"></a><a class="code" href="classCVC3_1_1ExprString.html#a796ac7a56c0c18164b13f75fd7d313d9">00144</a> <span class="keywordtype">bool</span> <a class="code" href="namespaceCVC3.html#a8e164436388f2d87c971d9bbde973c58">ExprString::operator==</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1ExprValue.html" title="The base class for holding the actual data in expressions.">ExprValue</a>& ev2)<span class="keyword"> const </span>{ <a name="l00145"></a>00145 <span class="keywordflow">if</span>(getMMIndex() != ev2.<a class="code" href="classCVC3_1_1ExprValue.html#af4280c2539ba1dd4a089f0537f7ef3d4" title="Get unique memory manager ID.">getMMIndex</a>()) <a name="l00146"></a>00146 <span class="keywordflow">return</span> <span class="keyword">false</span>; <a name="l00147"></a>00147 <a name="l00148"></a>00148 <span class="keywordflow">return</span> (getString() == ev2.<a class="code" href="classCVC3_1_1ExprValue.html#ae08d4299bce518b15feae6717b22db60">getString</a>()); <a name="l00149"></a>00149 } <a name="l00150"></a>00150 <a name="l00151"></a><a class="code" href="classCVC3_1_1ExprString.html#a0c9b985a0eb85e5b997eb96f224fd3e0">00151</a> <a class="code" href="classCVC3_1_1ExprValue.html" title="The base class for holding the actual data in expressions.">ExprValue</a>* ExprString::copy(<a class="code" href="classCVC3_1_1ExprManager.html">ExprManager</a>* em, <a class="code" href="namespaceCVC3.html#a4233916514848331ee104548acbab912" title="Expression index type.">ExprIndex</a> idx)<span class="keyword"> const </span>{ <a name="l00152"></a>00152 <span class="keywordflow">return</span> <span class="keyword">new</span>(em-><a class="code" href="group__EM__Priv.html#ga721fc26fe37460f80e6d614cfe0d6fd8" title="Return a MemoryManager for the given ExprValue type.">getMM</a>(getMMIndex())) <a class="code" href="classCVC3_1_1ExprString.html">ExprString</a>(em, d_str, idx); <a name="l00153"></a>00153 } <a name="l00154"></a>00154 <a name="l00155"></a>00155 <a name="l00156"></a><a class="code" href="classCVC3_1_1ExprSkolem.html#aecf96e5c8dcce7d539fc95ed445e0395">00156</a> <span class="keywordtype">bool</span> <a class="code" href="namespaceCVC3.html#a8e164436388f2d87c971d9bbde973c58">ExprSkolem::operator==</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1ExprValue.html" title="The base class for holding the actual data in expressions.">ExprValue</a>& ev2)<span class="keyword"> const </span>{ <a name="l00157"></a>00157 <span class="keywordflow">if</span>(getMMIndex() != ev2.<a class="code" href="classCVC3_1_1ExprValue.html#af4280c2539ba1dd4a089f0537f7ef3d4" title="Get unique memory manager ID.">getMMIndex</a>()) <a name="l00158"></a>00158 <span class="keywordflow">return</span> <span class="keyword">false</span>; <a name="l00159"></a>00159 <a name="l00160"></a>00160 <span class="keywordflow">return</span> (getBoundIndex() == ev2.<a class="code" href="classCVC3_1_1ExprValue.html#abd69167d8061d19eac1cfd710a3b27e5">getBoundIndex</a>() <a name="l00161"></a>00161 && getExistential() == ev2.<a class="code" href="classCVC3_1_1ExprValue.html#ae7da29f0b091c780ec0f4b75b9d84529">getExistential</a>()); <a name="l00162"></a>00162 } <a name="l00163"></a>00163 <a name="l00164"></a><a class="code" href="classCVC3_1_1ExprSkolem.html#aa6412b4c6ffe1ebea37c066219af1d2a">00164</a> <a class="code" href="classCVC3_1_1ExprValue.html" title="The base class for holding the actual data in expressions.">ExprValue</a>* ExprSkolem::copy(<a class="code" href="classCVC3_1_1ExprManager.html">ExprManager</a>* em, <a class="code" href="namespaceCVC3.html#a4233916514848331ee104548acbab912" title="Expression index type.">ExprIndex</a> idx)<span class="keyword"> const </span>{ <a name="l00165"></a>00165 <span class="keywordflow">if</span> (d_em != em) { <a name="l00166"></a>00166 <span class="keywordflow">return</span> <span class="keyword">new</span>(em-><a class="code" href="group__EM__Priv.html#ga721fc26fe37460f80e6d614cfe0d6fd8" title="Return a MemoryManager for the given ExprValue type.">getMM</a>(getMMIndex())) <a name="l00167"></a>00167 <a class="code" href="classCVC3_1_1ExprSkolem.html">ExprSkolem</a>(em, getBoundIndex(), rebuild(getExistential(), em), idx); <a name="l00168"></a>00168 } <a name="l00169"></a>00169 <span class="keywordflow">return</span> <span class="keyword">new</span>(em-><a class="code" href="group__EM__Priv.html#ga721fc26fe37460f80e6d614cfe0d6fd8" title="Return a MemoryManager for the given ExprValue type.">getMM</a>(getMMIndex())) <a name="l00170"></a>00170 <a class="code" href="classCVC3_1_1ExprSkolem.html">ExprSkolem</a>(em, getBoundIndex(), getExistential(), idx); <a name="l00171"></a>00171 } <a name="l00172"></a>00172 <a name="l00173"></a>00173 <a name="l00174"></a><a class="code" href="classCVC3_1_1ExprRational.html#a62494c541b3be07a0e8ee1c5a85a86cd">00174</a> <span class="keywordtype">bool</span> <a class="code" href="namespaceCVC3.html#a8e164436388f2d87c971d9bbde973c58">ExprRational::operator==</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1ExprValue.html" title="The base class for holding the actual data in expressions.">ExprValue</a>& ev2)<span class="keyword"> const </span>{ <a name="l00175"></a>00175 <span class="keywordflow">if</span>(getMMIndex() != ev2.<a class="code" href="classCVC3_1_1ExprValue.html#af4280c2539ba1dd4a089f0537f7ef3d4" title="Get unique memory manager ID.">getMMIndex</a>()) <a name="l00176"></a>00176 <span class="keywordflow">return</span> <span class="keyword">false</span>; <a name="l00177"></a>00177 <a name="l00178"></a>00178 <span class="keywordflow">return</span> (getRational() == ev2.<a class="code" href="classCVC3_1_1ExprValue.html#abdfb4f3179a7549d99dceaebcff0b788">getRational</a>()); <a name="l00179"></a>00179 } <a name="l00180"></a>00180 <a name="l00181"></a><a class="code" href="classCVC3_1_1ExprRational.html#a3d9af97e78644aac931a3d5bdb45d7d9">00181</a> <a class="code" href="classCVC3_1_1ExprValue.html" title="The base class for holding the actual data in expressions.">ExprValue</a>* ExprRational::copy(<a class="code" href="classCVC3_1_1ExprManager.html">ExprManager</a>* em, <a class="code" href="namespaceCVC3.html#a4233916514848331ee104548acbab912" title="Expression index type.">ExprIndex</a> idx)<span class="keyword"> const </span>{ <a name="l00182"></a>00182 <span class="keywordflow">return</span> <span class="keyword">new</span>(em-><a class="code" href="group__EM__Priv.html#ga721fc26fe37460f80e6d614cfe0d6fd8" title="Return a MemoryManager for the given ExprValue type.">getMM</a>(getMMIndex())) <a class="code" href="classCVC3_1_1ExprRational.html">ExprRational</a>(em, d_r, idx); <a name="l00183"></a>00183 } <a name="l00184"></a>00184 <a name="l00185"></a>00185 <a name="l00186"></a><a class="code" href="classCVC3_1_1ExprVar.html#aeb66b16c91d7e7fde955ec63a3b2155a">00186</a> <span class="keywordtype">bool</span> <a class="code" href="namespaceCVC3.html#a8e164436388f2d87c971d9bbde973c58">ExprVar::operator==</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1ExprValue.html" title="The base class for holding the actual data in expressions.">ExprValue</a>& ev2)<span class="keyword"> const </span>{ <a name="l00187"></a>00187 <span class="keywordflow">if</span>(getMMIndex() != ev2.<a class="code" href="classCVC3_1_1ExprValue.html#af4280c2539ba1dd4a089f0537f7ef3d4" title="Get unique memory manager ID.">getMMIndex</a>()) <a name="l00188"></a>00188 <span class="keywordflow">return</span> <span class="keyword">false</span>; <a name="l00189"></a>00189 <a name="l00190"></a>00190 <span class="keywordflow">return</span> (getKind() == ev2.<a class="code" href="classCVC3_1_1ExprValue.html#af395e6f6a67e80f2fbd1dc4bee29989c" title="Get the kind of the expression.">getKind</a>() && getName() == ev2.<a class="code" href="classCVC3_1_1ExprValue.html#a6ac375ed03ddb0418c1f7bb61ef5f8a6" title="Returns the string name of UCONST and BOUND_VAR expr's.">getName</a>()); <a name="l00191"></a>00191 } <a name="l00192"></a>00192 <a name="l00193"></a><a class="code" href="classCVC3_1_1ExprVar.html#ad1d7182255f34bf98de5cb67d6a7f8d2">00193</a> <a class="code" href="classCVC3_1_1ExprValue.html" title="The base class for holding the actual data in expressions.">ExprValue</a>* ExprVar::copy(<a class="code" href="classCVC3_1_1ExprManager.html">ExprManager</a>* em, <a class="code" href="namespaceCVC3.html#a4233916514848331ee104548acbab912" title="Expression index type.">ExprIndex</a> idx)<span class="keyword"> const </span>{ <a name="l00194"></a>00194 <span class="keywordflow">return</span> <span class="keyword">new</span>(em-><a class="code" href="group__EM__Priv.html#ga721fc26fe37460f80e6d614cfe0d6fd8" title="Return a MemoryManager for the given ExprValue type.">getMM</a>(getMMIndex())) <a class="code" href="classCVC3_1_1ExprVar.html">ExprVar</a>(em, d_name, idx); <a name="l00195"></a>00195 } <a name="l00196"></a>00196 <a name="l00197"></a>00197 <a name="l00198"></a><a class="code" href="classCVC3_1_1ExprSymbol.html#af4cbd999ce3ae3dd63bd331702057577">00198</a> <span class="keywordtype">bool</span> <a class="code" href="namespaceCVC3.html#a8e164436388f2d87c971d9bbde973c58">ExprSymbol::operator==</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1ExprValue.html" title="The base class for holding the actual data in expressions.">ExprValue</a>& ev2)<span class="keyword"> const </span>{ <a name="l00199"></a>00199 <span class="keywordflow">if</span>(getMMIndex() != ev2.<a class="code" href="classCVC3_1_1ExprValue.html#af4280c2539ba1dd4a089f0537f7ef3d4" title="Get unique memory manager ID.">getMMIndex</a>()) <a name="l00200"></a>00200 <span class="keywordflow">return</span> <span class="keyword">false</span>; <a name="l00201"></a>00201 <a name="l00202"></a>00202 <span class="keywordflow">return</span> (getKind() == ev2.<a class="code" href="classCVC3_1_1ExprValue.html#af395e6f6a67e80f2fbd1dc4bee29989c" title="Get the kind of the expression.">getKind</a>() && getName() == ev2.<a class="code" href="classCVC3_1_1ExprValue.html#a6ac375ed03ddb0418c1f7bb61ef5f8a6" title="Returns the string name of UCONST and BOUND_VAR expr's.">getName</a>()); <a name="l00203"></a>00203 } <a name="l00204"></a>00204 <a name="l00205"></a><a class="code" href="classCVC3_1_1ExprSymbol.html#a1d545499f7a5c73c312a1e8fea68f709">00205</a> <a class="code" href="classCVC3_1_1ExprValue.html" title="The base class for holding the actual data in expressions.">ExprValue</a>* ExprSymbol::copy(<a class="code" href="classCVC3_1_1ExprManager.html">ExprManager</a>* em, <a class="code" href="namespaceCVC3.html#a4233916514848331ee104548acbab912" title="Expression index type.">ExprIndex</a> idx)<span class="keyword"> const </span>{ <a name="l00206"></a>00206 <span class="keywordflow">return</span> <span class="keyword">new</span>(em-><a class="code" href="group__EM__Priv.html#ga721fc26fe37460f80e6d614cfe0d6fd8" title="Return a MemoryManager for the given ExprValue type.">getMM</a>(getMMIndex())) <a class="code" href="classCVC3_1_1ExprSymbol.html">ExprSymbol</a>(em, d_kind, d_name, idx); <a name="l00207"></a>00207 } <a name="l00208"></a>00208 <a name="l00209"></a>00209 <a name="l00210"></a><a class="code" href="classCVC3_1_1ExprBoundVar.html#a7c23a77bf1e2f6be4cd5b67335667520">00210</a> <span class="keywordtype">bool</span> <a class="code" href="namespaceCVC3.html#a8e164436388f2d87c971d9bbde973c58">ExprBoundVar::operator==</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1ExprValue.html" title="The base class for holding the actual data in expressions.">ExprValue</a>& ev2)<span class="keyword"> const </span>{ <a name="l00211"></a>00211 <span class="keywordflow">if</span>(getMMIndex() != ev2.<a class="code" href="classCVC3_1_1ExprValue.html#af4280c2539ba1dd4a089f0537f7ef3d4" title="Get unique memory manager ID.">getMMIndex</a>()) <a name="l00212"></a>00212 <span class="keywordflow">return</span> <span class="keyword">false</span>; <a name="l00213"></a>00213 <a name="l00214"></a>00214 <span class="keywordflow">return</span> (getKind() == ev2.<a class="code" href="classCVC3_1_1ExprValue.html#af395e6f6a67e80f2fbd1dc4bee29989c" title="Get the kind of the expression.">getKind</a>() && getName() == ev2.<a class="code" href="classCVC3_1_1ExprValue.html#a6ac375ed03ddb0418c1f7bb61ef5f8a6" title="Returns the string name of UCONST and BOUND_VAR expr's.">getName</a>() <a name="l00215"></a>00215 && getUid() == ev2.<a class="code" href="classCVC3_1_1ExprValue.html#aa41e0e611f41af685e245ff12233865e">getUid</a>()); <a name="l00216"></a>00216 } <a name="l00217"></a>00217 <a name="l00218"></a><a class="code" href="classCVC3_1_1ExprBoundVar.html#a725cc70819afe83d681da8b5e6d5c465">00218</a> <a class="code" href="classCVC3_1_1ExprValue.html" title="The base class for holding the actual data in expressions.">ExprValue</a>* ExprBoundVar::copy(<a class="code" href="classCVC3_1_1ExprManager.html">ExprManager</a>* em, <a class="code" href="namespaceCVC3.html#a4233916514848331ee104548acbab912" title="Expression index type.">ExprIndex</a> idx)<span class="keyword"> const </span>{ <a name="l00219"></a>00219 <span class="keywordflow">return</span> <span class="keyword">new</span>(em-><a class="code" href="group__EM__Priv.html#ga721fc26fe37460f80e6d614cfe0d6fd8" title="Return a MemoryManager for the given ExprValue type.">getMM</a>(getMMIndex())) <a class="code" href="classCVC3_1_1ExprBoundVar.html">ExprBoundVar</a>(em, d_name, d_uid, idx); <a name="l00220"></a>00220 } <a name="l00221"></a>00221 <a name="l00222"></a>00222 <a name="l00223"></a><a class="code" href="classCVC3_1_1ExprApply.html#a586df76783802f74b7ad7c32e13b0717">00223</a> <span class="keywordtype">bool</span> <a class="code" href="namespaceCVC3.html#a8e164436388f2d87c971d9bbde973c58">ExprApply::operator==</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1ExprValue.html" title="The base class for holding the actual data in expressions.">ExprValue</a>& ev2)<span class="keyword"> const </span>{ <a name="l00224"></a>00224 <span class="keywordflow">if</span>(getMMIndex() != ev2.<a class="code" href="classCVC3_1_1ExprValue.html#af4280c2539ba1dd4a089f0537f7ef3d4" title="Get unique memory manager ID.">getMMIndex</a>()) <a name="l00225"></a>00225 <span class="keywordflow">return</span> <span class="keyword">false</span>; <a name="l00226"></a>00226 <a name="l00227"></a>00227 <span class="keywordflow">return</span> (getOp() == ev2.<a class="code" href="classCVC3_1_1ExprValue.html#a2f674a5c2a7d6c8a2ac1bafdbfcf7a41" title="Get the Op from an Apply Expr.">getOp</a>()) <a name="l00228"></a>00228 && (getKids() == ev2.<a class="code" href="classCVC3_1_1ExprValue.html#a9599f84777bbbacdf953986ece645c2d" title="Get kids: by default, returns a ref to an empty vector.">getKids</a>()); <a name="l00229"></a>00229 } <a name="l00230"></a>00230 <a name="l00231"></a><a class="code" href="classCVC3_1_1ExprApply.html#ab037958a049c79b27eff3c75a329af5c">00231</a> <a class="code" href="classCVC3_1_1ExprValue.html" title="The base class for holding the actual data in expressions.">ExprValue</a>* ExprApply::copy(<a class="code" href="classCVC3_1_1ExprManager.html">ExprManager</a>* em, <a class="code" href="namespaceCVC3.html#a4233916514848331ee104548acbab912" title="Expression index type.">ExprIndex</a> idx)<span class="keyword"> const </span>{ <a name="l00232"></a>00232 <span class="keywordflow">if</span> (d_em != em) { <a name="l00233"></a>00233 vector<Expr> children; <a name="l00234"></a>00234 vector<Expr>::const_iterator <a name="l00235"></a>00235 i = d_children.begin(), iend = d_children.end(); <a name="l00236"></a>00236 <span class="keywordflow">for</span> (; i != iend; ++i) <a name="l00237"></a>00237 children.push_back(rebuild(*i, em)); <a name="l00238"></a>00238 <span class="keywordflow">return</span> <span class="keyword">new</span>(em-><a class="code" href="group__EM__Priv.html#ga721fc26fe37460f80e6d614cfe0d6fd8" title="Return a MemoryManager for the given ExprValue type.">getMM</a>(getMMIndex())) <a name="l00239"></a>00239 <a class="code" href="classCVC3_1_1ExprApply.html">ExprApply</a>(em, <a class="code" href="classCVC3_1_1Op.html">Op</a>(rebuild(d_opExpr, em)), children, idx); <a name="l00240"></a>00240 } <a name="l00241"></a>00241 <span class="keywordflow">return</span> <span class="keyword">new</span>(em-><a class="code" href="group__EM__Priv.html#ga721fc26fe37460f80e6d614cfe0d6fd8" title="Return a MemoryManager for the given ExprValue type.">getMM</a>(getMMIndex())) <a name="l00242"></a>00242 <a class="code" href="classCVC3_1_1ExprApply.html">ExprApply</a>(em, <a class="code" href="classCVC3_1_1Op.html">Op</a>(d_opExpr), d_children, idx); <a name="l00243"></a>00243 } <a name="l00244"></a>00244 <a name="l00245"></a>00245 <a name="l00246"></a><a class="code" href="classCVC3_1_1ExprApplyTmp.html#ae2c792ed30416c92749921094b8e4ba7">00246</a> <span class="keywordtype">bool</span> <a class="code" href="namespaceCVC3.html#a8e164436388f2d87c971d9bbde973c58">ExprApplyTmp::operator==</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1ExprValue.html" title="The base class for holding the actual data in expressions.">ExprValue</a>& ev2)<span class="keyword"> const </span>{ <a name="l00247"></a>00247 <span class="keywordflow">if</span>(getMMIndex() != ev2.<a class="code" href="classCVC3_1_1ExprValue.html#af4280c2539ba1dd4a089f0537f7ef3d4" title="Get unique memory manager ID.">getMMIndex</a>()) <a name="l00248"></a>00248 <span class="keywordflow">return</span> <span class="keyword">false</span>; <a name="l00249"></a>00249 <a name="l00250"></a>00250 <span class="keywordflow">return</span> (getOp() == ev2.<a class="code" href="classCVC3_1_1ExprValue.html#a2f674a5c2a7d6c8a2ac1bafdbfcf7a41" title="Get the Op from an Apply Expr.">getOp</a>()) <a name="l00251"></a>00251 && (getKids() == ev2.<a class="code" href="classCVC3_1_1ExprValue.html#a9599f84777bbbacdf953986ece645c2d" title="Get kids: by default, returns a ref to an empty vector.">getKids</a>()); <a name="l00252"></a>00252 } <a name="l00253"></a>00253 <a name="l00254"></a><a class="code" href="classCVC3_1_1ExprApplyTmp.html#ae6c716304151bd796921ac86fe9529a7">00254</a> <a class="code" href="classCVC3_1_1ExprValue.html" title="The base class for holding the actual data in expressions.">ExprValue</a>* ExprApplyTmp::copy(<a class="code" href="classCVC3_1_1ExprManager.html">ExprManager</a>* em, <a class="code" href="namespaceCVC3.html#a4233916514848331ee104548acbab912" title="Expression index type.">ExprIndex</a> idx)<span class="keyword"> const </span>{ <a name="l00255"></a>00255 <span class="keywordflow">if</span> (d_em != em) { <a name="l00256"></a>00256 vector<Expr> children; <a name="l00257"></a>00257 vector<Expr>::const_iterator <a name="l00258"></a>00258 i = d_children.begin(), iend = d_children.end(); <a name="l00259"></a>00259 <span class="keywordflow">for</span> (; i != iend; ++i) <a name="l00260"></a>00260 children.push_back(rebuild(*i, em)); <a name="l00261"></a>00261 <span class="keywordflow">return</span> <span class="keyword">new</span>(em-><a class="code" href="group__EM__Priv.html#ga721fc26fe37460f80e6d614cfe0d6fd8" title="Return a MemoryManager for the given ExprValue type.">getMM</a>(getMMIndex())) <a name="l00262"></a>00262 <a class="code" href="classCVC3_1_1ExprApply.html">ExprApply</a>(em, <a class="code" href="classCVC3_1_1Op.html">Op</a>(rebuild(d_opExpr, em)), children, idx); <a name="l00263"></a>00263 } <a name="l00264"></a>00264 <span class="keywordflow">return</span> <span class="keyword">new</span>(em-><a class="code" href="group__EM__Priv.html#ga721fc26fe37460f80e6d614cfe0d6fd8" title="Return a MemoryManager for the given ExprValue type.">getMM</a>(getMMIndex())) <a name="l00265"></a>00265 <a class="code" href="classCVC3_1_1ExprApply.html">ExprApply</a>(em, <a class="code" href="classCVC3_1_1Op.html">Op</a>(d_opExpr), d_children, idx); <a name="l00266"></a>00266 } <a name="l00267"></a>00267 <a name="l00268"></a>00268 <a name="l00269"></a><a class="code" href="classCVC3_1_1ExprClosure.html#a5436ff96ddf0bc10741e5704e017b9e5">00269</a> <span class="keywordtype">bool</span> <a class="code" href="namespaceCVC3.html#a8e164436388f2d87c971d9bbde973c58">ExprClosure::operator==</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1ExprValue.html" title="The base class for holding the actual data in expressions.">ExprValue</a>& ev2)<span class="keyword"> const </span>{ <a name="l00270"></a>00270 <span class="keywordflow">if</span>(getMMIndex() != ev2.<a class="code" href="classCVC3_1_1ExprValue.html#af4280c2539ba1dd4a089f0537f7ef3d4" title="Get unique memory manager ID.">getMMIndex</a>()) <a name="l00271"></a>00271 <span class="keywordflow">return</span> <span class="keyword">false</span>; <a name="l00272"></a>00272 <a name="l00273"></a>00273 <span class="keywordflow">return</span> (getKind() == ev2.<a class="code" href="classCVC3_1_1ExprValue.html#af395e6f6a67e80f2fbd1dc4bee29989c" title="Get the kind of the expression.">getKind</a>()) <a name="l00274"></a>00274 && (getBody() == ev2.<a class="code" href="classCVC3_1_1ExprValue.html#ab9acd5e57727e14c4873a6ae45985903">getBody</a>()) <a name="l00275"></a>00275 && (getVars() == ev2.<a class="code" href="classCVC3_1_1ExprValue.html#ac703cf03606d107e9a547d758ecc425b">getVars</a>()); <a name="l00276"></a>00276 } <a name="l00277"></a>00277 <a name="l00278"></a><a class="code" href="classCVC3_1_1ExprClosure.html#ab6e542c95c172b7808b5482f07b98ece">00278</a> <a class="code" href="classCVC3_1_1ExprValue.html" title="The base class for holding the actual data in expressions.">ExprValue</a>* ExprClosure::copy(<a class="code" href="classCVC3_1_1ExprManager.html">ExprManager</a>* em, <a class="code" href="namespaceCVC3.html#a4233916514848331ee104548acbab912" title="Expression index type.">ExprIndex</a> idx)<span class="keyword"> const </span>{ <a name="l00279"></a>00279 <span class="keywordflow">if</span> (d_em != em) { <a name="l00280"></a>00280 vector<Expr> vars; <a name="l00281"></a>00281 vector<Expr>::const_iterator i = d_vars.begin(), iend = d_vars.end(); <a name="l00282"></a>00282 <span class="keywordflow">for</span> (; i != iend; ++i) <a name="l00283"></a>00283 vars.push_back(rebuild(*i, em)); <a name="l00284"></a>00284 <a name="l00285"></a>00285 vector<vector<Expr> > manual_trigs; <a name="l00286"></a>00286 vector<vector<Expr> >::const_iterator j = d_manual_triggers.begin(), jend = d_manual_triggers.end(); <a name="l00287"></a>00287 <span class="keywordflow">for</span> (; j != jend; ++j) { <a name="l00288"></a>00288 vector<Expr >::const_iterator k = j->begin(), kend = j->end(); <a name="l00289"></a>00289 vector<Expr> cur_trig; <a name="l00290"></a>00290 <span class="keywordflow">for</span> (; k != kend; ++k){ <a name="l00291"></a>00291 cur_trig.push_back(rebuild(*k,em)); <a name="l00292"></a>00292 } <a name="l00293"></a>00293 <span class="comment">// manual_trigs.push_back(rebuild(*j, em));</span> <a name="l00294"></a>00294 manual_trigs.push_back(cur_trig); <a name="l00295"></a>00295 } <a name="l00296"></a>00296 <a name="l00297"></a>00297 <span class="keywordflow">return</span> <span class="keyword">new</span>(em-><a class="code" href="group__EM__Priv.html#ga721fc26fe37460f80e6d614cfe0d6fd8" title="Return a MemoryManager for the given ExprValue type.">getMM</a>(getMMIndex())) <a name="l00298"></a>00298 <a class="code" href="classCVC3_1_1ExprClosure.html" title="A "closure" expression which binds variables used in the "body". Used by LAMBDA and quantifiers...">ExprClosure</a>(em, d_kind, vars, rebuild(d_body, em), manual_trigs, idx); <a name="l00299"></a>00299 } <a name="l00300"></a>00300 <span class="keywordflow">return</span> <span class="keyword">new</span>(em-><a class="code" href="group__EM__Priv.html#ga721fc26fe37460f80e6d614cfe0d6fd8" title="Return a MemoryManager for the given ExprValue type.">getMM</a>(getMMIndex())) <a name="l00301"></a>00301 <a class="code" href="classCVC3_1_1ExprClosure.html" title="A "closure" expression which binds variables used in the "body". Used by LAMBDA and quantifiers...">ExprClosure</a>(em, d_kind, d_vars, d_body, d_manual_triggers, idx); <a name="l00302"></a>00302 } <a name="l00303"></a>00303 <a name="l00304"></a>00304 <span class="comment"></span> <a name="l00305"></a>00305 <span class="comment">////////////////////////////////////////////////////////////////////////</span> <a name="l00306"></a>00306 <span class="comment"></span><span class="comment">// Methods of subclasses of ExprValue</span><span class="comment"></span> <a name="l00307"></a>00307 <span class="comment">////////////////////////////////////////////////////////////////////////</span> <a name="l00308"></a>00308 <span class="comment"></span> <a name="l00309"></a>00309 <span class="comment">// Hash function for subclasses with kids.</span> <a name="l00310"></a><a class="code" href="classCVC3_1_1ExprValue.html#aa27236b59d2bf64117e56688301de14f">00310</a> <span class="keywordtype">size_t</span> ExprValue::hash(<span class="keyword">const</span> <span class="keywordtype">int</span> kind, <span class="keyword">const</span> std::vector<Expr>& kids) { <a name="l00311"></a>00311 <span class="keywordtype">size_t</span> res(s_intHash((<span class="keywordtype">long</span> <span class="keywordtype">int</span>)kind)); <a name="l00312"></a>00312 <span class="keywordflow">for</span>(std::vector<Expr>::const_iterator i=kids.begin(), iend=kids.end(); <a name="l00313"></a>00313 i!=iend; ++i) { <a name="l00314"></a>00314 <span class="keywordtype">void</span>* ptr = i->d_expr; <a name="l00315"></a>00315 res = res*<a class="code" href="expr__value_8h.html#ac4add2a227a10511e0128d63952030e8">PRIME</a> + pointerHash(ptr); <a name="l00316"></a>00316 } <a name="l00317"></a>00317 <span class="keywordflow">return</span> res; <a name="l00318"></a>00318 } <a name="l00319"></a>00319 <a name="l00320"></a>00320 <a name="l00321"></a>00321 <span class="comment">// Size function for subclasses with kids.</span> <a name="l00322"></a><a class="code" href="classCVC3_1_1ExprValue.html#a1d7a5dc3a272a82518aefd68f741c792">00322</a> <a class="code" href="classCVC3_1_1Unsigned.html">Unsigned</a> ExprValue::sizeWithChildren(<span class="keyword">const</span> std::vector<Expr>& kids) <a name="l00323"></a>00323 { <a name="l00324"></a>00324 <a class="code" href="classCVC3_1_1Unsigned.html">Unsigned</a> res = 1; <a name="l00325"></a>00325 <span class="keywordflow">for</span>(vector<Expr>::const_iterator i=kids.begin(), iend=kids.end(); <a name="l00326"></a>00326 i!=iend; ++i) { <a name="l00327"></a>00327 res += (*i).d_expr->getSize(); <a name="l00328"></a>00328 } <a name="l00329"></a>00329 <span class="keywordflow">return</span> res; <a name="l00330"></a>00330 } <a name="l00331"></a>00331 <a name="l00332"></a>00332 <a name="l00333"></a><a class="code" href="classCVC3_1_1ExprClosure.html#a951f66c6e23cc85e9971d3635a5ca32f">00333</a> <span class="keywordtype">size_t</span> ExprClosure::computeHash()<span class="keyword"> const </span>{ <a name="l00334"></a>00334 <span class="keywordflow">return</span> d_body.<a class="code" href="classCVC3_1_1Unsigned.html#aae300bddeae05aa96540151f6ac503be">hash</a>()*<a class="code" href="expr__value_8h.html#ac4add2a227a10511e0128d63952030e8">PRIME</a> + ExprValue::hash(d_kind, d_vars); <a name="l00335"></a>00335 } <a name="l00336"></a>00336 <a name="l00337"></a>00337 <a name="l00338"></a>00338 } <span class="comment">// end of namespace CVC3</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>