diff options
author | Alex Ozdemir <aozdemir@hmc.edu> | 2019-01-09 19:19:22 +0100 |
---|---|---|
committer | Andres Noetzli <andres.noetzli@gmail.com> | 2019-01-09 10:19:22 -0800 |
commit | 1df477011ed5d35f222340580cba916af3ba73b5 (patch) | |
tree | f937ddc250589678d584577bd48e624eec8d8d8c /src/options/options_handler.cpp | |
parent | 517b6ba3bb029470bdb3f230188af1f398b14a91 (diff) |
[BV Proofs] Option for proof format (#2777)
We're building out a system whereby (eager) BV proofs can be emitted in
one of three formats. Let's add an option for specifying which!
My testing mechanism was not very thorough: I verified that I could specify each of the following option values:
* `er`
* `lrat`
* `drat`
* `help`
and that I could not provide random other option values.
Diffstat (limited to 'src/options/options_handler.cpp')
-rw-r--r-- | src/options/options_handler.cpp | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/src/options/options_handler.cpp b/src/options/options_handler.cpp index 36144e70e..c08c59d89 100644 --- a/src/options/options_handler.cpp +++ b/src/options/options_handler.cpp @@ -1203,6 +1203,48 @@ theory::bv::SatSolverMode OptionsHandler::stringToSatSolver(std::string option, } } +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\ |