MobilityReadingGroup

π-calculus, Session Types research at Imperial College

Multiparty Session C: Safe Parallel Programming with Message Optimisation
Nicholas NG, Nobuko YOSHIDA, Kohei HONDA
50th International Conference on Objects, Models, Components, Patterns (TOOLS 2012). p. 202 - 218

This paper presents a new efficient programming toolchain for message passing-based parallel algorithms which can ensure, for any typable programs and for any execution path, a full guarantee of deadlock-freedom, communication safety and global progress through static checking. The methodology is embodied as a multiparty session-based programming environment for C and its runtime libraries which we call Session C.

Programming starts from specifying a multiparty topology for a target parallel algorithm, such as a ring, wraparound mesh and butterfly topology, in the shape of a global protocol using a protocol description language. From this global protocol, the projection algorithm generates endpoint protocols, based on which each endpoint C program is designed and implemented with a small number of concise session primitives. The endpoint protocol can further be refined to a more optimised protocol through subtyping for asynchronous communication, by which semantically equivalent optimised programs with the original safety guarantees can be obtained. The underlying theory can ensure that the complexity of the toolchain stays in polynomial time against the size of programs.

We apply this framework to representative parallel algorithms with complex communication topologies. The benchmark results show that Session C performs competitively against MPI.

@inproceedings{NYH2012,
  author = {Nicholas Ng and Nobuko Yoshida and Kohei Honda},
  title = {{Multiparty Session C: Safe Parallel Programming with Message Optimisation}},
  booktitle = {50th International Conference on Objects, Models, Components, Patterns},
  series = {LNCS},
  volume = {7304},
  pages = {202--218},
  publisher = {Springer},
  year = 2012
}
@inproceedings{NYH2012,
  author = {Nicholas Ng and Nobuko Yoshida and Kohei Honda},
  title = {{Multiparty Session C: Safe Parallel Programming with Message Optimisation}},
  booktitle = {50th International Conference on Objects, Models, Components, Patterns},
  series = {LNCS},
  volume = {7304},
  pages = {202--218},
  publisher = {Springer},
  doi = "10.1007/978-3-642-30561-0_15",
  year = 2012
}