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.
- Krivine Nets, proofs and compiler implementation. https://bitbucket.org/ollef/krivine-nets. Last accessed: 3 June 2014.Google Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- Jeffrey Dean and Sanjay Ghemawat. Mapreduce: a flexible data processing tool. Commun. ACM, 53(1):72--77, 2010. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- Olle Fredriksson. Distributed call-by-value machines. CoRR, abs/1401.5097, 2014.Google Scholar
- 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 Scholar
- Olle Fredriksson and Dan R. Ghica. Abstract machines for game semantics, revisited. In LICS, pages 560--569. IEEE Computer Society, 2013. Google Scholar
Digital Library
- Dan R. Ghica. Applications of game semantics: From program analysis to hardware synthesis. In LICS, pages 17--26. IEEE Computer Society, 2009. Google Scholar
Digital Library
- Daniel Hirschkoff, Damien Pous, and Davide Sangiorgi. An efficient abstract machine for safe ambients. J. Log. Algebr. Program., 71(2):114--149, 2007.Google Scholar
Cross Ref
- 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 Scholar
Digital Library
- 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 Scholar
Cross Ref
- Jean-Louis Krivine. A call-by-name lambda-calculus machine. Higher-Order and Symbolic Computation, 20(3):199--207, 2007. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- Ian Mackie. The geometry of interaction machine. In Ron K. Cytron and Peter Lee, editors, POPL, pages 198--208. ACM Press, 1995. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
- 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 Scholar
Cross Ref
- Ulf Norell. Dependently typed programming in agda. In Andrew Kennedy and Amal Ahmed, editors, TLDI, pages 1--2. ACM, 2009. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- Sigram Schindler. Standards and protocols: Distributed abstract machine. Comput. Commun., 3(5):208--220, October 1980. Google Scholar
Digital Library
- James W. Stamos and David K. Gifford. Remote evaluation. ACM Trans. Program. Lang. Syst., 12(4):537--565, 1990. Google Scholar
Digital Library
- Philip W. Trinder, Hans-Wolfgang Loidl, and Robert F. Pointon. Parallel and Distributed Haskells. J. Funct. Program., 12(4&5):469--510, 2002. Google Scholar
Digital Library
- 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 Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
Index Terms
Krivine nets: a semantic foundation for distributed execution
Recommendations
Krivine nets: a semantic foundation for distributed execution
ICFP '14: Proceedings of the 19th ACM SIGPLAN international conference on Functional programmingWe 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 ...
Deriving the full-reducing Krivine machine from the small-step operational semantics of normal order
PPDP '13: Proceedings of the 15th Symposium on Principles and Practice of Declarative ProgrammingWe derive by program transformation Pierre Crégut's full-reducing Krivine machine KN from the structural operational semantics of the normal order reduction strategy in a closure-converted pure lambda calculus. We thus establish the correspondence ...
Strongly reducing variants of the Krivine abstract machine
We present two variants of the Krivine abstract machine that reduce lambda-terms to full normal form. We give a proof of their correctness by interpreting their behaviour in the -calculus.







Comments