3

Can I get the version of Z3 after starting it with the options -smt2 -in? Something like

(get-z3-version)
; Z3 4.3.2 x64  // Desired reply
Malte Schwerhoff
  • 12,684
  • 4
  • 41
  • 71

1 Answers1

3

In the SMT-LIB 2.0 front-end, we can use the command

(get-info :version)

This command is part of the standard, and should also work for other solvers. We can test the command here.

We can also use the command line option -version. Example:

  z3 -version
  >> Z3 version 4.3.1
Leonardo de Moura
  • 21,065
  • 2
  • 47
  • 53
  • Thanks, Leo! FYI: The versions returned by the two methods differ. Using Z3 [version 4.3.2 - 64 bit - build hashcode 96f4606a7f2d], I get `Z3 version 4.3.2` from `z3 -version` and `(:version "4.3")` from `(get-info :version)`. Is that intended? For what it's worth, I'd prefer to get the precise version. – Malte Schwerhoff Apr 09 '13 at 08:43
  • Thanks for reporting this problem. I will fix it. – Leonardo de Moura Apr 09 '13 at 15:17