skip to main content
research-article

Krivine nets: a semantic foundation for distributed execution

Published:19 August 2014Publication History
Skip Abstract Section

Abstract

We define a new approach to compilation to distributed architectures based on networks of abstract machines. Using it we can implement a generalised and fully transparent form of Remote Procedure Call that supports calling higher-order functions across node boundaries, without sending actual code. Our starting point is the classic Krivine machine, which implements reduction for untyped call-by-name PCF. We successively add the features that we need for distributed execution and show the correctness of each addition. Then we construct a two-level operational semantics, where the high level is a network of communicating machines, and the low level is given by local machine transitions. Using these networks, we arrive at our final system, the Krivine Net. We show that Krivine Nets give a correct distributed implementation of the Krivine machine, which preserves both termination and non-termination properties. All the technical results have been formalised and proved correct in Agda. We also implement a prototype compiler which we compare with previous distributing compilers based on Girard's Geometry of Interaction and on Game Semantics.

References

  1. Krivine Nets, proofs and compiler implementation. https://bitbucket.org/ollef/krivine-nets. Last accessed: 3 June 2014.Google ScholarGoogle Scholar
  2. Amal J. Ahmed. Step-indexed syntactic logical relations for recursive and quantified types. In Peter Sestoft, editor, ESOP, volume 3924 of Lecture Notes in Computer Science, pages 69--83. Springer, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Gérard Berry and Gérard Boudol. The chemical abstract machine. Theoretical Computer Science, 96(1):217--248, 1992. Selected Papers of the 2nd Workshop on Concurrency and Compositionality. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. D. I. Bevan. Distributed garbage collection using reference counting. In J. W. de Bakker, A. J. Nijman, and Philip C. Treleaven, editors, PARLE (2), volume 259 of Lecture Notes in Computer Science, pages 176--187. Springer, 1987. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Silvia Breitinger, Ulrike Klusik, Rita Loogen, Yolanda Ortega-Mallén, and Ricardo Pena. Dream: The distributed eden abstract machine. In Chris Clack, Kevin Hammond, and Antony J. T. Davie, editors, Implementation of Functional Languages, volume 1467 of Lecture Notes in Computer Science, pages 250--269. Springer, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Nadia Busi, Roberto Gorrieri, Claudio Guidi, Roberto Lucchi, and Gianluigi Zavattaro. Choreography and orchestration: A synergic approach for system design. In Boualem Benatallah, Fabio Casati, and Paolo Traverso, editors, ICSOC, volume 3826 of Lecture Notes in Computer Science, pages 228--240. Springer, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Antonio Carzaniga, Gian Pietro Picco, and Giovanni Vigna. Designing distributed applications with mobile code paradigms. In W. Richards Adrion, Alfonso Fuggetta, Richard N. Taylor, and Anthony I. Wasserman, editors, ICSE, pages 22--32. ACM, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Ezra Cooper, Sam Lindley, Philip Wadler, and Jeremy Yallop. Links: Web programming without tiers. In Frank S. de Boer, Marcello M. Bonsangue, Susanne Graf, and Willem P. de Roever, editors, FMCO, volume 4709 of Lecture Notes in Computer Science, pages 266--296. Springer, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Ezra Cooper and Philip Wadler. The RPC calculus. In António Porto and Francisco Javier López-Fraguas, editors, PPDP, pages 231--242. ACM, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Jeffrey Dean and Sanjay Ghemawat. Mapreduce: a flexible data processing tool. Commun. ACM, 53(1):72--77, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Adam Dunkels, Björn Grönvall, and Thiemo Voigt. Contiki - a lightweight and flexible operating system for tiny networked sensors. In LCN, pages 455--462. IEEE Computer Society, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Olle Fredriksson. Distributed call-by-value machines. CoRR, abs/1401.5097, 2014.Google ScholarGoogle Scholar
  13. Olle Fredriksson and Dan R. Ghica. Seamless distributed computing from the geometry of interaction. In Catuscia Palamidessi and Mark Dermot Ryan, editors, TGC, volume 8191 of Lecture Notes in Computer Science, pages 34--48. Springer, 2012.Google ScholarGoogle Scholar
  14. Olle Fredriksson and Dan R. Ghica. Abstract machines for game semantics, revisited. In LICS, pages 560--569. IEEE Computer Society, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Dan R. Ghica. Applications of game semantics: From program analysis to hardware synthesis. In LICS, pages 17--26. IEEE Computer Society, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Daniel Hirschkoff, Damien Pous, and Davide Sangiorgi. An efficient abstract machine for safe ambients. J. Log. Algebr. Program., 71(2):114--149, 2007.Google ScholarGoogle ScholarCross RefCross Ref
  17. Kohei Honda. Session types and distributed computing. In Artur Czumaj, Kurt Mehlhorn, Andrew M. Pitts, and Roger Wattenhofer, editors, ICALP (2), volume 7392 of Lecture Notes in Computer Science, page 23. Springer, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Simon L. Peyton Jones. Implementing lazy functional languages on stock hardware: The spineless tagless g-machine. J. Funct. Program., 2(2):127--202, 1992.Google ScholarGoogle ScholarCross RefCross Ref
  19. Jean-Louis Krivine. A call-by-name lambda-calculus machine. Higher-Order and Symbolic Computation, 20(3):199--207, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Xavier Leroy. Formal certification of a compiler back-end or: programming a compiler with a proof assistant. In J. Gregory Morrisett and Simon L. Peyton Jones, editors, POPL, pages 42--54. ACM, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Hans-Wolfgang Loidl, Fernando Rubio, Norman Scaife, Kevin Hammond, Susumu Horiguchi, Ulrike Klusik, Rita Loogen, Greg Michaelson, Ricardo Pena, Steffen Priebe, Álvaro J. Rebón Portillo, and Philip W. Trinder. Comparing Parallel Functional Languages: Programming and Performance. Higher-Order and Symbolic Computation, 16(3):203--251, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Rita Loogen, Yolanda Ortega-Mallén, and Ricardo Peña-Marí. Parallel functional programming in eden. J. Funct. Program., 15(3):431--475, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Ian Mackie. The geometry of interaction machine. In Ron K. Cytron and Peter Lee, editors, POPL, pages 198--208. ACM Press, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Simon Marlow, Alexey Rodriguez Yakushev, and Simon L. Peyton Jones. Faster laziness using dynamic pointer tagging. In Ralf Hinze and Norman Ramsey, editors, ICFP, pages 277--288. ACM, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Derek Gordon Murray, Malte Schwarzkopf, Christopher Smowton, Steven Smith, Anil Madhavapeddy, and Steven Hand. Ciel: A universal execution engine for distributed data-flow computing. In David G. Andersen and Sylvia Ratnasamy, editors, NSDI. USENIX Association, 2010.Google ScholarGoogle Scholar
  26. Kensuke Narita and Shin-ya Nishizaki. A parallel abstract machine for the RPC calculus. In Informatics Engineering and Information Science, pages 320--332. Springer, 2011.Google ScholarGoogle ScholarCross RefCross Ref
  27. Ulf Norell. Dependently typed programming in agda. In Andrew Kennedy and Amal Ahmed, editors, TLDI, pages 1--2. ACM, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Atsushi Ohori and Kazuhiko Kato. Semantics for communication primitives in an polymorphic language. In Mary S. Van Deusen and Bernard Lang, editors, POPL, pages 99--112. ACM Press, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. David Plainfossé and Marc Shapiro. A survey of distributed garbage collection techniques. In Henry G. Baker, editor, IWMM, volume 986 of Lecture Notes in Computer Science, pages 211--249. Springer, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. Sigram Schindler. Standards and protocols: Distributed abstract machine. Comput. Commun., 3(5):208--220, October 1980. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. James W. Stamos and David K. Gifford. Remote evaluation. ACM Trans. Program. Lang. Syst., 12(4):537--565, 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. Philip W. Trinder, Hans-Wolfgang Loidl, and Robert F. Pointon. Parallel and Distributed Haskells. J. Funct. Program., 12(4&5):469--510, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. David Turner et al. The polymorphic pi-calculus: Theory and implementation. PhD thesis, University of Edinburgh. College of Science and Engineering. School of Informatics., 1996.Google ScholarGoogle Scholar
  34. Vasco Thudichum Vasconcelos, Simon J. Gay, and António Ravara. Type checking a multithreaded functional language with session types. Theor. Comput. Sci., 368(1-2):64--87, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. Tom Murphy VII, Karl Crary, and Robert Harper. Type-safe distributed programming with ML5. In Gilles Barthe and Cédric Fournet, editors, TGC, volume 4912 of Lecture Notes in Computer Science, pages 108--123. Springer, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Krivine nets: a semantic foundation for distributed execution

            Recommendations

            Comments

            Login options

            Check if you have access through your login credentials or your institution to get full access on this article.

            Sign in

            Full Access

            PDF Format

            View or Download as a PDF file.

            PDF

            eReader

            View online with eReader.

            eReader
            About Cookies On This Site

            We use cookies to ensure that we give you the best experience on our website.

            Learn more

            Got it!