00001 /*****************************************************************************/ 00002 /*! 00003 * \file records_proof_rules.h 00004 * 00005 * Author: Daniel Wichs 00006 * 00007 * Created: Jul 22 22:59:07 GMT 2003 00008 * 00009 * <hr> 00010 * Copyright (C) 2003 by the Board of Trustees of Leland Stanford 00011 * Junior University and by New York University. 00012 * 00013 * License to use, copy, modify, sell and/or distribute this software 00014 * and its documentation for any purpose is hereby granted without 00015 * royalty, subject to the terms and conditions defined in the \ref 00016 * LICENSE file provided with this distribution. In particular: 00017 * 00018 * - The above copyright notice and this permission notice must appear 00019 * in all copies of the software and related documentation. 00020 * 00021 * - THE SOFTWARE IS PROVIDED "AS-IS", WITHOUT ANY WARRANTIES, 00022 * EXPRESSED OR IMPLIED. USE IT AT YOUR OWN RISK. 00023 * 00024 * <hr> 00025 * 00026 */ 00027 /*****************************************************************************/ 00028 #ifndef _CVC_lite__records_proof_rules_h_ 00029 #define _CVC_lite__records_proof_rules_h_ 00030 00031 namespace CVCL { 00032 00033 class Expr; 00034 class Theorem; 00035 00036 class RecordsProofRules { 00037 public: 00038 //!< Destructor 00039 virtual ~RecordsProofRules() { } 00040 00041 //! ==> (REC_LITERAL (f1 v1) ... (fi vi) ...).fi = vi 00042 virtual Theorem rewriteLitSelect(const Expr &e) = 0; 00043 00044 //! ==> (REC_SELECT (REC_UPDATE e fi vi) fi) = vi 00045 virtual Theorem rewriteUpdateSelect(const Expr& e) = 0; 00046 00047 00048 //! ==> (REC_UPDATE (REC_LITERAL (f1 v1) ... (fi vi) ...) fi v') =(REC_LITERAL (f1 v1) ... (fi v') ...) 00049 virtual Theorem rewriteLitUpdate(const Expr& e) = 0; 00050 //! From T|- e = e' return T|- AND (e.i = e'.i) for all i 00051 virtual Theorem expandEq(const Theorem& eqThrm) = 0; 00052 //! From T|- NOT e=e' return T|- NOT AND (e.i = e'.i) for all i 00053 virtual Theorem expandNeq(const Theorem& neqThrm) = 0; 00054 //! Expand a record into a literal: |- e = (# f1:=e.f1, ..., fn:=e.fn #) 00055 virtual Theorem expandRecord(const Expr& e) = 0; 00056 //! Expand a tuple into a literal: |- e = (e.0, ..., e.n-1) 00057 virtual Theorem expandTuple(const Expr& e) = 0; 00058 }; 00059 } 00060 #endif