3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-08 18:31:49 +00:00

ensure unique symbols when MaxSAT problems are extracted from linear objectives such that multiple objectives can be supported. Fixes issue #308

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2015-11-13 15:12:08 -05:00
parent 070d9183eb
commit 0a26bcf14c

View file

@ -770,7 +770,7 @@ namespace opt {
tout << "offset: " << offset << "\n";
);
std::ostringstream out;
out << mk_pp(orig_term, m);
out << mk_pp(orig_term, m) << ":" << index;
id = symbol(out.str().c_str());
return true;
}
@ -793,7 +793,7 @@ namespace opt {
}
neg = true;
std::ostringstream out;
out << mk_pp(orig_term, m);
out << mk_pp(orig_term, m) << ":" << index;
id = symbol(out.str().c_str());
return true;
}
@ -812,7 +812,7 @@ namespace opt {
}
neg = is_max;
std::ostringstream out;
out << mk_pp(orig_term, m);
out << mk_pp(orig_term, m) << ":" << index;
id = symbol(out.str().c_str());
return true;
}