Skip to content

Commit 4ca67ec

Browse files
committed
Java: Cleanup experimental query related framework code.
1 parent 4159620 commit 4ca67ec

File tree

3 files changed

+6
-252
lines changed

3 files changed

+6
-252
lines changed

java/ql/lib/semmle/code/java/dataflow/ExternalFlow.qll

+6-92
Original file line numberDiff line numberDiff line change
@@ -98,94 +98,14 @@ private import internal.FlowSummaryImpl::Private::External
9898
private import internal.ExternalFlowExtensions as Extensions
9999
private import codeql.mad.ModelValidation as SharedModelVal
100100

101-
/**
102-
* A class for activating additional model rows.
103-
*
104-
* Extend this class to include experimental model rows with `this` name
105-
* in data flow analysis.
106-
*/
107-
abstract private class ActiveExperimentalModelsInternal extends string {
108-
bindingset[this]
109-
ActiveExperimentalModelsInternal() { any() }
110-
111-
/**
112-
* Holds if an experimental source model exists for the given parameters.
113-
*/
114-
predicate sourceModel(
115-
string package, string type, boolean subtypes, string name, string signature, string ext,
116-
string output, string kind, string provenance, QlBuiltins::ExtensionId madId
117-
) {
118-
Extensions::experimentalSourceModel(package, type, subtypes, name, signature, ext, output, kind,
119-
provenance, this, madId)
120-
}
121-
122-
/**
123-
* Holds if an experimental sink model exists for the given parameters.
124-
*/
125-
predicate sinkModel(
126-
string package, string type, boolean subtypes, string name, string signature, string ext,
127-
string input, string kind, string provenance, QlBuiltins::ExtensionId madId
128-
) {
129-
Extensions::experimentalSinkModel(package, type, subtypes, name, signature, ext, input, kind,
130-
provenance, this, madId)
131-
}
132-
133-
/**
134-
* Holds if an experimental summary model exists for the given parameters.
135-
*/
136-
predicate summaryModel(
137-
string package, string type, boolean subtypes, string name, string signature, string ext,
138-
string input, string output, string kind, string provenance, QlBuiltins::ExtensionId madId
139-
) {
140-
Extensions::experimentalSummaryModel(package, type, subtypes, name, signature, ext, input,
141-
output, kind, provenance, this, madId)
142-
}
143-
}
144-
145-
deprecated class ActiveExperimentalModels = ActiveExperimentalModelsInternal;
146-
147101
/** Holds if a source model exists for the given parameters. */
148-
predicate sourceModel(
149-
string package, string type, boolean subtypes, string name, string signature, string ext,
150-
string output, string kind, string provenance, QlBuiltins::ExtensionId madId
151-
) {
152-
(
153-
Extensions::sourceModel(package, type, subtypes, name, signature, ext, output, kind, provenance,
154-
madId)
155-
or
156-
any(ActiveExperimentalModelsInternal q)
157-
.sourceModel(package, type, subtypes, name, signature, ext, output, kind, provenance, madId)
158-
)
159-
}
102+
predicate sourceModel = Extensions::sourceModel/10;
160103

161104
/** Holds if a sink model exists for the given parameters. */
162-
predicate sinkModel(
163-
string package, string type, boolean subtypes, string name, string signature, string ext,
164-
string input, string kind, string provenance, QlBuiltins::ExtensionId madId
165-
) {
166-
(
167-
Extensions::sinkModel(package, type, subtypes, name, signature, ext, input, kind, provenance,
168-
madId)
169-
or
170-
any(ActiveExperimentalModelsInternal q)
171-
.sinkModel(package, type, subtypes, name, signature, ext, input, kind, provenance, madId)
172-
)
173-
}
105+
predicate sinkModel = Extensions::sinkModel/10;
174106

175107
/** Holds if a summary model exists for the given parameters. */
176-
predicate summaryModel(
177-
string package, string type, boolean subtypes, string name, string signature, string ext,
178-
string input, string output, string kind, string provenance, QlBuiltins::ExtensionId madId
179-
) {
180-
(
181-
Extensions::summaryModel(package, type, subtypes, name, signature, ext, input, output, kind,
182-
provenance, madId)
183-
or
184-
any(ActiveExperimentalModelsInternal q)
185-
.summaryModel(package, type, subtypes, name, signature, ext, input, output, kind,
186-
provenance, madId)
187-
)
188-
}
108+
predicate summaryModel = Extensions::summaryModel/11;
189109

