I'm not sure the implementation really is the interesting part, but see [the attached patch](https://gitlab.winehq.org/wine/vkd3d/uploads/baab2c3a5fbb254e3de6d345579de56...) for a potential proof of concept. It takes some shortcuts, but I think it illustrates the basic concept that I had in mind well enough.
Okay, I guess we must be talking past each other somehow, because that looks to me like it *is* putting that logic in the parser? It just decides the minimum == maximum for a run and feeds that through the runners.