As part of a workshop that we take, we should add some features that are not supported by your last version (2.2.0).
My partner and I would like to add the following features:
1) Use of recursive function
2) Use of common libraries
Extending Csmith to support recursion requires adding recursive function calls. Thus, when the random generator chooses to expand a statement to a function call, we should let it use the current function as well. However, GTAV should be also extended in order to maintain unambiguity. We think to apply the concepts of the transfer functions for for-loops and Call-statement to define a transfer function for a recursive Call-statement in the following manner: the first non-recursive call uses the running fact set (after modification of the caller-to-callee handshake) as the input. When a recursive call is generated, the output fact set (i.e. the running fact set modified by the caller-to-callee handshake) joined with the input fact set of the current invocation, used as the input fact set of the next invocation, starting from the function header again. The process repeats until the input fact set to the header is identical to the input fact set to the header during the previous invocation.
What do you think about this transfer function? Do you have any suggestions?