disable miniscope quantifiers for ground subformulas
# Whether to prenex (nested universal) quantifiers
-option prenexQuant /--disable-prenex-quant bool :default true
+option prenexQuant --prenex-quant=MODE CVC4::theory::quantifiers::PrenexQuantMode :default CVC4::theory::quantifiers::PRENEX_NO_USER_PAT :include "theory/quantifiers/modes.h" :handler CVC4::theory::quantifiers::stringToPrenexQuantMode :handler-include "theory/quantifiers/options_handlers.h"
disable prenexing of quantified formulas
# Whether to variable-eliminate quantifiers.
+ Consider only maximal subterms that meet criteria for triggers. \n\
\n\
";
+static const std::string prenexQuantModeHelp = "\
+Prenex quantifiers modes currently supported by the --prenex-quant option:\n\
+\n\
+default \n\
++ Default, prenex all nested quantifiers except those with user patterns.\n\
+\n\
+all \n\
++ Prenex all nested quantifiers.\n\
+\n\
+none \n\
++ Do no prenex nested quantifiers. \n\
+\n\
+";
inline InstWhenMode stringToInstWhenMode(std::string option, std::string optarg, SmtEngine* smt) throw(OptionException) {
if(optarg == "pre-full") {
return INST_WHEN_PRE_FULL;
optarg + "'. Try --user-pat help.");
}
}
+
inline TriggerSelMode stringToTriggerSelMode(std::string option, std::string optarg, SmtEngine* smt) throw(OptionException) {
if(optarg == "default" || optarg == "all" ) {
return TRIGGER_SEL_DEFAULT;
optarg + "'. Try --trigger-sel help.");
}
}
+
+inline PrenexQuantMode stringToPrenexQuantMode(std::string option, std::string optarg, SmtEngine* smt) throw(OptionException) {
+ if(optarg == "default" ) {
+ return PRENEX_NO_USER_PAT;
+ } else if(optarg == "all") {
+ return PRENEX_ALL;
+ } else if(optarg == "none") {
+ return PRENEX_NONE;
+ } else if(optarg == "help") {
+ puts(prenexQuantModeHelp.c_str());
+ exit(1);
+ } else {
+ throw OptionException(std::string("unknown option for --prenex-quant: `") +
+ optarg + "'. Try --prenex-quant help.");
+ }
+}
+
}/* CVC4::theory::quantifiers namespace */
}/* CVC4::theory namespace */
}/* CVC4 namespace */
Node QuantifiersRewriter::computePrenex( Node body, std::vector< Node >& args, bool pol ){
if( body.getKind()==FORALL ){
- if( pol ){
+ if( pol && ( options::prenexQuant()==PRENEX_ALL || body.getNumChildren()==2 ) ){
std::vector< Node > terms;
std::vector< Node > subs;
//for doing prenexing of same-signed quantifiers
}else if( computeOption==COMPUTE_SIMPLE_ITE_LIFT ){
return options::simpleIteLiftQuant();
}else if( computeOption==COMPUTE_PRENEX ){
- return options::prenexQuant() && !options::aggressiveMiniscopeQuant();
+ return options::prenexQuant()!=PRENEX_NONE && !options::aggressiveMiniscopeQuant();
}else if( computeOption==COMPUTE_VAR_ELIMINATION ){
return options::varElimQuant() || options::dtVarExpandQuant();
}else if( computeOption==COMPUTE_CNF ){