Certified Parsing of Regular Languages

  • Denis Firsov
  • Tarmo Uustalu
Conference paper

DOI: 10.1007/978-3-319-03545-1_7

Part of the Lecture Notes in Computer Science book series (LNCS, volume 8307)
Cite this paper as:
Firsov D., Uustalu T. (2013) Certified Parsing of Regular Languages. In: Gonthier G., Norrish M. (eds) Certified Programs and Proofs. CPP 2013. Lecture Notes in Computer Science, vol 8307. Springer, Cham

Abstract

We report on a certified parser generator for regular languages using the Agda programming language. Specifically, we programmed a transformation of regular expressions into a Boolean-matrix based representation of nondeterministic finite automata (NFAs). And we proved (in Agda) that a string matches a regular expression if and only if the NFA accepts it. The proof of the if-part is effectively a function turning acceptance of a string into a parse tree while the only-if part gives a function turning rejection into a proof of impossibility of a parse tree.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© Springer International Publishing Switzerland 2013

Authors and Affiliations

  • Denis Firsov
    • 1
  • Tarmo Uustalu
    • 1
  1. 1.Institute of CyberneticsTallinn University of TechnologyTallinnEstonia

Personalised recommendations