Accessible Formal Methods for Verified Parser Development

被引:1
|
作者
Li, Letitia W. [1 ]
Eakman, Greg [1 ]
Garcia, Elias J. M. [2 ]
Atman, Sam [2 ]
机构
[1] BAE Syst, FAST Labs, Burlington, MA 01803 USA
[2] Special Circumstances, Brussels, Belgium
关键词
LangSee; PDF; Formal Methods; ACL2;
D O I
10.1109/SPW53761.2021.00028
中图分类号
TP [自动化技术、计算机技术];
学科分类号
0812 ;
摘要
Security flaws in Portable Document Format (PDF) readers may allow PDFs to conceal malware, exfiltrate information, and execute malicious code. For a PDF reader to identify these flawed PDFs requires first parsing the document syntactically, and then analyzing the semantic properties or structure of the parse result. This paper presents a language theoretic and developer-accessible approach to PDF parsing and validation using ACL2, a formal methods language and theorem prover. We develop two related components, a PDF syntax parser and a semantic validator. The ACL2-based parser, verified using the theorem prover, supports verification of a high-performance equivalent of itself or an existing PDF parser. The validator then extends the existing parser by checking the semantic properties in the parse result. The structure of the parser and semantic rules are defined by the PDF grammar and fall into certain patterns, and therefore can be automatically composed from a set of verified base functions. Instead of requiring a developer to be familiar with formal methods and to manually write ACL2 code, we use Tower, our modular metalanguage, to generate verified ACL2 functions and proofs and the equivalent C code to analyze semantic properties, which can then be integrated into our verified parser or an existing parser to support PDF validation.
引用
收藏
页码:142 / 151
页数:10
相关论文
共 50 条
  • [1] COSTAR: A Verified ALL(*) Parser
    Lasser, Sam
    Casinghino, Chris
    Fisher, Kathleen
    Roux, Cody
    [J]. PROCEEDINGS OF THE 42ND ACM SIGPLAN INTERNATIONAL CONFERENCE ON PROGRAMMING LANGUAGE DESIGN AND IMPLEMENTATION (PLDI '21), 2021, : 420 - 434
  • [2] TRX: A FORMALLY VERIFIED PARSER INTERPRETER
    Koprowski, Adam
    Binsztok, Henri
    [J]. LOGICAL METHODS IN COMPUTER SCIENCE, 2011, 7 (02)
  • [3] TRX: A Formally Verified Parser Interpreter
    Koprowski, Adam
    Binsztok, Henri
    [J]. PROGRAMMING LANGUAGES AND SYSTEMS, PROCEEDINGS, 2010, 6012 : 345 - 365
  • [4] A grand challenge proposal for formal methods: A verified stack
    Moore, JS
    [J]. FORMAL METHODS AT THE CROSSROADS: FROM PANACEA TO FOUNDATIONAL SUPPORT, 2003, 2757 : 161 - 172
  • [5] Formal Test-Driven Development with Verified Test Cases
    Aichernig, Bernhard K.
    Lorber, Florian
    Tiran, Stefan
    [J]. PROCEEDINGS OF THE 2014 2ND INTERNATIONAL CONFERENCE ON MODEL-DRIVEN ENGINEERING AND SOFTWARE DEVELOPMENT (MODELSWARD 2014), 2014, : 626 - 635
  • [6] A Formalization of the ABNF Notation and a Verified Parser of ABNF Grammars
    Coglio, Alessandro
    [J]. VERIFIED SOFTWARE: THEORIES, TOOLS, AND EXPERIMENTS, (VSTTE 2018), 2018, 11294 : 177 - 195
  • [7] A Verified Packrat Parser Interpreter for Parsing Expression Grammars
    Blaudeau, Clement
    Shankar, Natarajan
    [J]. CPP '20: PROCEEDINGS OF THE 9TH ACM SIGPLAN INTERNATIONAL CONFERENCE ON CERTIFIED PROGRAMS AND PROOFS, 2020, : 3 - 17
  • [8] FORMAL METHODS IN THE DEVELOPMENT OF PREMO
    DUCE, DA
    DUKE, DJ
    TENHAGEN, PJW
    HERMAN, I
    REYNOLDS, GJ
    [J]. COMPUTER STANDARDS & INTERFACES, 1995, 17 (5-6) : 491 - 509
  • [9] The pitfalls of protocol design Attempting to write a formally verified PDF parser
    Bogk, Andreas
    Schoepl, Marco
    [J]. 2014 IEEE SECURITY AND PRIVACY WORKSHOPS (SPW 2014), 2014, : 198 - 203
  • [10] A verified formal model of a VC generator
    Arthan, R. D.
    [J]. 30TH ANNUAL IEEE/NASA SOFTWARE ENGINEERING WORKSHOP, PROCEEDINGS, 2006, : 263 - 271