@@ -295,10 +295,10 @@ module Make<
295
295
predicate hasExactModel ( ) { none ( ) }
296
296
}
297
297
298
- /** A source node . */
299
- abstract class SourceNode extends SourceBaseFinal {
298
+ /** A source element . */
299
+ abstract class SourceElement extends SourceBaseFinal {
300
300
bindingset [ this ]
301
- SourceNode ( ) { any ( ) }
301
+ SourceElement ( ) { any ( ) }
302
302
303
303
/**
304
304
* Holds if this element is a flow source of kind `kind`, where data
@@ -308,10 +308,10 @@ module Make<
308
308
abstract predicate isSource ( string output , string kind , Provenance provenance , string model ) ;
309
309
}
310
310
311
- /** A sink node . */
312
- abstract class SinkNode extends SinkBaseFinal {
311
+ /** A sink element . */
312
+ abstract class SinkElement extends SinkBaseFinal {
313
313
bindingset [ this ]
314
- SinkNode ( ) { any ( ) }
314
+ SinkElement ( ) { any ( ) }
315
315
316
316
/**
317
317
* Holds if this element is a flow sink of kind `kind`, where data
@@ -537,9 +537,9 @@ module Make<
537
537
c .propagatesFlow ( _, spec , _, _)
538
538
)
539
539
or
540
- any ( SourceNode s ) .isSource ( spec , _, _, _)
540
+ any ( SourceElement s ) .isSource ( spec , _, _, _)
541
541
or
542
- any ( SinkNode s ) .isSink ( spec , _, _, _)
542
+ any ( SinkElement s ) .isSink ( spec , _, _, _)
543
543
}
544
544
545
545
import AccessPathSyntax:: AccessPath< summarySpec / 1 >
@@ -891,7 +891,7 @@ module Make<
891
891
892
892
pragma [ nomagic]
893
893
private predicate sourceOutputStateEntry (
894
- SourceNode source , SummaryComponentStack s , string kind , string model
894
+ SourceElement source , SummaryComponentStack s , string kind , string model
895
895
) {
896
896
exists ( string outSpec |
897
897
source .isSource ( outSpec , kind , _, model ) and
@@ -901,7 +901,7 @@ module Make<
901
901
902
902
pragma [ nomagic]
903
903
private predicate sourceOutputState (
904
- SourceNode source , SummaryComponentStack s , string kind , string model
904
+ SourceElement source , SummaryComponentStack s , string kind , string model
905
905
) {
906
906
sourceOutputStateEntry ( source , s , kind , model )
907
907
or
@@ -914,7 +914,7 @@ module Make<
914
914
915
915
pragma [ nomagic]
916
916
private predicate sinkInputStateExit (
917
- SinkNode sink , SummaryComponentStack s , string kind , string model
917
+ SinkElement sink , SummaryComponentStack s , string kind , string model
918
918
) {
919
919
exists ( string inSpec |
920
920
sink .isSink ( inSpec , kind , _, model ) and
@@ -924,7 +924,7 @@ module Make<
924
924
925
925
pragma [ nomagic]
926
926
private predicate sinkInputState (
927
- SinkNode sink , SummaryComponentStack s , string kind , string model
927
+ SinkElement sink , SummaryComponentStack s , string kind , string model
928
928
) {
929
929
sinkInputStateExit ( sink , s , kind , model )
930
930
or
@@ -978,15 +978,17 @@ module Make<
978
978
/** Holds if this state is a valid output state for `source`. */
979
979
pragma [ nomagic]
980
980
predicate isSourceOutputState (
981
- SourceNode source , SummaryComponentStack s , string kind , string model
981
+ SourceElement source , SummaryComponentStack s , string kind , string model
982
982
) {
983
983
sourceOutputState ( source , s , kind , model ) and
984
984
this = TSourceOutputState ( s )
985
985
}
986
986
987
987
/** Holds if this state is a valid input state for `sink`. */
988
988
pragma [ nomagic]
989
- predicate isSinkInputState ( SinkNode sink , SummaryComponentStack s , string kind , string model ) {
989
+ predicate isSinkInputState (
990
+ SinkElement sink , SummaryComponentStack s , string kind , string model
991
+ ) {
990
992
sinkInputState ( sink , s , kind , model ) and
991
993
this = TSinkInputState ( s )
992
994
}
@@ -1022,10 +1024,10 @@ module Make<
1022
1024
TSummaryParameterNode ( SummarizedCallable c , ParameterPosition pos ) {
1023
1025
summaryParameterNodeRange ( c , pos )
1024
1026
} or
1025
- TSourceOutputNode ( SourceNode source , SummaryNodeState state , string kind , string model ) {
1027
+ TSourceOutputNode ( SourceElement source , SummaryNodeState state , string kind , string model ) {
1026
1028
state .isSourceOutputState ( source , _, kind , model )
1027
1029
} or
1028
- TSinkInputNode ( SinkNode sink , SummaryNodeState state , string kind , string model ) {
1030
+ TSinkInputNode ( SinkElement sink , SummaryNodeState state , string kind , string model ) {
1029
1031
state .isSinkInputState ( sink , _, kind , model )
1030
1032
}
1031
1033
@@ -1034,9 +1036,9 @@ module Make<
1034
1036
1035
1037
abstract SummarizedCallable getSummarizedCallable ( ) ;
1036
1038
1037
- abstract SourceNode getSourceNode ( ) ;
1039
+ abstract SourceElement getSourceElement ( ) ;
1038
1040
1039
- abstract SinkNode getSinkNode ( ) ;
1041
+ abstract SinkElement getSinkElement ( ) ;
1040
1042
1041
1043
predicate isHidden ( ) { any ( ) }
1042
1044
}
@@ -1051,9 +1053,9 @@ module Make<
1051
1053
1052
1054
override SummarizedCallable getSummarizedCallable ( ) { result = c }
1053
1055
1054
- override SourceNode getSourceNode ( ) { none ( ) }
1056
+ override SourceElement getSourceElement ( ) { none ( ) }
1055
1057
1056
- override SinkNode getSinkNode ( ) { none ( ) }
1058
+ override SinkElement getSinkElement ( ) { none ( ) }
1057
1059
}
1058
1060
1059
1061
private class SummaryParamNode extends SummaryNode , TSummaryParameterNode {
@@ -1066,13 +1068,13 @@ module Make<
1066
1068
1067
1069
override SummarizedCallable getSummarizedCallable ( ) { result = c }
1068
1070
1069
- override SourceNode getSourceNode ( ) { none ( ) }
1071
+ override SourceElement getSourceElement ( ) { none ( ) }
1070
1072
1071
- override SinkNode getSinkNode ( ) { none ( ) }
1073
+ override SinkElement getSinkElement ( ) { none ( ) }
1072
1074
}
1073
1075
1074
1076
class SourceOutputNode extends SummaryNode , TSourceOutputNode {
1075
- private SourceNode source_ ;
1077
+ private SourceElement source_ ;
1076
1078
private SummaryNodeState state_ ;
1077
1079
private string kind_ ;
1078
1080
private string model_ ;
@@ -1097,7 +1099,7 @@ module Make<
1097
1099
* A local flow step should be added from this node to a data flow node representing
1098
1100
* `sc` inside `source`.
1099
1101
*/
1100
- predicate isExit ( SourceNode source , SummaryComponent sc , string model ) {
1102
+ predicate isExit ( SourceElement source , SummaryComponent sc , string model ) {
1101
1103
source = source_ and
1102
1104
model = model_ and
1103
1105
state_ .isSourceOutputState ( source , TSingletonSummaryComponentStack ( sc ) , _, model )
@@ -1113,13 +1115,13 @@ module Make<
1113
1115
1114
1116
override SummarizedCallable getSummarizedCallable ( ) { none ( ) }
1115
1117
1116
- override SourceNode getSourceNode ( ) { result = source_ }
1118
+ override SourceElement getSourceElement ( ) { result = source_ }
1117
1119
1118
- override SinkNode getSinkNode ( ) { none ( ) }
1120
+ override SinkElement getSinkElement ( ) { none ( ) }
1119
1121
}
1120
1122
1121
1123
class SinkInputNode extends SummaryNode , TSinkInputNode {
1122
- private SinkNode sink_ ;
1124
+ private SinkElement sink_ ;
1123
1125
private SummaryNodeState state_ ;
1124
1126
private string kind_ ;
1125
1127
private string model_ ;
@@ -1132,7 +1134,7 @@ module Make<
1132
1134
* A local flow step should be added to this node from a data flow node representing
1133
1135
* `sc` inside `sink`.
1134
1136
*/
1135
- predicate isEntry ( SinkNode sink , SummaryComponent sc , string model ) {
1137
+ predicate isEntry ( SinkElement sink , SummaryComponent sc , string model ) {
1136
1138
sink = sink_ and
1137
1139
model = model_ and
1138
1140
state_ .isSinkInputState ( sink , TSingletonSummaryComponentStack ( sc ) , _, model )
@@ -1161,9 +1163,9 @@ module Make<
1161
1163
1162
1164
override SummarizedCallable getSummarizedCallable ( ) { none ( ) }
1163
1165
1164
- override SourceNode getSourceNode ( ) { none ( ) }
1166
+ override SourceElement getSourceElement ( ) { none ( ) }
1165
1167
1166
- override SinkNode getSinkNode ( ) { result = sink_ }
1168
+ override SinkElement getSinkElement ( ) { result = sink_ }
1167
1169
}
1168
1170
1169
1171
/**
@@ -1209,15 +1211,15 @@ module Make<
1209
1211
}
1210
1212
1211
1213
pragma [ noinline]
1212
- private SummaryNode sourceNodeOutputState ( SourceNode source , SummaryComponentStack s ) {
1214
+ private SummaryNode sourceElementOutputState ( SourceElement source , SummaryComponentStack s ) {
1213
1215
exists ( SummaryNodeState state , string kind , string model |
1214
1216
state .isSourceOutputState ( source , s , kind , model ) and
1215
1217
result = TSourceOutputNode ( source , state , kind , model )
1216
1218
)
1217
1219
}
1218
1220
1219
1221
pragma [ noinline]
1220
- private SummaryNode sinkNodeInputState ( SinkNode sink , SummaryComponentStack s ) {
1222
+ private SummaryNode sinkElementInputState ( SinkElement sink , SummaryComponentStack s ) {
1221
1223
exists ( SummaryNodeState state , string kind , string model |
1222
1224
state .isSinkInputState ( sink , s , kind , model ) and
1223
1225
result = TSinkInputNode ( sink , state , kind , model )
@@ -1348,9 +1350,9 @@ module Make<
1348
1350
1349
1351
DataFlowType getSyntheticGlobalType ( SyntheticGlobal sg ) ;
1350
1352
1351
- DataFlowType getSourceNodeType ( SourceBase source , SummaryComponent sc ) ;
1353
+ DataFlowType getSourceType ( SourceBase source , SummaryComponent sc ) ;
1352
1354
1353
- DataFlowType getSinkNodeType ( SinkBase sink , SummaryComponent sc ) ;
1355
+ DataFlowType getSinkType ( SinkBase sink , SummaryComponent sc ) ;
1354
1356
}
1355
1357
1356
1358
/**
@@ -1430,27 +1432,27 @@ module Make<
1430
1432
)
1431
1433
)
1432
1434
or
1433
- exists ( SourceNode source |
1435
+ exists ( SourceElement source |
1434
1436
exists ( SummaryComponent sc |
1435
1437
n .( SourceOutputNode ) .isExit ( source , sc , _) and
1436
- result = getSourceNodeType ( source , sc )
1438
+ result = getSourceType ( source , sc )
1437
1439
)
1438
1440
or
1439
1441
exists ( SummaryComponentStack s , ContentSet cont |
1440
- n = sourceNodeOutputState ( source , s ) and
1442
+ n = sourceElementOutputState ( source , s ) and
1441
1443
s .head ( ) = TContentSummaryComponent ( cont ) and
1442
1444
result = getContentType ( cont )
1443
1445
)
1444
1446
)
1445
1447
or
1446
- exists ( SinkNode sink |
1448
+ exists ( SinkElement sink |
1447
1449
exists ( SummaryComponent sc |
1448
1450
n .( SinkInputNode ) .isEntry ( sink , sc , _) and
1449
- result = getSinkNodeType ( sink , sc )
1451
+ result = getSinkType ( sink , sc )
1450
1452
)
1451
1453
or
1452
1454
exists ( SummaryComponentStack s , ContentSet cont |
1453
- n = sinkNodeInputState ( sink , s ) and
1455
+ n = sinkElementInputState ( sink , s ) and
1454
1456
s .head ( ) = TContentSummaryComponent ( cont ) and
1455
1457
result = getContentType ( cont )
1456
1458
)
@@ -1511,14 +1513,14 @@ module Make<
1511
1513
}
1512
1514
1513
1515
predicate sourceLocalStep ( SourceOutputNode nodeFrom , Node nodeTo , string model ) {
1514
- exists ( SummaryComponent sc , SourceNode source |
1516
+ exists ( SummaryComponent sc , SourceElement source |
1515
1517
nodeFrom .isExit ( source , sc , model ) and
1516
1518
nodeTo = StepsInput:: getSourceNode ( source , sc )
1517
1519
)
1518
1520
}
1519
1521
1520
1522
predicate sinkLocalStep ( Node nodeFrom , SinkInputNode nodeTo , string model ) {
1521
- exists ( SummaryComponent sc , SinkNode sink |
1523
+ exists ( SummaryComponent sc , SinkElement sink |
1522
1524
nodeFrom = StepsInput:: getSinkNode ( sink , sc ) and
1523
1525
nodeTo .isEntry ( sink , sc , model )
1524
1526
)
@@ -1540,9 +1542,9 @@ module Make<
1540
1542
SummaryComponent:: content ( c ) = s .head ( )
1541
1543
)
1542
1544
or
1543
- exists ( SinkNode sink , SummaryComponentStack s |
1544
- pred = sinkNodeInputState ( sink , s .tail ( ) ) and
1545
- succ = sinkNodeInputState ( sink , s ) and
1545
+ exists ( SinkElement sink , SummaryComponentStack s |
1546
+ pred = sinkElementInputState ( sink , s .tail ( ) ) and
1547
+ succ = sinkElementInputState ( sink , s ) and
1546
1548
SummaryComponent:: content ( c ) = s .head ( )
1547
1549
)
1548
1550
}
@@ -1558,9 +1560,9 @@ module Make<
1558
1560
SummaryComponent:: content ( c ) = s .head ( )
1559
1561
)
1560
1562
or
1561
- exists ( SourceNode source , SummaryComponentStack s |
1562
- pred = sourceNodeOutputState ( source , s ) and
1563
- succ = sourceNodeOutputState ( source , s .tail ( ) ) and
1563
+ exists ( SourceElement source , SummaryComponentStack s |
1564
+ pred = sourceElementOutputState ( source , s ) and
1565
+ succ = sourceElementOutputState ( source , s .tail ( ) ) and
1564
1566
SummaryComponent:: content ( c ) = s .head ( )
1565
1567
)
1566
1568
}
0 commit comments