Code to activate hoelim preprocessing pass (#3129)
authorHaniel Barbosa <hanielbbarbosa@gmail.com>
Tue, 30 Jul 2019 15:21:01 +0000 (10:21 -0500)
committerGitHub <noreply@github.com>
Tue, 30 Jul 2019 15:21:01 +0000 (10:21 -0500)
src/preprocessing/preprocessing_pass_registry.cpp
src/smt/smt_engine.cpp

index 34bae12248151f4a5bc6140ad133fc708a6b00f4..36b3c6392fabed369cda9141ea06e623f5c88159 100644 (file)
@@ -34,6 +34,7 @@
 #include "preprocessing/passes/bv_to_bool.h"
 #include "preprocessing/passes/extended_rewriter_pass.h"
 #include "preprocessing/passes/global_negate.h"
+#include "preprocessing/passes/ho_elim.h"
 #include "preprocessing/passes/int_to_bv.h"
 #include "preprocessing/passes/ite_removal.h"
 #include "preprocessing/passes/ite_simp.h"
@@ -148,6 +149,7 @@ PreprocessingPassRegistry::PreprocessingPassRegistry()
   registerPassInfo("quantifier-macros", callCtor<QuantifierMacros>);
   registerPassInfo("nl-ext-purify", callCtor<NlExtPurify>);
   registerPassInfo("bool-to-bv", callCtor<BoolToBV>);
+  registerPassInfo("ho-elim", callCtor<HoElim>);
 }
 
 }  // namespace preprocessing
index 560cb0599deac68b6e8476aaec3f72a168f63857..4a88033921add7d12791b3a7fb6feb65c2bdcbda 100644 (file)
@@ -1838,6 +1838,11 @@ void SmtEngine::setDefaults() {
     if( options::mbqiMode()!=quantifiers::MBQI_NONE ){
       options::mbqiMode.set( quantifiers::MBQI_NONE );
     }
+    if (!options::hoElimStoreAx.wasSetByUser())
+    {
+      // by default, use store axioms only if --ho-elim is set
+      options::hoElimStoreAx.set(options::hoElim());
+    }
   }
   if( options::fmfFunWellDefinedRelevant() ){
     if( !options::fmfFunWellDefined.wasSetByUser() ){
@@ -3488,6 +3493,11 @@ void SmtEnginePrivate::processAssertions() {
     d_passes["apply-to-const"]->apply(&d_assertions);
   }
 
+  if (options::ufHo())
+  {
+    d_passes["ho-elim"]->apply(&d_assertions);
+  }
+
   // begin: INVARIANT to maintain: no reordering of assertions or
   // introducing new ones
 #ifdef CVC4_ASSERTIONS