Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
Programming IT Technology

Compiler/Interpreter Validation Guidelines for C? 10

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."
This discussion has been archived. No new comments can be posted.

Compiler/Interpreter Validation Guidelines for C?

Comments Filter:
  • 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.
    • What I would do in your case is probably feed the tool code snippets with known values. If you really want to stress operator precedence and such, I'd probably use examples from _The C Puzzle Book_ which have the advantage of having answers you can check. After that I'd probably pull examples from other C texts. It's not as pretty as running a validation suite, but it will probably tell you more.
  • by Bytenik ( 313942 )
    The following are the most prominent commercial validation suites. It might be worth contacting them to see if they will grant you some sort of "educational use" license.

    Plum Hall: http://www.plumhall.com/stec.html

    Perennial: http://www.peren.com/pages/cvsa.htm

    -----

  • 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...)

  • Not sure what you mean by "guideline" but if you
    mean testsuite then the latest release of gcc has
    a testsuite which runs under DejaGnu.

He has not acquired a fortune; the fortune has acquired him. -- Bion

Working...