skip to main content
research-article

Krivine nets: a semantic foundation for distributed execution

Published: 19 August 2014 Publication History

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.
[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.
[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.
[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.
[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.
[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.
[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.
[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.
[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.
[10]
Jeffrey Dean and Sanjay Ghemawat. Mapreduce: a flexible data processing tool. Commun. ACM, 53(1):72--77, 2010.
[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.
[12]
Olle Fredriksson. Distributed call-by-value machines. CoRR, abs/1401.5097, 2014.
[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.
[14]
Olle Fredriksson and Dan R. Ghica. Abstract machines for game semantics, revisited. In LICS, pages 560--569. IEEE Computer Society, 2013.
[15]
Dan R. Ghica. Applications of game semantics: From program analysis to hardware synthesis. In LICS, pages 17--26. IEEE Computer Society, 2009.
[16]
Daniel Hirschkoff, Damien Pous, and Davide Sangiorgi. An efficient abstract machine for safe ambients. J. Log. Algebr. Program., 71(2):114--149, 2007.
[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.
[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.
[19]
Jean-Louis Krivine. A call-by-name lambda-calculus machine. Higher-Order and Symbolic Computation, 20(3):199--207, 2007.
[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.
[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.
[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.
[23]
Ian Mackie. The geometry of interaction machine. In Ron K. Cytron and Peter Lee, editors, POPL, pages 198--208. ACM Press, 1995.
[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.
[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.
[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.
[27]
Ulf Norell. Dependently typed programming in agda. In Andrew Kennedy and Amal Ahmed, editors, TLDI, pages 1--2. ACM, 2009.
[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.
[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.
[30]
Sigram Schindler. Standards and protocols: Distributed abstract machine. Comput. Commun., 3(5):208--220, October 1980.
[31]
James W. Stamos and David K. Gifford. Remote evaluation. ACM Trans. Program. Lang. Syst., 12(4):537--565, 1990.
[32]
Philip W. Trinder, Hans-Wolfgang Loidl, and Robert F. Pointon. Parallel and Distributed Haskells. J. Funct. Program., 12(4&5):469--510, 2002.
[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.
[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.
[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.

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM SIGPLAN Notices
ACM SIGPLAN Notices  Volume 49, Issue 9
ICFP '14
September 2014
361 pages
ISSN:0362-1340
EISSN:1558-1160
DOI:10.1145/2692915
Issue’s Table of Contents
  • cover image ACM Conferences
    ICFP '14: Proceedings of the 19th ACM SIGPLAN international conference on Functional programming
    August 2014
    390 pages
    ISBN:9781450328739
    DOI:10.1145/2628136
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 19 August 2014
Published in SIGPLAN Volume 49, Issue 9

Check for updates

Author Tags

  1. abstract machines
  2. agda
  3. distributed execution
  4. simulation relation

Qualifiers

  • Research-article

Funding Sources

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)3
  • Downloads (Last 6 weeks)0
Reflects downloads up to 13 Dec 2024

Other Metrics

Citations

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media