Protocol

libretto.examples.canteen.Protocol
opaque object Protocol

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Protocol.type

Members list

Type members

Classlikes

object PaymentCard

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
object SectionMain

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
object SectionSoup

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
object Session

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
Session.type

Types

opaque type MainDish
opaque type PaymentCard
type SectionMain = dsl.Rec[[SectionMain] =>> ((MainDish dsl.|*| SectionMain) dsl.|+| SectionPayment) dsl.|&| SectionPayment]

In this section, the customer has the option to get the main dish. As with soup, the customer may get multiple main dishes. There's no variety though, to keep things simple. The customer no longer has the possibility to ask for soup, as they have already left the soup section.

In this section, the customer has the option to get the main dish. As with soup, the customer may get multiple main dishes. There's no variety though, to keep things simple. The customer no longer has the possibility to ask for soup, as they have already left the soup section.

Attributes

type SectionSoup = dsl.Rec[[SectionSoup] =>> ((Soup dsl.|*| SectionSoup) dsl.|+| SectionMain) dsl.|&| SectionMain]

In this section, the customer has the option to get a soup or to move down the line to the next section. In fact, they may get multiple soups, but also no soup if there is none left.

In this section, the customer has the option to get a soup or to move down the line to the next section. In fact, they may get multiple soups, but also no soup if there is none left.

Attributes

opaque type Session

Interface of a canteen for one session. The canteen facility is to the left of this interface, whereas the customer is to the right.

Interface of a canteen for one session. The canteen facility is to the left of this interface, whereas the customer is to the right.

The session starts in the soup section.

Attributes

opaque type Soup

Value members

Concrete methods

def eatMainDish: MainDish dsl.-⚬ Done
def eatSoup: Soup dsl.-⚬ Done
def makeMainDish: Done dsl.-⚬ MainDish
def makeSoup: Done dsl.-⚬ Soup