Skip to content

PLCgen: using bound from controller properties annotation's bounded response could lead to killed loops

Consider a bound for controllable events of '5'. Then we allow going through the loop five times. If indeed it needs five iterations, and thus in each of the five iterations a transition is executed, then afterwards a killed loop is reported. That is, for a bound n, loopCount will then be n. Also, isProgress will be TRUE. So, loopsKilled will be incremented.

I think we need to increase the bound from the annotation by '2'. That is, we allow n iterations, but we also allow one extra one where we don't do any transitions. We thus end with loopCount = n + 1. Since loopCount >= n + 2 doesn't hold then, no killed loop is reported.

Addresses #679

Edited by Dennis Hendriks