Abstract
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.
This paper was made possible by grants NPRP 4-341-1-059, NPRP 4-1593-1-260, and JSREP 4-003-2-001, from the Qatar National Research Fund (a member of the Qatar Foundation). The statements made herein are solely the responsibility of the authors.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
A version of rule (\(\mathsf {fail}^{swp}_{Y}\)) that is mutually exclusive with rule (\(\mathsf {exec}^{swp}_{X}\)) is as follows:
where the underlined components check that Y does not hold a fact okSwap. A general treatment of negation as absence, as this feature is known, is beyond the scope of this paper.
References
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)
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)
Frühwirth, T.: Constraint Handling Rules. Cambridge University Press, Cambridge (2009)
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)
Lam, E.S.L.: Comingle: Distributed Logic Programming Language for Android Mobile Ensembles (2014). https://github.com/sllam/comingle
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)
Lam, E.S.L., Cervesato, I.: Decentralized compilation of multiset comprehensions. Technical report CMU-CS-16-101, Carnegie Mellon University (2016)
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)
Lam, E.S.L., Cervesato, I.: Decentralized execution of constraint handling rules for ensembles. In: PPDP 2013, Madrid, Spain, pp. 205–216 (2013)
Lanese, I., Guidi, C., Montesi, F., Zavattaro, G.: Bridging the gap between interaction- and process-oriented choreographies. In: SEFM 2008, pp. 323–332 (2008)
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)
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)
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)
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)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2016 Springer International Publishing Switzerland
About this paper
Cite this paper
Cervesato, I., Lam, E.S.L., Elgazar, A. (2016). Choreographic Compilation of Decentralized Comprehension Patterns. In: Alferes, J., Bertossi, L., Governatori, G., Fodor, P., Roman, D. (eds) Rule Technologies. Research, Tools, and Applications. RuleML 2016. Lecture Notes in Computer Science(), vol 9718. Springer, Cham. https://doi.org/10.1007/978-3-319-42019-6_8
Download citation
DOI: https://doi.org/10.1007/978-3-319-42019-6_8
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-42018-9
Online ISBN: 978-3-319-42019-6
eBook Packages: Computer ScienceComputer Science (R0)