3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-08-18 01:02:19 +00:00

Added printing of code loc of failed asserts to yosys-smtbmc

This commit is contained in:
Clifford Wolf 2016-08-17 20:10:02 +02:00
parent 42a971226b
commit dfcd30ea86
3 changed files with 23 additions and 1 deletions

View file

@ -605,8 +605,10 @@ struct Smt2Worker
if (cell->type.in("$assert", "$assume")) {
string name_a = get_bool(cell->getPort("\\A"));
string name_en = get_bool(cell->getPort("\\EN"));
decls.push_back(stringf("; yosys-smt2-%s %s#%d %s\n", cell->type.c_str() + 1, log_id(module), idcounter,
cell->attributes.count("\\src") ? cell->attributes.at("\\src").decode_string().c_str() : log_id(cell)));
decls.push_back(stringf("(define-fun |%s#%d| ((state |%s_s|)) Bool (or %s (not %s))) ; %s\n",
log_id(module), idcounter, log_id(module), name_a.c_str(), name_en.c_str(), log_id(cell)));
log_id(module), idcounter, log_id(module), name_a.c_str(), name_en.c_str(), log_id(cell)));
if (cell->type == "$assert")
assert_list.push_back(stringf("(|%s#%d| state)", log_id(module), idcounter++));
else