{"title":"Generic packet descriptions: verified parsing and pretty printing of low-level data","authors":"M. V. Geest, Wouter Swierstra","doi":"10.1145/3122975.3122979","DOIUrl":null,"url":null,"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.","PeriodicalId":166018,"journal":{"name":"Proceedings of the 2nd ACM SIGPLAN International Workshop on Type-Driven Development","volume":"12 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2017-09-03","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"10","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the 2nd ACM SIGPLAN International Workshop on Type-Driven Development","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3122975.3122979","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 10
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.