The UDP Calculus: Rigorous Semantics for Real Networking

Network programming is notoriously hard to understand: one has to deal with a variety of protocols (IP, ICMP, UDP, TCP etc.), concurrency, packet loss, host failure, timeouts, the complex sockets interface to the protocols, and subtle portability issues. Moreover, the behavioural properties of operating systems and the network are not well documented.A few of these issues have been addressed in the process calculus and distributed algorithm communities, but there remains a wide gulf between what has been captured in semantic models and what is required for a precise understanding of the behaviour of practical distributed programs that use these protocols.In this paper we demonstrate (in a preliminary way) that the gulf can be bridged. We give an operational model for socket programming with a substantial fraction of UDP and ICMP, including loss and failure. The model has been validated by experiment against actual systems. It is not tied to a particular programming language, but can be used with any language equipped with an operational semantics for system calls - here we give such a language binding for an OCaml fragment. We illustrate the model with a few small network programs.

[1]  Robert T. Braden,et al.  Requirements for Internet Hosts - Communication Layers , 1989, RFC.

[2]  W. Richard Stevens,et al.  UNIX Network Programming: Networking APIs: Sockets and XTI , 1997 .

[3]  Fred Baker,et al.  Requirements for IP Version 4 Routers , 1995, RFC.

[4]  Ian Lynch,et al.  Software Reference Manual , 1987 .

[5]  Tsung-Min Kuo,et al.  A Facile Tutorial , 1996, CONCUR.

[6]  Leslie Lamport,et al.  The temporal logic of actions , 1994, TOPL.

[7]  Nancy A. Lynch,et al.  IOA: A Language for Specifying, Programming, and Validating Distributed Systems Draft , 1997 .

[8]  Mark Garland Hayden,et al.  The Ensemble System , 1998 .

[9]  James Riely,et al.  Distributed Processes and Location Failures (Extended Abstract) , 1997, ICALP.

[10]  Seif Haridi,et al.  Distributed Algorithms , 1992, Lecture Notes in Computer Science.

[11]  Roberto M. Amadio,et al.  Localities and Failures (Extended Abstract) , 1994, FSTTCS.

[12]  R. Amadio,et al.  Localities and Failures , 1995 .

[13]  Jon Postel,et al.  Internet Protocol , 1981, RFC.

[14]  Robin Milner,et al.  On Observing Nondeterminism and Concurrency , 1980, ICALP.

[15]  Xavier Leroy The objective caml system release 3 , 2001 .

[16]  Mario Tokoro,et al.  An Object Calculus for Asynchronous Communication , 1991, ECOOP.

[17]  Carl A. Gunter,et al.  What packets may come: automata for network monitoring , 2001, POPL '01.

[18]  Peter Sewell,et al.  On Implementations and Semantics of a Concurrent Programming Language , 1997, CONCUR.

[19]  Thomas Arts,et al.  Verifying a Distributed Database Lookup Manager Written in Erlang , 1999, World Congress on Formal Methods.

[20]  Damien Doligez,et al.  The Objective Caml system release 2.04 , 2002 .

[21]  John H. Reppy,et al.  CML: A Higher-Order Concurrent Language , 1991, PLDI.

[22]  Benjamin C. Pierce,et al.  Pict: a programming language based on the Pi-Calculus , 2000, Proof, Language, and Interaction.

[23]  Peter Sewell,et al.  Nomadic Pict: language and infrastructure design for mobile agents , 2000, IEEE Concurr..

[24]  Robin Milner,et al.  A Calculus of Mobile Processes, II , 1992, Inf. Comput..

[25]  Peter Sewell,et al.  Models for name-passing processes: interleaving and causal , 2000, Proceedings Fifteenth Annual IEEE Symposium on Logic in Computer Science (Cat. No.99CB36332).

[26]  Corporate Ieee,et al.  Information Technology-Portable Operating System Interface , 1990 .

[27]  Sape Mullender,et al.  Distributed systems , 1989 .

[28]  James Riely,et al.  Distributed processes and location failures , 2001, Theor. Comput. Sci..

[29]  Jean-Jacques Lévy,et al.  A Calculus of Mobile Agents , 1996, CONCUR.

[30]  A. Fleischmann Distributed Systems , 1994, Springer Berlin Heidelberg.

[31]  Jon Postel,et al.  User Datagram Protocol , 1980, RFC.

[32]  Edoardo Biagioni A Structured TCP in Standard ML , 1994, SIGCOMM.

[33]  Peter Sewell,et al.  Nomadic Pict: language and infrastructure design for mobile agents , 1999, Proceedings. First and Third International Symposium on Agent Systems Applications, and Mobile Agents.

[34]  Robin Milner,et al.  A Calculus of Mobile Processes, II , 1992, Inf. Comput..

[35]  John H. Reppy,et al.  CML: A higher concurrent language , 1991, PLDI '91.

[36]  D. Walker A Calculus of Mobile Processes, Part Ii , 1989 .