Luca-Cardelli-Fest-MSR-TR-2014
Total Page:16
File Type:pdf, Size:1020Kb
CARDELLIFEST Martín Abadi Philippa Gardner Andrew D. Gordon Radu Mardare (Eds.) Essays for the Luca Cardelli Fest September 8-9, 2014 Microsoft Research Cambridge Technical Report MSR-TR-2014-104 Preface Luca Cardelli has made exceptional contributions to the field of programming languages and beyond. Throughout his career, he has re-invented himself every decade or so, while continuing to make true innovations. His achievements span many areas: software; language design, including experimental languages; pro- gramming language foundations; and the interaction of programming languages and biology. These achievements form the basis of his lasting scientific leadership and his wide impact. Luca was born in Montecatini Terme, Italy, studied at the University of Pisa until 1978, and received a Ph.D. in computer science from the University of Edinburgh, supervised by Gordon Plotkin. He held research positions at Bell Labs, Murray Hill (1982{1985), and at Digital's Systems Research Center, Palo Alto (1985{1997). He joined Microsoft Research in Cambridge in 1997, where for many years he managed the Programming Principles and Tools group. Since 2013, he holds a Royal Society Research Professorship at the University of Oxford, alongside his position as Principal Researcher at Microsoft Research. Luca Cardelli is a Fellow of the Royal Society, an ACM Fellow, an Elected Member of the Academia Europaea, an Elected Member of AITO (International Association for Object Technologies), and a member of EATCS (European As- sociation for Theoretical Computer Science) and ISCB (International Society for Computational Biology). A scientific event in honour of Luca Cardelli has been organized in Cambridge (UK) on September 8{9, 2014. This celebration will gather many of Luca's col- leagues and friends. It will include talks on a wide variety of topics, correspond- ing to many of the areas in which Luca has worked. Its program is available at http://research.microsoft.com/lucacardellifest/. Complementing these talks, and as a more lasting reflection of the event, many of Luca's colleagues and friends wrote the short papers included in this informal volume. Luca is always asking \what is new", and is always looking to the future. Therefore, we have asked authors to produce short pieces that would indicate where they are today and where they are going. Some of the resulting pieces are short scientific papers, or abridged versions of longer papers; others are less technical, with thoughts on the past and ideas for the future. We hope that they will all interest Luca. We thank all the contributors for their work, and Andrew Phillips for his editorial help. Mart´ınAbadi Philippa Gardner Andrew D. Gordon Radu Mardare Table of Contents Naiad Models and Languages . 7 Mart´ınAbadi The Behavior of Probabilistic Systems: From Equivalences to Behavioural Distances . 15 Giorgio Bacci, Giovanni Baci Bacci, Kim G. Larsen and Radu Mardare The Challenges of Attaining Grace (in a Language Definition) . 27 Andrew Black, Kim Bruce, Michael Homer and James Noble The Gene Gate Model: Some Afterthoughts . 41 Ralf Blossey Multilinear Programming with Big Data . 51 Mihai Budiu and Gordon Plotkin Types and Logic, Concurrency and Non-Determinism . 69 Lu´ısCaires What Makes a Biological Clock Efficient? . .85 Attila Csik´asz-Nagyand Neil Dalchau Two Possibly Alternative Approaches to the Semantics of Stochastic Process Calculi . 95 Rocco De Nicola, Diego Latella, Michele Loreti and Mieke Massink Refining Objects . 109 Robert Harper and Rowan Davies A Theory of Model Equivalence . 141 Ozan Kahramano˘gullari and James F. Lynch Challenges in Automated Verification and Synthesis for Molecular Programming . .155 Marta Kwiatkowska Temporal Logic: The Lesser of Three Evils . 171 Leslie Lamport Simple Proofs of Simple Programs in Why3 . 177 Jean-Jacques L´evy Introduction to New Perspectives in Biology . 187 Giuseppe Longo and Mael Mont´evil Luca Cardelli and the Early Evolution of ML . 201 David MacQueen Tiny Bang: Type Inference and Pattern Matching on Steroids . 215 Pottayil Harisanker Menon, Zachary Palmer, Alexander Rozenshteyn and Scott Smith The Spider Calculus: Computing in Active Graphs . 227 Benjamin C. Pierce, Alessandro Romanel and Daniel Wagner From Amber to Coercion Constraints . 243 Didier R´emyand Julien Cretin Classical π ................................................................257 Steffen van Bakel and Maria Grazia Vigliotti Naiad Models and Languages Mart´ınAbadi Microsoft Research Abstract Naiad is a recent distributed system for data-parallel computation. The goal of this note is to review Naiad and the computing model that underlies it, and to suggest opportunities for explaining them and extending them through programming languages, calculi, and semantics. 1 Prologue Luca Cardelli's research often demonstrates the great value of programming nota- tions and their semantics in understanding and improving a wide variety of com- putational concepts and phenomena. Some of these concepts and phenomena| for example, linking|are close to programming languages, though often hidden inside implementations. Others, like ambients and chemical reactions, may seem more surprising. Finding and developing an appropriate programming-language perspective on such subjects requires insight and elegance, but it can be quite fruitful, as Luca's work illustrates superbly. On the occasion of a celebration of Luca's research, his friends and colleagues were invited to write short pieces that would summarize where they are and where they are going. At present I am engaged in several disparate activities in computer security and in programming languages and systems. So, in this note, I chose to focus on one particular project, namely the development of the Naiad system and of the corresponding theory. This subject is related to people and topics that I encountered while working with Luca, such as Kahn networks and the integration of database constructs into programming languages. More importantly, perhaps, it is a subject in which Luca's perspective and approach may prove crucial in the future. (Lately, I sometimes ask myself \What would Luca do?") The subject does not have obvious connections to the many topics on which Luca and I worked together (type systems, objects, explicit substitutions, and more), nor does it have the breadth of Luca's current research interests|but that may all come in due course. 7 The next section is a brief description of Naiad; further details and references can be found in recent papers (Murray et al. 2013; Abadi et al. 2013; McSherry et al. 2013). The following section outlines some areas of current and future research (joint work with many colleagues, listed below). 2 Naiad in a nutshell Naiad is a distributed system for data-parallel computation. It aims to offer high throughput and low latency, and to support a range of tasks that includes traditional batch and stream processing and also iterative and incremental com- putations. For example, a Naiad application may process a stream of events such as tweets (Murray et al. 2013); as they arrive, the events may feed into an incre- mental connected-components computation and other analyses, which may, for instance, identify the most popular topics in each community of users. Naiad thus aspires to serve as a general, coherent platform for data-parallel applications. In this respect, Naiad contrasts with other systems for data-parallel computation that focus on narrower domains (e.g., graph problems) or on particular styles of programs (e.g., with restrictions on loops). 2.1 Timely dataflow At the core of Naiad is a model for parallel computing that we call timely dataflow. This model extends dataflow computation with a notion of virtual time. As in Jefferson’s Time Warp mechanism (Jefferson 1985), virtual time serves to differ- entiate between data at different phases of a computation. Unlike in the Time Warp mechanism, however, virtual time is partially ordered (rather than linearly ordered, since a linear order may impose false dependencies). In Naiad, each communication event is associated with a virtual time. This as- sociation enables the runtime system to overlap|but still distinguish|work that corresponds to multiple logical stages in a computation: different input epochs, iterations, workflow steps, and perhaps speculative executions. It also enables the runtime system to notify nodes when they have received their last message for a given virtual time. This combination of asynchronous scheduling and completion notification implies that, within a single application, some components can func- tion in batch mode (queuing inputs and delaying processing until an appropriate notification) and others in streaming mode (processing inputs as they arrive). As is typical in dataflow models, we specify computations as directed graphs, with distinguished input nodes and output nodes. The graphs may contain loops, even nested loops. Therefore, at each location in a graph, we can define times- tamps of the form (input epoch, loop counters), where there is one loop counter 8 for each enclosing loop context at that location. Each loop must contain a feed- back node whose function is to increment a timestamp counter. Nodes for loop ingress and egress introduce and remove time coordinates, respectively. During execution, stateful nodes send and receive timestamped messages, and in addition may request and receive notification that they have received all mes- sages with a certain timestamp. So the runtime system must be able to reason