Created
September 15, 2020 15:09
-
-
Save leonardoalt/e7459e05b948737ffaa0207649c60bd8 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 4294967296)) | |
(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