Created
December 10, 2025 08:08
-
-
Save mfdela/8633a5c8d39d961a0ed2bc76277e1df8 to your computer and use it in GitHub Desktop.
Z3 example
This file contains hidden or 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
| (declare-const b0 Int) | |
| (declare-const b1 Int) | |
| (declare-const b2 Int) | |
| (declare-const b3 Int) | |
| (declare-const b4 Int) | |
| (declare-const b5 Int) | |
| (assert (>= b0 0)) | |
| (assert (>= b1 0)) | |
| (assert (>= b2 0)) | |
| (assert (>= b3 0)) | |
| (assert (>= b4 0)) | |
| (assert (>= b5 0)) | |
| (assert (= (+ b4 b5) 3)) | |
| (assert (= (+ b1 b5) 5)) | |
| (assert (= (+ b2 b3 b4) 4)) | |
| (assert (= (+ b0 b1 b3) 7)) | |
| (minimize (+ b0 b1 b2 b3 b4 b5)) | |
| (check-sat) | |
| (get-model) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment