Re: Testing strategy for compiler

Tony Finch <dot@dotat.at>
21 Jun 2010 20:18:24 +0100 (BST)

          From comp.compilers

Related articles
[4 earlier articles]
Re: Testing strategy for compiler gene.ressler@gmail.com (Gene) (2010-06-18)
Re: Testing strategy for compiler gneuner2@comcast.net (George Neuner) (2010-06-18)
Re: Testing strategy for compiler gah@ugcs.caltech.edu (glen herrmannsfeldt) (2010-06-18)
Re: Testing strategy for compiler ott@mirix.org (Matthias-Christian Ott) (2010-06-19)
Re: Testing strategy for compiler gah@ugcs.caltech.edu (glen herrmannsfeldt) (2010-06-19)
Re: Testing strategy for compiler jm@bourguet.org (Jean-Marc Bourguet) (2010-06-21)
Re: Testing strategy for compiler dot@dotat.at (Tony Finch) (2010-06-21)
Re: Testing strategy for compiler gneuner2@comcast.net (George Neuner) (2010-06-21)
Re: Testing strategy for compiler news@cuboid.co.uk (Andy Walker) (2010-06-22)
Re: Testing strategy for compiler barry.j.kelly@gmail.com (Barry Kelly) (2010-06-22)
Re: Testing strategy for compiler gah@ugcs.caltech.edu (glen herrmannsfeldt) (2010-06-23)
| List of all articles for this month |

From: Tony Finch <dot@dotat.at>
Newsgroups: comp.compilers
Date: 21 Jun 2010 20:18:24 +0100 (BST)
Organization: dotat labs
References: 10-06-037 10-06-044
Keywords: testing
Posted-Date: 21 Jun 2010 18:07:40 EDT

Matthias-Christian Ott <ott@mirix.org> wrote:
>
>If you have a formal (generative) grammar for your language, you can
>generate all valid strings of language and test whether your parser
>recognises them. So you have practical tests which also cover obscure
>programmes. You could use yagg [1] for this purpose.


As our esteemed moderator points out, you also want to test invalid
inputs. One possible tactic is to randomly perturb a valid program by
adding and/or deleting a few characters or tokens. (Though it might be
tricky to ensure you don't make an edit that leaves the program valid!)


Tony.
--
f.anthony.n.finch <dot@dotat.at> http://dotat.at/
[I recall seeing some work about a decade ago on making small perturbations
to the source code of programs. -John]



Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.