We suggest an amalgamation of the session type and the object oriented paradigm whereby sessions are amalgamated with methods; where threads consist of the execution of session bodies on objects and communicate with each other through asynchronously sending/receiving objects on channels; where the choice on how to respond to a session request is based on the name of the request and the class of the object receiving the request; where the choice on how to continue a session is made on the basis of the class of the object sent/received; and where sessions are not first class, but can be delegated to other sessions. We demonstrate our ideas through a small language, STOOP , and an example. We formalize a smaller calculus, FeatherSTOOP , and give a formal definition, and prove subject reduction and progress. The latter property is notoriously difficult and sometimes impossible to achieve in sessions languages, however it holds in FeatherSTOOP .
Amalgamating the Session Types and the Object Oriented Programming Paradigms
DEZANI, Mariangiola;COPPO, Mario
2007-01-01
Abstract
We suggest an amalgamation of the session type and the object oriented paradigm whereby sessions are amalgamated with methods; where threads consist of the execution of session bodies on objects and communicate with each other through asynchronously sending/receiving objects on channels; where the choice on how to respond to a session request is based on the name of the request and the class of the object receiving the request; where the choice on how to continue a session is made on the basis of the class of the object sent/received; and where sessions are not first class, but can be delegated to other sessions. We demonstrate our ideas through a small language, STOOP , and an example. We formalize a smaller calculus, FeatherSTOOP , and give a formal definition, and prove subject reduction and progress. The latter property is notoriously difficult and sometimes impossible to achieve in sessions languages, however it holds in FeatherSTOOP .I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.