projects
/
yosys.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
583ceee
)
Minor yosys-smtbmc bugfix
author
Clifford Wolf
<clifford@clifford.at>
Mon, 22 Aug 2016 15:45:01 +0000
(17:45 +0200)
committer
Clifford Wolf
<clifford@clifford.at>
Mon, 22 Aug 2016 15:45:01 +0000
(17:45 +0200)
backends/smt2/smtbmc.py
patch
|
blob
|
history
diff --git
a/backends/smt2/smtbmc.py
b/backends/smt2/smtbmc.py
index a11fed2d52b0d01cd6b28af30cb6c508376fcc56..4986216120221877b06e539163392ac0fffe2b64 100644
(file)
--- a/
backends/smt2/smtbmc.py
+++ b/
backends/smt2/smtbmc.py
@@
-171,6
+171,12
@@
def get_constr_expr(db, state):
expr = re.sub(r'\[([^\]]+)\]', lambda match: smt.net_expr(topmod, "s%d" % state, smt.get_path(topmod, match.group(1))), expr)
expr_list.append(expr)
+ if len(expr_list) == 0:
+ return "true"
+
+ if len(expr_list) == 1:
+ return expr_list[0]
+
return "(and %s)" % " ".join(expr_list)