@@ -343,7 +343,16 @@ module Trees {
343
343
final override predicate succ ( AstNode pred , AstNode succ , Completion c ) {
344
344
// Start with initialization
345
345
this = pred and
346
- first ( super .getInitializer ( ) , succ ) and
346
+ (
347
+ first ( super .getInitializer ( ) , succ )
348
+ or
349
+ not exists ( super .getInitializer ( ) ) and
350
+ first ( super .getCondition ( ) , succ )
351
+ or
352
+ not exists ( super .getInitializer ( ) ) and
353
+ not exists ( super .getCondition ( ) ) and
354
+ first ( this .getBody ( ) , succ )
355
+ ) and
347
356
completionIsSimple ( c )
348
357
or
349
358
// Initialization -> condition
@@ -359,7 +368,16 @@ module Trees {
359
368
// Body -> iterator
360
369
last ( this .getBody ( ) , pred , c ) and
361
370
completionIsNormal ( c ) and
362
- first ( super .getIterator ( ) , succ )
371
+ (
372
+ first ( super .getIterator ( ) , succ )
373
+ or
374
+ not exists ( super .getIterator ( ) ) and
375
+ first ( super .getCondition ( ) , succ )
376
+ or
377
+ not exists ( super .getIterator ( ) ) and
378
+ not exists ( super .getCondition ( ) ) and
379
+ first ( this .getBody ( ) , succ )
380
+ )
363
381
or
364
382
// Iterator -> condition
365
383
last ( super .getIterator ( ) , pred , c ) and
0 commit comments