libretto.examples
Members list
Packages
Type members
Classlikes
Attributes
- Supertypes
-
class StarterAppclass StarterAppBaseclass Objecttrait Matchableclass Any
- Self type
-
CoffeeMachine.type
Reads lines from standard input and prints them to standard output.
Reads lines from standard input and prints them to standard output.
Attributes
- Supertypes
-
class StarterAppclass StarterAppBaseclass Objecttrait Matchableclass Any
- Self type
-
Echo.type
Attributes
- Supertypes
-
class StarterAppclass StarterAppBaseclass Objecttrait Matchableclass Any
- Self type
-
Fibonacci.type
Attributes
- Supertypes
-
class StarterAppScala[String]class StarterAppBaseclass Objecttrait Matchableclass Any
- Self type
-
HelloWorld.type
This example implements interaction between two parties, Alice and Bob, in which
This example implements interaction between two parties, Alice and Bob, in which
- Alice sends "ping" to Bob,
- Bob sends "pong" back to Alice,
- Alice sends Done to Bob,
in this order, after which no more interaction between the two takes place.
This example demonstrates:
- A simple protocol between two parties.
- Linearity: obligation to consume every input exactly once and fulfill every demand exactly once. Linearity is key to ensuring adherence to a protocol.
- Inverting the flow of values from left-to-right to right-to-left and vice versa.
Attributes
- Supertypes
-
class StarterAppclass StarterAppBaseclass Objecttrait Matchableclass Any
- Self type
-
PingPong.type
This example implements interaction between two parties, Alice and Bob, in which
This example implements interaction between two parties, Alice and Bob, in which
- when it's Alice's turn, she can choose to send "ping" to Bob or to quit;
- when it's Bob's turn, he can choose to send "pong" back to Alice, or to quit;
- interaction continues until one of the parties quits.
This is an extension of the PingPong example to multiple rounds of ping-pong. It further demonstrates:
Attributes
- Supertypes
-
class StarterAppclass StarterAppBaseclass Objecttrait Matchableclass Any
- Self type
-
PingPongN.type
N scientists sharing M microscopes (N > M).
N scientists sharing M microscopes (N > M).
This examples demonstrates:
- concurrency (scientists operate concurrently)
- sequencing (each scientist performs experiments sequentially, at most one at a time)
- resource sharing via pooling (the limited number of microscopes is made available throught a pool)
Attributes
- Supertypes
-
class StarterAppclass StarterAppBaseclass Objecttrait Matchableclass Any
- Self type
-
PoolingMicroscopes.type