Created
September 16, 2020 13:14
-
-
Save leonardoalt/d9a000dc03fd7cba90e4bcf472549d79 to your computer and use it in GitHub Desktop.
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-rel beforeLoop ()) | |
(declare-rel loopCond (Int Int)) | |
(declare-rel loopBody (Int Int)) | |
(declare-rel afterLoop ()) | |
(declare-rel endFunction ()) | |
(declare-var size Int) | |
(declare-var height Int) | |
(rule beforeLoop) | |
(rule (=> | |
(and beforeLoop (> size 0) (<= size 4294967295)) | |
(loopCond size 0) | |
)) | |
(rule (=> | |
(and (loopCond size height) (< height 32)) | |
(loopBody size height) | |
)) | |
(rule (=> | |
(and (loopCond size height) (>= height 32)) | |
afterLoop | |
)) | |
(rule (=> | |
(and | |
(loopBody size height) | |
(= (mod size 2) 1) | |
) | |
endFunction | |
)) | |
(rule (=> | |
(and | |
(loopBody size height) | |
(= (mod size 2) 0) | |
) | |
(loopCond (/ size 2) (+ height 1)) | |
)) | |
(query afterLoop :print-certificate true) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Replaced
mod 2
by slack variable. Still no progress.