-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed style issues for PR and fixed edge case of no args for commitme…
…nt protocol
- Loading branch information
1 parent
415e91b
commit dbb7419
Showing
11 changed files
with
37 additions
and
16 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -9,6 +9,7 @@ | |
cmake-build-*/ | ||
|
||
# IntelliJ | ||
.idea/ | ||
out/ | ||
|
||
# mpeltonen/sbt-idea plugin | ||
|
This file was deleted.
Oops, something went wrong.
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
20 changes: 20 additions & 0 deletions
20
compiler/tests/should-pass/circuit/cleartext/Commitment3.circuit
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,20 @@ | ||
host alice | ||
host bob | ||
host chuck | ||
host david | ||
|
||
circuit fun <> move@Local(host = alice)(a: int[]) -> b: int[] { | ||
return a | ||
} | ||
|
||
circuit fun <> move2@Replication(hosts = {bob, david})(a: int[]) -> b: int[] { | ||
return a | ||
} | ||
|
||
fun <> main() -> { | ||
val a@Local(host = alice) = alice.input<int[]>() | ||
val c@Commitment(sender = alice, receivers = {bob, chuck}) = move<>(a) | ||
val d@Replication(hosts = {bob, david}) = move2<>(c) | ||
val = david.output<int[]>(d) | ||
return | ||
} |
10 changes: 10 additions & 0 deletions
10
compiler/tests/should-pass/circuit/commitment/CommitmentNoArgs.circuit
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,10 @@ | ||
host alice | ||
host bob | ||
host chuck | ||
|
||
circuit fun <> move@Commitment(sender = alice, receivers = {bob, chuck})() -> {return} | ||
|
||
fun <> main() -> { | ||
val = move<>() | ||
return | ||
} |
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.