mirror of
https://github.com/Z3Prover/z3
synced 2025-04-29 11:55:51 +00:00
enable answer generation
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
816029c862
commit
6e1c186017
9 changed files with 131 additions and 48 deletions
|
@ -28,7 +28,7 @@ namespace opt {
|
|||
lbool is_sat;
|
||||
m_answer.reset();
|
||||
m_msolver = 0;
|
||||
if (m_answer.empty()) {
|
||||
if (m_soft_constraints.empty()) {
|
||||
m_msolver = 0;
|
||||
is_sat = s.check_sat(0, 0);
|
||||
m_answer.append(m_soft_constraints);
|
||||
|
@ -46,11 +46,11 @@ namespace opt {
|
|||
}
|
||||
|
||||
// Infrastructure for displaying and storing solution is TBD.
|
||||
std::cout << "is-sat: " << is_sat << "\n";
|
||||
if (is_sat == l_true) {
|
||||
std::cout << "Satisfying soft constraints\n";
|
||||
display_answer(std::cout);
|
||||
}
|
||||
IF_VERBOSE(1, verbose_stream() << "is-sat: " << is_sat << "\n";
|
||||
if (is_sat == l_true) {
|
||||
verbose_stream() << "Satisfying soft constraints\n";
|
||||
display_answer(verbose_stream());
|
||||
});
|
||||
return is_sat;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue