Skip to content

Commit 504e614

Browse files
committed
Change from package to endpoint.
1 parent 0c11668 commit 504e614

3 files changed

Lines changed: 12 additions & 15 deletions

File tree

java/ql/src/Telemetry/AutomodelApplicationModeExtractCandidates.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ where
6666
// modeled in a MaD model, then it doesn't belong to any additional sink types, and we don't need to reexamine it.
6767
not CharacteristicsImpl::isSink(endpoint, _, _) and
6868
meta.hasMetadata(endpoint, package, type, subtypes, name, signature, input) and
69-
automodelCandidateFilter(package) and
69+
includeAutomodelCandidate(package, type, name, signature) and
7070
// The message is the concatenation of all sink types for which this endpoint is known neither to be a sink nor to be
7171
// a non-sink, and we surface only endpoints that have at least one such sink type.
7272
message =

java/ql/src/Telemetry/AutomodelFrameworkModeExtractCandidates.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ where
3030
// modeled in a MaD model, then it doesn't belong to any additional sink types, and we don't need to reexamine it.
3131
not CharacteristicsImpl::isSink(endpoint, _, _) and
3232
meta.hasMetadata(endpoint, package, type, subtypes, name, signature, input, parameterName) and
33-
automodelCandidateFilter(package) and
33+
includeAutomodelCandidate(package, type, name, signature) and
3434
// The message is the concatenation of all sink types for which this endpoint is known neither to be a sink nor to be
3535
// a non-sink, and we surface only endpoints that have at least one such sink type.
3636
message =

java/ql/src/Telemetry/AutomodelJavaUtil.qll

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -68,20 +68,17 @@ boolean considerSubtypes(Callable callable) {
6868
}
6969

7070
/**
71-
* Holds if the given package is a candidate for automodeling.
72-
*
73-
* This predicate is extensible, so that different packages can be selected at runtime.
74-
*/
75-
extensible predicate automodelCandidatePackageFilter(string package);
76-
77-
/**
78-
* Holds if the given package is a candidate for automodeling.
71+
* Holds if the given package, type, name and signature is a candidate for automodeling.
7972
*
8073
* This relies on an extensible predicate, and if that is not supplied then
81-
* all packages are considered candidates.
74+
* all endpoints are considered candidates.
8275
*/
83-
bindingset[package]
84-
predicate automodelCandidateFilter(string package) {
85-
not automodelCandidatePackageFilter(_) or
86-
automodelCandidatePackageFilter(package)
76+
extensible predicate automodelCandidateFilter(
77+
string package, string type, string name, string signature
78+
);
79+
80+
bindingset[package, type, name, signature]
81+
predicate includeAutomodelCandidate(string package, string type, string name, string signature) {
82+
not automodelCandidateFilter(_, _, _, _) or
83+
automodelCandidateFilter(package, type, name, signature)
8784
}

0 commit comments

Comments
 (0)