Generic packet descriptions: Verified Parsing and Pretty Printing of Low-Level Data

Publication date

2017-09-03

Authors

van Geest, Marcell
Swierstra, WouterORCID 0000-0002-0295-7944ISNI 0000000426852359

Editors

Advisors

Supervisors

Document Type

Part of book
Open Access logo

License

Abstract

Complex protocols describing the communication or storage of binary data are difficult to describe precisely. This paper presents a collection of data types for describing a binary data formats; the corresponding parser and pretty printer are generated automatically from a data description. By embedding these data types in a general purpose dependently typed programming language, we can verify once and for all that the parsers and pretty printers generated in this style are correct by construction. To validate our results, we show how to write a verified parser of the IPv4 network protocol.

Keywords

data type generic programming, dependent types, parsing, pretty printing

Citation

van Geest, M & Swierstra, W 2017, Generic packet descriptions : Verified Parsing and Pretty Printing of Low-Level Data. in TyDe 2017 : Proceedings of the 2nd ACM SIGPLAN International Workshop on Type-Driven Development. Association for Computing Machinery, pp. 30-40. https://doi.org/10.1145/3122975.3122979