"Kees" == Kees Bakker <[email protected]> writes:

        Kees> My next question is: is the example invalid for creduce, or do
        Kees> you expect that the clang parser knows how to find csmith.h?

Well, neither.  It is valid, in the sense that it can be input to C-Reduce.
But C-Reduce's passes will have limited information about what the program
means and how it can be manipulated.

Different C-Reduce passes care to differing extents about the structure of the
input.  Depending on what you are doing, the predicate script that you give to
C-Reduce may also care (or not care) about different levels of strucutral
detail.

        Kees> If the example is for creduce then that contradicts John's answer
        Kees> where he says: "I reduce non-preprocessed C code routinely."

Whatever John is doing, his process doesn't require C-Reduce passes or a script
that inspects programs at a fine level of detail.  He might, for example, just
care about getting a "small enough" program that crashes a compiler.  That's a
pretty coarse-grain acceptability test.

In contrast, for my recent work that involves C-Reduce, I use tools that need a
fair amount of detail about the reduced programs.  They statically analyze the
reduced programs to find various instrumentation points, which I need in order
to decide if a reduced program is acceptable or not.  I invoke those static-
analysis tools from my C-Reduce predicate script, and those tools only work on
preprocessed source.  So, in contrast to John, when I run C-Reduce for my
project, I preprocess my starting program as an initial step.

In sum, whether or not you need to preprocess your source before running
C-Reduce depends on the nature of the task you are trying to perform.

        Kees> Creduce has no -I option, does it?

No, it does not.

Best wishes ---

Eric.

PS --- This is a great line of questions, by the way.  Utah folks should
probably turn this discussion into some C-Reduce documentation :-), like maybe
a FAQ.

-- 
-------------------------------------------------------------------------------
Eric Eide <[email protected]>  .         University of Utah School of Computing
http://www.cs.utah.edu/~eeide/ . +1 (801) 585-5512 voice, +1 (801) 581-5843 FAX

Reply via email to