summaryrefslogtreecommitdiff
path: root/src/theory/quantifiers/instantiation_engine.cpp
diff options
context:
space:
mode:
authorajreynol <andrew.j.reynolds@gmail.com>2015-09-24 16:58:18 +0200
committerajreynol <andrew.j.reynolds@gmail.com>2015-09-24 16:58:18 +0200
commit30920046fd6992b6e2c12c33ba888df5c1caf8de (patch)
tree6cb732c7d7ffb14a9cd1cae2d7102abfb911243f /src/theory/quantifiers/instantiation_engine.cpp
parentccd1638ac6b0eb93d62ca485c1f6d55966bdc056 (diff)
Counterexample-guided instantiation for datatypes. Make sygus parsing more liberal.
Diffstat (limited to 'src/theory/quantifiers/instantiation_engine.cpp')
-rw-r--r--src/theory/quantifiers/instantiation_engine.cpp29
1 files changed, 18 insertions, 11 deletions
diff --git a/src/theory/quantifiers/instantiation_engine.cpp b/src/theory/quantifiers/instantiation_engine.cpp
index 699208fba..2d637e1a0 100644
--- a/src/theory/quantifiers/instantiation_engine.cpp
+++ b/src/theory/quantifiers/instantiation_engine.cpp
@@ -308,41 +308,48 @@ void InstantiationEngine::assertNode( Node f ){
//}
}
-bool InstantiationEngine::hasApplyUf( Node f ){
- if( f.getKind()==APPLY_UF ){
+bool InstantiationEngine::hasApplyUf( Node n ){
+ if( n.getKind()==APPLY_UF ){
return true;
}else{
- for( int i=0; i<(int)f.getNumChildren(); i++ ){
- if( hasApplyUf( f[i] ) ){
+ for( unsigned i=0; i<n.getNumChildren(); i++ ){
+ if( hasApplyUf( n[i] ) ){
return true;
}
}
return false;
}
}
-bool InstantiationEngine::hasNonArithmeticVariable( Node f ){
- for( int i=0; i<(int)f[0].getNumChildren(); i++ ){
- TypeNode tn = f[0][i].getType();
+bool InstantiationEngine::hasNonCbqiVariable( Node q ){
+ for( unsigned i=0; i<q[0].getNumChildren(); i++ ){
+ TypeNode tn = q[0][i].getType();
if( !tn.isInteger() && !tn.isReal() && !tn.isBoolean() ){
- return true;
+ if( options::cbqi2() ){
+ //datatypes supported in new implementation
+ if( !tn.isDatatype() ){
+ return true;
+ }
+ }else{
+ return true;
+ }
}
}
return false;
}
-bool InstantiationEngine::doCbqi( Node f ){
+bool InstantiationEngine::doCbqi( Node q ){
if( options::cbqi.wasSetByUser() || options::cbqi2.wasSetByUser() ){
return options::cbqi();
}else if( options::cbqi() ){
//if quantifier has a non-arithmetic variable, then do not use cbqi
//if quantifier has an APPLY_UF term, then do not use cbqi
- return !hasNonArithmeticVariable( f ) && !hasApplyUf( f[1] );
+ return !hasNonCbqiVariable( q ) && !hasApplyUf( q[1] );
}else{
return false;
}
}
-bool InstantiationEngine::isIncomplete( Node f ) {
+bool InstantiationEngine::isIncomplete( Node q ) {
return true;
//TODO : ensure completeness for local theory extensions
//if( d_i_lte ){
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback