Sophie

Sophie

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

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

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>CVC3: theory_core.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.4 -->
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">CVC3&#160;<span id="projectnumber">2.4.1</span></div>
  </td>
 </tr>
 </tbody>
</table>
</div>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
<div class="header">
  <div class="headertitle">
<div class="title">theory_core.h</div>  </div>
</div>
<div class="contents">
<a href="theory__core_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*****************************************************************************/</span><span class="comment"></span>
<a name="l00002"></a>00002 <span class="comment">/*!</span>
<a name="l00003"></a>00003 <span class="comment"> * \file theory_core.h</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: Thu Jan 30 16:58:05 2003</span>
<a name="l00008"></a>00008 <span class="comment"> *</span>
<a name="l00009"></a>00009 <span class="comment"> * &lt;hr&gt;</span>
<a name="l00010"></a>00010 <span class="comment"> *</span>
<a name="l00011"></a>00011 <span class="comment"> * License to use, copy, modify, sell and/or distribute this software</span>
<a name="l00012"></a>00012 <span class="comment"> * and its documentation for any purpose is hereby granted without</span>
<a name="l00013"></a>00013 <span class="comment"> * royalty, subject to the terms and conditions defined in the \ref</span>
<a name="l00014"></a>00014 <span class="comment"> * LICENSE file provided with this distribution.</span>
<a name="l00015"></a>00015 <span class="comment"> *</span>
<a name="l00016"></a>00016 <span class="comment"> * &lt;hr&gt;</span>
<a name="l00017"></a>00017 <span class="comment"> *</span>
<a name="l00018"></a>00018 <span class="comment"> */</span>
<a name="l00019"></a>00019 <span class="comment">/*****************************************************************************/</span>
<a name="l00020"></a>00020 
<a name="l00021"></a>00021 <span class="preprocessor">#ifndef _cvc3__include__theory_core_h_</span>
<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define _cvc3__include__theory_core_h_</span>
<a name="l00023"></a>00023 <span class="preprocessor"></span>
<a name="l00024"></a>00024 <span class="preprocessor">#include &lt;queue&gt;</span>
<a name="l00025"></a>00025 <span class="preprocessor">#include &quot;<a class="code" href="theory_8h.html" title="Generic API for Theories plus methods commonly used by theories.">theory.h</a>&quot;</span>
<a name="l00026"></a>00026 <span class="preprocessor">#include &quot;<a class="code" href="cdmap_8h.html">cdmap.h</a>&quot;</span>
<a name="l00027"></a>00027 <span class="preprocessor">#include &quot;<a class="code" href="statistics_8h.html" title="Description: Counters and flags for collecting run-time statistics.">statistics.h</a>&quot;</span>
<a name="l00028"></a>00028 <span class="preprocessor">#include &lt;string&gt;</span>
<a name="l00029"></a>00029 <span class="preprocessor">#include &quot;<a class="code" href="notifylist_8h.html">notifylist.h</a>&quot;</span>
<a name="l00030"></a>00030 <span class="preprocessor">#include &lt;vector&gt;</span>
<a name="l00031"></a>00031 <span class="preprocessor">#include &lt;utility&gt;</span>
<a name="l00032"></a>00032 <span class="comment">//#include &quot;expr_transform.h&quot;</span>
<a name="l00033"></a>00033 
<a name="l00034"></a>00034 <span class="keyword">namespace </span>CVC3 {
<a name="l00035"></a>00035 
<a name="l00036"></a>00036 <span class="keyword">class </span>ExprTransform;
<a name="l00037"></a>00037 <span class="comment">// class Statistics;</span>
<a name="l00038"></a>00038 <span class="keyword">class </span>CoreProofRules;
<a name="l00039"></a>00039 <span class="keyword">class </span>Translator;
<a name="l00040"></a>00040 
<a name="l00041"></a>00041 <span class="comment">/*****************************************************************************/</span><span class="comment"></span>
<a name="l00042"></a>00042 <span class="comment">/*!</span>
<a name="l00043"></a>00043 <span class="comment"> *\class TheoryCore</span>
<a name="l00044"></a>00044 <span class="comment"> *\ingroup Theories</span>
<a name="l00045"></a>00045 <span class="comment"> *\brief This theory handles the built-in logical connectives plus equality.</span>
<a name="l00046"></a>00046 <span class="comment"> * It also handles the registration and cooperation among all other theories.</span>
<a name="l00047"></a>00047 <span class="comment"> *</span>
<a name="l00048"></a>00048 <span class="comment"> * Author: Clark Barrett</span>
<a name="l00049"></a>00049 <span class="comment"> *</span>
<a name="l00050"></a>00050 <span class="comment"> * Created: Sat Feb 8 14:54:05 2003</span>
<a name="l00051"></a>00051 <span class="comment"> */</span>
<a name="l00052"></a>00052 <span class="comment">/*****************************************************************************/</span>
<a name="l00053"></a><a class="code" href="classCVC3_1_1TheoryCore.html">00053</a> <span class="keyword">class </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> :<span class="keyword">public</span> <a class="code" href="classCVC3_1_1Theory.html" title="Base class for theories.">Theory</a> {
<a name="l00054"></a><a class="code" href="classCVC3_1_1TheoryCore.html#abe20cc4b804d6951c09b92aec0085063">00054</a>   <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classCVC3_1_1Theory.html" title="Base class for theories.">Theory</a>;
<a name="l00055"></a>00055 <span class="comment"></span>
<a name="l00056"></a>00056 <span class="comment">  //! Context manager</span>
<a name="l00057"></a><a class="code" href="classCVC3_1_1TheoryCore.html#aa803e0e65fec3e389c9c4d12d8d634a3">00057</a> <span class="comment"></span>  <a class="code" href="classCVC3_1_1ContextManager.html" title="Manager for multiple contexts. Also holds current context.">ContextManager</a>* <a class="code" href="classCVC3_1_1TheoryCore.html#aa803e0e65fec3e389c9c4d12d8d634a3" title="Context manager.">d_cm</a>;
<a name="l00058"></a>00058 <span class="comment"></span>
<a name="l00059"></a>00059 <span class="comment">  //! Theorem manager</span>
<a name="l00060"></a><a class="code" href="classCVC3_1_1TheoryCore.html#a8b9c81920208ce15dac9eb3bb97b4a2b">00060</a> <span class="comment"></span>  <a class="code" href="classCVC3_1_1TheoremManager.html">TheoremManager</a>* <a class="code" href="classCVC3_1_1TheoryCore.html#a8b9c81920208ce15dac9eb3bb97b4a2b" title="Theorem manager.">d_tm</a>;
<a name="l00061"></a>00061 <span class="comment"></span>
<a name="l00062"></a>00062 <span class="comment">  //! Core proof rules</span>
<a name="l00063"></a><a class="code" href="classCVC3_1_1TheoryCore.html#af28b98269dc8ef40a6fa97d58f414173">00063</a> <span class="comment"></span>  <a class="code" href="classCVC3_1_1CoreProofRules.html">CoreProofRules</a>* <a class="code" href="classCVC3_1_1TheoryCore.html#af28b98269dc8ef40a6fa97d58f414173" title="Core proof rules.">d_rules</a>;
<a name="l00064"></a>00064 <span class="comment"></span>
<a name="l00065"></a>00065 <span class="comment">  //! Reference to command line flags</span>
<a name="l00066"></a><a class="code" href="classCVC3_1_1TheoryCore.html#adf5b754e1e4732cb0e1946cf0f274885">00066</a> <span class="comment"></span>  <span class="keyword">const</span> <a class="code" href="classCVC3_1_1CLFlags.html">CLFlags</a>&amp; <a class="code" href="classCVC3_1_1TheoryCore.html#adf5b754e1e4732cb0e1946cf0f274885" title="Reference to command line flags.">d_flags</a>;
<a name="l00067"></a>00067 <span class="comment"></span>
<a name="l00068"></a>00068 <span class="comment">  //! Reference to statistics</span>
<a name="l00069"></a><a class="code" href="classCVC3_1_1TheoryCore.html#a053311bcc9681a402ab440bf90447632">00069</a> <span class="comment"></span>  <a class="code" href="classCVC3_1_1Statistics.html">Statistics</a>&amp; <a class="code" href="classCVC3_1_1TheoryCore.html#a053311bcc9681a402ab440bf90447632" title="Reference to statistics.">d_statistics</a>;
<a name="l00070"></a>00070 <span class="comment"></span>
<a name="l00071"></a>00071 <span class="comment">  //! PrettyPrinter (we own it)</span>
<a name="l00072"></a><a class="code" href="classCVC3_1_1TheoryCore.html#aba88f17e048e24984f8637be9d31a74c">00072</a> <span class="comment"></span>  <a class="code" href="classCVC3_1_1PrettyPrinter.html" title="Abstract API to a pretty-printer for Expr.">PrettyPrinter</a>* <a class="code" href="classCVC3_1_1TheoryCore.html#aba88f17e048e24984f8637be9d31a74c" title="PrettyPrinter (we own it)">d_printer</a>;
<a name="l00073"></a>00073 <span class="comment"></span>
<a name="l00074"></a>00074 <span class="comment">  //! Type Computer</span>
<a name="l00075"></a><a class="code" href="classCVC3_1_1TheoryCore.html#ae430167a0f9f0e2ba742436bcb04e9fb">00075</a> <span class="comment"></span>  <a class="code" href="classCVC3_1_1ExprManager_1_1TypeComputer.html" title="Abstract class for computing expr type.">ExprManager::TypeComputer</a>* <a class="code" href="classCVC3_1_1TheoryCore.html#ae430167a0f9f0e2ba742436bcb04e9fb" title="Type Computer.">d_typeComputer</a>;
<a name="l00076"></a>00076 <span class="comment"></span>
<a name="l00077"></a>00077 <span class="comment">  //! Expr Transformer</span>
<a name="l00078"></a><a class="code" href="classCVC3_1_1TheoryCore.html#a03b7c799d7ee3b3a4a10f14b2faacfbb">00078</a> <span class="comment"></span>  <a class="code" href="classCVC3_1_1ExprTransform.html">ExprTransform</a>* <a class="code" href="classCVC3_1_1TheoryCore.html#a03b7c799d7ee3b3a4a10f14b2faacfbb" title="Expr Transformer.">d_exprTrans</a>;
<a name="l00079"></a>00079 <span class="comment"></span>
<a name="l00080"></a>00080 <span class="comment">  //! Translator</span>
<a name="l00081"></a><a class="code" href="classCVC3_1_1TheoryCore.html#abe21ce53a179720cb3e94293fd6d771f">00081</a> <span class="comment"></span>  <a class="code" href="classCVC3_1_1Translator.html">Translator</a>* <a class="code" href="classCVC3_1_1TheoryCore.html#abe21ce53a179720cb3e94293fd6d771f" title="Translator.">d_translator</a>;
<a name="l00082"></a>00082 <span class="comment"></span>
<a name="l00083"></a>00083 <span class="comment">  //! Assertion queue</span>
<a name="l00084"></a><a class="code" href="classCVC3_1_1TheoryCore.html#af057513081cf61dc3780967f84ae58fe">00084</a> <span class="comment"></span>  std::queue&lt;Theorem&gt; <a class="code" href="classCVC3_1_1TheoryCore.html#af057513081cf61dc3780967f84ae58fe" title="Assertion queue.">d_queue</a>;<span class="comment"></span>
<a name="l00085"></a>00085 <span class="comment">  //! Queue of facts to be sent to the SearchEngine</span>
<a name="l00086"></a><a class="code" href="classCVC3_1_1TheoryCore.html#a5253f49c096b1ce32579f7095c895ac4">00086</a> <span class="comment"></span>  std::vector&lt;Theorem&gt; <a class="code" href="classCVC3_1_1TheoryCore.html#a5253f49c096b1ce32579f7095c895ac4" title="Queue of facts to be sent to the SearchEngine.">d_queueSE</a>;
<a name="l00087"></a>00087 <span class="comment"></span>
<a name="l00088"></a>00088 <span class="comment">  //! Inconsistent flag</span>
<a name="l00089"></a><a class="code" href="classCVC3_1_1TheoryCore.html#ac44993c5095bc2fda1f6b931060223bf">00089</a> <span class="comment"></span>  <a class="code" href="classCVC3_1_1CDO.html">CDO&lt;bool&gt;</a> <a class="code" href="classCVC3_1_1TheoryCore.html#ac44993c5095bc2fda1f6b931060223bf" title="Inconsistent flag.">d_inconsistent</a>;<span class="comment"></span>
<a name="l00090"></a>00090 <span class="comment">  //! The set of reasons for incompleteness (empty when we are complete)</span>
<a name="l00091"></a><a class="code" href="classCVC3_1_1TheoryCore.html#ae81dae9c186efe8ead153d14e29985bf">00091</a> <span class="comment"></span>  <a class="code" href="classCVC3_1_1CDMap.html">CDMap&lt;std::string, bool&gt;</a> <a class="code" href="classCVC3_1_1TheoryCore.html#ae81dae9c186efe8ead153d14e29985bf" title="The set of reasons for incompleteness (empty when we are complete)">d_incomplete</a>;
<a name="l00092"></a>00092 <span class="comment"></span>
<a name="l00093"></a>00093 <span class="comment">  //! Proof of inconsistent</span>
<a name="l00094"></a><a class="code" href="classCVC3_1_1TheoryCore.html#a1560124d30d8cda4a6cedca4c919f8aa">00094</a> <span class="comment"></span>  <a class="code" href="classCVC3_1_1CDO.html">CDO&lt;Theorem&gt;</a> <a class="code" href="classCVC3_1_1TheoryCore.html#a1560124d30d8cda4a6cedca4c919f8aa" title="Proof of inconsistent.">d_incThm</a>;<span class="comment"></span>
<a name="l00095"></a>00095 <span class="comment">  //! List of all active terms in the system (for quantifier instantiation)</span>
<a name="l00096"></a><a class="code" href="classCVC3_1_1TheoryCore.html#a9ebcf505b2577cd3a3a29d70a4fd50ae">00096</a> <span class="comment"></span>  <a class="code" href="classCVC3_1_1CDList.html">CDList&lt;Expr&gt;</a> <a class="code" href="classCVC3_1_1TheoryCore.html#a9ebcf505b2577cd3a3a29d70a4fd50ae" title="List of all active terms in the system (for quantifier instantiation)">d_terms</a>;<span class="comment"></span>
<a name="l00097"></a>00097 <span class="comment">  //! Map from active terms to theorems that introduced those terms</span>
<a name="l00098"></a>00098 <span class="comment"></span>
<a name="l00099"></a><a class="code" href="classCVC3_1_1TheoryCore.html#ab2fd8e3ebcc92df0276d6d0b4e8a88bf">00099</a>   <a class="code" href="classHash_1_1hash__map.html">std::hash_map&lt;Expr, Theorem&gt;</a> <a class="code" href="classCVC3_1_1TheoryCore.html#ab2fd8e3ebcc92df0276d6d0b4e8a88bf" title="Map from active terms to theorems that introduced those terms.">d_termTheorems</a>;
<a name="l00100"></a>00100   <span class="comment">//  CDMap&lt;Expr, Theorem&gt; d_termTheorems;</span>
<a name="l00101"></a>00101 <span class="comment"></span>
<a name="l00102"></a>00102 <span class="comment">  //! List of all active non-equality atomic formulas in the system (for quantifier instantiation)</span>
<a name="l00103"></a><a class="code" href="classCVC3_1_1TheoryCore.html#a27f2f350452da6f7adca44c342a1f29d">00103</a> <span class="comment"></span>  <a class="code" href="classCVC3_1_1CDList.html">CDList&lt;Expr&gt;</a> <a class="code" href="classCVC3_1_1TheoryCore.html#a27f2f350452da6f7adca44c342a1f29d" title="List of all active non-equality atomic formulas in the system (for quantifier instantiation)">d_predicates</a>;<span class="comment"></span>
<a name="l00104"></a>00104 <span class="comment">  //! List of variables that were created up to this point</span>
<a name="l00105"></a><a class="code" href="classCVC3_1_1TheoryCore.html#ae3ac2dba3022934af3ba4a61fc979be4">00105</a> <span class="comment"></span>  std::vector&lt;Expr&gt; <a class="code" href="classCVC3_1_1TheoryCore.html#ae3ac2dba3022934af3ba4a61fc979be4" title="List of variables that were created up to this point.">d_vars</a>;<span class="comment"></span>
<a name="l00106"></a>00106 <span class="comment">  //! Database of declared identifiers</span>
<a name="l00107"></a><a class="code" href="classCVC3_1_1TheoryCore.html#a6ef875ba12849a2bfd367c4e1bc02e71">00107</a> <span class="comment"></span>  std::map&lt;std::string, Expr&gt; <a class="code" href="classCVC3_1_1TheoryCore.html#a6ef875ba12849a2bfd367c4e1bc02e71" title="Database of declared identifiers.">d_globals</a>;<span class="comment"></span>
<a name="l00108"></a>00108 <span class="comment">  //! Bound variable stack: a vector of pairs &lt;name, var&gt;</span>
<a name="l00109"></a><a class="code" href="classCVC3_1_1TheoryCore.html#a72592744e8f94ed7c832ad895791a72a">00109</a> <span class="comment"></span>  std::vector&lt;std::pair&lt;std::string, Expr&gt; &gt; <a class="code" href="classCVC3_1_1TheoryCore.html#a72592744e8f94ed7c832ad895791a72a" title="Bound variable stack: a vector of pairs &lt;name, var&gt;">d_boundVarStack</a>;<span class="comment"></span>
<a name="l00110"></a>00110 <span class="comment">  //! Map for bound vars</span>
<a name="l00111"></a><a class="code" href="classCVC3_1_1TheoryCore.html#af1f09ebd45eebb8171943533fe49e677">00111</a> <span class="comment"></span>  <a class="code" href="classHash_1_1hash__map.html">std::hash_map&lt;std::string, Expr&gt;</a> <a class="code" href="classCVC3_1_1TheoryCore.html#af1f09ebd45eebb8171943533fe49e677" title="Map for bound vars.">d_boundVarMap</a>;<span class="comment"></span>
<a name="l00112"></a>00112 <span class="comment">  //! Top-level cache for parser</span>
<a name="l00113"></a>00113 <span class="comment"></span>  <span class="comment">// This cache is only used when there are no bound variables</span>
<a name="l00114"></a><a class="code" href="classCVC3_1_1TheoryCore.html#a22825b89097f0baa8348f268317db563">00114</a>   <a class="code" href="classCVC3_1_1ExprMap.html">ExprMap&lt;Expr&gt;</a> <a class="code" href="classCVC3_1_1TheoryCore.html#a22825b89097f0baa8348f268317db563" title="Top-level cache for parser.">d_parseCacheTop</a>;<span class="comment"></span>
<a name="l00115"></a>00115 <span class="comment">  //! Alternative cache for parser when not at top-level</span>
<a name="l00116"></a>00116 <span class="comment"></span>  <span class="comment">// This cache used when there are bound variables - and it is cleared</span>
<a name="l00117"></a>00117   <span class="comment">// every time the bound variable stack changes</span>
<a name="l00118"></a><a class="code" href="classCVC3_1_1TheoryCore.html#ac0523af18592d25050b45ca363e52332">00118</a>   <a class="code" href="classCVC3_1_1ExprMap.html">ExprMap&lt;Expr&gt;</a> <a class="code" href="classCVC3_1_1TheoryCore.html#ac0523af18592d25050b45ca363e52332" title="Alternative cache for parser when not at top-level.">d_parseCacheOther</a>;<span class="comment"></span>
<a name="l00119"></a>00119 <span class="comment">  //! Current cache being used for parser</span>
<a name="l00120"></a><a class="code" href="classCVC3_1_1TheoryCore.html#af8402b991e938282c87e01120dfd6b99">00120</a> <span class="comment"></span>  <a class="code" href="classCVC3_1_1ExprMap.html">ExprMap&lt;Expr&gt;</a>* <a class="code" href="classCVC3_1_1TheoryCore.html#af8402b991e938282c87e01120dfd6b99" title="Current cache being used for parser.">d_parseCache</a>;<span class="comment"></span>
<a name="l00121"></a>00121 <span class="comment">  //! Cache for tcc&#39;s</span>
<a name="l00122"></a><a class="code" href="classCVC3_1_1TheoryCore.html#ab1f589f325461e2bb39f0035c2dfa4bb">00122</a> <span class="comment"></span>  <a class="code" href="classCVC3_1_1ExprMap.html">ExprMap&lt;Expr&gt;</a> <a class="code" href="classCVC3_1_1TheoryCore.html#ab1f589f325461e2bb39f0035c2dfa4bb" title="Cache for tcc&#39;s.">d_tccCache</a>;
<a name="l00123"></a>00123 <span class="comment"></span>
<a name="l00124"></a>00124 <span class="comment">  //! Array of registered theories</span>
<a name="l00125"></a><a class="code" href="classCVC3_1_1TheoryCore.html#a067b4f792c7bcd9fa1d756efdc5d1e72">00125</a> <span class="comment"></span>  std::vector&lt;Theory*&gt; <a class="code" href="classCVC3_1_1TheoryCore.html#a067b4f792c7bcd9fa1d756efdc5d1e72" title="Array of registered theories.">d_theories</a>;
<a name="l00126"></a>00126 <span class="comment"></span>
<a name="l00127"></a>00127 <span class="comment">  //! Array mapping kinds to theories</span>
<a name="l00128"></a><a class="code" href="classCVC3_1_1TheoryCore.html#af9395eb99819f9b78df0dcb24ffac785">00128</a> <span class="comment"></span>  <a class="code" href="classHash_1_1hash__map.html">std::hash_map&lt;int, Theory*&gt;</a> <a class="code" href="classCVC3_1_1TheoryCore.html#af9395eb99819f9b78df0dcb24ffac785" title="Array mapping kinds to theories.">d_theoryMap</a>;
<a name="l00129"></a>00129 <span class="comment"></span>
<a name="l00130"></a>00130 <span class="comment">  //! The theory which has the solver (if any)</span>
<a name="l00131"></a><a class="code" href="classCVC3_1_1TheoryCore.html#af15d1082296c5c7f610d832bfb3cc675">00131</a> <span class="comment"></span>  <a class="code" href="classCVC3_1_1Theory.html" title="Base class for theories.">Theory</a>* <a class="code" href="classCVC3_1_1TheoryCore.html#af15d1082296c5c7f610d832bfb3cc675" title="The theory which has the solver (if any)">d_solver</a>;
<a name="l00132"></a>00132 <span class="comment"></span>
<a name="l00133"></a>00133 <span class="comment">  //! Mapping of compound type variables to simpler types (model generation)</span>
<a name="l00134"></a><a class="code" href="classCVC3_1_1TheoryCore.html#a74cb89f5b3e600cde8e0d7b961532a5e">00134</a> <span class="comment"></span>  <a class="code" href="classCVC3_1_1ExprHashMap.html">ExprHashMap&lt;std::vector&lt;Expr&gt;</a> &gt; <a class="code" href="classCVC3_1_1TheoryCore.html#a74cb89f5b3e600cde8e0d7b961532a5e" title="Mapping of compound type variables to simpler types (model generation)">d_varModelMap</a>;<span class="comment"></span>
<a name="l00135"></a>00135 <span class="comment">  //! Mapping of intermediate variables to their values</span>
<a name="l00136"></a><a class="code" href="classCVC3_1_1TheoryCore.html#ad2689808e6b677e79151c5ae413a9170">00136</a> <span class="comment"></span>  <a class="code" href="classCVC3_1_1ExprHashMap.html">ExprHashMap&lt;Theorem&gt;</a> <a class="code" href="classCVC3_1_1TheoryCore.html#ad2689808e6b677e79151c5ae413a9170" title="Mapping of intermediate variables to their values.">d_varAssignments</a>;<span class="comment"></span>
<a name="l00137"></a>00137 <span class="comment">  //! List of basic variables (temporary storage for model generation)</span>
<a name="l00138"></a><a class="code" href="classCVC3_1_1TheoryCore.html#afbe156b32fe43d2b3e5519477df83110">00138</a> <span class="comment"></span>  std::vector&lt;Expr&gt; <a class="code" href="classCVC3_1_1TheoryCore.html#afbe156b32fe43d2b3e5519477df83110" title="List of basic variables (temporary storage for model generation)">d_basicModelVars</a>;<span class="comment"></span>
<a name="l00139"></a>00139 <span class="comment">  //! Mapping of basic variables to simplified expressions (temp. storage)</span>
<a name="l00140"></a>00140 <span class="comment"></span><span class="comment">  /*! There may be some vars which simplify to something else; we save</span>
<a name="l00141"></a>00141 <span class="comment">   * those separately, and keep only those which simplify to</span>
<a name="l00142"></a>00142 <span class="comment">   * themselves.  Once the latter vars are assigned, we&#39;ll re-simplify</span>
<a name="l00143"></a>00143 <span class="comment">   * the former variables and use the results as concrete values.</span>
<a name="l00144"></a>00144 <span class="comment">  */</span>
<a name="l00145"></a><a class="code" href="classCVC3_1_1TheoryCore.html#a28416be391c5f58a2bf7cbe301e81663">00145</a>   <a class="code" href="classCVC3_1_1ExprHashMap.html">ExprHashMap&lt;Theorem&gt;</a> <a class="code" href="classCVC3_1_1TheoryCore.html#a28416be391c5f58a2bf7cbe301e81663" title="Mapping of basic variables to simplified expressions (temp. storage)">d_simplifiedModelVars</a>;
<a name="l00146"></a>00146 <span class="comment"></span>
<a name="l00147"></a>00147 <span class="comment">  //! Command line flag whether to simplify in place</span>
<a name="l00148"></a><a class="code" href="classCVC3_1_1TheoryCore.html#ac02ca139143a150df1ecb7ec4d4247e7">00148</a> <span class="comment"></span>  <span class="keyword">const</span> <span class="keywordtype">bool</span>* <a class="code" href="classCVC3_1_1TheoryCore.html#ac02ca139143a150df1ecb7ec4d4247e7" title="Command line flag whether to simplify in place.">d_simplifyInPlace</a>;<span class="comment"></span>
<a name="l00149"></a>00149 <span class="comment">  //! Which recursive simplifier to use</span>
<a name="l00150"></a><a class="code" href="classCVC3_1_1TheoryCore.html#ae9e63b5ca2b5d745cb176ac3a528959b">00150</a> <span class="comment"></span>  <a class="code" href="classCVC3_1_1Theorem.html">Theorem</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>::*<a class="code" href="classCVC3_1_1TheoryCore.html#ae9e63b5ca2b5d745cb176ac3a528959b" title="Which recursive simplifier to use.">d_currentRecursiveSimplifier</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 name="l00151"></a>00151 <span class="comment"></span>
<a name="l00152"></a>00152 <span class="comment">  //! Resource limit (0==unlimited, 1==no more resources, &gt;=2 - available).</span>
<a name="l00153"></a>00153 <span class="comment"></span><span class="comment">  /*! Currently, it is the number of enqueued facts.  Once the</span>
<a name="l00154"></a>00154 <span class="comment">   * resource is exhausted, the remaining facts will be dropped, and</span>
<a name="l00155"></a>00155 <span class="comment">   * an incomplete flag is set.</span>
<a name="l00156"></a>00156 <span class="comment">   */</span>
<a name="l00157"></a><a class="code" href="classCVC3_1_1TheoryCore.html#a7040ce9b2fa8d567df0d84a5ceee84bf">00157</a>   <span class="keywordtype">unsigned</span> <a class="code" href="classCVC3_1_1TheoryCore.html#a7040ce9b2fa8d567df0d84a5ceee84bf" title="Resource limit (0==unlimited, 1==no more resources, &gt;=2 - available).">d_resourceLimit</a>;
<a name="l00158"></a>00158 <span class="comment"></span>
<a name="l00159"></a>00159 <span class="comment">  //! Time limit (0==unlimited, &gt;0==total available cpu time in seconds).</span>
<a name="l00160"></a>00160 <span class="comment"></span><span class="comment">  /*! Currently, if exhausted processFactQueue will not perform any more</span>
<a name="l00161"></a>00161 <span class="comment">   * reasoning with FULL effor and an incomplete flag is set.</span>
<a name="l00162"></a>00162 <span class="comment">   */</span>
<a name="l00163"></a><a class="code" href="classCVC3_1_1TheoryCore.html#aa2e429d75afaade7281ed2b370a50dcf">00163</a>   <span class="keywordtype">unsigned</span> <a class="code" href="classCVC3_1_1TheoryCore.html#aa2e429d75afaade7281ed2b370a50dcf" title="Time limit (0==unlimited, &gt;0==total available cpu time in seconds).">d_timeBase</a>;
<a name="l00164"></a><a class="code" href="classCVC3_1_1TheoryCore.html#a4ad36b717dcce5ed5ad9a4514e39e66f">00164</a>   <span class="keywordtype">unsigned</span> <a class="code" href="classCVC3_1_1TheoryCore.html#a4ad36b717dcce5ed5ad9a4514e39e66f">d_timeLimit</a>;
<a name="l00165"></a>00165 
<a name="l00166"></a><a class="code" href="classCVC3_1_1TheoryCore.html#adc61197a61a4a024cdd614a281f8cf0c">00166</a>   <span class="keywordtype">bool</span> <a class="code" href="classCVC3_1_1TheoryCore.html#adc61197a61a4a024cdd614a281f8cf0c">d_inCheckSATCore</a>;
<a name="l00167"></a><a class="code" href="classCVC3_1_1TheoryCore.html#abf9ffc3f83f262e0acdece359d2d00bd">00167</a>   <span class="keywordtype">bool</span> <a class="code" href="classCVC3_1_1TheoryCore.html#abf9ffc3f83f262e0acdece359d2d00bd">d_inAddFact</a>;
<a name="l00168"></a><a class="code" href="classCVC3_1_1TheoryCore.html#a608590056910229da1a794d0dd5930c4">00168</a>   <span class="keywordtype">bool</span> <a class="code" href="classCVC3_1_1TheoryCore.html#a608590056910229da1a794d0dd5930c4">d_inRegisterAtom</a>;
<a name="l00169"></a><a class="code" href="classCVC3_1_1TheoryCore.html#aac5050e644f0c475d104f4dd3a8ddf32">00169</a>   <span class="keywordtype">bool</span> <a class="code" href="classCVC3_1_1TheoryCore.html#aac5050e644f0c475d104f4dd3a8ddf32">d_inPP</a>;
<a name="l00170"></a>00170 
<a name="l00171"></a>00171   <a class="code" href="debug_8h.html#a600cb2d68efe7cc413cccbb5714c7016">IF_DEBUG</a>(<a class="code" href="classCVC3_1_1ExprMap.html">ExprMap&lt;bool&gt;</a> d_simpStack;)
<a name="l00172"></a>00172 
<a name="l00173"></a>00173 <span class="comment"></span>
<a name="l00174"></a>00174 <span class="comment">  //! So we get notified every time there&#39;s a pop</span>
<a name="l00175"></a><a class="code" href="classCVC3_1_1TheoryCore.html#a6b4c0f704ab77eddaaa6308ad6cf45cd">00175</a> <span class="comment"></span>  <span class="keyword">friend</span> <span class="keyword">class</span> <a class="code" href="classCVC3_1_1TheoryCore_1_1CoreNotifyObj.html">CoreNotifyObj</a>;
<a name="l00176"></a><a class="code" href="classCVC3_1_1TheoryCore_1_1CoreNotifyObj.html">00176</a>   <span class="keyword">class </span><a class="code" href="classCVC3_1_1TheoryCore_1_1CoreNotifyObj.html">CoreNotifyObj</a> :<span class="keyword">public</span> <a class="code" href="classCVC3_1_1ContextNotifyObj.html">ContextNotifyObj</a> {
<a name="l00177"></a><a class="code" href="classCVC3_1_1TheoryCore_1_1CoreNotifyObj.html#aafa097cf14b8a2faa0c5c5541d93cdf5">00177</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>* <a class="code" href="classCVC3_1_1TheoryCore_1_1CoreNotifyObj.html#aafa097cf14b8a2faa0c5c5541d93cdf5">d_theoryCore</a>;
<a name="l00178"></a>00178   <span class="keyword">public</span>:
<a name="l00179"></a><a class="code" href="classCVC3_1_1TheoryCore_1_1CoreNotifyObj.html#a48e1f88390e715e7579dfefe328f0483">00179</a>     <a class="code" href="classCVC3_1_1TheoryCore_1_1CoreNotifyObj.html#a48e1f88390e715e7579dfefe328f0483">CoreNotifyObj</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>* tc, <a class="code" href="classCVC3_1_1Context.html">Context</a>* context)
<a name="l00180"></a>00180       : <a class="code" href="classCVC3_1_1ContextNotifyObj.html">ContextNotifyObj</a>(context), <a class="code" href="classCVC3_1_1TheoryCore_1_1CoreNotifyObj.html#aafa097cf14b8a2faa0c5c5541d93cdf5">d_theoryCore</a>(tc) {}
<a name="l00181"></a><a class="code" href="classCVC3_1_1TheoryCore_1_1CoreNotifyObj.html#a2b35c26b9c1286c72381ad8670cf9859">00181</a>     <span class="keywordtype">void</span> <a class="code" href="classCVC3_1_1TheoryCore_1_1CoreNotifyObj.html#a2b35c26b9c1286c72381ad8670cf9859">notify</a>() { <a class="code" href="classCVC3_1_1TheoryCore_1_1CoreNotifyObj.html#aafa097cf14b8a2faa0c5c5541d93cdf5">d_theoryCore</a>-&gt;<a class="code" href="classCVC3_1_1Theory.html#abc2e30308c9e1f3cf752cfe8d939df1e" title="Access to ExprManager.">getEM</a>()-&gt;<a class="code" href="group__EM__Priv.html#gaba358e1731ad9309e52e64eb9ce60755" title="Invalidate the simplifier&#39;s cache tag.">invalidateSimpCache</a>(); }
<a name="l00182"></a>00182   };
<a name="l00183"></a><a class="code" href="classCVC3_1_1TheoryCore.html#ae16ab39bb24e04e3928d693ac3a1bb1e">00183</a>   <a class="code" href="classCVC3_1_1TheoryCore_1_1CoreNotifyObj.html">CoreNotifyObj</a> <a class="code" href="classCVC3_1_1TheoryCore.html#ae16ab39bb24e04e3928d693ac3a1bb1e">d_notifyObj</a>;
<a name="l00184"></a>00184 <span class="comment"></span>
<a name="l00185"></a>00185 <span class="comment">  //! List of implied literals, based on registered atomic formulas of interest</span>
<a name="l00186"></a><a class="code" href="classCVC3_1_1TheoryCore.html#a7b531fbcb166cac53d82f74c812d42f6">00186</a> <span class="comment"></span>  <a class="code" href="classCVC3_1_1CDList.html">CDList&lt;Theorem&gt;</a> <a class="code" href="classCVC3_1_1TheoryCore.html#a7b531fbcb166cac53d82f74c812d42f6" title="List of implied literals, based on registered atomic formulas of interest.">d_impliedLiterals</a>;
<a name="l00187"></a>00187 <span class="comment"></span>
<a name="l00188"></a>00188 <span class="comment">  //! Next index in d_impliedLiterals that has not yet been fetched</span>
<a name="l00189"></a><a class="code" href="classCVC3_1_1TheoryCore.html#a496993a9e180ca584cff84ce9dbdff69">00189</a> <span class="comment"></span>  <a class="code" href="classCVC3_1_1CDO.html">CDO&lt;unsigned&gt;</a> <a class="code" href="classCVC3_1_1TheoryCore.html#a496993a9e180ca584cff84ce9dbdff69" title="Next index in d_impliedLiterals that has not yet been fetched.">d_impliedLiteralsIdx</a>;
<a name="l00190"></a>00190 <span class="comment"></span>
<a name="l00191"></a>00191 <span class="comment">  //! List of theorems from calls to update()</span>
<a name="l00192"></a>00192 <span class="comment"></span>  <span class="comment">// These are stored here until the equality lists are finished and then</span>
<a name="l00193"></a>00193   <span class="comment">// processed by processUpdates()</span>
<a name="l00194"></a><a class="code" href="classCVC3_1_1TheoryCore.html#a0813a81e68625ac93111f45a4e81b131">00194</a>   std::vector&lt;Theorem&gt; <a class="code" href="classCVC3_1_1TheoryCore.html#a0813a81e68625ac93111f45a4e81b131" title="List of theorems from calls to update()">d_update_thms</a>;
<a name="l00195"></a>00195 <span class="comment"></span>
<a name="l00196"></a>00196 <span class="comment">  //! List of data accompanying above theorems from calls to update()</span>
<a name="l00197"></a><a class="code" href="classCVC3_1_1TheoryCore.html#a9b774b862908ff097c6aed53bdfdbcd3">00197</a> <span class="comment"></span>  std::vector&lt;Expr&gt; <a class="code" href="classCVC3_1_1TheoryCore.html#a9b774b862908ff097c6aed53bdfdbcd3" title="List of data accompanying above theorems from calls to update()">d_update_data</a>;
<a name="l00198"></a>00198 <span class="comment"></span>
<a name="l00199"></a>00199 <span class="comment">  //! Notify list that gets processed on every equality</span>
<a name="l00200"></a><a class="code" href="classCVC3_1_1TheoryCore.html#a96ce7c2fe3b14e3b8b4661fbe19db290">00200</a> <span class="comment"></span>  <a class="code" href="classCVC3_1_1NotifyList.html">NotifyList</a> <a class="code" href="classCVC3_1_1TheoryCore.html#a96ce7c2fe3b14e3b8b4661fbe19db290" title="Notify list that gets processed on every equality.">d_notifyEq</a>;
<a name="l00201"></a>00201 <span class="comment"></span>
<a name="l00202"></a>00202 <span class="comment">  //! Whether we are in the middle of doing updates</span>
<a name="l00203"></a><a class="code" href="classCVC3_1_1TheoryCore.html#a966030ae5b96557c9ea5de874a9526ef">00203</a> <span class="comment"></span>  <span class="keywordtype">unsigned</span> <a class="code" href="classCVC3_1_1TheoryCore.html#a966030ae5b96557c9ea5de874a9526ef" title="Whether we are in the middle of doing updates.">d_inUpdate</a>;
<a name="l00204"></a>00204 <span class="comment"></span>
<a name="l00205"></a>00205 <span class="comment">  //! The set of named expressions to evaluate on a GET_ASSIGNMENT request</span>
<a name="l00206"></a><a class="code" href="classCVC3_1_1TheoryCore.html#ae0a477cb44ee4e9285008f0653b2f366">00206</a> <span class="comment"></span>  std::vector&lt; std::pair&lt;Expr, Expr&gt; &gt; <a class="code" href="classCVC3_1_1TheoryCore.html#ae0a477cb44ee4e9285008f0653b2f366" title="The set of named expressions to evaluate on a GET_ASSIGNMENT request.">d_assignment</a>;
<a name="l00207"></a>00207 
<a name="l00208"></a>00208 <span class="keyword">public</span>:
<a name="l00209"></a>00209   <span class="comment">/***************************************************************************/</span><span class="comment"></span>
<a name="l00210"></a>00210 <span class="comment">  /*!</span>
<a name="l00211"></a>00211 <span class="comment">   *\class CoreSatAPI</span>
<a name="l00212"></a>00212 <span class="comment">   *\brief Interface class for callbacks to SAT from Core</span>
<a name="l00213"></a>00213 <span class="comment">   *</span>
<a name="l00214"></a>00214 <span class="comment">   * Author: Clark Barrett</span>
<a name="l00215"></a>00215 <span class="comment">   *</span>
<a name="l00216"></a>00216 <span class="comment">   * Created: Mon Dec  5 18:42:15 2005</span>
<a name="l00217"></a>00217 <span class="comment">   */</span>
<a name="l00218"></a>00218   <span class="comment">/***************************************************************************/</span>
<a name="l00219"></a><a class="code" href="classCVC3_1_1TheoryCore_1_1CoreSatAPI.html">00219</a>   <span class="keyword">class </span><a class="code" href="classCVC3_1_1TheoryCore_1_1CoreSatAPI.html" title="Interface class for callbacks to SAT from Core.">CoreSatAPI</a> {
<a name="l00220"></a>00220   <span class="keyword">public</span>:
<a name="l00221"></a><a class="code" href="classCVC3_1_1TheoryCore_1_1CoreSatAPI.html#a84c825e0d6fa2c3ec3f36389b0a48bf5">00221</a>     <a class="code" href="classCVC3_1_1TheoryCore_1_1CoreSatAPI.html#a84c825e0d6fa2c3ec3f36389b0a48bf5">CoreSatAPI</a>() {}
<a name="l00222"></a><a class="code" href="classCVC3_1_1TheoryCore_1_1CoreSatAPI.html#a83e947dd482c742308cc343e7c95ebce">00222</a>     <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1TheoryCore_1_1CoreSatAPI.html#a83e947dd482c742308cc343e7c95ebce">~CoreSatAPI</a>() {}<span class="comment"></span>
<a name="l00223"></a>00223 <span class="comment">    //! Add a new lemma derived by theory core</span>
<a name="l00224"></a>00224 <span class="comment"></span>    <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classCVC3_1_1TheoryCore_1_1CoreSatAPI.html#a01d21bdfe363edfaf6704bd1263fa1fe" title="Add a new lemma derived by theory core.">addLemma</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a>&amp; thm, <span class="keywordtype">int</span> priority = 0,
<a name="l00225"></a>00225                           <span class="keywordtype">bool</span> atBottomScope = <span class="keyword">false</span>) = 0;<span class="comment"></span>
<a name="l00226"></a>00226 <span class="comment">    //! Add an assumption to the set of assumptions in the current context</span>
<a name="l00227"></a>00227 <span class="comment"></span><span class="comment">    /*! Assumptions have the form e |- e */</span>
<a name="l00228"></a>00228     <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1TheoryCore_1_1CoreSatAPI.html#ac56278526add1e4e1a92964a5db037bf" title="Add an assumption to the set of assumptions in the current context.">addAssumption</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; assump) = 0;<span class="comment"></span>
<a name="l00229"></a>00229 <span class="comment">    //! Suggest a splitter to the Sat engine</span>
<a name="l00230"></a>00230 <span class="comment"></span><span class="comment">    /*! \param e is a literal.</span>
<a name="l00231"></a>00231 <span class="comment">     * \param priority is between -10 and 10.  A priority above 0 indicates</span>
<a name="l00232"></a>00232 <span class="comment">     * that the splitter should be favored.  A priority below 0 indicates that</span>
<a name="l00233"></a>00233 <span class="comment">     * the splitter should be delayed.</span>
<a name="l00234"></a>00234 <span class="comment">     */</span>
<a name="l00235"></a>00235     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classCVC3_1_1TheoryCore_1_1CoreSatAPI.html#a241159d6c0886d7e3584c8335d87e38e" title="Suggest a splitter to the Sat engine.">addSplitter</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e, <span class="keywordtype">int</span> priority) = 0;<span class="comment"></span>
<a name="l00236"></a>00236 <span class="comment">    //! Check the validity of e in the current context</span>
<a name="l00237"></a>00237 <span class="comment"></span>    <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classCVC3_1_1TheoryCore_1_1CoreSatAPI.html#a80d37ba26c6d5091f2ecf3a3b4d2a484" title="Check the validity of e in the current context.">check</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e) = 0;
<a name="l00238"></a>00238   };
<a name="l00239"></a>00239 <span class="keyword">private</span>:
<a name="l00240"></a><a class="code" href="classCVC3_1_1TheoryCore.html#ae1618a8812ad74a6349ad585bb677354">00240</a>   <a class="code" href="classCVC3_1_1TheoryCore_1_1CoreSatAPI.html" title="Interface class for callbacks to SAT from Core.">CoreSatAPI</a>* <a class="code" href="classCVC3_1_1TheoryCore.html#ae1618a8812ad74a6349ad585bb677354">d_coreSatAPI</a>;
<a name="l00241"></a>00241 
<a name="l00242"></a>00242 <span class="keyword">private</span>:<span class="comment"></span>
<a name="l00243"></a>00243 <span class="comment">  //! Private method to get a new theorem producer.</span>
<a name="l00244"></a>00244 <span class="comment"></span><span class="comment">  /*! This method is used ONLY by the TheoryCore constructor.  The</span>
<a name="l00245"></a>00245 <span class="comment">    only reason to have this method is to separate the trusted part of</span>
<a name="l00246"></a>00246 <span class="comment">    the constructor into a separate .cpp file (Alternative is to make</span>
<a name="l00247"></a>00247 <span class="comment">    the entire constructer trusted, which is not very safe).</span>
<a name="l00248"></a>00248 <span class="comment">    Method is implemented in core_theorem_producer.cpp  */</span>
<a name="l00249"></a>00249   <a class="code" href="classCVC3_1_1CoreProofRules.html">CoreProofRules</a>* <a class="code" href="classCVC3_1_1TheoryCore.html#a5b386f16781365b7421e884baaebae41" title="Private method to get a new theorem producer.">createProofRules</a>(<a class="code" href="classCVC3_1_1TheoremManager.html">TheoremManager</a>* tm);
<a name="l00250"></a>00250 
<a name="l00251"></a>00251   <span class="comment">// Helper functions</span>
<a name="l00252"></a>00252 <span class="comment"></span>
<a name="l00253"></a>00253 <span class="comment">  //! Effort level for processFactQueue</span>
<a name="l00254"></a>00254 <span class="comment"></span><span class="comment">  /*! LOW means just process facts, don&#39;t call theory checkSat methods</span>
<a name="l00255"></a>00255 <span class="comment">      NORMAL means call theory checkSat methods without full effort</span>
<a name="l00256"></a>00256 <span class="comment">      FULL means call theory checkSat methods with full effort</span>
<a name="l00257"></a>00257 <span class="comment">  */</span>
<a name="l00258"></a><a class="code" href="classCVC3_1_1TheoryCore.html#a9563215d97859a27f661c1517614f6ce">00258</a>   <span class="keyword">typedef</span> <span class="keyword">enum</span> {
<a name="l00259"></a><a class="code" href="classCVC3_1_1TheoryCore.html#a9563215d97859a27f661c1517614f6ceaa35ba8e293104fb62e9163b4c036386b">00259</a>     <a class="code" href="classCVC3_1_1TheoryCore.html#a9563215d97859a27f661c1517614f6ceaa35ba8e293104fb62e9163b4c036386b">LOW</a>,
<a name="l00260"></a><a class="code" href="classCVC3_1_1TheoryCore.html#a9563215d97859a27f661c1517614f6cea1c0ce47707a6729f337134fc3239ef07">00260</a>     <a class="code" href="classCVC3_1_1TheoryCore.html#a9563215d97859a27f661c1517614f6cea1c0ce47707a6729f337134fc3239ef07">NORMAL</a>,
<a name="l00261"></a><a class="code" href="classCVC3_1_1TheoryCore.html#a9563215d97859a27f661c1517614f6ceaf927a488bd3f95079d191debe7e93a06">00261</a>     <a class="code" href="classCVC3_1_1TheoryCore.html#a9563215d97859a27f661c1517614f6ceaf927a488bd3f95079d191debe7e93a06">FULL</a>
<a name="l00262"></a>00262   } <a class="code" href="classCVC3_1_1TheoryCore.html#a9563215d97859a27f661c1517614f6ce" title="Effort level for processFactQueue.">EffortLevel</a>;
<a name="l00263"></a>00263 <span class="comment"></span>
<a name="l00264"></a>00264 <span class="comment">  //! A helper function for addFact()</span>
<a name="l00265"></a>00265 <span class="comment"></span><span class="comment">  /*! Returns true if lemmas were added to search engine, false otherwise */</span>
<a name="l00266"></a>00266   <span class="keywordtype">bool</span> <a class="code" href="classCVC3_1_1TheoryCore.html#a36cd038dd5644d4a2bd6ea56cec2212e" title="A helper function for addFact()">processFactQueue</a>(<a class="code" href="classCVC3_1_1TheoryCore.html#a9563215d97859a27f661c1517614f6ce" title="Effort level for processFactQueue.">EffortLevel</a> effort = <a class="code" href="classCVC3_1_1TheoryCore.html#a9563215d97859a27f661c1517614f6cea1c0ce47707a6729f337134fc3239ef07">NORMAL</a>);<span class="comment"></span>
<a name="l00267"></a>00267 <span class="comment">  //! Process a notify list triggered as a result of new theorem e</span>
<a name="l00268"></a>00268 <span class="comment"></span>  <span class="keywordtype">void</span> <a class="code" href="classCVC3_1_1TheoryCore.html#a728d9c7d448cc32f58292677e7b5aae2" title="Process a notify list triggered as a result of new theorem e.">processNotify</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a>&amp; e, <a class="code" href="classCVC3_1_1NotifyList.html">NotifyList</a>* L);<span class="comment"></span>
<a name="l00269"></a>00269 <span class="comment">  //! Transitive composition of other rewrites with the above</span>
<a name="l00270"></a>00270 <span class="comment"></span>  <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1TheoryCore.html#ad0643e3175b0c8fd270b044b02999de9" title="Transitive composition of other rewrites with the above.">rewriteCore</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a>&amp; e);<span class="comment"></span>
<a name="l00271"></a>00271 <span class="comment">  //! Helper for registerAtom</span>
<a name="l00272"></a>00272 <span class="comment"></span>  <span class="keywordtype">void</span> <a class="code" href="classCVC3_1_1TheoryCore.html#af29a30b97ecc26f0c4b3136531487caf" title="Helper for registerAtom.">setupSubFormulas</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; s, <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_1Theorem.html">Theorem</a>&amp; thm);<span class="comment"></span>
<a name="l00273"></a>00273 <span class="comment">  //! Process updates recorded by calls to update()</span>
<a name="l00274"></a>00274 <span class="comment"></span>  <span class="keywordtype">void</span> <a class="code" href="classCVC3_1_1TheoryCore.html#a846416a29d02c4f2615f4de65e042cac" title="Process updates recorded by calls to update()">processUpdates</a>();<span class="comment"></span>
<a name="l00275"></a>00275 <span class="comment">  /*! @brief The assumptions for e must be in H or phi.  &quot;Core&quot; added</span>
<a name="l00276"></a>00276 <span class="comment">   * to avoid conflict with theory interface function name</span>
<a name="l00277"></a>00277 <span class="comment">   */</span>
<a name="l00278"></a>00278   <span class="keywordtype">void</span> <a class="code" href="classCVC3_1_1TheoryCore.html#a3a897e60d6dd1dfd382870054e5ad777" title="The assumptions for e must be in H or phi. &quot;Core&quot; added to avoid conflict with theory interface funct...">assertFactCore</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a>&amp; e);<span class="comment"></span>
<a name="l00279"></a>00279 <span class="comment">  //! Process a newly derived formula</span>
<a name="l00280"></a>00280 <span class="comment"></span>  <span class="keywordtype">void</span> <a class="code" href="classCVC3_1_1TheoryCore.html#a1f662e7f045032350f2a3bccc63a71d6" title="Process a newly derived formula.">assertFormula</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a>&amp; e);<span class="comment"></span>
<a name="l00281"></a>00281 <span class="comment">  //! Check that lhs and rhs of thm have same base type</span>
<a name="l00282"></a>00282 <span class="comment"></span>  <a class="code" href="debug_8h.html#a600cb2d68efe7cc413cccbb5714c7016">IF_DEBUG</a>(<span class="keywordtype">void</span> checkRewriteType(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a>&amp; thm);)<span class="comment"></span>
<a name="l00283"></a>00283 <span class="comment">  /*! @brief Returns phi |= e = rewriteCore(e).  &quot;Core&quot; added to avoid</span>
<a name="l00284"></a>00284 <span class="comment">    conflict with theory interface function name */</span>
<a name="l00285"></a>00285   <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1TheoryCore.html#ad0643e3175b0c8fd270b044b02999de9" title="Transitive composition of other rewrites with the above.">rewriteCore</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e);
<a name="l00286"></a>00286 <span class="comment"></span>
<a name="l00287"></a>00287 <span class="comment">  //! Set the find pointer of an atomic formula and notify SearchEngine</span>
<a name="l00288"></a>00288 <span class="comment"></span><span class="comment">  /*! \param thm is a Theorem(phi) or Theorem(NOT phi), where phi is</span>
<a name="l00289"></a>00289 <span class="comment">   * an atomic formula to get a find pointer to TRUE or FALSE,</span>
<a name="l00290"></a>00290 <span class="comment">   * respectively.</span>
<a name="l00291"></a>00291 <span class="comment">   */</span>
<a name="l00292"></a>00292   <span class="keywordtype">void</span> <a class="code" href="classCVC3_1_1TheoryCore.html#a63e4ccd049c6191c675fe8ad4bf1979f" title="Set the find pointer of an atomic formula and notify SearchEngine.">setFindLiteral</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a>&amp; thm);<span class="comment"></span>
<a name="l00293"></a>00293 <span class="comment">  //! Core rewrites for literals (NOT and EQ)</span>
<a name="l00294"></a>00294 <span class="comment"></span>  <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1TheoryCore.html#a8ba8c93d75329369b8d91f37a463ef09" title="Core rewrites for literals (NOT and EQ)">rewriteLitCore</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e);<span class="comment"></span>
<a name="l00295"></a>00295 <span class="comment">  //! Enqueue a fact to be sent to the SearchEngine</span>
<a name="l00296"></a>00296 <span class="comment"></span>  <span class="comment">//  void enqueueSE(const Theorem&amp; thm);//yeting</span><span class="comment"></span>
<a name="l00297"></a>00297 <span class="comment">  //! Fetch the concrete assignment to the variable during model generation</span>
<a name="l00298"></a>00298 <span class="comment"></span>  <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1TheoryCore.html#ab360cca9e30af4434130557f6b45f627" title="Enqueue a fact to be sent to the SearchEngine.">getModelValue</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e);
<a name="l00299"></a>00299 <span class="comment"></span>
<a name="l00300"></a>00300 <span class="comment">  //! An auxiliary recursive function to process COND expressions into ITE</span>
<a name="l00301"></a>00301 <span class="comment"></span>  <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> <a class="code" href="classCVC3_1_1TheoryCore.html#aabb093a909384e36c8780e433453358a" title="An auxiliary recursive function to process COND expressions into ITE.">processCond</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e, <span class="keywordtype">int</span> i);
<a name="l00302"></a>00302 <span class="comment"></span>
<a name="l00303"></a>00303 <span class="comment">  //! Return true if no special parsing is required for this kind</span>
<a name="l00304"></a>00304 <span class="comment"></span>  <span class="keywordtype">bool</span> <a class="code" href="classCVC3_1_1TheoryCore.html#ac79ad21d2aeee1d50ce53ab7f3a76eba" title="Return true if no special parsing is required for this kind.">isBasicKind</a>(<span class="keywordtype">int</span> kind);
<a name="l00305"></a>00305 <span class="comment"></span>
<a name="l00306"></a>00306 <span class="comment">  //! Helper check functions for solve</span>
<a name="l00307"></a>00307 <span class="comment"></span>  <span class="keywordtype">void</span> <a class="code" href="classCVC3_1_1TheoryCore.html#a0b0a73410836f7b3a0808a67647ba448" title="Helper check functions for solve.">checkEquation</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a>&amp; thm);<span class="comment"></span>
<a name="l00308"></a>00308 <span class="comment">  //! Helper check functions for solve</span>
<a name="l00309"></a>00309 <span class="comment"></span>  <span class="keywordtype">void</span> <a class="code" href="classCVC3_1_1TheoryCore.html#a164ec255c41d187cc87f6996a8a5389a" title="Helper check functions for solve.">checkSolved</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a>&amp; thm);
<a name="l00310"></a>00310 
<a name="l00311"></a>00311   <span class="comment">// Time limit exhausted</span>
<a name="l00312"></a>00312   <span class="keywordtype">bool</span> <a class="code" href="classCVC3_1_1TheoryCore.html#a226706d3c1ddda709f4b09ec2a4b55bb">timeLimitReached</a>();
<a name="l00313"></a>00313 <span class="comment"></span>
<a name="l00314"></a>00314 <span class="comment">  //! Print an expression in the shared subset of SMT-LIB v1/v2</span>
<a name="l00315"></a>00315 <span class="comment">  //! Should only be called if os.lang() is SMTLIB_LANG or SMTLIB_V2_LANG.</span>
<a name="l00316"></a>00316 <span class="comment"></span>  <a class="code" href="classCVC3_1_1ExprStream.html" title="Pretty-printing output stream for Expr. READ THE DOCS BEFORE USING!">ExprStream</a>&amp; <a class="code" href="classCVC3_1_1TheoryCore.html#a2856680de1938c077d7b25c865992de6">printSmtLibShared</a>(<a class="code" href="classCVC3_1_1ExprStream.html" title="Pretty-printing output stream for Expr. READ THE DOCS BEFORE USING!">ExprStream</a>&amp; os, <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="l00317"></a>00317 
<a name="l00318"></a>00318 
<a name="l00319"></a>00319 <span class="keyword">public</span>:<span class="comment"></span>
<a name="l00320"></a>00320 <span class="comment">  //! Constructor</span>
<a name="l00321"></a>00321 <span class="comment"></span>  <a class="code" href="classCVC3_1_1TheoryCore.html#acd5196a42683a0f357560588d4e81817" title="Constructor.">TheoryCore</a>(<a class="code" href="classCVC3_1_1ContextManager.html" title="Manager for multiple contexts. Also holds current context.">ContextManager</a>* cm, <a class="code" href="classCVC3_1_1ExprManager.html">ExprManager</a>* em,
<a name="l00322"></a>00322              <a class="code" href="classCVC3_1_1TheoremManager.html">TheoremManager</a>* tm, <a class="code" href="classCVC3_1_1Translator.html">Translator</a>* tr,
<a name="l00323"></a>00323              <span class="keyword">const</span> <a class="code" href="classCVC3_1_1CLFlags.html">CLFlags</a>&amp; flags,
<a name="l00324"></a>00324              <a class="code" href="classCVC3_1_1Statistics.html">Statistics</a>&amp; statistics);<span class="comment"></span>
<a name="l00325"></a>00325 <span class="comment">  //! Destructor</span>
<a name="l00326"></a>00326 <span class="comment"></span>  <a class="code" href="classCVC3_1_1TheoryCore.html#ad91cca07e2f1e8cd9614a6e88d6dd232" title="Destructor.">~TheoryCore</a>();
<a name="l00327"></a>00327 <span class="comment"></span>
<a name="l00328"></a>00328 <span class="comment">  //! Request a unit of resource</span>
<a name="l00329"></a>00329 <span class="comment"></span><span class="comment">  /*! It will be subtracted from the resource limit.</span>
<a name="l00330"></a>00330 <span class="comment">   *</span>
<a name="l00331"></a>00331 <span class="comment">   * \return true if resource unit is granted, false if no more</span>
<a name="l00332"></a>00332 <span class="comment">   * resources available.</span>
<a name="l00333"></a>00333 <span class="comment">   */</span>
<a name="l00334"></a><a class="code" href="classCVC3_1_1TheoryCore.html#a1558a9399314632d76c3d086f680d3b7">00334</a>   <span class="keywordtype">void</span> <a class="code" href="classCVC3_1_1TheoryCore.html#a1558a9399314632d76c3d086f680d3b7" title="Request a unit of resource.">getResource</a>() {
<a name="l00335"></a>00335       <a class="code" href="classCVC3_1_1TheoryCore.html#a7f119c4fa5313b72feca7dd441e045f0">getStatistics</a>().<a class="code" href="classCVC3_1_1Statistics.html#a9b2503d33c8c41b768f40b1a43c2d3bf">counter</a>(<span class="stringliteral">&quot;resource&quot;</span>)++;
<a name="l00336"></a>00336       <span class="keywordflow">if</span> (<a class="code" href="classCVC3_1_1TheoryCore.html#a7040ce9b2fa8d567df0d84a5ceee84bf" title="Resource limit (0==unlimited, 1==no more resources, &gt;=2 - available).">d_resourceLimit</a> &gt; 1) <a class="code" href="classCVC3_1_1TheoryCore.html#a7040ce9b2fa8d567df0d84a5ceee84bf" title="Resource limit (0==unlimited, 1==no more resources, &gt;=2 - available).">d_resourceLimit</a>--;
<a name="l00337"></a>00337   }
<a name="l00338"></a>00338 <span class="comment"></span>
<a name="l00339"></a>00339 <span class="comment">  //! Register a SatAPI for TheoryCore</span>
<a name="l00340"></a><a class="code" href="classCVC3_1_1TheoryCore.html#afb6629080bceb44023f1bb3a44f9136f">00340</a> <span class="comment"></span>  <span class="keywordtype">void</span> <a class="code" href="classCVC3_1_1TheoryCore.html#afb6629080bceb44023f1bb3a44f9136f" title="Register a SatAPI for TheoryCore.">registerCoreSatAPI</a>(<a class="code" href="classCVC3_1_1TheoryCore_1_1CoreSatAPI.html" title="Interface class for callbacks to SAT from Core.">CoreSatAPI</a>* coreSatAPI) { <a class="code" href="classCVC3_1_1TheoryCore.html#ae1618a8812ad74a6349ad585bb677354">d_coreSatAPI</a> = coreSatAPI; }
<a name="l00341"></a>00341 <span class="comment"></span>
<a name="l00342"></a>00342 <span class="comment">  //! Register a callback for every equality</span>
<a name="l00343"></a><a class="code" href="classCVC3_1_1TheoryCore.html#ac317be8457175b3cf458bff7f4cb6e27">00343</a> <span class="comment"></span>  <span class="keywordtype">void</span> <a class="code" href="classCVC3_1_1TheoryCore.html#ac317be8457175b3cf458bff7f4cb6e27" title="Register a callback for every equality.">addNotifyEq</a>(<a class="code" href="classCVC3_1_1Theory.html" title="Base class for theories.">Theory</a>* 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 class="code" href="classCVC3_1_1TheoryCore.html#a96ce7c2fe3b14e3b8b4661fbe19db290" title="Notify list that gets processed on every equality.">d_notifyEq</a>.<a class="code" href="classCVC3_1_1NotifyList.html#a48b4004ce9b5f70b698d9e45bc39ab9b">add</a>(t, e); }
<a name="l00344"></a>00344 <span class="comment"></span>
<a name="l00345"></a>00345 <span class="comment">  //! Call theory-specific preprocess routines</span>
<a name="l00346"></a>00346 <span class="comment"></span>  <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1TheoryCore.html#a052424ef27a5042f6321db9a8d41bf82" title="Call theory-specific preprocess routines.">callTheoryPreprocess</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e);
<a name="l00347"></a>00347 
<a name="l00348"></a><a class="code" href="classCVC3_1_1TheoryCore.html#a9377f423f4fd59fdac396794363733a6">00348</a>   <a class="code" href="classCVC3_1_1ContextManager.html" title="Manager for multiple contexts. Also holds current context.">ContextManager</a>* <a class="code" href="classCVC3_1_1TheoryCore.html#a9377f423f4fd59fdac396794363733a6">getCM</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classCVC3_1_1TheoryCore.html#aa803e0e65fec3e389c9c4d12d8d634a3" title="Context manager.">d_cm</a>; }
<a name="l00349"></a><a class="code" href="classCVC3_1_1TheoryCore.html#af3077cff0601b8ae28e420ef5ce2ea37">00349</a>   <a class="code" href="classCVC3_1_1TheoremManager.html">TheoremManager</a>* <a class="code" href="classCVC3_1_1TheoryCore.html#af3077cff0601b8ae28e420ef5ce2ea37">getTM</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classCVC3_1_1TheoryCore.html#a8b9c81920208ce15dac9eb3bb97b4a2b" title="Theorem manager.">d_tm</a>; }
<a name="l00350"></a><a class="code" href="classCVC3_1_1TheoryCore.html#a46b2792a5c24f95ccfc3fbfc0456b09f">00350</a>   <span class="keyword">const</span> <a class="code" href="classCVC3_1_1CLFlags.html">CLFlags</a>&amp; <a class="code" href="classCVC3_1_1TheoryCore.html#a46b2792a5c24f95ccfc3fbfc0456b09f">getFlags</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classCVC3_1_1TheoryCore.html#adf5b754e1e4732cb0e1946cf0f274885" title="Reference to command line flags.">d_flags</a>; }
<a name="l00351"></a><a class="code" href="classCVC3_1_1TheoryCore.html#a7f119c4fa5313b72feca7dd441e045f0">00351</a>   <a class="code" href="classCVC3_1_1Statistics.html">Statistics</a>&amp; <a class="code" href="classCVC3_1_1TheoryCore.html#a7f119c4fa5313b72feca7dd441e045f0">getStatistics</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classCVC3_1_1TheoryCore.html#a053311bcc9681a402ab440bf90447632" title="Reference to statistics.">d_statistics</a>; }
<a name="l00352"></a><a class="code" href="classCVC3_1_1TheoryCore.html#acc963fd43994f06d3647394b731e835c">00352</a>   <a class="code" href="classCVC3_1_1ExprTransform.html">ExprTransform</a>* <a class="code" href="classCVC3_1_1TheoryCore.html#acc963fd43994f06d3647394b731e835c">getExprTrans</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classCVC3_1_1TheoryCore.html#a03b7c799d7ee3b3a4a10f14b2faacfbb" title="Expr Transformer.">d_exprTrans</a>; }
<a name="l00353"></a><a class="code" href="classCVC3_1_1TheoryCore.html#a261880d3c6b9b852de5e1d146b9e1731">00353</a>   <a class="code" href="classCVC3_1_1CoreProofRules.html">CoreProofRules</a>* <a class="code" href="classCVC3_1_1TheoryCore.html#a261880d3c6b9b852de5e1d146b9e1731">getCoreRules</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classCVC3_1_1TheoryCore.html#af28b98269dc8ef40a6fa97d58f414173" title="Core proof rules.">d_rules</a>; }
<a name="l00354"></a><a class="code" href="classCVC3_1_1TheoryCore.html#af21dce6ee9ed152e132a4e77f10323e7">00354</a>   <a class="code" href="classCVC3_1_1Translator.html">Translator</a>* <a class="code" href="classCVC3_1_1TheoryCore.html#af21dce6ee9ed152e132a4e77f10323e7">getTranslator</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classCVC3_1_1TheoryCore.html#abe21ce53a179720cb3e94293fd6d771f" title="Translator.">d_translator</a>; }
<a name="l00355"></a>00355 <span class="comment"></span>
<a name="l00356"></a>00356 <span class="comment">  //! Access to tcc cache (needed by theory_bitvector)</span>
<a name="l00357"></a><a class="code" href="classCVC3_1_1TheoryCore.html#a1a2ffa9c7365e9f0af36fbd83e2421ed">00357</a> <span class="comment"></span>  <a class="code" href="classCVC3_1_1ExprMap.html">ExprMap&lt;Expr&gt;</a>&amp; <a class="code" href="classCVC3_1_1TheoryCore.html#a1a2ffa9c7365e9f0af36fbd83e2421ed" title="Access to tcc cache (needed by theory_bitvector)">tccCache</a>() { <span class="keywordflow">return</span> <a class="code" href="classCVC3_1_1TheoryCore.html#ab1f589f325461e2bb39f0035c2dfa4bb" title="Cache for tcc&#39;s.">d_tccCache</a>; }
<a name="l00358"></a>00358 <span class="comment"></span>
<a name="l00359"></a>00359 <span class="comment">  //! Get list of terms</span>
<a name="l00360"></a><a class="code" href="classCVC3_1_1TheoryCore.html#a605f2eee0d52005dba7450e14d36c002">00360</a> <span class="comment"></span>  <span class="keyword">const</span> <a class="code" href="classCVC3_1_1CDList.html">CDList&lt;Expr&gt;</a>&amp; <a class="code" href="classCVC3_1_1TheoryCore.html#a605f2eee0d52005dba7450e14d36c002" title="Get list of terms.">getTerms</a>() { <span class="keywordflow">return</span> <a class="code" href="classCVC3_1_1TheoryCore.html#a9ebcf505b2577cd3a3a29d70a4fd50ae" title="List of all active terms in the system (for quantifier instantiation)">d_terms</a>; }
<a name="l00361"></a>00361 
<a name="l00362"></a>00362   <span class="keywordtype">int</span> <a class="code" href="classCVC3_1_1TheoryCore.html#aac8dbad8636607fa6424b0926c6c1c59">getCurQuantLevel</a>();
<a name="l00363"></a>00363 <span class="comment"></span>
<a name="l00364"></a>00364 <span class="comment">  //! Set the flag for the preprocessor</span>
<a name="l00365"></a><a class="code" href="classCVC3_1_1TheoryCore.html#a2e0118c395ece4dfcfae018628e3b08b">00365</a> <span class="comment"></span>  <span class="keywordtype">void</span> <a class="code" href="classCVC3_1_1TheoryCore.html#a2e0118c395ece4dfcfae018628e3b08b" title="Set the flag for the preprocessor.">setInPP</a>() { <a class="code" href="classCVC3_1_1TheoryCore.html#aac5050e644f0c475d104f4dd3a8ddf32">d_inPP</a> = <span class="keyword">true</span>; }
<a name="l00366"></a><a class="code" href="classCVC3_1_1TheoryCore.html#aeeb68f961407ee80a9762a95e6998cf2">00366</a>   <span class="keywordtype">void</span> <a class="code" href="classCVC3_1_1TheoryCore.html#aeeb68f961407ee80a9762a95e6998cf2">clearInPP</a>() { <a class="code" href="classCVC3_1_1TheoryCore.html#aac5050e644f0c475d104f4dd3a8ddf32">d_inPP</a> = <span class="keyword">false</span>; }
<a name="l00367"></a>00367 <span class="comment"></span>
<a name="l00368"></a>00368 <span class="comment">  //! Get theorem which was responsible for introducing this term</span>
<a name="l00369"></a>00369 <span class="comment"></span>  <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1TheoryCore.html#ad072fbeed392b4b7ecb651609acfd9bd" title="Get theorem which was responsible for introducing this term.">getTheoremForTerm</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e);<span class="comment"></span>
<a name="l00370"></a>00370 <span class="comment">  //! Get quantification level at which this term was introduced</span>
<a name="l00371"></a>00371 <span class="comment"></span>  <span class="keywordtype">unsigned</span> <a class="code" href="classCVC3_1_1TheoryCore.html#ae4e1f7bd995e6ef2bff499869d95c177" title="Get quantification level at which this term was introduced.">getQuantLevelForTerm</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e);<span class="comment"></span>
<a name="l00372"></a>00372 <span class="comment">  //! Get list of predicates</span>
<a name="l00373"></a><a class="code" href="classCVC3_1_1TheoryCore.html#a2c0a37ab972568b851d69292959eb915">00373</a> <span class="comment"></span>  <span class="keyword">const</span> <a class="code" href="classCVC3_1_1CDList.html">CDList&lt;Expr&gt;</a>&amp; <a class="code" href="classCVC3_1_1TheoryCore.html#a2c0a37ab972568b851d69292959eb915" title="Get list of predicates.">getPredicates</a>() { <span class="keywordflow">return</span> <a class="code" href="classCVC3_1_1TheoryCore.html#a27f2f350452da6f7adca44c342a1f29d" title="List of all active non-equality atomic formulas in the system (for quantifier instantiation)">d_predicates</a>; }<span class="comment"></span>
<a name="l00374"></a>00374 <span class="comment">  //! Whether updates are being processed</span>
<a name="l00375"></a><a class="code" href="classCVC3_1_1TheoryCore.html#ac3c2ee71df31487191401722ea1d235a">00375</a> <span class="comment"></span>  <span class="keywordtype">bool</span> <a class="code" href="classCVC3_1_1TheoryCore.html#ac3c2ee71df31487191401722ea1d235a" title="Whether updates are being processed.">inUpdate</a>() { <span class="keywordflow">return</span> <a class="code" href="classCVC3_1_1TheoryCore.html#a966030ae5b96557c9ea5de874a9526ef" title="Whether we are in the middle of doing updates.">d_inUpdate</a> &gt; 0; }<span class="comment"></span>
<a name="l00376"></a>00376 <span class="comment">  //! Whether its OK to add new facts (for use in rewrites)</span>
<a name="l00377"></a><a class="code" href="classCVC3_1_1TheoryCore.html#a753057879f8565c504f162c13d0185a2">00377</a> <span class="comment"></span>  <span class="keywordtype">bool</span> <a class="code" href="classCVC3_1_1TheoryCore.html#a753057879f8565c504f162c13d0185a2" title="Whether its OK to add new facts (for use in rewrites)">okToEnqueue</a>()
<a name="l00378"></a>00378     { <span class="keywordflow">return</span> <a class="code" href="classCVC3_1_1TheoryCore.html#abf9ffc3f83f262e0acdece359d2d00bd">d_inAddFact</a> || <a class="code" href="classCVC3_1_1TheoryCore.html#adc61197a61a4a024cdd614a281f8cf0c">d_inCheckSATCore</a> || <a class="code" href="classCVC3_1_1TheoryCore.html#a608590056910229da1a794d0dd5930c4">d_inRegisterAtom</a> || <a class="code" href="classCVC3_1_1TheoryCore.html#aac5050e644f0c475d104f4dd3a8ddf32">d_inPP</a>; }
<a name="l00379"></a>00379 
<a name="l00380"></a>00380   <span class="comment">// Implementation of Theory API</span><span class="comment"></span>
<a name="l00381"></a>00381 <span class="comment">  /*! Variables of uninterpreted types may be sent here, and they</span>
<a name="l00382"></a>00382 <span class="comment">    should be ignored. */</span>
<a name="l00383"></a><a class="code" href="classCVC3_1_1TheoryCore.html#aaf10cf53aae11fb855883f87c29e02e4">00383</a>   <span class="keywordtype">void</span> <a class="code" href="classCVC3_1_1TheoryCore.html#aaf10cf53aae11fb855883f87c29e02e4">addSharedTerm</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e) { }
<a name="l00384"></a>00384   <span class="keywordtype">void</span> <a class="code" href="classCVC3_1_1TheoryCore.html#a36d46f0d53c3513ea56ee2eba60cd75a" title="Assert a new fact to the decision procedure.">assertFact</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a>&amp; e);
<a name="l00385"></a><a class="code" href="classCVC3_1_1TheoryCore.html#a66cdb1662f1608dc95664b41ff90f1e4">00385</a>   <span class="keywordtype">void</span> <a class="code" href="classCVC3_1_1TheoryCore.html#a66cdb1662f1608dc95664b41ff90f1e4" title="Check for satisfiability in the theory.">checkSat</a>(<span class="keywordtype">bool</span> fullEffort) { }
<a name="l00386"></a>00386   <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1TheoryCore.html#a54bce613a6b49a9a8a1a888ec36346d8" title="Theory-specific rewrite rules.">rewrite</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e);<span class="comment"></span>
<a name="l00387"></a>00387 <span class="comment">  /*! Only Boolean constants (TRUE and FALSE) and variables of</span>
<a name="l00388"></a>00388 <span class="comment">    uninterpreted types should appear here (they come from records and</span>
<a name="l00389"></a>00389 <span class="comment">    tuples).  Just ignore them. */</span>
<a name="l00390"></a><a class="code" href="classCVC3_1_1TheoryCore.html#af4468d5d65b78ac9dc4c89c71c7391f6">00390</a>   <span class="keywordtype">void</span> <a class="code" href="classCVC3_1_1TheoryCore.html#af4468d5d65b78ac9dc4c89c71c7391f6">setup</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e) { }
<a name="l00391"></a>00391   <span class="keywordtype">void</span> <a class="code" href="classCVC3_1_1TheoryCore.html#a435e2305420c1ed5b2ff1e4758a50dc5">update</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a>&amp; e, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; d);
<a name="l00392"></a>00392   <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1TheoryCore.html#a2128e2419413e5c0455ca3011fa2b2db">solve</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a>&amp; e);
<a name="l00393"></a>00393 
<a name="l00394"></a>00394   <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1TheoryCore.html#a3aefb5e53e848ad18a5846d5be42d3d2" title="Recursive simplification step.">simplifyOp</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e);
<a name="l00395"></a>00395   <span class="keywordtype">void</span> <a class="code" href="classCVC3_1_1TheoryCore.html#ada717b1e852018d77f154682a01f6731" title="Check that e is a valid Type expr.">checkType</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e);
<a name="l00396"></a>00396   <a class="code" href="namespaceCVC3.html#af969e724f8b7016909f5804e8cea3e54" title="Enum for cardinality of types.">Cardinality</a> <a class="code" href="classCVC3_1_1TheoryCore.html#acf724e4b497f7ca829eaaca9007fbae6" title="Compute information related to finiteness of types.">finiteTypeInfo</a>(<a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e, <a class="code" href="classCVC3_1_1Unsigned.html">Unsigned</a>&amp; n,
<a name="l00397"></a>00397                              <span class="keywordtype">bool</span> enumerate, <span class="keywordtype">bool</span> computeSize);
<a name="l00398"></a>00398   <span class="keywordtype">void</span> <a class="code" href="classCVC3_1_1TheoryCore.html#a4968c9a9514669bbd9c2e6774f17b743" title="Compute and store the type of e.">computeType</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e);
<a name="l00399"></a>00399   <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a> <a class="code" href="classCVC3_1_1TheoryCore.html#a624d8ed203fdd666ae97ec10f9859d26" title="Compute the base type of the top-level operator of an arbitrary type.">computeBaseType</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a>&amp; t);
<a name="l00400"></a>00400   <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> <a class="code" href="classCVC3_1_1TheoryCore.html#acd533616106f9987039cfbd5988d50d5" title="Compute and cache the TCC of e.">computeTCC</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e);
<a name="l00401"></a>00401   <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> <a class="code" href="classCVC3_1_1TheoryCore.html#ab12924c15cb53753ba91d1766282a71e" title="Theory specific computation of the subtyping predicate for type t applied to the expression e...">computeTypePred</a>(<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="l00402"></a>00402   <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> <a class="code" href="classCVC3_1_1TheoryCore.html#a0cf4d5c76db5be87a848d694adff4dfe" title="Theory-specific parsing implemented by the DP.">parseExprOp</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e);
<a name="l00403"></a>00403   <a class="code" href="classCVC3_1_1ExprStream.html" title="Pretty-printing output stream for Expr. READ THE DOCS BEFORE USING!">ExprStream</a>&amp; <a class="code" href="classCVC3_1_1TheoryCore.html#ab334f07590ad297ad6daa3383c61de5f" title="Theory-specific pretty-printing.">print</a>(<a class="code" href="classCVC3_1_1ExprStream.html" title="Pretty-printing output stream for Expr. READ THE DOCS BEFORE USING!">ExprStream</a>&amp; os, <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="l00404"></a>00404 <span class="comment"></span>
<a name="l00405"></a>00405 <span class="comment">  //! Calls for other theories to add facts to refine a coutnerexample.</span>
<a name="l00406"></a>00406 <span class="comment"></span>  <span class="keywordtype">void</span> <a class="code" href="classCVC3_1_1TheoryCore.html#a6822c229c357d1afcda22bc073d45142" title="Calls for other theories to add facts to refine a coutnerexample.">refineCounterExample</a>();
<a name="l00407"></a>00407   <span class="keywordtype">bool</span> <a class="code" href="classCVC3_1_1TheoryCore.html#a6822c229c357d1afcda22bc073d45142" title="Calls for other theories to add facts to refine a coutnerexample.">refineCounterExample</a>(<a class="code" href="classCVC3_1_1Theorem.html">Theorem</a>&amp; thm);
<a name="l00408"></a>00408   <span class="keywordtype">void</span> <a class="code" href="classCVC3_1_1TheoryCore.html#a6edb2212446e43165666dcb7f319985a" title="Assign concrete values to basic-type variables in v.">computeModelBasic</a>(<span class="keyword">const</span> std::vector&lt;Expr&gt;&amp; v);
<a name="l00409"></a>00409 
<a name="l00410"></a>00410   <span class="comment">// User-level API methods</span>
<a name="l00411"></a>00411 <span class="comment"></span>
<a name="l00412"></a>00412 <span class="comment">  /*! @brief Add a new assertion to the core from the user or a SAT</span>
<a name="l00413"></a>00413 <span class="comment">    solver.  Do NOT use it in a decision procedure; use</span>
<a name="l00414"></a>00414 <span class="comment">    enqueueFact(). */</span><span class="comment"></span>
<a name="l00415"></a>00415 <span class="comment">  /*! \sa enqueueFact */</span>
<a name="l00416"></a>00416   <span class="keywordtype">void</span> <a class="code" href="classCVC3_1_1TheoryCore.html#aecef2465eb761f7f112ddce77f93d081" title="Add a new assertion to the core from the user or a SAT solver. Do NOT use it in a decision procedure;...">addFact</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a>&amp; e);
<a name="l00417"></a>00417 <span class="comment"></span>
<a name="l00418"></a>00418 <span class="comment">  //! Top-level simplifier</span>
<a name="l00419"></a>00419 <span class="comment"></span>  <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1TheoryCore.html#a8a66da5ca687474a3a725448a3be8c41" title="Top-level simplifier.">simplify</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e);
<a name="l00420"></a>00420 <span class="comment"></span>
<a name="l00421"></a>00421 <span class="comment">  //! Check if the current context is inconsistent</span>
<a name="l00422"></a><a class="code" href="classCVC3_1_1TheoryCore.html#a289340e4457a79f1101f37c3a07a49ed">00422</a> <span class="comment"></span>  <span class="keywordtype">bool</span> <a class="code" href="classCVC3_1_1TheoryCore.html#a289340e4457a79f1101f37c3a07a49ed" title="Check if the current context is inconsistent.">inconsistent</a>() { <span class="keywordflow">return</span> <a class="code" href="classCVC3_1_1TheoryCore.html#ac44993c5095bc2fda1f6b931060223bf" title="Inconsistent flag.">d_inconsistent</a> ; }<span class="comment"></span>
<a name="l00423"></a>00423 <span class="comment">  //! Get the proof of inconsistency for the current context</span>
<a name="l00424"></a>00424 <span class="comment"></span><span class="comment">  /*! \return Theorem(FALSE) */</span>
<a name="l00425"></a><a class="code" href="classCVC3_1_1TheoryCore.html#a5c7d2aa7db5db78829b8558d28560ddf">00425</a>   <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1TheoryCore.html#a5c7d2aa7db5db78829b8558d28560ddf" title="Get the proof of inconsistency for the current context.">inconsistentThm</a>() { <span class="keywordflow">return</span> <a class="code" href="classCVC3_1_1TheoryCore.html#a1560124d30d8cda4a6cedca4c919f8aa" title="Proof of inconsistent.">d_incThm</a>; }<span class="comment"></span>
<a name="l00426"></a>00426 <span class="comment">  /*! @brief To be called by SearchEngine when it believes the context</span>
<a name="l00427"></a>00427 <span class="comment">   * is satisfiable.</span>
<a name="l00428"></a>00428 <span class="comment">   *</span>
<a name="l00429"></a>00429 <span class="comment">   * \return true if definitely consistent or inconsistent and false if</span>
<a name="l00430"></a>00430 <span class="comment">   * consistency is unknown.</span>
<a name="l00431"></a>00431 <span class="comment">   */</span>
<a name="l00432"></a>00432   <span class="keywordtype">bool</span> <a class="code" href="classCVC3_1_1TheoryCore.html#ae45217f71500d48ef1c4c5118011f254" title="To be called by SearchEngine when it believes the context is satisfiable.">checkSATCore</a>();
<a name="l00433"></a>00433 <span class="comment"></span>
<a name="l00434"></a>00434 <span class="comment">  //! Check if the current decision branch is marked as incomplete</span>
<a name="l00435"></a><a class="code" href="classCVC3_1_1TheoryCore.html#a36571dc56183d89cd36def27939430b0">00435</a> <span class="comment"></span>  <span class="keywordtype">bool</span> <a class="code" href="classCVC3_1_1TheoryCore.html#a36571dc56183d89cd36def27939430b0" title="Check if the current decision branch is marked as incomplete.">incomplete</a>() { <span class="keywordflow">return</span> <a class="code" href="classCVC3_1_1TheoryCore.html#ae81dae9c186efe8ead153d14e29985bf" title="The set of reasons for incompleteness (empty when we are complete)">d_incomplete</a>.<a class="code" href="classCVC3_1_1CDMap.html#a2cf256af978e1a3bf82407a13ba85c13">size</a>() &gt; 0 ; }<span class="comment"></span>
<a name="l00436"></a>00436 <span class="comment">  //! Check if the branch is incomplete, and return the reasons (strings)</span>
<a name="l00437"></a>00437 <span class="comment"></span>  <span class="keywordtype">bool</span> <a class="code" href="classCVC3_1_1TheoryCore.html#a36571dc56183d89cd36def27939430b0" title="Check if the current decision branch is marked as incomplete.">incomplete</a>(std::vector&lt;std::string&gt;&amp; reasons);
<a name="l00438"></a>00438 <span class="comment"></span>
<a name="l00439"></a>00439 <span class="comment">  //! Register an atomic formula of interest.</span>
<a name="l00440"></a>00440 <span class="comment"></span><span class="comment">  /*! If e or its negation is later deduced, we will add the implied</span>
<a name="l00441"></a>00441 <span class="comment">      literal to d_impliedLiterals */</span>
<a name="l00442"></a>00442   <span class="keywordtype">void</span> <a class="code" href="classCVC3_1_1TheoryCore.html#ade1177fbf32e95b9433eb608c82857d7" title="Register an atomic formula of interest.">registerAtom</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a>&amp; thm);
<a name="l00443"></a>00443 <span class="comment"></span>
<a name="l00444"></a>00444 <span class="comment">  //! Return the next implied literal (NULL Theorem if none)</span>
<a name="l00445"></a>00445 <span class="comment"></span>  <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1TheoryCore.html#a464a49882cbd94a3c48428ed60d3a365" title="Return the next implied literal (NULL Theorem if none)">getImpliedLiteral</a>(<span class="keywordtype">void</span>);
<a name="l00446"></a>00446 <span class="comment"></span>
<a name="l00447"></a>00447 <span class="comment">  //! Return total number of implied literals</span>
<a name="l00448"></a><a class="code" href="classCVC3_1_1TheoryCore.html#a2f6f4b38fe4582c8f979f35842284b4c">00448</a> <span class="comment"></span>  <span class="keywordtype">unsigned</span> <a class="code" href="classCVC3_1_1TheoryCore.html#a2f6f4b38fe4582c8f979f35842284b4c" title="Return total number of implied literals.">numImpliedLiterals</a>() { <span class="keywordflow">return</span> <a class="code" href="classCVC3_1_1TheoryCore.html#a7b531fbcb166cac53d82f74c812d42f6" title="List of implied literals, based on registered atomic formulas of interest.">d_impliedLiterals</a>.<a class="code" href="classCVC3_1_1CDList.html#adf92d0f391d73e7ac70da57db135af27">size</a>(); }
<a name="l00449"></a>00449 <span class="comment"></span>
<a name="l00450"></a>00450 <span class="comment">  //! Return an implied literal by index</span>
<a name="l00451"></a>00451 <span class="comment"></span>  <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1TheoryCore.html#adb97ff20d5c0d9a93d322b347b306f69" title="Return an implied literal by index.">getImpliedLiteralByIndex</a>(<span class="keywordtype">unsigned</span> index);
<a name="l00452"></a>00452 <span class="comment"></span>
<a name="l00453"></a>00453 <span class="comment">  //! Parse the generic expression.</span>
<a name="l00454"></a>00454 <span class="comment"></span><span class="comment">  /*! This method should be used in parseExprOp() for recursive calls</span>
<a name="l00455"></a>00455 <span class="comment">   *  to subexpressions, and is the method called by the command</span>
<a name="l00456"></a>00456 <span class="comment">   *  processor.</span>
<a name="l00457"></a>00457 <span class="comment">   */</span>
<a name="l00458"></a>00458   <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> <a class="code" href="classCVC3_1_1TheoryCore.html#a6f367b1f413d7f1275e72381724ca148" title="Parse the generic expression.">parseExpr</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e);<span class="comment"></span>
<a name="l00459"></a>00459 <span class="comment">  //! Top-level call to parseExpr, clears the bound variable stack.</span>
<a name="l00460"></a>00460 <span class="comment"></span><span class="comment">  /*! Use it in VCL instead of parseExpr(). */</span>
<a name="l00461"></a><a class="code" href="classCVC3_1_1TheoryCore.html#ac173889ba81d910884901b3fa32e600c">00461</a>   <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> <a class="code" href="classCVC3_1_1TheoryCore.html#ac173889ba81d910884901b3fa32e600c" title="Top-level call to parseExpr, clears the bound variable stack.">parseExprTop</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e) {
<a name="l00462"></a>00462     <a class="code" href="classCVC3_1_1TheoryCore.html#a72592744e8f94ed7c832ad895791a72a" title="Bound variable stack: a vector of pairs &lt;name, var&gt;">d_boundVarStack</a>.clear();
<a name="l00463"></a>00463     <a class="code" href="classCVC3_1_1TheoryCore.html#af8402b991e938282c87e01120dfd6b99" title="Current cache being used for parser.">d_parseCache</a> = &amp;<a class="code" href="classCVC3_1_1TheoryCore.html#a22825b89097f0baa8348f268317db563" title="Top-level cache for parser.">d_parseCacheTop</a>;
<a name="l00464"></a>00464     <span class="keywordflow">return</span> <a class="code" href="classCVC3_1_1TheoryCore.html#a6f367b1f413d7f1275e72381724ca148" title="Parse the generic expression.">parseExpr</a>(e);
<a name="l00465"></a>00465   }
<a name="l00466"></a>00466 <span class="comment"></span>
<a name="l00467"></a>00467 <span class="comment">  //! Assign t a concrete value val.  Used in model generation.</span>
<a name="l00468"></a>00468 <span class="comment"></span>  <span class="keywordtype">void</span> <a class="code" href="classCVC3_1_1TheoryCore.html#a584ebdaddb7e1a51b1740277a0b7098d" title="Assign t a concrete value val. Used in model generation.">assignValue</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</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; val);<span class="comment"></span>
<a name="l00469"></a>00469 <span class="comment">  //! Record a derived assignment to a variable (LHS).</span>
<a name="l00470"></a>00470 <span class="comment"></span>  <span class="keywordtype">void</span> <a class="code" href="classCVC3_1_1TheoryCore.html#a584ebdaddb7e1a51b1740277a0b7098d" title="Assign t a concrete value val. Used in model generation.">assignValue</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a>&amp; thm);
<a name="l00471"></a>00471 <span class="comment"></span>
<a name="l00472"></a>00472 <span class="comment">  //! Adds expression to var database</span>
<a name="l00473"></a>00473 <span class="comment"></span>  <span class="keywordtype">void</span> <a class="code" href="classCVC3_1_1TheoryCore.html#ab810c8fdffa082334e4aa840d1249a39" title="Adds expression to var database.">addToVarDB</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> &amp; e);<span class="comment"></span>
<a name="l00474"></a>00474 <span class="comment">  //! Split compound vars into basic type variables</span>
<a name="l00475"></a>00475 <span class="comment"></span><span class="comment">  /*! The results are saved in d_basicModelVars and</span>
<a name="l00476"></a>00476 <span class="comment">   *  d_simplifiedModelVars.  Also, add new basic vars as shared terms</span>
<a name="l00477"></a>00477 <span class="comment">   *  whenever their type belongs to a different theory than the term</span>
<a name="l00478"></a>00478 <span class="comment">   *  itself.</span>
<a name="l00479"></a>00479 <span class="comment">   */</span>
<a name="l00480"></a>00480   <span class="keywordtype">void</span> <a class="code" href="classCVC3_1_1TheoryCore.html#a21441c74132e9fcfb53d2b33bd8c622a" title="Split compound vars into basic type variables.">collectBasicVars</a>();<span class="comment"></span>
<a name="l00481"></a>00481 <span class="comment">  //! Calls theory specific computeModel, results are placed in map</span>
<a name="l00482"></a>00482 <span class="comment"></span>  <span class="keywordtype">void</span> <a class="code" href="classCVC3_1_1TheoryCore.html#a6b5123c9d923a076385aa83a0fa37cf5" title="Calls theory specific computeModel, results are placed in map.">buildModel</a>(<a class="code" href="classCVC3_1_1ExprMap.html">ExprMap&lt;Expr&gt;</a>&amp; m);
<a name="l00483"></a>00483   <span class="keywordtype">bool</span> <a class="code" href="classCVC3_1_1TheoryCore.html#a6b5123c9d923a076385aa83a0fa37cf5" title="Calls theory specific computeModel, results are placed in map.">buildModel</a>(<a class="code" href="classCVC3_1_1Theorem.html">Theorem</a>&amp; thm);<span class="comment"></span>
<a name="l00484"></a>00484 <span class="comment">  //! Recursively build a compound-type variable assignment for e</span>
<a name="l00485"></a>00485 <span class="comment"></span>  <span class="keywordtype">void</span> <a class="code" href="classCVC3_1_1TheoryCore.html#a48ba4c9731b4be8afdeafdf3eddeb919" title="Recursively build a compound-type variable assignment for e.">collectModelValues</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e, <a class="code" href="classCVC3_1_1ExprMap.html">ExprMap&lt;Expr&gt;</a>&amp; m);
<a name="l00486"></a>00486 <span class="comment"></span>
<a name="l00487"></a>00487 <span class="comment">  //! Set the resource limit (0==unlimited).</span>
<a name="l00488"></a><a class="code" href="classCVC3_1_1TheoryCore.html#a02c9e1bf2f581de6b8f8a8da5cbb5318">00488</a> <span class="comment"></span>  <span class="keywordtype">void</span> <a class="code" href="classCVC3_1_1TheoryCore.html#a02c9e1bf2f581de6b8f8a8da5cbb5318" title="Set the resource limit (0==unlimited).">setResourceLimit</a>(<span class="keywordtype">unsigned</span> limit) { <a class="code" href="classCVC3_1_1TheoryCore.html#a7040ce9b2fa8d567df0d84a5ceee84bf" title="Resource limit (0==unlimited, 1==no more resources, &gt;=2 - available).">d_resourceLimit</a> = limit; }<span class="comment"></span>
<a name="l00489"></a>00489 <span class="comment">  //! Get the resource limit</span>
<a name="l00490"></a><a class="code" href="classCVC3_1_1TheoryCore.html#ae5f8dd0508305fac921b9475376c4623">00490</a> <span class="comment"></span>  <span class="keywordtype">unsigned</span> <a class="code" href="classCVC3_1_1TheoryCore.html#ae5f8dd0508305fac921b9475376c4623" title="Get the resource limit.">getResourceLimit</a>() { <span class="keywordflow">return</span> <a class="code" href="classCVC3_1_1TheoryCore.html#a7040ce9b2fa8d567df0d84a5ceee84bf" title="Resource limit (0==unlimited, 1==no more resources, &gt;=2 - available).">d_resourceLimit</a>; }<span class="comment"></span>
<a name="l00491"></a>00491 <span class="comment">  //! Return true if resources are exhausted</span>
<a name="l00492"></a><a class="code" href="classCVC3_1_1TheoryCore.html#abf168c0ef6bed9274e49dc2c0576312e">00492</a> <span class="comment"></span>  <span class="keywordtype">bool</span> <a class="code" href="classCVC3_1_1TheoryCore.html#abf168c0ef6bed9274e49dc2c0576312e" title="Return true if resources are exhausted.">outOfResources</a>() { <span class="keywordflow">return</span> <a class="code" href="classCVC3_1_1TheoryCore.html#a7040ce9b2fa8d567df0d84a5ceee84bf" title="Resource limit (0==unlimited, 1==no more resources, &gt;=2 - available).">d_resourceLimit</a> == 1; }
<a name="l00493"></a>00493 <span class="comment"></span>
<a name="l00494"></a>00494 <span class="comment">  //! Initialize base time used for !setTimeLimit</span>
<a name="l00495"></a>00495 <span class="comment"></span>  <span class="keywordtype">void</span> <a class="code" href="classCVC3_1_1TheoryCore.html#ac5b53deab8186f2c2b48e9916f09801e" title="Initialize base time used for !setTimeLimit.">initTimeLimit</a>();
<a name="l00496"></a>00496 <span class="comment"></span>
<a name="l00497"></a>00497 <span class="comment">  //! Set the time limit in seconds (0==unlimited).</span>
<a name="l00498"></a>00498 <span class="comment"></span>  <span class="keywordtype">void</span> <a class="code" href="classCVC3_1_1TheoryCore.html#a18c6f732488f868d08fb2a0516c2ef33" title="Set the time limit in seconds (0==unlimited).">setTimeLimit</a>(<span class="keywordtype">unsigned</span> limit);
<a name="l00499"></a>00499 <span class="comment"></span>
<a name="l00500"></a>00500 <span class="comment">  //! Called by search engine</span>
<a name="l00501"></a>00501 <span class="comment"></span>  <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1TheoryCore.html#a586e77e855946fd0b5f541ec06f7decd" title="Called by search engine.">rewriteLiteral</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e);
<a name="l00502"></a>00502 <span class="comment"></span>
<a name="l00503"></a>00503 <span class="comment">  //! Get the value of all :named terms</span>
<a name="l00504"></a>00504 <span class="comment"></span>  <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> <a class="code" href="classCVC3_1_1TheoryCore.html#a3875119ce8336e4bb67a5cc6e771f779" title="Get the value of all :named terms.">getAssignment</a>();
<a name="l00505"></a>00505 <span class="comment"></span>
<a name="l00506"></a>00506 <span class="comment">  //! Get the value of an arbitrary formula or term</span>
<a name="l00507"></a>00507 <span class="comment"></span>  <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> <a class="code" href="classCVC3_1_1TheoryCore.html#a07e62d88f43bc14e3f0fe4805bd99356" title="Get the value of an arbitrary formula or term.">getValue</a>(<a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> e);
<a name="l00508"></a>00508 
<a name="l00509"></a>00509 <span class="keyword">private</span>:
<a name="l00510"></a>00510   <span class="comment">// Methods provided for benefit of theories.  Access is made available through theory.h</span>
<a name="l00511"></a>00511 <span class="comment"></span>
<a name="l00512"></a>00512 <span class="comment">  //! Assert a system of equations (1 or more).</span>
<a name="l00513"></a>00513 <span class="comment"></span><span class="comment">  /*! e is either a single equation, or a conjunction of equations</span>
<a name="l00514"></a>00514 <span class="comment">   */</span>
<a name="l00515"></a>00515   <span class="keywordtype">void</span> <a class="code" href="classCVC3_1_1TheoryCore.html#aaab0bd52237688848681cdb62c74f14c" title="Assert a system of equations (1 or more).">assertEqualities</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a>&amp; e);
<a name="l00516"></a>00516 <span class="comment"></span>
<a name="l00517"></a>00517 <span class="comment">  //! Mark the branch as incomplete</span>
<a name="l00518"></a>00518 <span class="comment"></span>  <span class="keywordtype">void</span> <a class="code" href="classCVC3_1_1TheoryCore.html#a1589ba9f082079a4dce4c9125befcf06" title="Mark the branch as incomplete.">setIncomplete</a>(<span class="keyword">const</span> std::string&amp; reason);
<a name="l00519"></a>00519 <span class="comment"></span>
<a name="l00520"></a>00520 <span class="comment">  //! Return a theorem for the type predicate of e</span>
<a name="l00521"></a>00521 <span class="comment"></span><span class="comment">  /*! Note: used only by theory_arith */</span>
<a name="l00522"></a>00522   <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1TheoryCore.html#a69cd86a10c207d95ded425684c5527b9" title="Return a theorem for the type predicate of e.">typePred</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e);
<a name="l00523"></a>00523 
<a name="l00524"></a>00524 <span class="keyword">public</span>:
<a name="l00525"></a>00525   <span class="comment">// TODO: These should be private</span><span class="comment"></span>
<a name="l00526"></a>00526 <span class="comment">  //! Enqueue a new fact</span>
<a name="l00527"></a>00527 <span class="comment"></span><span class="comment">  /*! not private because used in search_fast.cpp */</span>
<a name="l00528"></a>00528   <span class="keywordtype">void</span> <a class="code" href="classCVC3_1_1TheoryCore.html#a479141bc26a125b758a2acc6420274f9" title="Enqueue a new fact.">enqueueFact</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a>&amp; e);
<a name="l00529"></a>00529   <span class="keywordtype">void</span> <a class="code" href="classCVC3_1_1TheoryCore.html#a09a7b1c4878f4ce9150fa89d304ca172" title="Check if the current context is inconsistent.">enqueueSE</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a>&amp; thm);<span class="comment">//yeting</span>
<a name="l00530"></a>00530   <span class="comment">// Must provide proof of inconsistency</span><span class="comment"></span>
<a name="l00531"></a>00531 <span class="comment">  /*! not private because used in search_fast.cpp */</span>
<a name="l00532"></a>00532   <span class="keywordtype">void</span> <a class="code" href="classCVC3_1_1TheoryCore.html#a4a87431f344c128dc58d5c2bd9206784">setInconsistent</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a>&amp; e);
<a name="l00533"></a>00533 <span class="comment"></span>
<a name="l00534"></a>00534 <span class="comment">  //! Setup additional terms within a theory-specific setup().</span>
<a name="l00535"></a>00535 <span class="comment"></span><span class="comment">  /*! not private because used in theory_bitvector.cpp */</span>
<a name="l00536"></a>00536   <span class="keywordtype">void</span> <a class="code" href="classCVC3_1_1TheoryCore.html#afbd6dec08ab7f31031ddc2a97d779bd8" title="Setup additional terms within a theory-specific setup().">setupTerm</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; e, <a class="code" href="classCVC3_1_1Theory.html" title="Base class for theories.">Theory</a>* i, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a>&amp; thm);
<a name="l00537"></a>00537 
<a name="l00538"></a>00538 
<a name="l00539"></a>00539 };
<a name="l00540"></a>00540 <span class="comment"></span>
<a name="l00541"></a>00541 <span class="comment">//! Printing NotifyList class</span>
<a name="l00542"></a>00542 <span class="comment"></span>std::ostream&amp; <a class="code" href="namespaceCVC3.html#a6b7e38d3c97da1e91e12a6c9555b8163">operator&lt;&lt;</a>(std::ostream&amp; os, <span class="keyword">const</span> NotifyList&amp; l);
<a name="l00543"></a>00543 
<a name="l00544"></a>00544 }
<a name="l00545"></a>00545 
<a name="l00546"></a>00546 <span class="preprocessor">#endif</span>
</pre></div></div>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Wed Sep 7 2011 for CVC3 by&#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>