@@ -370,20 +370,27 @@ module MakeModelGenerator<
370
370
* based on heuristic data flow.
371
371
*/
372
372
module Heuristic {
373
- private module ModelPrintingInput implements Printing:: ModelPrintingSig {
373
+ private module ModelPrintingSummaryInput implements Printing:: ModelPrintingSummarySig {
374
374
class SummaryApi = DataFlowSummaryTargetApi ;
375
375
376
+ string getProvenance ( ) { result = "df-generated" }
377
+ }
378
+
379
+ module ModelPrintingSummary = Printing:: ModelPrintingSummary< ModelPrintingSummaryInput > ;
380
+
381
+ private module ModelPrintingSourceOrSinkInput implements Printing:: ModelPrintingSourceOrSinkSig {
376
382
class SourceOrSinkApi = SourceOrSinkTargetApi ;
377
383
378
384
string getProvenance ( ) { result = "df-generated" }
379
385
}
380
386
381
- module ModelPrinting = Printing:: ModelPrinting< ModelPrintingInput > ;
382
-
383
387
private string getOutput ( ReturnNodeExt node ) {
384
388
result = PrintReturnNodeExt< paramReturnNodeAsOutput / 2 > :: getOutput ( node )
385
389
}
386
390
391
+ private module ModelPrintingSourceOrSink =
392
+ Printing:: ModelPrintingSourceOrSink< ModelPrintingSourceOrSinkInput > ;
393
+
387
394
/**
388
395
* Holds if data can flow from `node1` to `node2` either via a read or a write of an intermediate field `f`.
389
396
*/
@@ -419,7 +426,7 @@ module MakeModelGenerator<
419
426
api = returnNodeEnclosingCallable ( ret ) and
420
427
isOwnInstanceAccessNode ( ret )
421
428
) and
422
- result = ModelPrinting :: asLiftedValueModel ( api , qualifierString ( ) , "ReturnValue" )
429
+ result = ModelPrintingSummary :: asLiftedValueModel ( api , qualifierString ( ) , "ReturnValue" )
423
430
}
424
431
425
432
private int accessPathLimit0 ( ) { result = 2 }
@@ -539,7 +546,7 @@ module MakeModelGenerator<
539
546
input = parameterNodeAsInput ( p ) and
540
547
output = getOutput ( returnNodeExt ) and
541
548
input != output and
542
- result = ModelPrinting :: asLiftedTaintModel ( api , input , output )
549
+ result = ModelPrintingSummary :: asLiftedTaintModel ( api , input , output )
543
550
)
544
551
}
545
552
@@ -572,7 +579,7 @@ module MakeModelGenerator<
572
579
exists ( captureFlow ( api0 ) ) and api0 .lift ( ) = api .lift ( )
573
580
) and
574
581
api .isRelevant ( ) and
575
- result = ModelPrinting :: asNeutralSummaryModel ( api )
582
+ result = ModelPrintingSummary :: asNeutralSummaryModel ( api )
576
583
}
577
584
578
585
/**
@@ -617,7 +624,7 @@ module MakeModelGenerator<
617
624
sourceNode ( source , kind ) and
618
625
api = getEnclosingCallable ( sink ) and
619
626
not irrelevantSourceSinkApi ( getEnclosingCallable ( source ) , api ) and
620
- result = ModelPrinting :: asSourceModel ( api , getOutput ( sink ) , kind )
627
+ result = ModelPrintingSourceOrSink :: asSourceModel ( api , getOutput ( sink ) , kind )
621
628
)
622
629
}
623
630
@@ -663,7 +670,7 @@ module MakeModelGenerator<
663
670
PropagateToSink:: flow ( src , sink ) and
664
671
sinkNode ( sink , kind ) and
665
672
api = getEnclosingCallable ( src ) and
666
- result = ModelPrinting :: asSinkModel ( api , asInputArgument ( src ) , kind )
673
+ result = ModelPrintingSourceOrSink :: asSinkModel ( api , asInputArgument ( src ) , kind )
667
674
)
668
675
}
669
676
}
@@ -703,15 +710,13 @@ module MakeModelGenerator<
703
710
704
711
private module PropagateContentFlow = ContentDataFlow:: Global< PropagateContentFlowConfig > ;
705
712
706
- private module ContentModelPrintingInput implements Printing:: ModelPrintingSig {
713
+ private module ContentModelPrintingInput implements Printing:: ModelPrintingSummarySig {
707
714
class SummaryApi = DataFlowSummaryTargetApi ;
708
715
709
- class SourceOrSinkApi = SourceOrSinkTargetApi ;
710
-
711
716
string getProvenance ( ) { result = "dfc-generated" }
712
717
}
713
718
714
- private module ContentModelPrinting = Printing:: ModelPrinting < ContentModelPrintingInput > ;
719
+ private module ContentModelPrinting = Printing:: ModelPrintingSummary < ContentModelPrintingInput > ;
715
720
716
721
private string getContentOutput ( ReturnNodeExt node ) {
717
722
result = PrintReturnNodeExt< paramReturnNodeAsContentOutput / 2 > :: getOutput ( node )
@@ -1075,6 +1080,6 @@ module MakeModelGenerator<
1075
1080
)
1076
1081
) and
1077
1082
api .isRelevant ( ) and
1078
- result = Heuristic:: ModelPrinting :: asNeutralSummaryModel ( api )
1083
+ result = Heuristic:: ModelPrintingSummary :: asNeutralSummaryModel ( api )
1079
1084
}
1080
1085
}
0 commit comments