190110
/**
191111
* Holds if the given extension tuple `madId` should pretty-print as `model`.
@@ -197,9 +117,7 @@ predicate interpretModelForTest(QlBuiltins::ExtensionId madId, string model) {
197117
string package, string type, boolean subtypes, string name, string signature, string ext,
198118
string output, string kind, string provenance
199119
|
200-
sourceModel(package, type, subtypes, name, signature, ext, output, kind, provenance, madId) or
201-
Extensions::experimentalSourceModel(package, type, subtypes, name, signature, ext, output, kind,
202-
provenance, _, madId)
120+
sourceModel(package, type, subtypes, name, signature, ext, output, kind, provenance, madId)
203121
|
204122
model =
205123
"Source: " + package + "; " + type + "; " + subtypes + "; " + name + "; " + signature + "; " +
@@ -210,9 +128,7 @@ predicate interpretModelForTest(QlBuiltins::ExtensionId madId, string model) {
210128
string package, string type, boolean subtypes, string name, string signature, string ext,
211129
string input, string kind, string provenance
212130
|
213-
sinkModel(package, type, subtypes, name, signature, ext, input, kind, provenance, madId) or
214-
Extensions::experimentalSinkModel(package, type, subtypes, name, signature, ext, input, kind,
215-
provenance, _, madId)
131+
sinkModel(package, type, subtypes, name, signature, ext, input, kind, provenance, madId)
216132
|
217133
model =
218134
"Sink: " + package + "; " + type + "; " + subtypes + "; " + name + "; " + signature + "; " +
@@ -224,9 +140,7 @@ predicate interpretModelForTest(QlBuiltins::ExtensionId madId, string model) {
224140
string input, string output, string kind, string provenance
225141
|
226142
summaryModel(package, type, subtypes, name, signature, ext, input, output, kind, provenance,
227-
madId) or
228-
Extensions::experimentalSummaryModel(package, type, subtypes, name, signature, ext, input,
229-
output, kind, provenance, _, madId)
143+
madId)
230144
|
231145
model =
232146
"Summary: " + package + "; " + type + "; " + subtypes + "; " + name + "; " + signature + "; " +

java/ql/lib/semmle/code/java/dataflow/internal/ExternalFlowExtensions.qll

-43
Original file line numberDiff line numberDiff line change
@@ -32,46 +32,3 @@ extensible predicate summaryModel(
3232
extensible predicate neutralModel(
3333
string package, string type, string name, string signature, string kind, string provenance
3434
);
35-
36-
/**
37-
* INTERNAL: Do not use.
38-
*
39-
* DEPRECATED: This predicate is only intended for adding models used by experimental queries.
40-
* This predicate will be deleted in the future.
41-
*
42-
* Holds if an experimental source model exists for the given parameters.
43-
* This is only for experimental queries.
44-
*/
45-
extensible predicate experimentalSourceModel(
46-
string package, string type, boolean subtypes, string name, string signature, string ext,
47-
string output, string kind, string provenance, string filter, QlBuiltins::ExtensionId madId
48-
);
49-
50-
/**
51-
* INTERNAL: Do not use.
52-
*
53-
* DEPRECATED: This predicate is only intended for adding models used by experimental queries.
54-
* This predicate will be deleted in the future.
55-
*
56-
* Holds if an experimental sink model exists for the given parameters.
57-
* This is only for experimental queries.
58-
*/
59-
extensible predicate experimentalSinkModel(
60-
string package, string type, boolean subtypes, string name, string signature, string ext,
61-
string input, string kind, string provenance, string filter, QlBuiltins::ExtensionId madId
62-
);
63-
64-
/**
65-
* INTERNAL: Do not use.
66-
*
67-
* DEPRECATED: This predicate is only intended for adding models used by experimental queries.
68-
* This predicate will be deleted in the future.
69-
*
70-
* Holds if an experimental summary model exists for the given parameters.
71-
* This is only for experimental queries.
72-
*/
73-
extensible predicate experimentalSummaryModel(
74-
string package, string type, boolean subtypes, string name, string signature, string ext,
75-
string input, string output, string kind, string provenance, string filter,
76-
QlBuiltins::ExtensionId madId
77-
);

java/ql/src/semmle/code/xml/MyBatisMapperXML.qll

-117
This file was deleted.

0 commit comments

Comments
 (0)