Hi Eric
I've been able to make it work properly by applying the
variant/invariant trick found on the page that Konstantin provided.
A few notes though
*GCC 4.6 (and up) prefers a semicolon for each last element in a
structure.
* I had a bunch of : cannot remove directory for /tmp/G6WJsnrnaA:
Directory not empty at /usr/bin/creduce line 232
(even though the directory was empty when I checked.)
* I've also seen these : sh: 0: getcwd() failed: No such file or
directory , I'm not sure if they come from creduce or the gcc/diff
program I used.
* It would be nice if there was an option to obfuscate the names.
* It would be nice if some structured could be reduced further by
making assumptions of the width of the types, like int, etc
Or just by grouping identical types (so int x, int y, int z,...
where all vars are unused could be written as int unused[n])
Great tool.I had to subscribe to send these emails :-)
- Jan
On 24/01/2013 16:44, Eric Eide wrote:
"Jan" == Jan Smets <[email protected]> writes:
Jan> I have a large C file with a lot of typedefs, structure
Jan> definitions, etc, and only one 'small' C routine, which I do _not_
Jan> want to change, because a particulary code generation bug is only
Jan> triggered with that specific code.
Jan>
Jan> I would like to get rid of all the unnecessary typedefs, structure
Jan> information etc. so that I can submit a clean bug report. Is that
Jan> something C-Reduce can help me with?
Yes, that is the sort of thing the C-Reduce is designed to do.
I see that you wrote your own predicate for the reducer; good.
Jan> ===< pass_lines :: 0 >===
Jan> <stuck here forever?>
Well, it is not supposed to get stuck :-). For us to diagnose the problem, you
need to provide us with more information, e.g., the source file, the predictae
script, and the commit hash of the version of C-Reduce that you are using.
Thanks ---
Eric.
PS --- I welcome you to subscribe to the list; it is low-volume and interesting
:-).