From: Tim King Date: Mon, 26 Sep 2016 03:44:09 +0000 (-0700) Subject: Adding a destructor to QuantAntiSkolem. X-Git-Tag: cvc5-1.0.0~6028^2~23 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7046f077401ab0883bf6ca5d1856ddeaa88da99e;p=cvc5.git Adding a destructor to QuantAntiSkolem. --- diff --git a/src/theory/quantifiers/anti_skolem.cpp b/src/theory/quantifiers/anti_skolem.cpp index c8d18aced..9ccba38cd 100644 --- a/src/theory/quantifiers/anti_skolem.cpp +++ b/src/theory/quantifiers/anti_skolem.cpp @@ -14,18 +14,19 @@ **/ #include "theory/quantifiers/anti_skolem.h" + +#include "options/quantifiers_options.h" +#include "theory/quantifiers/first_order_model.h" #include "theory/quantifiers/term_database.h" #include "theory/quantifiers_engine.h" -#include "theory/quantifiers/first_order_model.h" -#include "options/quantifiers_options.h" using namespace std; -using namespace CVC4; using namespace CVC4::kind; using namespace CVC4::context; -using namespace CVC4::theory; -using namespace CVC4::theory::quantifiers; +namespace CVC4 { +namespace theory { +namespace quantifiers { struct sortTypeOrder { TermDb* d_tdb; @@ -74,10 +75,13 @@ bool QuantAntiSkolem::CDSkQuantCache::add( context::Context* c, std::vector< Nod } } -QuantAntiSkolem::QuantAntiSkolem( QuantifiersEngine * qe ) : QuantifiersModule( qe ){ - d_sqc = new CDSkQuantCache( qe->getUserContext() ); +QuantAntiSkolem::QuantAntiSkolem(QuantifiersEngine* qe) + : QuantifiersModule(qe) { + d_sqc = new CDSkQuantCache(qe->getUserContext()); } +QuantAntiSkolem::~QuantAntiSkolem() { delete d_sqc; } + /* Call during quantifier engine's check */ void QuantAntiSkolem::check( Theory::Effort e, unsigned quant_e ) { if( quant_e==QuantifiersEngine::QEFFORT_STANDARD ){ @@ -267,3 +271,6 @@ bool QuantAntiSkolem::sendAntiSkolemizeLemma( std::vector< Node >& quants, bool } } +}/* namespace CVC4::theory::quantifiers */ +}/* namespace CVC4::theory */ +}/* namespace CVC4 */ diff --git a/src/theory/quantifiers/anti_skolem.h b/src/theory/quantifiers/anti_skolem.h index 721371159..48205db9d 100644 --- a/src/theory/quantifiers/anti_skolem.h +++ b/src/theory/quantifiers/anti_skolem.h @@ -17,17 +17,39 @@ #ifndef __CVC4__THEORY__QUANT_ANTI_SKOLEM_H #define __CVC4__THEORY__QUANT_ANTI_SKOLEM_H -#include "theory/quantifiers_engine.h" +#include +#include + +#include "expr/node.h" +#include "expr/type_node.h" +#include "context/cdhashset.h" #include "context/cdo.h" #include "theory/quantifiers/ce_guided_single_inv.h" +#include "theory/quantifiers_engine.h" namespace CVC4 { namespace theory { namespace quantifiers { class QuantAntiSkolem : public QuantifiersModule { +public: + QuantAntiSkolem( QuantifiersEngine * qe ); + virtual ~QuantAntiSkolem(); + + bool sendAntiSkolemizeLemma( std::vector< Node >& quants, + bool pconnected = true ); + + /* Call during quantifier engine's check */ + void check( Theory::Effort e, unsigned quant_e ); + /* Called for new quantifiers */ + void registerQuantifier( Node q ) {} + void assertNode( Node n ) {} + /** Identify this module (for debugging, dynamic configuration, etc..) */ + std::string identify() const { return "QuantAntiSkolem"; } + + private: typedef context::CDHashSet NodeSet; -private: + std::map< Node, bool > d_quant_processed; std::map< Node, SingleInvocationPartition > d_quant_sip; std::map< Node, std::vector< TypeNode > > d_ask_types; @@ -54,22 +76,10 @@ private: bool add( context::Context* c, std::vector< Node >& quants, unsigned index = 0 ); }; CDSkQuantCache * d_sqc; -public: - bool sendAntiSkolemizeLemma( std::vector< Node >& quants, bool pconnected = true ); -public: - QuantAntiSkolem( QuantifiersEngine * qe ); - - /* Call during quantifier engine's check */ - void check( Theory::Effort e, unsigned quant_e ); - /* Called for new quantifiers */ - void registerQuantifier( Node q ) {} - void assertNode( Node n ) {} - /** Identify this module (for debugging, dynamic configuration, etc..) */ - std::string identify() const { return "QuantAntiSkolem"; } -}; +}; /* class QuantAntiSkolem */ -} -} -} +}/* namespace CVC4::theory::quantifiers */ +}/* namespace CVC4::theory */ +}/* namespace CVC4 */ #endif