-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
42 additions
and
10 deletions.
There are no files selected for viewing
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# test.aleo | ||
# uncat0.aleo | ||
|
||
## Build Guide | ||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
0u8 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
0u8 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
200u8 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
package = [] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"program": "test.aleo", | ||
"program": "uncat0.aleo", | ||
"version": "0.0.0", | ||
"description": "", | ||
"license": "MIT" | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// The 'uncat0' program. | ||
program uncat0.aleo { | ||
transition vanguard_helper() -> [bool; 3] { | ||
return [ | ||
label_ex0, label_ex1, label_ex2, | ||
]; | ||
} | ||
|
||
// conditional trap | ||
// compilable, exception at runtime | ||
// label: bad | ||
const label_ex0: bool = true; | ||
transition ex0(a: u8) -> u8 { | ||
if a == 0u8 { return 1u8; } | ||
let c: u8 = 224u8 / a; | ||
return c; | ||
} | ||
|
||
// conditional trap | ||
// compilable, exception at runtime | ||
// label: bad | ||
const label_ex1: bool = true; | ||
transition ex1(a: u8) -> u8 { | ||
let c: u8 = a == 0u8 ? 224u8 / 1u8 : 224u8 / a; | ||
return c; | ||
} | ||
|
||
// conditional trap | ||
// compilable, exception when a >= 200 | ||
// label: bad | ||
const label_ex2: bool = true; | ||
transition ex2(a: u8) -> u8 { | ||
let c: u8 = a >= 200u8 ? a : 56u8 + a; | ||
return c; | ||
} | ||
} |
Empty file.
Empty file.
This file was deleted.
Oops, something went wrong.