×

zbMATH — the first resource for mathematics

Verified, executable parsing. (English) Zbl 1234.68359
Castagna, Giuseppe (ed.), Programming languages and systems. 18th European symposium on programming, ESOP 2009, held as part of the joint European conferences on theory and practice of software, ETAPS 2009, York, UK, March 22–29, 2009. Proceedings. Berlin: Springer (ISBN 978-3-642-00589-3/pbk). Lecture Notes in Computer Science 5502, 160-174 (2009).
Summary: We describe the mechanisation of an SLR parser produced by a parser generator, covering background properties of context-free languages and grammars, as well as the construction of an SLR automaton. Among the various properties proved about the parser we show, in particular, soundness: if the parser results in a parse tree on a given input, then the parse tree is valid with respect to the grammar, and the leaves of the parse tree match the input; completeness: if the input is in the language of the grammar then the parser constructs the correct parse tree for the input with respect to the grammar; and non-ambiguity: grammars successfully converted to SLR automata are unambiguous.
We also develop versions of the algorithms that are executable by automatic translation from HOL to SML. These alternative versions of the algorithms require some interesting termination proofs.
For the entire collection see [Zbl 1157.68004].

MSC:
68T15 Theorem proving (deduction, resolution, etc.) (MSC2010)
68Q42 Grammars and rewriting systems
68Q45 Formal languages and automata
PDF BibTeX XML Cite
Full Text: DOI