Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 583ffa4ba069126c3ba0bc565dc0485a > files > 1688

cvc3-doc-2.4.1-1.fc15.noarch.rpm

<!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: theory_datatype_lazy.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&#160;<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&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;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&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
<div class="header">
  <div class="headertitle">
<div class="title">theory_datatype_lazy.cpp</div>  </div>
</div>
<div class="contents">
<a href="theory__datatype__lazy_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 theory_datatype_lazy.cpp</span>
<a name="l00004"></a>00004 <span class="comment"> *</span>
<a name="l00005"></a>00005 <span class="comment"> * Author: Clark Barrett</span>
<a name="l00006"></a>00006 <span class="comment"> *</span>
<a name="l00007"></a>00007 <span class="comment"> * Created: Wed Dec  1 22:32:26 2004</span>
<a name="l00008"></a>00008 <span class="comment"> *</span>
<a name="l00009"></a>00009 <span class="comment"> * &lt;hr&gt;</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"> * &lt;hr&gt;</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 
<a name="l00022"></a>00022 <span class="preprocessor">#include &quot;<a class="code" href="theory__datatype__lazy_8h.html">theory_datatype_lazy.h</a>&quot;</span>
<a name="l00023"></a>00023 <span class="preprocessor">#include &quot;<a class="code" href="datatype__proof__rules_8h.html" title="Abstract interface for recursive datatype proof rules.">datatype_proof_rules.h</a>&quot;</span>
<a name="l00024"></a>00024 <span class="preprocessor">#include &quot;<a class="code" href="typecheck__exception_8h.html" title="An exception to be thrown at typecheck error.">typecheck_exception.h</a>&quot;</span>
<a name="l00025"></a>00025 <span class="preprocessor">#include &quot;<a class="code" href="parser__exception_8h.html" title="An exception thrown by the parser.">parser_exception.h</a>&quot;</span>
<a name="l00026"></a>00026 <span class="preprocessor">#include &quot;<a class="code" href="smtlib__exception_8h.html" title="An exception to be thrown by the smtlib translator.">smtlib_exception.h</a>&quot;</span>
<a name="l00027"></a>00027 <span class="preprocessor">#include &quot;<a class="code" href="theory__core_8h.html">theory_core.h</a>&quot;</span>
<a name="l00028"></a>00028 <span class="preprocessor">#include &quot;<a class="code" href="theory__uf_8h.html">theory_uf.h</a>&quot;</span>
<a name="l00029"></a>00029 <span class="preprocessor">#include &quot;<a class="code" href="command__line__flags_8h.html">command_line_flags.h</a>&quot;</span>
<a name="l00030"></a>00030 
<a name="l00031"></a>00031 
<a name="l00032"></a>00032 <span class="keyword">using namespace </span>std;
<a name="l00033"></a>00033 <span class="keyword">using namespace </span>CVC3;
<a name="l00034"></a>00034 
<a name="l00035"></a>00035 <span class="comment"></span>
<a name="l00036"></a>00036 <span class="comment">///////////////////////////////////////////////////////////////////////////////</span>
<a name="l00037"></a>00037 <span class="comment"></span><span class="comment">// TheoryDatatypeLazy Public Methods                                             //</span><span class="comment"></span>
<a name="l00038"></a>00038 <span class="comment">///////////////////////////////////////////////////////////////////////////////</span>
<a name="l00039"></a>00039 <span class="comment"></span>
<a name="l00040"></a>00040 
<a name="l00041"></a><a class="code" href="classCVC3_1_1TheoryDatatypeLazy.html#ab5f0bb6ca7f6e9496e1dd54ccea09f35">00041</a> TheoryDatatypeLazy::TheoryDatatypeLazy(<a class="code" href="classCVC3_1_1TheoryCore.html" title="This theory handles the built-in logical connectives plus equality. It also handles the registration ...">TheoryCore</a>* core)
<a name="l00042"></a>00042   : <a class="code" href="classCVC3_1_1TheoryDatatype.html" title="This theory handles datatypes.">TheoryDatatype</a>(core),
<a name="l00043"></a>00043     d_processQueue(core-&gt;getCM()-&gt;getCurrentContext()),
<a name="l00044"></a>00044     d_processQueueKind(core-&gt;getCM()-&gt;getCurrentContext()),
<a name="l00045"></a>00045     d_processIndex(core-&gt;getCM()-&gt;getCurrentContext(), 0),
<a name="l00046"></a>00046     d_typeComplete(core-&gt;getCM()-&gt;getCurrentContext(), false)
<a name="l00047"></a>00047 { }
<a name="l00048"></a>00048 
<a name="l00049"></a>00049 
<a name="l00050"></a><a class="code" href="classCVC3_1_1TheoryDatatypeLazy.html#a7e7f8d89852266d4a66d27c5a61237bc">00050</a> <span class="keywordtype">void</span> <a class="code" href="classCVC3_1_1TheoryDatatypeLazy.html#a7e7f8d89852266d4a66d27c5a61237bc">TheoryDatatypeLazy::instantiate</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Unsigned.html">Unsigned</a>&amp; u)
<a name="l00051"></a>00051 {
<a name="l00052"></a>00052   <a class="code" href="debug_8h.html#a40dac3bdb2166ffc852ee8b1489d2b56">DebugAssert</a>(e.<a class="code" href="group__ExprPkg.html#ga4dc94c33ae308ff8d9d004f49df8f42b">hasFind</a>() &amp;&amp; <a class="code" href="classCVC3_1_1Theory.html#a08412b310cb743536f7edd9fccd60e46" title="Return the find of e, or e if it has no find.">findExpr</a>(e) == e,
<a name="l00053"></a>00053               <span class="stringliteral">&quot;datatype: instantiate: Expected find(e)=e&quot;</span>);
<a name="l00054"></a>00054   <span class="keywordflow">if</span> (<a class="code" href="namespaceCVC3.html#a91840d293c43120244ce5b5165bdacc4">isConstructor</a>(e) || e.<a class="code" href="group__ExprPkg.html#gabe0b99a2c155f75ceedd4f06263ddebb">isTranslated</a>()) <span class="keywordflow">return</span>;
<a name="l00055"></a>00055   <a class="code" href="debug_8h.html#a40dac3bdb2166ffc852ee8b1489d2b56">DebugAssert</a>(u != 0 &amp;&amp; (u &amp; (u-1)) == 0,
<a name="l00056"></a>00056               <span class="stringliteral">&quot;datatype: instantiate: Expected single label in u&quot;</span>);
<a name="l00057"></a>00057   <a class="code" href="debug_8h.html#a40dac3bdb2166ffc852ee8b1489d2b56">DebugAssert</a>(<a class="code" href="classCVC3_1_1TheoryDatatype.html#a6ec421864b0680b8a2cf581304e6b31a">d_datatypes</a>.<a class="code" href="classCVC3_1_1ExprMap.html#ae50ab1874dd63b575553e7db769abe28">find</a>(e.<a class="code" href="group__ExprPkg.html#ga42929221eb172250697b72c28af6de07" title="Get the type. Recursively compute if necessary.">getType</a>().<a class="code" href="classCVC3_1_1Type.html#a0bc1eebf8dbd9d2880e1f18d7804e5c2">getExpr</a>()) != <a class="code" href="classCVC3_1_1TheoryDatatype.html#a6ec421864b0680b8a2cf581304e6b31a">d_datatypes</a>.<a class="code" href="classCVC3_1_1ExprMap.html#a283ae6c44308cbdda0d82da5a16e52c8">end</a>(),
<a name="l00058"></a>00058               <span class="stringliteral">&quot;datatype: instantiate: Unexpected type: &quot;</span>+e.<a class="code" href="group__ExprPkg.html#ga42929221eb172250697b72c28af6de07" title="Get the type. Recursively compute if necessary.">getType</a>().<a class="code" href="classCVC3_1_1Type.html#a2f5ce4b1973ec02b2f2b2eba8ce3cc50">toString</a>()
<a name="l00059"></a>00059               +<span class="stringliteral">&quot;\n\n for expression: &quot;</span>+e.<a class="code" href="group__ExprPkg.html#gaf3028bb1619f8cc69b66ec712e1adb54" title="Print the expression to a string.">toString</a>());
<a name="l00060"></a>00060   <a class="code" href="classCVC3_1_1ExprMap.html">ExprMap&lt;unsigned&gt;</a>&amp; c = <a class="code" href="classCVC3_1_1TheoryDatatype.html#a6ec421864b0680b8a2cf581304e6b31a">d_datatypes</a>[e.<a class="code" href="group__ExprPkg.html#ga42929221eb172250697b72c28af6de07" title="Get the type. Recursively compute if necessary.">getType</a>().<a class="code" href="classCVC3_1_1Type.html#a0bc1eebf8dbd9d2880e1f18d7804e5c2">getExpr</a>()];
<a name="l00061"></a>00061   <a class="code" href="classCVC3_1_1ExprMap.html">ExprMap&lt;unsigned&gt;::iterator</a> c_it = c.<a class="code" href="classCVC3_1_1ExprMap.html#a3db85401f8535daf4054fde531cd46b1">begin</a>(), c_end = c.end();
<a name="l00062"></a>00062   <span class="keywordflow">for</span> (; c_it != c_end; ++c_it) {
<a name="l00063"></a>00063     <span class="keywordflow">if</span> ((u &amp; ((<a class="code" href="classCVC3_1_1Unsigned.html">Unsigned</a>)1 &lt;&lt; <span class="keywordtype">unsigned</span>((*c_it).second))) != 0) <span class="keywordflow">break</span>;
<a name="l00064"></a>00064   }
<a name="l00065"></a>00065   <a class="code" href="debug_8h.html#a40dac3bdb2166ffc852ee8b1489d2b56">DebugAssert</a>(c_it != c_end,
<a name="l00066"></a>00066               <span class="stringliteral">&quot;datatype: instantiate: couldn&#39;t find constructor&quot;</span>);
<a name="l00067"></a>00067   <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> cons = (*c_it).first;
<a name="l00068"></a>00068 
<a name="l00069"></a>00069   <span class="keywordflow">if</span> (!cons.<a class="code" href="group__ExprPkg.html#gacf628bd70fc2c4766afa268ed22ea947">isFinite</a>() &amp;&amp; !e.<a class="code" href="group__ExprPkg.html#ga3292a2d664355dd3246479f21e6f26cb">isSelected</a>()) <span class="keywordflow">return</span>;
<a name="l00070"></a>00070 
<a name="l00071"></a>00071   <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a> consType = cons.<a class="code" href="group__ExprPkg.html#ga42929221eb172250697b72c28af6de07" title="Get the type. Recursively compute if necessary.">getType</a>();
<a name="l00072"></a>00072   <span class="keywordflow">if</span> (consType.<a class="code" href="classCVC3_1_1Type.html#abd7ab3fcb112e27aa05da8981b56e02c">arity</a>() == 1) {
<a name="l00073"></a>00073     <a class="code" href="classCVC3_1_1TheoryDatatypeLazy.html#a75042011bc9636d788c84d92c94250e7">d_processQueue</a>.<a class="code" href="classCVC3_1_1CDList.html#aa1e8d3591c596d1b9c585dec955b519b">push_back</a>(<a class="code" href="classCVC3_1_1TheoryDatatype.html#abcd88b0572b5751bddccd9210939f5d0">d_rules</a>-&gt;<a class="code" href="classCVC3_1_1DatatypeProofRules.html#a1f1fede903939b996f001baf43ec1f17">dummyTheorem</a>(<a class="code" href="classCVC3_1_1TheoryDatatype.html#a64a98802daa8a6a7c4f683b60740961f">d_facts</a>, e.<a class="code" href="group__ExprPkg.html#gacb48495ca445c895f95d0c3c1ae2070b">eqExpr</a>(cons)));
<a name="l00074"></a>00074     <a class="code" href="classCVC3_1_1TheoryDatatypeLazy.html#a1f2bd4ae44724fea619151260c7c0250">d_processQueueKind</a>.<a class="code" href="classCVC3_1_1CDList.html#aa1e8d3591c596d1b9c585dec955b519b">push_back</a>(<a class="code" href="classCVC3_1_1TheoryDatatypeLazy.html#abe2ec47fb8b06ceab03d5cf6afbbe6e1aa194ff21850e4ccb9f0e61ba3c5b7bfb">ENQUEUE</a>);
<a name="l00075"></a>00075     <span class="keywordflow">return</span>;
<a name="l00076"></a>00076   }
<a name="l00077"></a>00077   <span class="comment">// create vars</span>
<a name="l00078"></a>00078   vector&lt;Expr&gt; vars;
<a name="l00079"></a>00079   <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; consType.<a class="code" href="classCVC3_1_1Type.html#abd7ab3fcb112e27aa05da8981b56e02c">arity</a>()-1; ++i) {
<a name="l00080"></a>00080     vars.push_back(<a class="code" href="classCVC3_1_1Theory.html#abc2e30308c9e1f3cf752cfe8d939df1e" title="Access to ExprManager.">getEM</a>()-&gt;newBoundVarExpr(consType[i]));
<a name="l00081"></a>00081   }
<a name="l00082"></a>00082   <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> e2 = <a class="code" href="classCVC3_1_1Theory.html#abc2e30308c9e1f3cf752cfe8d939df1e" title="Access to ExprManager.">getEM</a>()-&gt;<a class="code" href="group__EM__Priv.html#ga0d2ff7603a249b30b2df4e549607ad6e">newClosureExpr</a>(<a class="code" href="kinds_8h.html#aa10c9e8951b8ccf714a59ec321bdac5ba3197625a1bb2264943f5a95f236d9973">EXISTS</a>, vars,
<a name="l00083"></a>00083                                     e.<a class="code" href="group__ExprPkg.html#gacb48495ca445c895f95d0c3c1ae2070b">eqExpr</a>(<a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>(cons.<a class="code" href="group__ExprPkg.html#ga3aefe2fb15c2d8e3a51dd92dbcc5cdc5" title="Make the expr into an operator.">mkOp</a>(), vars)));
<a name="l00084"></a>00084   <a class="code" href="classCVC3_1_1TheoryDatatypeLazy.html#a75042011bc9636d788c84d92c94250e7">d_processQueue</a>.<a class="code" href="classCVC3_1_1CDList.html#aa1e8d3591c596d1b9c585dec955b519b">push_back</a>(<a class="code" href="classCVC3_1_1TheoryDatatype.html#abcd88b0572b5751bddccd9210939f5d0">d_rules</a>-&gt;<a class="code" href="classCVC3_1_1DatatypeProofRules.html#a1f1fede903939b996f001baf43ec1f17">dummyTheorem</a>(<a class="code" href="classCVC3_1_1TheoryDatatype.html#a64a98802daa8a6a7c4f683b60740961f">d_facts</a>, e2));
<a name="l00085"></a>00085   <a class="code" href="classCVC3_1_1TheoryDatatypeLazy.html#a1f2bd4ae44724fea619151260c7c0250">d_processQueueKind</a>.<a class="code" href="classCVC3_1_1CDList.html#aa1e8d3591c596d1b9c585dec955b519b">push_back</a>(<a class="code" href="classCVC3_1_1TheoryDatatypeLazy.html#abe2ec47fb8b06ceab03d5cf6afbbe6e1aa194ff21850e4ccb9f0e61ba3c5b7bfb">ENQUEUE</a>);
<a name="l00086"></a>00086   e.<a class="code" href="group__ExprPkg.html#gaf941ebb5b9a8e6ee0ca004d59425fb42" title="Set the translated flag for this Expr.">setTranslated</a>();
<a name="l00087"></a>00087 }
<a name="l00088"></a>00088 
<a name="l00089"></a>00089 
<a name="l00090"></a><a class="code" href="classCVC3_1_1TheoryDatatypeLazy.html#a273b34945dbc3a4f1e4e3d020a20fc88">00090</a> <span class="keywordtype">void</span> <a class="code" href="classCVC3_1_1TheoryDatatypeLazy.html#a273b34945dbc3a4f1e4e3d020a20fc88">TheoryDatatypeLazy::initializeLabels</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a>&amp; t)
<a name="l00091"></a>00091 {
<a name="l00092"></a>00092   <a class="code" href="debug_8h.html#a40dac3bdb2166ffc852ee8b1489d2b56">DebugAssert</a>(<a class="code" href="classCVC3_1_1Theory.html#a08412b310cb743536f7edd9fccd60e46" title="Return the find of e, or e if it has no find.">findExpr</a>(e) == e,
<a name="l00093"></a>00093               <span class="stringliteral">&quot;datatype: initializeLabels: Expected find(e)=e&quot;</span>);
<a name="l00094"></a>00094   <a class="code" href="debug_8h.html#a40dac3bdb2166ffc852ee8b1489d2b56">DebugAssert</a>(<a class="code" href="classCVC3_1_1TheoryDatatype.html#a6ec421864b0680b8a2cf581304e6b31a">d_datatypes</a>.<a class="code" href="classCVC3_1_1ExprMap.html#ae50ab1874dd63b575553e7db769abe28">find</a>(t.<a class="code" href="classCVC3_1_1Type.html#a0bc1eebf8dbd9d2880e1f18d7804e5c2">getExpr</a>()) != <a class="code" href="classCVC3_1_1TheoryDatatype.html#a6ec421864b0680b8a2cf581304e6b31a">d_datatypes</a>.<a class="code" href="classCVC3_1_1ExprMap.html#a283ae6c44308cbdda0d82da5a16e52c8">end</a>(),
<a name="l00095"></a>00095               <span class="stringliteral">&quot;Unknown datatype: &quot;</span>+t.<a class="code" href="classCVC3_1_1Type.html#a0bc1eebf8dbd9d2880e1f18d7804e5c2">getExpr</a>().<a class="code" href="group__ExprPkg.html#gaf3028bb1619f8cc69b66ec712e1adb54" title="Print the expression to a string.">toString</a>());
<a name="l00096"></a>00096   <a class="code" href="classCVC3_1_1ExprMap.html">ExprMap&lt;unsigned&gt;</a>&amp; c = <a class="code" href="classCVC3_1_1TheoryDatatype.html#a6ec421864b0680b8a2cf581304e6b31a">d_datatypes</a>[t.<a class="code" href="classCVC3_1_1Type.html#a0bc1eebf8dbd9d2880e1f18d7804e5c2">getExpr</a>()];
<a name="l00097"></a>00097   <a class="code" href="debug_8h.html#a40dac3bdb2166ffc852ee8b1489d2b56">DebugAssert</a>(<a class="code" href="classCVC3_1_1TheoryDatatype.html#af4d5b05a1dad378a941cb8c40d0142ff">d_labels</a>.<a class="code" href="classCVC3_1_1CDMap.html#a1cadecbd2d6fa614a2f2e9419aa43f33">find</a>(e) == <a class="code" href="classCVC3_1_1TheoryDatatype.html#af4d5b05a1dad378a941cb8c40d0142ff">d_labels</a>.<a class="code" href="classCVC3_1_1CDMap.html#a2a26c7cc4db12cb17d273db5cfa5a890">end</a>(),
<a name="l00098"></a>00098               <span class="stringliteral">&quot;datatype: initializeLabels: expected unlabeled expr&quot;</span>);
<a name="l00099"></a>00099   <span class="keywordflow">if</span> (<a class="code" href="namespaceCVC3.html#a91840d293c43120244ce5b5165bdacc4">isConstructor</a>(e)) {
<a name="l00100"></a>00100     <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> cons = <a class="code" href="namespaceCVC3.html#ac1eec763ed1ae5d0f52c4bed47d6fee5">getConstructor</a>(e);
<a name="l00101"></a>00101     <a class="code" href="debug_8h.html#a40dac3bdb2166ffc852ee8b1489d2b56">DebugAssert</a>(c.find(cons) != c.end(),
<a name="l00102"></a>00102                 <span class="stringliteral">&quot;datatype: initializeLabels: Couldn&#39;t find constructor &quot;</span>
<a name="l00103"></a>00103                 +cons.<a class="code" href="group__ExprPkg.html#gaf3028bb1619f8cc69b66ec712e1adb54" title="Print the expression to a string.">toString</a>());
<a name="l00104"></a>00104     <span class="keywordtype">unsigned</span> position = c[cons];
<a name="l00105"></a>00105     <a class="code" href="classCVC3_1_1TheoryDatatype.html#af4d5b05a1dad378a941cb8c40d0142ff">d_labels</a>.<a class="code" href="classCVC3_1_1CDMap.html#a664a15046de83b0af599f488cb420022">insert</a>(e,
<a name="l00106"></a>00106       <a class="code" href="classCVC3_1_1SmartCDO.html">SmartCDO&lt;Unsigned&gt;</a>(<a class="code" href="classCVC3_1_1Theory.html#a90684d2a97738341c00f8f9c99af7b66" title="Get a pointer to theoryCore.">theoryCore</a>()-&gt;getCM()-&gt;getCurrentContext(),
<a name="l00107"></a>00107                             1 &lt;&lt; position, 0));
<a name="l00108"></a>00108   }
<a name="l00109"></a>00109   <span class="keywordflow">else</span> {
<a name="l00110"></a>00110     <a class="code" href="debug_8h.html#a40dac3bdb2166ffc852ee8b1489d2b56">DebugAssert</a>(c.size() &gt; 0, <span class="stringliteral">&quot;No constructors?&quot;</span>);
<a name="l00111"></a>00111     <a class="code" href="classCVC3_1_1Unsigned.html">Unsigned</a> value = ((<a class="code" href="classCVC3_1_1Unsigned.html">Unsigned</a>)1 &lt;&lt; <span class="keywordtype">unsigned</span>(c.size())) - 1;
<a name="l00112"></a>00112     <a class="code" href="classCVC3_1_1TheoryDatatype.html#af4d5b05a1dad378a941cb8c40d0142ff">d_labels</a>.<a class="code" href="classCVC3_1_1CDMap.html#a664a15046de83b0af599f488cb420022">insert</a>(e,
<a name="l00113"></a>00113       <a class="code" href="classCVC3_1_1SmartCDO.html">SmartCDO&lt;Unsigned&gt;</a>(<a class="code" href="classCVC3_1_1Theory.html#a90684d2a97738341c00f8f9c99af7b66" title="Get a pointer to theoryCore.">theoryCore</a>()-&gt;getCM()-&gt;getCurrentContext(),
<a name="l00114"></a>00114                             value, 0));
<a name="l00115"></a>00115     <span class="keywordflow">if</span> (value == 1) <a class="code" href="classCVC3_1_1TheoryDatatypeLazy.html#a7e7f8d89852266d4a66d27c5a61237bc">instantiate</a>(e, 1);
<a name="l00116"></a>00116     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (!<a class="code" href="classCVC3_1_1TheoryDatatypeLazy.html#a7b8182ac7c805444afd13e2fe3b9d970">d_typeComplete</a>) {
<a name="l00117"></a>00117       <a class="code" href="classCVC3_1_1TheoryDatatype.html#a3b16dee83eb2df2c860c14752913a12e">d_splitters</a>.<a class="code" href="classCVC3_1_1CDList.html#aa1e8d3591c596d1b9c585dec955b519b">push_back</a>(e);
<a name="l00118"></a>00118     }
<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_1TheoryDatatypeLazy.html#a59df564de13b5482c49581880e816c8f">00123</a> <span class="keywordtype">void</span> <a class="code" href="classCVC3_1_1TheoryDatatypeLazy.html#a59df564de13b5482c49581880e816c8f">TheoryDatatypeLazy::mergeLabels</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a>&amp; thm,
<a name="l00124"></a>00124                                  <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e1, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e2)
<a name="l00125"></a>00125 {
<a name="l00126"></a>00126   <a class="code" href="debug_8h.html#a40dac3bdb2166ffc852ee8b1489d2b56">DebugAssert</a>(e2.<a class="code" href="group__ExprPkg.html#ga4dc94c33ae308ff8d9d004f49df8f42b">hasFind</a>(),
<a name="l00127"></a>00127               <span class="stringliteral">&quot;datatype: mergeLabels: Expected hasFind(e2)&quot;</span>);
<a name="l00128"></a>00128   <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> fthm = <a class="code" href="classCVC3_1_1Theory.html#ac59f888b3b3f973580e061ffd803b6bb" title="Return the theorem that e is equal to its find.">find</a>(e2);
<a name="l00129"></a>00129   <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; f = fthm.getRHS();
<a name="l00130"></a>00130   <a class="code" href="debug_8h.html#a40dac3bdb2166ffc852ee8b1489d2b56">DebugAssert</a>(<a class="code" href="classCVC3_1_1TheoryDatatype.html#af4d5b05a1dad378a941cb8c40d0142ff">d_labels</a>.<a class="code" href="classCVC3_1_1CDMap.html#a1cadecbd2d6fa614a2f2e9419aa43f33">find</a>(e1) != <a class="code" href="classCVC3_1_1TheoryDatatype.html#af4d5b05a1dad378a941cb8c40d0142ff">d_labels</a>.<a class="code" href="classCVC3_1_1CDMap.html#a2a26c7cc4db12cb17d273db5cfa5a890">end</a>() &amp;&amp;
<a name="l00131"></a>00131               <a class="code" href="classCVC3_1_1TheoryDatatype.html#af4d5b05a1dad378a941cb8c40d0142ff">d_labels</a>.<a class="code" href="classCVC3_1_1CDMap.html#a1cadecbd2d6fa614a2f2e9419aa43f33">find</a>(f) != <a class="code" href="classCVC3_1_1TheoryDatatype.html#af4d5b05a1dad378a941cb8c40d0142ff">d_labels</a>.<a class="code" href="classCVC3_1_1CDMap.html#a2a26c7cc4db12cb17d273db5cfa5a890">end</a>(),
<a name="l00132"></a>00132               <span class="stringliteral">&quot;mergeLabels: expr is not labeled&quot;</span>);
<a name="l00133"></a>00133   <a class="code" href="debug_8h.html#a40dac3bdb2166ffc852ee8b1489d2b56">DebugAssert</a>(e1.<a class="code" href="group__ExprPkg.html#ga42929221eb172250697b72c28af6de07" title="Get the type. Recursively compute if necessary.">getType</a>() == f.<a class="code" href="group__ExprPkg.html#ga42929221eb172250697b72c28af6de07" title="Get the type. Recursively compute if necessary.">getType</a>(), <span class="stringliteral">&quot;Expected same type&quot;</span>);
<a name="l00134"></a>00134   <a class="code" href="classCVC3_1_1Unsigned.html">Unsigned</a> u = <a class="code" href="classCVC3_1_1TheoryDatatype.html#af4d5b05a1dad378a941cb8c40d0142ff">d_labels</a>[f].get().get();
<a name="l00135"></a>00135   <a class="code" href="classCVC3_1_1Unsigned.html">Unsigned</a> uNew = u &amp; <a class="code" href="classCVC3_1_1TheoryDatatype.html#af4d5b05a1dad378a941cb8c40d0142ff">d_labels</a>[e1].get().get();
<a name="l00136"></a>00136   <span class="keywordflow">if</span> (u != uNew) {
<a name="l00137"></a>00137     <span class="keywordflow">if</span> (e2 != f) <a class="code" href="classCVC3_1_1TheoryDatatype.html#a64a98802daa8a6a7c4f683b60740961f">d_facts</a>.<a class="code" href="classCVC3_1_1CDList.html#aa1e8d3591c596d1b9c585dec955b519b">push_back</a>(fthm);
<a name="l00138"></a>00138     <span class="keywordflow">if</span> (!thm.<a class="code" href="classCVC3_1_1Theorem.html#afc6fdb0507eb3669e28d9be5ed0bd333">isNull</a>()) <a class="code" href="classCVC3_1_1TheoryDatatype.html#a64a98802daa8a6a7c4f683b60740961f">d_facts</a>.<a class="code" href="classCVC3_1_1CDList.html#aa1e8d3591c596d1b9c585dec955b519b">push_back</a>(thm);
<a name="l00139"></a>00139     <a class="code" href="classCVC3_1_1TheoryDatatype.html#af4d5b05a1dad378a941cb8c40d0142ff">d_labels</a>[f].get().set(uNew);
<a name="l00140"></a>00140     <span class="keywordflow">if</span> (uNew == 0) {
<a name="l00141"></a>00141       <a class="code" href="classCVC3_1_1Theory.html#a89f8e1e02e22ef524c286ce8b87bdea4" title="Make the context inconsistent; The formula proved by e must FALSE.">setInconsistent</a>(<a class="code" href="classCVC3_1_1TheoryDatatype.html#abcd88b0572b5751bddccd9210939f5d0">d_rules</a>-&gt;<a class="code" href="classCVC3_1_1DatatypeProofRules.html#a1f1fede903939b996f001baf43ec1f17">dummyTheorem</a>(<a class="code" href="classCVC3_1_1TheoryDatatype.html#a64a98802daa8a6a7c4f683b60740961f">d_facts</a>, <a class="code" href="classCVC3_1_1Theory.html#a0bbf7c5b6079fc99a0f759e5809fe6f5" title="Return FALSE Expr.">falseExpr</a>()));
<a name="l00142"></a>00142       <span class="keywordflow">return</span>;
<a name="l00143"></a>00143     }
<a name="l00144"></a>00144   }
<a name="l00145"></a>00145   <span class="keywordflow">if</span> (uNew != 0 &amp;&amp; ((uNew - 1) &amp; uNew) == 0) {
<a name="l00146"></a>00146     <a class="code" href="classCVC3_1_1TheoryDatatypeLazy.html#a7e7f8d89852266d4a66d27c5a61237bc">instantiate</a>(f, uNew);
<a name="l00147"></a>00147   }
<a name="l00148"></a>00148 }
<a name="l00149"></a>00149 
<a name="l00150"></a>00150 
<a name="l00151"></a><a class="code" href="classCVC3_1_1TheoryDatatypeLazy.html#a7e537c63d898af8fea10fb11c526ef2a">00151</a> <span class="keywordtype">void</span> <a class="code" href="classCVC3_1_1TheoryDatatypeLazy.html#a59df564de13b5482c49581880e816c8f">TheoryDatatypeLazy::mergeLabels</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a>&amp; thm, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e,
<a name="l00152"></a>00152                                  <span class="keywordtype">unsigned</span> position, <span class="keywordtype">bool</span> positive)
<a name="l00153"></a>00153 {
<a name="l00154"></a>00154   <a class="code" href="debug_8h.html#a40dac3bdb2166ffc852ee8b1489d2b56">DebugAssert</a>(e.<a class="code" href="group__ExprPkg.html#ga4dc94c33ae308ff8d9d004f49df8f42b">hasFind</a>(),
<a name="l00155"></a>00155               <span class="stringliteral">&quot;datatype: mergeLabels2: Expected hasFind(e)&quot;</span>);
<a name="l00156"></a>00156   <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> fthm = <a class="code" href="classCVC3_1_1Theory.html#ac59f888b3b3f973580e061ffd803b6bb" title="Return the theorem that e is equal to its find.">find</a>(e);
<a name="l00157"></a>00157   <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; f = fthm.getRHS();
<a name="l00158"></a>00158   <a class="code" href="debug_8h.html#a40dac3bdb2166ffc852ee8b1489d2b56">DebugAssert</a>(<a class="code" href="classCVC3_1_1TheoryDatatype.html#af4d5b05a1dad378a941cb8c40d0142ff">d_labels</a>.<a class="code" href="classCVC3_1_1CDMap.html#a1cadecbd2d6fa614a2f2e9419aa43f33">find</a>(f) != <a class="code" href="classCVC3_1_1TheoryDatatype.html#af4d5b05a1dad378a941cb8c40d0142ff">d_labels</a>.<a class="code" href="classCVC3_1_1CDMap.html#a2a26c7cc4db12cb17d273db5cfa5a890">end</a>(),
<a name="l00159"></a>00159               <span class="stringliteral">&quot;mergeLabels2: expr is not labeled&quot;</span>);
<a name="l00160"></a>00160   <a class="code" href="classCVC3_1_1Unsigned.html">Unsigned</a> u = <a class="code" href="classCVC3_1_1TheoryDatatype.html#af4d5b05a1dad378a941cb8c40d0142ff">d_labels</a>[f].get().get();
<a name="l00161"></a>00161   <a class="code" href="classCVC3_1_1Unsigned.html">Unsigned</a> uNew = (<a class="code" href="classCVC3_1_1Unsigned.html">Unsigned</a>)1 &lt;&lt; position;
<a name="l00162"></a>00162   <span class="keywordflow">if</span> (positive) {
<a name="l00163"></a>00163     uNew = u &amp; uNew;
<a name="l00164"></a>00164     <span class="keywordflow">if</span> (u == uNew) <span class="keywordflow">return</span>;
<a name="l00165"></a>00165   } <span class="keywordflow">else</span> <span class="keywordflow">if</span> ((u &amp; uNew) != 0) uNew = u - uNew;
<a name="l00166"></a>00166   <span class="keywordflow">else</span> <span class="keywordflow">return</span>;
<a name="l00167"></a>00167   <span class="keywordflow">if</span> (e != f) <a class="code" href="classCVC3_1_1TheoryDatatype.html#a64a98802daa8a6a7c4f683b60740961f">d_facts</a>.<a class="code" href="classCVC3_1_1CDList.html#aa1e8d3591c596d1b9c585dec955b519b">push_back</a>(fthm);
<a name="l00168"></a>00168   <a class="code" href="classCVC3_1_1TheoryDatatype.html#a64a98802daa8a6a7c4f683b60740961f">d_facts</a>.<a class="code" href="classCVC3_1_1CDList.html#aa1e8d3591c596d1b9c585dec955b519b">push_back</a>(thm);
<a name="l00169"></a>00169   <a class="code" href="classCVC3_1_1TheoryDatatype.html#af4d5b05a1dad378a941cb8c40d0142ff">d_labels</a>[f].get().set(uNew);
<a name="l00170"></a>00170   <span class="keywordflow">if</span> (uNew == 0)
<a name="l00171"></a>00171     <a class="code" href="classCVC3_1_1Theory.html#a89f8e1e02e22ef524c286ce8b87bdea4" title="Make the context inconsistent; The formula proved by e must FALSE.">setInconsistent</a>(<a class="code" href="classCVC3_1_1TheoryDatatype.html#abcd88b0572b5751bddccd9210939f5d0">d_rules</a>-&gt;<a class="code" href="classCVC3_1_1DatatypeProofRules.html#a1f1fede903939b996f001baf43ec1f17">dummyTheorem</a>(<a class="code" href="classCVC3_1_1TheoryDatatype.html#a64a98802daa8a6a7c4f683b60740961f">d_facts</a>, <a class="code" href="classCVC3_1_1Theory.html#a0bbf7c5b6079fc99a0f759e5809fe6f5" title="Return FALSE Expr.">falseExpr</a>()));
<a name="l00172"></a>00172   <span class="keywordflow">else</span> <span class="keywordflow">if</span> (((uNew - 1) &amp; uNew) == 0) {
<a name="l00173"></a>00173     <a class="code" href="classCVC3_1_1TheoryDatatypeLazy.html#a7e7f8d89852266d4a66d27c5a61237bc">instantiate</a>(f, uNew);
<a name="l00174"></a>00174   }
<a name="l00175"></a>00175 }
<a name="l00176"></a>00176 
<a name="l00177"></a>00177 
<a name="l00178"></a><a class="code" href="classCVC3_1_1TheoryDatatypeLazy.html#ad89c1890b5ed73dea2be216f5c299f6b">00178</a> <span class="keywordtype">void</span> <a class="code" href="classCVC3_1_1TheoryDatatypeLazy.html#ad89c1890b5ed73dea2be216f5c299f6b" title="Check for satisfiability in the theory.">TheoryDatatypeLazy::checkSat</a>(<span class="keywordtype">bool</span> fullEffort)
<a name="l00179"></a>00179 {
<a name="l00180"></a>00180   <span class="keywordtype">bool</span> done = <span class="keyword">false</span>;
<a name="l00181"></a>00181   <span class="keywordflow">while</span> (!done &amp;&amp; <a class="code" href="classCVC3_1_1TheoryDatatype.html#a1952cec9cef126b4c3d9611738f7169e">d_splittersIndex</a> &lt; <a class="code" href="classCVC3_1_1TheoryDatatype.html#a3b16dee83eb2df2c860c14752913a12e">d_splitters</a>.<a class="code" href="classCVC3_1_1CDList.html#adf92d0f391d73e7ac70da57db135af27">size</a>()) {
<a name="l00182"></a>00182     <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> e = <a class="code" href="classCVC3_1_1TheoryDatatype.html#a3b16dee83eb2df2c860c14752913a12e">d_splitters</a>[<a class="code" href="classCVC3_1_1TheoryDatatype.html#a1952cec9cef126b4c3d9611738f7169e">d_splittersIndex</a>];
<a name="l00183"></a>00183     <span class="keywordflow">if</span> (<a class="code" href="classCVC3_1_1Theory.html#a08412b310cb743536f7edd9fccd60e46" title="Return the find of e, or e if it has no find.">findExpr</a>(e) == e) {
<a name="l00184"></a>00184       <a class="code" href="debug_8h.html#a40dac3bdb2166ffc852ee8b1489d2b56">DebugAssert</a>(<a class="code" href="classCVC3_1_1TheoryDatatype.html#af4d5b05a1dad378a941cb8c40d0142ff">d_labels</a>.<a class="code" href="classCVC3_1_1CDMap.html#a1cadecbd2d6fa614a2f2e9419aa43f33">find</a>(e) != <a class="code" href="classCVC3_1_1TheoryDatatype.html#af4d5b05a1dad378a941cb8c40d0142ff">d_labels</a>.<a class="code" href="classCVC3_1_1CDMap.html#a2a26c7cc4db12cb17d273db5cfa5a890">end</a>(),
<a name="l00185"></a>00185                   <span class="stringliteral">&quot;checkSat: expr is not labeled&quot;</span>);
<a name="l00186"></a>00186       <a class="code" href="classCVC3_1_1Unsigned.html">Unsigned</a> u = <a class="code" href="classCVC3_1_1TheoryDatatype.html#af4d5b05a1dad378a941cb8c40d0142ff">d_labels</a>[e].get().get();
<a name="l00187"></a>00187       <span class="keywordflow">if</span> ((u &amp; (u-1)) != 0) {
<a name="l00188"></a>00188         done = <span class="keyword">true</span>;
<a name="l00189"></a>00189         <a class="code" href="debug_8h.html#a40dac3bdb2166ffc852ee8b1489d2b56">DebugAssert</a>(!<a class="code" href="classCVC3_1_1TheoryDatatype.html#a73d20b00d4a702698ea0a9baea9c5bc2">d_splitterAsserted</a> || !fullEffort,
<a name="l00190"></a>00190                     <span class="stringliteral">&quot;splitter should have been resolved&quot;</span>);
<a name="l00191"></a>00191         <span class="keywordflow">if</span> (!<a class="code" href="classCVC3_1_1TheoryDatatype.html#a73d20b00d4a702698ea0a9baea9c5bc2">d_splitterAsserted</a>) {
<a name="l00192"></a>00192           <a class="code" href="debug_8h.html#a40dac3bdb2166ffc852ee8b1489d2b56">DebugAssert</a>
<a name="l00193"></a>00193             (<a class="code" href="classCVC3_1_1TheoryDatatype.html#a6ec421864b0680b8a2cf581304e6b31a">d_datatypes</a>.<a class="code" href="classCVC3_1_1ExprMap.html#ae50ab1874dd63b575553e7db769abe28">find</a>(e.<a class="code" href="group__ExprPkg.html#ga42929221eb172250697b72c28af6de07" title="Get the type. Recursively compute if necessary.">getType</a>().<a class="code" href="classCVC3_1_1Type.html#a0bc1eebf8dbd9d2880e1f18d7804e5c2">getExpr</a>()) != <a class="code" href="classCVC3_1_1TheoryDatatype.html#a6ec421864b0680b8a2cf581304e6b31a">d_datatypes</a>.<a class="code" href="classCVC3_1_1ExprMap.html#a283ae6c44308cbdda0d82da5a16e52c8">end</a>(),
<a name="l00194"></a>00194              <span class="stringliteral">&quot;datatype: checkSat: Unexpected type: &quot;</span>+e.<a class="code" href="group__ExprPkg.html#ga42929221eb172250697b72c28af6de07" title="Get the type. Recursively compute if necessary.">getType</a>().<a class="code" href="classCVC3_1_1Type.html#a2f5ce4b1973ec02b2f2b2eba8ce3cc50">toString</a>()
<a name="l00195"></a>00195              +<span class="stringliteral">&quot;\n\n for expression: &quot;</span>+e.<a class="code" href="group__ExprPkg.html#gaf3028bb1619f8cc69b66ec712e1adb54" title="Print the expression to a string.">toString</a>());
<a name="l00196"></a>00196           <a class="code" href="classCVC3_1_1ExprMap.html">ExprMap&lt;unsigned&gt;</a>&amp; c = <a class="code" href="classCVC3_1_1TheoryDatatype.html#a6ec421864b0680b8a2cf581304e6b31a">d_datatypes</a>[e.<a class="code" href="group__ExprPkg.html#ga42929221eb172250697b72c28af6de07" title="Get the type. Recursively compute if necessary.">getType</a>().<a class="code" href="classCVC3_1_1Type.html#a0bc1eebf8dbd9d2880e1f18d7804e5c2">getExpr</a>()];
<a name="l00197"></a>00197           <a class="code" href="classCVC3_1_1ExprMap.html">ExprMap&lt;unsigned&gt;::iterator</a> c_it = c.<a class="code" href="classCVC3_1_1ExprMap.html#a3db85401f8535daf4054fde531cd46b1">begin</a>(), c_end = c.end();
<a name="l00198"></a>00198           <span class="keywordflow">for</span> (; c_it != c_end; ++c_it) {
<a name="l00199"></a>00199             <span class="keywordflow">if</span> ((u &amp; ((<a class="code" href="classCVC3_1_1Unsigned.html">Unsigned</a>)1 &lt;&lt; <span class="keywordtype">unsigned</span>((*c_it).second))) != 0) <span class="keywordflow">break</span>;
<a name="l00200"></a>00200           }
<a name="l00201"></a>00201           <a class="code" href="debug_8h.html#a40dac3bdb2166ffc852ee8b1489d2b56">DebugAssert</a>(c_it != c_end,
<a name="l00202"></a>00202               <span class="stringliteral">&quot;datatype: checkSat: couldn&#39;t find constructor&quot;</span>);
<a name="l00203"></a>00203           <a class="code" href="classCVC3_1_1Theory.html#a605e960d2442b587046c562723b7f03a" title="Suggest a splitter to the SearchEngine.">addSplitter</a>(<a class="code" href="classCVC3_1_1TheoryDatatype.html#a51372d26e89b189c8a5f42d18dd2eedc">datatypeTestExpr</a>((*c_it).first.getName(), e));
<a name="l00204"></a>00204           <a class="code" href="classCVC3_1_1TheoryDatatype.html#a73d20b00d4a702698ea0a9baea9c5bc2">d_splitterAsserted</a> = <span class="keyword">true</span>;
<a name="l00205"></a>00205         }
<a name="l00206"></a>00206       }
<a name="l00207"></a>00207     }
<a name="l00208"></a>00208     <span class="keywordflow">if</span> (!done) {
<a name="l00209"></a>00209       <a class="code" href="classCVC3_1_1TheoryDatatype.html#a73d20b00d4a702698ea0a9baea9c5bc2">d_splitterAsserted</a> = <span class="keyword">false</span>;
<a name="l00210"></a>00210       <a class="code" href="classCVC3_1_1TheoryDatatype.html#a1952cec9cef126b4c3d9611738f7169e">d_splittersIndex</a> = <a class="code" href="classCVC3_1_1TheoryDatatype.html#a1952cec9cef126b4c3d9611738f7169e">d_splittersIndex</a> + 1;
<a name="l00211"></a>00211     }
<a name="l00212"></a>00212   }
<a name="l00213"></a>00213   <span class="keywordflow">while</span> (!done &amp;&amp; <a class="code" href="classCVC3_1_1TheoryDatatypeLazy.html#afe146101faad984357b92935b04ddd41">d_processIndex</a> &lt; <a class="code" href="classCVC3_1_1TheoryDatatypeLazy.html#a75042011bc9636d788c84d92c94250e7">d_processQueue</a>.<a class="code" href="classCVC3_1_1CDList.html#adf92d0f391d73e7ac70da57db135af27">size</a>()) {
<a name="l00214"></a>00214     <a class="code" href="classCVC3_1_1TheoryDatatypeLazy.html#a7b8182ac7c805444afd13e2fe3b9d970">d_typeComplete</a> = <span class="keyword">true</span>;
<a name="l00215"></a>00215     <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> e = <a class="code" href="classCVC3_1_1TheoryDatatypeLazy.html#a75042011bc9636d788c84d92c94250e7">d_processQueue</a>[<a class="code" href="classCVC3_1_1TheoryDatatypeLazy.html#afe146101faad984357b92935b04ddd41">d_processIndex</a>];
<a name="l00216"></a>00216     <span class="keywordtype">int</span> kind = <a class="code" href="classCVC3_1_1TheoryDatatypeLazy.html#a1f2bd4ae44724fea619151260c7c0250">d_processQueueKind</a>[<a class="code" href="classCVC3_1_1TheoryDatatypeLazy.html#afe146101faad984357b92935b04ddd41">d_processIndex</a>];
<a name="l00217"></a>00217     <span class="keywordflow">switch</span> (kind) {
<a name="l00218"></a>00218       <span class="keywordflow">case</span> <a class="code" href="classCVC3_1_1TheoryDatatypeLazy.html#abe2ec47fb8b06ceab03d5cf6afbbe6e1a1ce6ec1069f8004532be473371dee6f3">MERGE1</a>: {
<a name="l00219"></a>00219         <span class="keywordflow">break</span>;
<a name="l00220"></a>00220       }
<a name="l00221"></a>00221       <span class="keywordflow">case</span> <a class="code" href="classCVC3_1_1TheoryDatatypeLazy.html#abe2ec47fb8b06ceab03d5cf6afbbe6e1aa194ff21850e4ccb9f0e61ba3c5b7bfb">ENQUEUE</a>:
<a name="l00222"></a>00222         done = <span class="keyword">true</span>;
<a name="l00223"></a>00223         <a class="code" href="classCVC3_1_1Theory.html#a93856c9af82b2c25c51b3c36bafb71f4" title="Submit a derived fact to the core from a decision procedure.">enqueueFact</a>(e);
<a name="l00224"></a>00224         <span class="keywordflow">break</span>;
<a name="l00225"></a>00225       <span class="keywordflow">case</span> <a class="code" href="classCVC3_1_1TheoryDatatypeLazy.html#abe2ec47fb8b06ceab03d5cf6afbbe6e1a557a22ca32f3635486a5e2a1840656d7">MERGE2</a>: {
<a name="l00226"></a>00226         <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; lhs = e.<a class="code" href="classCVC3_1_1Theorem.html#a206c04f39fbbcacef2337148675553f4">getLHS</a>();
<a name="l00227"></a>00227         <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; rhs = e.<a class="code" href="classCVC3_1_1Theorem.html#a97d957fcbf9094480851b1d2e5d3729f">getRHS</a>();
<a name="l00228"></a>00228         <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> thm(e);
<a name="l00229"></a>00229         <span class="keywordflow">if</span> (lhs.<a class="code" href="group__ExprPkg.html#ga3292a2d664355dd3246479f21e6f26cb">isSelected</a>() &amp;&amp; !rhs.<a class="code" href="group__ExprPkg.html#ga3292a2d664355dd3246479f21e6f26cb">isSelected</a>()) {
<a name="l00230"></a>00230           <a class="code" href="classCVC3_1_1TheoryDatatype.html#a64a98802daa8a6a7c4f683b60740961f">d_facts</a>.<a class="code" href="classCVC3_1_1CDList.html#aa1e8d3591c596d1b9c585dec955b519b">push_back</a>(e);
<a name="l00231"></a>00231           rhs.<a class="code" href="group__ExprPkg.html#ga50ebe7a6fa50064b2d01e0eaa25f931a" title="Set the Selected flag for this Expr.">setSelected</a>();
<a name="l00232"></a>00232           thm = <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a>();
<a name="l00233"></a>00233         }
<a name="l00234"></a>00234         <a class="code" href="classCVC3_1_1TheoryDatatypeLazy.html#a59df564de13b5482c49581880e816c8f">mergeLabels</a>(thm, lhs, rhs);
<a name="l00235"></a>00235         <span class="keywordflow">break</span>;
<a name="l00236"></a>00236       }
<a name="l00237"></a>00237       <span class="keywordflow">default</span>:
<a name="l00238"></a>00238         <a class="code" href="debug_8h.html#a40dac3bdb2166ffc852ee8b1489d2b56">DebugAssert</a>(<span class="keyword">false</span>, <span class="stringliteral">&quot;Unknown case&quot;</span>);
<a name="l00239"></a>00239     }
<a name="l00240"></a>00240     <a class="code" href="classCVC3_1_1TheoryDatatypeLazy.html#afe146101faad984357b92935b04ddd41">d_processIndex</a> = <a class="code" href="classCVC3_1_1TheoryDatatypeLazy.html#afe146101faad984357b92935b04ddd41">d_processIndex</a> + 1;
<a name="l00241"></a>00241   }
<a name="l00242"></a>00242 }
<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_1TheoryDatatypeLazy.html#ab9b700715fb9450717a3afded5a378ec">00246</a> <span class="keywordtype">void</span> <a class="code" href="classCVC3_1_1TheoryDatatypeLazy.html#ab9b700715fb9450717a3afded5a378ec" title="Set up the term e for call-backs when e or its children change.">TheoryDatatypeLazy::setup</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e)
<a name="l00247"></a>00247 {
<a name="l00248"></a>00248   <span class="keywordflow">if</span> (e.<a class="code" href="group__ExprPkg.html#ga42929221eb172250697b72c28af6de07" title="Get the type. Recursively compute if necessary.">getType</a>().<a class="code" href="classCVC3_1_1Type.html#a0bc1eebf8dbd9d2880e1f18d7804e5c2">getExpr</a>().<a class="code" href="group__ExprPkg.html#ga7814e4f55f65c7ca860c637413df5f4d">getKind</a>() == <a class="code" href="namespaceCVC3.html#af5adcbe1bc4a5aaacccfc9af11f98089ad94b8e65b0abc98bb6b5729da9e3b40a">DATATYPE</a> &amp;&amp;
<a name="l00249"></a>00249       <a class="code" href="classCVC3_1_1TheoryDatatype.html#af4d5b05a1dad378a941cb8c40d0142ff">d_labels</a>.<a class="code" href="classCVC3_1_1CDMap.html#a1cadecbd2d6fa614a2f2e9419aa43f33">find</a>(e) == <a class="code" href="classCVC3_1_1TheoryDatatype.html#af4d5b05a1dad378a941cb8c40d0142ff">d_labels</a>.<a class="code" href="classCVC3_1_1CDMap.html#a2a26c7cc4db12cb17d273db5cfa5a890">end</a>()) {
<a name="l00250"></a>00250     <a class="code" href="classCVC3_1_1TheoryDatatypeLazy.html#a273b34945dbc3a4f1e4e3d020a20fc88">initializeLabels</a>(e, e.<a class="code" href="group__ExprPkg.html#ga42929221eb172250697b72c28af6de07" title="Get the type. Recursively compute if necessary.">getType</a>());
<a name="l00251"></a>00251     e.<a class="code" href="group__ExprPkg.html#ga159d60cb0f32e09df89a395b2680664a" title="Add (e,i) to the notify list of this expression.">addToNotify</a>(<span class="keyword">this</span>, <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>());
<a name="l00252"></a>00252   }
<a name="l00253"></a>00253   <span class="keywordflow">if</span> (e.<a class="code" href="group__ExprPkg.html#ga7814e4f55f65c7ca860c637413df5f4d">getKind</a>() != <a class="code" href="kinds_8h.html#aa10c9e8951b8ccf714a59ec321bdac5ba5c41450c4e719ca40d8e734f6a2008f0">APPLY</a>) <span class="keywordflow">return</span>;
<a name="l00254"></a>00254   <span class="keywordflow">if</span> (<a class="code" href="namespaceCVC3.html#a91840d293c43120244ce5b5165bdacc4">isConstructor</a>(e) &amp;&amp; e.<a class="code" href="group__ExprPkg.html#ga28b901d05e52a5c646f83a95cc74f94b">arity</a>() &gt; 0) {
<a name="l00255"></a>00255     <a class="code" href="classCVC3_1_1TheoryDatatypeLazy.html#a75042011bc9636d788c84d92c94250e7">d_processQueue</a>.<a class="code" href="classCVC3_1_1CDList.html#aa1e8d3591c596d1b9c585dec955b519b">push_back</a>(<a class="code" href="classCVC3_1_1TheoryDatatype.html#abcd88b0572b5751bddccd9210939f5d0">d_rules</a>-&gt;<a class="code" href="classCVC3_1_1DatatypeProofRules.html#acbe824de0e366b711db6d23e23b72509">noCycle</a>(e));
<a name="l00256"></a>00256     <a class="code" href="classCVC3_1_1TheoryDatatypeLazy.html#a1f2bd4ae44724fea619151260c7c0250">d_processQueueKind</a>.<a class="code" href="classCVC3_1_1CDList.html#aa1e8d3591c596d1b9c585dec955b519b">push_back</a>(<a class="code" href="classCVC3_1_1TheoryDatatypeLazy.html#abe2ec47fb8b06ceab03d5cf6afbbe6e1aa194ff21850e4ccb9f0e61ba3c5b7bfb">ENQUEUE</a>);
<a name="l00257"></a>00257   }
<a name="l00258"></a>00258   <span class="keywordflow">if</span> (<a class="code" href="namespaceCVC3.html#afdcf0b93fc0d1b03a5a14c4988443c7a">isSelector</a>(e)) {
<a name="l00259"></a>00259     e[0].<a class="code" href="group__ExprPkg.html#ga50ebe7a6fa50064b2d01e0eaa25f931a" title="Set the Selected flag for this Expr.">setSelected</a>();
<a name="l00260"></a>00260     <a class="code" href="classCVC3_1_1TheoryDatatypeLazy.html#a75042011bc9636d788c84d92c94250e7">d_processQueue</a>.<a class="code" href="classCVC3_1_1CDList.html#aa1e8d3591c596d1b9c585dec955b519b">push_back</a>(<a class="code" href="classCVC3_1_1Theory.html#af860f5d5e01423628c97c399606916ff" title="==&gt; a == a">reflexivityRule</a>(e[0]));
<a name="l00261"></a>00261     <a class="code" href="classCVC3_1_1TheoryDatatypeLazy.html#a1f2bd4ae44724fea619151260c7c0250">d_processQueueKind</a>.<a class="code" href="classCVC3_1_1CDList.html#aa1e8d3591c596d1b9c585dec955b519b">push_back</a>(<a class="code" href="classCVC3_1_1TheoryDatatypeLazy.html#abe2ec47fb8b06ceab03d5cf6afbbe6e1a557a22ca32f3635486a5e2a1840656d7">MERGE2</a>);
<a name="l00262"></a>00262   }
<a name="l00263"></a>00263   <a class="code" href="classCVC3_1_1Theory.html#a29cc343040a52a299a4f20123edf4c75" title="Setup a term for congruence closure (must have sig and rep attributes)">setupCC</a>(e);
<a name="l00264"></a>00264 }
<a name="l00265"></a>00265 
<a name="l00266"></a>00266 
<a name="l00267"></a><a class="code" href="classCVC3_1_1TheoryDatatypeLazy.html#a1f5719671fd527eb010fbb2a2f14e79d">00267</a> <span class="keywordtype">void</span> <a class="code" href="classCVC3_1_1TheoryDatatypeLazy.html#a1f5719671fd527eb010fbb2a2f14e79d" title="Notify a theory of a new equality.">TheoryDatatypeLazy::update</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a>&amp; e, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; d)
<a name="l00268"></a>00268 {
<a name="l00269"></a>00269   <span class="keywordflow">if</span> (d.<a class="code" href="group__ExprPkg.html#ga0265d1ca42fa59c95aaff3ca675b6504">isNull</a>()) {
<a name="l00270"></a>00270     <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; lhs = e.<a class="code" href="classCVC3_1_1Theorem.html#a206c04f39fbbcacef2337148675553f4">getLHS</a>();
<a name="l00271"></a>00271     <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; rhs = e.<a class="code" href="classCVC3_1_1Theorem.html#a97d957fcbf9094480851b1d2e5d3729f">getRHS</a>();
<a name="l00272"></a>00272     <span class="keywordflow">if</span> (<a class="code" href="namespaceCVC3.html#a91840d293c43120244ce5b5165bdacc4">isConstructor</a>(lhs) &amp;&amp; <a class="code" href="namespaceCVC3.html#a91840d293c43120244ce5b5165bdacc4">isConstructor</a>(rhs) &amp;&amp;
<a name="l00273"></a>00273         lhs.<a class="code" href="group__ExprPkg.html#ga1d6a6b4a9ce81b0dd8fd74870ff4284b">isApply</a>() &amp;&amp; rhs.<a class="code" href="group__ExprPkg.html#ga1d6a6b4a9ce81b0dd8fd74870ff4284b">isApply</a>() &amp;&amp;
<a name="l00274"></a>00274         lhs.<a class="code" href="group__ExprPkg.html#ga9f3328fe077191803a780cfd6566ff9b" title="Get expression of operator (for APPLY Exprs only)">getOpExpr</a>() == rhs.<a class="code" href="group__ExprPkg.html#ga9f3328fe077191803a780cfd6566ff9b" title="Get expression of operator (for APPLY Exprs only)">getOpExpr</a>()) {
<a name="l00275"></a>00275       <a class="code" href="classCVC3_1_1TheoryDatatypeLazy.html#a75042011bc9636d788c84d92c94250e7">d_processQueue</a>.<a class="code" href="classCVC3_1_1CDList.html#aa1e8d3591c596d1b9c585dec955b519b">push_back</a>(<a class="code" href="classCVC3_1_1TheoryDatatype.html#abcd88b0572b5751bddccd9210939f5d0">d_rules</a>-&gt;<a class="code" href="classCVC3_1_1DatatypeProofRules.html#a0ae4bc02188f1115e9ba2a44185b1d16">decompose</a>(e));
<a name="l00276"></a>00276       <a class="code" href="classCVC3_1_1TheoryDatatypeLazy.html#a1f2bd4ae44724fea619151260c7c0250">d_processQueueKind</a>.<a class="code" href="classCVC3_1_1CDList.html#aa1e8d3591c596d1b9c585dec955b519b">push_back</a>(<a class="code" href="classCVC3_1_1TheoryDatatypeLazy.html#abe2ec47fb8b06ceab03d5cf6afbbe6e1aa194ff21850e4ccb9f0e61ba3c5b7bfb">ENQUEUE</a>);
<a name="l00277"></a>00277     }
<a name="l00278"></a>00278     <span class="keywordflow">else</span> {
<a name="l00279"></a>00279       <a class="code" href="classCVC3_1_1TheoryDatatypeLazy.html#a75042011bc9636d788c84d92c94250e7">d_processQueue</a>.<a class="code" href="classCVC3_1_1CDList.html#aa1e8d3591c596d1b9c585dec955b519b">push_back</a>(e);
<a name="l00280"></a>00280       <a class="code" href="classCVC3_1_1TheoryDatatypeLazy.html#a1f2bd4ae44724fea619151260c7c0250">d_processQueueKind</a>.<a class="code" href="classCVC3_1_1CDList.html#aa1e8d3591c596d1b9c585dec955b519b">push_back</a>(<a class="code" href="classCVC3_1_1TheoryDatatypeLazy.html#abe2ec47fb8b06ceab03d5cf6afbbe6e1a557a22ca32f3635486a5e2a1840656d7">MERGE2</a>);
<a name="l00281"></a>00281     }
<a name="l00282"></a>00282   }
<a name="l00283"></a>00283   <span class="keywordflow">else</span> {
<a name="l00284"></a>00284     <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a>&amp; dEQdsig = d.<a class="code" href="group__ExprPkg.html#gae281b04465cc1bf24b5797c8b5e9cbb4">getSig</a>();
<a name="l00285"></a>00285     <span class="keywordflow">if</span> (!dEQdsig.<a class="code" href="classCVC3_1_1Theorem.html#afc6fdb0507eb3669e28d9be5ed0bd333">isNull</a>()) {
<a name="l00286"></a>00286       <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; dsig = dEQdsig.<a class="code" href="classCVC3_1_1Theorem.html#a97d957fcbf9094480851b1d2e5d3729f">getRHS</a>();
<a name="l00287"></a>00287       <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> thm = <a class="code" href="classCVC3_1_1Theory.html#ad6cb45844df7f1b08a53e41e40a362e3" title="Update the children of the term e.">updateHelper</a>(d);
<a name="l00288"></a>00288       <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; sigNew = thm.<a class="code" href="classCVC3_1_1Theorem.html#a97d957fcbf9094480851b1d2e5d3729f">getRHS</a>();
<a name="l00289"></a>00289       <span class="keywordflow">if</span> (sigNew == dsig) <span class="keywordflow">return</span>;
<a name="l00290"></a>00290       dsig.<a class="code" href="group__ExprPkg.html#ga7b85677789c5a03e1a5dc2c93f0b6288">setRep</a>(<a class="code" href="classCVC3_1_1Theorem.html">Theorem</a>());
<a name="l00291"></a>00291       <span class="keywordflow">if</span> (<a class="code" href="namespaceCVC3.html#afdcf0b93fc0d1b03a5a14c4988443c7a">isSelector</a>(sigNew) &amp;&amp; <a class="code" href="classCVC3_1_1TheoryDatatype.html#a513d221b48500cf4bc91393293d9b2f2">canCollapse</a>(sigNew)) {
<a name="l00292"></a>00292         d.<a class="code" href="group__ExprPkg.html#gaaaba7ddaccd58bd37e3259fe9b949645">setSig</a>(<a class="code" href="classCVC3_1_1Theorem.html">Theorem</a>());
<a name="l00293"></a>00293         <a class="code" href="classCVC3_1_1TheoryDatatypeLazy.html#a75042011bc9636d788c84d92c94250e7">d_processQueue</a>.<a class="code" href="classCVC3_1_1CDList.html#aa1e8d3591c596d1b9c585dec955b519b">push_back</a>(<a class="code" href="classCVC3_1_1Theory.html#a76f6507116e36f46dab074781fb9bf2d" title="(a1 == a2) &amp; (a2 == a3) ==&gt; (a1 == a3)">transitivityRule</a>(thm, <a class="code" href="classCVC3_1_1TheoryDatatype.html#abcd88b0572b5751bddccd9210939f5d0">d_rules</a>-&gt;<a class="code" href="classCVC3_1_1DatatypeProofRules.html#a8ecc9e0e858ab2da52632df61ee8a44e">rewriteSelCons</a>(<a class="code" href="classCVC3_1_1TheoryDatatype.html#a64a98802daa8a6a7c4f683b60740961f">d_facts</a>, sigNew)));
<a name="l00294"></a>00294         <a class="code" href="classCVC3_1_1TheoryDatatypeLazy.html#a1f2bd4ae44724fea619151260c7c0250">d_processQueueKind</a>.<a class="code" href="classCVC3_1_1CDList.html#aa1e8d3591c596d1b9c585dec955b519b">push_back</a>(<a class="code" href="classCVC3_1_1TheoryDatatypeLazy.html#abe2ec47fb8b06ceab03d5cf6afbbe6e1aa194ff21850e4ccb9f0e61ba3c5b7bfb">ENQUEUE</a>);
<a name="l00295"></a>00295       }
<a name="l00296"></a>00296       <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="namespaceCVC3.html#a8297278831bf83882f7c6a1e3c84fa98">isTester</a>(sigNew) &amp;&amp; <a class="code" href="namespaceCVC3.html#a91840d293c43120244ce5b5165bdacc4">isConstructor</a>(sigNew[0])) {
<a name="l00297"></a>00297         d.<a class="code" href="group__ExprPkg.html#gaaaba7ddaccd58bd37e3259fe9b949645">setSig</a>(<a class="code" href="classCVC3_1_1Theorem.html">Theorem</a>());
<a name="l00298"></a>00298         <a class="code" href="classCVC3_1_1TheoryDatatypeLazy.html#a75042011bc9636d788c84d92c94250e7">d_processQueue</a>.<a class="code" href="classCVC3_1_1CDList.html#aa1e8d3591c596d1b9c585dec955b519b">push_back</a>(<a class="code" href="classCVC3_1_1Theory.html#a76f6507116e36f46dab074781fb9bf2d" title="(a1 == a2) &amp; (a2 == a3) ==&gt; (a1 == a3)">transitivityRule</a>(thm, <a class="code" href="classCVC3_1_1TheoryDatatype.html#abcd88b0572b5751bddccd9210939f5d0">d_rules</a>-&gt;<a class="code" href="classCVC3_1_1DatatypeProofRules.html#ad6df2a8a8c661ed1a1be34ce66910a36">rewriteTestCons</a>(sigNew)));
<a name="l00299"></a>00299         <a class="code" href="classCVC3_1_1TheoryDatatypeLazy.html#a1f2bd4ae44724fea619151260c7c0250">d_processQueueKind</a>.<a class="code" href="classCVC3_1_1CDList.html#aa1e8d3591c596d1b9c585dec955b519b">push_back</a>(<a class="code" href="classCVC3_1_1TheoryDatatypeLazy.html#abe2ec47fb8b06ceab03d5cf6afbbe6e1aa194ff21850e4ccb9f0e61ba3c5b7bfb">ENQUEUE</a>);
<a name="l00300"></a>00300       }
<a name="l00301"></a>00301       <span class="keywordflow">else</span> {
<a name="l00302"></a>00302         <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a>&amp; repEQsigNew = sigNew.<a class="code" href="group__ExprPkg.html#gaa4b5652980861e593ab8a741b5521779">getRep</a>();
<a name="l00303"></a>00303         <span class="keywordflow">if</span> (!repEQsigNew.<a class="code" href="classCVC3_1_1Theorem.html#afc6fdb0507eb3669e28d9be5ed0bd333">isNull</a>()) {
<a name="l00304"></a>00304           d.<a class="code" href="group__ExprPkg.html#gaaaba7ddaccd58bd37e3259fe9b949645">setSig</a>(<a class="code" href="classCVC3_1_1Theorem.html">Theorem</a>());
<a name="l00305"></a>00305           <a class="code" href="classCVC3_1_1TheoryDatatypeLazy.html#a75042011bc9636d788c84d92c94250e7">d_processQueue</a>.<a class="code" href="classCVC3_1_1CDList.html#aa1e8d3591c596d1b9c585dec955b519b">push_back</a>(<a class="code" href="classCVC3_1_1Theory.html#a76f6507116e36f46dab074781fb9bf2d" title="(a1 == a2) &amp; (a2 == a3) ==&gt; (a1 == a3)">transitivityRule</a>(repEQsigNew, <a class="code" href="classCVC3_1_1Theory.html#a7440711981ac1bba2bed7476c0fa4e0b" title="a1 == a2 ==&gt; a2 == a1">symmetryRule</a>(thm)));
<a name="l00306"></a>00306           <a class="code" href="classCVC3_1_1TheoryDatatypeLazy.html#a1f2bd4ae44724fea619151260c7c0250">d_processQueueKind</a>.<a class="code" href="classCVC3_1_1CDList.html#aa1e8d3591c596d1b9c585dec955b519b">push_back</a>(<a class="code" href="classCVC3_1_1TheoryDatatypeLazy.html#abe2ec47fb8b06ceab03d5cf6afbbe6e1aa194ff21850e4ccb9f0e61ba3c5b7bfb">ENQUEUE</a>);
<a name="l00307"></a>00307         }
<a name="l00308"></a>00308         <span class="keywordflow">else</span> {
<a name="l00309"></a>00309           <span class="keywordtype">int</span> k, ar(d.<a class="code" href="group__ExprPkg.html#ga28b901d05e52a5c646f83a95cc74f94b">arity</a>());
<a name="l00310"></a>00310           <span class="keywordflow">for</span> (k = 0; k &lt; ar; ++k) {
<a name="l00311"></a>00311             <span class="keywordflow">if</span> (sigNew[k] != dsig[k]) {
<a name="l00312"></a>00312               sigNew[k].<a class="code" href="group__ExprPkg.html#ga159d60cb0f32e09df89a395b2680664a" title="Add (e,i) to the notify list of this expression.">addToNotify</a>(<span class="keyword">this</span>, d);
<a name="l00313"></a>00313             }
<a name="l00314"></a>00314           }
<a name="l00315"></a>00315           d.<a class="code" href="group__ExprPkg.html#gaaaba7ddaccd58bd37e3259fe9b949645">setSig</a>(thm);
<a name="l00316"></a>00316           sigNew.<a class="code" href="group__ExprPkg.html#ga7b85677789c5a03e1a5dc2c93f0b6288">setRep</a>(thm);
<a name="l00317"></a>00317           <a class="code" href="classCVC3_1_1Theory.html#abc2e30308c9e1f3cf752cfe8d939df1e" title="Access to ExprManager.">getEM</a>()-&gt;<a class="code" href="group__EM__Priv.html#gaba358e1731ad9309e52e64eb9ce60755" title="Invalidate the simplifier&#39;s cache tag.">invalidateSimpCache</a>();
<a name="l00318"></a>00318         }
<a name="l00319"></a>00319       }
<a name="l00320"></a>00320     }
<a name="l00321"></a>00321   }
<a name="l00322"></a>00322 }
</pre></div></div>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Wed Sep 7 2011 for CVC3 by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>