-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from julianmendez/development
Add 'example' module
- Loading branch information
Showing
87 changed files
with
3,261 additions
and
1,319 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
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 |
---|---|---|
|
@@ -13,3 +13,4 @@ Thumbs.db | |
.cache-main | ||
.cache-tests | ||
docs/sphinx/build | ||
.lake/ |
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,4 @@ | ||
-- This module serves as the root of the `Soda` library. | ||
-- Import modules here that should be built as part of the library. | ||
import «Soda».tiles.fairness.main.Main | ||
|
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,3 @@ | ||
|
||
def main : IO Unit := | ||
IO.println s!"Under construction ..." |
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
32 changes: 32 additions & 0 deletions
32
core/src/main/scala/soda/tiles/fairness/pipeline/EqualityPipeline.soda
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,32 @@ | ||
|
||
directive lean | ||
import Soda.tiles.fairness.tool.TileMessage | ||
import Soda.tiles.fairness.tile.AllActorTile | ||
import Soda.tiles.fairness.tile.AllEqualTile | ||
import Soda.tiles.fairness.tile.ReceivedSigmaPTile | ||
|
||
/** | ||
* This pipeline returns 'true' when all the actors in the input receive a resource of the | ||
* value, and 'false' otherwise. | ||
*/ | ||
|
||
class EqualityTile | ||
|
||
abstract | ||
sigma : Measure -> Measure -> Measure | ||
p_utility : Resource -> Measure | ||
|
||
all_equal_tile = AllEqualTile .mk | ||
|
||
received_sigma_p_tile = ReceivedSigmaPTile .mk (sigma) (p_utility) | ||
|
||
all_actor_tile = AllActorTile .mk | ||
|
||
apply (message : TileMessage [Boolean] ) : TileMessage [Boolean] = | ||
all_equal_tile .apply ( | ||
received_sigma_p_tile .apply ( | ||
all_actor_tile .apply (message) | ||
) | ||
) | ||
|
||
end |
29 changes: 22 additions & 7 deletions
29
.../soda/tiles/fairness/tile/EquityTile.soda → ...les/fairness/pipeline/EquityPipeline.soda
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
Oops, something went wrong.