mirror of
https://github.com/Z3Prover/z3
synced 2025-04-10 19:27:06 +00:00
change lt
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
7c9d2e0d75
commit
5177cc4a9a
|
@ -28,6 +28,10 @@ struct ast_to_lt {
|
|||
bool operator()(ast * n1, ast * n2) const { return lt(n1, n2); }
|
||||
};
|
||||
|
||||
struct ast_lt {
|
||||
bool operator()(ast * n1, ast * n2) const { return n1->get_id() < n2->get_id(); }
|
||||
};
|
||||
|
||||
bool lex_lt(unsigned num, ast * const * n1, ast * const * n2);
|
||||
inline bool lex_lt(unsigned num, expr * const * n1, expr * const * n2) {
|
||||
return lex_lt(num, reinterpret_cast<ast*const*>(n1), reinterpret_cast<ast*const*>(n2));
|
||||
|
|
|
@ -234,7 +234,8 @@ br_status bool_rewriter::mk_nflat_or_core(unsigned num_args, expr * const * args
|
|||
return BR_DONE;
|
||||
}
|
||||
if (s) {
|
||||
std::sort(buffer.begin(), buffer.end(), ast_to_lt());
|
||||
ast_lt lt;
|
||||
std::sort(buffer.begin(), buffer.end(), lt);
|
||||
result = m().mk_or(sz, buffer.c_ptr());
|
||||
return BR_DONE;
|
||||
}
|
||||
|
@ -272,7 +273,8 @@ br_status bool_rewriter::mk_flat_or_core(unsigned num_args, expr * const * args,
|
|||
}
|
||||
if (mk_nflat_or_core(flat_args.size(), flat_args.c_ptr(), result) == BR_FAILED) {
|
||||
if (!ordered) {
|
||||
std::sort(flat_args.begin(), flat_args.end(), ast_to_lt());
|
||||
ast_lt lt;
|
||||
std::sort(flat_args.begin(), flat_args.end(), lt);
|
||||
}
|
||||
result = m().mk_or(flat_args.size(), flat_args.c_ptr());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue