@@ -66,13 +66,6 @@ DataFlowType getSyntheticGlobalType(SummaryComponent::SyntheticGlobal sg) {
66
66
result instanceof TypeObject
67
67
}
68
68
69
- bindingset [ provenance]
70
- private boolean isGenerated ( string provenance ) {
71
- provenance = "generated" and result = true
72
- or
73
- provenance != "generated" and result = false
74
- }
75
-
76
69
private predicate relatedArgSpec ( Callable c , string spec ) {
77
70
exists (
78
71
string namespace , string type , boolean subtypes , string name , string signature , string ext
@@ -138,19 +131,17 @@ private predicate correspondingKotlinParameterDefaultsArgSpec(
138
131
139
132
/**
140
133
* Holds if an external flow summary exists for `c` with input specification
141
- * `input`, output specification `output`, kind `kind`, and a flag `generated`
142
- * stating whether the summary is autogenerated.
134
+ * `input`, output specification `output`, kind `kind`, and provenance `provenance`.
143
135
*/
144
136
predicate summaryElement (
145
- SummarizedCallableBase c , string input , string output , string kind , boolean generated
137
+ SummarizedCallableBase c , string input , string output , string kind , string provenance
146
138
) {
147
139
exists (
148
140
string namespace , string type , boolean subtypes , string name , string signature , string ext ,
149
- string provenance , string originalInput , string originalOutput , Callable baseCallable
141
+ string originalInput , string originalOutput , Callable baseCallable
150
142
|
151
143
summaryModel ( namespace , type , subtypes , name , signature , ext , originalInput , originalOutput ,
152
144
kind , provenance ) and
153
- generated = isGenerated ( provenance ) and
154
145
baseCallable = interpretElement ( namespace , type , subtypes , name , signature , ext ) and
155
146
(
156
147
c .asCallable ( ) = baseCallable and input = originalInput and output = originalOutput
@@ -163,13 +154,12 @@ predicate summaryElement(
163
154
}
164
155
165
156
/**
166
- * Holds if a neutral model exists for `c`, which means that there is no
167
- * flow through `c`. The flag `generated` states whether the model is autogenerated .
157
+ * Holds if a neutral model exists for `c` with provenance `provenance`,
158
+ * which means that there is no flow through `c` .
168
159
*/
169
- predicate neutralElement ( SummarizedCallableBase c , boolean generated ) {
170
- exists ( string namespace , string type , string name , string signature , string provenance |
160
+ predicate neutralElement ( SummarizedCallableBase c , string provenance ) {
161
+ exists ( string namespace , string type , string name , string signature |
171
162
neutralModel ( namespace , type , name , signature , provenance ) and
172
- generated = isGenerated ( provenance ) and
173
163
c .asCallable ( ) = interpretElement ( namespace , type , false , name , signature , "" )
174
164
)
175
165
}
@@ -222,16 +212,14 @@ class SourceOrSinkElement = Top;
222
212
223
213
/**
224
214
* Holds if an external source specification exists for `e` with output specification
225
- * `output`, kind `kind`, and a flag `generated` stating whether the source specification is
226
- * autogenerated.
215
+ * `output`, kind `kind`, and provenance `provenance`.
227
216
*/
228
- predicate sourceElement ( SourceOrSinkElement e , string output , string kind , boolean generated ) {
217
+ predicate sourceElement ( SourceOrSinkElement e , string output , string kind , string provenance ) {
229
218
exists (
230
219
string namespace , string type , boolean subtypes , string name , string signature , string ext ,
231
- string provenance , SourceOrSinkElement baseSource , string originalOutput
220
+ SourceOrSinkElement baseSource , string originalOutput
232
221
|
233
222
sourceModel ( namespace , type , subtypes , name , signature , ext , originalOutput , kind , provenance ) and
234
- generated = isGenerated ( provenance ) and
235
223
baseSource = interpretElement ( namespace , type , subtypes , name , signature , ext ) and
236
224
(
237
225
e = baseSource and output = originalOutput
@@ -243,16 +231,14 @@ predicate sourceElement(SourceOrSinkElement e, string output, string kind, boole
243
231
244
232
/**
245
233
* Holds if an external sink specification exists for `e` with input specification
246
- * `input`, kind `kind` and a flag `generated` stating whether the sink specification is
247
- * autogenerated.
234
+ * `input`, kind `kind` and provenance `provenance`.
248
235
*/
249
- predicate sinkElement ( SourceOrSinkElement e , string input , string kind , boolean generated ) {
236
+ predicate sinkElement ( SourceOrSinkElement e , string input , string kind , string provenance ) {
250
237
exists (
251
238
string namespace , string type , boolean subtypes , string name , string signature , string ext ,
252
- string provenance , SourceOrSinkElement baseSink , string originalInput
239
+ SourceOrSinkElement baseSink , string originalInput
253
240
|
254
241
sinkModel ( namespace , type , subtypes , name , signature , ext , originalInput , kind , provenance ) and
255
- generated = isGenerated ( provenance ) and
256
242
baseSink = interpretElement ( namespace , type , subtypes , name , signature , ext ) and
257
243
(
258
244
e = baseSink and originalInput = input
0 commit comments