array_proof_rules.h

Go to the documentation of this file.
00001 /*****************************************************************************/
00002 /*!
00003  * \file array_proof_rules.h
00004  * 
00005  * Author: Clark Barrett 5/29/2003
00006  * 
00007  * Created: May 29 19:16:33 GMT 2003
00008  *
00009  * <hr>
00010  *
00011  * License to use, copy, modify, sell and/or distribute this software
00012  * and its documentation for any purpose is hereby granted without
00013  * royalty, subject to the terms and conditions defined in the \ref
00014  * LICENSE file provided with this distribution.
00015  * 
00016  * <hr>
00017  * 
00018  * CLASS: ArrayProofRules
00019  * 
00020  * 
00021  * Description: Array proof rules.
00022  */
00023 /*****************************************************************************/
00024 
00025 #ifndef _cvc3__theory_array__array_proof_rules_h_
00026 #define _cvc3__theory_array__array_proof_rules_h_
00027 
00028 namespace CVC3 {
00029 
00030   class Theorem;
00031   class Expr;
00032   
00033   class ArrayProofRules {
00034   public:
00035     // Destructor
00036     virtual ~ArrayProofRules() { }
00037 
00038     ////////////////////////////////////////////////////////////////////
00039     // Proof rules
00040     ////////////////////////////////////////////////////////////////////
00041 
00042     // ==>
00043     // write(store, index_0, v_0, index_1, v_1, ..., index_n, v_n) = store IFF
00044     //
00045     // read(store, index_n) = v_n &
00046     // index_{n-1} != index_n -> read(store, index_{n-1}) = v_{n-1} &
00047     // (index_{n-2} != index_{n-1} & index_{n-2} != index_n) -> read(store, index_{n-2}) = v_{n-2} &
00048     // ...
00049     // (index_1 != index_2 & ... & index_1 != index_n) -> read(store, index_1) = v_1
00050     // (index_0 != index_1 & index_0 != index_2 & ... & index_0 != index_n) -> read(store, index_0) = v_0
00051     virtual Theorem rewriteSameStore(const Expr& e, int n) = 0;
00052 
00053     // ==> write(store, index, value) = write(...) IFF
00054     //       store = write(write(...), index, read(store, index)) &
00055     //       value = read(write(...), index)
00056     virtual Theorem rewriteWriteWrite(const Expr& e) = 0;
00057 
00058     // ==> read(write(store, index1, value), index2) =
00059     //   ite(index1 = index2, value, read(store, index2))
00060     virtual Theorem rewriteReadWrite(const Expr& e) = 0;
00061 
00062     // value = read(store, index) ==>
00063     //   write(store, index, value) = store
00064     virtual Theorem rewriteRedundantWrite1(const Theorem& v_eq_r,
00065              const Expr& write) = 0;
00066 
00067     // ==>
00068     //   write(write(store, index, v1), index, v2) = write(store, index, v2)
00069     virtual Theorem rewriteRedundantWrite2(const Expr& e) = 0;
00070 
00071     // ==>
00072     //   write(write(store, index1, v1), index2, v2) =
00073     //   write(write(store, index2, v2), index1, ite(index1 = index2, v2, v1))
00074     virtual Theorem interchangeIndices(const Expr& e) = 0;
00075     //! Beta reduction of array literal: |- (array x. f(x))[arg] = f(arg)
00076     virtual Theorem readArrayLiteral(const Expr& e) = 0;
00077 
00078     //! Lift ite over read
00079     virtual Theorem liftReadIte(const Expr& e) = 0;
00080 
00081   }; // end of class ArrayProofRules
00082 
00083 } // end of namespace CVC3
00084 
00085 #endif

Generated on Tue Jul 3 14:33:34 2007 for CVC3 by  doxygen 1.5.1