@@ -209,6 +209,13 @@ abstract class SplitImpl extends Split {
209
209
or
210
210
exists ( ControlFlowElement pred | this .appliesTo ( pred ) | this .hasSuccessor ( pred , cfe , _) )
211
211
}
212
+
213
+ /** The `succ` relation restricted to predecessors `pred` that this split applies to. */
214
+ pragma [ noinline]
215
+ final predicate appliesSucc ( ControlFlowElement pred , ControlFlowElement succ , Completion c ) {
216
+ this .appliesTo ( pred ) and
217
+ succ ( pred , succ , c )
218
+ }
212
219
}
213
220
214
221
module InitializerSplitting {
@@ -382,8 +389,7 @@ module InitializerSplitting {
382
389
}
383
390
384
391
override predicate hasSuccessor ( ControlFlowElement pred , ControlFlowElement succ , Completion c ) {
385
- this .appliesTo ( pred ) and
386
- succ ( pred , succ , c ) and
392
+ this .appliesSucc ( pred , succ , c ) and
387
393
succ =
388
394
any ( InitializedInstanceMember m |
389
395
constructorInitializes ( this .getConstructor ( ) , m .getInitializer ( ) )
@@ -620,8 +626,7 @@ module AssertionSplitting {
620
626
}
621
627
622
628
override predicate hasSuccessor ( ControlFlowElement pred , ControlFlowElement succ , Completion c ) {
623
- this .appliesTo ( pred ) and
624
- succ ( pred , succ , c ) and
629
+ this .appliesSucc ( pred , succ , c ) and
625
630
succ = getAnAssertionDescendant ( a )
626
631
}
627
632
}
@@ -858,8 +863,7 @@ module FinallySplitting {
858
863
}
859
864
860
865
override predicate hasSuccessor ( ControlFlowElement pred , ControlFlowElement succ , Completion c ) {
861
- this .appliesToPredecessor ( pred ) and
862
- succ ( pred , succ , c ) and
866
+ this .appliesSucc ( pred , succ , c ) and
863
867
succ =
864
868
any ( FinallyControlFlowElement fcfe |
865
869
if fcfe .isEntryNode ( )
@@ -1037,7 +1041,7 @@ module ExceptionHandlerSplitting {
1037
1041
1038
1042
override predicate hasSuccessor ( ControlFlowElement pred , ControlFlowElement succ , Completion c ) {
1039
1043
this .appliesToPredecessor ( pred , c ) and
1040
- succ ( pred , succ , c ) and
1044
+ this . appliesSucc ( pred , succ , c ) and
1041
1045
not first ( any ( SpecificCatchClause scc ) .getBlock ( ) , succ ) and
1042
1046
not succ instanceof GeneralCatchClause and
1043
1047
not exists ( TryStmt ts , SpecificCatchClause scc , int last |
@@ -1298,7 +1302,7 @@ module BooleanSplitting {
1298
1302
override predicate hasSuccessor ( ControlFlowElement pred , ControlFlowElement succ , Completion c ) {
1299
1303
exists ( PreBasicBlock bb , Completion c0 | this .appliesToBlock ( bb , c0 ) |
1300
1304
pred = bb .getAnElement ( ) and
1301
- succ ( pred , succ , c ) and
1305
+ this . appliesSucc ( pred , succ , c ) and
1302
1306
(
1303
1307
pred = bb .getLastElement ( )
1304
1308
implies
@@ -1489,7 +1493,7 @@ module LoopSplitting {
1489
1493
1490
1494
override predicate hasSuccessor ( ControlFlowElement pred , ControlFlowElement succ , Completion c ) {
1491
1495
this .appliesToPredecessor ( pred , c ) and
1492
- succ ( pred , succ , c ) and
1496
+ this . appliesSucc ( pred , succ , c ) and
1493
1497
not loop .stop ( pred , succ , c )
1494
1498
}
1495
1499
}
0 commit comments