3 ms·
So if I'm understanding this, this only works for loops with a finite number of iterations knowable at compile time, right?
by salawat 5y ago
So if I'm understanding this, this only works for loops with a finite number of iterations knowable at compile time, right?
- jcranmer 5y agoThe number of iterations must be knowable, yes. It doesn't need to be known as a direct constant value, but it must be computable as a symbolic value as some kind (say, an argument to the function, maybe plus or minus a constant). I haven't looked at the exact criteria in this transformation, but it's very likely that there are also a couple of constraints on how precisely the loop is structured.
- dw-im-here 5y agoCorrect, if you don't ensure the necessary preconditions are met you quickly run into undecidable problems.