-
-
Save zetsuboii/3e5792bdfeb3970e5a4eeae4ea856404 to your computer and use it in GitHub Desktop.
No loop
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
'reach 0.1'; | |
export const main = Reach.App(() => { | |
setOptions({ connectors: [ALGO] }); | |
const Alice = Participant('Alice', { | |
noticeAlice: Fun([], Null), | |
}); | |
const Bob = Participant('Bob', { | |
noticeBob: Fun([], Null), | |
}); | |
deploy(); | |
const arr = array(UInt, [0, 1, 2, 3, 4]); | |
Anybody.publish(); | |
const i = 8; | |
const temp = i < 5 ? arr[i] : i; | |
commit(); | |
exit(); | |
}); | |
// -------------------------------- | |
/* | |
❯ ./reach compile | |
Verifying knowledge assertions | |
Verifying for generic connector | |
Verifying when ALL participants are honest | |
Verifying when NO participants are honest | |
Verifying when ONLY "Alice" is honest | |
Verifying when ONLY "Bob" is honest | |
Checked 10 theorems; No failures! | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment