search_simple.h

Go to the documentation of this file.
00001 /*****************************************************************************/
00002 /*!
00003  * \file search_simple.h
00004  * 
00005  * Author: Clark Barrett
00006  * 
00007  * Created: Sat Mar 29 21:53:46 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 
00029 #ifndef _cvcl__include__search_simple_h_
00030 #define _cvcl__include__search_simple_h_
00031 
00032 #include "search_impl_base.h"
00033 #include "statistics.h"
00034 
00035 namespace CVCL {
00036 
00037 class DecisionEngine;
00038 
00039 /*!
00040  * \defgroup SE_Simple Simple Search Engine
00041  * \ingroup SE
00042  *
00043  * This module includes all the components of a very simplistic search
00044  * engine.  It is used mainly for debugging purposes.
00045  */
00046 
00047   //! Implementation of the simple search engine
00048   /*! \ingroup SE_Simple */
00049 class SearchSimple: public SearchImplBase {
00050   /*! \addtogroup SE_Simple 
00051    * @{
00052    */
00053 
00054   //! Name
00055   std::string d_name;
00056 
00057   //! Decision Engine
00058   DecisionEngine* d_decisionEngine;
00059 
00060   //! Formula being checked
00061   CDO<Theorem> d_goal;
00062   //! Non-literals generated by DP's
00063   CDO<Theorem> d_nonLiterals;
00064   //! Theorem which records simplification of the last query
00065   CDO<Theorem> d_simplifiedThm;
00066 
00067   //! Recursive DPLL algorithm used by checkValid
00068   Theorem checkValidRec();
00069   //! Private helper function for checkValid and restart
00070   bool checkValidMain(const Expr& e2);
00071 
00072 public:
00073   //! Constructor
00074   SearchSimple(TheoryCore* core);
00075   //! Destructor
00076   ~SearchSimple();
00077   
00078   // Implementation of virtual SearchEngine methods
00079   const std::string& getName() { return d_name; }
00080   bool checkValidInternal(const Expr& e);
00081   bool restartInternal(const Expr& e);
00082   void addLiteralFact(const Theorem& thm) {}
00083   void addNonLiteralFact(const Theorem& thm);
00084 
00085   /*! @} */ // end addtogroup SE_Simple
00086 };
00087 
00088 }
00089 
00090 #endif

Generated on Thu Apr 13 16:57:33 2006 for CVC Lite by  doxygen 1.4.4