@@ -480,7 +480,9 @@ module MakeImpl<InputSig Lang> {
480
480
/**
481
481
* Holds if field flow should be used for the given configuration.
482
482
*/
483
- private predicate useFieldFlow ( ) { Config:: fieldFlowBranchLimit ( ) >= 1 }
483
+ private predicate useFieldFlow ( ) {
484
+ Config:: fieldFlowBranchLimit ( ) >= 1 and Config:: accessPathLimit ( ) > 0
485
+ }
484
486
485
487
private predicate hasSourceCallCtx ( ) {
486
488
exists ( FlowFeature feature | feature = Config:: getAFeature ( ) |
@@ -1331,15 +1333,6 @@ module MakeImpl<InputSig Lang> {
1331
1333
fwdFlow1 ( _, _, _, _, _, _, t0 , t , ap , _) and t0 != t
1332
1334
}
1333
1335
1334
- bindingset [ c, t, tail]
1335
- additional Ap apCons ( Content c , Typ t , Ap tail ) {
1336
- result = Param:: apCons ( c , t , tail ) and
1337
- exists ( int limit |
1338
- limit = Config:: accessPathLimit ( ) and
1339
- if tail instanceof ApNil then limit > 0 else limit > 1
1340
- )
1341
- }
1342
-
1343
1336
pragma [ nomagic]
1344
1337
private predicate fwdFlow0 (
1345
1338
NodeEx node , FlowState state , Cc cc , ParamNodeOption summaryCtx , TypOption argT ,
@@ -2534,7 +2527,10 @@ module MakeImpl<InputSig Lang> {
2534
2527
2535
2528
bindingset [ c, t, tail]
2536
2529
Ap apCons ( Content c , Typ t , Ap tail ) {
2537
- result = true and exists ( c ) and exists ( t ) and exists ( tail )
2530
+ result = true and
2531
+ exists ( c ) and
2532
+ exists ( t ) and
2533
+ if tail = true then Config:: accessPathLimit ( ) > 1 else any ( )
2538
2534
}
2539
2535
2540
2536
class ApHeadContent = Unit ;
@@ -3201,10 +3197,7 @@ module MakeImpl<InputSig Lang> {
3201
3197
Typ getTyp ( DataFlowType t ) { result = t }
3202
3198
3203
3199
bindingset [ c, t, tail]
3204
- Ap apCons ( Content c , Typ t , Ap tail ) {
3205
- result .isCons ( c , t , tail ) and
3206
- Config:: accessPathLimit ( ) > tail .len ( )
3207
- }
3200
+ Ap apCons ( Content c , Typ t , Ap tail ) { result .isCons ( c , t , tail ) }
3208
3201
3209
3202
class ApHeadContent = Content ;
3210
3203
@@ -4641,7 +4634,7 @@ module MakeImpl<InputSig Lang> {
4641
4634
4642
4635
private newtype TPartialAccessPath =
4643
4636
TPartialNil ( ) or
4644
- TPartialCons ( Content c , int len ) { len in [ 1 .. accessPathLimit ( ) ] }
4637
+ TPartialCons ( Content c , int len ) { len in [ 1 .. Config :: accessPathLimit ( ) ] }
4645
4638
4646
4639
/**
4647
4640
* Conceptually a list of `Content`s, but only the first
0 commit comments