}
}
-void TheoryQuantifiers::ppNotifyAssertions( std::vector< Node >& assertions ) {
- Trace("quantifiers-presolve") << "TheoryQuantifiers::ppNotifyAssertions" << std::endl;
- if( getQuantifiersEngine() ){
- getQuantifiersEngine()->ppNotifyAssertions( assertions );
+void TheoryQuantifiers::ppNotifyAssertions(
+ const std::vector<Node>& assertions) {
+ Trace("quantifiers-presolve")
+ << "TheoryQuantifiers::ppNotifyAssertions" << std::endl;
+ if (getQuantifiersEngine()) {
+ getQuantifiersEngine()->ppNotifyAssertions(assertions);
}
}
void notifyEq(TNode lhs, TNode rhs);
void preRegisterTerm(TNode n);
void presolve();
- void ppNotifyAssertions( std::vector< Node >& assertions );
+ void ppNotifyAssertions(const std::vector<Node>& assertions);
void check(Effort e);
Node getNextDecisionRequest( unsigned& priority );
Node getValue(TNode n);
}
}
-void QuantifiersEngine::ppNotifyAssertions( std::vector< Node >& assertions ) {
- Trace("quant-engine-proc") << "ppNotifyAssertions in QE, #assertions = " << assertions.size() << " check epr = " << (d_qepr!=NULL) << std::endl;
- if( ( options::instLevelInputOnly() && options::instMaxLevel()!=-1 ) || d_qepr!=NULL ){
- for( unsigned i=0; i<assertions.size(); i++ ) {
- if( options::instLevelInputOnly() && options::instMaxLevel()!=-1 ){
- setInstantiationLevelAttr( assertions[i], 0 );
+void QuantifiersEngine::ppNotifyAssertions(
+ const std::vector<Node>& assertions) {
+ Trace("quant-engine-proc")
+ << "ppNotifyAssertions in QE, #assertions = " << assertions.size()
+ << " check epr = " << (d_qepr != NULL) << std::endl;
+ if ((options::instLevelInputOnly() && options::instMaxLevel() != -1) ||
+ d_qepr != NULL) {
+ for (unsigned i = 0; i < assertions.size(); i++) {
+ if (options::instLevelInputOnly() && options::instMaxLevel() != -1) {
+ setInstantiationLevelAttr(assertions[i], 0);
}
- if( d_qepr!=NULL ){
- d_qepr->registerAssertion( assertions[i] );
+ if (d_qepr != NULL) {
+ d_qepr->registerAssertion(assertions[i]);
}
}
- if( d_qepr!=NULL ){
- //must handle sources of other new constants e.g. separation logic
- //FIXME: cleanup
- ((sep::TheorySep*)getTheoryEngine()->theoryOf( THEORY_SEP ))->initializeBounds();
- d_qepr->finishInit();
+ if (d_qepr != NULL) {
+ // must handle sources of other new constants e.g. separation logic
+ // FIXME: cleanup
+ sep::TheorySep* theory_sep =
+ static_cast<sep::TheorySep*>(getTheoryEngine()->theoryOf(THEORY_SEP));
+ theory_sep->initializeBounds();
+ d_qepr->finishInit();
}
}
}
/** presolve */
void presolve();
/** notify preprocessed assertion */
- void ppNotifyAssertions( std::vector< Node >& assertions );
+ void ppNotifyAssertions(const std::vector<Node>& assertions);
/** check at level */
void check( Theory::Effort e );
/** notify that theories were combined */
return d_type_data;
}
-//must process assertions at preprocess so that quantified assertions are processed properly
-void TheorySep::ppNotifyAssertions( std::vector< Node >& assertions ) {
- std::map< int, std::map< Node, int > > visited;
- std::map< int, std::map< Node, std::vector< Node > > > references;
- std::map< int, std::map< Node, bool > > references_strict;
- for( unsigned i=0; i<assertions.size(); i++ ){
+// Must process assertions at preprocess so that quantified assertions are
+// processed properly.
+void TheorySep::ppNotifyAssertions(const std::vector<Node>& assertions) {
+ std::map<int, std::map<Node, int> > visited;
+ std::map<int, std::map<Node, std::vector<Node> > > references;
+ std::map<int, std::map<Node, bool> > references_strict;
+ for (unsigned i = 0; i < assertions.size(); i++) {
Trace("sep-pp") << "Process assertion : " << assertions[i] << std::endl;
- processAssertion( assertions[i], visited, references, references_strict, true, true, false );
+ processAssertion(assertions[i], visited, references, references_strict,
+ true, true, false);
}
- //if data type is unconstrained, assume a fresh uninterpreted sort
- if( !d_type_ref.isNull() ){
- if( d_type_data.isNull() ){
+ // if data type is unconstrained, assume a fresh uninterpreted sort
+ if (!d_type_ref.isNull()) {
+ if (d_type_data.isNull()) {
d_type_data = NodeManager::currentNM()->mkSort("_sep_U");
Trace("sep-type") << "Sep: assume data type " << d_type_data << std::endl;
d_loc_to_data_type[d_type_ref] = d_type_data;
PPAssertStatus ppAssert(TNode in, SubstitutionMap& outSubstitutions);
Node ppRewrite(TNode atom);
-
- void ppNotifyAssertions( std::vector< Node >& assertions );
+
+ void ppNotifyAssertions(const std::vector<Node>& assertions);
/////////////////////////////////////////////////////////////////////////////
// T-PROPAGATION / REGISTRATION
/////////////////////////////////////////////////////////////////////////////
* Don't preprocess subterm of this term
*/
virtual bool ppDontRewriteSubterm(TNode atom) { return false; }
-
- /** notify preprocessed assertions
- * Called on new assertions after preprocessing before they are asserted to theory engine.
- * Should not modify assertions.
- */
- virtual void ppNotifyAssertions( std::vector< Node >& assertions ) {}
+
+ /**
+ * Notify preprocessed assertions. Called on new assertions after
+ * preprocessing before they are asserted to theory engine.
+ */
+ virtual void ppNotifyAssertions(const std::vector<Node>& assertions) {}
/**
* A Theory is called with presolve exactly one time per user
return d_ppCache[assertion];
}
-void TheoryEngine::notifyPreprocessedAssertions( std::vector< Node >& assertions ){
+void TheoryEngine::notifyPreprocessedAssertions(
+ const std::vector<Node>& assertions) {
// call all the theories
- for(TheoryId theoryId = theory::THEORY_FIRST; theoryId < theory::THEORY_LAST; ++theoryId) {
- if(d_theoryTable[theoryId]) {
- theoryOf(theoryId)->ppNotifyAssertions( assertions );
+ for (TheoryId theoryId = theory::THEORY_FIRST; theoryId < theory::THEORY_LAST;
+ ++theoryId) {
+ if (d_theoryTable[theoryId]) {
+ theoryOf(theoryId)->ppNotifyAssertions(assertions);
}
}
}
*/
Node preprocess(TNode node);
+ /** Notify (preprocessed) assertions. */
+ void notifyPreprocessedAssertions(const std::vector<Node>& assertions);
- /**
- * Notify (preprocessed) assertions
- */
- void notifyPreprocessedAssertions( std::vector< Node >& assertions );
-
- /**
- * Return whether or not we are incomplete (in the current context).
- */
- inline bool isIncomplete() const {
- return d_incomplete;
- }
+ /** Return whether or not we are incomplete (in the current context). */
+ inline bool isIncomplete() const { return d_incomplete; }
/**
* Returns true if we need another round of checking. If this