Parsers are security-critical components of many software systems, and formally verified parsing therefore has a key role to play in secure software design. However, existing verified parsers for context-free grammars are limited either in their expressiveness or in their termination properties: they are only compatible with a restricted class of grammars, or they are not guaranteed to terminate on all inputs.
In this work, we present CoStar, a verified parser that overcomes both limitations. The parser is implemented with the Coq Proof Assistant and is based on a purely functional adaptation of the ALL(*) parsing algorithm. CoStar is compatible with non-left-recursive grammars of arbitrary complexity; if the parser is applied to a non-left-recursive grammar, it produces a correct parse tree for its input whenever such a tree exists, and it correctly detects ambiguous inputs. CoStar also provides strong termination guarantees; it terminates without error on all inputs when applied to a non-left-recursive grammar. The parser is therefore a decision procedure for language membership. Finally, CoStar achieves linear-time performance on a range of unambiguous grammars for real-world languages and data formats.
Thu 16 JunDisplayed time zone: Pacific Time (US & Canada) change
10:40 - 12:00 | |||
10:40 20mTalk | (ICFP 2021) Formal Verification of a Concurrent Bounded Queue in a Weak Memory Model SIGPLAN Track Glen Mével Inria, Université Paris-Saclay, CNRS, ENS Paris-Saclay, Laboratoire des méthodes formelles, Jacques-Henri Jourdan Université Paris-Saclay, CNRS, ENS Paris-Saclay, Laboratoire Méthodes Formelles | ||
11:00 20mTalk | (PLDI 2020) Zippy LL(1) Parsing with Derivatives SIGPLAN Track | ||
11:20 20mTalk | (PLDI 2021) CoStar: A Verified ALL(*) Parser SIGPLAN Track Sam Lasser Tufts University, Chris Casinghino Draper Laboratory, Kathleen Fisher Tufts University, Cody Roux Draper | ||
11:40 20mTalk | (PLDI 2021) Transfinite Iris: Resolving an Existential Dilemma of Step-Indexed Separation Logic SIGPLAN Track Simon Spies MPI-SWS & Saarland University, Lennard Gäher MPI-SWS & Saarland University, Daniel Gratzer Aarhus University, Joseph Tassarotti Boston College, Robbert Krebbers Radboud University Nijmegen, Derek Dreyer MPI-SWS, Lars Birkedal Aarhus University |