return out;
}
+std::ostream& operator<<(std::ostream& out, theory::bv::BvProofFormat format)
+{
+ switch (format)
+ {
+ case theory::bv::BITVECTOR_PROOF_ER: out << "BITVECTOR_PROOF_ER"; break;
+ case theory::bv::BITVECTOR_PROOF_DRAT: out << "BITVECTOR_PROOF_DRAT"; break;
+ case theory::bv::BITVECTOR_PROOF_LRAT: out << "BITVECTOR_PROOF_LRAT"; break;
+ default: out << "BvProofFormat:UNKNOWN![" << unsigned(format) << "]";
+ }
+
+ return out;
+}
+
}/* CVC4 namespace */
SAT_SOLVER_CADICAL,
}; /* enum SatSolver */
+/**
+ * When the BV solver does eager bitblasting backed by CryptoMiniSat, proofs
+ * can be written in a variety of formats.
+ */
+enum BvProofFormat
+{
+ /**
+ * Write extended resolution proofs.
+ */
+ BITVECTOR_PROOF_ER,
+ /**
+ * Write DRAT proofs.
+ */
+ BITVECTOR_PROOF_DRAT,
+ /**
+ * Write LRAT proofs.
+ */
+ BITVECTOR_PROOF_LRAT,
+};
+
}/* CVC4::theory::bv namespace */
}/* CVC4::theory namespace */
std::ostream& operator<<(std::ostream& out, theory::bv::BitblastMode mode);
std::ostream& operator<<(std::ostream& out, theory::bv::BvSlicerMode mode);
std::ostream& operator<<(std::ostream& out, theory::bv::SatSolverMode mode);
+std::ostream& operator<<(std::ostream& out, theory::bv::BvProofFormat format);
}/* CVC4 namespace */
name = "Bitvector theory"
header = "options/bv_options.h"
+[[option]]
+ name = "bvProofFormat"
+ category = "expert"
+ long = "bv-proof-format=MODE"
+ type = "CVC4::theory::bv::BvProofFormat"
+ default = "CVC4::theory::bv::BITVECTOR_PROOF_LRAT"
+ handler = "stringToBvProofFormat"
+ predicates = ["satSolverEnabledBuild"]
+ includes = ["options/bv_bitblast_mode.h"]
+ help = "choose which UNSAT proof format to use, see --bv-sat-solver=help"
+
[[option]]
name = "bvSatSolver"
smt_name = "bv-sat-solver"
}
}
+const std::string OptionsHandler::s_bvProofFormatHelp =
+ "\
+Proof formats currently supported by the --bv-proof-format option:\n\
+\n\
+ lrat : DRAT with unit propagation hints to accelerate checking (default)\n\
+\n\
+ drat : Deletion and Resolution Asymmetric Tautology Additions \n\
+\n\
+ er : Extended Resolution, i.e. resolution with new variable definitions\n\
+\n\
+This option controls which underlying UNSAT proof format is used in BV proofs.\n\
+\n\
+Note: Currently this option does nothing. BV proofs are a work in progress!\
+";
+
+theory::bv::BvProofFormat OptionsHandler::stringToBvProofFormat(
+ std::string option, std::string optarg)
+{
+ if (optarg == "er")
+ {
+ return theory::bv::BITVECTOR_PROOF_ER;
+ }
+ else if (optarg == "lrat")
+ {
+ return theory::bv::BITVECTOR_PROOF_LRAT;
+ }
+ else if (optarg == "drat")
+ {
+ return theory::bv::BITVECTOR_PROOF_DRAT;
+ }
+ else if (optarg == "help")
+ {
+ puts(s_bvProofFormatHelp.c_str());
+ exit(1);
+ }
+ else
+ {
+ throw OptionException(std::string("unknown option for --bv-proof-format: `")
+ + optarg + "'. Try --bv-proof-format=help.");
+ }
+}
+
const std::string OptionsHandler::s_bitblastingModeHelp = "\
Bit-blasting modes currently supported by the --bitblast option:\n\
\n\
theory::bv::SatSolverMode stringToSatSolver(std::string option,
std::string optarg);
+ theory::bv::BvProofFormat stringToBvProofFormat(std::string option,
+ std::string optarg);
+
// theory/uf/options_handlers.h
theory::uf::UfssMode stringToUfssMode(std::string option, std::string optarg);
/* Help strings */
static const std::string s_bitblastingModeHelp;
static const std::string s_bvSatSolverHelp;
+ static const std::string s_bvProofFormatHelp;
static const std::string s_booleanTermConversionModeHelp;
static const std::string s_bvSlicerModeHelp;
static const std::string s_boolToBVModeHelp;