Affiliation:
1. University of Cambridge Computer Laboratory
2. NICTA, Canberra
Abstract
The TCP/IP protocols and Sockets API underlie much of modern computation, but their semantics have historically been very complex and ill-defined. The real standard is the de facto one of the common implementations, including, for example, the 15,000--20,000 lines of C in the BSD implementation. Dealing rigorously with the behaviour of such bodies of code is challenging.We have recently developed a post-hoc specification of TCP, UDP, and Sockets that is rigorous, detailed, readable, has broad coverage, and is remarkably accurate. In this paper we describe the novel techniques that were required.Working within a general-purpose proof assistant (HOL), we developed
language idioms
(within higher-order logic) in which to write the specification: operational semantics with nondeterminism, time, system calls, monadic relational programming, etc. We followed an
experimental semantics
approach, validating the specification against several thousand traces captured from three implementations (FreeBSD, Linux, and WinXP). Many differences between these were identified, and a number of bugs. Validation was done using a special-purpose
symbolic model checker
programmed above HOL.We suggest that similar logic engineering techniques could be applied to future critical software infrastructure at design time, leading to cleaner designs and (via specification-based testing using a similar checker) more predictable implementations.
Publisher
Association for Computing Machinery (ACM)
Subject
Computer Graphics and Computer-Aided Design,Software
Cited by
15 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. Lifting Network Protocol Implementation to Precise Format Specification with Security Applications;Proceedings of the 2023 ACM SIGSAC Conference on Computer and Communications Security;2023-11-15
2. Verifying Reliable Network Components in a Distributed Separation Logic with Dependent Separation Protocols;Proceedings of the ACM on Programming Languages;2023-08-30
3. What we talk about when we talk about pcap expressions;Proceedings of the 4th ACM International Workshop on Real World Domain Specific Languages;2019-02-17
4. Engineering with Logic;Journal of the ACM;2019-01-12
5. QED at Large: A Survey of Engineering of Formally Verified Software;Foundations and Trends® in Programming Languages;2019