summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>2020-04-08 15:25:40 -0500
committerGitHub <noreply@github.com>2020-04-08 15:25:40 -0500
commitb0ffdd403622f96124e1f80af643261f6a682ea6 (patch)
tree6394a01dc7dbd296b4d1cc7cf3bbdd9cddfd68f7
parentc4eefa032f3fd7fe207613788b5cf1126d5d88fa (diff)
parent24357fea07bf1eb6b1156a8e455c58faee96b604 (diff)
Merge branch 'master' into fix3991fix3991
-rw-r--r--src/main/command_executor.cpp12
-rw-r--r--test/regress/CMakeLists.txt1
-rw-r--r--test/regress/regress0/simple-dump-model.smt213
3 files changed, 21 insertions, 5 deletions
diff --git a/src/main/command_executor.cpp b/src/main/command_executor.cpp
index 323f24492..c5ed54925 100644
--- a/src/main/command_executor.cpp
+++ b/src/main/command_executor.cpp
@@ -148,13 +148,15 @@ bool CommandExecutor::doCommandSingleton(Command* cmd)
// dump the model/proof/unsat core if option is set
if (status) {
std::vector<std::unique_ptr<Command> > getterCommands;
- if (d_options.getProduceModels() && d_options.getDumpModels() &&
- (res.asSatisfiabilityResult() == Result::SAT ||
- (res.isUnknown() && res.whyUnknown() == Result::INCOMPLETE))) {
+ if (d_options.getDumpModels()
+ && (res.asSatisfiabilityResult() == Result::SAT
+ || (res.isUnknown() && res.whyUnknown() == Result::INCOMPLETE)))
+ {
getterCommands.emplace_back(new GetModelCommand());
}
- if (d_options.getProof() && d_options.getDumpProofs() &&
- res.asSatisfiabilityResult() == Result::UNSAT) {
+ if (d_options.getDumpProofs()
+ && res.asSatisfiabilityResult() == Result::UNSAT)
+ {
getterCommands.emplace_back(new GetProofCommand());
}
diff --git a/test/regress/CMakeLists.txt b/test/regress/CMakeLists.txt
index 88d364fee..649178f91 100644
--- a/test/regress/CMakeLists.txt
+++ b/test/regress/CMakeLists.txt
@@ -463,6 +463,7 @@ set(regress_0_tests
regress0/declare-funs.smt2
regress0/define-fun-model.smt2
regress0/distinct.smtv1.smt2
+ regress0/simple-dump-model.smt2
regress0/expect/scrub.01.smtv1.smt2
regress0/expect/scrub.03.smt2
regress0/expect/scrub.06.cvc
diff --git a/test/regress/regress0/simple-dump-model.smt2 b/test/regress/regress0/simple-dump-model.smt2
new file mode 100644
index 000000000..6849b63a8
--- /dev/null
+++ b/test/regress/regress0/simple-dump-model.smt2
@@ -0,0 +1,13 @@
+; COMMAND-LINE: --dump-models
+; EXPECT: sat
+; EXPECT: (model
+; EXPECT: (define-fun x () Int 1)
+; EXPECT: (define-fun y () Int 1)
+; EXPECT: )
+(set-logic QF_LIA)
+(set-info :status sat)
+(declare-fun x () Int)
+(declare-fun y () Int)
+(assert (and (<= x y) (> x 0)))
+(assert (= y 1))
+(check-sat)
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback