Hacker News new | past | comments | ask | show | jobs | submit login

It basically runs transformation passes over the code until they stop changing the code or break its behaviour.

It seems like a small number of the passes are not specific to C:

https://github.com/csmith-project/creduce/blob/master/creduc...

`"C" => 1,` means it is only for C.

I would guess `pass_lines` is the most important for non-C code; I'm guessing (it's written in unreadable Perl) that it removes lines.

So while it can work for languages other than C, most of its features are C-specific so it's not going to work nearly as well. Still I'd never heard of C-Reduce; pretty cool tool!

Someone make one based on Tree Sitter, quick!







unreadable perl?! I clicked on the link expecting something super-terse and unstructured, but it's anything but. What the hell is wrong with people casually dropping such remarks.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: