3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-24 01:25:33 +00:00

Merge pull request #2016 from boqwxp/qbfsat-yices

qbfsat: Add `-solver` option and allow choice of Z3 or Yices, making Yices the default.
This commit is contained in:
clairexen 2020-05-29 16:21:45 +02:00 committed by GitHub
commit 1c8d5a08a0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 52 additions and 21 deletions

View file

@ -172,7 +172,7 @@ class SmtIo:
self.unroll = False
if self.solver == "yices":
if self.noincr:
if self.noincr or self.forall:
self.popen_vargs = ['yices-smt2'] + self.solver_opts
else:
self.popen_vargs = ['yices-smt2', '--incremental'] + self.solver_opts
@ -232,12 +232,16 @@ class SmtIo:
if self.logic_uf: self.logic += "UF"
if self.logic_bv: self.logic += "BV"
if self.logic_dt: self.logic = "ALL"
if self.solver == "yices" and self.forall: self.logic = "BV"
self.setup_done = True
for stmt in self.info_stmts:
self.write(stmt)
if self.forall and self.solver == "yices":
self.write("(set-option :yices-ef-max-iters 1000000000)")
if self.produce_models:
self.write("(set-option :produce-models true)")