Sophie

Sophie

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

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: vcl.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">vcl.cpp</div>  </div>
</div>
<div class="contents">
<a href="vcl_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 vcl.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: Tue Dec 31 18:27:11 2002</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"> * License to use, copy, modify, sell and/or distribute this software</span>
<a name="l00011"></a>00011 <span class="comment"> * and its documentation for any purpose is hereby granted without</span>
<a name="l00012"></a>00012 <span class="comment"> * royalty, subject to the terms and conditions defined in the \ref</span>
<a name="l00013"></a>00013 <span class="comment"> * LICENSE file provided with this distribution.</span>
<a name="l00014"></a>00014 <span class="comment"> *</span>
<a name="l00015"></a>00015 <span class="comment"> * &lt;hr&gt;</span>
<a name="l00016"></a>00016 <span class="comment"> *</span>
<a name="l00017"></a>00017 <span class="comment"> */</span>
<a name="l00018"></a>00018 <span class="comment">/*****************************************************************************/</span>
<a name="l00019"></a>00019 
<a name="l00020"></a>00020 
<a name="l00021"></a>00021 <span class="preprocessor">#include &lt;fstream&gt;</span>
<a name="l00022"></a>00022 <span class="preprocessor">#include &quot;<a class="code" href="os_8h.html" title="Abstraction over different operating systems.">os.h</a>&quot;</span>
<a name="l00023"></a>00023 <span class="preprocessor">#include &quot;<a class="code" href="vcl_8h.html" title="Main implementation of ValidityChecker for CVC3.">vcl.h</a>&quot;</span>
<a name="l00024"></a>00024 <span class="preprocessor">#include &quot;<a class="code" href="parser_8h.html">parser.h</a>&quot;</span>
<a name="l00025"></a>00025 <span class="preprocessor">#include &quot;<a class="code" href="vc__cmd_8h.html">vc_cmd.h</a>&quot;</span>
<a name="l00026"></a>00026 <span class="preprocessor">#include &quot;<a class="code" href="search__simple_8h.html">search_simple.h</a>&quot;</span>
<a name="l00027"></a>00027 <span class="preprocessor">#include &quot;<a class="code" href="search__fast_8h.html">search_fast.h</a>&quot;</span>
<a name="l00028"></a>00028 <span class="preprocessor">#include &quot;<a class="code" href="search__sat_8h.html" title="Search engine that uses an external SAT engine.">search_sat.h</a>&quot;</span>
<a name="l00029"></a>00029 <span class="preprocessor">#include &quot;<a class="code" href="theory__core_8h.html">theory_core.h</a>&quot;</span>
<a name="l00030"></a>00030 <span class="preprocessor">#include &quot;<a class="code" href="theory__uf_8h.html">theory_uf.h</a>&quot;</span>
<a name="l00031"></a>00031 <span class="preprocessor">#include &quot;<a class="code" href="theory__arith__old_8h.html">theory_arith_old.h</a>&quot;</span>
<a name="l00032"></a>00032 <span class="preprocessor">#include &quot;<a class="code" href="theory__arith__new_8h.html">theory_arith_new.h</a>&quot;</span>
<a name="l00033"></a>00033 <span class="preprocessor">#include &quot;<a class="code" href="theory__arith3_8h.html">theory_arith3.h</a>&quot;</span>
<a name="l00034"></a>00034 <span class="preprocessor">#include &quot;<a class="code" href="theory__bitvector_8h.html">theory_bitvector.h</a>&quot;</span>
<a name="l00035"></a>00035 <span class="preprocessor">#include &quot;<a class="code" href="theory__array_8h.html">theory_array.h</a>&quot;</span>
<a name="l00036"></a>00036 <span class="preprocessor">#include &quot;<a class="code" href="theory__quant_8h.html">theory_quant.h</a>&quot;</span>
<a name="l00037"></a>00037 <span class="preprocessor">#include &quot;<a class="code" href="theory__records_8h.html">theory_records.h</a>&quot;</span>
<a name="l00038"></a>00038 <span class="preprocessor">#include &quot;<a class="code" href="theory__simulate_8h.html" title="Implementation of a symbolic simulator.">theory_simulate.h</a>&quot;</span>
<a name="l00039"></a>00039 <span class="preprocessor">#include &quot;<a class="code" href="theory__datatype_8h.html">theory_datatype.h</a>&quot;</span>
<a name="l00040"></a>00040 <span class="preprocessor">#include &quot;<a class="code" href="theory__datatype__lazy_8h.html">theory_datatype_lazy.h</a>&quot;</span>
<a name="l00041"></a>00041 <span class="preprocessor">#include &quot;<a class="code" href="translator_8h.html" title="An exception to be thrown by the smtlib translator.">translator.h</a>&quot;</span>
<a name="l00042"></a>00042 <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="l00043"></a>00043 <span class="preprocessor">#include &quot;<a class="code" href="eval__exception_8h.html">eval_exception.h</a>&quot;</span>
<a name="l00044"></a>00044 <span class="preprocessor">#include &quot;<a class="code" href="expr__transform_8h.html" title="Generally Useful Expression Transformations.">expr_transform.h</a>&quot;</span>
<a name="l00045"></a>00045 <span class="preprocessor">#include &quot;<a class="code" href="theorem__manager_8h.html">theorem_manager.h</a>&quot;</span>
<a name="l00046"></a>00046 <span class="preprocessor">#include &quot;<a class="code" href="assumptions_8h.html">assumptions.h</a>&quot;</span>
<a name="l00047"></a>00047 <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="l00048"></a>00048 
<a name="l00049"></a>00049 
<a name="l00050"></a>00050 <span class="keyword">using namespace </span>std;
<a name="l00051"></a>00051 <span class="keyword">using namespace </span>CVC3;
<a name="l00052"></a>00052 
<a name="l00053"></a>00053 <span class="comment">//namespace CVC3{</span>
<a name="l00054"></a>00054 <span class="comment">//  VCL* myvcl;</span>
<a name="l00055"></a>00055 <span class="comment">//}</span>
<a name="l00056"></a>00056 <span class="comment"></span>
<a name="l00057"></a>00057 <span class="comment">///////////////////////////////////////////////////////////////////////////////</span>
<a name="l00058"></a>00058 <span class="comment"></span><span class="comment">// Static ValidityChecker methods</span><span class="comment"></span>
<a name="l00059"></a>00059 <span class="comment">///////////////////////////////////////////////////////////////////////////////</span>
<a name="l00060"></a>00060 <span class="comment"></span>
<a name="l00061"></a>00061 
<a name="l00062"></a>00062 
<a name="l00063"></a><a class="code" href="classCVC3_1_1ValidityChecker.html#a7f8784feff00600cda0508c4050a8976">00063</a> <a class="code" href="classCVC3_1_1ValidityChecker.html" title="Generic API for a validity checker.">ValidityChecker</a>* ValidityChecker::create(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1CLFlags.html">CLFlags</a>&amp; flags)
<a name="l00064"></a>00064 {
<a name="l00065"></a>00065   <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="classCVC3_1_1VCL.html">VCL</a>(flags);
<a name="l00066"></a>00066 }
<a name="l00067"></a>00067 
<a name="l00068"></a>00068 
<a name="l00069"></a><a class="code" href="classCVC3_1_1ValidityChecker.html#ab2cf736ffff14ff2254c407be3f49334">00069</a> <a class="code" href="classCVC3_1_1CLFlags.html">CLFlags</a> ValidityChecker::createFlags() {
<a name="l00070"></a>00070   <a class="code" href="classCVC3_1_1CLFlags.html">CLFlags</a> flags;
<a name="l00071"></a>00071   <span class="comment">// We expect the user to type cvc3 -h to get help, which will set</span>
<a name="l00072"></a>00072   <span class="comment">// the &quot;help&quot; flag to false; that&#39;s why it&#39;s initially true.</span>
<a name="l00073"></a>00073 
<a name="l00074"></a>00074   <span class="comment">// Overall system control flags</span>
<a name="l00075"></a>00075   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;timeout&quot;</span>, <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(0, <span class="stringliteral">&quot;Kill cvc3 process after given number of seconds (0==no limit)&quot;</span>));
<a name="l00076"></a>00076   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;stimeout&quot;</span>, <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(0, <span class="stringliteral">&quot;Set time resource limit in tenths of seconds for a query(0==no limit)&quot;</span>));
<a name="l00077"></a>00077   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;resource&quot;</span>, <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(0, <span class="stringliteral">&quot;Set finite resource limit (0==no limit)&quot;</span>));
<a name="l00078"></a>00078   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;mm&quot;</span>, <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<span class="stringliteral">&quot;chunks&quot;</span>, <span class="stringliteral">&quot;Memory manager (chunks, malloc)&quot;</span>));
<a name="l00079"></a>00079 
<a name="l00080"></a>00080   <span class="comment">// Information printing flags</span>
<a name="l00081"></a>00081   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;help&quot;</span>,<a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<span class="keyword">true</span>, <span class="stringliteral">&quot;print usage information and exit&quot;</span>));
<a name="l00082"></a>00082   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;unsupported&quot;</span>,<a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<span class="keyword">true</span>, <span class="stringliteral">&quot;print usage for old/unsupported/experimental options&quot;</span>));
<a name="l00083"></a>00083   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;version&quot;</span>,<a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<span class="keyword">true</span>, <span class="stringliteral">&quot;print version information and exit&quot;</span>));
<a name="l00084"></a>00084   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;interactive&quot;</span>, <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<span class="keyword">false</span>, <span class="stringliteral">&quot;Interactive mode&quot;</span>));
<a name="l00085"></a>00085   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;stats&quot;</span>, <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<span class="keyword">false</span>, <span class="stringliteral">&quot;Print run-time statistics&quot;</span>));
<a name="l00086"></a>00086   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;seed&quot;</span>, <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(1, <span class="stringliteral">&quot;Set the seed for random sequence&quot;</span>));
<a name="l00087"></a>00087   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;printResults&quot;</span>, <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<span class="keyword">true</span>, <span class="stringliteral">&quot;Print results of interactive commands.&quot;</span>));
<a name="l00088"></a>00088   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;dump-log&quot;</span>, <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<span class="stringliteral">&quot;&quot;</span>, <span class="stringliteral">&quot;Dump API call log in CVC3 input &quot;</span>
<a name="l00089"></a>00089            <span class="stringliteral">&quot;format to given file &quot;</span>
<a name="l00090"></a>00090            <span class="stringliteral">&quot;(off when file name is \&quot;\&quot;)&quot;</span>));
<a name="l00091"></a>00091   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;parse-only&quot;</span>, <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<span class="keyword">false</span>,<span class="stringliteral">&quot;Parse the input, then exit.&quot;</span>));
<a name="l00092"></a>00092 
<a name="l00093"></a>00093   <span class="comment">//Translation related flags</span>
<a name="l00094"></a>00094   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;expResult&quot;</span>, <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<span class="stringliteral">&quot;&quot;</span>, <span class="stringliteral">&quot;For smtlib translation.  Give the expected result&quot;</span>, <span class="keyword">false</span>));
<a name="l00095"></a>00095   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;category&quot;</span>, <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<span class="stringliteral">&quot;unknown&quot;</span>, <span class="stringliteral">&quot;For smtlib translation.  Give the category&quot;</span>, <span class="keyword">false</span>));
<a name="l00096"></a>00096   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;translate&quot;</span>, <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<span class="keyword">false</span>, <span class="stringliteral">&quot;Produce a complete translation from &quot;</span>
<a name="l00097"></a>00097                                     <span class="stringliteral">&quot;the input language to output language.  &quot;</span>));
<a name="l00098"></a>00098   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;real2int&quot;</span>, <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<span class="keyword">false</span>, <span class="stringliteral">&quot;When translating, convert reals to integers.&quot;</span>, <span class="keyword">false</span>));
<a name="l00099"></a>00099   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;convertArith&quot;</span>, <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<span class="keyword">false</span>, <span class="stringliteral">&quot;When translating, try to rewrite arith terms into smt-lib subset&quot;</span>, <span class="keyword">false</span>));
<a name="l00100"></a>00100   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;convert2diff&quot;</span>, <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<span class="stringliteral">&quot;&quot;</span>, <span class="stringliteral">&quot;When translating, try to force into difference logic.  Legal values are int and real.&quot;</span>, <span class="keyword">false</span>));
<a name="l00101"></a>00101   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;iteLiftArith&quot;</span>, <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<span class="keyword">false</span>, <span class="stringliteral">&quot;For translation.  If true, ite&#39;s are lifted out of arith exprs.&quot;</span>, <span class="keyword">false</span>));
<a name="l00102"></a>00102   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;convertArray&quot;</span>, <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<span class="keyword">false</span>, <span class="stringliteral">&quot;For translation.  If true, arrays are converted to uninterpreted functions if possible.&quot;</span>, <span class="keyword">false</span>));
<a name="l00103"></a>00103   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;combineAssump&quot;</span>, <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<span class="keyword">false</span>, <span class="stringliteral">&quot;For translation.  If true, assumptions are combined into the query.&quot;</span>, <span class="keyword">false</span>));
<a name="l00104"></a>00104   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;convert2array&quot;</span>, <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<span class="keyword">false</span>, <span class="stringliteral">&quot;For translation. If true, try to convert to array-only theory&quot;</span>, <span class="keyword">false</span>));
<a name="l00105"></a>00105   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;convertToBV&quot;</span>,<a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(0, <span class="stringliteral">&quot;For translation.  Set to nonzero to convert ints to bv&#39;s of that length&quot;</span>, <span class="keyword">false</span>));
<a name="l00106"></a>00106   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;convert-eq-iff&quot;</span>,<a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<span class="keyword">false</span>, <span class="stringliteral">&quot;Convert equality on Boolean expressions to iff.&quot;</span>, <span class="keyword">false</span>));
<a name="l00107"></a>00107   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;preSimplify&quot;</span>,<a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<span class="keyword">false</span>, <span class="stringliteral">&quot;Simplify each assertion or query before translating it&quot;</span>, <span class="keyword">false</span>));
<a name="l00108"></a>00108   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;dump-tcc&quot;</span>, <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<span class="keyword">false</span>, <span class="stringliteral">&quot;Compute and dump TCC only&quot;</span>));
<a name="l00109"></a>00109   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;trans-skip-pp&quot;</span>, <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<span class="keyword">false</span>, <span class="stringliteral">&quot;Skip preprocess step in translation module&quot;</span>, <span class="keyword">false</span>));
<a name="l00110"></a>00110   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;trans-skip-difficulty&quot;</span>, <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<span class="keyword">false</span>, <span class="stringliteral">&quot;Leave out difficulty attribute during translation to SMT v2.0&quot;</span>, <span class="keyword">false</span>));
<a name="l00111"></a>00111   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;promote&quot;</span>, <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<span class="keyword">true</span>, <span class="stringliteral">&quot;Promote undefined logic combinations to defined logic combinations during translation to SMT&quot;</span>, <span class="keyword">false</span>));
<a name="l00112"></a>00112 
<a name="l00113"></a>00113   <span class="comment">// Parser related flags</span>
<a name="l00114"></a>00114   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;old-func-syntax&quot;</span>,<a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<span class="keyword">false</span>, <span class="stringliteral">&quot;Enable parsing of old-style function syntax&quot;</span>, <span class="keyword">false</span>));
<a name="l00115"></a>00115 
<a name="l00116"></a>00116   <span class="comment">// Pretty-printing related flags</span>
<a name="l00117"></a>00117   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;dagify-exprs&quot;</span>,
<a name="l00118"></a>00118     <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<span class="keyword">true</span>, <span class="stringliteral">&quot;Print expressions with sharing as DAGs&quot;</span>));
<a name="l00119"></a>00119   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;lang&quot;</span>, <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<span class="stringliteral">&quot;presentation&quot;</span>, <span class="stringliteral">&quot;Input language &quot;</span>
<a name="l00120"></a>00120              <span class="stringliteral">&quot;(presentation, smt, smt2, internal)&quot;</span>));
<a name="l00121"></a>00121   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;output-lang&quot;</span>, <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<span class="stringliteral">&quot;&quot;</span>, <span class="stringliteral">&quot;Output language &quot;</span>
<a name="l00122"></a>00122               <span class="stringliteral">&quot;(presentation, smtlib, simplify, internal, lisp, tptp, spass)&quot;</span>));
<a name="l00123"></a>00123   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;indent&quot;</span>, <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<span class="keyword">false</span>, <span class="stringliteral">&quot;Print expressions with indentation&quot;</span>));
<a name="l00124"></a>00124   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;width&quot;</span>, <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(80, <span class="stringliteral">&quot;Suggested line width for printing&quot;</span>));
<a name="l00125"></a>00125   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;print-depth&quot;</span>, <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(-1, <span class="stringliteral">&quot;Max. depth to print expressions &quot;</span>));
<a name="l00126"></a>00126   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;print-assump&quot;</span>, <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<span class="keyword">false</span>, <span class="stringliteral">&quot;Print assumptions in Theorems &quot;</span>));
<a name="l00127"></a>00127 
<a name="l00128"></a>00128   <span class="comment">// Search Engine (SAT) related flags</span>
<a name="l00129"></a>00129   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;sat&quot;</span>,<a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<span class="stringliteral">&quot;minisat&quot;</span>, <span class="stringliteral">&quot;choose a SAT solver to use &quot;</span>
<a name="l00130"></a>00130            <span class="stringliteral">&quot;(sat, minisat)&quot;</span>));
<a name="l00131"></a>00131   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;de&quot;</span>,<a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<span class="stringliteral">&quot;dfs&quot;</span>, <span class="stringliteral">&quot;choose a decision engine to use &quot;</span>
<a name="l00132"></a>00132           <span class="stringliteral">&quot;(dfs, sat)&quot;</span>));
<a name="l00133"></a>00133 
<a name="l00134"></a>00134   <span class="comment">// Proofs and Assumptions</span>
<a name="l00135"></a>00135   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;proofs&quot;</span>, <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<span class="keyword">false</span>, <span class="stringliteral">&quot;Produce proofs&quot;</span>));
<a name="l00136"></a>00136   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;check-proofs&quot;</span>,
<a name="l00137"></a>00137     <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<a class="code" href="debug_8h.html#a600cb2d68efe7cc413cccbb5714c7016">IF_DEBUG</a>(<span class="keyword">true</span> ||) <span class="keyword">false</span>, <span class="stringliteral">&quot;Check proofs on-the-fly&quot;</span>));
<a name="l00138"></a>00138   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;minimizeClauses&quot;</span>, <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<span class="keyword">false</span>, <span class="stringliteral">&quot;Use brute-force minimization of clauses&quot;</span>, <span class="keyword">false</span>));
<a name="l00139"></a>00139   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;dynack&quot;</span>, <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<span class="keyword">false</span>, <span class="stringliteral">&quot;Use dynamic Ackermannization&quot;</span>, <span class="keyword">false</span>));
<a name="l00140"></a>00140   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;smart-clauses&quot;</span>, <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<span class="keyword">true</span>, <span class="stringliteral">&quot;Learn multiple clauses per conflict&quot;</span>));
<a name="l00141"></a>00141 
<a name="l00142"></a>00142 
<a name="l00143"></a>00143   <span class="comment">// Core framework switches</span>
<a name="l00144"></a>00144   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;tcc&quot;</span>, <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<span class="keyword">false</span>, <span class="stringliteral">&quot;Check TCCs for each ASSERT and QUERY&quot;</span>));
<a name="l00145"></a>00145   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;cnf&quot;</span>, <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<span class="keyword">true</span>, <span class="stringliteral">&quot;Convert top-level Boolean formulas to CNF&quot;</span>, <span class="keyword">false</span>));
<a name="l00146"></a>00146   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;ignore-cnf-vars&quot;</span>, <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<span class="keyword">false</span>, <span class="stringliteral">&quot;Do not split on aux. CNF vars (with +cnf)&quot;</span>, <span class="keyword">false</span>));
<a name="l00147"></a>00147   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;orig-formula&quot;</span>, <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<span class="keyword">false</span>, <span class="stringliteral">&quot;Preserve the original formula with +cnf (for splitter heuristics)&quot;</span>, <span class="keyword">false</span>));
<a name="l00148"></a>00148   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;liftITE&quot;</span>, <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<span class="keyword">false</span>, <span class="stringliteral">&quot;Eagerly lift all ITE exprs&quot;</span>));
<a name="l00149"></a>00149   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;iflift&quot;</span>, <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<span class="keyword">false</span>, <span class="stringliteral">&quot;Translate if-then-else terms to CNF (with +cnf)&quot;</span>, <span class="keyword">false</span>));
<a name="l00150"></a>00150   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;circuit&quot;</span>, <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<span class="keyword">false</span>, <span class="stringliteral">&quot;With +cnf, use circuit propagation&quot;</span>, <span class="keyword">false</span>));
<a name="l00151"></a>00151   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;un-ite-ify&quot;</span>, <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<span class="keyword">false</span>, <span class="stringliteral">&quot;Unconvert ITE expressions&quot;</span>, <span class="keyword">false</span>));
<a name="l00152"></a>00152   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;ite-cond-simp&quot;</span>,
<a name="l00153"></a>00153     <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<span class="keyword">false</span>, <span class="stringliteral">&quot;Replace ITE condition by TRUE/FALSE in subexprs&quot;</span>, <span class="keyword">false</span>));
<a name="l00154"></a>00154   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;preprocess&quot;</span>, <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<span class="keyword">true</span>, <span class="stringliteral">&quot;Preprocess queries&quot;</span>));
<a name="l00155"></a>00155   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;pp-pushneg&quot;</span>, <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<span class="keyword">false</span>, <span class="stringliteral">&quot;Push negation in preprocessor&quot;</span>));
<a name="l00156"></a>00156   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;pp-bryant&quot;</span>, <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<span class="keyword">false</span>, <span class="stringliteral">&quot;Enable Bryant algorithm for UF&quot;</span>, <span class="keyword">false</span>));
<a name="l00157"></a>00157   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;pp-budget&quot;</span>, <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(0, <span class="stringliteral">&quot;Budget for new preprocessing step&quot;</span>, <span class="keyword">false</span>));
<a name="l00158"></a>00158   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;pp-care&quot;</span>, <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<span class="keyword">true</span>, <span class="stringliteral">&quot;Enable care-set preprocessing step&quot;</span>, <span class="keyword">false</span>));
<a name="l00159"></a>00159   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;simp-and&quot;</span>, <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<span class="keyword">false</span>, <span class="stringliteral">&quot;Rewrite x&amp;y to x&amp;y[x/true]&quot;</span>, <span class="keyword">false</span>));
<a name="l00160"></a>00160   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;simp-or&quot;</span>, <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<span class="keyword">false</span>, <span class="stringliteral">&quot;Rewrite x|y to x|y[x/false]&quot;</span>, <span class="keyword">false</span>));
<a name="l00161"></a>00161   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;pp-batch&quot;</span>, <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<span class="keyword">false</span>, <span class="stringliteral">&quot;Ignore assumptions until query, then process all at once&quot;</span>));
<a name="l00162"></a>00162   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;no-save-model&quot;</span>, <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<span class="keyword">false</span>, <span class="stringliteral">&quot;Do NOT save model assumptions in context after invalid / sat query&quot;</span>));
<a name="l00163"></a>00163   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;internal::userSetNoSaveModel&quot;</span>, <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<span class="keyword">false</span>, <span class="stringliteral">&quot;set if user gave +no-save-model or -no-save-model explicitly&quot;</span>, <span class="keyword">false</span>));
<a name="l00164"></a>00164 
<a name="l00165"></a>00165   <span class="comment">// Negate the query when translate into tptp</span>
<a name="l00166"></a>00166   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;negate-query&quot;</span>, <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<span class="keyword">true</span>, <span class="stringliteral">&quot;Negate the query when translate into TPTP format&quot;</span>));;
<a name="l00167"></a>00167 
<a name="l00168"></a>00168   <span class="comment">// Concrete model generation (counterexamples) flags</span>
<a name="l00169"></a>00169   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;counterexample&quot;</span>, <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<span class="keyword">false</span>, <span class="stringliteral">&quot;Dump counterexample if formula is invalid or satisfiable&quot;</span>));
<a name="l00170"></a>00170   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;model&quot;</span>, <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<span class="keyword">false</span>, <span class="stringliteral">&quot;Dump model if formula is invalid or satisfiable&quot;</span>));
<a name="l00171"></a>00171   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;unknown-check-model&quot;</span>, <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<span class="keyword">false</span>, <span class="stringliteral">&quot;Try to generate model if formula is unknown&quot;</span>));
<a name="l00172"></a>00172   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;applications&quot;</span>, <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<span class="keyword">true</span>, <span class="stringliteral">&quot;Add relevant function applications and array accesses to the concrete countermodel&quot;</span>));
<a name="l00173"></a>00173   <span class="comment">// Debugging flags (only for the debug build)</span>
<a name="l00174"></a>00174   <span class="comment">// #ifdef _CVC3_DEBUG_MODE</span>
<a name="l00175"></a>00175   vector&lt;pair&lt;string,bool&gt; &gt; sv;
<a name="l00176"></a>00176   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;trace&quot;</span>, <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(sv, <span class="stringliteral">&quot;Tracing.  Multiple flags add up.&quot;</span>));
<a name="l00177"></a>00177   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;dump-trace&quot;</span>, <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<span class="stringliteral">&quot;&quot;</span>, <span class="stringliteral">&quot;Dump debugging trace to &quot;</span>
<a name="l00178"></a>00178            <span class="stringliteral">&quot;given file (off when file name is \&quot;\&quot;)&quot;</span>));
<a name="l00179"></a>00179   <span class="comment">// #endif</span>
<a name="l00180"></a>00180   <span class="comment">// DP-specific flags</span>
<a name="l00181"></a>00181 
<a name="l00182"></a>00182   <span class="comment">// Arithmetic</span>
<a name="l00183"></a>00183   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;arith-new&quot;</span>,<a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<span class="keyword">false</span>, <span class="stringliteral">&quot;Use new arithmetic dp&quot;</span>, <span class="keyword">false</span>));
<a name="l00184"></a>00184   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;arith3&quot;</span>,<a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<span class="keyword">false</span>, <span class="stringliteral">&quot;Use old arithmetic dp that works well with combined theories&quot;</span>, <span class="keyword">false</span>));
<a name="l00185"></a>00185   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;var-order&quot;</span>,
<a name="l00186"></a>00186     <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<span class="keyword">false</span>, <span class="stringliteral">&quot;Use simple variable order in arith&quot;</span>, <span class="keyword">false</span>));
<a name="l00187"></a>00187   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;ineq-delay&quot;</span>, <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(0, <span class="stringliteral">&quot;Accumulate this many inequalities before processing (-1 for don&#39;t process until necessary)&quot;</span>));
<a name="l00188"></a>00188 
<a name="l00189"></a>00189   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;nonlinear-sign-split&quot;</span>, <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<span class="keyword">true</span>, <span class="stringliteral">&quot;Whether to split on the signs of nontrivial nonlinear terms&quot;</span>));
<a name="l00190"></a>00190 
<a name="l00191"></a>00191   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;grayshadow-threshold&quot;</span>, <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(-1, <span class="stringliteral">&quot;Ignore gray shadows bigger than this (makes solver incomplete)&quot;</span>));
<a name="l00192"></a>00192   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;pathlength-threshold&quot;</span>, <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(-1, <span class="stringliteral">&quot;Ignore gray shadows bigger than this (makes solver incomplete)&quot;</span>));
<a name="l00193"></a>00193 
<a name="l00194"></a>00194   <span class="comment">// Arrays</span>
<a name="l00195"></a>00195   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;liftReadIte&quot;</span>, <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<span class="keyword">true</span>, <span class="stringliteral">&quot;Lift read of ite&quot;</span>));
<a name="l00196"></a>00196 
<a name="l00197"></a>00197   <span class="comment">//for LFSC stuff, disable Tseitin CNF conversion, by Yeting</span>
<a name="l00198"></a>00198   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;cnf-formula&quot;</span>, <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<span class="keyword">false</span>, <span class="stringliteral">&quot;The input must be in CNF. This option automatically enables &#39;-de sat&#39; and disable preprocess&quot;</span>));
<a name="l00199"></a>00199 
<a name="l00200"></a>00200   <span class="comment">//for LFSC print out, by Yeting</span>
<a name="l00201"></a>00201   <span class="comment">//flags.addFlag(&quot;lfsc&quot;, CLFlag(false, &quot;the input is already in CNF. This option automatically enables -de sat and disable -preprocess&quot;));</span>
<a name="l00202"></a>00202 
<a name="l00203"></a>00203   <span class="comment">// for LFSC print, allows different modes by Liana</span>
<a name="l00204"></a>00204   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;lfsc-mode&quot;</span>,
<a name="l00205"></a>00205                   <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(0, <span class="stringliteral">&quot;lfsc mode 0: off, 1:normal, 2:cvc3-mimic etc.&quot;</span>));
<a name="l00206"></a>00206 
<a name="l00207"></a>00207 
<a name="l00208"></a>00208   <span class="comment">// Quantifiers</span>
<a name="l00209"></a>00209   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;max-quant-inst&quot;</span>, <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(200, <span class="stringliteral">&quot;The maximum number of&quot;</span>
<a name="l00210"></a>00210               <span class="stringliteral">&quot; naive instantiations&quot;</span>));
<a name="l00211"></a>00211 
<a name="l00212"></a>00212   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;quant-new&quot;</span>,
<a name="l00213"></a>00213      <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<span class="keyword">true</span>, <span class="stringliteral">&quot;If this option is false, only naive instantiation is called&quot;</span>));
<a name="l00214"></a>00214 
<a name="l00215"></a>00215   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;quant-lazy&quot;</span>, <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<span class="keyword">false</span>, <span class="stringliteral">&quot;Instantiate lazily&quot;</span>, <span class="keyword">false</span>));
<a name="l00216"></a>00216 
<a name="l00217"></a>00217   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;quant-sem-match&quot;</span>,
<a name="l00218"></a>00218     <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<span class="keyword">false</span>, <span class="stringliteral">&quot;Attempt to match semantically when instantiating&quot;</span>, <span class="keyword">false</span>));
<a name="l00219"></a>00219 
<a name="l00220"></a>00220 <span class="comment">//   flags.addFlag(&quot;quant-const-match&quot;,</span>
<a name="l00221"></a>00221 <span class="comment">//                 CLFlag(true, &quot;When matching semantically, only match with constants&quot;, false));</span>
<a name="l00222"></a>00222 
<a name="l00223"></a>00223   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;quant-complete-inst&quot;</span>,
<a name="l00224"></a>00224     <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<span class="keyword">false</span>, <span class="stringliteral">&quot;Try complete instantiation heuristic.  +pp-batch will be automatically enabled&quot;</span>));
<a name="l00225"></a>00225 
<a name="l00226"></a>00226   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;quant-max-IL&quot;</span>,
<a name="l00227"></a>00227     <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(100, <span class="stringliteral">&quot;The maximum Instantiation Level allowed&quot;</span>));
<a name="l00228"></a>00228 
<a name="l00229"></a>00229   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;quant-inst-lcache&quot;</span>,
<a name="l00230"></a>00230                 <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<span class="keyword">true</span>, <span class="stringliteral">&quot;Cache instantiations&quot;</span>));
<a name="l00231"></a>00231 
<a name="l00232"></a>00232   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;quant-inst-gcache&quot;</span>,
<a name="l00233"></a>00233                 <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<span class="keyword">false</span>, <span class="stringliteral">&quot;Cache instantiations&quot;</span>, <span class="keyword">false</span>));
<a name="l00234"></a>00234 
<a name="l00235"></a>00235   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;quant-inst-tcache&quot;</span>,
<a name="l00236"></a>00236                 <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<span class="keyword">false</span>, <span class="stringliteral">&quot;Cache instantiations&quot;</span>, <span class="keyword">false</span>));
<a name="l00237"></a>00237 
<a name="l00238"></a>00238 
<a name="l00239"></a>00239   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;quant-inst-true&quot;</span>,
<a name="l00240"></a>00240                 <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<span class="keyword">true</span>, <span class="stringliteral">&quot;Ignore true instantiations&quot;</span>));
<a name="l00241"></a>00241 
<a name="l00242"></a>00242   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;quant-pullvar&quot;</span>,
<a name="l00243"></a>00243                 <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<span class="keyword">false</span>, <span class="stringliteral">&quot;Pull out vars&quot;</span>, <span class="keyword">false</span>));
<a name="l00244"></a>00244 
<a name="l00245"></a>00245   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;quant-score&quot;</span>,
<a name="l00246"></a>00246                 <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<span class="keyword">true</span>, <span class="stringliteral">&quot;Use instantiation level&quot;</span>));
<a name="l00247"></a>00247 
<a name="l00248"></a>00248   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;quant-polarity&quot;</span>,
<a name="l00249"></a>00249                 <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<span class="keyword">false</span>, <span class="stringliteral">&quot;Use polarity &quot;</span>, <span class="keyword">false</span>));
<a name="l00250"></a>00250 
<a name="l00251"></a>00251   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;quant-eqnew&quot;</span>,
<a name="l00252"></a>00252                 <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<span class="keyword">true</span>, <span class="stringliteral">&quot;Use new equality matching&quot;</span>));
<a name="l00253"></a>00253 
<a name="l00254"></a>00254   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;quant-max-score&quot;</span>,
<a name="l00255"></a>00255                 <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(0, <span class="stringliteral">&quot;Maximum initial dynamic score&quot;</span>));
<a name="l00256"></a>00256 
<a name="l00257"></a>00257   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;quant-trans3&quot;</span>,
<a name="l00258"></a>00258                 <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<span class="keyword">true</span>, <span class="stringliteral">&quot;Use trans heuristic&quot;</span>));
<a name="l00259"></a>00259 
<a name="l00260"></a>00260   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;quant-trans2&quot;</span>,
<a name="l00261"></a>00261                 <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<span class="keyword">true</span>, <span class="stringliteral">&quot;Use trans2 heuristic&quot;</span>));
<a name="l00262"></a>00262 
<a name="l00263"></a>00263   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;quant-naive-num&quot;</span>,
<a name="l00264"></a>00264                 <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(1000, <span class="stringliteral">&quot;Maximum number to call naive instantiation&quot;</span>));
<a name="l00265"></a>00265 
<a name="l00266"></a>00266   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;quant-naive-inst&quot;</span>,
<a name="l00267"></a>00267                 <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<span class="keyword">true</span>, <span class="stringliteral">&quot;Use naive instantiation&quot;</span>));
<a name="l00268"></a>00268 
<a name="l00269"></a>00269   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;quant-man-trig&quot;</span>,
<a name="l00270"></a>00270                 <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<span class="keyword">true</span>, <span class="stringliteral">&quot;Use manual triggers&quot;</span>));
<a name="l00271"></a>00271 
<a name="l00272"></a>00272   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;quant-gfact&quot;</span>,
<a name="l00273"></a>00273                 <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<span class="keyword">false</span>, <span class="stringliteral">&quot;Send facts to core directly&quot;</span>, <span class="keyword">false</span>));
<a name="l00274"></a>00274 
<a name="l00275"></a>00275   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;quant-glimit&quot;</span>,
<a name="l00276"></a>00276                 <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(1000, <span class="stringliteral">&quot;Limit for gfacts&quot;</span>, <span class="keyword">false</span>));
<a name="l00277"></a>00277 
<a name="l00278"></a>00278   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;print-var-type&quot;</span>, <span class="comment">//by yeting, as requested by Sascha Boehme for proofs</span>
<a name="l00279"></a>00279                 <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<span class="keyword">false</span>, <span class="stringliteral">&quot;Print types for bound variables&quot;</span>));
<a name="l00280"></a>00280 
<a name="l00281"></a>00281   <span class="comment">//Bitvectors</span>
<a name="l00282"></a>00282   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;bv32-flag&quot;</span>,
<a name="l00283"></a>00283     <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<span class="keyword">false</span>, <span class="stringliteral">&quot;assume that all bitvectors are 32bits with no overflow&quot;</span>, <span class="keyword">false</span>));
<a name="l00284"></a>00284 
<a name="l00285"></a>00285   <span class="comment">// Uninterpreted Functions</span>
<a name="l00286"></a>00286   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;trans-closure&quot;</span>,
<a name="l00287"></a>00287     <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<span class="keyword">false</span>,<span class="stringliteral">&quot;enables transitive closure of binary relations&quot;</span>, <span class="keyword">false</span>));
<a name="l00288"></a>00288 
<a name="l00289"></a>00289   <span class="comment">// Datatypes</span>
<a name="l00290"></a>00290   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;dt-smartsplits&quot;</span>,
<a name="l00291"></a>00291                 <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<span class="keyword">true</span>, <span class="stringliteral">&quot;enables smart splitting in datatype theory&quot;</span>, <span class="keyword">false</span>));
<a name="l00292"></a>00292   flags.<a class="code" href="classCVC3_1_1CLFlags.html#a49982557d73f53b6dfb117846dde6656">addFlag</a>(<span class="stringliteral">&quot;dt-lazy&quot;</span>,
<a name="l00293"></a>00293                 <a class="code" href="classCVC3_1_1CLFlag.html">CLFlag</a>(<span class="keyword">false</span>, <span class="stringliteral">&quot;lazy splitting on datatypes&quot;</span>, <span class="keyword">false</span>));
<a name="l00294"></a>00294 
<a name="l00295"></a>00295 
<a name="l00296"></a>00296   <span class="keywordflow">return</span> flags;
<a name="l00297"></a>00297 }
<a name="l00298"></a>00298 
<a name="l00299"></a>00299 
<a name="l00300"></a><a class="code" href="classCVC3_1_1ValidityChecker.html#ae2876962373b8e7cefd5909160e4729d">00300</a> <a class="code" href="classCVC3_1_1ValidityChecker.html" title="Generic API for a validity checker.">ValidityChecker</a>* ValidityChecker::create()
<a name="l00301"></a>00301 {
<a name="l00302"></a>00302   <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="classCVC3_1_1VCL.html">VCL</a>(createFlags());
<a name="l00303"></a>00303 }
<a name="l00304"></a>00304 
<a name="l00305"></a>00305 <span class="comment"></span>
<a name="l00306"></a>00306 <span class="comment">///////////////////////////////////////////////////////////////////////////////</span>
<a name="l00307"></a>00307 <span class="comment"></span><span class="comment">// VCL private methods</span><span class="comment"></span>
<a name="l00308"></a>00308 <span class="comment">///////////////////////////////////////////////////////////////////////////////</span>
<a name="l00309"></a>00309 <span class="comment"></span>
<a name="l00310"></a>00310 
<a name="l00311"></a><a class="code" href="classCVC3_1_1VCL.html#abbb03bdcc2bbe1354740884e56de90cc">00311</a> <a class="code" href="classCVC3_1_1Theorem3.html" title="Theorem3.">Theorem3</a> VCL::deriveClosure(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Theorem3.html" title="Theorem3.">Theorem3</a>&amp; thm) {
<a name="l00312"></a>00312   vector&lt;Expr&gt; assump;
<a name="l00313"></a>00313   set&lt;UserAssertion&gt; assumpSet;
<a name="l00314"></a>00314   <span class="comment">// Compute the vector of assumptions for thm, and iteratively move</span>
<a name="l00315"></a>00315   <span class="comment">// the assumptions to the RHS until done.  Each closure step may</span>
<a name="l00316"></a>00316   <span class="comment">// introduce new assumptions from the proofs of TCCs, so those need</span>
<a name="l00317"></a>00317   <span class="comment">// to be dealt with in the same way, until no assumptions remain.</span>
<a name="l00318"></a>00318   <a class="code" href="classCVC3_1_1Theorem3.html" title="Theorem3.">Theorem3</a> res = thm;
<a name="l00319"></a>00319   vector&lt;Theorem&gt; tccs;
<a name="l00320"></a>00320   <span class="keywordflow">while</span>(<span class="keyword">true</span>) {
<a name="l00321"></a>00321     {
<a name="l00322"></a>00322       <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Assumptions.html">Assumptions</a>&amp; a(res.<a class="code" href="classCVC3_1_1Theorem3.html#a3bf0a31a2adaabfd7a37d61e990fa9ea">getAssumptionsRef</a>());
<a name="l00323"></a>00323       <span class="keywordflow">if</span> (a.empty()) <span class="keywordflow">break</span>;
<a name="l00324"></a>00324       assump.<a class="code" href="classCVC3_1_1Assumptions.html#ab34a834ee653d1b34f042a6202c05b13">clear</a>();
<a name="l00325"></a>00325       assumpSet.clear();
<a name="l00326"></a>00326       <a class="code" href="classCVC3_1_1Assumptions_1_1iterator.html" title="Iterator for the Assumptions: points to class Theorem.">Assumptions::iterator</a> i=a.begin(), iend=a.end();
<a name="l00327"></a>00327       <span class="keywordflow">if</span>(i!=iend) i-&gt;clearAllFlags();
<a name="l00328"></a>00328       <span class="comment">// Collect the assumptions of &#39;res&#39; *without* TCCs</span>
<a name="l00329"></a>00329       <span class="keywordflow">for</span>(; i!=iend; ++i)
<a name="l00330"></a>00330         getAssumptionsRec(*i, assumpSet, <span class="keyword">false</span>);
<a name="l00331"></a>00331 
<a name="l00332"></a>00332       <span class="comment">// Build the vectors of assumptions and TCCs</span>
<a name="l00333"></a>00333       <span class="keywordflow">if</span>(getFlags()[<span class="stringliteral">&quot;tcc&quot;</span>].getBool()) {
<a name="l00334"></a>00334         tccs.clear();
<a name="l00335"></a>00335         <span class="keywordflow">for</span>(set&lt;UserAssertion&gt;::iterator i=assumpSet.begin(),
<a name="l00336"></a>00336               iend=assumpSet.end(); i!=iend; ++i) {
<a name="l00337"></a>00337           assump.push_back(i-&gt;thm().getExpr());
<a name="l00338"></a>00338           tccs.push_back(i-&gt;tcc());
<a name="l00339"></a>00339         }
<a name="l00340"></a>00340       }
<a name="l00341"></a>00341     }
<a name="l00342"></a>00342     <span class="comment">// Derive the closure</span>
<a name="l00343"></a>00343     res = d_se-&gt;getCommonRules()-&gt;implIntro3(res, assump, tccs);
<a name="l00344"></a>00344   }
<a name="l00345"></a>00345   <span class="keywordflow">return</span> res;
<a name="l00346"></a>00346 }
<a name="l00347"></a>00347 
<a name="l00348"></a>00348 <span class="comment"></span>
<a name="l00349"></a>00349 <span class="comment">//! Recursive assumption graph traversal to find user assumptions</span>
<a name="l00350"></a>00350 <span class="comment"></span><span class="comment">/*!</span>
<a name="l00351"></a>00351 <span class="comment"> *  If an assumption has a TCC, traverse the proof of TCC and add its</span>
<a name="l00352"></a>00352 <span class="comment"> *  assumptions to the set recursively.</span>
<a name="l00353"></a>00353 <span class="comment"> */</span>
<a name="l00354"></a><a class="code" href="classCVC3_1_1VCL.html#a09efdca949d7b5d2192e74c33604a340">00354</a> <span class="keywordtype">void</span> VCL::getAssumptionsRec(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a>&amp; thm,
<a name="l00355"></a>00355           set&lt;UserAssertion&gt;&amp; assumptions,
<a name="l00356"></a>00356           <span class="keywordtype">bool</span> addTCCs) {
<a name="l00357"></a>00357   <span class="keywordflow">if</span>(thm.<a class="code" href="classCVC3_1_1Theorem.html#afc6fdb0507eb3669e28d9be5ed0bd333">isNull</a>() || thm.<a class="code" href="classCVC3_1_1Theorem.html#a16f074e60b9e076187efb478889d2c47">isRefl</a>() || thm.<a class="code" href="classCVC3_1_1Theorem.html#a1695c9afc9a5c1f8cd000d40b9e2a9cd" title="Check if the flag attribute is set.">isFlagged</a>()) <span class="keywordflow">return</span>;
<a name="l00358"></a>00358   thm.<a class="code" href="classCVC3_1_1Theorem.html#af83d6b4d71bfb558296a1c296a69c3d7" title="Set the flag attribute.">setFlag</a>();
<a name="l00359"></a>00359   <span class="keywordflow">if</span>(thm.<a class="code" href="classCVC3_1_1Theorem.html#a05282db6832afb4f198d8c6b2b67aeb1">isAssump</a>()) {
<a name="l00360"></a>00360     <span class="keywordflow">if</span>(d_userAssertions-&gt;count(thm.<a class="code" href="classCVC3_1_1Theorem.html#af2b97ae5d270ddf1013bf4f3867a7e5d">getExpr</a>())&gt;0) {
<a name="l00361"></a>00361       <span class="keyword">const</span> <a class="code" href="classCVC3_1_1VCL_1_1UserAssertion.html" title="Structure to hold user assertions indexed by declaration order.">UserAssertion</a>&amp; a = (*d_userAssertions)[thm.<a class="code" href="classCVC3_1_1Theorem.html#af2b97ae5d270ddf1013bf4f3867a7e5d">getExpr</a>()];
<a name="l00362"></a>00362       assumptions.insert(a);
<a name="l00363"></a>00363       <span class="keywordflow">if</span>(addTCCs) {
<a name="l00364"></a>00364   <a class="code" href="debug_8h.html#a40dac3bdb2166ffc852ee8b1489d2b56">DebugAssert</a>(!a.<a class="code" href="classCVC3_1_1VCL_1_1UserAssertion.html#ac5de0496e0c784b9e13d4ab3b11df704" title="Fetching a TCC.">tcc</a>().<a class="code" href="classCVC3_1_1Theorem.html#afc6fdb0507eb3669e28d9be5ed0bd333">isNull</a>(), <span class="stringliteral">&quot;getAssumptionsRec(a=&quot;</span>
<a name="l00365"></a>00365         +a.<a class="code" href="classCVC3_1_1VCL_1_1UserAssertion.html#a8c05436295f391cff8bccebb84cbaa85" title="Fetching a Theorem.">thm</a>().<a class="code" href="classCVC3_1_1Theorem.html#ac4b1c9570ffb9cc901627ef2abb9ff77">toString</a>()+<span class="stringliteral">&quot;, thm = &quot;</span>+thm.<a class="code" href="classCVC3_1_1Theorem.html#ac4b1c9570ffb9cc901627ef2abb9ff77">toString</a>()+<span class="stringliteral">&quot;)&quot;</span>);
<a name="l00366"></a>00366   getAssumptionsRec(a.<a class="code" href="classCVC3_1_1VCL_1_1UserAssertion.html#ac5de0496e0c784b9e13d4ab3b11df704" title="Fetching a TCC.">tcc</a>(), assumptions, <span class="keyword">true</span>);
<a name="l00367"></a>00367       }
<a name="l00368"></a>00368     } <span class="keywordflow">else</span> { <span class="comment">// it&#39;s a splitter</span>
<a name="l00369"></a>00369       <a class="code" href="classCVC3_1_1VCL_1_1UserAssertion.html" title="Structure to hold user assertions indexed by declaration order.">UserAssertion</a> a(thm, <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a>(), d_nextIdx++);
<a name="l00370"></a>00370       assumptions.insert(a);
<a name="l00371"></a>00371     }
<a name="l00372"></a>00372   }
<a name="l00373"></a>00373   <span class="keywordflow">else</span> {
<a name="l00374"></a>00374     <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Assumptions.html">Assumptions</a>&amp; a(thm.<a class="code" href="classCVC3_1_1Theorem.html#a5e9ab00a613df15cc02f55edb55a67b3">getAssumptionsRef</a>());
<a name="l00375"></a>00375     <span class="keywordflow">for</span>(<a class="code" href="classCVC3_1_1Assumptions_1_1iterator.html" title="Iterator for the Assumptions: points to class Theorem.">Assumptions::iterator</a> i=a.begin(), iend=a.end(); i!=iend; ++i)
<a name="l00376"></a>00376       getAssumptionsRec(*i, assumptions, addTCCs);
<a name="l00377"></a>00377   }
<a name="l00378"></a>00378 }
<a name="l00379"></a>00379 
<a name="l00380"></a>00380 
<a name="l00381"></a><a class="code" href="classCVC3_1_1VCL.html#a2ec20cac361d8ffd161fed6fb47bef16">00381</a> <span class="keywordtype">void</span> VCL::getAssumptions(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Assumptions.html">Assumptions</a>&amp; a, vector&lt;Expr&gt;&amp; assumptions)
<a name="l00382"></a>00382 {
<a name="l00383"></a>00383   set&lt;UserAssertion&gt; assumpSet;
<a name="l00384"></a>00384   <span class="keywordflow">if</span>(a.<a class="code" href="classCVC3_1_1Assumptions.html#a37da34b71944a11667d6af0fbd45651b">empty</a>()) <span class="keywordflow">return</span>;
<a name="l00385"></a>00385   <a class="code" href="classCVC3_1_1Assumptions_1_1iterator.html" title="Iterator for the Assumptions: points to class Theorem.">Assumptions::iterator</a> i=a.<a class="code" href="classCVC3_1_1Assumptions.html#ac3e7d0e1796c83edf687aac063bdba06">begin</a>(), iend=a.<a class="code" href="classCVC3_1_1Assumptions.html#afc875bbe97e4e2d74a2cdc824f783bfb">end</a>();
<a name="l00386"></a>00386   <span class="keywordflow">if</span>(i!=iend) i-&gt;clearAllFlags();
<a name="l00387"></a>00387   <span class="keywordflow">for</span>(; i!=iend; ++i)
<a name="l00388"></a>00388     getAssumptionsRec(*i, assumpSet, getFlags()[<span class="stringliteral">&quot;tcc&quot;</span>].getBool());
<a name="l00389"></a>00389   <span class="comment">// Order assumptions by their creation time</span>
<a name="l00390"></a>00390   <span class="keywordflow">for</span>(set&lt;UserAssertion&gt;::iterator i=assumpSet.begin(), iend=assumpSet.end();
<a name="l00391"></a>00391       i!=iend; ++i)
<a name="l00392"></a>00392     assumptions.push_back(i-&gt;thm().getExpr());
<a name="l00393"></a>00393 }
<a name="l00394"></a>00394 
<a name="l00395"></a>00395 
<a name="l00396"></a>00396 <a class="code" href="debug_8h.html#a600cb2d68efe7cc413cccbb5714c7016">IF_DEBUG</a>(
<a name="l00397"></a>00397 <span class="keywordtype">void</span> VCL::dumpTrace(<span class="keywordtype">int</span> scope) {
<a name="l00398"></a>00398   vector&lt;StrPair&gt; fields;
<a name="l00399"></a>00399   fields.push_back(<a class="code" href="namespaceCVC3.html#a43e7a2b69a281ee375acdaf82d1677fd">strPair</a>(<span class="stringliteral">&quot;scope&quot;</span>, <a class="code" href="namespaceCVC3.html#af69618103f1f0f2eadada0796a2a940c">int2string</a>(scope)));
<a name="l00400"></a>00400   debugger.dumpTrace(<span class="stringliteral">&quot;scope&quot;</span>, fields);
<a name="l00401"></a>00401 }
<a name="l00402"></a>00402 )
<a name="l00403"></a>00403 
<a name="l00404"></a>00404 <span class="comment"></span>
<a name="l00405"></a>00405 <span class="comment">///////////////////////////////////////////////////////////////////////////////</span>
<a name="l00406"></a>00406 <span class="comment"></span><span class="comment">// Public VCL methods</span><span class="comment"></span>
<a name="l00407"></a>00407 <span class="comment">///////////////////////////////////////////////////////////////////////////////</span>
<a name="l00408"></a>00408 <span class="comment"></span>
<a name="l00409"></a>00409 
<a name="l00410"></a><a class="code" href="classCVC3_1_1VCL.html#ab10a1284f50157d26caca145f8335cd1">00410</a> VCL::VCL(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1CLFlags.html">CLFlags</a>&amp; flags)
<a name="l00411"></a>00411   : d_flags(<span class="keyword">new</span> <a class="code" href="classCVC3_1_1CLFlags.html">CLFlags</a>(flags))
<a name="l00412"></a>00412 {
<a name="l00413"></a>00413   <span class="comment">// Set the dependent flags so that they are consistent</span>
<a name="l00414"></a>00414 
<a name="l00415"></a>00415   <span class="keywordflow">if</span> ((*d_flags)[<span class="stringliteral">&quot;dump-tcc&quot;</span>].getBool()) {
<a name="l00416"></a>00416     d_flags-&gt;setFlag(<span class="stringliteral">&quot;translate&quot;</span>, <span class="keyword">true</span>);
<a name="l00417"></a>00417     d_flags-&gt;setFlag(<span class="stringliteral">&quot;pp-batch&quot;</span>, <span class="keyword">true</span>);
<a name="l00418"></a>00418     d_flags-&gt;setFlag(<span class="stringliteral">&quot;tcc&quot;</span>, <span class="keyword">true</span>);
<a name="l00419"></a>00419   }
<a name="l00420"></a>00420 
<a name="l00421"></a>00421   <span class="keywordflow">if</span> ((*d_flags)[<span class="stringliteral">&quot;translate&quot;</span>].getBool()) {
<a name="l00422"></a>00422     d_flags-&gt;setFlag(<span class="stringliteral">&quot;printResults&quot;</span>, <span class="keyword">false</span>);
<a name="l00423"></a>00423   }
<a name="l00424"></a>00424 
<a name="l00425"></a>00425   <span class="keywordflow">if</span> ((*d_flags)[<span class="stringliteral">&quot;pp-bryant&quot;</span>].getBool()) {
<a name="l00426"></a>00426     d_flags-&gt;setFlag(<span class="stringliteral">&quot;pp-batch&quot;</span>, <span class="keyword">true</span>);
<a name="l00427"></a>00427   }
<a name="l00428"></a>00428 
<a name="l00429"></a>00429   <span class="comment">//added by Yeting</span>
<a name="l00430"></a>00430   <span class="keywordflow">if</span> ((*d_flags)[<span class="stringliteral">&quot;quant-complete-inst&quot;</span>].getBool() &amp;&amp; !(*d_flags)[<span class="stringliteral">&quot;translate&quot;</span>].getBool()) {
<a name="l00431"></a>00431     d_flags-&gt;setFlag(<span class="stringliteral">&quot;pp-batch&quot;</span>, <span class="keyword">true</span>);
<a name="l00432"></a>00432   }
<a name="l00433"></a>00433 
<a name="l00434"></a>00434   <span class="comment">//added by Yeting</span>
<a name="l00435"></a>00435   <span class="keywordflow">if</span> ((*d_flags)[<span class="stringliteral">&quot;cnf-formula&quot;</span>].getBool()) {
<a name="l00436"></a>00436     d_flags-&gt;setFlag(<span class="stringliteral">&quot;de&quot;</span>, <span class="stringliteral">&quot;sat&quot;</span>);
<a name="l00437"></a>00437     d_flags-&gt;setFlag(<span class="stringliteral">&quot;preprocess&quot;</span>, <span class="keyword">false</span>);
<a name="l00438"></a>00438   }
<a name="l00439"></a>00439 
<a name="l00440"></a>00440 
<a name="l00441"></a>00441   <a class="code" href="debug_8h.html#a600cb2d68efe7cc413cccbb5714c7016">IF_DEBUG</a>( <span class="comment">// Initialize the global debugger</span>
<a name="l00442"></a>00442      CVC3::debugger.init(&amp;((*d_flags)[<span class="stringliteral">&quot;trace&quot;</span>].getStrVec()),
<a name="l00443"></a>00443                                &amp;((*d_flags)[<span class="stringliteral">&quot;dump-trace&quot;</span>].getString()));
<a name="l00444"></a>00444   )
<a name="l00445"></a>00445   init();
<a name="l00446"></a>00446 }
<a name="l00447"></a>00447 
<a name="l00448"></a>00448 
<a name="l00449"></a><a class="code" href="classCVC3_1_1VCL.html#a8e8d0e2a3eed319ecfca2aba48e642eb">00449</a> <span class="keywordtype">void</span> VCL::init()
<a name="l00450"></a>00450 {
<a name="l00451"></a>00451   d_nextIdx = 0;
<a name="l00452"></a>00452 
<a name="l00453"></a>00453   d_statistics = <span class="keyword">new</span> <a class="code" href="classCVC3_1_1Statistics.html">Statistics</a>();
<a name="l00454"></a>00454 
<a name="l00455"></a>00455   d_cm = <span class="keyword">new</span> <a class="code" href="classCVC3_1_1ContextManager.html" title="Manager for multiple contexts. Also holds current context.">ContextManager</a>();
<a name="l00456"></a>00456 
<a name="l00457"></a>00457   <span class="comment">// Initialize the database of user assertions.  It has to be</span>
<a name="l00458"></a>00458   <span class="comment">// initialized after d_cm.</span>
<a name="l00459"></a>00459   d_userAssertions = <span class="keyword">new</span>(<span class="keyword">true</span>) <a class="code" href="classCVC3_1_1CDMap.html">CDMap&lt;Expr,UserAssertion&gt;</a>(getCurrentContext());
<a name="l00460"></a>00460   d_batchedAssertions = <span class="keyword">new</span>(<span class="keyword">true</span>) <a class="code" href="classCVC3_1_1CDList.html">CDList&lt;Expr&gt;</a>(getCurrentContext());
<a name="l00461"></a>00461   d_batchedAssertionsIdx = <span class="keyword">new</span>(<span class="keyword">true</span>) <a class="code" href="classCVC3_1_1CDO.html">CDO&lt;unsigned&gt;</a>(getCurrentContext(), 0);
<a name="l00462"></a>00462 
<a name="l00463"></a>00463   d_em = <span class="keyword">new</span> <a class="code" href="classCVC3_1_1ExprManager.html">ExprManager</a>(d_cm, *d_flags);
<a name="l00464"></a>00464 
<a name="l00465"></a>00465   d_tm = <span class="keyword">new</span> <a class="code" href="classCVC3_1_1TheoremManager.html">TheoremManager</a>(d_cm, d_em, *d_flags);
<a name="l00466"></a>00466   d_em-&gt;setTM(d_tm);
<a name="l00467"></a>00467 
<a name="l00468"></a>00468   d_translator = <span class="keyword">new</span> <a class="code" href="classCVC3_1_1Translator.html">Translator</a>(d_em,
<a name="l00469"></a>00469                                 (*d_flags)[<span class="stringliteral">&quot;translate&quot;</span>].getBool(),
<a name="l00470"></a>00470                                 (*d_flags)[<span class="stringliteral">&quot;real2int&quot;</span>].getBool(),
<a name="l00471"></a>00471                                 (*d_flags)[<span class="stringliteral">&quot;convertArith&quot;</span>].getBool(),
<a name="l00472"></a>00472                                 (*d_flags)[<span class="stringliteral">&quot;convert2diff&quot;</span>].getString(),
<a name="l00473"></a>00473                                 (*d_flags)[<span class="stringliteral">&quot;iteLiftArith&quot;</span>].getBool(),
<a name="l00474"></a>00474                                 (*d_flags)[<span class="stringliteral">&quot;expResult&quot;</span>].getString(),
<a name="l00475"></a>00475                                 (*d_flags)[<span class="stringliteral">&quot;category&quot;</span>].getString(),
<a name="l00476"></a>00476                                 (*d_flags)[<span class="stringliteral">&quot;convertArray&quot;</span>].getBool(),
<a name="l00477"></a>00477                                 (*d_flags)[<span class="stringliteral">&quot;combineAssump&quot;</span>].getBool(),
<a name="l00478"></a>00478                                 (*d_flags)[<span class="stringliteral">&quot;convertToBV&quot;</span>].getInt());
<a name="l00479"></a>00479 
<a name="l00480"></a>00480   d_dump = d_translator-&gt;start((*d_flags)[<span class="stringliteral">&quot;dump-log&quot;</span>].getString());
<a name="l00481"></a>00481 
<a name="l00482"></a>00482   d_theoryCore = <span class="keyword">new</span> <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>(d_cm, d_em, d_tm, d_translator, *d_flags, *d_statistics);
<a name="l00483"></a>00483 
<a name="l00484"></a>00484   <a class="code" href="debug_8h.html#a40dac3bdb2166ffc852ee8b1489d2b56">DebugAssert</a>(d_theories.size() == 0, <span class="stringliteral">&quot;Expected empty theories array&quot;</span>);
<a name="l00485"></a>00485   d_theories.push_back(d_theoryCore);
<a name="l00486"></a>00486 
<a name="l00487"></a>00487   <span class="comment">// Fast rewriting of literals is done by setting their find to true or false.</span>
<a name="l00488"></a>00488   falseExpr().setFind(d_theoryCore-&gt;reflexivityRule(falseExpr()));
<a name="l00489"></a>00489   trueExpr().setFind(d_theoryCore-&gt;reflexivityRule(trueExpr()));
<a name="l00490"></a>00490 
<a name="l00491"></a>00491   d_theories.push_back(d_theoryUF = <span class="keyword">new</span> <a class="code" href="classCVC3_1_1TheoryUF.html" title="This theory handles uninterpreted functions.">TheoryUF</a>(d_theoryCore));
<a name="l00492"></a>00492 
<a name="l00493"></a>00493   <span class="keywordflow">if</span> ((*d_flags)[<span class="stringliteral">&quot;arith-new&quot;</span>].getBool()) {
<a name="l00494"></a>00494     d_theories.push_back(d_theoryArith = <span class="keyword">new</span> <a class="code" href="classCVC3_1_1TheoryArithNew.html">TheoryArithNew</a>(d_theoryCore));
<a name="l00495"></a>00495   }
<a name="l00496"></a>00496   <span class="keywordflow">else</span> <span class="keywordflow">if</span> ((*d_flags)[<span class="stringliteral">&quot;arith3&quot;</span>].getBool()) {
<a name="l00497"></a>00497     d_theories.push_back(d_theoryArith = <span class="keyword">new</span> <a class="code" href="classCVC3_1_1TheoryArith3.html">TheoryArith3</a>(d_theoryCore));
<a name="l00498"></a>00498   }
<a name="l00499"></a>00499   <span class="keywordflow">else</span> {
<a name="l00500"></a>00500     d_theories.push_back(d_theoryArith = <span class="keyword">new</span> <a class="code" href="classCVC3_1_1TheoryArithOld.html">TheoryArithOld</a>(d_theoryCore));
<a name="l00501"></a>00501   }
<a name="l00502"></a>00502   d_theoryCore-&gt;getExprTrans()-&gt;setTheoryArith(d_theoryArith);
<a name="l00503"></a>00503   d_theories.push_back(d_theoryArray = <span class="keyword">new</span> <a class="code" href="classCVC3_1_1TheoryArray.html" title="This theory handles arrays.">TheoryArray</a>(d_theoryCore));
<a name="l00504"></a>00504   d_theories.push_back(d_theoryRecords = <span class="keyword">new</span> <a class="code" href="classCVC3_1_1TheoryRecords.html" title="This theory handles records.">TheoryRecords</a>(d_theoryCore));
<a name="l00505"></a>00505   d_theories.push_back(d_theorySimulate = <span class="keyword">new</span> <a class="code" href="classCVC3_1_1TheorySimulate.html" title="&quot;Theory&quot; of symbolic simulation.">TheorySimulate</a>(d_theoryCore));
<a name="l00506"></a>00506   d_theories.push_back(d_theoryBitvector = <span class="keyword">new</span> <a class="code" href="classCVC3_1_1TheoryBitvector.html" title="Theory of bitvectors of known length \ (operations include: @,[i:j],[i],+,.,BVAND,BVNEG)">TheoryBitvector</a>(d_theoryCore));
<a name="l00507"></a>00507   <span class="keywordflow">if</span> ((*d_flags)[<span class="stringliteral">&quot;dt-lazy&quot;</span>].getBool()) {
<a name="l00508"></a>00508     d_theories.push_back(d_theoryDatatype = <span class="keyword">new</span> <a class="code" href="classCVC3_1_1TheoryDatatypeLazy.html" title="This theory handles datatypes.">TheoryDatatypeLazy</a>(d_theoryCore));
<a name="l00509"></a>00509   }
<a name="l00510"></a>00510   <span class="keywordflow">else</span> {
<a name="l00511"></a>00511     d_theories.push_back(d_theoryDatatype = <span class="keyword">new</span> <a class="code" href="classCVC3_1_1TheoryDatatype.html" title="This theory handles datatypes.">TheoryDatatype</a>(d_theoryCore));
<a name="l00512"></a>00512   }
<a name="l00513"></a>00513   d_theories.push_back(d_theoryQuant = <span class="keyword">new</span> <a class="code" href="classCVC3_1_1TheoryQuant.html" title="This theory handles quantifiers.">TheoryQuant</a>(d_theoryCore));
<a name="l00514"></a>00514 
<a name="l00515"></a>00515   d_translator-&gt;setTheoryCore(d_theoryCore);
<a name="l00516"></a>00516   d_translator-&gt;setTheoryUF(d_theoryUF);
<a name="l00517"></a>00517   d_translator-&gt;setTheoryArith(d_theoryArith);
<a name="l00518"></a>00518   d_translator-&gt;setTheoryArray(d_theoryArray);
<a name="l00519"></a>00519   d_translator-&gt;setTheoryQuant(d_theoryQuant);
<a name="l00520"></a>00520   d_translator-&gt;setTheoryRecords(d_theoryRecords);
<a name="l00521"></a>00521   d_translator-&gt;setTheorySimulate(d_theorySimulate);
<a name="l00522"></a>00522   d_translator-&gt;setTheoryBitvector(d_theoryBitvector);
<a name="l00523"></a>00523   d_translator-&gt;setTheoryDatatype(d_theoryDatatype);
<a name="l00524"></a>00524 
<a name="l00525"></a>00525   <span class="comment">// Must be created after TheoryCore, since it needs it.</span>
<a name="l00526"></a>00526   <span class="comment">// When we have more than one search engine, select one to create</span>
<a name="l00527"></a>00527   <span class="comment">// based on flags</span>
<a name="l00528"></a>00528   <span class="keyword">const</span> <span class="keywordtype">string</span>&amp; satEngine = (*d_flags)[<span class="stringliteral">&quot;sat&quot;</span>].getString();
<a name="l00529"></a>00529   <span class="keywordflow">if</span> (satEngine == <span class="stringliteral">&quot;simple&quot;</span>)
<a name="l00530"></a>00530     d_se = <span class="keyword">new</span> <a class="code" href="classCVC3_1_1SearchSimple.html" title="Implementation of the simple search engine.">SearchSimple</a>(d_theoryCore);
<a name="l00531"></a>00531   <span class="keywordflow">else</span> <span class="keywordflow">if</span> (satEngine == <span class="stringliteral">&quot;fast&quot;</span>)
<a name="l00532"></a>00532     d_se = <span class="keyword">new</span> <a class="code" href="classCVC3_1_1SearchEngineFast.html" title="Implementation of a faster search engine, using newer techniques.">SearchEngineFast</a>(d_theoryCore);
<a name="l00533"></a>00533   <span class="keywordflow">else</span> <span class="keywordflow">if</span> (satEngine == <span class="stringliteral">&quot;sat&quot;</span> || satEngine == <span class="stringliteral">&quot;minisat&quot;</span>)
<a name="l00534"></a>00534     d_se = <span class="keyword">new</span> <a class="code" href="classCVC3_1_1SearchSat.html" title="Search engine that connects to a generic SAT reasoning module.">SearchSat</a>(d_theoryCore, satEngine);
<a name="l00535"></a>00535   <span class="keywordflow">else</span>
<a name="l00536"></a>00536     <span class="keywordflow">throw</span> <a class="code" href="classCVC3_1_1CLException.html">CLException</a>(<span class="stringliteral">&quot;Unrecognized SAT solver name: &quot;</span>
<a name="l00537"></a>00537                       +(*d_flags)[<span class="stringliteral">&quot;sat&quot;</span>].getString());
<a name="l00538"></a>00538 
<a name="l00539"></a>00539   <span class="comment">// Initial scope level should be 1</span>
<a name="l00540"></a>00540   d_cm-&gt;push();
<a name="l00541"></a>00541 
<a name="l00542"></a>00542   d_stackLevel = <span class="keyword">new</span>(<span class="keyword">true</span>) <a class="code" href="classCVC3_1_1CDO.html">CDO&lt;int&gt;</a>(d_cm-&gt;getCurrentContext(), 0);
<a name="l00543"></a>00543 
<a name="l00544"></a>00544   d_theoryCore-&gt;setResourceLimit((<span class="keywordtype">unsigned</span>)((*d_flags)[<span class="stringliteral">&quot;resource&quot;</span>].getInt()));
<a name="l00545"></a>00545   d_theoryCore-&gt;setTimeLimit((<span class="keywordtype">unsigned</span>)((*d_flags)[<span class="stringliteral">&quot;stimeout&quot;</span>].getInt()));
<a name="l00546"></a>00546 
<a name="l00547"></a>00547   <span class="comment">//  myvcl = this;</span>
<a name="l00548"></a>00548 }
<a name="l00549"></a>00549 
<a name="l00550"></a>00550 
<a name="l00551"></a><a class="code" href="classCVC3_1_1VCL.html#a106a8117c3f249e2cc0a3e3a13f9740a">00551</a> <span class="keywordtype">void</span> VCL::destroy()
<a name="l00552"></a>00552 {
<a name="l00553"></a>00553   popto(0);
<a name="l00554"></a>00554   d_cm-&gt;popto(0);
<a name="l00555"></a>00555   <span class="keyword">delete</span> d_stackLevel;
<a name="l00556"></a>00556   free(d_stackLevel);
<a name="l00557"></a>00557   d_translator-&gt;finish();
<a name="l00558"></a>00558   <span class="keyword">delete</span> d_translator;
<a name="l00559"></a>00559 
<a name="l00560"></a>00560   <a class="code" href="debug_8h.html#ad64155edafde9f067f4868817cd04bdf">TRACE_MSG</a>(<span class="stringliteral">&quot;delete&quot;</span>, <span class="stringliteral">&quot;Deleting SearchEngine {&quot;</span>);
<a name="l00561"></a>00561   <span class="keyword">delete</span> d_se;
<a name="l00562"></a>00562   <a class="code" href="debug_8h.html#ad64155edafde9f067f4868817cd04bdf">TRACE_MSG</a>(<span class="stringliteral">&quot;delete&quot;</span>, <span class="stringliteral">&quot;Finished deleting SearchEngine }&quot;</span>);
<a name="l00563"></a>00563   <span class="comment">// This map contains expressions and theorems; delete it before</span>
<a name="l00564"></a>00564   <span class="comment">// d_em, d_tm, and d_cm.</span>
<a name="l00565"></a>00565   <a class="code" href="debug_8h.html#ad64155edafde9f067f4868817cd04bdf">TRACE_MSG</a>(<span class="stringliteral">&quot;delete&quot;</span>, <span class="stringliteral">&quot;Deleting d_userAssertions {&quot;</span>);
<a name="l00566"></a>00566   <span class="keyword">delete</span> d_batchedAssertionsIdx;
<a name="l00567"></a>00567   free(d_batchedAssertionsIdx);
<a name="l00568"></a>00568   <span class="keyword">delete</span> d_batchedAssertions;
<a name="l00569"></a>00569   free(d_batchedAssertions);
<a name="l00570"></a>00570   <span class="keyword">delete</span> d_userAssertions;
<a name="l00571"></a>00571   free(d_userAssertions);
<a name="l00572"></a>00572   <a class="code" href="debug_8h.html#ad64155edafde9f067f4868817cd04bdf">TRACE_MSG</a>(<span class="stringliteral">&quot;delete&quot;</span>, <span class="stringliteral">&quot;Finished deleting d_userAssertions }&quot;</span>);
<a name="l00573"></a>00573   <span class="comment">// and set these to null so their destructors don&#39;t blow up</span>
<a name="l00574"></a>00574   d_lastQuery = <a class="code" href="classCVC3_1_1Theorem3.html" title="Theorem3.">Theorem3</a>();
<a name="l00575"></a>00575   d_lastQueryTCC = <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a>();
<a name="l00576"></a>00576   d_lastClosure = <a class="code" href="classCVC3_1_1Theorem3.html" title="Theorem3.">Theorem3</a>();
<a name="l00577"></a>00577   <span class="comment">// Delete ExprManager BEFORE TheoremManager, since Exprs use Theorems</span>
<a name="l00578"></a>00578   <a class="code" href="debug_8h.html#ad64155edafde9f067f4868817cd04bdf">TRACE_MSG</a>(<span class="stringliteral">&quot;delete&quot;</span>, <span class="stringliteral">&quot;Clearing d_em {&quot;</span>);
<a name="l00579"></a>00579   d_em-&gt;clear();
<a name="l00580"></a>00580   d_tm-&gt;clear();
<a name="l00581"></a>00581   <a class="code" href="debug_8h.html#ad64155edafde9f067f4868817cd04bdf">TRACE_MSG</a>(<span class="stringliteral">&quot;delete&quot;</span>, <span class="stringliteral">&quot;Finished clearing d_em }&quot;</span>);
<a name="l00582"></a>00582 
<a name="l00583"></a>00583   <span class="keywordflow">for</span>(<span class="keywordtype">size_t</span> i=d_theories.size(); i!= 0; ) {
<a name="l00584"></a>00584     --i;
<a name="l00585"></a>00585     <span class="keywordtype">string</span> name(d_theories[i]-&gt;getName());
<a name="l00586"></a>00586     <a class="code" href="kinds_8h.html#aa10c9e8951b8ccf714a59ec321bdac5ba7fa27e82c6c4f69434225ed81e5d151e">TRACE</a>(<span class="stringliteral">&quot;delete&quot;</span>, <span class="stringliteral">&quot;Deleting Theory[&quot;</span>, name, <span class="stringliteral">&quot;] {&quot;</span>);
<a name="l00587"></a>00587     <span class="keyword">delete</span> d_theories[i];
<a name="l00588"></a>00588     <a class="code" href="kinds_8h.html#aa10c9e8951b8ccf714a59ec321bdac5ba7fa27e82c6c4f69434225ed81e5d151e">TRACE</a>(<span class="stringliteral">&quot;delete&quot;</span>, <span class="stringliteral">&quot;Finished deleting Theory[&quot;</span>, name, <span class="stringliteral">&quot;] }&quot;</span>);
<a name="l00589"></a>00589   }
<a name="l00590"></a>00590   d_theories.clear();
<a name="l00591"></a>00591 
<a name="l00592"></a>00592   <span class="comment">// TheoremManager does not call ~Theorem() destructors, and only</span>
<a name="l00593"></a>00593   <span class="comment">// releases memory.  At worst, we&#39;ll lose some Assumptions.</span>
<a name="l00594"></a>00594   <a class="code" href="debug_8h.html#ad64155edafde9f067f4868817cd04bdf">TRACE_MSG</a>(<span class="stringliteral">&quot;delete&quot;</span>, <span class="stringliteral">&quot;Deleting d_tm {&quot;</span>);
<a name="l00595"></a>00595   <span class="keyword">delete</span> d_tm;
<a name="l00596"></a>00596   <a class="code" href="debug_8h.html#ad64155edafde9f067f4868817cd04bdf">TRACE_MSG</a>(<span class="stringliteral">&quot;delete&quot;</span>, <span class="stringliteral">&quot;Finished deleting d_tm }&quot;</span>);
<a name="l00597"></a>00597 
<a name="l00598"></a>00598   <a class="code" href="debug_8h.html#ad64155edafde9f067f4868817cd04bdf">TRACE_MSG</a>(<span class="stringliteral">&quot;delete&quot;</span>, <span class="stringliteral">&quot;Deleting d_em {&quot;</span>);
<a name="l00599"></a>00599   <span class="keyword">delete</span> d_em;
<a name="l00600"></a>00600   <a class="code" href="debug_8h.html#ad64155edafde9f067f4868817cd04bdf">TRACE_MSG</a>(<span class="stringliteral">&quot;delete&quot;</span>, <span class="stringliteral">&quot;Finished deleting d_em }&quot;</span>);
<a name="l00601"></a>00601 
<a name="l00602"></a>00602   <a class="code" href="debug_8h.html#ad64155edafde9f067f4868817cd04bdf">TRACE_MSG</a>(<span class="stringliteral">&quot;delete&quot;</span>, <span class="stringliteral">&quot;Deleting d_cm {&quot;</span>);
<a name="l00603"></a>00603   <span class="keyword">delete</span> d_cm;
<a name="l00604"></a>00604   <a class="code" href="debug_8h.html#ad64155edafde9f067f4868817cd04bdf">TRACE_MSG</a>(<span class="stringliteral">&quot;delete&quot;</span>, <span class="stringliteral">&quot;Finished deleting d_cm }&quot;</span>);
<a name="l00605"></a>00605   <span class="keyword">delete</span> d_statistics;
<a name="l00606"></a>00606   <a class="code" href="debug_8h.html#ad64155edafde9f067f4868817cd04bdf">TRACE_MSG</a>(<span class="stringliteral">&quot;delete&quot;</span>, <span class="stringliteral">&quot;Finished deleting d_statistics }&quot;</span>);
<a name="l00607"></a>00607 }
<a name="l00608"></a>00608 
<a name="l00609"></a>00609 
<a name="l00610"></a><a class="code" href="classCVC3_1_1VCL.html#ac65059211da91a793d0df775763c7f68">00610</a> VCL::~VCL()
<a name="l00611"></a>00611 {
<a name="l00612"></a>00612   destroy();
<a name="l00613"></a>00613   <a class="code" href="debug_8h.html#ad64155edafde9f067f4868817cd04bdf">TRACE_MSG</a>(<span class="stringliteral">&quot;delete&quot;</span>, <span class="stringliteral">&quot;Deleting d_flags [end of ~VCL()]&quot;</span>);
<a name="l00614"></a>00614   <span class="keyword">delete</span> d_flags;
<a name="l00615"></a>00615   <span class="comment">// No more TRACE-ing after this point (it needs d_flags)</span>
<a name="l00616"></a>00616   <span class="comment">// Finalize the global debugger,</span>
<a name="l00617"></a>00617   <span class="comment">// otherwise applications with more than one instance of VCL</span>
<a name="l00618"></a>00618   <span class="comment">// may use refer to deallocated flags (e.g. test6 uses 2 VCLs)</span>
<a name="l00619"></a>00619   <a class="code" href="debug_8h.html#a600cb2d68efe7cc413cccbb5714c7016">IF_DEBUG</a>( CVC3::debugger.finalize(); )
<a name="l00620"></a>00620 }
<a name="l00621"></a>00621 
<a name="l00622"></a>00622 
<a name="l00623"></a><a class="code" href="classCVC3_1_1VCL.html#a83197a54652f37925771d6de682a54a9">00623</a> <span class="keywordtype">void</span> VCL::reprocessFlags() {
<a name="l00624"></a>00624   <span class="keywordflow">if</span> (d_se-&gt;getName() != (*d_flags)[<span class="stringliteral">&quot;sat&quot;</span>].getString()) {
<a name="l00625"></a>00625     <span class="keyword">delete</span> d_se;
<a name="l00626"></a>00626     <span class="keyword">const</span> <span class="keywordtype">string</span>&amp; satEngine = (*d_flags)[<span class="stringliteral">&quot;sat&quot;</span>].getString();
<a name="l00627"></a>00627     <span class="keywordflow">if</span> (satEngine == <span class="stringliteral">&quot;simple&quot;</span>)
<a name="l00628"></a>00628       d_se = <span class="keyword">new</span> <a class="code" href="classCVC3_1_1SearchSimple.html" title="Implementation of the simple search engine.">SearchSimple</a>(d_theoryCore);
<a name="l00629"></a>00629     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (satEngine == <span class="stringliteral">&quot;fast&quot;</span>)
<a name="l00630"></a>00630       d_se = <span class="keyword">new</span> <a class="code" href="classCVC3_1_1SearchEngineFast.html" title="Implementation of a faster search engine, using newer techniques.">SearchEngineFast</a>(d_theoryCore);
<a name="l00631"></a>00631     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (satEngine == <span class="stringliteral">&quot;sat&quot;</span> || satEngine == <span class="stringliteral">&quot;minisat&quot;</span>)
<a name="l00632"></a>00632       d_se = <span class="keyword">new</span> <a class="code" href="classCVC3_1_1SearchSat.html" title="Search engine that connects to a generic SAT reasoning module.">SearchSat</a>(d_theoryCore, satEngine);
<a name="l00633"></a>00633     <span class="keywordflow">else</span>
<a name="l00634"></a>00634       <span class="keywordflow">throw</span> <a class="code" href="classCVC3_1_1CLException.html">CLException</a>(<span class="stringliteral">&quot;Unrecognized SAT solver name: &quot;</span>
<a name="l00635"></a>00635                         +(*d_flags)[<span class="stringliteral">&quot;sat&quot;</span>].getString());
<a name="l00636"></a>00636   }
<a name="l00637"></a>00637 
<a name="l00638"></a>00638   <span class="keywordtype">int</span> arithCur;
<a name="l00639"></a>00639   <span class="keywordflow">if</span> (d_theoryArith-&gt;getName() == <span class="stringliteral">&quot;ArithmeticOld&quot;</span>) arithCur = 1;
<a name="l00640"></a>00640   <span class="keywordflow">else</span> <span class="keywordflow">if</span> (d_theoryArith-&gt;getName() == <span class="stringliteral">&quot;ArithmeticNew&quot;</span>) arithCur = 2;
<a name="l00641"></a>00641   <span class="keywordflow">else</span> {
<a name="l00642"></a>00642     <a class="code" href="debug_8h.html#a40dac3bdb2166ffc852ee8b1489d2b56">DebugAssert</a>(d_theoryArith-&gt;getName() == <span class="stringliteral">&quot;Arithmetic3&quot;</span>, <span class="stringliteral">&quot;unexpected name&quot;</span>);
<a name="l00643"></a>00643     arithCur = 3;
<a name="l00644"></a>00644   }
<a name="l00645"></a>00645 
<a name="l00646"></a>00646   <span class="keywordtype">int</span> arithNext;
<a name="l00647"></a>00647   <span class="keywordflow">if</span> ((*d_flags)[<span class="stringliteral">&quot;arith-new&quot;</span>].getBool()) arithNext = 2;
<a name="l00648"></a>00648   <span class="keywordflow">else</span> <span class="keywordflow">if</span> ((*d_flags)[<span class="stringliteral">&quot;arith3&quot;</span>].getBool()) arithNext = 3;
<a name="l00649"></a>00649   <span class="keywordflow">else</span> arithNext = 1;
<a name="l00650"></a>00650 
<a name="l00651"></a>00651   <span class="keywordflow">if</span> (arithCur != arithNext) {
<a name="l00652"></a>00652     <span class="keyword">delete</span> d_theoryArith;
<a name="l00653"></a>00653     <span class="keywordflow">switch</span> (arithNext) {
<a name="l00654"></a>00654       <span class="keywordflow">case</span> 1:
<a name="l00655"></a>00655         d_theoryArith = <span class="keyword">new</span> <a class="code" href="classCVC3_1_1TheoryArithOld.html">TheoryArithOld</a>(d_theoryCore);
<a name="l00656"></a>00656         <span class="keywordflow">break</span>;
<a name="l00657"></a>00657       <span class="keywordflow">case</span> 2:
<a name="l00658"></a>00658         d_theoryArith = <span class="keyword">new</span> <a class="code" href="classCVC3_1_1TheoryArithNew.html">TheoryArithNew</a>(d_theoryCore);
<a name="l00659"></a>00659         <span class="keywordflow">break</span>;
<a name="l00660"></a>00660       <span class="keywordflow">case</span> 3:
<a name="l00661"></a>00661         d_theoryArith = <span class="keyword">new</span> <a class="code" href="classCVC3_1_1TheoryArith3.html">TheoryArith3</a>(d_theoryCore);
<a name="l00662"></a>00662         <span class="keywordflow">break</span>;
<a name="l00663"></a>00663     }
<a name="l00664"></a>00664     d_theories[2] = d_theoryArith;
<a name="l00665"></a>00665     d_translator-&gt;setTheoryArith(d_theoryArith);
<a name="l00666"></a>00666   }
<a name="l00667"></a>00667 
<a name="l00668"></a>00668   <span class="keywordflow">if</span> ((*d_flags)[<span class="stringliteral">&quot;dump-tcc&quot;</span>].getBool()) {
<a name="l00669"></a>00669     d_flags-&gt;setFlag(<span class="stringliteral">&quot;translate&quot;</span>, <span class="keyword">true</span>);
<a name="l00670"></a>00670     d_flags-&gt;setFlag(<span class="stringliteral">&quot;pp-batch&quot;</span>, <span class="keyword">true</span>);
<a name="l00671"></a>00671     d_flags-&gt;setFlag(<span class="stringliteral">&quot;tcc&quot;</span>, <span class="keyword">true</span>);
<a name="l00672"></a>00672   }
<a name="l00673"></a>00673 
<a name="l00674"></a>00674   <span class="keywordflow">if</span> ((*d_flags)[<span class="stringliteral">&quot;translate&quot;</span>].getBool()) {
<a name="l00675"></a>00675     d_flags-&gt;setFlag(<span class="stringliteral">&quot;printResults&quot;</span>, <span class="keyword">false</span>);
<a name="l00676"></a>00676   }
<a name="l00677"></a>00677 
<a name="l00678"></a>00678   <span class="keywordflow">if</span> ((*d_flags)[<span class="stringliteral">&quot;pp-bryant&quot;</span>].getBool()) {
<a name="l00679"></a>00679     d_flags-&gt;setFlag(<span class="stringliteral">&quot;pp-batch&quot;</span>, <span class="keyword">true</span>);
<a name="l00680"></a>00680   }
<a name="l00681"></a>00681 
<a name="l00682"></a>00682   <span class="comment">//added by Yeting</span>
<a name="l00683"></a>00683   <span class="keywordflow">if</span> ((*d_flags)[<span class="stringliteral">&quot;quant-complete-inst&quot;</span>].getBool() &amp;&amp; !(*d_flags)[<span class="stringliteral">&quot;translate&quot;</span>].getBool()) {
<a name="l00684"></a>00684     d_flags-&gt;setFlag(<span class="stringliteral">&quot;pp-batch&quot;</span>, <span class="keyword">true</span>);
<a name="l00685"></a>00685   }
<a name="l00686"></a>00686 
<a name="l00687"></a>00687   <span class="keywordflow">if</span> ((*d_flags)[<span class="stringliteral">&quot;cnf-formula&quot;</span>].getBool()) {
<a name="l00688"></a>00688     d_flags-&gt;setFlag(<span class="stringliteral">&quot;de&quot;</span>, <span class="stringliteral">&quot;sat&quot;</span>);
<a name="l00689"></a>00689     d_flags-&gt;setFlag(<span class="stringliteral">&quot;preprocess&quot;</span>, <span class="keyword">false</span>);
<a name="l00690"></a>00690   }
<a name="l00691"></a>00691 
<a name="l00692"></a>00692 
<a name="l00693"></a>00693   <span class="comment">//TODO: handle more flags</span>
<a name="l00694"></a>00694 }
<a name="l00695"></a>00695 
<a name="l00696"></a><a class="code" href="classCVC3_1_1VCL.html#a574d03796ebbc4d20e668172ac97e581">00696</a> <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>* VCL::core(){
<a name="l00697"></a>00697   <span class="keywordflow">return</span> d_theoryCore;
<a name="l00698"></a>00698 }
<a name="l00699"></a>00699 
<a name="l00700"></a><a class="code" href="classCVC3_1_1VCL.html#ad344206a7bab732b8b08a86a4cd530dd">00700</a> <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a> VCL::boolType(){
<a name="l00701"></a>00701   <span class="keywordflow">return</span> d_theoryCore-&gt;boolType();
<a name="l00702"></a>00702 }
<a name="l00703"></a>00703 
<a name="l00704"></a>00704 
<a name="l00705"></a><a class="code" href="classCVC3_1_1VCL.html#aea5eb2afa1a4917c1251340f22a7f54b">00705</a> <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a> VCL::realType()
<a name="l00706"></a>00706 {
<a name="l00707"></a>00707   <span class="keywordflow">return</span> d_theoryArith-&gt;realType();
<a name="l00708"></a>00708 }
<a name="l00709"></a>00709 
<a name="l00710"></a>00710 
<a name="l00711"></a><a class="code" href="classCVC3_1_1VCL.html#aba7fbeffde84d5f4e789f52aac61fe1d">00711</a> <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a> VCL::intType() {
<a name="l00712"></a>00712   <span class="keywordflow">return</span> d_theoryArith-&gt;intType();
<a name="l00713"></a>00713 }
<a name="l00714"></a>00714 
<a name="l00715"></a>00715 
<a name="l00716"></a><a class="code" href="classCVC3_1_1VCL.html#a79a94f22666ae19579e55ae2cc6318a4">00716</a> <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a> VCL::subrangeType(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; l, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; r) {
<a name="l00717"></a>00717   <span class="keywordflow">return</span> d_theoryArith-&gt;subrangeType(l, r);
<a name="l00718"></a>00718 }
<a name="l00719"></a>00719 
<a name="l00720"></a>00720 
<a name="l00721"></a><a class="code" href="classCVC3_1_1VCL.html#a31aecd4893d74a75daeef186e3b8f81e">00721</a> <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a> VCL::subtypeType(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; pred, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; witness)
<a name="l00722"></a>00722 {
<a name="l00723"></a>00723   <span class="keywordflow">return</span> d_theoryCore-&gt;newSubtypeExpr(pred, witness);
<a name="l00724"></a>00724 }
<a name="l00725"></a>00725 
<a name="l00726"></a>00726 
<a name="l00727"></a><a class="code" href="classCVC3_1_1VCL.html#ac2e6baf2eeb267e1b8f12392070ad787">00727</a> <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a> VCL::tupleType(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a>&amp; type0, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a>&amp; type1)
<a name="l00728"></a>00728 {
<a name="l00729"></a>00729   vector&lt;Type&gt; types;
<a name="l00730"></a>00730   types.push_back(type0);
<a name="l00731"></a>00731   types.push_back(type1);
<a name="l00732"></a>00732   <span class="keywordflow">return</span> d_theoryRecords-&gt;tupleType(types);
<a name="l00733"></a>00733 }
<a name="l00734"></a>00734 
<a name="l00735"></a>00735 
<a name="l00736"></a><a class="code" href="classCVC3_1_1VCL.html#a9ebfe8a0227e0dae6800e9ba31fb262f">00736</a> <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a> VCL::tupleType(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a>&amp; type0, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a>&amp; type1, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a>&amp; type2)
<a name="l00737"></a>00737 {
<a name="l00738"></a>00738   vector&lt;Type&gt; types;
<a name="l00739"></a>00739   types.push_back(type0);
<a name="l00740"></a>00740   types.push_back(type1);
<a name="l00741"></a>00741   types.push_back(type2);
<a name="l00742"></a>00742   <span class="keywordflow">return</span> d_theoryRecords-&gt;tupleType(types);
<a name="l00743"></a>00743 }
<a name="l00744"></a>00744 
<a name="l00745"></a>00745 
<a name="l00746"></a><a class="code" href="classCVC3_1_1VCL.html#a1be510191730f07d749f283e91c212a0">00746</a> <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a> VCL::tupleType(<span class="keyword">const</span> vector&lt;Type&gt;&amp; types)
<a name="l00747"></a>00747 {
<a name="l00748"></a>00748   <span class="keywordflow">return</span> d_theoryRecords-&gt;tupleType(types);
<a name="l00749"></a>00749 }
<a name="l00750"></a>00750 
<a name="l00751"></a>00751 
<a name="l00752"></a><a class="code" href="classCVC3_1_1VCL.html#a5402e161e9f0c8158f3ffc99ffee7585">00752</a> <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a> VCL::recordType(<span class="keyword">const</span> <span class="keywordtype">string</span>&amp; field, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a>&amp; type)
<a name="l00753"></a>00753 {
<a name="l00754"></a>00754   vector&lt;string&gt; fields;
<a name="l00755"></a>00755   vector&lt;Type&gt; kids;
<a name="l00756"></a>00756   fields.push_back(field);
<a name="l00757"></a>00757   kids.push_back(type);
<a name="l00758"></a>00758   <span class="keywordflow">return</span> <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a>(d_theoryRecords-&gt;recordType(fields, kids));
<a name="l00759"></a>00759 }
<a name="l00760"></a>00760 
<a name="l00761"></a>00761 
<a name="l00762"></a><a class="code" href="classCVC3_1_1VCL.html#a446a3a15b247192930dccfc6d9c1939e">00762</a> <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a> VCL::recordType(<span class="keyword">const</span> <span class="keywordtype">string</span>&amp; field0, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a>&amp; type0,
<a name="l00763"></a>00763          <span class="keyword">const</span> <span class="keywordtype">string</span>&amp; field1, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a>&amp; type1) {
<a name="l00764"></a>00764   vector&lt;string&gt; fields;
<a name="l00765"></a>00765   vector&lt;Type&gt; kids;
<a name="l00766"></a>00766   fields.push_back(field0);
<a name="l00767"></a>00767   fields.push_back(field1);
<a name="l00768"></a>00768   kids.push_back(type0);
<a name="l00769"></a>00769   kids.push_back(type1);
<a name="l00770"></a>00770   <a class="code" href="namespaceCVC3.html#ab21ee900e0b3494b1b8c26005436a5a4" title="Sort two vectors based on the first vector.">sort2</a>(fields, kids);
<a name="l00771"></a>00771   <span class="keywordflow">return</span> <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a>(d_theoryRecords-&gt;recordType(fields, kids));
<a name="l00772"></a>00772 }
<a name="l00773"></a>00773 
<a name="l00774"></a>00774 
<a name="l00775"></a><a class="code" href="classCVC3_1_1VCL.html#ac56448d9022fd70d82949cc679b206f1">00775</a> <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a> VCL::recordType(<span class="keyword">const</span> <span class="keywordtype">string</span>&amp; field0, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a>&amp; type0,
<a name="l00776"></a>00776          <span class="keyword">const</span> <span class="keywordtype">string</span>&amp; field1, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a>&amp; type1,
<a name="l00777"></a>00777          <span class="keyword">const</span> <span class="keywordtype">string</span>&amp; field2, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a>&amp; type2)
<a name="l00778"></a>00778 {
<a name="l00779"></a>00779   vector&lt;string&gt; fields;
<a name="l00780"></a>00780   vector&lt;Type&gt; kids;
<a name="l00781"></a>00781   fields.push_back(field0);
<a name="l00782"></a>00782   fields.push_back(field1);
<a name="l00783"></a>00783   fields.push_back(field2);
<a name="l00784"></a>00784   kids.push_back(type0);
<a name="l00785"></a>00785   kids.push_back(type1);
<a name="l00786"></a>00786   kids.push_back(type2);
<a name="l00787"></a>00787   <a class="code" href="namespaceCVC3.html#ab21ee900e0b3494b1b8c26005436a5a4" title="Sort two vectors based on the first vector.">sort2</a>(fields, kids);
<a name="l00788"></a>00788   <span class="keywordflow">return</span> <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a>(d_theoryRecords-&gt;recordType(fields, kids));
<a name="l00789"></a>00789 }
<a name="l00790"></a>00790 
<a name="l00791"></a>00791 
<a name="l00792"></a><a class="code" href="classCVC3_1_1VCL.html#ad1bec7c4c41438b50c0c287852fa3312">00792</a> <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a> VCL::recordType(<span class="keyword">const</span> vector&lt;string&gt;&amp; fields,
<a name="l00793"></a>00793          <span class="keyword">const</span> vector&lt;Type&gt;&amp; types)
<a name="l00794"></a>00794 {
<a name="l00795"></a>00795   <a class="code" href="debug_8h.html#a40dac3bdb2166ffc852ee8b1489d2b56">DebugAssert</a>(fields.size() == types.size(),
<a name="l00796"></a>00796         <span class="stringliteral">&quot;VCL::recordType: number of fields is different \n&quot;</span>
<a name="l00797"></a>00797         <span class="stringliteral">&quot;from the number of types&quot;</span>);
<a name="l00798"></a>00798   <span class="comment">// Create copies of the vectors to sort them</span>
<a name="l00799"></a>00799   vector&lt;string&gt; fs(fields);
<a name="l00800"></a>00800   vector&lt;Type&gt; ts(types);
<a name="l00801"></a>00801   <a class="code" href="namespaceCVC3.html#ab21ee900e0b3494b1b8c26005436a5a4" title="Sort two vectors based on the first vector.">sort2</a>(fs, ts);
<a name="l00802"></a>00802   <span class="keywordflow">return</span> <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a>(d_theoryRecords-&gt;recordType(fs, ts));
<a name="l00803"></a>00803 }
<a name="l00804"></a>00804 
<a name="l00805"></a>00805 
<a name="l00806"></a><a class="code" href="classCVC3_1_1VCL.html#a0e4c14571fa8b5e85654e8a4c5cdeff3">00806</a> <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a> VCL::dataType(<span class="keyword">const</span> <span class="keywordtype">string</span>&amp; name,
<a name="l00807"></a>00807                    <span class="keyword">const</span> <span class="keywordtype">string</span>&amp; constructor,
<a name="l00808"></a>00808                    <span class="keyword">const</span> vector&lt;string&gt;&amp; selectors, <span class="keyword">const</span> vector&lt;Expr&gt;&amp; types)
<a name="l00809"></a>00809 {
<a name="l00810"></a>00810   vector&lt;string&gt; constructors;
<a name="l00811"></a>00811   constructors.push_back(constructor);
<a name="l00812"></a>00812 
<a name="l00813"></a>00813   vector&lt;vector&lt;string&gt; &gt; selectorsVec;
<a name="l00814"></a>00814   selectorsVec.push_back(selectors);
<a name="l00815"></a>00815 
<a name="l00816"></a>00816   vector&lt;vector&lt;Expr&gt; &gt; typesVec;
<a name="l00817"></a>00817   typesVec.push_back(types);
<a name="l00818"></a>00818 
<a name="l00819"></a>00819   <span class="keywordflow">return</span> dataType(name, constructors, selectorsVec, typesVec);
<a name="l00820"></a>00820 }
<a name="l00821"></a>00821 
<a name="l00822"></a>00822 
<a name="l00823"></a><a class="code" href="classCVC3_1_1VCL.html#adeb6c1750f63ed133f8da731fcd0a870">00823</a> <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a> VCL::dataType(<span class="keyword">const</span> <span class="keywordtype">string</span>&amp; name,
<a name="l00824"></a>00824                    <span class="keyword">const</span> vector&lt;string&gt;&amp; constructors,
<a name="l00825"></a>00825                    <span class="keyword">const</span> vector&lt;vector&lt;string&gt; &gt;&amp; selectors,
<a name="l00826"></a>00826                    <span class="keyword">const</span> vector&lt;vector&lt;Expr&gt; &gt;&amp; types)
<a name="l00827"></a>00827 {
<a name="l00828"></a>00828   <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> res = d_theoryDatatype-&gt;dataType(name, constructors, selectors, types);
<a name="l00829"></a>00829   <span class="keywordflow">if</span>(d_dump) {
<a name="l00830"></a>00830     d_translator-&gt;dump(res);
<a name="l00831"></a>00831   }
<a name="l00832"></a>00832   <span class="keywordflow">return</span> <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a>(res[0]);
<a name="l00833"></a>00833 }
<a name="l00834"></a>00834 
<a name="l00835"></a>00835 
<a name="l00836"></a><a class="code" href="classCVC3_1_1VCL.html#ae65bc001e859cb1bb90093335767a12c">00836</a> <span class="keywordtype">void</span> VCL::dataType(<span class="keyword">const</span> vector&lt;string&gt;&amp; names,
<a name="l00837"></a>00837                    <span class="keyword">const</span> vector&lt;vector&lt;string&gt; &gt;&amp; constructors,
<a name="l00838"></a>00838                    <span class="keyword">const</span> vector&lt;vector&lt;vector&lt;string&gt; &gt; &gt;&amp; selectors,
<a name="l00839"></a>00839                    <span class="keyword">const</span> vector&lt;vector&lt;vector&lt;Expr&gt; &gt; &gt;&amp; types,
<a name="l00840"></a>00840                    vector&lt;Type&gt;&amp; returnTypes)
<a name="l00841"></a>00841 {
<a name="l00842"></a>00842   <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> res = d_theoryDatatype-&gt;dataType(names, constructors, selectors, types);
<a name="l00843"></a>00843   <span class="keywordflow">if</span>(d_dump) {
<a name="l00844"></a>00844     d_translator-&gt;dump(res);
<a name="l00845"></a>00845   }
<a name="l00846"></a>00846   <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; res.<a class="code" href="group__ExprPkg.html#ga28b901d05e52a5c646f83a95cc74f94b">arity</a>(); ++i) {
<a name="l00847"></a>00847     returnTypes.push_back(<a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a>(res[i]));
<a name="l00848"></a>00848   }
<a name="l00849"></a>00849 }
<a name="l00850"></a>00850 
<a name="l00851"></a>00851 
<a name="l00852"></a><a class="code" href="classCVC3_1_1VCL.html#a1b3d360dba2a71284d04c7b1465ca757">00852</a> <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a> <a class="code" href="namespaceCVC3.html#a587d33ff63396be21a99bf4d744b2b98">VCL::arrayType</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a>&amp; typeIndex, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a>&amp; typeData)
<a name="l00853"></a>00853 {
<a name="l00854"></a>00854   <a class="code" href="namespaceCVC3.html#a587d33ff63396be21a99bf4d744b2b98">return ::arrayType</a>(typeIndex, typeData);
<a name="l00855"></a>00855 }
<a name="l00856"></a>00856 
<a name="l00857"></a>00857 
<a name="l00858"></a><a class="code" href="classCVC3_1_1VCL.html#a36b8bf3bc3abab2decfa04faee15f4fb">00858</a> <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a> VCL::bitvecType(<span class="keywordtype">int</span> n)
<a name="l00859"></a>00859 {
<a name="l00860"></a>00860   <span class="keywordflow">return</span> d_theoryBitvector-&gt;newBitvectorType(n);
<a name="l00861"></a>00861 }
<a name="l00862"></a>00862 
<a name="l00863"></a>00863 
<a name="l00864"></a><a class="code" href="classCVC3_1_1VCL.html#a574fecab80d464a244d391312d2ab898">00864</a> <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a> VCL::funType(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a>&amp; typeDom, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a>&amp; typeRan)
<a name="l00865"></a>00865 {
<a name="l00866"></a>00866   <span class="keywordflow">return</span> typeDom.<a class="code" href="classCVC3_1_1Type.html#a3ebf8a1ba9d894c33df064ea37c5ead5">funType</a>(typeRan);
<a name="l00867"></a>00867 }
<a name="l00868"></a>00868 
<a name="l00869"></a>00869 
<a name="l00870"></a><a class="code" href="classCVC3_1_1VCL.html#adcc7672eceaadf25f03cf8f74b036724">00870</a> <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a> VCL::funType(<span class="keyword">const</span> vector&lt;Type&gt;&amp; typeDom, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a>&amp; typeRan) {
<a name="l00871"></a>00871   <a class="code" href="debug_8h.html#a40dac3bdb2166ffc852ee8b1489d2b56">DebugAssert</a>(typeDom.size() &gt;= 1, <span class="stringliteral">&quot;VCL::funType: missing domain types&quot;</span>);
<a name="l00872"></a>00872   <span class="keywordflow">return</span> Type::funType(typeDom, typeRan);
<a name="l00873"></a>00873 }
<a name="l00874"></a>00874 
<a name="l00875"></a>00875 
<a name="l00876"></a><a class="code" href="classCVC3_1_1VCL.html#a9f16ab34b0b1f7e5dfe17390dd72c39f">00876</a> <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a> VCL::createType(<span class="keyword">const</span> <span class="keywordtype">string</span>&amp; typeName)
<a name="l00877"></a>00877 {
<a name="l00878"></a>00878   <span class="keywordflow">if</span>(d_dump) {
<a name="l00879"></a>00879     d_translator-&gt;dump(<a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>(<a class="code" href="kinds_8h.html#aa10c9e8951b8ccf714a59ec321bdac5bab47ea8bb955afd0adc0ef98517dd6084">TYPE</a>, listExpr(idExpr(typeName))));
<a name="l00880"></a>00880   }
<a name="l00881"></a>00881   <span class="keywordflow">return</span> d_theoryCore-&gt;newTypeExpr(typeName);
<a name="l00882"></a>00882 }
<a name="l00883"></a>00883 
<a name="l00884"></a>00884 
<a name="l00885"></a><a class="code" href="classCVC3_1_1VCL.html#a6fefe58ed7b305b789f5c8cc45e99a04">00885</a> <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a> VCL::createType(<span class="keyword">const</span> <span class="keywordtype">string</span>&amp; typeName, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a>&amp; def)
<a name="l00886"></a>00886 {
<a name="l00887"></a>00887   <span class="keywordflow">if</span> (d_dump) {
<a name="l00888"></a>00888     d_translator-&gt;dump(<a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>(<a class="code" href="kinds_8h.html#aa10c9e8951b8ccf714a59ec321bdac5bab47ea8bb955afd0adc0ef98517dd6084">TYPE</a>, idExpr(typeName), def.<a class="code" href="classCVC3_1_1Type.html#a0bc1eebf8dbd9d2880e1f18d7804e5c2">getExpr</a>()), <span class="keyword">true</span>);
<a name="l00889"></a>00889   }
<a name="l00890"></a>00890   <span class="keywordflow">return</span> d_theoryCore-&gt;newTypeExpr(typeName, def);
<a name="l00891"></a>00891 }
<a name="l00892"></a>00892 
<a name="l00893"></a>00893 
<a name="l00894"></a><a class="code" href="classCVC3_1_1VCL.html#a90fd1c2ef6f64c534916b905e4b4e802">00894</a> <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a> VCL::lookupType(<span class="keyword">const</span> <span class="keywordtype">string</span>&amp; typeName)
<a name="l00895"></a>00895 {
<a name="l00896"></a>00896   <span class="keywordflow">return</span> d_theoryCore-&gt;lookupTypeExpr(typeName);
<a name="l00897"></a>00897 }
<a name="l00898"></a>00898 
<a name="l00899"></a>00899 
<a name="l00900"></a><a class="code" href="classCVC3_1_1VCL.html#a434b487f2d0aaf3a2bfcd86716cfa566">00900</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::varExpr(<span class="keyword">const</span> <span class="keywordtype">string</span>&amp; name, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a>&amp; type)
<a name="l00901"></a>00901 {
<a name="l00902"></a>00902   <span class="comment">// Check if the ofstream is open (as opposed to the command line flag)</span>
<a name="l00903"></a>00903   <span class="keywordflow">if</span>(d_dump) {
<a name="l00904"></a>00904     d_translator-&gt;dump(<a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>(<a class="code" href="kinds_8h.html#aa10c9e8951b8ccf714a59ec321bdac5ba3d044162d972156d897cea80f216b9ca">CONST</a>, idExpr(name), type.<a class="code" href="classCVC3_1_1Type.html#a0bc1eebf8dbd9d2880e1f18d7804e5c2">getExpr</a>()));
<a name="l00905"></a>00905   }
<a name="l00906"></a>00906   <span class="keywordflow">return</span> d_theoryCore-&gt;newVar(name, type);
<a name="l00907"></a>00907 }
<a name="l00908"></a>00908 
<a name="l00909"></a>00909 
<a name="l00910"></a><a class="code" href="classCVC3_1_1VCL.html#ae3dc0d1d7ab4c060d79f90ce683f6613">00910</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::varExpr(<span class="keyword">const</span> <span class="keywordtype">string</span>&amp; name, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a>&amp; type, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; def)
<a name="l00911"></a>00911 {
<a name="l00912"></a>00912   <span class="comment">// Check if the ofstream is open (as opposed to the command line flag)</span>
<a name="l00913"></a>00913   <span class="keywordflow">if</span>(d_dump) {
<a name="l00914"></a>00914     d_translator-&gt;dump(<a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>(<a class="code" href="kinds_8h.html#aa10c9e8951b8ccf714a59ec321bdac5ba3d044162d972156d897cea80f216b9ca">CONST</a>, idExpr(name), type.<a class="code" href="classCVC3_1_1Type.html#a0bc1eebf8dbd9d2880e1f18d7804e5c2">getExpr</a>(), def), <span class="keyword">true</span>);
<a name="l00915"></a>00915   }
<a name="l00916"></a>00916   <span class="comment">// Prove the TCCs of the definition</span>
<a name="l00917"></a>00917   <span class="keywordflow">if</span>(getFlags()[<span class="stringliteral">&quot;tcc&quot;</span>].getBool()) {
<a name="l00918"></a>00918     <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a> tpDef(def.<a class="code" href="group__ExprPkg.html#ga42929221eb172250697b72c28af6de07" title="Get the type. Recursively compute if necessary.">getType</a>()), tpVar(type);
<a name="l00919"></a>00919     <span class="comment">// Make sure that def is in the subtype of tpVar; that is, prove</span>
<a name="l00920"></a>00920     <span class="comment">// FORALL (x: tpDef): x = def =&gt; typePred(tpVar)(x)</span>
<a name="l00921"></a>00921     <span class="keywordflow">if</span>(tpDef != tpVar) {
<a name="l00922"></a>00922       <span class="comment">// Typecheck the base types</span>
<a name="l00923"></a>00923       <span class="keywordflow">if</span>(getBaseType(tpDef) != getBaseType(type)) {
<a name="l00924"></a>00924   <span class="keywordflow">throw</span> <a class="code" href="classCVC3_1_1TypecheckException.html">TypecheckException</a>(<span class="stringliteral">&quot;Type mismatch in constant definition:\n&quot;</span>
<a name="l00925"></a>00925          <span class="stringliteral">&quot;Constant &quot;</span>+name+
<a name="l00926"></a>00926          <span class="stringliteral">&quot; is declared with type:\n  &quot;</span>
<a name="l00927"></a>00927          +type.<a class="code" href="classCVC3_1_1Type.html#a2f5ce4b1973ec02b2f2b2eba8ce3cc50">toString</a>()
<a name="l00928"></a>00928          +<span class="stringliteral">&quot;\nBut the type of definition is\n  &quot;</span>
<a name="l00929"></a>00929          +tpDef.<a class="code" href="classCVC3_1_1Type.html#a2f5ce4b1973ec02b2f2b2eba8ce3cc50">toString</a>());
<a name="l00930"></a>00930       }
<a name="l00931"></a>00931       <a class="code" href="kinds_8h.html#aa10c9e8951b8ccf714a59ec321bdac5ba7fa27e82c6c4f69434225ed81e5d151e">TRACE</a>(<span class="stringliteral">&quot;tccs&quot;</span>, <span class="stringliteral">&quot;CONST def: &quot;</span>+name+<span class="stringliteral">&quot; : &quot;</span>+tpVar.toString()
<a name="l00932"></a>00932       +<span class="stringliteral">&quot; := &lt;value&gt; : &quot;</span>, tpDef, <span class="stringliteral">&quot;;&quot;</span>);
<a name="l00933"></a>00933       vector&lt;Expr&gt; boundVars;
<a name="l00934"></a>00934       boundVars.push_back(boundVarExpr(name, <span class="stringliteral">&quot;tcc&quot;</span>, tpDef));
<a name="l00935"></a>00935       <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> body(boundVars[0].eqExpr(def).impExpr(getTypePred(tpVar, boundVars[0])));
<a name="l00936"></a>00936       <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> quant(forallExpr(boundVars, body));
<a name="l00937"></a>00937       <span class="keywordflow">try</span> {
<a name="l00938"></a>00938         checkTCC(quant);
<a name="l00939"></a>00939       } <span class="keywordflow">catch</span>(<a class="code" href="classCVC3_1_1TypecheckException.html">TypecheckException</a>&amp;) {
<a name="l00940"></a>00940   <span class="keywordflow">throw</span> <a class="code" href="classCVC3_1_1TypecheckException.html">TypecheckException</a>
<a name="l00941"></a>00941     (<span class="stringliteral">&quot;Type mismatch in constant definition:\n&quot;</span>
<a name="l00942"></a>00942      <span class="stringliteral">&quot;Constant &quot;</span>+name+
<a name="l00943"></a>00943      <span class="stringliteral">&quot; is declared with type:\n  &quot;</span>
<a name="l00944"></a>00944      +type.<a class="code" href="classCVC3_1_1Type.html#a2f5ce4b1973ec02b2f2b2eba8ce3cc50">toString</a>()
<a name="l00945"></a>00945      +<span class="stringliteral">&quot;\nBut the type of definition is\n  &quot;</span>
<a name="l00946"></a>00946      +def.<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="l00947"></a>00947      +<span class="stringliteral">&quot;\n\n which is not a subtype of the constant&quot;</span>);
<a name="l00948"></a>00948       }
<a name="l00949"></a>00949     }
<a name="l00950"></a>00950   }
<a name="l00951"></a>00951   <span class="keywordflow">return</span> d_theoryCore-&gt;newVar(name, type, def);
<a name="l00952"></a>00952 }
<a name="l00953"></a>00953 
<a name="l00954"></a>00954 
<a name="l00955"></a><a class="code" href="classCVC3_1_1VCL.html#a23460fae006d9ef030f8908ab732b0ef">00955</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::lookupVar(<span class="keyword">const</span> <span class="keywordtype">string</span>&amp; name, <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a>* type)
<a name="l00956"></a>00956 {
<a name="l00957"></a>00957   <span class="keywordflow">return</span> d_theoryCore-&gt;lookupVar(name, type);
<a name="l00958"></a>00958 }
<a name="l00959"></a>00959 
<a name="l00960"></a>00960 
<a name="l00961"></a><a class="code" href="classCVC3_1_1VCL.html#a59c9d442ef836e4aea70dda513b8a29d">00961</a> <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a> VCL::getType(<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="l00962"></a>00962 {
<a name="l00963"></a>00963   <span class="keywordflow">return</span> e.<a class="code" href="group__ExprPkg.html#ga42929221eb172250697b72c28af6de07" title="Get the type. Recursively compute if necessary.">getType</a>();
<a name="l00964"></a>00964 }
<a name="l00965"></a>00965 
<a name="l00966"></a>00966 
<a name="l00967"></a><a class="code" href="classCVC3_1_1VCL.html#afb33aac5733ec0c5d186388b55d8d1f1">00967</a> <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a> VCL::getBaseType(<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="l00968"></a>00968 {
<a name="l00969"></a>00969   <span class="keywordflow">return</span> d_theoryCore-&gt;getBaseType(e);
<a name="l00970"></a>00970 }
<a name="l00971"></a>00971 
<a name="l00972"></a>00972 
<a name="l00973"></a><a class="code" href="classCVC3_1_1VCL.html#a523146e4e023cbb4110f9906e96ce861">00973</a> <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a> VCL::getBaseType(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a>&amp; t)
<a name="l00974"></a>00974 {
<a name="l00975"></a>00975   <span class="keywordflow">return</span> d_theoryCore-&gt;getBaseType(t);
<a name="l00976"></a>00976 }
<a name="l00977"></a>00977 
<a name="l00978"></a>00978 
<a name="l00979"></a><a class="code" href="classCVC3_1_1VCL.html#ae55b1e91aca97e231cf5288c7257998f">00979</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::getTypePred(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a>&amp;t, <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="l00980"></a>00980 {
<a name="l00981"></a>00981   <span class="keywordflow">return</span> d_theoryCore-&gt;getTypePred(t, e);
<a name="l00982"></a>00982 }
<a name="l00983"></a>00983 
<a name="l00984"></a>00984 
<a name="l00985"></a><a class="code" href="classCVC3_1_1VCL.html#a2598c55b4d6b4cac912ff4e2f46239dc">00985</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::stringExpr(<span class="keyword">const</span> <span class="keywordtype">string</span>&amp; str) {
<a name="l00986"></a>00986   <span class="keywordflow">return</span> getEM()-&gt;newStringExpr(str);
<a name="l00987"></a>00987 }
<a name="l00988"></a>00988 
<a name="l00989"></a>00989 
<a name="l00990"></a><a class="code" href="classCVC3_1_1VCL.html#a13142479360bbf0154be61ce7620f226">00990</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::idExpr(<span class="keyword">const</span> <span class="keywordtype">string</span>&amp; name) {
<a name="l00991"></a>00991   <span class="keywordflow">return</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>(<a class="code" href="kinds_8h.html#aa10c9e8951b8ccf714a59ec321bdac5ba001479a58fb44c39a29b20d565081a68" title="Identifier is (ID (STRING_EXPR &quot;name&quot;))">ID</a>, stringExpr(name));
<a name="l00992"></a>00992 }
<a name="l00993"></a>00993 
<a name="l00994"></a>00994 
<a name="l00995"></a><a class="code" href="classCVC3_1_1VCL.html#a92cd091e843eafa303aa1fe8cbe0f881">00995</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::listExpr(<span class="keyword">const</span> vector&lt;Expr&gt;&amp; kids) {
<a name="l00996"></a>00996   <span class="keywordflow">return</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>(<a class="code" href="kinds_8h.html#aa10c9e8951b8ccf714a59ec321bdac5ba60238049e233c8d68fc58e4d5ceb55e2">RAW_LIST</a>, kids, getEM());
<a name="l00997"></a>00997 }
<a name="l00998"></a>00998 
<a name="l00999"></a>00999 
<a name="l01000"></a><a class="code" href="classCVC3_1_1VCL.html#a72ddc8e798ad18dc3db168e5029b13e1">01000</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::listExpr(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e1) {
<a name="l01001"></a>01001   <span class="keywordflow">return</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>(<a class="code" href="kinds_8h.html#aa10c9e8951b8ccf714a59ec321bdac5ba60238049e233c8d68fc58e4d5ceb55e2">RAW_LIST</a>, e1);
<a name="l01002"></a>01002 }
<a name="l01003"></a>01003 
<a name="l01004"></a>01004 
<a name="l01005"></a><a class="code" href="classCVC3_1_1VCL.html#a930389cb9570297308eb5959f9e8442d">01005</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::listExpr(<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="l01006"></a>01006   <span class="keywordflow">return</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>(<a class="code" href="kinds_8h.html#aa10c9e8951b8ccf714a59ec321bdac5ba60238049e233c8d68fc58e4d5ceb55e2">RAW_LIST</a>, e1, e2);
<a name="l01007"></a>01007 }
<a name="l01008"></a>01008 
<a name="l01009"></a>01009 
<a name="l01010"></a><a class="code" href="classCVC3_1_1VCL.html#a9c1a8c014d62d307d0ecb68eda14e030">01010</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::listExpr(<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, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e3) {
<a name="l01011"></a>01011   <span class="keywordflow">return</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>(<a class="code" href="kinds_8h.html#aa10c9e8951b8ccf714a59ec321bdac5ba60238049e233c8d68fc58e4d5ceb55e2">RAW_LIST</a>, e1, e2, e3);
<a name="l01012"></a>01012 }
<a name="l01013"></a>01013 
<a name="l01014"></a>01014 
<a name="l01015"></a><a class="code" href="classCVC3_1_1VCL.html#adee40e9cf75ecf2fd7f6e06f04fb4761">01015</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::listExpr(<span class="keyword">const</span> <span class="keywordtype">string</span>&amp; op, <span class="keyword">const</span> vector&lt;Expr&gt;&amp; kids) {
<a name="l01016"></a>01016   vector&lt;Expr&gt; newKids;
<a name="l01017"></a>01017   newKids.push_back(idExpr(op));
<a name="l01018"></a>01018   newKids.insert(newKids.end(), kids.begin(), kids.end());
<a name="l01019"></a>01019   <span class="keywordflow">return</span> listExpr(newKids);
<a name="l01020"></a>01020 }
<a name="l01021"></a>01021 
<a name="l01022"></a>01022 
<a name="l01023"></a><a class="code" href="classCVC3_1_1VCL.html#a113b6106484ceb0f0716603f21c906de">01023</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::listExpr(<span class="keyword">const</span> <span class="keywordtype">string</span>&amp; op, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e1) {
<a name="l01024"></a>01024   <span class="keywordflow">return</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>(<a class="code" href="kinds_8h.html#aa10c9e8951b8ccf714a59ec321bdac5ba60238049e233c8d68fc58e4d5ceb55e2">RAW_LIST</a>, idExpr(op), e1);
<a name="l01025"></a>01025 }
<a name="l01026"></a>01026 
<a name="l01027"></a>01027 
<a name="l01028"></a><a class="code" href="classCVC3_1_1VCL.html#a0d491e327498b82725891b5ea9a5928c">01028</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::listExpr(<span class="keyword">const</span> <span class="keywordtype">string</span>&amp; op, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e1,
<a name="l01029"></a>01029        <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="l01030"></a>01030   <span class="keywordflow">return</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>(<a class="code" href="kinds_8h.html#aa10c9e8951b8ccf714a59ec321bdac5ba60238049e233c8d68fc58e4d5ceb55e2">RAW_LIST</a>, idExpr(op), e1, e2);
<a name="l01031"></a>01031 }
<a name="l01032"></a>01032 
<a name="l01033"></a>01033 
<a name="l01034"></a><a class="code" href="classCVC3_1_1VCL.html#a00eff8291d17fa253566e48325bf3b7c">01034</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::listExpr(<span class="keyword">const</span> <span class="keywordtype">string</span>&amp; op, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e1,
<a name="l01035"></a>01035        <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e2, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e3) {
<a name="l01036"></a>01036   vector&lt;Expr&gt; kids;
<a name="l01037"></a>01037   kids.push_back(idExpr(op));
<a name="l01038"></a>01038   kids.push_back(e1);
<a name="l01039"></a>01039   kids.push_back(e2);
<a name="l01040"></a>01040   kids.push_back(e3);
<a name="l01041"></a>01041   <span class="keywordflow">return</span> listExpr(kids);
<a name="l01042"></a>01042 }
<a name="l01043"></a>01043 
<a name="l01044"></a>01044 
<a name="l01045"></a><a class="code" href="classCVC3_1_1VCL.html#a12f292f435d36c466292267e9f6425e5">01045</a> <span class="keywordtype">void</span> VCL::printExpr(<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="l01046"></a>01046   printExpr(e, cout);
<a name="l01047"></a>01047 }
<a name="l01048"></a>01048 
<a name="l01049"></a>01049 
<a name="l01050"></a><a class="code" href="classCVC3_1_1VCL.html#ab02f9ebeef419f59aa94fc19842f26e0">01050</a> <span class="keywordtype">void</span> VCL::printExpr(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e, ostream&amp; os) {
<a name="l01051"></a>01051   os &lt;&lt; e &lt;&lt; <a class="code" href="group__ExprStream__Manip.html#ga05b0ea7353ec24fa8e7e272d7a7875d8" title="Print the end-of-line.">endl</a>;
<a name="l01052"></a>01052 }
<a name="l01053"></a>01053 
<a name="l01054"></a>01054 
<a name="l01055"></a><a class="code" href="classCVC3_1_1VCL.html#a52fb774eea4d48077d8c95f4e1d124d1">01055</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::parseExpr(<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="l01056"></a>01056   <span class="keywordflow">return</span> d_theoryCore-&gt;parseExprTop(e);
<a name="l01057"></a>01057 }
<a name="l01058"></a>01058 
<a name="l01059"></a>01059 
<a name="l01060"></a><a class="code" href="classCVC3_1_1VCL.html#ae56f7fe27f179fbaa01299e3c91a74cf">01060</a> <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a> VCL::parseType(<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="l01061"></a>01061   <span class="keywordflow">return</span> <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a>(d_theoryCore-&gt;parseExpr(e));
<a name="l01062"></a>01062 }
<a name="l01063"></a>01063 
<a name="l01064"></a>01064 
<a name="l01065"></a><a class="code" href="classCVC3_1_1VCL.html#a91662cae6c452f3d342face36e9eab77">01065</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::importExpr(<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="l01066"></a>01066 {
<a name="l01067"></a>01067   <span class="keywordflow">return</span> d_em-&gt;<a class="code" href="group__ExprPkg.html#ga3df149427d124797567614e07080519d" title="Create a Boolean variable out of the expression.">rebuild</a>(e);
<a name="l01068"></a>01068 }
<a name="l01069"></a>01069 
<a name="l01070"></a>01070 
<a name="l01071"></a><a class="code" href="classCVC3_1_1VCL.html#a827601ba5a9150c94e8ae3c1ac67839b">01071</a> <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a> VCL::importType(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a>&amp; t)
<a name="l01072"></a>01072 {
<a name="l01073"></a>01073   <span class="keywordflow">return</span> <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a>(d_em-&gt;rebuild(t.<a class="code" href="classCVC3_1_1Type.html#a0bc1eebf8dbd9d2880e1f18d7804e5c2">getExpr</a>()));
<a name="l01074"></a>01074 }
<a name="l01075"></a>01075 
<a name="l01076"></a><a class="code" href="classCVC3_1_1VCL.html#aab6dff108d0fe7154e4fe1d6573f7d7e">01076</a> <span class="keywordtype">void</span> VCL::cmdsFromString(<span class="keyword">const</span> std::string&amp; s, <a class="code" href="namespaceCVC3.html#a3aaaf7bc1fc47a4860ef6e59ddb0db0e" title="Different input languages.">InputLanguage</a> lang=<a class="code" href="namespaceCVC3.html#a3aaaf7bc1fc47a4860ef6e59ddb0db0eaa315c228d5c3290ce37df81524ed8e9a" title="Nice SAL-like language for manually written specs.">PRESENTATION_LANG</a>)
<a name="l01077"></a>01077 {
<a name="l01078"></a>01078   stringstream ss(s,stringstream::in);
<a name="l01079"></a>01079   <span class="keywordflow">return</span> loadFile(ss,lang,<span class="keyword">false</span>);
<a name="l01080"></a>01080 }
<a name="l01081"></a>01081 
<a name="l01082"></a><a class="code" href="classCVC3_1_1VCL.html#a15bb1224861f7a92d4ab9fe6b6fff0f0">01082</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::exprFromString(<span class="keyword">const</span> std::string&amp; s)
<a name="l01083"></a>01083 {
<a name="l01084"></a>01084   stringstream ss(<span class="stringliteral">&quot;PRINT &quot;</span> + s + <span class="stringliteral">&quot;;&quot;</span>,stringstream::in);
<a name="l01085"></a>01085   <a class="code" href="classCVC3_1_1Parser.html">Parser</a> p(<span class="keyword">this</span>,d_translator,<a class="code" href="namespaceCVC3.html#a3aaaf7bc1fc47a4860ef6e59ddb0db0eaa315c228d5c3290ce37df81524ed8e9a" title="Nice SAL-like language for manually written specs.">PRESENTATION_LANG</a>,ss);
<a name="l01086"></a>01086   <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> e = p.<a class="code" href="classCVC3_1_1Parser.html#a85eb8f5faba18ee392023d93ac6cc401">next</a>();
<a name="l01087"></a>01087   <span class="keywordflow">if</span>( e.<a class="code" href="group__ExprPkg.html#ga0265d1ca42fa59c95aaff3ca675b6504">isNull</a>() ) {
<a name="l01088"></a>01088     <span class="keywordflow">throw</span> <a class="code" href="classCVC3_1_1ParserException.html">ParserException</a>(<span class="stringliteral">&quot;Parser result is null: &#39;&quot;</span> + s + <span class="stringliteral">&quot;&#39;&quot;</span>);
<a name="l01089"></a>01089   }
<a name="l01090"></a>01090   <a class="code" href="debug_8h.html#a40dac3bdb2166ffc852ee8b1489d2b56">DebugAssert</a>(e.<a class="code" href="group__ExprPkg.html#ga7814e4f55f65c7ca860c637413df5f4d">getKind</a>() == <a class="code" href="kinds_8h.html#aa10c9e8951b8ccf714a59ec321bdac5ba60238049e233c8d68fc58e4d5ceb55e2">RAW_LIST</a>, <span class="stringliteral">&quot;Expected list expression&quot;</span>);
<a name="l01091"></a>01091   <a class="code" href="debug_8h.html#a40dac3bdb2166ffc852ee8b1489d2b56">DebugAssert</a>(e.<a class="code" href="group__ExprPkg.html#ga28b901d05e52a5c646f83a95cc74f94b">arity</a>() == 2, <span class="stringliteral">&quot;Expected two children&quot;</span>);
<a name="l01092"></a>01092   <span class="keywordflow">return</span> parseExpr(e[1]);
<a name="l01093"></a>01093 }
<a name="l01094"></a>01094 
<a name="l01095"></a><a class="code" href="classCVC3_1_1VCL.html#a779d3811f66b5cf54b679e8a708bc292">01095</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::trueExpr()
<a name="l01096"></a>01096 {
<a name="l01097"></a>01097   <span class="keywordflow">return</span> d_em-&gt;trueExpr();
<a name="l01098"></a>01098 }
<a name="l01099"></a>01099 
<a name="l01100"></a>01100 
<a name="l01101"></a><a class="code" href="classCVC3_1_1VCL.html#a87be808345d6e2ee8015443c0cdd129a">01101</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::falseExpr()
<a name="l01102"></a>01102 {
<a name="l01103"></a>01103   <span class="keywordflow">return</span> d_em-&gt;falseExpr();
<a name="l01104"></a>01104 }
<a name="l01105"></a>01105 
<a name="l01106"></a>01106 
<a name="l01107"></a><a class="code" href="classCVC3_1_1VCL.html#a0e605dfe1b15e52663073f05c44a2fd6">01107</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::notExpr(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; child)
<a name="l01108"></a>01108 {
<a name="l01109"></a>01109   <span class="keywordflow">return</span> !child;
<a name="l01110"></a>01110 }
<a name="l01111"></a>01111 
<a name="l01112"></a>01112 
<a name="l01113"></a><a class="code" href="classCVC3_1_1VCL.html#a6e5209f607aaaaeedbdc69e56afd13b3">01113</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> <a class="code" href="namespaceCVC3.html#ad4258158bba138eb54b9080af7f8223a">VCL::andExpr</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; <a class="code" href="namespaceMiniSat.html#ad93cb56673487974071ed3b75bf4ea83">left</a>, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; <a class="code" href="namespaceMiniSat.html#a82558b7a36c52f5d3211d5d14bed99d4">right</a>)
<a name="l01114"></a>01114 {
<a name="l01115"></a>01115   <span class="keywordflow">return</span> left &amp;&amp; <a class="code" href="namespaceMiniSat.html#a82558b7a36c52f5d3211d5d14bed99d4">right</a>;
<a name="l01116"></a>01116 }
<a name="l01117"></a>01117 
<a name="l01118"></a>01118 
<a name="l01119"></a><a class="code" href="classCVC3_1_1VCL.html#a8467914594e6a5346398bb46a82bb310">01119</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> <a class="code" href="namespaceCVC3.html#ad4258158bba138eb54b9080af7f8223a">VCL::andExpr</a>(<span class="keyword">const</span> vector&lt;Expr&gt;&amp; children)
<a name="l01120"></a>01120 {
<a name="l01121"></a>01121   <span class="keywordflow">if</span> (children.size() == 0)
<a name="l01122"></a>01122     <span class="keywordflow">throw</span> <a class="code" href="classCVC3_1_1Exception.html">Exception</a>(<span class="stringliteral">&quot;andExpr requires at least one child&quot;</span>);
<a name="l01123"></a>01123   <span class="keywordflow">return</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>(<a class="code" href="kinds_8h.html#aa10c9e8951b8ccf714a59ec321bdac5ba865555c9f2e0458a7078486aa1b3254f">AND</a>, children);
<a name="l01124"></a>01124 }
<a name="l01125"></a>01125 
<a name="l01126"></a>01126 
<a name="l01127"></a><a class="code" href="classCVC3_1_1VCL.html#a000ff901b570233b669fb61786f81827">01127</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> <a class="code" href="namespaceCVC3.html#a30f30b6e20c174f21ae63acea8618294">VCL::orExpr</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; <a class="code" href="namespaceMiniSat.html#ad93cb56673487974071ed3b75bf4ea83">left</a>, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; <a class="code" href="namespaceMiniSat.html#a82558b7a36c52f5d3211d5d14bed99d4">right</a>)
<a name="l01128"></a>01128 {
<a name="l01129"></a>01129   <span class="keywordflow">return</span> left || <a class="code" href="namespaceMiniSat.html#a82558b7a36c52f5d3211d5d14bed99d4">right</a>;
<a name="l01130"></a>01130 }
<a name="l01131"></a>01131 
<a name="l01132"></a>01132 
<a name="l01133"></a><a class="code" href="classCVC3_1_1VCL.html#ad3ac4c516a060c3fa03a4cd52506e4b3">01133</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> <a class="code" href="namespaceCVC3.html#a30f30b6e20c174f21ae63acea8618294">VCL::orExpr</a>(<span class="keyword">const</span> vector&lt;Expr&gt;&amp; children)
<a name="l01134"></a>01134 {
<a name="l01135"></a>01135   <span class="keywordflow">if</span> (children.size() == 0)
<a name="l01136"></a>01136     <span class="keywordflow">throw</span> <a class="code" href="classCVC3_1_1Exception.html">Exception</a>(<span class="stringliteral">&quot;orExpr requires at least one child&quot;</span>);
<a name="l01137"></a>01137   <span class="keywordflow">return</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>(<a class="code" href="kinds_8h.html#aa10c9e8951b8ccf714a59ec321bdac5ba96727447c0ad447987df1c6415aef074">OR</a>, children);
<a name="l01138"></a>01138 }
<a name="l01139"></a>01139 
<a name="l01140"></a>01140 
<a name="l01141"></a><a class="code" href="classCVC3_1_1VCL.html#a633fc9e011f529f0992d604ea4b66b9b">01141</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::impliesExpr(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; hyp, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; conc)
<a name="l01142"></a>01142 {
<a name="l01143"></a>01143   <span class="keywordflow">return</span> hyp.<a class="code" href="group__ExprPkg.html#ga8dd97bcdeb9d8870238f94a263fd083b">impExpr</a>(conc);
<a name="l01144"></a>01144 }
<a name="l01145"></a>01145 
<a name="l01146"></a>01146 
<a name="l01147"></a><a class="code" href="classCVC3_1_1VCL.html#a67da7d1d56277df0d30c031565a04aa4">01147</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::iffExpr(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; <a class="code" href="namespaceMiniSat.html#ad93cb56673487974071ed3b75bf4ea83">left</a>, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; <a class="code" href="namespaceMiniSat.html#a82558b7a36c52f5d3211d5d14bed99d4">right</a>)
<a name="l01148"></a>01148 {
<a name="l01149"></a>01149   <span class="keywordflow">return</span> left.<a class="code" href="group__ExprPkg.html#gaae017ca8e68af655ba285c985dd9fba5">iffExpr</a>(right);
<a name="l01150"></a>01150 }
<a name="l01151"></a>01151 
<a name="l01152"></a>01152 
<a name="l01153"></a><a class="code" href="classCVC3_1_1VCL.html#a4f17e52a13206ce3ad8c5d86cd9de037">01153</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::eqExpr(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; child0, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; child1)
<a name="l01154"></a>01154 {
<a name="l01155"></a>01155   <span class="keywordflow">return</span> child0.<a class="code" href="group__ExprPkg.html#gacb48495ca445c895f95d0c3c1ae2070b">eqExpr</a>(child1);
<a name="l01156"></a>01156 }
<a name="l01157"></a>01157 
<a name="l01158"></a><a class="code" href="classCVC3_1_1VCL.html#adcea906016ca3187ea900f1d756db280">01158</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::distinctExpr(<span class="keyword">const</span> std::vector&lt;Expr&gt;&amp; children)
<a name="l01159"></a>01159 {
<a name="l01160"></a>01160   <span class="keywordflow">return</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>(<a class="code" href="kinds_8h.html#aa10c9e8951b8ccf714a59ec321bdac5baa23a9880eca693f679c969556249925f">DISTINCT</a>, children);
<a name="l01161"></a>01161 }
<a name="l01162"></a>01162 
<a name="l01163"></a><a class="code" href="classCVC3_1_1VCL.html#a87991a89b4411b323746c8b588d9848f">01163</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::iteExpr(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; ifpart, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; thenpart, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; elsepart)
<a name="l01164"></a>01164 {
<a name="l01165"></a>01165   <span class="keywordflow">return</span> ifpart.<a class="code" href="group__ExprPkg.html#ga5532cabad6f699c57da32a8db65a38da">iteExpr</a>(thenpart, elsepart);
<a name="l01166"></a>01166 }
<a name="l01167"></a>01167 
<a name="l01168"></a>01168 
<a name="l01169"></a><a class="code" href="classCVC3_1_1VCL.html#ac277dff0e38bab93673461c41898b0cc">01169</a> <a class="code" href="classCVC3_1_1Op.html">Op</a> VCL::createOp(<span class="keyword">const</span> <span class="keywordtype">string</span>&amp; name, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a>&amp; type)
<a name="l01170"></a>01170 {
<a name="l01171"></a>01171   <span class="keywordflow">if</span> (!type.<a class="code" href="classCVC3_1_1Type.html#a9c3be568546a63fb424e4cb49391dfa6">isFunction</a>())
<a name="l01172"></a>01172     <span class="keywordflow">throw</span> <a class="code" href="classCVC3_1_1Exception.html">Exception</a>(<span class="stringliteral">&quot;createOp: expected function type&quot;</span>);
<a name="l01173"></a>01173   <span class="keywordflow">if</span>(d_dump) {
<a name="l01174"></a>01174     d_translator-&gt;dump(<a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>(<a class="code" href="kinds_8h.html#aa10c9e8951b8ccf714a59ec321bdac5ba3d044162d972156d897cea80f216b9ca">CONST</a>, idExpr(name), type.<a class="code" href="classCVC3_1_1Type.html#a0bc1eebf8dbd9d2880e1f18d7804e5c2">getExpr</a>()));
<a name="l01175"></a>01175   }
<a name="l01176"></a>01176   <span class="keywordflow">return</span> d_theoryCore-&gt;newFunction(name, type,
<a name="l01177"></a>01177                                    getFlags()[<span class="stringliteral">&quot;trans-closure&quot;</span>].getBool());
<a name="l01178"></a>01178 }
<a name="l01179"></a>01179 
<a name="l01180"></a>01180 
<a name="l01181"></a><a class="code" href="classCVC3_1_1VCL.html#a49590168c0338addd56e63641709ebea">01181</a> <a class="code" href="classCVC3_1_1Op.html">Op</a> VCL::createOp(<span class="keyword">const</span> <span class="keywordtype">string</span>&amp; name, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a>&amp; type, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; def)
<a name="l01182"></a>01182 {
<a name="l01183"></a>01183   <span class="keywordflow">if</span> (!type.<a class="code" href="classCVC3_1_1Type.html#a9c3be568546a63fb424e4cb49391dfa6">isFunction</a>())
<a name="l01184"></a>01184     <span class="keywordflow">throw</span> <a class="code" href="classCVC3_1_1TypecheckException.html">TypecheckException</a>
<a name="l01185"></a>01185     (<span class="stringliteral">&quot;Type error in createOp:\n&quot;</span>
<a name="l01186"></a>01186      <span class="stringliteral">&quot;Constant &quot;</span>+name+
<a name="l01187"></a>01187      <span class="stringliteral">&quot; is declared with type:\n  &quot;</span>
<a name="l01188"></a>01188      +type.<a class="code" href="classCVC3_1_1Type.html#a2f5ce4b1973ec02b2f2b2eba8ce3cc50">toString</a>()
<a name="l01189"></a>01189      +<span class="stringliteral">&quot;\n which is not a function type&quot;</span>);
<a name="l01190"></a>01190   <span class="keywordflow">if</span> (getBaseType(type) != getBaseType(def.<a class="code" href="group__ExprPkg.html#ga42929221eb172250697b72c28af6de07" title="Get the type. Recursively compute if necessary.">getType</a>()))
<a name="l01191"></a>01191     <span class="keywordflow">throw</span> <a class="code" href="classCVC3_1_1TypecheckException.html">TypecheckException</a>
<a name="l01192"></a>01192     (<span class="stringliteral">&quot;Type mismatch in createOp:\n&quot;</span>
<a name="l01193"></a>01193      <span class="stringliteral">&quot;Function &quot;</span>+name+
<a name="l01194"></a>01194      <span class="stringliteral">&quot; is declared with type:\n  &quot;</span>
<a name="l01195"></a>01195      +type.<a class="code" href="classCVC3_1_1Type.html#a2f5ce4b1973ec02b2f2b2eba8ce3cc50">toString</a>()
<a name="l01196"></a>01196      +<span class="stringliteral">&quot;\nBut the type of definition is\n  &quot;</span>
<a name="l01197"></a>01197      +def.<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="l01198"></a>01198      +<span class="stringliteral">&quot;\n\n which does not match&quot;</span>);
<a name="l01199"></a>01199   <span class="keywordflow">if</span>(d_dump) {
<a name="l01200"></a>01200     d_translator-&gt;dump(<a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>(<a class="code" href="kinds_8h.html#aa10c9e8951b8ccf714a59ec321bdac5ba3d044162d972156d897cea80f216b9ca">CONST</a>, idExpr(name), type.<a class="code" href="classCVC3_1_1Type.html#a0bc1eebf8dbd9d2880e1f18d7804e5c2">getExpr</a>(), def), <span class="keyword">true</span>);
<a name="l01201"></a>01201   }
<a name="l01202"></a>01202   <span class="comment">// Prove the TCCs of the definition</span>
<a name="l01203"></a>01203   <span class="keywordflow">if</span>(getFlags()[<span class="stringliteral">&quot;tcc&quot;</span>].getBool()) {
<a name="l01204"></a>01204     <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a> tpDef(def.<a class="code" href="group__ExprPkg.html#ga42929221eb172250697b72c28af6de07" title="Get the type. Recursively compute if necessary.">getType</a>());
<a name="l01205"></a>01205     <span class="comment">// Make sure that def is within the subtype; that is, prove</span>
<a name="l01206"></a>01206     <span class="comment">// FORALL (xs: argType): typePred_{return_type}(def(xs))</span>
<a name="l01207"></a>01207     <span class="keywordflow">if</span>(tpDef != type) {
<a name="l01208"></a>01208       vector&lt;Expr&gt; boundVars;
<a name="l01209"></a>01209       <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; type.<a class="code" href="classCVC3_1_1Type.html#abd7ab3fcb112e27aa05da8981b56e02c">arity</a>()-1; ++i) {
<a name="l01210"></a>01210         boundVars.push_back(d_em-&gt;newBoundVarExpr(type[i]));
<a name="l01211"></a>01211       }
<a name="l01212"></a>01212       <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> app = <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>(def.<a class="code" href="group__ExprPkg.html#ga3aefe2fb15c2d8e3a51dd92dbcc5cdc5" title="Make the expr into an operator.">mkOp</a>(), boundVars);
<a name="l01213"></a>01213       <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> body(getTypePred(type[type.<a class="code" href="classCVC3_1_1Type.html#abd7ab3fcb112e27aa05da8981b56e02c">arity</a>()-1], app));
<a name="l01214"></a>01214       <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> quant(forallExpr(boundVars, body));
<a name="l01215"></a>01215       <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> tcc = quant.<a class="code" href="group__ExprPkg.html#ga6c3651465ce69ed5f4e6fd461b9acf3c">andExpr</a>(d_theoryCore-&gt;getTCC(quant));
<a name="l01216"></a>01216       <span class="comment">// Query the subtyping formula</span>
<a name="l01217"></a>01217       <span class="keywordtype">bool</span> typesMatch = <span class="keyword">true</span>;
<a name="l01218"></a>01218       <span class="keywordflow">try</span> {
<a name="l01219"></a>01219         checkTCC(tcc);
<a name="l01220"></a>01220       } <span class="keywordflow">catch</span> (<a class="code" href="classCVC3_1_1TypecheckException.html">TypecheckException</a>&amp;) {
<a name="l01221"></a>01221         typesMatch = <span class="keyword">false</span>;
<a name="l01222"></a>01222       }
<a name="l01223"></a>01223       <span class="keywordflow">if</span>(!typesMatch) {
<a name="l01224"></a>01224   <span class="keywordflow">throw</span> <a class="code" href="classCVC3_1_1TypecheckException.html">TypecheckException</a>
<a name="l01225"></a>01225     (<span class="stringliteral">&quot;Type mismatch in createOp:\n&quot;</span>
<a name="l01226"></a>01226      <span class="stringliteral">&quot;Function &quot;</span>+name+
<a name="l01227"></a>01227      <span class="stringliteral">&quot; is declared with type:\n  &quot;</span>
<a name="l01228"></a>01228      +type.<a class="code" href="classCVC3_1_1Type.html#a2f5ce4b1973ec02b2f2b2eba8ce3cc50">toString</a>()
<a name="l01229"></a>01229      +<span class="stringliteral">&quot;\nBut the definition is\n  &quot;</span>
<a name="l01230"></a>01230      +def.<a class="code" href="group__ExprPkg.html#gaf3028bb1619f8cc69b66ec712e1adb54" title="Print the expression to a string.">toString</a>()
<a name="l01231"></a>01231      +<span class="stringliteral">&quot;\n\nwhose type could not be proved to be a subtype&quot;</span>);
<a name="l01232"></a>01232       }
<a name="l01233"></a>01233     }
<a name="l01234"></a>01234   }
<a name="l01235"></a>01235   <span class="keywordflow">return</span> d_theoryCore-&gt;newFunction(name, type, def);
<a name="l01236"></a>01236 }
<a name="l01237"></a>01237 
<a name="l01238"></a>01238 
<a name="l01239"></a><a class="code" href="classCVC3_1_1VCL.html#abf7359c0359f4e1bbf24c5f8fe93f9f0">01239</a> <a class="code" href="classCVC3_1_1Op.html">Op</a> VCL::lookupOp(<span class="keyword">const</span> <span class="keywordtype">string</span>&amp; name, <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a>* type)
<a name="l01240"></a>01240 {
<a name="l01241"></a>01241   <span class="keywordflow">return</span> d_theoryCore-&gt;lookupFunction(name, type);
<a name="l01242"></a>01242 }
<a name="l01243"></a>01243 
<a name="l01244"></a>01244 
<a name="l01245"></a><a class="code" href="classCVC3_1_1VCL.html#a1421f580601f509b1e7ff7ca8b2f8e9f">01245</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::funExpr(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Op.html">Op</a>&amp; op, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; child)
<a name="l01246"></a>01246 {
<a name="l01247"></a>01247   <span class="keywordflow">return</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>(op, child);
<a name="l01248"></a>01248 }
<a name="l01249"></a>01249 
<a name="l01250"></a>01250 
<a name="l01251"></a><a class="code" href="classCVC3_1_1VCL.html#abe89cf2af04179a93a2a27485e6c9473">01251</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::funExpr(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Op.html">Op</a>&amp; op, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; <a class="code" href="namespaceMiniSat.html#ad93cb56673487974071ed3b75bf4ea83">left</a>, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; <a class="code" href="namespaceMiniSat.html#a82558b7a36c52f5d3211d5d14bed99d4">right</a>)
<a name="l01252"></a>01252 {
<a name="l01253"></a>01253   <span class="keywordflow">return</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>(op, left, right);
<a name="l01254"></a>01254 }
<a name="l01255"></a>01255 
<a name="l01256"></a>01256 
<a name="l01257"></a><a class="code" href="classCVC3_1_1VCL.html#ae17dc6e81ba5fc1f854d7e223ecfe820">01257</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::funExpr(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Op.html">Op</a>&amp; op, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; child0, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; child1, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; child2)
<a name="l01258"></a>01258 {
<a name="l01259"></a>01259   <span class="keywordflow">return</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>(op, child0, child1, child2);
<a name="l01260"></a>01260 }
<a name="l01261"></a>01261 
<a name="l01262"></a>01262 
<a name="l01263"></a><a class="code" href="classCVC3_1_1VCL.html#ae99d54ff8ff60083b35678f6943f61c8">01263</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::funExpr(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Op.html">Op</a>&amp; op, <span class="keyword">const</span> vector&lt;Expr&gt;&amp; children)
<a name="l01264"></a>01264 {
<a name="l01265"></a>01265   <span class="keywordflow">return</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>(op, children);
<a name="l01266"></a>01266 }
<a name="l01267"></a>01267 
<a name="l01268"></a><a class="code" href="classCVC3_1_1VCL.html#a8e7b1855a671cd3684319b371a28f2f9">01268</a> <span class="keywordtype">bool</span> VCL::addPairToArithOrder(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; smaller, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; bigger)
<a name="l01269"></a>01269 {
<a name="l01270"></a>01270   <span class="keywordflow">if</span> (d_dump) {
<a name="l01271"></a>01271     d_translator-&gt;dump(<a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>(<a class="code" href="kinds_8h.html#aa10c9e8951b8ccf714a59ec321bdac5ba62e1f4af4ae37d9c8a7f60bf47e4e72c">ARITH_VAR_ORDER</a>, smaller, bigger), <span class="keyword">true</span>);
<a name="l01272"></a>01272   }
<a name="l01273"></a>01273   <span class="keywordflow">return</span> d_theoryArith-&gt;addPairToArithOrder(smaller, bigger);
<a name="l01274"></a>01274 }
<a name="l01275"></a>01275 
<a name="l01276"></a><a class="code" href="classCVC3_1_1VCL.html#acfc983096f1d7aa9799d360a9cef8d3b">01276</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::ratExpr(<span class="keywordtype">int</span> n, <span class="keywordtype">int</span> d)
<a name="l01277"></a>01277 {
<a name="l01278"></a>01278   <a class="code" href="debug_8h.html#a40dac3bdb2166ffc852ee8b1489d2b56">DebugAssert</a>(d != 0,<span class="stringliteral">&quot;denominator cannot be 0&quot;</span>);
<a name="l01279"></a>01279   <span class="keywordflow">return</span> d_em-&gt;newRatExpr(<a class="code" href="classCVC3_1_1Rational.html">Rational</a>(n,d));
<a name="l01280"></a>01280 }
<a name="l01281"></a>01281 
<a name="l01282"></a>01282 
<a name="l01283"></a><a class="code" href="classCVC3_1_1VCL.html#a0bb82227b049be1571cd1ac76c6fd713">01283</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::ratExpr(<span class="keyword">const</span> <span class="keywordtype">string</span>&amp; n, <span class="keyword">const</span> <span class="keywordtype">string</span>&amp; d, <span class="keywordtype">int</span> base)
<a name="l01284"></a>01284 {
<a name="l01285"></a>01285   <span class="keywordflow">return</span> d_em-&gt;newRatExpr(<a class="code" href="classCVC3_1_1Rational.html">Rational</a>(n.c_str(), d.c_str(), base));
<a name="l01286"></a>01286 }
<a name="l01287"></a>01287 
<a name="l01288"></a>01288 
<a name="l01289"></a><a class="code" href="classCVC3_1_1VCL.html#a08c469b8571beb3d14ec94c43383c491">01289</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::ratExpr(<span class="keyword">const</span> <span class="keywordtype">string</span>&amp; n, <span class="keywordtype">int</span> base)
<a name="l01290"></a>01290 {
<a name="l01291"></a>01291   <a class="code" href="namespaceHash.html#a34e07ea2356b048f9871d1cfdf478da6">string::size_type</a> pos = n.rfind(<span class="stringliteral">&quot;.&quot;</span>);
<a name="l01292"></a>01292   <span class="keywordflow">if</span> (pos == string::npos) {
<a name="l01293"></a>01293     <span class="keywordflow">return</span> d_em-&gt;newRatExpr(<a class="code" href="classCVC3_1_1Rational.html">Rational</a>(n.c_str(), base));
<a name="l01294"></a>01294   }
<a name="l01295"></a>01295   <span class="keywordtype">string</span> afterdec = n.substr(pos+1);
<a name="l01296"></a>01296   <span class="keywordtype">string</span> beforedec = n.substr(0, pos);
<a name="l01297"></a>01297   <span class="keywordflow">if</span> (afterdec.size() == 0 || beforedec.size() == 0) {
<a name="l01298"></a>01298     <span class="keywordflow">throw</span> <a class="code" href="classCVC3_1_1Exception.html">Exception</a>(<span class="stringliteral">&quot;Cannot convert string to rational: &quot;</span>+n);
<a name="l01299"></a>01299   }
<a name="l01300"></a>01300   pos = beforedec.rfind(<span class="stringliteral">&quot;.&quot;</span>);
<a name="l01301"></a>01301   <span class="keywordflow">if</span> (pos != string::npos) {
<a name="l01302"></a>01302     <span class="keywordflow">throw</span> <a class="code" href="classCVC3_1_1Exception.html">Exception</a>(<span class="stringliteral">&quot;Cannot convert string to rational: &quot;</span>+n);
<a name="l01303"></a>01303   }
<a name="l01304"></a>01304   <a class="code" href="classCVC3_1_1Rational.html">Rational</a> r = <a class="code" href="classCVC3_1_1Rational.html">Rational</a>(beforedec.c_str(), base);
<a name="l01305"></a>01305   <a class="code" href="classCVC3_1_1Rational.html">Rational</a> fracPart = <a class="code" href="classCVC3_1_1Rational.html">Rational</a>(afterdec.c_str(), base);
<a name="l01306"></a>01306   <span class="keywordflow">if</span>( r &lt; 0 || ((r == 0) &amp;&amp; (beforedec.rfind(<span class="stringliteral">&quot;-&quot;</span>) != string::npos)) ) {
<a name="l01307"></a>01307     r = r - (fracPart / <a class="code" href="namespaceCVC3.html#a28fc84bed3f9bc91ca9967de0f9cfa00" title="Raise &#39;base&#39; into the power of &#39;pow&#39; (pow must be an integer)">pow</a>(afterdec.size(), (<a class="code" href="classCVC3_1_1Rational.html">Rational</a>)base));
<a name="l01308"></a>01308   }
<a name="l01309"></a>01309   <span class="keywordflow">else</span> {
<a name="l01310"></a>01310     r = r + (fracPart / <a class="code" href="namespaceCVC3.html#a28fc84bed3f9bc91ca9967de0f9cfa00" title="Raise &#39;base&#39; into the power of &#39;pow&#39; (pow must be an integer)">pow</a>(afterdec.size(), (<a class="code" href="classCVC3_1_1Rational.html">Rational</a>)base));
<a name="l01311"></a>01311   }
<a name="l01312"></a>01312   <span class="keywordflow">return</span> d_em-&gt;newRatExpr(r);
<a name="l01313"></a>01313 }
<a name="l01314"></a>01314 
<a name="l01315"></a>01315 
<a name="l01316"></a><a class="code" href="classCVC3_1_1VCL.html#ab62447c6c1a4f71eeeb6d8aa665bbdc2">01316</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> <a class="code" href="namespaceCVC3.html#a8eccf9a3ce48e30b704c1b689bfe3eff">VCL::uminusExpr</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; child)
<a name="l01317"></a>01317 {
<a name="l01318"></a>01318   <span class="keywordflow">return</span> -child;
<a name="l01319"></a>01319 }
<a name="l01320"></a>01320 
<a name="l01321"></a>01321 
<a name="l01322"></a><a class="code" href="classCVC3_1_1VCL.html#adad9006fd502d1d9ff190a8a4a343905">01322</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> <a class="code" href="namespaceCVC3.html#accd3d7d38b0e04136afbc3e5191bc8bb">VCL::plusExpr</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; <a class="code" href="namespaceMiniSat.html#ad93cb56673487974071ed3b75bf4ea83">left</a>, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; <a class="code" href="namespaceMiniSat.html#a82558b7a36c52f5d3211d5d14bed99d4">right</a>)
<a name="l01323"></a>01323 {
<a name="l01324"></a>01324   <span class="keywordflow">return</span> left + <a class="code" href="namespaceMiniSat.html#a82558b7a36c52f5d3211d5d14bed99d4">right</a>;
<a name="l01325"></a>01325 }
<a name="l01326"></a>01326 
<a name="l01327"></a><a class="code" href="classCVC3_1_1VCL.html#adb4461aac312f9681f4b410dcf5396e9">01327</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> <a class="code" href="namespaceCVC3.html#accd3d7d38b0e04136afbc3e5191bc8bb">VCL::plusExpr</a>(<span class="keyword">const</span> std::vector&lt;Expr&gt;&amp; children)
<a name="l01328"></a>01328 {
<a name="l01329"></a>01329   <span class="keywordflow">return</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>(<a class="code" href="namespaceCVC3.html#a32d50a30de0e9e5bc4c2451de0107024a9a12fbdcaa45ef17eaa1802161f9ca98">PLUS</a>, children);
<a name="l01330"></a>01330 }
<a name="l01331"></a>01331 
<a name="l01332"></a>01332 
<a name="l01333"></a><a class="code" href="classCVC3_1_1VCL.html#a41b81d8fe76fa4bb44a69e16dfed7dc6">01333</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> <a class="code" href="namespaceCVC3.html#a9ba326c305c5aeb61de515009aaa61f8">VCL::minusExpr</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; <a class="code" href="namespaceMiniSat.html#ad93cb56673487974071ed3b75bf4ea83">left</a>, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; <a class="code" href="namespaceMiniSat.html#a82558b7a36c52f5d3211d5d14bed99d4">right</a>)
<a name="l01334"></a>01334 {
<a name="l01335"></a>01335   <span class="keywordflow">return</span> left - <a class="code" href="namespaceMiniSat.html#a82558b7a36c52f5d3211d5d14bed99d4">right</a>;
<a name="l01336"></a>01336 }
<a name="l01337"></a>01337 
<a name="l01338"></a>01338 
<a name="l01339"></a><a class="code" href="classCVC3_1_1VCL.html#ac3d1c85bda8df4d88efb626cb7715244">01339</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> <a class="code" href="namespaceCVC3.html#adb35e0739f86730543924dbc8211a778">VCL::multExpr</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; <a class="code" href="namespaceMiniSat.html#ad93cb56673487974071ed3b75bf4ea83">left</a>, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; <a class="code" href="namespaceMiniSat.html#a82558b7a36c52f5d3211d5d14bed99d4">right</a>)
<a name="l01340"></a>01340 {
<a name="l01341"></a>01341   <span class="keywordflow">return</span> left * <a class="code" href="namespaceMiniSat.html#a82558b7a36c52f5d3211d5d14bed99d4">right</a>;
<a name="l01342"></a>01342 }
<a name="l01343"></a>01343 
<a name="l01344"></a>01344 
<a name="l01345"></a><a class="code" href="classCVC3_1_1VCL.html#a686b064b5030c7d3bcf8aea018ed556f">01345</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> <a class="code" href="namespaceCVC3.html#aa123bf4eb1751181baf16c5e80b47740" title="Power (x^n, or base^{pow}) expressions.">VCL::powExpr</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; x, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; n)
<a name="l01346"></a>01346 {
<a name="l01347"></a>01347   <a class="code" href="namespaceCVC3.html#aa123bf4eb1751181baf16c5e80b47740" title="Power (x^n, or base^{pow}) expressions.">return ::powExpr</a>(n, x);
<a name="l01348"></a>01348 }
<a name="l01349"></a>01349 
<a name="l01350"></a>01350 
<a name="l01351"></a><a class="code" href="classCVC3_1_1VCL.html#acabb3affe2525e363aa6c361305de34e">01351</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> <a class="code" href="namespaceCVC3.html#a36b5fb04640e2f95f74a58837ae04f68">VCL::divideExpr</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; num, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; denom)
<a name="l01352"></a>01352 {
<a name="l01353"></a>01353   <a class="code" href="namespaceCVC3.html#a36b5fb04640e2f95f74a58837ae04f68">return ::divideExpr</a>(num,denom);
<a name="l01354"></a>01354 }
<a name="l01355"></a>01355 
<a name="l01356"></a>01356 
<a name="l01357"></a><a class="code" href="classCVC3_1_1VCL.html#aee9a9ef0742792f7c1357154f1d2a190">01357</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> <a class="code" href="namespaceCVC3.html#ac9ccba18a3c725634b1f8ba8e99e627f">VCL::ltExpr</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; <a class="code" href="namespaceMiniSat.html#ad93cb56673487974071ed3b75bf4ea83">left</a>, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; <a class="code" href="namespaceMiniSat.html#a82558b7a36c52f5d3211d5d14bed99d4">right</a>)
<a name="l01358"></a>01358 {
<a name="l01359"></a>01359   <a class="code" href="namespaceCVC3.html#ac9ccba18a3c725634b1f8ba8e99e627f">return ::ltExpr</a>(left, right);
<a name="l01360"></a>01360 }
<a name="l01361"></a>01361 
<a name="l01362"></a>01362 
<a name="l01363"></a><a class="code" href="classCVC3_1_1VCL.html#a5cf90d2c620b7e4f521cdd2affa85d9f">01363</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> <a class="code" href="namespaceCVC3.html#aebfd8a82800bd3dff4c8db461a52cdea">VCL::leExpr</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; <a class="code" href="namespaceMiniSat.html#ad93cb56673487974071ed3b75bf4ea83">left</a>, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; <a class="code" href="namespaceMiniSat.html#a82558b7a36c52f5d3211d5d14bed99d4">right</a>)
<a name="l01364"></a>01364 {
<a name="l01365"></a>01365   <a class="code" href="namespaceCVC3.html#aebfd8a82800bd3dff4c8db461a52cdea">return ::leExpr</a>(left, right);
<a name="l01366"></a>01366 }
<a name="l01367"></a>01367 
<a name="l01368"></a>01368 
<a name="l01369"></a><a class="code" href="classCVC3_1_1VCL.html#a39b6e5d030aa9aaf0bd57332cab4d5fc">01369</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> <a class="code" href="namespaceCVC3.html#a8ad355d6650f2dfa754419c634e36afb">VCL::gtExpr</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; <a class="code" href="namespaceMiniSat.html#ad93cb56673487974071ed3b75bf4ea83">left</a>, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; <a class="code" href="namespaceMiniSat.html#a82558b7a36c52f5d3211d5d14bed99d4">right</a>)
<a name="l01370"></a>01370 {
<a name="l01371"></a>01371   <a class="code" href="namespaceCVC3.html#a8ad355d6650f2dfa754419c634e36afb">return ::gtExpr</a>(left, right);
<a name="l01372"></a>01372 }
<a name="l01373"></a>01373 
<a name="l01374"></a>01374 
<a name="l01375"></a><a class="code" href="classCVC3_1_1VCL.html#aa04879197ff8c223ef9e95022a3b5003">01375</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> <a class="code" href="namespaceCVC3.html#a520cf0df288be321d27ea6fa77ded2d2">VCL::geExpr</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; <a class="code" href="namespaceMiniSat.html#ad93cb56673487974071ed3b75bf4ea83">left</a>, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; <a class="code" href="namespaceMiniSat.html#a82558b7a36c52f5d3211d5d14bed99d4">right</a>)
<a name="l01376"></a>01376 {
<a name="l01377"></a>01377   <a class="code" href="namespaceCVC3.html#a520cf0df288be321d27ea6fa77ded2d2">return ::geExpr</a>(left, right);
<a name="l01378"></a>01378 }
<a name="l01379"></a>01379 
<a name="l01380"></a>01380 
<a name="l01381"></a><a class="code" href="classCVC3_1_1VCL.html#afe7f6ce6960db261e58d996e00164d64">01381</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::recordExpr(<span class="keyword">const</span> <span class="keywordtype">string</span>&amp; field, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; expr)
<a name="l01382"></a>01382 {
<a name="l01383"></a>01383   vector&lt;string&gt; fields;
<a name="l01384"></a>01384   vector&lt;Expr&gt; kids;
<a name="l01385"></a>01385   kids.push_back(expr);
<a name="l01386"></a>01386   fields.push_back(field);
<a name="l01387"></a>01387   <span class="keywordflow">return</span> d_theoryRecords-&gt;recordExpr(fields, kids);
<a name="l01388"></a>01388 }
<a name="l01389"></a>01389 
<a name="l01390"></a>01390 
<a name="l01391"></a><a class="code" href="classCVC3_1_1VCL.html#a9259afee51e2d525bc6ae192f534b686">01391</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::recordExpr(<span class="keyword">const</span> <span class="keywordtype">string</span>&amp; field0, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; expr0,
<a name="l01392"></a>01392          <span class="keyword">const</span> <span class="keywordtype">string</span>&amp; field1, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; expr1)
<a name="l01393"></a>01393 {
<a name="l01394"></a>01394   vector&lt;string&gt; fields;
<a name="l01395"></a>01395   vector&lt;Expr&gt; kids;
<a name="l01396"></a>01396   fields.push_back(field0);
<a name="l01397"></a>01397   fields.push_back(field1);
<a name="l01398"></a>01398   kids.push_back(expr0);
<a name="l01399"></a>01399   kids.push_back(expr1);
<a name="l01400"></a>01400   <a class="code" href="namespaceCVC3.html#ab21ee900e0b3494b1b8c26005436a5a4" title="Sort two vectors based on the first vector.">sort2</a>(fields, kids);
<a name="l01401"></a>01401   <span class="keywordflow">return</span> d_theoryRecords-&gt;recordExpr(fields, kids);
<a name="l01402"></a>01402 }
<a name="l01403"></a>01403 
<a name="l01404"></a>01404 
<a name="l01405"></a><a class="code" href="classCVC3_1_1VCL.html#aa6a023a06bfaec39f2c2dbf5b4e1e8dc">01405</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::recordExpr(<span class="keyword">const</span> <span class="keywordtype">string</span>&amp; field0, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; expr0,
<a name="l01406"></a>01406          <span class="keyword">const</span> <span class="keywordtype">string</span>&amp; field1, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; expr1,
<a name="l01407"></a>01407          <span class="keyword">const</span> <span class="keywordtype">string</span>&amp; field2, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; expr2)
<a name="l01408"></a>01408 {
<a name="l01409"></a>01409   vector&lt;string&gt; fields;
<a name="l01410"></a>01410   vector&lt;Expr&gt; kids;
<a name="l01411"></a>01411   fields.push_back(field0);
<a name="l01412"></a>01412   fields.push_back(field1);
<a name="l01413"></a>01413   fields.push_back(field2);
<a name="l01414"></a>01414   kids.push_back(expr0);
<a name="l01415"></a>01415   kids.push_back(expr1);
<a name="l01416"></a>01416   kids.push_back(expr2);
<a name="l01417"></a>01417   <a class="code" href="namespaceCVC3.html#ab21ee900e0b3494b1b8c26005436a5a4" title="Sort two vectors based on the first vector.">sort2</a>(fields, kids);
<a name="l01418"></a>01418   <span class="keywordflow">return</span> d_theoryRecords-&gt;recordExpr(fields, kids);
<a name="l01419"></a>01419 }
<a name="l01420"></a>01420 
<a name="l01421"></a>01421 
<a name="l01422"></a><a class="code" href="classCVC3_1_1VCL.html#af456da30bbb52b31fdc77971b71d47bf">01422</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::recordExpr(<span class="keyword">const</span> vector&lt;string&gt;&amp; fields,
<a name="l01423"></a>01423          <span class="keyword">const</span> vector&lt;Expr&gt;&amp; exprs)
<a name="l01424"></a>01424 {
<a name="l01425"></a>01425   <a class="code" href="debug_8h.html#a40dac3bdb2166ffc852ee8b1489d2b56">DebugAssert</a>(fields.size() &gt; 0, <span class="stringliteral">&quot;VCL::recordExpr()&quot;</span>);
<a name="l01426"></a>01426   <a class="code" href="debug_8h.html#a40dac3bdb2166ffc852ee8b1489d2b56">DebugAssert</a>(fields.size() == exprs.size(),<span class="stringliteral">&quot;VCL::recordExpr()&quot;</span>);
<a name="l01427"></a>01427   <span class="comment">// Create copies of the vectors to sort them</span>
<a name="l01428"></a>01428   vector&lt;string&gt; fs(fields);
<a name="l01429"></a>01429   vector&lt;Expr&gt; es(exprs);
<a name="l01430"></a>01430   <a class="code" href="namespaceCVC3.html#ab21ee900e0b3494b1b8c26005436a5a4" title="Sort two vectors based on the first vector.">sort2</a>(fs, es);
<a name="l01431"></a>01431   <span class="keywordflow">return</span> d_theoryRecords-&gt;recordExpr(fs, es);
<a name="l01432"></a>01432 }
<a name="l01433"></a>01433 
<a name="l01434"></a>01434 
<a name="l01435"></a><a class="code" href="classCVC3_1_1VCL.html#abdf0c8d98e38c5b824e2ea7473eb3e55">01435</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::recSelectExpr(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; record, <span class="keyword">const</span> <span class="keywordtype">string</span>&amp; field)
<a name="l01436"></a>01436 {
<a name="l01437"></a>01437   <span class="keywordflow">return</span> d_theoryRecords-&gt;recordSelect(record, field);
<a name="l01438"></a>01438 }
<a name="l01439"></a>01439 
<a name="l01440"></a>01440 
<a name="l01441"></a><a class="code" href="classCVC3_1_1VCL.html#a38d7fbf8d93c20be9924f26fe437ade6">01441</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::recUpdateExpr(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; record, <span class="keyword">const</span> <span class="keywordtype">string</span>&amp; field,
<a name="l01442"></a>01442       <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; newValue)
<a name="l01443"></a>01443 {
<a name="l01444"></a>01444   <span class="keywordflow">return</span> d_theoryRecords-&gt;recordUpdate(record, field, newValue);
<a name="l01445"></a>01445 }
<a name="l01446"></a>01446 
<a name="l01447"></a>01447 
<a name="l01448"></a><a class="code" href="classCVC3_1_1VCL.html#a84a759c7fa5b4ec5ddb84c883bdf75a5">01448</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::readExpr(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; array, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; index)
<a name="l01449"></a>01449 {
<a name="l01450"></a>01450   <span class="keywordflow">return</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>(<a class="code" href="namespaceCVC3.html#a83fde65f6cf7f65c3e5c02c9a108d781ab012911c4fabb7b8556925a0d61e9c8c">READ</a>, array, index);
<a name="l01451"></a>01451 }
<a name="l01452"></a>01452 
<a name="l01453"></a>01453 
<a name="l01454"></a><a class="code" href="classCVC3_1_1VCL.html#ab7da4a56f788600a62c928917d74c540">01454</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::writeExpr(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; array, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; index, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; newValue)
<a name="l01455"></a>01455 {
<a name="l01456"></a>01456   <span class="keywordflow">return</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>(<a class="code" href="namespaceCVC3.html#a83fde65f6cf7f65c3e5c02c9a108d781a33b0829ff24c1e0d27de00d675267297">WRITE</a>, array, index, newValue);
<a name="l01457"></a>01457 }
<a name="l01458"></a>01458 
<a name="l01459"></a>01459 
<a name="l01460"></a><a class="code" href="classCVC3_1_1VCL.html#ad808ce75e7443dec968f150527c7e13f">01460</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::newBVConstExpr(<span class="keyword">const</span> std::string&amp; s, <span class="keywordtype">int</span> base)
<a name="l01461"></a>01461 {
<a name="l01462"></a>01462   <span class="keywordflow">return</span> d_theoryBitvector-&gt;newBVConstExpr(s, base);
<a name="l01463"></a>01463 }
<a name="l01464"></a>01464 
<a name="l01465"></a>01465 
<a name="l01466"></a><a class="code" href="classCVC3_1_1VCL.html#a70b9632e4c948f67117bc1fe56a1aafa">01466</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::newBVConstExpr(<span class="keyword">const</span> std::vector&lt;bool&gt;&amp; bits)
<a name="l01467"></a>01467 {
<a name="l01468"></a>01468   <span class="keywordflow">return</span> d_theoryBitvector-&gt;newBVConstExpr(bits);
<a name="l01469"></a>01469 }
<a name="l01470"></a>01470 
<a name="l01471"></a>01471 
<a name="l01472"></a><a class="code" href="classCVC3_1_1VCL.html#ab4a55736ee4768e8857885988e00d77f">01472</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::newBVConstExpr(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Rational.html">Rational</a>&amp; r, <span class="keywordtype">int</span> len)
<a name="l01473"></a>01473 {
<a name="l01474"></a>01474   <span class="keywordflow">return</span> d_theoryBitvector-&gt;newBVConstExpr(r, len);
<a name="l01475"></a>01475 }
<a name="l01476"></a>01476 
<a name="l01477"></a>01477 
<a name="l01478"></a><a class="code" href="classCVC3_1_1VCL.html#a953786b640a1dedcef7d8e79907073f1">01478</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::newConcatExpr(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; t1, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; t2)
<a name="l01479"></a>01479 {
<a name="l01480"></a>01480   <span class="keywordflow">return</span> d_theoryBitvector-&gt;newConcatExpr(t1, t2);
<a name="l01481"></a>01481 }
<a name="l01482"></a>01482 
<a name="l01483"></a>01483 
<a name="l01484"></a><a class="code" href="classCVC3_1_1VCL.html#abf90bf1abdb42ca036171d6c70863165">01484</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::newConcatExpr(<span class="keyword">const</span> std::vector&lt;Expr&gt;&amp; kids)
<a name="l01485"></a>01485 {
<a name="l01486"></a>01486   <span class="keywordflow">return</span> d_theoryBitvector-&gt;newConcatExpr(kids);
<a name="l01487"></a>01487 }
<a name="l01488"></a>01488 
<a name="l01489"></a>01489 
<a name="l01490"></a><a class="code" href="classCVC3_1_1VCL.html#a4eddf5c30347830b147179e7eb6732bf">01490</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::newBVExtractExpr(<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="keywordtype">int</span> hi, <span class="keywordtype">int</span> low)
<a name="l01491"></a>01491 {
<a name="l01492"></a>01492   <span class="keywordflow">return</span> d_theoryBitvector-&gt;newBVExtractExpr(e, hi, low);
<a name="l01493"></a>01493 }
<a name="l01494"></a>01494 
<a name="l01495"></a>01495 
<a name="l01496"></a><a class="code" href="classCVC3_1_1VCL.html#a15a2cba3773e26da60610ddf3f1f20fb">01496</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::newBVNegExpr(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; t1)
<a name="l01497"></a>01497 {
<a name="l01498"></a>01498   <span class="keywordflow">return</span> d_theoryBitvector-&gt;newBVNegExpr(t1);
<a name="l01499"></a>01499 }
<a name="l01500"></a>01500 
<a name="l01501"></a>01501 
<a name="l01502"></a><a class="code" href="classCVC3_1_1VCL.html#a0fd006b863de61f56d243522d41082ed">01502</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::newBVAndExpr(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; t1, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; t2)
<a name="l01503"></a>01503 {
<a name="l01504"></a>01504   <span class="keywordflow">return</span> d_theoryBitvector-&gt;newBVAndExpr(t1, t2);
<a name="l01505"></a>01505 }
<a name="l01506"></a>01506 
<a name="l01507"></a>01507 
<a name="l01508"></a><a class="code" href="classCVC3_1_1VCL.html#a17593d9ec67a755c50f751dffe8b4629">01508</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::newBVAndExpr(<span class="keyword">const</span> std::vector&lt;Expr&gt;&amp; kids)
<a name="l01509"></a>01509 {
<a name="l01510"></a>01510   <span class="keywordflow">return</span> d_theoryBitvector-&gt;newBVAndExpr(kids);
<a name="l01511"></a>01511 }
<a name="l01512"></a>01512 
<a name="l01513"></a>01513 
<a name="l01514"></a><a class="code" href="classCVC3_1_1VCL.html#a850bc85eb4f08da10eaca359f8510b00">01514</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::newBVOrExpr(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; t1, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; t2)
<a name="l01515"></a>01515 {
<a name="l01516"></a>01516   <span class="keywordflow">return</span> d_theoryBitvector-&gt;newBVOrExpr(t1, t2);
<a name="l01517"></a>01517 }
<a name="l01518"></a>01518 
<a name="l01519"></a>01519 
<a name="l01520"></a><a class="code" href="classCVC3_1_1VCL.html#a6bfaea51e4c360ab46d82c964289123c">01520</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::newBVOrExpr(<span class="keyword">const</span> std::vector&lt;Expr&gt;&amp; kids)
<a name="l01521"></a>01521 {
<a name="l01522"></a>01522   <span class="keywordflow">return</span> d_theoryBitvector-&gt;newBVOrExpr(kids);
<a name="l01523"></a>01523 }
<a name="l01524"></a>01524 
<a name="l01525"></a>01525 
<a name="l01526"></a><a class="code" href="classCVC3_1_1VCL.html#a22b8c4a8b8e10feac5a0cb2be04b64e7">01526</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::newBVXorExpr(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; t1, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; t2)
<a name="l01527"></a>01527 {
<a name="l01528"></a>01528   <span class="keywordflow">return</span> d_theoryBitvector-&gt;newBVXorExpr(t1, t2);
<a name="l01529"></a>01529 }
<a name="l01530"></a>01530 
<a name="l01531"></a>01531 
<a name="l01532"></a><a class="code" href="classCVC3_1_1VCL.html#a2f95f00a6aad1ea0f7c55cdd896ef6d8">01532</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::newBVXorExpr(<span class="keyword">const</span> std::vector&lt;Expr&gt;&amp; kids)
<a name="l01533"></a>01533 {
<a name="l01534"></a>01534   <span class="keywordflow">return</span> d_theoryBitvector-&gt;newBVXorExpr(kids);
<a name="l01535"></a>01535 }
<a name="l01536"></a>01536 
<a name="l01537"></a>01537 
<a name="l01538"></a><a class="code" href="classCVC3_1_1VCL.html#ae5969df90d601a8aa881391653839d4e">01538</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::newBVXnorExpr(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; t1, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; t2)
<a name="l01539"></a>01539 {
<a name="l01540"></a>01540   <span class="keywordflow">return</span> d_theoryBitvector-&gt;newBVXnorExpr(t1, t2);
<a name="l01541"></a>01541 }
<a name="l01542"></a>01542 
<a name="l01543"></a>01543 
<a name="l01544"></a><a class="code" href="classCVC3_1_1VCL.html#adb46114412c8b2b967a213b9749642a2">01544</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::newBVXnorExpr(<span class="keyword">const</span> std::vector&lt;Expr&gt;&amp; kids)
<a name="l01545"></a>01545 {
<a name="l01546"></a>01546   <span class="keywordflow">return</span> d_theoryBitvector-&gt;newBVXnorExpr(kids);
<a name="l01547"></a>01547 }
<a name="l01548"></a>01548 
<a name="l01549"></a>01549 
<a name="l01550"></a><a class="code" href="classCVC3_1_1VCL.html#a7d208c54bf0609c3f0f634f70947ee75">01550</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::newBVNandExpr(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; t1, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; t2)
<a name="l01551"></a>01551 {
<a name="l01552"></a>01552   <span class="keywordflow">return</span> d_theoryBitvector-&gt;newBVNandExpr(t1, t2);
<a name="l01553"></a>01553 }
<a name="l01554"></a>01554 
<a name="l01555"></a>01555 
<a name="l01556"></a><a class="code" href="classCVC3_1_1VCL.html#aea79ee80d345a7e49f80038db8a5b904">01556</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::newBVNorExpr(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; t1, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; t2)
<a name="l01557"></a>01557 {
<a name="l01558"></a>01558   <span class="keywordflow">return</span> d_theoryBitvector-&gt;newBVNorExpr(t1, t2);
<a name="l01559"></a>01559 }
<a name="l01560"></a>01560 
<a name="l01561"></a>01561 
<a name="l01562"></a><a class="code" href="classCVC3_1_1VCL.html#a1a1e3f3f38cb6f11681b2dd236ee9f2f">01562</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::newBVCompExpr(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; t1, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; t2)
<a name="l01563"></a>01563 {
<a name="l01564"></a>01564   <span class="keywordflow">return</span> d_theoryBitvector-&gt;newBVCompExpr(t1, t2);
<a name="l01565"></a>01565 }
<a name="l01566"></a>01566 
<a name="l01567"></a>01567 
<a name="l01568"></a><a class="code" href="classCVC3_1_1VCL.html#afbcef11e642cd00f7dc4abeca0c67890">01568</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::newBVLTExpr(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; t1, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; t2)
<a name="l01569"></a>01569 {
<a name="l01570"></a>01570   <span class="keywordflow">return</span> d_theoryBitvector-&gt;newBVLTExpr(t1, t2);
<a name="l01571"></a>01571 }
<a name="l01572"></a>01572 
<a name="l01573"></a>01573 
<a name="l01574"></a><a class="code" href="classCVC3_1_1VCL.html#aafa81880381e35ca26e79d5fb7dbb923">01574</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::newBVLEExpr(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; t1, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; t2)
<a name="l01575"></a>01575 {
<a name="l01576"></a>01576   <span class="keywordflow">return</span> d_theoryBitvector-&gt;newBVLEExpr(t1, t2);
<a name="l01577"></a>01577 }
<a name="l01578"></a>01578 
<a name="l01579"></a>01579 
<a name="l01580"></a><a class="code" href="classCVC3_1_1VCL.html#a1f9cdb1f89dd900659b46fdf3ab80f16">01580</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::newBVSLTExpr(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; t1, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; t2)
<a name="l01581"></a>01581 {
<a name="l01582"></a>01582   <span class="keywordflow">return</span> d_theoryBitvector-&gt;newBVSLTExpr(t1, t2);
<a name="l01583"></a>01583 }
<a name="l01584"></a>01584 
<a name="l01585"></a>01585 
<a name="l01586"></a><a class="code" href="classCVC3_1_1VCL.html#a356c133efc5c121fa96e3006f2ef081e">01586</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::newBVSLEExpr(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; t1, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; t2)
<a name="l01587"></a>01587 {
<a name="l01588"></a>01588   <span class="keywordflow">return</span> d_theoryBitvector-&gt;newBVSLEExpr(t1, t2);
<a name="l01589"></a>01589 }
<a name="l01590"></a>01590 
<a name="l01591"></a>01591 
<a name="l01592"></a><a class="code" href="classCVC3_1_1VCL.html#ad865f8a255fa67367cb1260598b68c3c">01592</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::newSXExpr(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; t1, <span class="keywordtype">int</span> len)
<a name="l01593"></a>01593 {
<a name="l01594"></a>01594   <span class="keywordflow">return</span> d_theoryBitvector-&gt;newSXExpr(t1, len);
<a name="l01595"></a>01595 }
<a name="l01596"></a>01596 
<a name="l01597"></a>01597 
<a name="l01598"></a><a class="code" href="classCVC3_1_1VCL.html#a4311e3b750558bf8a1b37d42c9874abc">01598</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::newBVUminusExpr(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; t1)
<a name="l01599"></a>01599 {
<a name="l01600"></a>01600   <span class="keywordflow">return</span> d_theoryBitvector-&gt;newBVUminusExpr(t1);
<a name="l01601"></a>01601 }
<a name="l01602"></a>01602 
<a name="l01603"></a>01603 
<a name="l01604"></a><a class="code" href="classCVC3_1_1VCL.html#a1632f50800db737db3a0fb757bac79f7">01604</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::newBVSubExpr(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; t1, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; t2)
<a name="l01605"></a>01605 {
<a name="l01606"></a>01606   <span class="keywordflow">return</span> d_theoryBitvector-&gt;newBVSubExpr(t1, t2);
<a name="l01607"></a>01607 }
<a name="l01608"></a>01608 
<a name="l01609"></a>01609 
<a name="l01610"></a><a class="code" href="classCVC3_1_1VCL.html#aa57e50da2a4941aa09539ca28066b672">01610</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::newBVPlusExpr(<span class="keywordtype">int</span> numbits, <span class="keyword">const</span> std::vector&lt;Expr&gt;&amp; k)
<a name="l01611"></a>01611 {
<a name="l01612"></a>01612   <span class="keywordflow">return</span> d_theoryBitvector-&gt;newBVPlusPadExpr(numbits, k);
<a name="l01613"></a>01613 }
<a name="l01614"></a>01614 
<a name="l01615"></a><a class="code" href="classCVC3_1_1VCL.html#aa349bae1e41c1ba6223fa8fbfedf531f">01615</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::newBVPlusExpr(<span class="keywordtype">int</span> numbits, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; t1, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; t2)
<a name="l01616"></a>01616 {
<a name="l01617"></a>01617   std::vector&lt;Expr&gt; k;
<a name="l01618"></a>01618   k.push_back(t1);
<a name="l01619"></a>01619   k.push_back(t2);
<a name="l01620"></a>01620   <span class="keywordflow">return</span> newBVPlusExpr(numbits, k);
<a name="l01621"></a>01621 }
<a name="l01622"></a>01622 
<a name="l01623"></a>01623 
<a name="l01624"></a><a class="code" href="classCVC3_1_1VCL.html#a7435145013feee0f53d6a81fd1942f85">01624</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::newBVMultExpr(<span class="keywordtype">int</span> numbits, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; t1, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; t2)
<a name="l01625"></a>01625 {
<a name="l01626"></a>01626   <span class="keywordflow">return</span> d_theoryBitvector-&gt;newBVMultPadExpr(numbits, t1, t2);
<a name="l01627"></a>01627 }
<a name="l01628"></a>01628 
<a name="l01629"></a><a class="code" href="classCVC3_1_1VCL.html#ac9670fe188638ce265f77904c14db441">01629</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::newBVUDivExpr(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; t1, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; t2)
<a name="l01630"></a>01630 {
<a name="l01631"></a>01631   <span class="keywordflow">return</span> d_theoryBitvector-&gt;newBVUDivExpr(t1, t2);
<a name="l01632"></a>01632 }
<a name="l01633"></a>01633 
<a name="l01634"></a><a class="code" href="classCVC3_1_1VCL.html#a743a8cf8a7f08257fd3cb24674fa0304">01634</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::newBVURemExpr(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; t1, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; t2)
<a name="l01635"></a>01635 {
<a name="l01636"></a>01636   <span class="keywordflow">return</span> d_theoryBitvector-&gt;newBVURemExpr(t1, t2);
<a name="l01637"></a>01637 }
<a name="l01638"></a>01638 
<a name="l01639"></a><a class="code" href="classCVC3_1_1VCL.html#a1479e6734fcdf11520f3b653cd1436d1">01639</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::newBVSDivExpr(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; t1, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; t2)
<a name="l01640"></a>01640 {
<a name="l01641"></a>01641   <span class="keywordflow">return</span> d_theoryBitvector-&gt;newBVSDivExpr(t1, t2);
<a name="l01642"></a>01642 }
<a name="l01643"></a>01643 
<a name="l01644"></a><a class="code" href="classCVC3_1_1VCL.html#a4179f0c70e3530b54a4e94879a76ea42">01644</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::newBVSRemExpr(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; t1, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; t2)
<a name="l01645"></a>01645 {
<a name="l01646"></a>01646   <span class="keywordflow">return</span> d_theoryBitvector-&gt;newBVSRemExpr(t1, t2);
<a name="l01647"></a>01647 }
<a name="l01648"></a>01648 
<a name="l01649"></a><a class="code" href="classCVC3_1_1VCL.html#a22457c0b227803396b927b8cae0d0a9c">01649</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::newBVSModExpr(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; t1, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; t2)
<a name="l01650"></a>01650 {
<a name="l01651"></a>01651   <span class="keywordflow">return</span> d_theoryBitvector-&gt;newBVSModExpr(t1, t2);
<a name="l01652"></a>01652 }
<a name="l01653"></a>01653 
<a name="l01654"></a>01654 
<a name="l01655"></a><a class="code" href="classCVC3_1_1VCL.html#a7ed70646c308375d2909680c34b959b2">01655</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::newFixedLeftShiftExpr(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; t1, <span class="keywordtype">int</span> r)
<a name="l01656"></a>01656 {
<a name="l01657"></a>01657   <span class="keywordflow">return</span> d_theoryBitvector-&gt;newFixedLeftShiftExpr(t1, r);
<a name="l01658"></a>01658 }
<a name="l01659"></a>01659 
<a name="l01660"></a>01660 
<a name="l01661"></a><a class="code" href="classCVC3_1_1VCL.html#acf0785a00fa5a359f9313556a4da5529">01661</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::newFixedConstWidthLeftShiftExpr(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; t1, <span class="keywordtype">int</span> r)
<a name="l01662"></a>01662 {
<a name="l01663"></a>01663   <span class="keywordflow">return</span> d_theoryBitvector-&gt;newFixedConstWidthLeftShiftExpr(t1, r);
<a name="l01664"></a>01664 }
<a name="l01665"></a>01665 
<a name="l01666"></a>01666 
<a name="l01667"></a><a class="code" href="classCVC3_1_1VCL.html#a2b35f788365e50336e4b6c0a462c23de">01667</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::newFixedRightShiftExpr(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; t1, <span class="keywordtype">int</span> r)
<a name="l01668"></a>01668 {
<a name="l01669"></a>01669   <span class="keywordflow">return</span> d_theoryBitvector-&gt;newFixedRightShiftExpr(t1, r);
<a name="l01670"></a>01670 }
<a name="l01671"></a>01671 
<a name="l01672"></a>01672 
<a name="l01673"></a><a class="code" href="classCVC3_1_1VCL.html#a981627b5d8100269392c1a1daf2776d7">01673</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::newBVSHL(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; t1, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; t2)
<a name="l01674"></a>01674 {
<a name="l01675"></a>01675   <span class="keywordflow">return</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>(<a class="code" href="namespaceCVC3.html#abab5915bdb6d99fb9960e1e5c037b9fca735ca3566cb9f10aa58f458889f4ddf4">BVSHL</a>, t1, t2);
<a name="l01676"></a>01676 }
<a name="l01677"></a>01677 
<a name="l01678"></a>01678 
<a name="l01679"></a><a class="code" href="classCVC3_1_1VCL.html#a3918baa97a08c2d921a071aeae1620ab">01679</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::newBVLSHR(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; t1, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; t2)
<a name="l01680"></a>01680 {
<a name="l01681"></a>01681   <span class="keywordflow">return</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>(<a class="code" href="namespaceCVC3.html#abab5915bdb6d99fb9960e1e5c037b9fca7e306d4cb1a779347c5a2d69a56a5e71">BVLSHR</a>, t1, t2);
<a name="l01682"></a>01682 }
<a name="l01683"></a>01683 
<a name="l01684"></a>01684 
<a name="l01685"></a><a class="code" href="classCVC3_1_1VCL.html#a6066ea30e01094ecec5da8c3495b3f16">01685</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::newBVASHR(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; t1, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; t2)
<a name="l01686"></a>01686 {
<a name="l01687"></a>01687   <span class="keywordflow">return</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>(<a class="code" href="namespaceCVC3.html#abab5915bdb6d99fb9960e1e5c037b9fcac054f57234914470a3912e118222bbf5">BVASHR</a>, t1, t2);
<a name="l01688"></a>01688 }
<a name="l01689"></a>01689 
<a name="l01690"></a>01690 
<a name="l01691"></a><a class="code" href="classCVC3_1_1VCL.html#a04480c805a21d6a1661b9c113b9f2cdc">01691</a> <a class="code" href="classCVC3_1_1Rational.html">Rational</a> VCL::computeBVConst(<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="l01692"></a>01692 {
<a name="l01693"></a>01693   <span class="keywordflow">return</span> d_theoryBitvector-&gt;computeBVConst(e);
<a name="l01694"></a>01694 }
<a name="l01695"></a>01695 
<a name="l01696"></a>01696 
<a name="l01697"></a><a class="code" href="classCVC3_1_1VCL.html#a1a6f8cc80b6041ab02e6213a39862af4">01697</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::tupleExpr(<span class="keyword">const</span> vector&lt;Expr&gt;&amp; exprs) {
<a name="l01698"></a>01698   <a class="code" href="debug_8h.html#a40dac3bdb2166ffc852ee8b1489d2b56">DebugAssert</a>(exprs.size() &gt; 0, <span class="stringliteral">&quot;VCL::tupleExpr()&quot;</span>);
<a name="l01699"></a>01699   <span class="keywordflow">return</span> d_theoryRecords-&gt;tupleExpr(exprs);
<a name="l01700"></a>01700 }
<a name="l01701"></a>01701 
<a name="l01702"></a>01702 
<a name="l01703"></a><a class="code" href="classCVC3_1_1VCL.html#a7c0e2b25a828d0e637cdc4f89fe9378c">01703</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::tupleSelectExpr(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; tuple, <span class="keywordtype">int</span> index)
<a name="l01704"></a>01704 {
<a name="l01705"></a>01705   <span class="keywordflow">return</span> d_theoryRecords-&gt;tupleSelect(tuple, index);
<a name="l01706"></a>01706 }
<a name="l01707"></a>01707 
<a name="l01708"></a>01708 
<a name="l01709"></a><a class="code" href="classCVC3_1_1VCL.html#ac2ab260c25eaff6d52378d66563a2ddd">01709</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::tupleUpdateExpr(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; tuple, <span class="keywordtype">int</span> index, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; newValue)
<a name="l01710"></a>01710 {
<a name="l01711"></a>01711   <span class="keywordflow">return</span> d_theoryRecords-&gt;tupleUpdate(tuple, index, newValue);
<a name="l01712"></a>01712 }
<a name="l01713"></a>01713 
<a name="l01714"></a>01714 
<a name="l01715"></a><a class="code" href="classCVC3_1_1VCL.html#aec600c20c4157a459c29e78989ecdfc1">01715</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::datatypeConsExpr(<span class="keyword">const</span> <span class="keywordtype">string</span>&amp; constructor, <span class="keyword">const</span> vector&lt;Expr&gt;&amp; args)
<a name="l01716"></a>01716 {
<a name="l01717"></a>01717   <span class="keywordflow">return</span> d_theoryDatatype-&gt;datatypeConsExpr(constructor, args);
<a name="l01718"></a>01718 }
<a name="l01719"></a>01719 
<a name="l01720"></a>01720 
<a name="l01721"></a><a class="code" href="classCVC3_1_1VCL.html#a62f5f50e1c29fd9571cb5c69b0fcc6e5">01721</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::datatypeSelExpr(<span class="keyword">const</span> <span class="keywordtype">string</span>&amp; selector, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; arg)
<a name="l01722"></a>01722 {
<a name="l01723"></a>01723   <span class="keywordflow">return</span> d_theoryDatatype-&gt;datatypeSelExpr(selector, arg);
<a name="l01724"></a>01724 }
<a name="l01725"></a>01725 
<a name="l01726"></a>01726 
<a name="l01727"></a><a class="code" href="classCVC3_1_1VCL.html#a6e732eeb679d7bd8023548a1b5e8d1e5">01727</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::datatypeTestExpr(<span class="keyword">const</span> <span class="keywordtype">string</span>&amp; constructor, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; arg)
<a name="l01728"></a>01728 {
<a name="l01729"></a>01729   <span class="keywordflow">return</span> d_theoryDatatype-&gt;datatypeTestExpr(constructor, arg);
<a name="l01730"></a>01730 }
<a name="l01731"></a>01731 
<a name="l01732"></a>01732 
<a name="l01733"></a><a class="code" href="classCVC3_1_1VCL.html#a52edb765ba784038221c6e4ea9d359af">01733</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::boundVarExpr(<span class="keyword">const</span> <span class="keywordtype">string</span>&amp; name, <span class="keyword">const</span> <span class="keywordtype">string</span>&amp; uid,
<a name="l01734"></a>01734            <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a>&amp; type) {
<a name="l01735"></a>01735   <span class="keywordflow">return</span> d_em-&gt;newBoundVarExpr(name, uid, type);
<a name="l01736"></a>01736 }
<a name="l01737"></a>01737 
<a name="l01738"></a>01738 
<a name="l01739"></a><a class="code" href="classCVC3_1_1VCL.html#af6092976dbe77be8467d2c7e61bcd1aa">01739</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::forallExpr(<span class="keyword">const</span> vector&lt;Expr&gt;&amp; vars, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; body) {
<a name="l01740"></a>01740   <a class="code" href="debug_8h.html#a40dac3bdb2166ffc852ee8b1489d2b56">DebugAssert</a>(vars.size() &gt; 0, <span class="stringliteral">&quot;VCL::foralLExpr()&quot;</span>);
<a name="l01741"></a>01741   <span class="keywordflow">return</span> d_em-&gt;newClosureExpr(<a class="code" href="kinds_8h.html#aa10c9e8951b8ccf714a59ec321bdac5ba7b7b6f6e2b88589bd4656a14bcb7eb94">FORALL</a>, vars, body);
<a name="l01742"></a>01742 }
<a name="l01743"></a>01743 
<a name="l01744"></a><a class="code" href="classCVC3_1_1VCL.html#a59bf75e014217aefa07096d1729e6b2d">01744</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::forallExpr(<span class="keyword">const</span> vector&lt;Expr&gt;&amp; vars, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; body,
<a name="l01745"></a>01745                      <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; trigger) {
<a name="l01746"></a>01746   <a class="code" href="debug_8h.html#a40dac3bdb2166ffc852ee8b1489d2b56">DebugAssert</a>(vars.size() &gt; 0, <span class="stringliteral">&quot;VCL::foralLExpr()&quot;</span>);
<a name="l01747"></a>01747   <span class="keywordflow">return</span> d_em-&gt;newClosureExpr(<a class="code" href="kinds_8h.html#aa10c9e8951b8ccf714a59ec321bdac5ba7b7b6f6e2b88589bd4656a14bcb7eb94">FORALL</a>, vars, body, trigger);
<a name="l01748"></a>01748 }
<a name="l01749"></a>01749 
<a name="l01750"></a><a class="code" href="classCVC3_1_1VCL.html#a88bf58cbbfa14bc15c5dbb8cf7ba3ecc">01750</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::forallExpr(<span class="keyword">const</span> vector&lt;Expr&gt;&amp; vars, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; body,
<a name="l01751"></a>01751                      <span class="keyword">const</span> vector&lt;Expr&gt;&amp; triggers) {
<a name="l01752"></a>01752   <a class="code" href="debug_8h.html#a40dac3bdb2166ffc852ee8b1489d2b56">DebugAssert</a>(vars.size() &gt; 0, <span class="stringliteral">&quot;VCL::foralLExpr()&quot;</span>);
<a name="l01753"></a>01753   <span class="keywordflow">return</span> d_em-&gt;newClosureExpr(<a class="code" href="kinds_8h.html#aa10c9e8951b8ccf714a59ec321bdac5ba7b7b6f6e2b88589bd4656a14bcb7eb94">FORALL</a>, vars, body, triggers);
<a name="l01754"></a>01754 }
<a name="l01755"></a>01755 
<a name="l01756"></a><a class="code" href="classCVC3_1_1VCL.html#aba40de981b8807c20c707c094a96b976">01756</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::forallExpr(<span class="keyword">const</span> vector&lt;Expr&gt;&amp; vars, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; body,
<a name="l01757"></a>01757          <span class="keyword">const</span> vector&lt;vector&lt;Expr&gt; &gt;&amp; triggers) {
<a name="l01758"></a>01758   <a class="code" href="debug_8h.html#a40dac3bdb2166ffc852ee8b1489d2b56">DebugAssert</a>(vars.size() &gt; 0, <span class="stringliteral">&quot;VCL::foralLExpr()&quot;</span>);
<a name="l01759"></a>01759   <span class="keywordflow">return</span> d_em-&gt;newClosureExpr(<a class="code" href="kinds_8h.html#aa10c9e8951b8ccf714a59ec321bdac5ba7b7b6f6e2b88589bd4656a14bcb7eb94">FORALL</a>, vars, body, triggers);
<a name="l01760"></a>01760 }
<a name="l01761"></a>01761 
<a name="l01762"></a><a class="code" href="classCVC3_1_1VCL.html#a1c4ae115cdfbc91f2655b2a7d14a4179">01762</a> <span class="keywordtype">void</span> VCL::setTriggers(<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> vector&lt; vector&lt;Expr&gt; &gt;&amp; triggers) {
<a name="l01763"></a>01763   e.<a class="code" href="group__ExprPkg.html#gad15dc19335e0f59dddbb75d1d27579e7" title="Set the triggers for a closure Expr.">setTriggers</a>(triggers);
<a name="l01764"></a>01764 }
<a name="l01765"></a>01765 
<a name="l01766"></a><a class="code" href="classCVC3_1_1VCL.html#abed8eb2bc5db4894605aa32c9f3a36ef">01766</a> <span class="keywordtype">void</span> VCL::setTriggers(<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> vector&lt;Expr&gt;&amp; triggers) {
<a name="l01767"></a>01767   e.<a class="code" href="group__ExprPkg.html#gad15dc19335e0f59dddbb75d1d27579e7" title="Set the triggers for a closure Expr.">setTriggers</a>(triggers);
<a name="l01768"></a>01768 }
<a name="l01769"></a>01769 
<a name="l01770"></a><a class="code" href="classCVC3_1_1VCL.html#a89f6413e4777f866048cfe8922d28c74">01770</a> <span class="keywordtype">void</span> VCL::setTrigger(<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_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; trigger) {
<a name="l01771"></a>01771   e.<a class="code" href="group__ExprPkg.html#ga4e0dcc7b987305b845414ce0a7089381">setTrigger</a>(trigger);
<a name="l01772"></a>01772 }
<a name="l01773"></a>01773 
<a name="l01774"></a><a class="code" href="classCVC3_1_1VCL.html#a38721614a497ca377725ae2e4651afce">01774</a> <span class="keywordtype">void</span> VCL::setMultiTrigger(<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> vector&lt;Expr&gt;&amp; multiTrigger) {
<a name="l01775"></a>01775   e.<a class="code" href="group__ExprPkg.html#ga91a460603cf210681cfdec52a98fa076">setMultiTrigger</a>(multiTrigger);
<a name="l01776"></a>01776 }
<a name="l01777"></a>01777 
<a name="l01778"></a><a class="code" href="classCVC3_1_1VCL.html#a31a2891fc46ffcc5defeb229e2a12d07">01778</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::existsExpr(<span class="keyword">const</span> vector&lt;Expr&gt;&amp; vars, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; body) {
<a name="l01779"></a>01779   <span class="keywordflow">return</span> d_em-&gt;newClosureExpr(<a class="code" href="kinds_8h.html#aa10c9e8951b8ccf714a59ec321bdac5ba3197625a1bb2264943f5a95f236d9973">EXISTS</a>, vars, body);
<a name="l01780"></a>01780 }
<a name="l01781"></a>01781 
<a name="l01782"></a>01782 
<a name="l01783"></a><a class="code" href="classCVC3_1_1VCL.html#a9cdd152a9dc4d6b69a3abb7c48ce9151">01783</a> <a class="code" href="classCVC3_1_1Op.html">Op</a> VCL::lambdaExpr(<span class="keyword">const</span> vector&lt;Expr&gt;&amp; vars, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; body) {
<a name="l01784"></a>01784   <span class="keywordflow">return</span> d_em-&gt;newClosureExpr(<a class="code" href="kinds_8h.html#aa10c9e8951b8ccf714a59ec321bdac5ba40176493726a127184ca47ea6352dc1f">LAMBDA</a>, vars, body).mkOp();
<a name="l01785"></a>01785 }
<a name="l01786"></a>01786 
<a name="l01787"></a><a class="code" href="classCVC3_1_1VCL.html#a71d76efee21313adcdf56240c27745ab">01787</a> <a class="code" href="classCVC3_1_1Op.html">Op</a> VCL::transClosure(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Op.html">Op</a>&amp; op) {
<a name="l01788"></a>01788   <span class="keyword">const</span> <span class="keywordtype">string</span>&amp; name = op.<a class="code" href="classCVC3_1_1Op.html#a4a38071541d1e863583f12e9d81de3a2">getExpr</a>().<a class="code" href="group__ExprPkg.html#gaa3023d9117f249f079b0a202a1dfc5c2">getName</a>();
<a name="l01789"></a>01789   <span class="keywordflow">return</span> d_em-&gt;newSymbolExpr(name, <a class="code" href="namespaceCVC3.html#afaaef5e303e3d0aec4e1874b5ef2923aa5d779af6a0a27075487337bf4ec8e92a">TRANS_CLOSURE</a>).mkOp();
<a name="l01790"></a>01790 }
<a name="l01791"></a>01791 
<a name="l01792"></a>01792 
<a name="l01793"></a><a class="code" href="classCVC3_1_1VCL.html#a9ab50d02ab11cfd598cdc9b6684b7758">01793</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::simulateExpr(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; f, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; s0,
<a name="l01794"></a>01794            <span class="keyword">const</span> vector&lt;Expr&gt;&amp; inputs, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; n) {
<a name="l01795"></a>01795   vector&lt;Expr&gt; kids;
<a name="l01796"></a>01796   kids.push_back(f);
<a name="l01797"></a>01797   kids.push_back(s0);
<a name="l01798"></a>01798   kids.insert(kids.end(), inputs.begin(), inputs.end());
<a name="l01799"></a>01799   kids.push_back(n);
<a name="l01800"></a>01800   <span class="keywordflow">return</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>(<a class="code" href="kinds_8h.html#aa10c9e8951b8ccf714a59ec321bdac5baa1022ff97dac8e2d5d80d53c4cecd132">SIMULATE</a>, kids);
<a name="l01801"></a>01801 }
<a name="l01802"></a>01802 
<a name="l01803"></a>01803 
<a name="l01804"></a><a class="code" href="classCVC3_1_1VCL.html#a1564c391386056f59b20973e3436c9ae">01804</a> <span class="keywordtype">void</span> VCL::setResourceLimit(<span class="keywordtype">unsigned</span> limit)
<a name="l01805"></a>01805 {
<a name="l01806"></a>01806   d_theoryCore-&gt;setResourceLimit(limit);
<a name="l01807"></a>01807 }
<a name="l01808"></a>01808 
<a name="l01809"></a>01809 
<a name="l01810"></a><a class="code" href="classCVC3_1_1VCL.html#ae3fdb7172562507072fb05f19561e7ef">01810</a> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> VCL::checkTCC(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; tcc)
<a name="l01811"></a>01811 {
<a name="l01812"></a>01812   <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> tccThm;
<a name="l01813"></a>01813   d_se-&gt;push();
<a name="l01814"></a>01814   <a class="code" href="namespaceCVC3.html#a060d21b3207cc3471e24f8dbcff3498b">QueryResult</a> res = d_se-&gt;checkValid(tcc, tccThm);
<a name="l01815"></a>01815   <span class="keywordflow">switch</span> (res) {
<a name="l01816"></a>01816     <span class="keywordflow">case</span> <a class="code" href="namespaceCVC3.html#a060d21b3207cc3471e24f8dbcff3498ba24f8f4860dbe6fd65883a9d7cbd2f576">VALID</a>:
<a name="l01817"></a>01817       d_lastQueryTCC = tccThm;
<a name="l01818"></a>01818       d_se-&gt;pop();
<a name="l01819"></a>01819       <span class="keywordflow">break</span>;
<a name="l01820"></a>01820     <span class="keywordflow">case</span> <a class="code" href="namespaceCVC3.html#a060d21b3207cc3471e24f8dbcff3498baa6ad39c124f561d934d94b371db2d819">INVALID</a>:
<a name="l01821"></a>01821       <span class="keywordflow">throw</span> <a class="code" href="classCVC3_1_1TypecheckException.html">TypecheckException</a>(<span class="stringliteral">&quot;Failed TCC:\n\n  &quot;</span>
<a name="l01822"></a>01822                                +tcc.<a class="code" href="group__ExprPkg.html#gaf3028bb1619f8cc69b66ec712e1adb54" title="Print the expression to a string.">toString</a>()
<a name="l01823"></a>01823                                +<span class="stringliteral">&quot;\n\nWhich simplified to:\n\n  &quot;</span>
<a name="l01824"></a>01824                                +simplify(tcc).toString()
<a name="l01825"></a>01825                                +<span class="stringliteral">&quot;\n\nAnd the last formula is not valid &quot;</span>
<a name="l01826"></a>01826                                <span class="stringliteral">&quot;in the current context.&quot;</span>);
<a name="l01827"></a>01827     <span class="keywordflow">case</span> <a class="code" href="namespaceCVC3.html#a060d21b3207cc3471e24f8dbcff3498ba33046505033fa14ebb412efb4474ff56">ABORT</a>:
<a name="l01828"></a>01828       <span class="keywordflow">throw</span> <a class="code" href="classCVC3_1_1TypecheckException.html">TypecheckException</a>(<span class="stringliteral">&quot;Budget exceeded:\n\n  &quot;</span>
<a name="l01829"></a>01829                                <span class="stringliteral">&quot;Unable to verify TCC:\n\n  &quot;</span>
<a name="l01830"></a>01830                                +tcc.<a class="code" href="group__ExprPkg.html#gaf3028bb1619f8cc69b66ec712e1adb54" title="Print the expression to a string.">toString</a>()
<a name="l01831"></a>01831                                +<span class="stringliteral">&quot;\n\nWhich simplified to:\n\n  &quot;</span>
<a name="l01832"></a>01832                                +simplify(tcc).toString());
<a name="l01833"></a>01833     <span class="keywordflow">case</span> <a class="code" href="xchaff__base_8h.html#a915d220aba4527d1e33010bdfcbc6855a6ce26a62afab55d7606ad4e92428b30c">UNKNOWN</a>:
<a name="l01834"></a>01834       <span class="keywordflow">throw</span> <a class="code" href="classCVC3_1_1TypecheckException.html">TypecheckException</a>(<span class="stringliteral">&quot;Result unknown:\n\n  &quot;</span>
<a name="l01835"></a>01835                                <span class="stringliteral">&quot;Unable to verify TCC:\n\n  &quot;</span>
<a name="l01836"></a>01836                                +tcc.<a class="code" href="group__ExprPkg.html#gaf3028bb1619f8cc69b66ec712e1adb54" title="Print the expression to a string.">toString</a>()
<a name="l01837"></a>01837                                +<span class="stringliteral">&quot;\n\nWhich simplified to:\n\n  &quot;</span>
<a name="l01838"></a>01838                                +simplify(tcc).toString()
<a name="l01839"></a>01839                                +<span class="stringliteral">&quot;\n\nAnd the last formula is unknown &quot;</span>
<a name="l01840"></a>01840                                <span class="stringliteral">&quot;in the current context.&quot;</span>);
<a name="l01841"></a>01841     <span class="keywordflow">default</span>:
<a name="l01842"></a>01842       <a class="code" href="debug_8h.html#a2637b2fffa22e3c9fad40cda8fcc3bce" title="If something goes horribly wrong, print a message and abort immediately with exit(1).">FatalAssert</a>(<span class="keyword">false</span>, <span class="stringliteral">&quot;Unexpected case&quot;</span>);
<a name="l01843"></a>01843   }
<a name="l01844"></a>01844   <span class="keywordflow">return</span> tccThm;
<a name="l01845"></a>01845 }
<a name="l01846"></a>01846 
<a name="l01847"></a>01847 
<a name="l01848"></a><a class="code" href="classCVC3_1_1VCL.html#aea0cd6db38e63d1c40bf79f21251566c">01848</a> <span class="keywordtype">void</span> VCL::assertFormula(<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="l01849"></a>01849 {
<a name="l01850"></a>01850   <span class="keywordflow">if</span> (getFlags()[<span class="stringliteral">&quot;no-save-model&quot;</span>].getBool() &amp;&amp; d_modelStackPushed) {
<a name="l01851"></a>01851     d_modelStackPushed = <span class="keyword">false</span>;
<a name="l01852"></a>01852     <a class="code" href="group__ExprStream__Manip.html#gaddb050a787be87116afc51791293d3be" title="Restore the indentation.">pop</a>();
<a name="l01853"></a>01853   }
<a name="l01854"></a>01854 
<a name="l01855"></a>01855   <span class="comment">// Typecheck the user input</span>
<a name="l01856"></a>01856   <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#a38bba404056eadf3c283a67ab2347e02">isBool</a>()) {
<a name="l01857"></a>01857     <span class="keywordflow">throw</span> <a class="code" href="classCVC3_1_1TypecheckException.html">TypecheckException</a>(<span class="stringliteral">&quot;Non-BOOLEAN formula in ASSERT:\n  &quot;</span>
<a name="l01858"></a>01858            +<a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>(<a class="code" href="kinds_8h.html#aa10c9e8951b8ccf714a59ec321bdac5ba61d9e0e93eb9635173764c5ba45666f1">ASSERT</a>, e).toString()
<a name="l01859"></a>01859            +<span class="stringliteral">&quot;\nDerived type of the formula:\n  &quot;</span>
<a name="l01860"></a>01860            +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="l01861"></a>01861   }
<a name="l01862"></a>01862 
<a name="l01863"></a>01863   <span class="keywordflow">if</span> (getFlags()[<span class="stringliteral">&quot;pp-batch&quot;</span>].getBool()) {
<a name="l01864"></a>01864     d_batchedAssertions-&gt;push_back(e);
<a name="l01865"></a>01865   }
<a name="l01866"></a>01866   <span class="keywordflow">else</span> {
<a name="l01867"></a>01867     <span class="comment">// Check if the ofstream is open (as opposed to the command line flag)</span>
<a name="l01868"></a>01868     <span class="keywordflow">if</span>(d_dump) {
<a name="l01869"></a>01869       <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> e2 = e;
<a name="l01870"></a>01870       <span class="keywordflow">if</span> (getFlags()[<span class="stringliteral">&quot;preSimplify&quot;</span>].getBool()) {
<a name="l01871"></a>01871         e2 = d_theoryCore-&gt;getExprTrans()-&gt;preprocess(e).getRHS();
<a name="l01872"></a>01872       }
<a name="l01873"></a>01873       <span class="keywordflow">if</span> (d_translator-&gt;dumpAssertion(e2)) <span class="keywordflow">return</span>;
<a name="l01874"></a>01874     }
<a name="l01875"></a>01875 
<a name="l01876"></a>01876     <a class="code" href="kinds_8h.html#aa10c9e8951b8ccf714a59ec321bdac5ba7fa27e82c6c4f69434225ed81e5d151e">TRACE</a>(<span class="stringliteral">&quot;vclassertFormula&quot;</span>, <span class="stringliteral">&quot;VCL::assertFormula(&quot;</span>, e, <span class="stringliteral">&quot;) {&quot;</span>);
<a name="l01877"></a>01877 
<a name="l01878"></a>01878     <span class="comment">// See if e was already asserted before</span>
<a name="l01879"></a>01879     <span class="keywordflow">if</span>(d_userAssertions-&gt;count(e) &gt; 0) {
<a name="l01880"></a>01880       <a class="code" href="debug_8h.html#ad64155edafde9f067f4868817cd04bdf">TRACE_MSG</a>(<span class="stringliteral">&quot;vclassertFormula&quot;</span>, <span class="stringliteral">&quot;VCL::assertFormula[repeated assertion] =&gt; }&quot;</span>);
<a name="l01881"></a>01881       <span class="keywordflow">return</span>;
<a name="l01882"></a>01882     }
<a name="l01883"></a>01883     <span class="comment">// Check the validity of the TCC</span>
<a name="l01884"></a>01884     <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> tccThm;
<a name="l01885"></a>01885     <span class="keywordflow">if</span>(getFlags()[<span class="stringliteral">&quot;tcc&quot;</span>].getBool()) {
<a name="l01886"></a>01886       <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> tcc(d_theoryCore-&gt;getTCC(e));
<a name="l01887"></a>01887       tccThm = checkTCC(tcc);
<a name="l01888"></a>01888     }
<a name="l01889"></a>01889 
<a name="l01890"></a>01890     <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> thm = d_se-&gt;newUserAssumption(e);
<a name="l01891"></a>01891     (*d_userAssertions)[e] = <a class="code" href="classCVC3_1_1VCL_1_1UserAssertion.html" title="Structure to hold user assertions indexed by declaration order.">UserAssertion</a>(thm, tccThm, d_nextIdx++);
<a name="l01892"></a>01892   }
<a name="l01893"></a>01893   <a class="code" href="debug_8h.html#ad64155edafde9f067f4868817cd04bdf">TRACE_MSG</a>(<span class="stringliteral">&quot;vclassertFormula&quot;</span>, <span class="stringliteral">&quot;VCL::assertFormula =&gt; }&quot;</span>);
<a name="l01894"></a>01894 }
<a name="l01895"></a>01895 
<a name="l01896"></a>01896 
<a name="l01897"></a><a class="code" href="classCVC3_1_1VCL.html#a54c9ceeaa6e94edd5af791d4fec621f5">01897</a> <span class="keywordtype">void</span> VCL::registerAtom(<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="l01898"></a>01898 {
<a name="l01899"></a>01899   <span class="comment">//TODO: add to interactive interface</span>
<a name="l01900"></a>01900   d_se-&gt;registerAtom(e);
<a name="l01901"></a>01901 }
<a name="l01902"></a>01902 
<a name="l01903"></a>01903 
<a name="l01904"></a><a class="code" href="classCVC3_1_1VCL.html#af6906b893f5e64392d83664cc977a5cd">01904</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::getImpliedLiteral()
<a name="l01905"></a>01905 {
<a name="l01906"></a>01906   <span class="comment">//TODO: add to interactive interface</span>
<a name="l01907"></a>01907   <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> thm = d_se-&gt;getImpliedLiteral();
<a name="l01908"></a>01908   <span class="keywordflow">if</span> (thm.<a class="code" href="classCVC3_1_1Theorem.html#afc6fdb0507eb3669e28d9be5ed0bd333">isNull</a>()) <span class="keywordflow">return</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>();
<a name="l01909"></a>01909   <span class="keywordflow">return</span> thm.<a class="code" href="classCVC3_1_1Theorem.html#af2b97ae5d270ddf1013bf4f3867a7e5d">getExpr</a>();
<a name="l01910"></a>01910 }
<a name="l01911"></a>01911 
<a name="l01912"></a>01912 
<a name="l01913"></a><a class="code" href="classCVC3_1_1VCL.html#a21bd43458adee37cf07946df6801c06f">01913</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::simplify(<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="l01914"></a>01914   <span class="comment">//TODO: add to interactive interface</span>
<a name="l01915"></a>01915   <span class="keywordflow">return</span> simplifyThm(e).getRHS();
<a name="l01916"></a>01916 }
<a name="l01917"></a>01917 
<a name="l01918"></a>01918 
<a name="l01919"></a><a class="code" href="classCVC3_1_1VCL.html#a0d31184262b06af8779994646ce18eaf">01919</a> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> VCL::simplifyThm(<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="l01920"></a>01920 {
<a name="l01921"></a>01921   e.<a class="code" href="group__ExprPkg.html#ga42929221eb172250697b72c28af6de07" title="Get the type. Recursively compute if necessary.">getType</a>();
<a name="l01922"></a>01922   <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> res = d_theoryCore-&gt;getExprTrans()-&gt;preprocess(e);
<a name="l01923"></a>01923   <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> simpThm =  d_theoryCore-&gt;simplify(res.<a class="code" href="classCVC3_1_1Theorem.html#a97d957fcbf9094480851b1d2e5d3729f">getRHS</a>());
<a name="l01924"></a>01924   res = d_theoryCore-&gt;transitivityRule(res, simpThm);
<a name="l01925"></a>01925   <span class="keywordflow">return</span> res;
<a name="l01926"></a>01926 }
<a name="l01927"></a>01927 
<a name="l01928"></a>01928 
<a name="l01929"></a><a class="code" href="classCVC3_1_1VCL.html#aebafad6eace10f8aa2687cc6c600c53e">01929</a> <a class="code" href="namespaceCVC3.html#a060d21b3207cc3471e24f8dbcff3498b">QueryResult</a> VCL::query(<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="l01930"></a>01930 {
<a name="l01931"></a>01931   <a class="code" href="kinds_8h.html#aa10c9e8951b8ccf714a59ec321bdac5ba7fa27e82c6c4f69434225ed81e5d151e">TRACE</a>(<span class="stringliteral">&quot;query&quot;</span>, <span class="stringliteral">&quot;VCL::query(&quot;</span>, e,<span class="stringliteral">&quot;) {&quot;</span>);
<a name="l01932"></a>01932 
<a name="l01933"></a>01933   <span class="keywordflow">if</span> (getFlags()[<span class="stringliteral">&quot;no-save-model&quot;</span>].getBool()) {
<a name="l01934"></a>01934     <span class="keywordflow">if</span>(d_modelStackPushed) {
<a name="l01935"></a>01935       d_modelStackPushed = <span class="keyword">false</span>;
<a name="l01936"></a>01936       <a class="code" href="group__ExprStream__Manip.html#gaddb050a787be87116afc51791293d3be" title="Restore the indentation.">pop</a>();
<a name="l01937"></a>01937     }
<a name="l01938"></a>01938     <a class="code" href="group__ExprStream__Manip.html#ga2a0348c6d3f94f2f8febc6dd0a9c3218" title="Set the indentation to the current position.">push</a>();
<a name="l01939"></a>01939     d_modelStackPushed = <span class="keyword">true</span>;
<a name="l01940"></a>01940   }
<a name="l01941"></a>01941 
<a name="l01942"></a>01942   <span class="comment">// Typecheck the user input</span>
<a name="l01943"></a>01943   <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#a38bba404056eadf3c283a67ab2347e02">isBool</a>()) {
<a name="l01944"></a>01944     <span class="keywordflow">throw</span> <a class="code" href="classCVC3_1_1TypecheckException.html">TypecheckException</a>(<span class="stringliteral">&quot;Non-BOOLEAN formula in QUERY:\n  &quot;</span>
<a name="l01945"></a>01945            +<a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>(<a class="code" href="kinds_8h.html#aa10c9e8951b8ccf714a59ec321bdac5ba21043ddfa5289b4cf14cd4e3f5a89b62">QUERY</a>, e).toString()
<a name="l01946"></a>01946            +<span class="stringliteral">&quot;\nDerived type of the formula:\n  &quot;</span>
<a name="l01947"></a>01947            +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="l01948"></a>01948   }
<a name="l01949"></a>01949 
<a name="l01950"></a>01950   <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> qExpr = e;
<a name="l01951"></a>01951   <span class="keywordflow">if</span> (getFlags()[<span class="stringliteral">&quot;pp-batch&quot;</span>].getBool()) {
<a name="l01952"></a>01952     <span class="comment">// Add batched assertions</span>
<a name="l01953"></a>01953     vector&lt;Expr&gt; kids;
<a name="l01954"></a>01954     <span class="keywordflow">for</span> (; (*d_batchedAssertionsIdx) &lt; d_batchedAssertions-&gt;size();
<a name="l01955"></a>01955          (*d_batchedAssertionsIdx) = (*d_batchedAssertionsIdx) + 1) {
<a name="l01956"></a>01956       kids.push_back((*d_batchedAssertions)[(*d_batchedAssertionsIdx)]);
<a name="l01957"></a>01957     }
<a name="l01958"></a>01958     <span class="keywordflow">if</span> (kids.size() &gt; 0) {
<a name="l01959"></a>01959       qExpr = kids.size() == 1 ? kids[0] : <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>(<a class="code" href="kinds_8h.html#aa10c9e8951b8ccf714a59ec321bdac5ba865555c9f2e0458a7078486aa1b3254f">AND</a>, kids);
<a name="l01960"></a>01960       qExpr = qExpr.<a class="code" href="group__ExprPkg.html#ga8dd97bcdeb9d8870238f94a263fd083b">impExpr</a>(e);
<a name="l01961"></a>01961     }
<a name="l01962"></a>01962   }
<a name="l01963"></a>01963 
<a name="l01964"></a>01964   <span class="keywordflow">if</span> (d_dump &amp;&amp; !getFlags()[<span class="stringliteral">&quot;dump-tcc&quot;</span>].getBool()) {
<a name="l01965"></a>01965     <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> e2 = qExpr;
<a name="l01966"></a>01966     <span class="keywordflow">if</span> (getFlags()[<span class="stringliteral">&quot;preSimplify&quot;</span>].getBool()) {
<a name="l01967"></a>01967       e2 = d_theoryCore-&gt;getExprTrans()-&gt;preprocess(qExpr).getRHS();
<a name="l01968"></a>01968     }
<a name="l01969"></a>01969     <span class="keywordflow">if</span> (d_translator-&gt;dumpQuery(e2)) <span class="keywordflow">return</span> <a class="code" href="xchaff__base_8h.html#a915d220aba4527d1e33010bdfcbc6855a6ce26a62afab55d7606ad4e92428b30c">UNKNOWN</a>;
<a name="l01970"></a>01970   }
<a name="l01971"></a>01971 
<a name="l01972"></a>01972   <span class="comment">// Check the validity of the TCC</span>
<a name="l01973"></a>01973   <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> tccThm = d_se-&gt;getCommonRules()-&gt;trueTheorem();
<a name="l01974"></a>01974   <span class="keywordflow">if</span>(getFlags()[<span class="stringliteral">&quot;tcc&quot;</span>].getBool()) {
<a name="l01975"></a>01975     <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> tcc(d_theoryCore-&gt;getTCC(qExpr));
<a name="l01976"></a>01976     <span class="keywordflow">if</span> (getFlags()[<span class="stringliteral">&quot;dump-tcc&quot;</span>].getBool()) {
<a name="l01977"></a>01977       <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> e2 = tcc;
<a name="l01978"></a>01978       <span class="keywordflow">if</span> (getFlags()[<span class="stringliteral">&quot;preSimplify&quot;</span>].getBool()) {
<a name="l01979"></a>01979         e2 = d_theoryCore-&gt;getExprTrans()-&gt;preprocess(tcc).getRHS();
<a name="l01980"></a>01980       }
<a name="l01981"></a>01981       <span class="keywordflow">if</span> (d_translator-&gt;dumpQuery(e2)) <span class="keywordflow">return</span> <a class="code" href="xchaff__base_8h.html#a915d220aba4527d1e33010bdfcbc6855a6ce26a62afab55d7606ad4e92428b30c">UNKNOWN</a>;
<a name="l01982"></a>01982     }
<a name="l01983"></a>01983     <span class="comment">// FIXME: we have to guarantee that the TCC of &#39;tcc&#39; is always valid</span>
<a name="l01984"></a>01984     tccThm = checkTCC(tcc);
<a name="l01985"></a>01985   }
<a name="l01986"></a>01986   <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> res;
<a name="l01987"></a>01987   <a class="code" href="namespaceCVC3.html#a060d21b3207cc3471e24f8dbcff3498b">QueryResult</a> qres = d_se-&gt;checkValid(qExpr, res);
<a name="l01988"></a>01988   <span class="keywordflow">switch</span> (qres) {
<a name="l01989"></a>01989     <span class="keywordflow">case</span> <a class="code" href="namespaceCVC3.html#a060d21b3207cc3471e24f8dbcff3498ba24f8f4860dbe6fd65883a9d7cbd2f576">VALID</a>:
<a name="l01990"></a>01990       d_lastQuery = d_se-&gt;getCommonRules()-&gt;queryTCC(res, tccThm);
<a name="l01991"></a>01991       <span class="keywordflow">break</span>;
<a name="l01992"></a>01992     <span class="keywordflow">default</span>:
<a name="l01993"></a>01993       d_lastQueryTCC = <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a>();
<a name="l01994"></a>01994       d_lastQuery = <a class="code" href="classCVC3_1_1Theorem3.html" title="Theorem3.">Theorem3</a>();
<a name="l01995"></a>01995       d_lastClosure = <a class="code" href="classCVC3_1_1Theorem3.html" title="Theorem3.">Theorem3</a>();
<a name="l01996"></a>01996   }
<a name="l01997"></a>01997   <a class="code" href="kinds_8h.html#aa10c9e8951b8ccf714a59ec321bdac5ba7fa27e82c6c4f69434225ed81e5d151e">TRACE</a>(<span class="stringliteral">&quot;query&quot;</span>, <span class="stringliteral">&quot;VCL::query =&gt; &quot;</span>,
<a name="l01998"></a>01998         qres == <a class="code" href="namespaceCVC3.html#a060d21b3207cc3471e24f8dbcff3498ba24f8f4860dbe6fd65883a9d7cbd2f576">VALID</a> ? <span class="stringliteral">&quot;VALID&quot;</span> :
<a name="l01999"></a>01999         qres == <a class="code" href="namespaceCVC3.html#a060d21b3207cc3471e24f8dbcff3498baa6ad39c124f561d934d94b371db2d819">INVALID</a> ? <span class="stringliteral">&quot;INVALID&quot;</span> :
<a name="l02000"></a>02000         qres == <a class="code" href="namespaceCVC3.html#a060d21b3207cc3471e24f8dbcff3498ba33046505033fa14ebb412efb4474ff56">ABORT</a> ? <span class="stringliteral">&quot;ABORT&quot;</span> : <span class="stringliteral">&quot;UNKNOWN&quot;</span>, <span class="stringliteral">&quot; }&quot;</span>);
<a name="l02001"></a>02001 
<a name="l02002"></a>02002   <span class="keywordflow">if</span> (d_dump) d_translator-&gt;dumpQueryResult(qres);
<a name="l02003"></a>02003 
<a name="l02004"></a>02004   <span class="keywordflow">return</span> qres;
<a name="l02005"></a>02005 }
<a name="l02006"></a>02006 
<a name="l02007"></a>02007 
<a name="l02008"></a><a class="code" href="classCVC3_1_1VCL.html#a5f4dea7a2339b50b34ddb6514a028130">02008</a> <a class="code" href="namespaceCVC3.html#a060d21b3207cc3471e24f8dbcff3498b">QueryResult</a> VCL::checkUnsat(<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="l02009"></a>02009 {
<a name="l02010"></a>02010   <span class="keywordflow">return</span> query(e.<a class="code" href="group__ExprPkg.html#gab1ce461dc931af73bf04e88c8d37dcbc">negate</a>());
<a name="l02011"></a>02011 }
<a name="l02012"></a>02012 
<a name="l02013"></a>02013 
<a name="l02014"></a><a class="code" href="classCVC3_1_1VCL.html#af4f8f201c7915eb1f762612375e6ccec">02014</a> <a class="code" href="namespaceCVC3.html#a060d21b3207cc3471e24f8dbcff3498b">QueryResult</a> VCL::checkContinue()
<a name="l02015"></a>02015 {
<a name="l02016"></a>02016   <span class="keywordflow">if</span>(d_dump) {
<a name="l02017"></a>02017     d_translator-&gt;dump(d_em-&gt;newLeafExpr(<a class="code" href="kinds_8h.html#aa10c9e8951b8ccf714a59ec321bdac5ba49959dd441dcda75d6898cf2c68fb374">CONTINUE</a>), <span class="keyword">true</span>);
<a name="l02018"></a>02018   }
<a name="l02019"></a>02019   vector&lt;Expr&gt; assertions;
<a name="l02020"></a>02020   d_se-&gt;getCounterExample(assertions);
<a name="l02021"></a>02021   <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> thm;
<a name="l02022"></a>02022   <span class="keywordflow">if</span> (assertions.size() == 0) {
<a name="l02023"></a>02023     <span class="keywordflow">return</span> d_se-&gt;restart(falseExpr(), thm);
<a name="l02024"></a>02024   }
<a name="l02025"></a>02025   <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> eAnd = assertions.size() == 1 ? assertions[0] : <a class="code" href="namespaceCVC3.html#ad4258158bba138eb54b9080af7f8223a">andExpr</a>(assertions);
<a name="l02026"></a>02026   <span class="keywordflow">return</span> d_se-&gt;restart(!eAnd, thm);
<a name="l02027"></a>02027 }
<a name="l02028"></a>02028 
<a name="l02029"></a>02029 
<a name="l02030"></a><a class="code" href="classCVC3_1_1VCL.html#afd3d88e7e58e6098c9f570fc7e812547">02030</a> <a class="code" href="namespaceCVC3.html#a060d21b3207cc3471e24f8dbcff3498b">QueryResult</a> VCL::restart(<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="l02031"></a>02031 {
<a name="l02032"></a>02032   <span class="keywordflow">if</span> (d_dump) {
<a name="l02033"></a>02033     d_translator-&gt;dump(<a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>(<a class="code" href="kinds_8h.html#aa10c9e8951b8ccf714a59ec321bdac5ba262553c759e1d1a9398bc406b1fadcb7">RESTART</a>, e), <span class="keyword">true</span>);
<a name="l02034"></a>02034   }
<a name="l02035"></a>02035   <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> thm;
<a name="l02036"></a>02036   <span class="keywordflow">return</span> d_se-&gt;restart(e, thm);
<a name="l02037"></a>02037 }
<a name="l02038"></a>02038 
<a name="l02039"></a>02039 
<a name="l02040"></a><a class="code" href="classCVC3_1_1VCL.html#af2cf35f9a462d155002d5684c817052f">02040</a> <span class="keywordtype">void</span> VCL::returnFromCheck()
<a name="l02041"></a>02041 {
<a name="l02042"></a>02042   <span class="comment">//TODO: add to interactive interface</span>
<a name="l02043"></a>02043   d_se-&gt;returnFromCheck();
<a name="l02044"></a>02044 }
<a name="l02045"></a>02045 
<a name="l02046"></a>02046 
<a name="l02047"></a><a class="code" href="classCVC3_1_1VCL.html#ace44061f3aa2cb7653f03b3ae7befe61">02047</a> <span class="keywordtype">void</span> VCL::getUserAssumptions(vector&lt;Expr&gt;&amp; assumptions)
<a name="l02048"></a>02048 {
<a name="l02049"></a>02049   <span class="comment">// TODO: add to interactive interface</span>
<a name="l02050"></a>02050   d_se-&gt;getUserAssumptions(assumptions);
<a name="l02051"></a>02051 }
<a name="l02052"></a>02052 
<a name="l02053"></a>02053 
<a name="l02054"></a><a class="code" href="classCVC3_1_1VCL.html#a6892f923575572e122a09b706a7f21fb">02054</a> <span class="keywordtype">void</span> VCL::getInternalAssumptions(vector&lt;Expr&gt;&amp; assumptions)
<a name="l02055"></a>02055 {
<a name="l02056"></a>02056   <span class="comment">// TODO: add to interactive interface</span>
<a name="l02057"></a>02057   d_se-&gt;getInternalAssumptions(assumptions);
<a name="l02058"></a>02058 }
<a name="l02059"></a>02059 
<a name="l02060"></a>02060 
<a name="l02061"></a><a class="code" href="classCVC3_1_1VCL.html#a85b907166d3a2400e9ced227a5133d51">02061</a> <span class="keywordtype">void</span> VCL::getAssumptions(vector&lt;Expr&gt;&amp; assumptions)
<a name="l02062"></a>02062 {
<a name="l02063"></a>02063   <span class="keywordflow">if</span>(d_dump) {
<a name="l02064"></a>02064     d_translator-&gt;dump(d_em-&gt;newLeafExpr(<a class="code" href="kinds_8h.html#aa10c9e8951b8ccf714a59ec321bdac5bab65def84e41af84db85737a6eb8dc748">ASSUMPTIONS</a>), <span class="keyword">true</span>);
<a name="l02065"></a>02065   }
<a name="l02066"></a>02066   d_se-&gt;getAssumptions(assumptions);
<a name="l02067"></a>02067 }
<a name="l02068"></a>02068 
<a name="l02069"></a>02069 
<a name="l02070"></a>02070 <span class="comment">//yeting, for proof translation</span>
<a name="l02071"></a><a class="code" href="classCVC3_1_1VCL.html#a42476ddbf6bbc848404e7e86c1e9976b">02071</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::getProofQuery()
<a name="l02072"></a>02072 {
<a name="l02073"></a>02073   <span class="keywordflow">if</span> (d_lastQuery.isNull()){
<a name="l02074"></a>02074     <span class="keywordflow">throw</span> <a class="code" href="classCVC3_1_1EvalException.html">EvalException</a>
<a name="l02075"></a>02075       (<span class="stringliteral">&quot;Invalid Query,n&quot;</span>);
<a name="l02076"></a>02076   }
<a name="l02077"></a>02077   <span class="keywordflow">return</span> d_lastQuery.getExpr();
<a name="l02078"></a>02078 
<a name="l02079"></a>02079   <span class="comment">//  Theorem thm = d_se-&gt;lastThm();</span>
<a name="l02080"></a>02080   <span class="comment">//  if (thm.isNull()) return;</span>
<a name="l02081"></a>02081   <span class="comment">//  thm.getLeafAssumptions(assumptions);</span>
<a name="l02082"></a>02082 }
<a name="l02083"></a>02083 
<a name="l02084"></a>02084 
<a name="l02085"></a><a class="code" href="classCVC3_1_1VCL.html#af4022f5b9fa00e3b497143d3c042547e">02085</a> <span class="keywordtype">void</span> VCL::getAssumptionsUsed(vector&lt;Expr&gt;&amp; assumptions)
<a name="l02086"></a>02086 {
<a name="l02087"></a>02087   <span class="keywordflow">throw</span> <a class="code" href="classCVC3_1_1EvalException.html">EvalException</a> (<span class="stringliteral">&quot;getAssumptionsUsed not currently supported&quot;</span>);
<a name="l02088"></a>02088   <span class="keywordflow">if</span>(d_dump) {
<a name="l02089"></a>02089     d_translator-&gt;dump(d_em-&gt;newLeafExpr(<a class="code" href="kinds_8h.html#aa10c9e8951b8ccf714a59ec321bdac5bab31d3b785074846671439597e155a473">DUMP_ASSUMPTIONS</a>), <span class="keyword">true</span>);
<a name="l02090"></a>02090   }
<a name="l02091"></a>02091   <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> thm = d_se-&gt;lastThm();
<a name="l02092"></a>02092   <span class="keywordflow">if</span> (thm.<a class="code" href="classCVC3_1_1Theorem.html#afc6fdb0507eb3669e28d9be5ed0bd333">isNull</a>()) <span class="keywordflow">return</span>;
<a name="l02093"></a>02093   thm.<a class="code" href="classCVC3_1_1Theorem.html#a524b4dafa4fb8f14742baa856612d92b">getLeafAssumptions</a>(assumptions);
<a name="l02094"></a>02094 }
<a name="l02095"></a>02095 
<a name="l02096"></a>02096 
<a name="l02097"></a><a class="code" href="classCVC3_1_1VCL.html#a78c08c36ccc94ca3222a2ea7ab4fb558">02097</a> <span class="keywordtype">void</span> VCL::getCounterExample(vector&lt;Expr&gt;&amp; assertions, <span class="keywordtype">bool</span> inOrder)
<a name="l02098"></a>02098 {
<a name="l02099"></a>02099   <span class="keywordflow">if</span>(d_dump) {
<a name="l02100"></a>02100     d_translator-&gt;dump(d_em-&gt;newLeafExpr(<a class="code" href="kinds_8h.html#aa10c9e8951b8ccf714a59ec321bdac5ba87ad730e285cf17f4eefb214236a2c7a">COUNTEREXAMPLE</a>), <span class="keyword">true</span>);
<a name="l02101"></a>02101   }
<a name="l02102"></a>02102   <span class="keywordflow">if</span> (!(*d_flags)[<span class="stringliteral">&quot;translate&quot;</span>].getBool())
<a name="l02103"></a>02103     d_se-&gt;getCounterExample(assertions, inOrder);
<a name="l02104"></a>02104 }
<a name="l02105"></a>02105 
<a name="l02106"></a>02106 
<a name="l02107"></a><a class="code" href="classCVC3_1_1VCL.html#a14239feee2666a95a4b4d514d5ce4cb7">02107</a> <span class="keywordtype">void</span> VCL::getConcreteModel(<a class="code" href="classCVC3_1_1ExprMap.html">ExprMap&lt;Expr&gt;</a> &amp; m)
<a name="l02108"></a>02108 {
<a name="l02109"></a>02109   <span class="keywordflow">if</span>(d_dump) {
<a name="l02110"></a>02110     d_translator-&gt;dump(d_em-&gt;newLeafExpr(<a class="code" href="kinds_8h.html#aa10c9e8951b8ccf714a59ec321bdac5baea3d2c8907d2df3f13c0866a7970baaa">COUNTERMODEL</a>), <span class="keyword">true</span>);
<a name="l02111"></a>02111   }
<a name="l02112"></a>02112   <span class="keywordflow">if</span> (!(*d_flags)[<span class="stringliteral">&quot;translate&quot;</span>].getBool())
<a name="l02113"></a>02113     d_se-&gt;getConcreteModel(m);
<a name="l02114"></a>02114 }
<a name="l02115"></a>02115 
<a name="l02116"></a><a class="code" href="classCVC3_1_1VCL.html#a39611be62fadaaeadcd97f84cbc7e162">02116</a> <a class="code" href="namespaceCVC3.html#a060d21b3207cc3471e24f8dbcff3498b">QueryResult</a> VCL::tryModelGeneration() {
<a name="l02117"></a>02117   <span class="keywordflow">if</span> (!d_theoryCore-&gt;incomplete()) <span class="keywordflow">throw</span> <a class="code" href="classCVC3_1_1Exception.html">Exception</a>(<span class="stringliteral">&quot;Model generation should be called only after an UNKNOWN result&quot;</span>);
<a name="l02118"></a>02118   <a class="code" href="namespaceCVC3.html#a060d21b3207cc3471e24f8dbcff3498b">QueryResult</a> qres = <a class="code" href="xchaff__base_8h.html#a915d220aba4527d1e33010bdfcbc6855a6ce26a62afab55d7606ad4e92428b30c">UNKNOWN</a>;
<a name="l02119"></a>02119   <span class="keywordtype">int</span> scopeLevel = d_cm-&gt;scopeLevel();
<a name="l02120"></a>02120   <span class="keywordflow">try</span>  {
<a name="l02121"></a>02121           <span class="keywordflow">while</span> (qres == <a class="code" href="xchaff__base_8h.html#a915d220aba4527d1e33010bdfcbc6855a6ce26a62afab55d7606ad4e92428b30c">UNKNOWN</a>)
<a name="l02122"></a>02122             {
<a name="l02123"></a>02123               <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> thm;
<a name="l02124"></a>02124               d_se-&gt;push();
<a name="l02125"></a>02125               <span class="comment">// Try to generate the model</span>
<a name="l02126"></a>02126               <span class="keywordflow">if</span> (d_se-&gt;tryModelGeneration(thm))
<a name="l02127"></a>02127                 <span class="comment">// If success, we are satisfiable</span>
<a name="l02128"></a>02128                 qres = <a class="code" href="namespaceCVC3.html#a060d21b3207cc3471e24f8dbcff3498baa6ad39c124f561d934d94b371db2d819">INVALID</a>;
<a name="l02129"></a>02129               <span class="keywordflow">else</span>
<a name="l02130"></a>02130                 {
<a name="l02131"></a>02131                   <span class="comment">// Generate the clause to get rid of the faults</span>
<a name="l02132"></a>02132                   vector&lt;Expr&gt; assumptions;
<a name="l02133"></a>02133                   thm.<a class="code" href="classCVC3_1_1Theorem.html#a524b4dafa4fb8f14742baa856612d92b">getLeafAssumptions</a>(assumptions, <span class="keyword">true</span> <span class="comment">/*negate*/</span>);
<a name="l02134"></a>02134                   <span class="keywordflow">if</span> (!thm.<a class="code" href="classCVC3_1_1Theorem.html#af2b97ae5d270ddf1013bf4f3867a7e5d">getExpr</a>().<a class="code" href="group__ExprPkg.html#ga6173f64b22cba76472cd0c814bbf6dae">isFalse</a>()) assumptions.push_back(thm.<a class="code" href="classCVC3_1_1Theorem.html#af2b97ae5d270ddf1013bf4f3867a7e5d">getExpr</a>());
<a name="l02135"></a>02135                   <span class="comment">// Pop back to where we were</span>
<a name="l02136"></a>02136                   <span class="keywordflow">while</span> (d_cm-&gt;scopeLevel() &gt; scopeLevel) d_se-&gt;pop();
<a name="l02137"></a>02137                   <span class="comment">// Restart with the new clause</span>
<a name="l02138"></a>02138                   qres = restart(<a class="code" href="namespaceCVC3.html#a30f30b6e20c174f21ae63acea8618294">orExpr</a>(assumptions));
<a name="l02139"></a>02139                   <span class="comment">// Keep this level</span>
<a name="l02140"></a>02140                   scopeLevel = d_cm-&gt;scopeLevel();
<a name="l02141"></a>02141                 }
<a name="l02142"></a>02142             }
<a name="l02143"></a>02143         } <span class="keywordflow">catch</span> (<a class="code" href="classCVC3_1_1Exception.html">Exception</a>&amp; e) {
<a name="l02144"></a>02144           <span class="comment">// Pop back to where we were</span>
<a name="l02145"></a>02145           <span class="keywordflow">while</span> (d_cm-&gt;scopeLevel() &gt; scopeLevel) d_se-&gt;pop();
<a name="l02146"></a>02146         }
<a name="l02147"></a>02147   <span class="keywordflow">return</span> qres;
<a name="l02148"></a>02148 }
<a name="l02149"></a>02149 
<a name="l02150"></a><a class="code" href="classCVC3_1_1VCL.html#aae01a35fe02e9097aba1277b428c94fc">02150</a> <a class="code" href="namespaceCVC3.html#a9d68f126b86e6fd08b3bc13a511df9bf">FormulaValue</a> VCL::value(<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="l02151"></a>02151   <a class="code" href="debug_8h.html#a40dac3bdb2166ffc852ee8b1489d2b56">DebugAssert</a>(!e.<a class="code" href="group__ExprPkg.html#gad527acb49daef3591b78c748746e7eef" title="Test if e is a term (as opposed to a predicate/formula)">isTerm</a>(), <span class="stringliteral">&quot;vcl::value: e is not a formula&quot;</span>);
<a name="l02152"></a>02152   <span class="keywordflow">return</span> d_se-&gt;getValue(e);
<a name="l02153"></a>02153 }
<a name="l02154"></a>02154 
<a name="l02155"></a><a class="code" href="classCVC3_1_1VCL.html#a0af2aa4f9b6df1bb331eafa9fc4f25a5">02155</a> <span class="keywordtype">bool</span> VCL::inconsistent(vector&lt;Expr&gt;&amp; assumptions)
<a name="l02156"></a>02156 {
<a name="l02157"></a>02157   <span class="comment">// TODO: add to interactive interface</span>
<a name="l02158"></a>02158   <span class="keywordflow">if</span> (d_theoryCore-&gt;inconsistent()) {
<a name="l02159"></a>02159     <span class="comment">// TODO: do we need local getAssumptions?</span>
<a name="l02160"></a>02160     getAssumptions(d_theoryCore-&gt;inconsistentThm().getAssumptionsRef(),
<a name="l02161"></a>02161        assumptions);
<a name="l02162"></a>02162     <span class="keywordflow">return</span> <span class="keyword">true</span>;
<a name="l02163"></a>02163   }
<a name="l02164"></a>02164   <span class="keywordflow">return</span> <span class="keyword">false</span>;
<a name="l02165"></a>02165 }
<a name="l02166"></a>02166 
<a name="l02167"></a><a class="code" href="classCVC3_1_1VCL.html#a459dc08bbf0d900d4f368ab1f40a4cf4">02167</a> <span class="keywordtype">bool</span> VCL::inconsistent()
<a name="l02168"></a>02168 {
<a name="l02169"></a>02169   <span class="keywordflow">return</span> d_theoryCore-&gt;inconsistent();
<a name="l02170"></a>02170 }
<a name="l02171"></a>02171 
<a name="l02172"></a>02172 
<a name="l02173"></a><a class="code" href="classCVC3_1_1VCL.html#abb721e41cd062c4d629db1dbe7c8b23a">02173</a> <span class="keywordtype">bool</span> VCL::incomplete() {
<a name="l02174"></a>02174   <span class="comment">// TODO: add to interactive interface</span>
<a name="l02175"></a>02175   <span class="comment">// Return true only after a failed query</span>
<a name="l02176"></a>02176   <span class="keywordflow">return</span> (d_lastQuery.isNull() &amp;&amp; d_theoryCore-&gt;incomplete());
<a name="l02177"></a>02177 }
<a name="l02178"></a>02178 
<a name="l02179"></a>02179 
<a name="l02180"></a><a class="code" href="classCVC3_1_1VCL.html#ae4c250b81ad25e02b54d283ed6359c35">02180</a> <span class="keywordtype">bool</span> VCL::incomplete(vector&lt;string&gt;&amp; reasons) {
<a name="l02181"></a>02181   <span class="comment">// TODO: add to interactive interface</span>
<a name="l02182"></a>02182   <span class="comment">// Return true only after a failed query</span>
<a name="l02183"></a>02183   <span class="keywordflow">return</span> (d_lastQuery.isNull() &amp;&amp; d_theoryCore-&gt;incomplete(reasons));
<a name="l02184"></a>02184 }
<a name="l02185"></a>02185 
<a name="l02186"></a>02186 
<a name="l02187"></a><a class="code" href="classCVC3_1_1VCL.html#ac251e9ad09e9c1846ba6032f29e5428d">02187</a> <a class="code" href="classCVC3_1_1Proof.html">Proof</a> VCL::getProof()
<a name="l02188"></a>02188 {
<a name="l02189"></a>02189   <span class="keywordflow">if</span>(d_dump) {
<a name="l02190"></a>02190     d_translator-&gt;dump(d_em-&gt;newLeafExpr(<a class="code" href="kinds_8h.html#aa10c9e8951b8ccf714a59ec321bdac5baaa71d9f5a927e04c20c2fe5708f30be2">DUMP_PROOF</a>), <span class="keyword">true</span>);
<a name="l02191"></a>02191   }
<a name="l02192"></a>02192 
<a name="l02193"></a>02193   <span class="keywordflow">if</span>(d_lastQuery.isNull())
<a name="l02194"></a>02194     <span class="keywordflow">throw</span> <a class="code" href="classCVC3_1_1EvalException.html">EvalException</a>
<a name="l02195"></a>02195       (<span class="stringliteral">&quot;Method getProof() (or command DUMP_PROOF)\n&quot;</span>
<a name="l02196"></a>02196        <span class="stringliteral">&quot; must be called only after a Valid QUERY&quot;</span>);
<a name="l02197"></a>02197   <span class="keywordflow">return</span> d_se-&gt;getProof();
<a name="l02198"></a>02198 }
<a name="l02199"></a>02199 
<a name="l02200"></a><a class="code" href="classCVC3_1_1VCL.html#a170bc9df9cdfb20b02256d0779385ecd">02200</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::getAssignment() {
<a name="l02201"></a>02201   <span class="keywordflow">if</span>(d_dump) {
<a name="l02202"></a>02202     d_translator-&gt;dump(d_em-&gt;newLeafExpr(<a class="code" href="kinds_8h.html#aa10c9e8951b8ccf714a59ec321bdac5ba93ac551e3fa00bc3ba324544985e0e07">GET_ASSIGNMENT</a>), <span class="keyword">true</span>);
<a name="l02203"></a>02203   }
<a name="l02204"></a>02204   <span class="keywordflow">return</span> d_theoryCore-&gt;getAssignment();
<a name="l02205"></a>02205 }
<a name="l02206"></a>02206 
<a name="l02207"></a><a class="code" href="classCVC3_1_1VCL.html#af22ef97200024412e3a6b49c88635390">02207</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::getValue(<a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> e) {
<a name="l02208"></a>02208   <span class="keywordflow">if</span>(d_dump) {
<a name="l02209"></a>02209     d_translator-&gt;dump(<a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>(<a class="code" href="kinds_8h.html#aa10c9e8951b8ccf714a59ec321bdac5baf2fb94d1fd1739ad68220e57882efa23">GET_VALUE</a>, e), <span class="keyword">true</span>);
<a name="l02210"></a>02210   }
<a name="l02211"></a>02211   <span class="keywordflow">return</span> simplify(e);
<a name="l02212"></a>02212 }
<a name="l02213"></a>02213 
<a name="l02214"></a><a class="code" href="classCVC3_1_1VCL.html#a9e603f49fd6223ca2ccb6727b205c617">02214</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::getTCC(){
<a name="l02215"></a>02215   <span class="keyword">static</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> null;
<a name="l02216"></a>02216   <span class="keywordflow">if</span>(d_dump) {
<a name="l02217"></a>02217     d_translator-&gt;dump(d_em-&gt;newLeafExpr(<a class="code" href="kinds_8h.html#aa10c9e8951b8ccf714a59ec321bdac5ba0f26f0a2b11e05637f9aede0c3c953a1">DUMP_TCC</a>), <span class="keyword">true</span>);
<a name="l02218"></a>02218   }
<a name="l02219"></a>02219   <span class="keywordflow">if</span>(d_lastQueryTCC.isNull()) <span class="keywordflow">return</span> null;
<a name="l02220"></a>02220   <span class="keywordflow">else</span> <span class="keywordflow">return</span> d_lastQueryTCC.getExpr();
<a name="l02221"></a>02221 }
<a name="l02222"></a>02222 
<a name="l02223"></a>02223 
<a name="l02224"></a><a class="code" href="classCVC3_1_1VCL.html#ad15c979254ddf1bf3d077f299dc85e35">02224</a> <span class="keywordtype">void</span> VCL::getAssumptionsTCC(vector&lt;Expr&gt;&amp; assumptions)
<a name="l02225"></a>02225 {
<a name="l02226"></a>02226   <span class="keywordflow">if</span>(d_dump) {
<a name="l02227"></a>02227     d_translator-&gt;dump(d_em-&gt;newLeafExpr(<a class="code" href="kinds_8h.html#aa10c9e8951b8ccf714a59ec321bdac5ba806bb6dde10ffd8d7e12b01cf8a04421">DUMP_TCC_ASSUMPTIONS</a>), <span class="keyword">true</span>);
<a name="l02228"></a>02228   }
<a name="l02229"></a>02229   <span class="keywordflow">if</span>(d_lastQuery.isNull())
<a name="l02230"></a>02230     <span class="keywordflow">throw</span> <a class="code" href="classCVC3_1_1EvalException.html">EvalException</a>
<a name="l02231"></a>02231       (<span class="stringliteral">&quot;Method getAssumptionsTCC() (or command DUMP_TCC_ASSUMPTIONS)\n&quot;</span>
<a name="l02232"></a>02232        <span class="stringliteral">&quot; must be called only after a Valid QUERY&quot;</span>);
<a name="l02233"></a>02233   getAssumptions(d_lastQueryTCC.getAssumptionsRef(), assumptions);
<a name="l02234"></a>02234 }
<a name="l02235"></a>02235 
<a name="l02236"></a>02236 
<a name="l02237"></a><a class="code" href="classCVC3_1_1VCL.html#a78d06cf8f6910e635224e27d39d1079d">02237</a> <a class="code" href="classCVC3_1_1Proof.html">Proof</a> VCL::getProofTCC() {
<a name="l02238"></a>02238   <span class="keyword">static</span> <a class="code" href="classCVC3_1_1Proof.html">Proof</a> null;
<a name="l02239"></a>02239   <span class="keywordflow">if</span>(d_dump) {
<a name="l02240"></a>02240     d_translator-&gt;dump(d_em-&gt;newLeafExpr(<a class="code" href="kinds_8h.html#aa10c9e8951b8ccf714a59ec321bdac5ba8d86d3a8550f33dfb735dc25813c5794">DUMP_TCC_PROOF</a>), <span class="keyword">true</span>);
<a name="l02241"></a>02241   }
<a name="l02242"></a>02242   <span class="keywordflow">if</span>(d_lastQueryTCC.isNull()) <span class="keywordflow">return</span> null;
<a name="l02243"></a>02243   <span class="keywordflow">else</span> <span class="keywordflow">return</span> d_lastQueryTCC.getProof();
<a name="l02244"></a>02244 }
<a name="l02245"></a>02245 
<a name="l02246"></a>02246 
<a name="l02247"></a><a class="code" href="classCVC3_1_1VCL.html#aef495640a259f901152b5dc43d541633">02247</a> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> VCL::getClosure() {
<a name="l02248"></a>02248   <span class="keyword">static</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> null;
<a name="l02249"></a>02249   <span class="keywordflow">if</span>(d_dump) {
<a name="l02250"></a>02250     d_translator-&gt;dump(d_em-&gt;newLeafExpr(<a class="code" href="kinds_8h.html#aa10c9e8951b8ccf714a59ec321bdac5badbf9b8b24fc59b74bd2b2121aba21e75">DUMP_CLOSURE</a>), <span class="keyword">true</span>);
<a name="l02251"></a>02251   }
<a name="l02252"></a>02252   <span class="keywordflow">if</span>(d_lastClosure.isNull() &amp;&amp; !d_lastQuery.isNull()) {
<a name="l02253"></a>02253     <span class="comment">// Construct the proof of closure and cache it in d_lastClosure</span>
<a name="l02254"></a>02254     d_lastClosure = deriveClosure(d_lastQuery);
<a name="l02255"></a>02255   }
<a name="l02256"></a>02256   <span class="keywordflow">if</span>(d_lastClosure.isNull()) <span class="keywordflow">return</span> null;
<a name="l02257"></a>02257   <span class="keywordflow">else</span> <span class="keywordflow">return</span> d_lastClosure.getExpr();
<a name="l02258"></a>02258 }
<a name="l02259"></a>02259 
<a name="l02260"></a>02260 
<a name="l02261"></a><a class="code" href="classCVC3_1_1VCL.html#ac762d30a06609aa527064eade8241590">02261</a> <a class="code" href="classCVC3_1_1Proof.html">Proof</a> VCL::getProofClosure() {
<a name="l02262"></a>02262   <span class="keyword">static</span> <a class="code" href="classCVC3_1_1Proof.html">Proof</a> null;
<a name="l02263"></a>02263   <span class="keywordflow">if</span>(d_dump) {
<a name="l02264"></a>02264     d_translator-&gt;dump(d_em-&gt;newLeafExpr(<a class="code" href="kinds_8h.html#aa10c9e8951b8ccf714a59ec321bdac5ba2322495bb9d482b215bc6b52df111415">DUMP_CLOSURE_PROOF</a>), <span class="keyword">true</span>);
<a name="l02265"></a>02265   }
<a name="l02266"></a>02266   <span class="keywordflow">if</span>(d_lastClosure.isNull() &amp;&amp; !d_lastQuery.isNull()) {
<a name="l02267"></a>02267     <span class="comment">// Construct the proof of closure and cache it in d_lastClosure</span>
<a name="l02268"></a>02268     d_lastClosure = deriveClosure(d_lastQuery);
<a name="l02269"></a>02269   }
<a name="l02270"></a>02270   <span class="keywordflow">if</span>(d_lastClosure.isNull()) <span class="keywordflow">return</span> null;
<a name="l02271"></a>02271   <span class="keywordflow">else</span> <span class="keywordflow">return</span> d_lastClosure.getProof();
<a name="l02272"></a>02272 }
<a name="l02273"></a>02273 
<a name="l02274"></a>02274 
<a name="l02275"></a><a class="code" href="classCVC3_1_1VCL.html#ac43f348af95c325526a514e5c65d5871">02275</a> <span class="keywordtype">int</span> VCL::stackLevel()
<a name="l02276"></a>02276 {
<a name="l02277"></a>02277   <span class="keywordflow">return</span> d_stackLevel-&gt;get();
<a name="l02278"></a>02278 }
<a name="l02279"></a>02279 
<a name="l02280"></a>02280 
<a name="l02281"></a><a class="code" href="classCVC3_1_1VCL.html#a551314970fbd6bae877a9e634da5e0e8">02281</a> <span class="keywordtype">void</span> <a class="code" href="group__ExprStream__Manip.html#ga2a0348c6d3f94f2f8febc6dd0a9c3218" title="Set the indentation to the current position.">VCL::push</a>()
<a name="l02282"></a>02282 {
<a name="l02283"></a>02283   <span class="keywordflow">if</span> (getFlags()[<span class="stringliteral">&quot;no-save-model&quot;</span>].getBool() &amp;&amp; d_modelStackPushed) {
<a name="l02284"></a>02284     d_modelStackPushed = <span class="keyword">false</span>;
<a name="l02285"></a>02285     <a class="code" href="group__ExprStream__Manip.html#gaddb050a787be87116afc51791293d3be" title="Restore the indentation.">pop</a>();
<a name="l02286"></a>02286   } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (d_dump) {
<a name="l02287"></a>02287     d_translator-&gt;dump(d_em-&gt;newLeafExpr(<a class="code" href="kinds_8h.html#aa10c9e8951b8ccf714a59ec321bdac5bad263caec619c4d99e4684ba0fabd9493">PUSH</a>), <span class="keyword">true</span>);
<a name="l02288"></a>02288   }
<a name="l02289"></a>02289   d_se-&gt;push();
<a name="l02290"></a>02290   d_stackLevel-&gt;set(stackLevel()+1);
<a name="l02291"></a>02291 }
<a name="l02292"></a>02292 
<a name="l02293"></a>02293 
<a name="l02294"></a><a class="code" href="classCVC3_1_1VCL.html#a4ce3054f8f8cc88c5a4933408776d1a6">02294</a> <span class="keywordtype">void</span> <a class="code" href="group__ExprStream__Manip.html#gaddb050a787be87116afc51791293d3be" title="Restore the indentation.">VCL::pop</a>()
<a name="l02295"></a>02295 {
<a name="l02296"></a>02296   <span class="keywordflow">if</span> (getFlags()[<span class="stringliteral">&quot;no-save-model&quot;</span>].getBool() &amp;&amp; d_modelStackPushed) {
<a name="l02297"></a>02297     d_modelStackPushed = <span class="keyword">false</span>;
<a name="l02298"></a>02298     <a class="code" href="group__ExprStream__Manip.html#gaddb050a787be87116afc51791293d3be" title="Restore the indentation.">pop</a>();
<a name="l02299"></a>02299   } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (d_dump) {
<a name="l02300"></a>02300     d_translator-&gt;dump(d_em-&gt;newLeafExpr(<a class="code" href="kinds_8h.html#aa10c9e8951b8ccf714a59ec321bdac5ba061dcf4785583d8653942f2d252174fa">POP</a>), <span class="keyword">true</span>);
<a name="l02301"></a>02301   }
<a name="l02302"></a>02302   <span class="keywordflow">if</span> (stackLevel() == 0) {
<a name="l02303"></a>02303     <span class="keywordflow">throw</span> <a class="code" href="classCVC3_1_1EvalException.html">EvalException</a>
<a name="l02304"></a>02304       (<span class="stringliteral">&quot;POP called with no previous call to PUSH&quot;</span>);
<a name="l02305"></a>02305   }
<a name="l02306"></a>02306   <span class="keywordtype">int</span> level = stackLevel();
<a name="l02307"></a>02307   <span class="keywordflow">while</span> (level == stackLevel())
<a name="l02308"></a>02308     d_se-&gt;pop();
<a name="l02309"></a>02309 }
<a name="l02310"></a>02310 
<a name="l02311"></a>02311 
<a name="l02312"></a><a class="code" href="classCVC3_1_1VCL.html#a330c7d817571648e016de1cfa8f15dea">02312</a> <span class="keywordtype">void</span> VCL::popto(<span class="keywordtype">int</span> toLevel)
<a name="l02313"></a>02313 {
<a name="l02314"></a>02314   <span class="comment">// Check if the ofstream is open (as opposed to the command line flag)</span>
<a name="l02315"></a>02315   <span class="keywordflow">if</span>(d_dump) {
<a name="l02316"></a>02316     d_translator-&gt;dump(<a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>(<a class="code" href="kinds_8h.html#aa10c9e8951b8ccf714a59ec321bdac5ba908bcfbc13c7f414e83641bb9339f31f">POPTO</a>, ratExpr(toLevel, 1)), <span class="keyword">true</span>);
<a name="l02317"></a>02317   }
<a name="l02318"></a>02318   <span class="keywordflow">if</span> (toLevel &lt; 0) toLevel = 0;
<a name="l02319"></a>02319   <span class="keywordflow">while</span> (stackLevel() &gt; toLevel) {
<a name="l02320"></a>02320     d_se-&gt;pop();
<a name="l02321"></a>02321   }
<a name="l02322"></a>02322 }
<a name="l02323"></a>02323 
<a name="l02324"></a>02324 
<a name="l02325"></a><a class="code" href="classCVC3_1_1VCL.html#aad6deac1e5b9eca3637a1e774cd082dc">02325</a> <span class="keywordtype">int</span> VCL::scopeLevel()
<a name="l02326"></a>02326 {
<a name="l02327"></a>02327   <span class="keywordflow">return</span> d_cm-&gt;scopeLevel();
<a name="l02328"></a>02328 }
<a name="l02329"></a>02329 
<a name="l02330"></a>02330 
<a name="l02331"></a><a class="code" href="classCVC3_1_1VCL.html#a2a1a1c5fc74e90b471a6d0fbd7407e21">02331</a> <span class="keywordtype">void</span> VCL::pushScope()
<a name="l02332"></a>02332 {
<a name="l02333"></a>02333   <span class="keywordflow">throw</span> <a class="code" href="classCVC3_1_1EvalException.html">EvalException</a> (<span class="stringliteral">&quot;Scope-level push/pop is no longer supported&quot;</span>);
<a name="l02334"></a>02334   d_cm-&gt;push();
<a name="l02335"></a>02335   <span class="keywordflow">if</span>(d_dump) {
<a name="l02336"></a>02336     d_translator-&gt;dump(d_em-&gt;newLeafExpr(<a class="code" href="kinds_8h.html#aa10c9e8951b8ccf714a59ec321bdac5ba5b5b049bfd6cb81f552222a8aad0dd99">PUSH_SCOPE</a>), <span class="keyword">true</span>);
<a name="l02337"></a>02337   }
<a name="l02338"></a>02338   <a class="code" href="debug_8h.html#a600cb2d68efe7cc413cccbb5714c7016">IF_DEBUG</a>(<span class="keywordflow">if</span>((*d_flags)[<span class="stringliteral">&quot;dump-trace&quot;</span>].getString() != <span class="stringliteral">&quot;&quot;</span>)
<a name="l02339"></a>02339      dumpTrace(scopeLevel());)
<a name="l02340"></a>02340 }
<a name="l02341"></a>02341 
<a name="l02342"></a>02342 
<a name="l02343"></a><a class="code" href="classCVC3_1_1VCL.html#ad44c144ec31ebd2bb327070395d0d7fe">02343</a> <span class="keywordtype">void</span> VCL::popScope()
<a name="l02344"></a>02344 {
<a name="l02345"></a>02345   <span class="keywordflow">throw</span> <a class="code" href="classCVC3_1_1EvalException.html">EvalException</a> (<span class="stringliteral">&quot;Scope-level push/pop is no longer supported&quot;</span>);
<a name="l02346"></a>02346   <span class="keywordflow">if</span>(d_dump) {
<a name="l02347"></a>02347     d_translator-&gt;dump(d_em-&gt;newLeafExpr(<a class="code" href="kinds_8h.html#aa10c9e8951b8ccf714a59ec321bdac5ba0eb24f3375e74e8a42303dc0c6e7e952">POP_SCOPE</a>), <span class="keyword">true</span>);
<a name="l02348"></a>02348   }
<a name="l02349"></a>02349   <span class="keywordflow">if</span> (scopeLevel() == 1) {
<a name="l02350"></a>02350     cout &lt;&lt; <span class="stringliteral">&quot;Cannot POP from scope level 1&quot;</span> &lt;&lt; <a class="code" href="group__ExprStream__Manip.html#ga05b0ea7353ec24fa8e7e272d7a7875d8" title="Print the end-of-line.">endl</a>;
<a name="l02351"></a>02351   }
<a name="l02352"></a>02352   <span class="keywordflow">else</span> d_cm-&gt;<a class="code" href="classCVC3_1_1ExprStream.html#aa82375e98a075cd85eb04f957b01f3d1" title="Restore the indentation to the previous position.">pop</a>();
<a name="l02353"></a>02353   <a class="code" href="debug_8h.html#a600cb2d68efe7cc413cccbb5714c7016">IF_DEBUG</a>(<span class="keywordflow">if</span>((*d_flags)[<span class="stringliteral">&quot;dump-trace&quot;</span>].getString() != <span class="stringliteral">&quot;&quot;</span>)
<a name="l02354"></a>02354      dumpTrace(scopeLevel());)
<a name="l02355"></a>02355 }
<a name="l02356"></a>02356 
<a name="l02357"></a>02357 
<a name="l02358"></a><a class="code" href="classCVC3_1_1VCL.html#a72d3528e64b5695df57c7d9b4fd671b2">02358</a> <span class="keywordtype">void</span> VCL::poptoScope(<span class="keywordtype">int</span> toLevel)
<a name="l02359"></a>02359 {
<a name="l02360"></a>02360   <span class="keywordflow">throw</span> <a class="code" href="classCVC3_1_1EvalException.html">EvalException</a> (<span class="stringliteral">&quot;Scope-level push/pop is no longer supported&quot;</span>);
<a name="l02361"></a>02361   <span class="keywordflow">if</span>(d_dump) {
<a name="l02362"></a>02362     d_translator-&gt;dump(<a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>(<a class="code" href="kinds_8h.html#aa10c9e8951b8ccf714a59ec321bdac5ba577463735743ccd8d67d3549bdcbc5eb">POPTO_SCOPE</a>, ratExpr(toLevel, 1)), <span class="keyword">true</span>);
<a name="l02363"></a>02363   }
<a name="l02364"></a>02364   <span class="keywordflow">if</span> (toLevel &lt; 1) {
<a name="l02365"></a>02365     d_cm-&gt;popto(0);
<a name="l02366"></a>02366     d_cm-&gt;push();
<a name="l02367"></a>02367   }
<a name="l02368"></a>02368   <span class="keywordflow">else</span> d_cm-&gt;popto(toLevel);
<a name="l02369"></a>02369   <a class="code" href="debug_8h.html#a600cb2d68efe7cc413cccbb5714c7016">IF_DEBUG</a>(<span class="keywordflow">if</span>((*d_flags)[<span class="stringliteral">&quot;dump-trace&quot;</span>].getString() != <span class="stringliteral">&quot;&quot;</span>)
<a name="l02370"></a>02370      dumpTrace(scopeLevel());)
<a name="l02371"></a>02371 }
<a name="l02372"></a>02372 
<a name="l02373"></a>02373 
<a name="l02374"></a><a class="code" href="classCVC3_1_1VCL.html#abb99bb93652210f73799830b5974aaa5">02374</a> <a class="code" href="classCVC3_1_1Context.html">Context</a>* VCL::getCurrentContext()
<a name="l02375"></a>02375 {
<a name="l02376"></a>02376   <span class="keywordflow">return</span> d_cm-&gt;getCurrentContext();
<a name="l02377"></a>02377 }
<a name="l02378"></a>02378 
<a name="l02379"></a>02379 
<a name="l02380"></a><a class="code" href="classCVC3_1_1VCL.html#ab21a08026f0fbc5e58619874952a7745">02380</a> <span class="keywordtype">void</span> <a class="code" href="group__ExprStream__Manip.html#ga90deb7348703ae1a59a11d9af77aa8ad" title="Reset the indentation to the default at this level.">VCL::reset</a>()
<a name="l02381"></a>02381 {
<a name="l02382"></a>02382   destroy();
<a name="l02383"></a>02383   init();
<a name="l02384"></a>02384 }
<a name="l02385"></a>02385 
<a name="l02386"></a><a class="code" href="classCVC3_1_1VCL.html#aa9830a10a07a840c3cde40c86160d0e4">02386</a> <span class="keywordtype">void</span> VCL::logAnnotation(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; annot)
<a name="l02387"></a>02387 {
<a name="l02388"></a>02388   <span class="keywordflow">if</span> (d_dump) {
<a name="l02389"></a>02389     d_translator-&gt;dump(annot);
<a name="l02390"></a>02390   }
<a name="l02391"></a>02391 }
<a name="l02392"></a>02392 
<a name="l02393"></a><a class="code" href="classCVC3_1_1VCL.html#a22ebe140bc8edb5a4f2150828d7a63de">02393</a> <span class="keywordtype">void</span> VCL::loadFile(<span class="keyword">const</span> <span class="keywordtype">string</span>&amp; fileName, <a class="code" href="namespaceCVC3.html#a3aaaf7bc1fc47a4860ef6e59ddb0db0e" title="Different input languages.">InputLanguage</a> lang,
<a name="l02394"></a>02394        <span class="keywordtype">bool</span> interactive, <span class="keywordtype">bool</span> calledFromParser) {
<a name="l02395"></a>02395   <span class="comment">// TODO: move these?</span>
<a name="l02396"></a>02396   <a class="code" href="classCVC3_1_1Parser.html">Parser</a> parser(<span class="keyword">this</span>, d_translator, lang, interactive, fileName);
<a name="l02397"></a>02397   <a class="code" href="classCVC3_1_1VCCmd.html">VCCmd</a> cmd(<span class="keyword">this</span>, &amp;parser, calledFromParser);
<a name="l02398"></a>02398   cmd.<a class="code" href="classCVC3_1_1VCCmd.html#ababcd4001adfc005ef5f2f365c61b829">processCommands</a>();
<a name="l02399"></a>02399 }
<a name="l02400"></a>02400 
<a name="l02401"></a>02401 
<a name="l02402"></a><a class="code" href="classCVC3_1_1VCL.html#a335f72bbfb065244a109142c79d73eeb">02402</a> <span class="keywordtype">void</span> VCL::loadFile(istream&amp; is, <a class="code" href="namespaceCVC3.html#a3aaaf7bc1fc47a4860ef6e59ddb0db0e" title="Different input languages.">InputLanguage</a> lang,
<a name="l02403"></a>02403        <span class="keywordtype">bool</span> interactive) {
<a name="l02404"></a>02404   <span class="comment">// TODO: move these?</span>
<a name="l02405"></a>02405   <a class="code" href="classCVC3_1_1Parser.html">Parser</a> parser(<span class="keyword">this</span>, d_translator, lang, is, interactive);
<a name="l02406"></a>02406   <a class="code" href="classCVC3_1_1VCCmd.html">VCCmd</a> cmd(<span class="keyword">this</span>, &amp;parser);
<a name="l02407"></a>02407   cmd.<a class="code" href="classCVC3_1_1VCCmd.html#ababcd4001adfc005ef5f2f365c61b829">processCommands</a>();
<a name="l02408"></a>02408 }
<a name="l02409"></a>02409 
<a name="l02410"></a>02410 
<a name="l02411"></a>02411 <span class="comment">// Verbosity: &lt;= 0 = print nothing, only calculate</span>
<a name="l02412"></a>02412 <span class="comment">//            1 = only print current level</span>
<a name="l02413"></a>02413 <span class="comment">//            n = print n recursive levels</span>
<a name="l02414"></a>02414 
<a name="l02415"></a><a class="code" href="classCVC3_1_1VCL.html#a6d3042cf06ef777fca838f600fb009fe">02415</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> VCL::getMemory(<span class="keywordtype">int</span> verbosity)
<a name="l02416"></a>02416 {
<a name="l02417"></a>02417   <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> memSelf = <span class="keyword">sizeof</span>(<a class="code" href="classCVC3_1_1VCL.html">VCL</a>);
<a name="l02418"></a>02418   <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> mem = 0;
<a name="l02419"></a>02419 
<a name="l02420"></a>02420   mem += d_cm-&gt;getMemory(verbosity - 1);
<a name="l02421"></a>02421   mem += d_em-&gt;getMemory(verbosity - 1);
<a name="l02422"></a>02422 <span class="comment">//   mem += d_tm-&gt;getMemory(verbosity - 1);</span>
<a name="l02423"></a>02423 <span class="comment">//   mem += d_se-&gt;getMemory(verbosity - 1);</span>
<a name="l02424"></a>02424 
<a name="l02425"></a>02425 <span class="comment">//   mem += d_theoryCore-&gt;getMemory(verbosity - 1);</span>
<a name="l02426"></a>02426 <span class="comment">//   mem += d_theoryUF-&gt;getMemory(verbosity - 1);</span>
<a name="l02427"></a>02427 <span class="comment">//   mem += d_theoryArith-&gt;getMemory(verbosity - 1);</span>
<a name="l02428"></a>02428 <span class="comment">//   mem += d_theoryArray-&gt;getMemory(verbosity - 1);</span>
<a name="l02429"></a>02429 <span class="comment">//   mem += d_theoryQuant-&gt;getMemory(verbosity - 1);</span>
<a name="l02430"></a>02430 <span class="comment">//   mem += d_theoryRecords-&gt;getMemory(verbosity - 1);</span>
<a name="l02431"></a>02431 <span class="comment">//   mem += d_theorySimulate-&gt;getMemory(verbosity - 1);</span>
<a name="l02432"></a>02432 <span class="comment">//   mem += d_theoryBitvector-&gt;getMemory(verbosity - 1);</span>
<a name="l02433"></a>02433 <span class="comment">//   mem += d_theoryDatatype-&gt;getMemory(verbosity - 1);</span>
<a name="l02434"></a>02434 <span class="comment">//   mem += d_translator-&gt;getMemory(verbosity - 1);</span>
<a name="l02435"></a>02435 
<a name="l02436"></a>02436 <span class="comment">//   mem += getMemoryVec(verbosity, d_theories, false, true);</span>
<a name="l02437"></a>02437 
<a name="l02438"></a>02438 <span class="comment">//   mem += d_flags-&gt;getMemory(verbosity - 1);</span>
<a name="l02439"></a>02439 <span class="comment">//   mem += d_stackLevel-&gt;getMemory(verbosity - 1);</span>
<a name="l02440"></a>02440 <span class="comment">//   mem += d_statistics-&gt;getMemory(verbosity - 1);</span>
<a name="l02441"></a>02441 <span class="comment">//   mem += d_userAssertions-&gt;getMemory(verbosity - 1);</span>
<a name="l02442"></a>02442 <span class="comment">//   mem += d_batchedAssertions-&gt;getMemory(verbosity - 1);</span>
<a name="l02443"></a>02443 <span class="comment">//   mem += d_batchedAssertionsIdx-&gt;getMemory(verbosity - 1);</span>
<a name="l02444"></a>02444 
<a name="l02445"></a>02445   <span class="comment">//TODO: how to get memory for Expr and Theorems?</span>
<a name="l02446"></a>02446 
<a name="l02447"></a>02447   MemoryTracker::print(<span class="stringliteral">&quot;VCL&quot;</span>, verbosity, memSelf, mem);
<a name="l02448"></a>02448 
<a name="l02449"></a>02449   <span class="keywordflow">return</span> mem + memSelf;
<a name="l02450"></a>02450 }
<a name="l02451"></a>02451 
<a name="l02452"></a><a class="code" href="classCVC3_1_1VCL.html#a88cf6568b5efb0707a44db0436572ead">02452</a> <span class="keywordtype">void</span> VCL::setTimeLimit(<span class="keywordtype">unsigned</span> limit) {
<a name="l02453"></a>02453   d_theoryCore-&gt;setTimeLimit(limit);
<a name="l02454"></a>02454 }
</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>