WANTED: Parser testing tools and/or random sentence generator(s).

rfg@netcom.com (Ronald F. Guilmette)
Thu, 22 Oct 1992 20:33:10 GMT

          From comp.compilers

Related articles
WANTED: Parser testing tools and/or random sentence generator(s). rfg@netcom.com (1992-10-22)
Re: WANTED: Parser testing tools and/or random sentence generator(s). leichter@zodiac.rutgers.edu (1992-10-23)
Re: WANTED: Parser testing tools and/or random sentence generator(s). glenn@ready.eng.ready.com (Glenn Kasten) (1992-10-23)
Re: WANTED: Parser testing tools and/or random sentence generator(s). marick@m.cs.uiuc.edu (1992-10-26)
| List of all articles for this month |

Newsgroups: comp.compilers
From: rfg@netcom.com (Ronald F. Guilmette)
Organization: Netcom - Online Communication Services (408 241-9760 guest)
Date: Thu, 22 Oct 1992 20:33:10 GMT
Keywords: C++, testing, comment

Seems to me that sometime in the distant past, I may have read in this
newsgroup about some tool (or tools) which, when given a grammar specifi-
cation, would generate a whole slew of random (ostensibly valid) sentences
conforming to the given grammar.


Such a tool could (in theory) be useful (I suppose) for checking that the
grammar accepted by a given compiler conformed to the grammar which the
relevant language is supposed to have, but I could well imagine that if
the tool accepted the grammar specification as a yacc-style grammar, and
if the compiler being tested had a parser based upon the very same yacc
grammar, then (implicitly) all of the tests would pass, and you would not
learn anything new about the parser component of the compiler under test
(although you might learn some interesting things about some bizzare
semantic situations).


I however would like to obtain such a tool, feed it the grammar taken from
the C++ Annotated Reference Manual (with whatever small modifications
might be needed to get it to be an "acceptable" grammar as far as the tool
was concerned) and then use the randomly generated output sentences as
both syntactic and (perhaps) semantic torture tests for various C++
compilers (none of which are likely to have parsers based directly on the
ARM grammar).


Do such "random sentence generators" exist, or was I just imagining that I
had heard about such things in the past? If such things exist, is there
(by any chance) one which is in the public domain or which is otherwise
freely available? If so, how could I obtain a copy of it? (Anon FTP
would be easiest for me.)


Please E-mail replies to me directly, as I only seem to get caught up on
my netnews reading about once a month these days. If there are several
responses, I'll summarize those back to comp.compilers.
[This topic came up in March 1990, and there were many referencs to random
sentence generators, but I couldn't find any actual code. -John]
--


Post a followup to this message

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