fix(library/expr_lt): fix bug when using hash codes

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
Leonardo de Moura 2013-11-14 13:18:33 -08:00
parent b0322787ff
commit 8e56726116

View file

@ -12,7 +12,10 @@ bool is_lt(expr const & a, expr const & b, bool use_hash) {
if (!a && b) return true; // the null expression is the smallest one
if (a && !b) return false;
if (a.kind() != b.kind()) return a.kind() < b.kind();
if (use_hash && a.hash() < b.hash()) return true;
if (use_hash) {
if (a.hash() < b.hash()) return true;
if (a.hash() > b.hash()) return false;
}
if (a == b) return false;
if (is_var(a)) return var_idx(a) < var_idx(b);
switch (a.kind()) {