Compiler/Interpreter Validation Guidelines for C?
pjdepasq asks: "For my PhD work, I've developing a programming environment for novice users. It basically interprets the C programming language, plus or minus a few things as we teach the novice programming course here at Virginia Tech. In doing so, I'd like to have one of the students working with me use a compiler validation guideline to validate we're covering the key bases. For example, initially, I'd like them to ensure that the operator precendence is working correctly. My advisor tells me that NIST used to have a software product for doing this, but I don't see it there any longer for C. I'd really just be happy with some type of guide that the student can work from. Does anyone know of some type of free/cheap guideline we can utilize? It would likely need to include other types of validation, since we'll expand this effort later in the semester."
are available from EDS. See the following link: http://www.eds-conform.com/languages.html The services aren't free but the link may be useful anyway.
If you go perusing through Donald Knuth's work (in this case, Digital Typography), you will see him mention a killer program he wrote for TeX. I'd cite the program name and page number if I had my copy, but I lent it out. In any event, this single TeX program/script/file tested every little nuance of the system abusively. In and of itself it was a gorgeous piece of work.
Shifting gears for a moment, most QA types will tell you that the best time to devise test cases is when a project is in late requirements or early design. You doubtless have a grammar for your "C-plus-or-minus" language--I would call that a great high-level design document!
Now putting this all together, shouldn't it be relatively straightforward to construct a C program (or set of C programs) that goes through every state of your grammar?
Sounds like a fun project for some undergrad students to work on in Compiler Design. (In fact, it might even be fun to generate a C program generator from that grammar to do it for you; but I digress...)
S.