Improve handling of invalid check-sat result in smtio.py

Signed-off-by: Clifford Wolf <clifford@clifford.at>
This commit is contained in:
Clifford Wolf 2018-03-17 12:17:53 +01:00
parent e7862d4f64
commit 4d4e3a8ca6
1 changed files with 2 additions and 1 deletions

View File

@ -646,12 +646,13 @@ class SmtIo:
sys.stderr.flush()
result = self.read()
assert result in ["sat", "unsat"]
if self.debug_file:
print("(set-info :status %s)" % result, file=self.debug_file)
print("(check-sat)", file=self.debug_file)
self.debug_file.flush()
assert result in ["sat", "unsat"]
return result
def parse(self, stmt):