# Options for eager bit-blasting
-option bitvectorAig --bitblast-aig bool :default false :read-write :link --bitblast=eager
+option bitvectorAig --bitblast-aig bool :default false :predicate CVC4::theory::bv::abcEnabledBuild :predicate-include "theory/bv/options_handlers.h" :read-write :link --bitblast=eager
bitblast by first converting to AIG (only if --bitblast=eager)
-expert-option bitvectorAigSimplifications --bv-aig-simp=FILE std::string :default "" :read-write :link --bitblast-aig
+expert-option bitvectorAigSimplifications --bv-aig-simp=FILE std::string :default "" :predicate CVC4::theory::bv::abcEnabledBuild :read-write :link --bitblast-aig
abc command to run AIG simplifications
# Options for lazy bit-blasting
namespace theory {
namespace bv {
+inline void abcEnabledBuild(std::string option, bool value, SmtEngine* smt) throw(OptionException) {
+#ifndef CVC4_USE_ABC
+ if(value) {
+ std::stringstream ss;
+ ss << "option `" << option << "' requires an abc-enabled build of CVC4; this binary was not built with abc support";
+ throw OptionException(ss.str());
+ }
+#endif /* CVC4_USE_ABC */
+}
+
+inline void abcEnabledBuild(std::string option, std::string value, SmtEngine* smt) throw(OptionException) {
+#ifndef CVC4_USE_ABC
+ if(!value.empty()) {
+ std::stringstream ss;
+ ss << "option `" << option << "' requires an abc-enabled build of CVC4; this binary was not built with abc support";
+ throw OptionException(ss.str());
+ }
+#endif /* CVC4_USE_ABC */
+}
+
+
static const std::string bitblastingModeHelp = "\
Bit-blasting modes currently supported by the --bitblast option:\n\
\n\
if (!options::bitvectorAig.wasSetByUser()) {
options::bitvectorAig.set(true);
+ abcEnabledBuild("--bitblast-aig", true, NULL);
}
if (!options::bitvectorAigSimplifications.wasSetByUser()) {
// due to a known bug in abc switching to using drw instead of rw