fix(kernel/converter): add temporary fix, we need to be able to backtrack constraints
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
f9a21166f0
commit
aac3830e31
1 changed files with 4 additions and 2 deletions
|
@ -412,12 +412,14 @@ struct default_converter : public converter {
|
|||
}
|
||||
|
||||
// At this point, t_n and s_n are in weak head normal form (modulo meta-variables and proof irrelevance)
|
||||
bool is_same_fn_app = false;
|
||||
if (is_app(t_n) && is_app(s_n)) {
|
||||
buffer<expr> t_args;
|
||||
buffer<expr> s_args;
|
||||
expr t_fn = get_app_args(t_n, t_args);
|
||||
expr s_fn = get_app_args(s_n, s_args);
|
||||
if (is_def_eq(t_fn, s_fn, c, jst) && t_args.size() == s_args.size()) {
|
||||
if (t_fn == s_fn && t_args.size() == s_args.size()) {
|
||||
is_same_fn_app = true;
|
||||
unsigned i = 0;
|
||||
for (; i < t_args.size(); i++) {
|
||||
if (!is_def_eq(t_args[i], s_args[i], c, jst))
|
||||
|
@ -445,7 +447,7 @@ struct default_converter : public converter {
|
|||
return true;
|
||||
}
|
||||
|
||||
if (has_metavar(t_n) || has_metavar(s_n)) {
|
||||
if (!is_same_fn_app && (has_metavar(t_n) || has_metavar(s_n))) {
|
||||
c.add_cnstr(mk_eq_cnstr(t_n, s_n, jst.get()));
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue