CVC3

quant_proof_rules.h

Go to the documentation of this file.
00001 /*****************************************************************************/
00002 /*!
00003  * \file quant_proof_rules.h
00004  *
00005  * Author: Daniel Wichs
00006  *
00007  * Created: Jul 07 22:22:38 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  */
00019 /*****************************************************************************/
00020 #ifndef _cvc3__quant_proof_rules_h_
00021 #define _cvc3__quant_proof_rules_h_
00022
00023 #include <vector>
00024
00025 namespace CVC3 {
00026
00027   class Expr;
00028   class Theorem;
00029
00030   class QuantProofRules {
00031   public:
00032     //! Destructor
00033     virtual ~QuantProofRules() { }
00034
00035     virtual Theorem addNewConst(const Expr& e) =0;
00036
00037     virtual Theorem newRWThm(const Expr& e, const Expr& newE) = 0 ;
00038
00039     virtual Theorem normalizeQuant(const Expr& e) =0;
00040
00041     //! ==> NOT EXISTS (vars): e  IFF FORALL (vars) NOT e
00042     virtual Theorem rewriteNotExists(const Expr& e) = 0;
00043
00044     //! ==> NOT FORALL (vars): e  IFF EXISTS (vars) NOT e
00045     virtual Theorem rewriteNotForall(const Expr& e) = 0;
00046
00047     //! Instantiate a  universally quantified formula
00048     /*! From T|-FORALL(var): e generate T|-e' where e' is obtained
00049      * from e by instantiating bound variables with terms in
00050      * vector<Expr>& terms.  The vector of terms should be the same
00051      * size as the vector of bound variables in e. Also elements in
00052      * each position i need to have matching types.
00053      * \param t1 is the quantifier (a Theorem)
00054      * \param terms are the terms to instantiate.
00055      * \param quantLevel is the quantification level for the theorem.
00056      */
00057     virtual Theorem universalInst(const Theorem& t1,  const std::vector<Expr>& terms, int quantLevel, Expr gterm ) = 0 ;
00058
00059     virtual Theorem universalInst(const Theorem& t1,
00060           const std::vector<Expr>& terms, int quantLevel) = 0;
00061
00062     virtual Theorem universalInst(const Theorem& t1,
00063           const std::vector<Expr>& terms) = 0;
00064
00065
00066     virtual Theorem partialUniversalInst(const Theorem& t1,
00067            const std::vector<Expr>& terms,
00068            int quantLevel) = 0;
00069
00070     /*! @brief From T|- QUANTIFIER (vars): e we get T|-QUANTIFIER(vars') e
00071      * where vars' is obtained from vars by removing all bound variables
00072      *  not used in e. If vars' is empty the produced theorem is just T|-e
00073      */
00074     virtual Theorem boundVarElim(const Theorem& t1) = 0;
00075
00076     virtual Theorem packVar(const Theorem& t1) = 0;
00077
00078     virtual Theorem pullVarOut(const Theorem& t1) = 0;
00079
00080     virtual Theorem adjustVarUniv(const Theorem& t1,
00081           const std::vector<Expr>& newBvs) = 0;
00082
00083   };
00084 }
00085 #endif