Fix bug in smtio unroll code
authorClifford Wolf <clifford@clifford.at>
Sun, 26 Feb 2017 13:39:07 +0000 (14:39 +0100)
committerClifford Wolf <clifford@clifford.at>
Sun, 26 Feb 2017 13:39:07 +0000 (14:39 +0100)
backends/smt2/smtio.py

index 93133a4624451585e570ce8e286c3ac5ed7e5dd6..1278d00aa7c4182848814fcab3404e83e457a3ad 100644 (file)
@@ -215,9 +215,8 @@ class SmtIo:
         stmt = stmt.strip()
 
         if self.nocomments or self.unroll:
-            if stmt.startswith(";"):
-                return
-            stmt = re.sub(r" ;.*", "", stmt)
+            stmt = re.sub(r" *;.*", "", stmt)
+            if stmt == "": return
 
         if unroll and self.unroll:
             stmt = self.unroll_buffer + stmt