c4-project / c4f

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

Add variable cap #242

Closed MattWindsor91 closed 3 years ago

MattWindsor91 commented 3 years ago

If we're fuzzing as input to simulators, then it can be helpful to make sure the number of variables doesn't exceed the number of variables that can be passed in registers, hence avoiding introducing the stack. We can likely model this in the same way as we model thread caps: make an integer parameter, and consult it as part of the precondition of variable introductions.

It's not yet clear whether we'd want a thread-local cap (cap on variables visible to a thread) or a global one (cap on variables visible throughout), or both.

MattWindsor91 commented 3 years ago

The variable cap has been added, but some variable-producing actions don't yet honour it. I'll close this and file a bug.