For Programmers: Free Programming Magazines  


Home > Archive > Compilers > June 2004 > [ANN] Quest - test code generator for C









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author [ANN] Quest - test code generator for C
Christian Lindig

2004-05-17, 12:31 am

I would like to announce the first release of Quest, a test code
generator. Quest generates C code that validates the function-call
implementation of C compilers for complex arguments. As such, Quest is
most useful for developers of C compilers and anybody interested in
the correctness of C compilers. So far, Quest has uncovered bugs in
recent versions of GCC and in the MipsPro compiler on SGI. My plan is
to collect more bugs found with Quest.

http://www.st.cs.uni-sb.de/~lindig/src/quest/index.html

Quest does not require a specification; it generates code
randomly. The generated code tests that complex values passed to a
function, like structs or arrays, are received as they were
passed. Unxepected behavior it reports to stdout. The generated code
includes no header file but assumes the presence of
printf(). Therefore the code should be fairly portable.

The generated code is substantially different from real-world code and
that is why it is useful. Real-world programs rarely pass complex
values and cannot be used to test the implementation of this language
feature.

Quest can generate code with caller and callee in different
compilation units. When these are compiled by different compilers,
their interoperability and adherence to the standard calling
convention can be tested.

Quest is distributed as open source under a BSD-style license. It is
implemented in Objective Caml but a binary Debian package for x86 is
available. You can also download pre-generated test cases that do not
require the prior installation of Quest.

Your comments and especially experience reports are welcome!

-- Christian
--
Christian Lindig http://www.st.cs.uni-sb.de/~lindig/
Clayton Weaver

2004-06-03, 7:28 pm

>The generated code is substantially different from real-world code and
>that is why it is useful. Real-world programs rarely pass complex
>values and cannot be used to test the implementation of this language
>feature.


If it does not do this already, you might add testing complex return
values (returned unions and structs with embedded structs, etc).

(The usual safe thing to do is to merely pass in a pointer to a data
structure that holds arguments, return values, and error indicators
and have the function itself return void, but the point here is
apparently to help compiler implementors handle corner cases
correctly. Complex return values are a similar class of problem to
complex function parameters.)

Regards,

Clayton Weaver
<mailto: cgweav@aol.com>

"Everyone is ignorant, just about different things." Will Rogers
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com