Skip to content

Commit

Permalink
AG - unary datatypes, tester always is true.
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolajBjorner committed Sep 1, 2022
1 parent ac5b190 commit 46383a0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/ast/rewriter/datatype_rewriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ br_status datatype_rewriter::mk_app_core(func_decl * f, unsigned num_args, expr
// simplify is_cons(nil) -> false
//
SASSERT(num_args == 1);
if (m_util.get_datatype_num_constructors(args[0]->get_sort()) == 1) {
result = m().mk_true();
return BR_DONE;
}
if (!is_app(args[0]) || !m_util.is_constructor(to_app(args[0])))
return BR_FAILED;
if (to_app(args[0])->get_decl() == m_util.get_recognizer_constructor(f))
Expand Down

0 comments on commit 46383a0

Please sign in to comment.