Is there a particular need for generating while-loops?
We considered the question at the very beginning of implementing Csmith, and decided to use for-loops to represent all sorts of loops (while, do-while, etc.) which are different at the language level, but are normalized to the same form at the IR level. We believe generating both for-loops and while-loops would find marginally more bugs than just generating for-loops alone.-XuejunOn Thu, Apr 18, 2019 at 11:16 AM sameeran joshi <gsocsameeran@gmail.com> wrote:Hi,
I started hacking Csmith for adding StatementWhile.h and
StatementWhile.cpp in Csmith.
I have made necessary changes in Makefile which builds the above files
successfully.
I just need a pointer to
1. What changes do I need to make if I try cloning
StatementFor.cpp ---------> StatementWhile.cpp
StatementFor.h -------> StatementWhile.h ?
2. Which files do I need to check for adding the increment _expression_
in StatementWhile inside the body of a while statement ? Are there any
similar implementations which I can refer to?
3. Will the post_loop_analysis and visit_facts of StatementFor need
any changes to be made when used in StatementWhile ?
3. Any files which have dependencies apart from Statement* ?
Thanks,
Sameeran Joshi