Minor changes to smt comp script for quantified arith. Add option --cbqi-sat whether...
authorajreynol <andrew.j.reynolds@gmail.com>
Thu, 4 Jun 2015 06:14:30 +0000 (08:14 +0200)
committerajreynol <andrew.j.reynolds@gmail.com>
Thu, 4 Jun 2015 06:14:36 +0000 (08:14 +0200)
contrib/run-script-smtcomp2015
contrib/run-script-smtcomp2015-application
src/theory/quantifiers/instantiation_engine.cpp
src/theory/quantifiers/instantiation_engine.h
src/theory/quantifiers/options

index 3fc8ccec5bc45cd09a28464b1faeb8d317752520..9b8a0ba389d2413adf4f30a76558a7f3a9dde8d5 100755 (executable)
@@ -67,12 +67,12 @@ ALIA|AUFLIA|AUFLIRA|AUFNIRA|BV|UF|UFBV|UFIDL|UFLIA|UFLRA|UFNIA)
   finishwith --full-saturate-quant
   ;;
 LIA|LRA|NIA|NRA)
-  trywith 20 --cbqi --full-saturate-quant
-  trywith 20 --full-saturate-quant
-  trywith 20 --cbqi --cbqi-recurse --full-saturate-quant
-  trywith 60 --qcf-tconstraint --full-saturate-quant
-  trywith 120 --cbqi --cbqi-recurse --full-saturate-quant
-  finishwith --cbqi-recurse --pre-skolem-quant --full-saturate-quant
+  trywith 60 --cbqi --full-saturate-quant
+  trywith 60 --full-saturate-quant
+  trywith 60 --cbqi --cbqi-recurse --full-saturate-quant
+  trywith 180 --qcf-tconstraint --full-saturate-quant
+  trywith 240 --cbqi --cbqi-recurse --full-saturate-quant
+  finishwith --cbqi --cbqi-recurse --pre-skolem-quant --full-saturate-quant
   ;;
 QF_AUFBV)
   trywith 600
index 69b3f8b37c765ea8672ab816503975a7b2b80c66..4219241ef352006f3cb583e1fab20bc6ca152301 100755 (executable)
@@ -33,10 +33,10 @@ QF_LIA)
   runcvc4 --enable-miplib-trick --miplib-trick-subs=4 --lemmas-on-replay-failure --replay-early-close-depth=4 --replay-lemma-reject-cut=128 --replay-reject-cut=512 --unconstrained-simp --pb-rewrites
   ;;
 ALIA|AUFLIA|AUFLIRA|AUFNIRA|BV|UF|UFBV|UFIDL|UFLIA|UFLRA|UFNIA)
-  runcvc4 --simplification=none --decision=internal --full-saturate-quant
+  runcvc4 
   ;;
 LIA|LRA|NIA|NRA)
-  runcvc4 --enable-cbqi --full-saturate-quant
+  runcvc4 --cbqi
   ;;
 QF_BV)
   runcvc4 --unconstrained-simp --bv-eq-slicer=auto --bv-div-zero-const --bv-intro-pow2
index f530f7b9d898a9f62f8da0fb707c1155ca9a3fea..e867aae1e0de10ffb15d4c746df6a056bcb00584 100644 (file)
@@ -173,6 +173,7 @@ bool InstantiationEngine::needsCheck( Theory::Effort e ){
 }
 
 void InstantiationEngine::reset_round( Theory::Effort e ) {
+  d_cbqi_set_quant_inactive = false;
   if( options::cbqi() ){
     //set inactive the quantified formulas whose CE literals are asserted false
     for( int i=0; i<(int)d_quantEngine->getModel()->getNumAssertedQuantifiers(); i++ ){
@@ -185,9 +186,11 @@ void InstantiationEngine::reset_round( Theory::Effort e ) {
         if( d_quantEngine->getValuation().hasSatValue( cel, value ) ){
           Debug("cbqi-debug") << "...CE Literal has value " << value << std::endl;
           if( !value ){
-            d_quantEngine->getModel()->setQuantifierActive( q, false );
             if( d_quantEngine->getValuation().isDecision( cel ) ){
               Trace("cbqi-warn") << "CBQI WARNING: Bad decision on CE Literal." << std::endl;
+            }else{
+              d_quantEngine->getModel()->setQuantifierActive( q, false );
+              d_cbqi_set_quant_inactive = true;
             }
           }
         }else{
@@ -233,12 +236,16 @@ void InstantiationEngine::check( Theory::Effort e, unsigned quant_e ){
 }
 
 bool InstantiationEngine::checkComplete() {
-  for( unsigned i=0; i<d_quants.size(); i++ ){
-    if( isIncomplete( d_quants[i] ) ){
-      return false;
+  if( !options::cbqiSat() && d_cbqi_set_quant_inactive ){
+    return false;
+  }else{
+    for( unsigned i=0; i<d_quants.size(); i++ ){
+      if( isIncomplete( d_quants[i] ) ){
+        return false;
+      }
     }
+    return true;
   }
-  return true;
 }
 
 void InstantiationEngine::registerQuantifier( Node f ){
index 21056bc0505fcac8c1fbefb37d5bc7c201651916..dc5b976f033f4f12853f23cd42a87a2ef31cd6d2 100644 (file)
@@ -87,6 +87,8 @@ private:
   bool doCbqi( Node f );
   /** is the engine incomplete for this quantifier */
   bool isIncomplete( Node f );
+  /** cbqi set inactive */
+  bool d_cbqi_set_quant_inactive;
 private:
   /** do instantiation round */
   bool doInstantiationRound( Theory::Effort effort );
@@ -98,7 +100,7 @@ public:
   /** initialize */
   void finishInit();
 
-  bool needsCheck( Theory::Effort e ); 
+  bool needsCheck( Theory::Effort e );
   void reset_round( Theory::Effort e );
   void check( Theory::Effort e, unsigned quant_e );
   bool checkComplete();
index e2d9af74f116102f379fd9ce1fdb08159342c824..fe81df7f81df873078a194c7696cbac33f86693f 100644 (file)
@@ -232,6 +232,8 @@ option cbqi2 --cbqi2 bool :read-write :default false
  turns on new implementation of counterexample-based quantifier instantiation
 option recurseCbqi --cbqi-recurse bool :default false
  turns on recursive counterexample-based quantifier instantiation
+option cbqiSat --cbqi-sat bool :read-write :default true
+ answer sat when quantifiers are asserted with counterexample-based quantifier instantiation
  
 ### local theory extensions options