c4-project / c4f

The C4 Concurrent C Fuzzer
MIT License
13 stars 1 forks source link

Add ternary expressions #231

Open MattWindsor91 opened 3 years ago

MattWindsor91 commented 3 years ago

There are some known historical bugs based on the conditional execution of atomics. With this in mind, it makes sense to me to introduce support for x ? y : z in the expression generator: it's a nice convenient way for introducing conditionality on integer expressions.

As usual, this'd need a few new legs adding to Fir, some traversal threading-through, expression generator support, abstraction and reification functions, the works.

MattWindsor91 commented 3 years ago

We now have ternaries in everything but the expression generator. Using ternaries in a fun way might involve some exciting refactoring of the expression generator, yay.