-
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.
- Loading branch information
1 parent
2366db0
commit 90127fe
Showing
12 changed files
with
145 additions
and
20 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
core/src/main/scala/soda/tiles/fairness/tile/AllSatisfyPTile.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,22 @@ | ||
|
||
directive lean | ||
import Soda.tiles.fairness.tool.TileMessage | ||
|
||
/** | ||
* This tile takes a sequence of measures and returns 'true' when all the elements in the input | ||
* satisfy a property. | ||
*/ | ||
|
||
class AllSatisfyPTile | ||
|
||
abstract | ||
p : Measure -> Boolean | ||
|
||
apply (message : TileMessage [Seq [Measure] ] ) : TileMessage [Boolean] = | ||
TileMessageBuilder .mk .build (message .context) (message .outcome) ( | ||
( (message .contents) | ||
.forall (lambda actor --> p (actor) ) ) | ||
) | ||
|
||
end | ||
|
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
22 changes: 22 additions & 0 deletions
22
core/src/main/scala/soda/tiles/fairness/tile/MapPTile.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,22 @@ | ||
|
||
directive lean | ||
import Soda.tiles.fairness.tool.TileMessage | ||
|
||
/** | ||
* This tile takes a sequence of measures as input and applies a function to each of the | ||
* elements in the input, and return the result as output. | ||
*/ | ||
|
||
class MapPTile | ||
|
||
abstract | ||
p : Measure -> Measure | ||
|
||
apply (message : TileMessage [Seq [Measure] ] ) : TileMessage [Seq [Measure] ] = | ||
TileMessageBuilder .mk .build (message .context) (message .outcome) ( | ||
( (message .contents) | ||
.map (lambda measure --> p (measure) ) ) | ||
) | ||
|
||
end | ||
|
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
2 changes: 1 addition & 1 deletion
2
...les/src/main/scala/soda/tiles/fairness/example/childcaresubsidy/CcsPerFamilyPipeline.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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
|
||
class CcsPerFamily | ||
class CcsPerFamilyPipeline | ||
|
||
abstract | ||
sigma : Measure -> Measure -> Measure | ||
|
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
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
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