We suggest an amalgamation of communication based programming (centred on sessions) and object oriented programming, whereby sessions between concurrent threads are amalgamated with methods. In our proposal threads consist of the execution of session bodies on objects and communicate with each other through asynchronously sending/receiving objects on channels. 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, the choice on how to continue a session is made on the basis of the class of the object sent/received. Sessions can be delegated to other sessions, although session themselves are not first class objects. We demonstrate our ideas through a core language with generic types, SAM , and an example. We then formalize a small calculus, FeatherSAM , and prove subject reduction and progress. The latter property is notoriously difficult to achieve in concurrent calculi.

Amalgamating Sessions and Methods in Object Oriented Languages with Generics

CAPECCHI, SARA;COPPO, Mario;DEZANI, Mariangiola;GIACHINO, Elena
2009-01-01

Abstract

We suggest an amalgamation of communication based programming (centred on sessions) and object oriented programming, whereby sessions between concurrent threads are amalgamated with methods. In our proposal threads consist of the execution of session bodies on objects and communicate with each other through asynchronously sending/receiving objects on channels. 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, the choice on how to continue a session is made on the basis of the class of the object sent/received. Sessions can be delegated to other sessions, although session themselves are not first class objects. We demonstrate our ideas through a core language with generic types, SAM , and an example. We then formalize a small calculus, FeatherSAM , and prove subject reduction and progress. The latter property is notoriously difficult to achieve in concurrent calculi.
2009
410
142
167
Sara Capecchi; Mario Coppo; Mariangiola Dezani; Sophia Drossopoulou; Elena Giachino
File in questo prodotto:
File Dimensione Formato  
TCS2009.pdf

Accesso riservato

Tipo di file: POSTPRINT (VERSIONE FINALE DELL’AUTORE)
Dimensione 3.23 MB
Formato Adobe PDF
3.23 MB Adobe PDF   Visualizza/Apri   Richiedi una copia

I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.

Utilizza questo identificativo per citare o creare un link a questo documento: https://hdl.handle.net/2318/58964
Citazioni
  • ???jsp.display-item.citation.pmc??? ND
  • Scopus 24
  • ???jsp.display-item.citation.isi??? 20
social impact