3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-05-11 17:54:43 +00:00

add model construction for disequations

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2016-01-11 16:53:29 -08:00
parent 79a5b133d7
commit e22ac712b0
3 changed files with 25 additions and 8 deletions

View file

@ -31,7 +31,7 @@ namespace smt {
symbol_set m_strings;
unsigned m_next;
char m_char;
std::string m_unique_prefix;
std::string m_unique_delim;
obj_map<sort, expr*> m_unique_sequences;
expr_ref_vector m_trail;
public:
@ -43,7 +43,7 @@ namespace smt {
u(m),
m_next(0),
m_char(0),
m_unique_prefix("#B"),
m_unique_delim("!"),
m_trail(m)
{
m_strings.insert(symbol(""));
@ -56,7 +56,7 @@ namespace smt {
}
void set_prefix(char const* p) {
m_unique_prefix = p;
m_unique_delim = p;
}
// generic method for setting unique sequences
@ -89,7 +89,7 @@ namespace smt {
if (u.is_string(s)) {
while (true) {
std::ostringstream strm;
strm << m_unique_prefix << m_next++;
strm << m_unique_delim << std::hex << m_next++ << std::dec << m_unique_delim;
symbol sym(strm.str().c_str());
if (m_strings.contains(sym)) continue;
m_strings.insert(sym);