OK, I've created a general formula which seems to work well for normal, disjoint and nested code on the condition that there are no "move-forward" loops. and due to the magic of integer subtraction, it still works for move-forward loops SO LONG AS that loop is allowed to complete (ie it's within another, "move-back" if-loop that runs at least as many times as the move-forward loop). I've not uploaded the word doc that shows the formula, but
Note the proviso at the end. Not sure about that yet!
Your goal is to use your ACM skills to create hellish boundary cases. Remember these facts:
Lines are considered validly formatted input
If statements will either be DISJOINT (ie the running of one will not affect the other) or NESTED (if a loop x on one line moves above another loop y, the running of y will only run within the confines of x (ie it won't loop to above where x loops to). If you need examples of this, there's a few on the help forum Simon put up)
I already know that loop-forwards can break the code. I'll create a separate ticket for that issue. That said, create combinations of loop-backs, loop-selfs (?) and loop-forwards to try and break my formula.
On that formula, I should add that when there is a loop-forward, it must be nested within the loop back. So it should be such that l_i < l_j, l'_j < l_i and k_j > k_i.
OK, I've created a general formula which seems to work well for normal, disjoint and nested code on the condition that there are no "move-forward" loops. and due to the magic of integer subtraction, it still works for move-forward loops SO LONG AS that loop is allowed to complete (ie it's within another, "move-back" if-loop that runs at least as many times as the move-forward loop). I've not uploaded the word doc that shows the formula, but
Note the proviso at the end. Not sure about that yet!
Your goal is to use your ACM skills to create hellish boundary cases. Remember these facts: