[Main website]


A protocol is a session type specified in an OOP way. In particular the sequence of methods to call, e.g. first open the socket, then send commands.

Usingparadigm/codata it is possible specify protocols in a rather natural way, adding a state-token to every type returned from the class representing the session.

TODO check how in Dok they can be implemented in a OOP idiomatic way

TODO check if the compiler can test if the protocol is used in the correct way