@@ -1020,21 +1020,21 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
1020
1020
1021
1021
private predicate sinkNode = Stage1:: sinkNode / 2 ;
1022
1022
1023
- private predicate sourceLabel ( NodeEx node , string label ) {
1023
+ private predicate sourceModel ( NodeEx node , string model ) {
1024
1024
sourceNode ( node , _) and
1025
1025
exists ( Node n | n = node .asNode ( ) |
1026
- exists ( string model | knownSourceModel ( n , model ) and label = model )
1026
+ knownSourceModel ( n , model )
1027
1027
or
1028
- not knownSourceModel ( n , _) and label = ""
1028
+ not knownSourceModel ( n , _) and model = ""
1029
1029
)
1030
1030
}
1031
1031
1032
- private predicate sinkLabel ( NodeEx node , string label ) {
1032
+ private predicate sinkModel ( NodeEx node , string model ) {
1033
1033
sinkNode ( node , _) and
1034
1034
exists ( Node n | n = node .asNode ( ) |
1035
- exists ( string model | knownSinkModel ( n , model ) and label = model )
1035
+ knownSinkModel ( n , model )
1036
1036
or
1037
- not knownSinkModel ( n , _) and label = ""
1037
+ not knownSinkModel ( n , _) and model = ""
1038
1038
)
1039
1039
}
1040
1040
@@ -1048,21 +1048,15 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
1048
1048
}
1049
1049
1050
1050
pragma [ noinline]
1051
- private predicate localFlowStepNodeCand1 ( NodeEx node1 , NodeEx node2 , string label ) {
1052
- exists ( string model |
1053
- Stage1:: revFlow ( node2 ) and
1054
- localFlowStepEx ( node1 , node2 , model ) and
1055
- label = model
1056
- )
1051
+ private predicate localFlowStepNodeCand1 ( NodeEx node1 , NodeEx node2 , string model ) {
1052
+ Stage1:: revFlow ( node2 ) and
1053
+ localFlowStepEx ( node1 , node2 , model )
1057
1054
}
1058
1055
1059
1056
pragma [ noinline]
1060
- private predicate additionalLocalFlowStepNodeCand1 ( NodeEx node1 , NodeEx node2 , string label ) {
1061
- exists ( string model |
1062
- Stage1:: revFlow ( node2 ) and
1063
- additionalLocalFlowStep ( node1 , node2 , model ) and
1064
- label = model
1065
- )
1057
+ private predicate additionalLocalFlowStepNodeCand1 ( NodeEx node1 , NodeEx node2 , string model ) {
1058
+ Stage1:: revFlow ( node2 ) and
1059
+ additionalLocalFlowStep ( node1 , node2 , model )
1066
1060
}
1067
1061
1068
1062
pragma [ nomagic]
@@ -3495,7 +3489,7 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
3495
3489
sc instanceof SummaryCtxNone and
3496
3490
t = node .getDataFlowType ( ) and
3497
3491
ap = TAccessPathNil ( ) and
3498
- summaryLabel = ""
3492
+ summaryLabel = "- "
3499
3493
or
3500
3494
// ... or a step from an existing PathNode to another node.
3501
3495
pathStep ( _, node , state , cc , sc , t , ap , summaryLabel , _)
@@ -3685,7 +3679,7 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
3685
3679
abstract FlowState getState ( ) ;
3686
3680
3687
3681
/** Holds if this node is a source. */
3688
- abstract predicate isSource ( string label ) ;
3682
+ abstract predicate isSource ( string model ) ;
3689
3683
3690
3684
abstract PathNodeImpl getASuccessorImpl ( string label ) ;
3691
3685
@@ -3858,11 +3852,8 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
3858
3852
module PathGraph implements PathGraphSig< PathNode > {
3859
3853
/** Holds if `(a,b)` is an edge in the graph of data flow path explanations. */
3860
3854
query predicate edges ( PathNode a , PathNode b , string key , string val ) {
3861
- exists ( string label |
3862
- a .( PathNodeImpl ) .getANonHiddenSuccessor ( label ) = b and
3863
- key = "provenance" and
3864
- val = label
3865
- )
3855
+ a .( PathNodeImpl ) .getANonHiddenSuccessor ( val ) = b and
3856
+ key = "provenance"
3866
3857
}
3867
3858
3868
3859
/** Holds if `n` is a node in the graph of data flow path explanations. */
@@ -3918,10 +3909,10 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
3918
3909
}
3919
3910
3920
3911
private predicate isSourceWithLabel ( string labelprefix ) {
3921
- exists ( string label |
3922
- this .isSource ( label ) and
3923
- label != "" and
3924
- labelprefix = "Src:" + label + " "
3912
+ exists ( string model |
3913
+ this .isSource ( model ) and
3914
+ model != "" and
3915
+ labelprefix = "Src:" + model + " "
3925
3916
)
3926
3917
}
3927
3918
@@ -3937,29 +3928,29 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
3937
3928
)
3938
3929
or
3939
3930
// a final step to a sink
3940
- exists ( string l2 , string l3 | result = this .getSuccMid ( l2 ) .projectToSink ( l3 ) |
3931
+ exists ( string l2 , string sinkmodel | result = this .getSuccMid ( l2 ) .projectToSink ( sinkmodel ) |
3941
3932
not this .isSourceWithLabel ( _) and
3942
- if l3 != "" then label = l2 + " Sink:" + l3 else label = l2
3933
+ if sinkmodel != "" then label = l2 + " Sink:" + sinkmodel else label = l2
3943
3934
or
3944
3935
exists ( string l1 |
3945
3936
this .isSourceWithLabel ( l1 ) and
3946
- if l3 != "" then label = l1 + l2 + " Sink:" + l3 else label = l1 + l2
3937
+ if sinkmodel != "" then label = l1 + l2 + " Sink:" + sinkmodel else label = l1 + l2
3947
3938
)
3948
3939
)
3949
3940
}
3950
3941
3951
- override predicate isSource ( string label ) {
3942
+ override predicate isSource ( string model ) {
3952
3943
sourceNode ( node , state ) and
3953
- sourceLabel ( node , label ) and
3944
+ sourceModel ( node , model ) and
3954
3945
sourceCallCtx ( cc ) and
3955
3946
sc instanceof SummaryCtxNone and
3956
3947
t = node .getDataFlowType ( ) and
3957
3948
ap = TAccessPathNil ( )
3958
3949
}
3959
3950
3960
- predicate isAtSink ( string label ) {
3951
+ predicate isAtSink ( string model ) {
3961
3952
sinkNode ( node , state ) and
3962
- sinkLabel ( node , label ) and
3953
+ sinkModel ( node , model ) and
3963
3954
ap instanceof AccessPathNil and
3964
3955
if hasSinkCallCtx ( )
3965
3956
then
@@ -3978,8 +3969,8 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
3978
3969
else any ( )
3979
3970
}
3980
3971
3981
- PathNodeSink projectToSink ( string label ) {
3982
- this .isAtSink ( label ) and
3972
+ PathNodeSink projectToSink ( string model ) {
3973
+ this .isAtSink ( model ) and
3983
3974
result .getNodeEx ( ) = node and
3984
3975
result .getState ( ) = state
3985
3976
}
@@ -4004,8 +3995,8 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
4004
3995
result = TPathNodeSinkGroup ( this .getSinkGroup ( ) ) and label = ""
4005
3996
}
4006
3997
4007
- override predicate isSource ( string label ) {
4008
- sourceNode ( node , state ) and sourceLabel ( node , label )
3998
+ override predicate isSource ( string model ) {
3999
+ sourceNode ( node , state ) and sourceModel ( node , model )
4009
4000
}
4010
4001
4011
4002
string getSinkGroup ( ) { Config:: sinkGrouping ( node .asNode ( ) , result ) }
@@ -4024,7 +4015,7 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
4024
4015
result .getSourceGroup ( ) = sourceGroup and label = ""
4025
4016
}
4026
4017
4027
- override predicate isSource ( string label ) { none ( ) }
4018
+ override predicate isSource ( string model ) { none ( ) }
4028
4019
4029
4020
override string toString ( ) { result = sourceGroup }
4030
4021
@@ -4042,7 +4033,7 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
4042
4033
4043
4034
override PathNodeImpl getASuccessorImpl ( string label ) { none ( ) }
4044
4035
4045
- override predicate isSource ( string label ) { none ( ) }
4036
+ override predicate isSource ( string model ) { none ( ) }
4046
4037
4047
4038
override string toString ( ) { result = sinkGroup }
4048
4039
@@ -4110,7 +4101,7 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
4110
4101
t = mid .getType ( ) and
4111
4102
ap = mid .getAp ( ) and
4112
4103
isStoreStep = false and
4113
- summaryLabel = "" and
4104
+ summaryLabel = "- " and
4114
4105
label = ""
4115
4106
or
4116
4107
additionalJumpStep ( mid .getNodeExOutgoing ( ) , node , label ) and
@@ -4121,7 +4112,7 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
4121
4112
t = node .getDataFlowType ( ) and
4122
4113
ap = TAccessPathNil ( ) and
4123
4114
isStoreStep = false and
4124
- summaryLabel = ""
4115
+ summaryLabel = "- "
4125
4116
or
4126
4117
additionalJumpStateStep ( mid .getNodeExOutgoing ( ) , mid .getState ( ) , node , state ) and
4127
4118
cc instanceof CallContextAny and
@@ -4130,7 +4121,7 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
4130
4121
t = node .getDataFlowType ( ) and
4131
4122
ap = TAccessPathNil ( ) and
4132
4123
isStoreStep = false and
4133
- summaryLabel = "" and
4124
+ summaryLabel = "- " and
4134
4125
label = ""
4135
4126
or
4136
4127
exists ( Content c , DataFlowType t0 , AccessPath ap0 |
@@ -4155,15 +4146,15 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
4155
4146
t = mid .getType ( ) and
4156
4147
ap = mid .getAp ( ) and
4157
4148
isStoreStep = false and
4158
- summaryLabel = "" and
4149
+ ( if sc instanceof SummaryCtxNone then summaryLabel = "-" else summaryLabel = "" ) and
4159
4150
label = ""
4160
4151
or
4161
4152
pathOutOfCallable ( mid , node , state , cc ) and
4162
4153
t = mid .getType ( ) and
4163
4154
ap = mid .getAp ( ) and
4164
4155
sc instanceof SummaryCtxNone and
4165
4156
isStoreStep = false and
4166
- summaryLabel = "" and
4157
+ summaryLabel = "- " and
4167
4158
label = ""
4168
4159
or
4169
4160
pathThroughCallable ( mid , node , state , cc , t , ap , label ) and
0 commit comments