feat(library/unifier): do not create a case-split for choice constraints that produce only one alternative
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
443022d840
commit
50e21586b0
1 changed files with 8 additions and 3 deletions
|
@ -799,9 +799,14 @@ struct unifier_fn {
|
|||
auto r = rlist.pull();
|
||||
justification j = mk_composite1(c.get_justification(), m_type_jst.second);
|
||||
if (r) {
|
||||
justification a = mk_assumption_justification(m_next_assumption_idx);
|
||||
add_case_split(std::unique_ptr<case_split>(new choice_case_split(*this, m, m_type_jst.second, r->second)));
|
||||
return process_choice_result(m, r->first, mk_composite1(j, a));
|
||||
if (r->second.is_nil()) {
|
||||
// there is only one alternative
|
||||
return process_choice_result(m, r->first, j);
|
||||
} else {
|
||||
justification a = mk_assumption_justification(m_next_assumption_idx);
|
||||
add_case_split(std::unique_ptr<case_split>(new choice_case_split(*this, m, m_type_jst.second, r->second)));
|
||||
return process_choice_result(m, r->first, mk_composite1(j, a));
|
||||
}
|
||||
} else {
|
||||
set_conflict(j);
|
||||
return false;
|
||||
|
|
Loading…
Reference in a new issue