summaryrefslogtreecommitdiff
path: root/src/theory
diff options
context:
space:
mode:
authorlianah <lianahady@gmail.com>2014-06-12 15:18:47 -0400
committerlianah <lianahady@gmail.com>2014-06-12 15:18:47 -0400
commitd9f5d514a99d3fe1f4b9b7c0fe6a25ac0ec4dbcc (patch)
treeff73409c911b102a1f691baf25a776c8c593c1c6 /src/theory
parent47224a4596a4131a260d9dd9ceec8e55ede0aad3 (diff)
parented402af3aaf578a55df6fa225b7b7a5455486a05 (diff)
Merge branch 'master' of https://github.com/CVC4/CVC4
Diffstat (limited to 'src/theory')
-rw-r--r--src/theory/bv/options4
-rw-r--r--src/theory/bv/options_handlers.h22
2 files changed, 24 insertions, 2 deletions
diff --git a/src/theory/bv/options b/src/theory/bv/options
index 462ed47e9..fc704a71a 100644
--- a/src/theory/bv/options
+++ b/src/theory/bv/options
@@ -12,10 +12,10 @@ option bitblastMode bitblast --bitblast=MODE CVC4::theory::bv::BitblastMode :han
# 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
diff --git a/src/theory/bv/options_handlers.h b/src/theory/bv/options_handlers.h
index bc01d4dc8..5d85a1be0 100644
--- a/src/theory/bv/options_handlers.h
+++ b/src/theory/bv/options_handlers.h
@@ -26,6 +26,27 @@ namespace CVC4 {
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\
@@ -77,6 +98,7 @@ inline BitblastMode stringToBitblastMode(std::string option, std::string optarg,
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
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback