Sophie

Sophie

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

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_records.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_records.h</div>  </div>
</div>
<div class="contents">
<a href="theory__records_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_records.h</span>
<a name="l00004"></a>00004 <span class="comment"> * </span>
<a name="l00005"></a>00005 <span class="comment"> * Author: Daniel Wichs</span>
<a name="l00006"></a>00006 <span class="comment"> * </span>
<a name="l00007"></a>00007 <span class="comment"> * Created: 7/22/03</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 <span class="preprocessor">#ifndef _cvc3__include__theory_records_h_</span>
<a name="l00021"></a>00021 <span class="preprocessor"></span><span class="preprocessor">#define _cvc3__include__theory_records_h_</span>
<a name="l00022"></a>00022 <span class="preprocessor"></span>
<a name="l00023"></a>00023 <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="l00024"></a>00024 
<a name="l00025"></a>00025 <span class="keyword">namespace </span>CVC3 {
<a name="l00026"></a>00026 
<a name="l00027"></a>00027   <span class="keyword">class </span>RecordsProofRules;
<a name="l00028"></a>00028 
<a name="l00029"></a><a class="code" href="namespaceCVC3.html#ad12649859b64bd3aed25985b147c078a">00029</a>  <span class="keyword">typedef</span> <span class="keyword">enum</span> {
<a name="l00030"></a><a class="code" href="namespaceCVC3.html#ad12649859b64bd3aed25985b147c078aadba2f0df8bf015c12bca0efbd077db7d">00030</a>    <a class="code" href="namespaceCVC3.html#ad12649859b64bd3aed25985b147c078aadba2f0df8bf015c12bca0efbd077db7d">RECORD</a> = 2500,
<a name="l00031"></a><a class="code" href="namespaceCVC3.html#ad12649859b64bd3aed25985b147c078aa9efca25c90a81dcfde159d13a86d9f77">00031</a>    <a class="code" href="namespaceCVC3.html#ad12649859b64bd3aed25985b147c078aa9efca25c90a81dcfde159d13a86d9f77">RECORD_SELECT</a>,
<a name="l00032"></a><a class="code" href="namespaceCVC3.html#ad12649859b64bd3aed25985b147c078aac6dfe36442cddb6cb993669fec8a51c5">00032</a>    <a class="code" href="namespaceCVC3.html#ad12649859b64bd3aed25985b147c078aac6dfe36442cddb6cb993669fec8a51c5">RECORD_UPDATE</a>,
<a name="l00033"></a><a class="code" href="namespaceCVC3.html#ad12649859b64bd3aed25985b147c078aa5b98e4e73895afeec2e8904eb5c3effa">00033</a>    <a class="code" href="namespaceCVC3.html#ad12649859b64bd3aed25985b147c078aa5b98e4e73895afeec2e8904eb5c3effa">RECORD_TYPE</a>,
<a name="l00034"></a><a class="code" href="namespaceCVC3.html#ad12649859b64bd3aed25985b147c078aade6582602ff5a8d049aa0dd26e50a30e">00034</a>    <a class="code" href="namespaceCVC3.html#ad12649859b64bd3aed25985b147c078aade6582602ff5a8d049aa0dd26e50a30e">TUPLE</a>,
<a name="l00035"></a><a class="code" href="namespaceCVC3.html#ad12649859b64bd3aed25985b147c078aae26285c151f7ee2c084c68848a88dde0">00035</a>    <a class="code" href="namespaceCVC3.html#ad12649859b64bd3aed25985b147c078aae26285c151f7ee2c084c68848a88dde0">TUPLE_SELECT</a>,
<a name="l00036"></a><a class="code" href="namespaceCVC3.html#ad12649859b64bd3aed25985b147c078aab6ace4f4d51d446b07d2f6f486f5aef8">00036</a>    <a class="code" href="namespaceCVC3.html#ad12649859b64bd3aed25985b147c078aab6ace4f4d51d446b07d2f6f486f5aef8">TUPLE_UPDATE</a>,
<a name="l00037"></a><a class="code" href="namespaceCVC3.html#ad12649859b64bd3aed25985b147c078aaabdfca29cc90169c7689e6a05e5cc316">00037</a>    <a class="code" href="namespaceCVC3.html#ad12649859b64bd3aed25985b147c078aaabdfca29cc90169c7689e6a05e5cc316">TUPLE_TYPE</a>
<a name="l00038"></a>00038  } <a class="code" href="namespaceCVC3.html#ad12649859b64bd3aed25985b147c078a">RecordKinds</a>;
<a name="l00039"></a>00039                                     
<a name="l00040"></a>00040 <span class="comment">/*****************************************************************************/</span><span class="comment"></span>
<a name="l00041"></a>00041 <span class="comment">/*!</span>
<a name="l00042"></a>00042 <span class="comment"> *\class TheoryRecords</span>
<a name="l00043"></a>00043 <span class="comment"> *\ingroup Theories</span>
<a name="l00044"></a>00044 <span class="comment"> *\brief This theory handles records.</span>
<a name="l00045"></a>00045 <span class="comment"> *</span>
<a name="l00046"></a>00046 <span class="comment"> * Author: Daniel Wichs</span>
<a name="l00047"></a>00047 <span class="comment"> *</span>
<a name="l00048"></a>00048 <span class="comment"> * Created: 7/22/03</span>
<a name="l00049"></a>00049 <span class="comment"> */</span>
<a name="l00050"></a>00050 <span class="comment">/*****************************************************************************/</span>
<a name="l00051"></a><a class="code" href="classCVC3_1_1TheoryRecords.html">00051</a> <span class="keyword">class </span><a class="code" href="classCVC3_1_1TheoryRecords.html" title="This theory handles records.">TheoryRecords</a> :<span class="keyword">public</span> <a class="code" href="classCVC3_1_1Theory.html" title="Base class for theories.">Theory</a> {
<a name="l00052"></a><a class="code" href="classCVC3_1_1TheoryRecords.html#a6bb9f23a660b77ee034a407bc46774dd">00052</a>   <a class="code" href="classCVC3_1_1RecordsProofRules.html">RecordsProofRules</a>* <a class="code" href="classCVC3_1_1TheoryRecords.html#a6bb9f23a660b77ee034a407bc46774dd">d_rules</a>;<span class="comment"></span>
<a name="l00053"></a>00053 <span class="comment">  //! Auxiliary rewrites: Processing of AND and OR of equations.  Returns e=e&#39;.</span>
<a name="l00054"></a>00054 <span class="comment"></span>  <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1TheoryRecords.html#a243eef0e23027e100aede3646eca3617" title="Auxiliary rewrites: Processing of AND and OR of equations. Returns e=e&#39;.">rewriteAux</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="l00055"></a>00055 <span class="comment">  //! Takes Thm(e), returns Thm(e&#39;), where e rewrites to e&#39; by rewriteAux.</span>
<a name="l00056"></a>00056 <span class="comment"></span>  <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1TheoryRecords.html#a243eef0e23027e100aede3646eca3617" title="Auxiliary rewrites: Processing of AND and OR of equations. Returns e=e&#39;.">rewriteAux</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a>&amp; thm);
<a name="l00057"></a>00057 
<a name="l00058"></a>00058 <span class="keyword">public</span>:
<a name="l00059"></a>00059   <a class="code" href="classCVC3_1_1TheoryRecords.html#a7f3fc16c1167afe2d6ff3da0a59c06fd" title="Constructor.">TheoryRecords</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>* core); <span class="comment">//!&lt; Constructor</span>
<a name="l00060"></a>00060 <span class="comment"></span>  <a class="code" href="classCVC3_1_1TheoryRecords.html#a7e0ac2c2be6942fc04ce9c21951fe7a7">~TheoryRecords</a>(); <span class="comment">//!&lt; Destructor</span>
<a name="l00061"></a>00061 <span class="comment"></span><span class="comment">  //! creates a reference to the proof rules</span>
<a name="l00062"></a>00062 <span class="comment"></span>  <a class="code" href="classCVC3_1_1RecordsProofRules.html">RecordsProofRules</a>* <a class="code" href="classCVC3_1_1TheoryRecords.html#acefe38731a5693d2c2b7d630088ee708" title="creates a reference to the proof rules">createProofRules</a>();
<a name="l00063"></a>00063   
<a name="l00064"></a>00064   <span class="comment">// Theory interface</span>
<a name="l00065"></a>00065 <span class="comment"></span>
<a name="l00066"></a>00066 <span class="comment">  //! assert a fact to the theory of records</span>
<a name="l00067"></a>00067 <span class="comment"></span>  <span class="keywordtype">void</span> <a class="code" href="classCVC3_1_1TheoryRecords.html#ad7fd739c906e86c0b5a135374cc10dc0" title="assert a fact to the theory of records">assertFact</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a>&amp; e);<span class="comment"></span>
<a name="l00068"></a>00068 <span class="comment">  //! empty implementation to fit theory interface</span>
<a name="l00069"></a><a class="code" href="classCVC3_1_1TheoryRecords.html#a4780c4692ecdb6fc82f181b86cebeb68">00069</a> <span class="comment"></span>  <span class="keywordtype">void</span> <a class="code" href="classCVC3_1_1TheoryRecords.html#a4780c4692ecdb6fc82f181b86cebeb68" title="empty implementation to fit theory interface">checkSat</a>(<span class="keywordtype">bool</span> fullEffort) {}<span class="comment"></span>
<a name="l00070"></a>00070 <span class="comment">  //! rewrites an expression e to one of several allowed forms</span>
<a name="l00071"></a>00071 <span class="comment"></span>  <a class="code" href="classCVC3_1_1Theorem.html">Theorem</a> <a class="code" href="classCVC3_1_1TheoryRecords.html#a56d1048536807a3bb9d746c833b75c47" title="rewrites an expression e to one of several allowed forms">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="l00072"></a>00072 <span class="comment">  //! check record or tuple type</span>
<a name="l00073"></a>00073 <span class="comment"></span>  <span class="keywordtype">void</span> <a class="code" href="classCVC3_1_1TheoryRecords.html#a0fd20bc4ca8c7701c189ce465cd3641c" title="check record or tuple type">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="l00074"></a>00074   <a class="code" href="namespaceCVC3.html#af969e724f8b7016909f5804e8cea3e54" title="Enum for cardinality of types.">Cardinality</a> <a class="code" href="classCVC3_1_1TheoryRecords.html#ac58f7129ed3e62d2d183922cb70428ac" 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="l00075"></a>00075                              <span class="keywordtype">bool</span> enumerate, <span class="keywordtype">bool</span> computeSize);<span class="comment"></span>
<a name="l00076"></a>00076 <span class="comment">  //! computes the type of a record or a tuple</span>
<a name="l00077"></a>00077 <span class="comment"></span>  <span class="keywordtype">void</span> <a class="code" href="classCVC3_1_1TheoryRecords.html#a59dd99a5c7c1540d6517dc69dc157cfb" title="computes the type of a record or a tuple">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="l00078"></a>00078   <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a> <a class="code" href="classCVC3_1_1TheoryRecords.html#a0cdc07a00c674c1190f721908a77c0ca" 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="l00079"></a>00079   
<a name="l00080"></a>00080   <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> <a class="code" href="classCVC3_1_1TheoryRecords.html#a62ea35463c9093da92601e33698f905b" 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="l00081"></a>00081   <span class="keywordtype">void</span> <a class="code" href="classCVC3_1_1TheoryRecords.html#a77c8993b2ad9daca3803c78991589351" title="Add variables from &#39;e&#39; to &#39;v&#39; for constructing a concrete model.">computeModelTerm</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, std::vector&lt;Expr&gt;&amp; v);
<a name="l00082"></a>00082   <span class="keywordtype">void</span> <a class="code" href="classCVC3_1_1TheoryRecords.html#a43f8bb4aeae98801e974b7f3fa0ed068" title="Compute the value of a compound variable from the more primitive ones.">computeModel</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, std::vector&lt;Expr&gt;&amp; vars);
<a name="l00083"></a>00083 
<a name="l00084"></a>00084   <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> <a class="code" href="classCVC3_1_1TheoryRecords.html#a2ae67fcdda4a2c2f55238adea0b8eabc" 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="l00085"></a>00085   <span class="keyword">virtual</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a> <a class="code" href="classCVC3_1_1TheoryRecords.html#a72f4af007baf95a36b21246433266319" 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="l00086"></a>00086   <span class="keywordtype">void</span> <a class="code" href="classCVC3_1_1TheoryRecords.html#a707f98454898e685084f75a006cdd100" title="Set up the term e for call-backs when e or its children change.">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="l00087"></a>00087   <span class="keywordtype">void</span> <a class="code" href="classCVC3_1_1TheoryRecords.html#a070b5644bc6e362999305ee8bb3774ff" title="Notify a theory of a new equality.">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);<span class="comment"></span>
<a name="l00088"></a>00088 <span class="comment">  //! pretty printing</span>
<a name="l00089"></a>00089 <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_1TheoryRecords.html#aad0935f7bc94c98934c0e1690b2ec850" title="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);<span class="comment"></span>
<a name="l00090"></a>00090 <span class="comment">  //! Test whether expr is a record literal</span>
<a name="l00091"></a><a class="code" href="classCVC3_1_1TheoryRecords.html#a5aee76070091906e4b5a710d2c1e2d5b">00091</a> <span class="comment"></span>  <span class="keywordtype">bool</span> <a class="code" href="classCVC3_1_1TheoryRecords.html#a5aee76070091906e4b5a710d2c1e2d5b" title="Test whether expr is a record literal.">isRecord</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="l00092"></a>00092     <span class="keywordflow">return</span> e.<a class="code" href="group__ExprPkg.html#ga1d6a6b4a9ce81b0dd8fd74870ff4284b">isApply</a>() &amp;&amp; e.<a class="code" href="group__ExprPkg.html#gad036a3a3597d590ca6ee694505c6e1cd" title="Get kind of operator (for APPLY Exprs only)">getOpKind</a>() == <a class="code" href="namespaceCVC3.html#ad12649859b64bd3aed25985b147c078aadba2f0df8bf015c12bca0efbd077db7d">RECORD</a>;
<a name="l00093"></a>00093   }<span class="comment"></span>
<a name="l00094"></a>00094 <span class="comment">  //! Test whether expr is a record type</span>
<a name="l00095"></a><a class="code" href="classCVC3_1_1TheoryRecords.html#a71dfd95cef55ec88b9c2a29297542ab0">00095</a> <span class="comment"></span>  <span class="keywordtype">bool</span> <a class="code" href="classCVC3_1_1TheoryRecords.html#a71dfd95cef55ec88b9c2a29297542ab0" title="Test whether expr is a record type.">isRecordType</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="l00096"></a>00096     <span class="keywordflow">return</span> e.<a class="code" href="group__ExprPkg.html#ga1d6a6b4a9ce81b0dd8fd74870ff4284b">isApply</a>() &amp;&amp; e.<a class="code" href="group__ExprPkg.html#gad036a3a3597d590ca6ee694505c6e1cd" title="Get kind of operator (for APPLY Exprs only)">getOpKind</a>() == <a class="code" href="namespaceCVC3.html#ad12649859b64bd3aed25985b147c078aa5b98e4e73895afeec2e8904eb5c3effa">RECORD_TYPE</a>;
<a name="l00097"></a>00097   }<span class="comment"></span>
<a name="l00098"></a>00098 <span class="comment">  //! Test whether expr is a record type</span>
<a name="l00099"></a><a class="code" href="classCVC3_1_1TheoryRecords.html#a9944c0e052d60784eaffb8329db47a5f">00099</a> <span class="comment"></span>  <span class="keywordtype">bool</span> <a class="code" href="classCVC3_1_1TheoryRecords.html#a9944c0e052d60784eaffb8329db47a5f" title="Test whether expr is a record type.">isRecordType</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="l00100"></a>00100     <span class="keywordflow">return</span> <a class="code" href="classCVC3_1_1TheoryRecords.html#a71dfd95cef55ec88b9c2a29297542ab0" title="Test whether expr is a record type.">isRecordType</a>(t.<a class="code" href="classCVC3_1_1Type.html#a0bc1eebf8dbd9d2880e1f18d7804e5c2">getExpr</a>());
<a name="l00101"></a>00101   }<span class="comment"></span>
<a name="l00102"></a>00102 <span class="comment">  //! Test whether expr is a record select/update subclass</span>
<a name="l00103"></a><a class="code" href="classCVC3_1_1TheoryRecords.html#a09dac099c2d70610b91e30cd21e00fe1">00103</a> <span class="comment"></span>  <span class="keywordtype">bool</span> <a class="code" href="classCVC3_1_1TheoryRecords.html#a09dac099c2d70610b91e30cd21e00fe1" title="Test whether expr is a record select/update subclass.">isRecordAccess</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="l00104"></a>00104   { <span class="keywordflow">return</span> e.<a class="code" href="group__ExprPkg.html#ga1d6a6b4a9ce81b0dd8fd74870ff4284b">isApply</a>() &amp;&amp;
<a name="l00105"></a>00105       (e.<a class="code" href="group__ExprPkg.html#gad036a3a3597d590ca6ee694505c6e1cd" title="Get kind of operator (for APPLY Exprs only)">getOpKind</a>() == <a class="code" href="namespaceCVC3.html#ad12649859b64bd3aed25985b147c078aa9efca25c90a81dcfde159d13a86d9f77">RECORD_SELECT</a> || e.<a class="code" href="group__ExprPkg.html#gad036a3a3597d590ca6ee694505c6e1cd" title="Get kind of operator (for APPLY Exprs only)">getOpKind</a>() == <a class="code" href="namespaceCVC3.html#ad12649859b64bd3aed25985b147c078aac6dfe36442cddb6cb993669fec8a51c5">RECORD_UPDATE</a>); }<span class="comment"></span>
<a name="l00106"></a>00106 <span class="comment">  //! Create a record literal</span>
<a name="l00107"></a>00107 <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_1TheoryRecords.html#aa5a9cbcd30ed23792c030d70181483d3" title="Create a record literal.">recordExpr</a>(<span class="keyword">const</span> std::vector&lt;std::string&gt;&amp; fields,
<a name="l00108"></a>00108       <span class="keyword">const</span> std::vector&lt;Expr&gt;&amp; kids);<span class="comment"></span>
<a name="l00109"></a>00109 <span class="comment">  //! Create a record literal</span>
<a name="l00110"></a>00110 <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_1TheoryRecords.html#aa5a9cbcd30ed23792c030d70181483d3" title="Create a record literal.">recordExpr</a>(<span class="keyword">const</span> std::vector&lt;Expr&gt;&amp; fields,
<a name="l00111"></a>00111       <span class="keyword">const</span> std::vector&lt;Expr&gt;&amp; kids);<span class="comment"></span>
<a name="l00112"></a>00112 <span class="comment">  //! Create a record type</span>
<a name="l00113"></a>00113 <span class="comment"></span>  <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a> <a class="code" href="classCVC3_1_1TheoryRecords.html#a4b298f0e7a25449c945480544996d105" title="Create a record type.">recordType</a>(<span class="keyword">const</span> std::vector&lt;std::string&gt;&amp; fields,
<a name="l00114"></a>00114       <span class="keyword">const</span> std::vector&lt;Type&gt;&amp; types);<span class="comment"></span>
<a name="l00115"></a>00115 <span class="comment">  //! Create a record type (field types are given as a vector of Expr)</span>
<a name="l00116"></a>00116 <span class="comment"></span>  <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a> <a class="code" href="classCVC3_1_1TheoryRecords.html#a4b298f0e7a25449c945480544996d105" title="Create a record type.">recordType</a>(<span class="keyword">const</span> std::vector&lt;std::string&gt;&amp; fields,
<a name="l00117"></a>00117       <span class="keyword">const</span> std::vector&lt;Expr&gt;&amp; types);<span class="comment"></span>
<a name="l00118"></a>00118 <span class="comment">  //! Create a record type (fields and types are given as a vector of Expr)</span>
<a name="l00119"></a>00119 <span class="comment"></span>  <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a> <a class="code" href="classCVC3_1_1TheoryRecords.html#a4b298f0e7a25449c945480544996d105" title="Create a record type.">recordType</a>(<span class="keyword">const</span> std::vector&lt;Expr&gt;&amp; fields,
<a name="l00120"></a>00120       <span class="keyword">const</span> std::vector&lt;Expr&gt;&amp; types);<span class="comment"></span>
<a name="l00121"></a>00121 <span class="comment">  //! Create a record field select expression</span>
<a name="l00122"></a>00122 <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_1TheoryRecords.html#a6123e229d2eac24364f4cf1b30927f0c" title="Create a record field select expression.">recordSelect</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; r, <span class="keyword">const</span> std::string&amp; field);<span class="comment"></span>
<a name="l00123"></a>00123 <span class="comment">  //! Create a record field update expression</span>
<a name="l00124"></a>00124 <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_1TheoryRecords.html#ad6d5734bb5b21cada7e7958c6840e2c4" title="Create a record field update expression.">recordUpdate</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; r, <span class="keyword">const</span> std::string&amp; field, <span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; val);<span class="comment"></span>
<a name="l00125"></a>00125 <span class="comment">  //! Get the list of fields from a record literal</span>
<a name="l00126"></a>00126 <span class="comment"></span>  <span class="keyword">const</span> std::vector&lt;Expr&gt;&amp; <a class="code" href="classCVC3_1_1TheoryRecords.html#aaf09fd297eafe6e114863581c558f163" title="Get the list of fields from a record literal.">getFields</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; r);<span class="comment"></span>
<a name="l00127"></a>00127 <span class="comment">  //! Get the i-th field name from the record literal or type</span>
<a name="l00128"></a>00128 <span class="comment"></span>  <span class="keyword">const</span> std::string&amp; <a class="code" href="classCVC3_1_1TheoryRecords.html#ac45307e001d2f373bdf4116416c84b77" title="Get the i-th field name from the record literal or type.">getField</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);<span class="comment"></span>
<a name="l00129"></a>00129 <span class="comment">  //! Get the field index in the record literal or type</span>
<a name="l00130"></a>00130 <span class="comment"></span><span class="comment">  /*! The field must be present in the record; otherwise it&#39;s an error. */</span>
<a name="l00131"></a>00131   <span class="keywordtype">int</span> <a class="code" href="classCVC3_1_1TheoryRecords.html#a8b8cf0a921555538ec1b91c08600e721" title="Get the field index in the record literal or type.">getFieldIndex</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> std::string&amp; field);<span class="comment"></span>
<a name="l00132"></a>00132 <span class="comment">  //! Get the field name from the record select and update expressions</span>
<a name="l00133"></a>00133 <span class="comment"></span>  <span class="keyword">const</span> std::string&amp; <a class="code" href="classCVC3_1_1TheoryRecords.html#ac45307e001d2f373bdf4116416c84b77" title="Get the i-th field name from the record literal or type.">getField</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="l00134"></a>00134 <span class="comment">  //! Create a tuple literal</span>
<a name="l00135"></a>00135 <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_1TheoryRecords.html#a6633d0d5b34ebfaf5d6a42f72c8d4818" title="Create a tuple literal.">tupleExpr</a>(<span class="keyword">const</span> std::vector&lt;Expr&gt;&amp; kids);<span class="comment"></span>
<a name="l00136"></a>00136 <span class="comment">  //! Create a tuple type</span>
<a name="l00137"></a>00137 <span class="comment"></span>  <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a> <a class="code" href="classCVC3_1_1TheoryRecords.html#a4ab484efb75ef41b5a29d5e598ab91a1" title="Create a tuple type.">tupleType</a>(<span class="keyword">const</span> std::vector&lt;Type&gt;&amp; types);<span class="comment"></span>
<a name="l00138"></a>00138 <span class="comment">  //! Create a tuple type (types of components are given as Exprs)</span>
<a name="l00139"></a>00139 <span class="comment"></span>  <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a> <a class="code" href="classCVC3_1_1TheoryRecords.html#a4ab484efb75ef41b5a29d5e598ab91a1" title="Create a tuple type.">tupleType</a>(<span class="keyword">const</span> std::vector&lt;Expr&gt;&amp; types);<span class="comment"></span>
<a name="l00140"></a>00140 <span class="comment">  //! Create a tuple index selector expression</span>
<a name="l00141"></a>00141 <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_1TheoryRecords.html#ada5d6a109788e70405af2adee937c379" title="Create a tuple index selector expression.">tupleSelect</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; tup, <span class="keywordtype">int</span> i);<span class="comment"></span>
<a name="l00142"></a>00142 <span class="comment">  //! Create a tuple index update expression</span>
<a name="l00143"></a>00143 <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_1TheoryRecords.html#a7ca579aacef4b87f4b2235da4ef1ec47" title="Create a tuple index update expression.">tupleUpdate</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Expr.html" title="Data structure of expressions in CVC3.">Expr</a>&amp; tup, <span class="keywordtype">int</span> i, <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="l00144"></a>00144 <span class="comment">  //! Get the index from the tuple select and update expressions</span>
<a name="l00145"></a>00145 <span class="comment"></span>  <span class="keywordtype">int</span> <a class="code" href="classCVC3_1_1TheoryRecords.html#ab228944f5113535c5859cbaa2de0d811" title="Get the index from the tuple select and update expressions.">getIndex</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="l00146"></a>00146 <span class="comment">  //! Test whether expr is a tuple select/update subclass</span>
<a name="l00147"></a><a class="code" href="classCVC3_1_1TheoryRecords.html#a8524c2c102a95e757b3c990b44e9576d">00147</a> <span class="comment"></span>  <span class="keywordtype">bool</span> <a class="code" href="classCVC3_1_1TheoryRecords.html#a8524c2c102a95e757b3c990b44e9576d" title="Test whether expr is a tuple select/update subclass.">isTupleAccess</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="l00148"></a>00148     { <span class="keywordflow">return</span> e.<a class="code" href="group__ExprPkg.html#ga1d6a6b4a9ce81b0dd8fd74870ff4284b">isApply</a>() &amp;&amp;
<a name="l00149"></a>00149         (e.<a class="code" href="group__ExprPkg.html#gad036a3a3597d590ca6ee694505c6e1cd" title="Get kind of operator (for APPLY Exprs only)">getOpKind</a>() == <a class="code" href="namespaceCVC3.html#ad12649859b64bd3aed25985b147c078aae26285c151f7ee2c084c68848a88dde0">TUPLE_SELECT</a> || e.<a class="code" href="group__ExprPkg.html#gad036a3a3597d590ca6ee694505c6e1cd" title="Get kind of operator (for APPLY Exprs only)">getOpKind</a>() == <a class="code" href="namespaceCVC3.html#ad12649859b64bd3aed25985b147c078aab6ace4f4d51d446b07d2f6f486f5aef8">TUPLE_UPDATE</a>); }<span class="comment"></span>
<a name="l00150"></a>00150 <span class="comment">  //! Test if expr is a tuple literal</span>
<a name="l00151"></a><a class="code" href="classCVC3_1_1TheoryRecords.html#a30d3306dd140e2ff2dbf3b145bb476cf">00151</a> <span class="comment"></span>  <span class="keywordtype">bool</span> <a class="code" href="classCVC3_1_1TheoryRecords.html#a30d3306dd140e2ff2dbf3b145bb476cf" title="Test if expr is a tuple literal.">isTuple</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="keywordflow">return</span> e.<a class="code" href="group__ExprPkg.html#ga1d6a6b4a9ce81b0dd8fd74870ff4284b">isApply</a>() &amp;&amp; e.<a class="code" href="group__ExprPkg.html#gad036a3a3597d590ca6ee694505c6e1cd" title="Get kind of operator (for APPLY Exprs only)">getOpKind</a>() == <a class="code" href="namespaceCVC3.html#ad12649859b64bd3aed25985b147c078aade6582602ff5a8d049aa0dd26e50a30e">TUPLE</a>; }<span class="comment"></span>
<a name="l00152"></a>00152 <span class="comment">  //! Test if expr represents a tuple type</span>
<a name="l00153"></a><a class="code" href="classCVC3_1_1TheoryRecords.html#a6c178cfcd9fd7e13a0c28ff28ce60f4d">00153</a> <span class="comment"></span>  <span class="keywordtype">bool</span> <a class="code" href="classCVC3_1_1TheoryRecords.html#a6c178cfcd9fd7e13a0c28ff28ce60f4d" title="Test if expr represents a tuple type.">isTupleType</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="l00154"></a>00154     { <span class="keywordflow">return</span> e.<a class="code" href="group__ExprPkg.html#ga1d6a6b4a9ce81b0dd8fd74870ff4284b">isApply</a>() &amp;&amp; e.<a class="code" href="group__ExprPkg.html#gad036a3a3597d590ca6ee694505c6e1cd" title="Get kind of operator (for APPLY Exprs only)">getOpKind</a>() == <a class="code" href="namespaceCVC3.html#ad12649859b64bd3aed25985b147c078aaabdfca29cc90169c7689e6a05e5cc316">TUPLE_TYPE</a>; }<span class="comment"></span>
<a name="l00155"></a>00155 <span class="comment">  //! Test if &#39;tp&#39; is a tuple type</span>
<a name="l00156"></a><a class="code" href="classCVC3_1_1TheoryRecords.html#af039aad415a0cc2be21c354d40c8f9aa">00156</a> <span class="comment"></span>  <span class="keywordtype">bool</span> <a class="code" href="classCVC3_1_1TheoryRecords.html#af039aad415a0cc2be21c354d40c8f9aa" title="Test if &#39;tp&#39; is a tuple type.">isTupleType</a>(<span class="keyword">const</span> <a class="code" href="classCVC3_1_1Type.html" title="MS C++ specific settings.">Type</a>&amp; tp) { <span class="keywordflow">return</span> <a class="code" href="classCVC3_1_1TheoryRecords.html#af039aad415a0cc2be21c354d40c8f9aa" title="Test if &#39;tp&#39; is a tuple type.">isTupleType</a>(tp.<a class="code" href="classCVC3_1_1Type.html#a0bc1eebf8dbd9d2880e1f18d7804e5c2">getExpr</a>()); }
<a name="l00157"></a>00157 };  <span class="comment">// end of class TheoryRecords</span>
<a name="l00158"></a>00158 
<a name="l00159"></a>00159 }
<a name="l00160"></a>00160 
<a name="l00161"></a>00161 <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>