ChiBench only support modules, in the sense that every directive generated is erased from the final program. We should add the support for directive flags, for example:
The simpler solution would be to generate two programs, let's call them A and B.
The final program generated would be:
//This define should be randomized, for some programs we should follow the if branch, for others the else branch
`define B1
`ifdef B1
A
`else
B
`endif
This solution would cover only straightforward define cases, in real programs these directives are used with much more granularity, for example, inside functions, modules between statements, and so on.
ChiBench only support modules, in the sense that every directive generated is erased from the final program. We should add the support for directive flags, for example:
ifdefifndefendifThe simpler solution would be to generate two programs, let's call them
AandB.The final program generated would be:
This solution would cover only straightforward
definecases, in real programs these directives are used with much more granularity, for example, inside functions, modules between statements, and so on.