[Haskell-cafe] Techniques for ensuring parser correctness?

Jason Dagit dagit at codersbase.com
Sun Jul 25 21:51:44 EDT 2010


Hello,

I find that parser correctness is often hard to verify.  Therefore, I'm
interested in techniques that others have used successfully, especially with
Haskell.

Techniques I'm aware of:
  * Round trip checks: Generate a datastructure, render as a string, parse
back, and compare.  Quickcheck can be used to automate this.
  * Fuzz testing:  What tools exist to help me?
  * Formal verification: Has anyone been using this with Haskell parsers?
 Other than general theorem provers, say Isabelle, what tools exist?

My specific need:
The immediate challenge I have is that I'm modifying the parser that Darcs
uses and we would like to improve the parser's test suite as well.  The
parser abstraction used in this case follows parsec's API.  Left to my own
devices I would use round trip checks, written with quickcheck, for this
exercise.  Because we're using a parsec style parser, I don't have a nice
neat grammar handy.

Thanks in advance for any advice you have!

Thanks,
Jason
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20100725/6ce6bc6e/attachment.html


More information about the Haskell-Cafe mailing list