diff options
author | Clifford Wolf <clifford@clifford.at> | 2018-11-04 14:41:28 +0100 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2018-11-04 14:41:28 +0100 |
commit | d0acea4f2e6c98f09246584c2ac0903acc254093 (patch) | |
tree | e368e16cd65a8d73897d00975933eee754949b76 /backends/smt2 | |
parent | 64e0582c292ca1f3a64c01d9a1faa96ef2f74588 (diff) | |
download | yosys-d0acea4f2e6c98f09246584c2ac0903acc254093.tar.gz yosys-d0acea4f2e6c98f09246584c2ac0903acc254093.tar.bz2 yosys-d0acea4f2e6c98f09246584c2ac0903acc254093.zip |
Add proper error message for when smtbmc "append" fails
Signed-off-by: Clifford Wolf <clifford@clifford.at>
Diffstat (limited to 'backends/smt2')
-rw-r--r-- | backends/smt2/smtbmc.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/backends/smt2/smtbmc.py b/backends/smt2/smtbmc.py index 6af2a5ac1..b944ee004 100644 --- a/backends/smt2/smtbmc.py +++ b/backends/smt2/smtbmc.py @@ -1259,7 +1259,11 @@ elif covermode: smt_assert_antecedent("(|%s_t| s%d s%d)" % (topmod, i-1, i)) smt_assert_consequent(get_constr_expr(constr_assumes, i)) print_msg("Re-solving with appended steps..") - assert smt_check_sat() == "sat" + if smt_check_sat() == "unsat": + print("%s Cannot appended steps without violating assumptions!" % smt.timestamp()) + found_failed_assert = True + retstatus = False + break reached_covers = smt.bv2bin(smt.get("(covers_%d s%d)" % (coveridx, step))) assert len(reached_covers) == len(cover_desc) @@ -1377,7 +1381,11 @@ else: # not tempind, covermode smt_assert_antecedent("(|%s_h| s%d)" % (topmod, i)) smt_assert_antecedent("(|%s_t| s%d s%d)" % (topmod, i-1, i)) smt_assert_consequent(get_constr_expr(constr_assumes, i)) - assert smt_check_sat() == "sat" + print_msg("Re-solving with appended steps..") + if smt_check_sat() == "unsat": + print("%s Cannot appended steps without violating assumptions!" % smt.timestamp()) + retstatus = False + break print_anyconsts(step) for i in range(step, last_check_step+1): print_failed_asserts(i) |