I see, thanks Ben.<div><br></div><div>So yes, I certainly misunderstood (more likely "misunderstand") how things work.</div><div><br></div><div>My initial guess is that a conservative fix is quick and small (make sure the underlying pointers are loop invariant, otherwise give up). A better approach would be to somehow turn code like the example into array references that can be analyzed. I'll need to think about this and do some reading.</div>
<div><br></div><div>Regarding testing... I wrote it the way I did to allow me to focus on particular tests without being distracted by the n^2 explosion resulting from testing everything against everything. But I can see the problem of not being able to handle arbitrary test cases that come from real examples, so I guess it'll need to be changed.</div>
<div><br></div><div>Thanks for your efforts,</div><div>Preston</div><div><br></div>