perf(library/unifier): simple optimization

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
Leonardo de Moura 2014-07-11 20:21:41 +01:00
parent 1230e942aa
commit c3e8e83e50

View file

@ -56,7 +56,7 @@ bool context_check(expr const & e, buffer<expr> const & locals) {
failed = true;
return false;
}
return true;
return has_local(e);
});
return !failed;
}
@ -88,7 +88,7 @@ lbool occurs_context_check(expr const & e, expr const & m, buffer<expr> const &
} else {
// we only need to continue exploring e if it contains
// metavariables and/or local constants.
return has_metavar(e) || has_local(e);
return has_expr_metavar(e) || has_local(e);
}
});
return r;