summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorajreynol <reynolds@larapc05.epfl.ch>2014-05-30 12:17:05 +0200
committerajreynol <reynolds@larapc05.epfl.ch>2014-05-30 12:17:05 +0200
commitd74d59d27b255a6f245da1530a6b75168fade48b (patch)
treef83c0173fa81b401392fcbe19cae221c2ce6b5a3 /src
parent6ec4691c1b85f01829fcca7d5c5b3c9f1f2a8923 (diff)
Fixes for --inst-max-level
Diffstat (limited to 'src')
-rw-r--r--src/theory/quantifiers_engine.cpp22
-rw-r--r--src/theory/quantifiers_engine.h2
2 files changed, 15 insertions, 9 deletions
diff --git a/src/theory/quantifiers_engine.cpp b/src/theory/quantifiers_engine.cpp
index 3714ca4d0..66d8f9326 100644
--- a/src/theory/quantifiers_engine.cpp
+++ b/src/theory/quantifiers_engine.cpp
@@ -351,7 +351,7 @@ bool QuantifiersEngine::addInstantiation( Node f, std::vector< Node >& vars, std
}
}
}
- setInstantiationLevelAttr( body, maxInstLevel+1 );
+ setInstantiationLevelAttr( body, f[1], maxInstLevel+1, terms );
}
Trace("inst-debug") << "*** Lemma is " << lem << std::endl;
++(d_statistics.d_instantiations);
@@ -362,13 +362,19 @@ bool QuantifiersEngine::addInstantiation( Node f, std::vector< Node >& vars, std
}
}
-void QuantifiersEngine::setInstantiationLevelAttr( Node n, uint64_t level ){
- if( !n.hasAttribute(InstLevelAttribute()) ){
- InstLevelAttribute ila;
- n.setAttribute(ila,level);
- }
- for( int i=0; i<(int)n.getNumChildren(); i++ ){
- setInstantiationLevelAttr( n[i], level );
+void QuantifiersEngine::setInstantiationLevelAttr( Node n, Node qn, uint64_t level, std::vector< Node >& inst_terms ){
+ //if not from the vector of terms we instantiatied
+ if( std::find( inst_terms.begin(), inst_terms.end(), n )==inst_terms.end() ){
+ //if this is a new term, without an instantiation level
+ if( n!=qn && !n.hasAttribute(InstLevelAttribute()) ){
+ InstLevelAttribute ila;
+ n.setAttribute(ila,level);
+ }
+ Assert( qn.getKind()!=BOUND_VARIABLE );
+ Assert( n.getNumChildren()==qn.getNumChildren() );
+ for( int i=0; i<(int)n.getNumChildren(); i++ ){
+ setInstantiationLevelAttr( n[i], qn[i], level, inst_terms );
+ }
}
}
diff --git a/src/theory/quantifiers_engine.h b/src/theory/quantifiers_engine.h
index fa3c66f4f..999a716ba 100644
--- a/src/theory/quantifiers_engine.h
+++ b/src/theory/quantifiers_engine.h
@@ -190,7 +190,7 @@ private:
/** instantiate f with arguments terms */
bool addInstantiation( Node f, std::vector< Node >& vars, std::vector< Node >& terms );
/** set instantiation level attr */
- void setInstantiationLevelAttr( Node n, uint64_t level );
+ void setInstantiationLevelAttr( Node n, Node qn, uint64_t level, std::vector< Node >& inst_terms );
public:
/** get instantiation */
Node getInstantiation( Node f, std::vector< Node >& vars, std::vector< Node >& terms );
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback