0

I want to convert this z3py code (online code) to standard SMTLib format. Everything is converted to SMTLib format except the set options properties "(set-option :produce-models true) (set-option :timeout 4000)". Why isn't working? The conversion code was suggested by Leonardo de Moura.

I want output to be like -

; benchmark 
(set-info :status unknown)
(set-option :produce-models true)
(set-option :timeout 4000)
(set-logic QF_UFLIA)
(assert true)
(check-sat)

Thanks

user1770051
  • 131
  • 1
  • 7

2 Answers2

1

Options are not printed by the SMT-LIB2 pretty printer. The pretty printer returns a string and you should be able to pre-pend options of your choice.

Nikolaj Bjorner
  • 8,229
  • 14
  • 15
  • Thanks for your prompt reply. Is this the right way to define set option for solver. "s = Solver(); s.set(unsat_core=True) s.set(models = True); s.set(timeout = 4000)" Because if I set any arbitrary keyword then z3py don't provide any error. Is there any documentation for the keywords that it support? – user1770051 Sep 11 '13 at 02:44
0

I am running your code and I am obtaining

; benchmark
(set-info :status unknown)
(set-logic QF_UFLIA)
(assert true)
(check-sat)
Juan Ospina
  • 1,317
  • 1
  • 7
  • 15