Skip to content

Commit

Permalink
add option to get unsat cores lemmas via the previously added command
Browse files Browse the repository at this point in the history
  • Loading branch information
HanielB committed Jan 23, 2024
1 parent 8bfc06a commit 35060fd
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/main/command_executor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,12 @@ bool CommandExecutor::doCommandSingleton(Cmd* cmd)
getterCommands.emplace_back(new GetUnsatCoreCommand());
}

if (d_solver->getOptionInfo("dump-unsat-cores-lemmas").boolValue()
&& isResultUnsat)
{
getterCommands.emplace_back(new GetUnsatCoreLemmasCommand());
}

if (d_solver->getOptionInfo("dump-difficulty").boolValue()
&& (isResultUnsat || isResultSat || res.isUnknown()))
{
Expand Down
8 changes: 8 additions & 0 deletions src/options/main_options.toml
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,14 @@ name = "Driver"
default = "false"
help = "output unsat cores after every UNSAT/VALID response"

[[option]]
name = "dumpUnsatCoresLemmas"
category = "regular"
long = "dump-unsat-cores-lemmas"
type = "bool"
default = "false"
help = "output lemmas in unsat cores after every UNSAT/VALID response"

[[option]]
name = "dumpDifficulty"
category = "regular"
Expand Down
3 changes: 2 additions & 1 deletion src/smt/set_defaults.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@ void SetDefaults::setDefaultsPre(Options& opts)
SET_AND_NOTIFY(Smt, produceDifficulty, true, "dumpDifficulty");
}
if (opts.smt.checkUnsatCores || opts.driver.dumpUnsatCores
|| opts.smt.unsatAssumptions || opts.smt.minimalUnsatCores
|| opts.driver.dumpUnsatCoresLemmas || opts.smt.unsatAssumptions
|| opts.smt.minimalUnsatCores
|| opts.smt.unsatCoresMode != options::UnsatCoresMode::OFF)
{
SET_AND_NOTIFY(
Expand Down

0 comments on commit 35060fd

Please sign in to comment.