Choreographic Compilation of Decentralized Comprehension Patterns

  • Iliano Cervesato
  • Edmund Soon Lee Lam
  • Ali Elgazar
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 9718)


We develop an approach to compiling high-level specifications of distributed applications into code that is executable on individual computing nodes. The high-level language is a form of multiset rewriting augmented with comprehension patterns. It enables a programmer to describe the behavior of a distributed system as a whole rather than from the perspective of the individual nodes, thus dramatically reducing opportunities for programmer errors. It abstracts away the mechanics of communication and synchronization, resulting in concise and declarative specifications. Compilation generates low-level code in a syntactic fragment of this same formalism. This code forces the point of view of each node, and standard state-of-the-art execution techniques are applicable. It is relatively simple to show the correctness of this compilation scheme.


  1. 1.
    Ashley-Rollman, M.P., Lee, P., Goldstein, S.C., Pillai, P., Campbell, J.D.: A language for large ensembles of independently executing nodes. In: Hill, P.M., Warren, D.S. (eds.) ICLP 2009. LNCS, vol. 5649, pp. 265–280. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  2. 2.
    Caires, L., Pfenning, F.: Session types as intuitionistic linear propositions. In: Gastin, P., Laroussinie, F. (eds.) CONCUR 2010. LNCS, vol. 6269, pp. 222–236. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  3. 3.
    Frühwirth, T.: Constraint Handling Rules. Cambridge University Press, Cambridge (2009)CrossRefzbMATHGoogle Scholar
  4. 4.
    Grumbach, S., Wang, F.: Netlog, a rule-based language for distributed programming. In: Carro, M., Peña, R. (eds.) PADL 2010. LNCS, vol. 5937, pp. 88–103. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  5. 5.
    Lam, E.S.L.: Comingle: Distributed Logic Programming Language for Android Mobile Ensembles (2014).
  6. 6.
    Lam, E.S.L., Cervesato, I.: Optimized compilation of multiset rewriting with comprehensions. In: Garrigue, J. (ed.) APLAS 2014. LNCS, vol. 8858, pp. 19–38. Springer, Heidelberg (2014)Google Scholar
  7. 7.
    Lam, E.S.L., Cervesato, I.: Decentralized compilation of multiset comprehensions. Technical report CMU-CS-16-101, Carnegie Mellon University (2016)Google Scholar
  8. 8.
    Lam, E.S.L., Cervesato, I., Fatima, N.: Comingle: distributed logic programming for decentralized mobile ensembles. In: Holvoet, T., Viroli, M. (eds.) COORDINATION 2015. LNCS, vol. 9037, pp. 51–66. Springer, Heidelberg (2015)Google Scholar
  9. 9.
    Lam, E.S.L., Cervesato, I.: Decentralized execution of constraint handling rules for ensembles. In: PPDP 2013, Madrid, Spain, pp. 205–216 (2013)Google Scholar
  10. 10.
    Lanese, I., Guidi, C., Montesi, F., Zavattaro, G.: Bridging the gap between interaction- and process-oriented choreographies. In: SEFM 2008, pp. 323–332 (2008)Google Scholar
  11. 11.
    Lanese, I., Montesi, F., Zavattaro, G.: The evolution of Jolie. In: De Nicola, R., Hennicker, R. (eds.) Software, Services, and Systems. LNCS, vol. 8950, pp. 506–521. Springer, Heidelberg (2015)Google Scholar
  12. 12.
    Loo, B.T., Condie, T., Garofalakis, M., Gay, D.E., Hellerstein, J.M., Maniatis, P., Ramakrishnan, R., Roscoe, T., Stoica, I.: Declarative networking: language, execution and optimization. In: SIGMOD 2006, pp. 97–108 (2006)Google Scholar
  13. 13.
    Sulzmann, M., Lam, E.S.L., Van Weert, P.: Actors with multi-headed message receive patterns. In: Lea, D., Zavattaro, G. (eds.) COORDINATION 2008. LNCS, vol. 5052, pp. 315–330. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  14. 14.
    Triossi, A., Orlando, S., Raffaetà, A., Frühwirth, T.: Compiling CHR to parallel hardware. In: PPDP 2012, New York, NY, USA, pp. 173–184 (2012)Google Scholar

Copyright information

© Springer International Publishing Switzerland 2016

Authors and Affiliations

  • Iliano Cervesato
    • 1
  • Edmund Soon Lee Lam
    • 1
  • Ali Elgazar
    • 1
  1. 1.Carnegie Mellon UniversityDohaQatar

Personalised recommendations