Created
July 12, 2015 15:29
-
-
Save 6f70/3b1c8f51d187328849e4 to your computer and use it in GitHub Desktop.
Z3 modulo by zero
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
from z3 import * | |
sol = Solver() | |
mod = Int('mod') | |
sol.add(mod >= 0) | |
sol.add(10 % mod == 0) | |
os.system('z3 -version') | |
print(sol.check()) | |
print(sol.model()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% python3 mod0.py | |
Z3 version 4.4.0 | |
sat | |
[mod = 0] | |
% |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment