You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
364 B

  1. # coding: utf-8
  2. from z3 import *
  3. # Create an instance of a z3 solver
  4. solver = Solver()
  5. min_ite = BitVec("min", 32)
  6. x = BitVec("x", 32)
  7. y = BitVec("y", 32)
  8. # Declare additional z3 variables
  9. solver.add(min_ite == If(x < y, x, y))
  10. # solver.add(...)
  11. # Check and print the result.
  12. result = solver.check()
  13. print(result)
  14. if result == sat:
  15. print(solver.model())