Advertisement
Guest User

Untitled

a guest
Aug 24th, 2017
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.20 KB | None | 0 0
  1. from z3 import *
  2. solver = z3.Solver()
  3. x = Int('x')
  4. def f(y):
  5. return y+y
  6. solver.add(x >= 0, x < 10, Exists(x, f(x) == 4) )
  7. print solver.check()
  8. print solver.model()
  9.  
  10. sat
  11. [x = 0]
  12.  
  13. sat
  14. [x = 2]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement