Change from package to endpoint.

This commit is contained in:
Anders Starcke Henriksen 2023-08-01 10:15:22 +02:00
Родитель 9b8d7df370
Коммит 1c425a5602
3 изменённых файлов: 13 добавлений и 11 удалений

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

@ -68,20 +68,22 @@ boolean considerSubtypes(Callable callable) {
} }
/** /**
* Holds if the given package is a candidate for automodeling. * Holds if the given package, type, name and signature is a candidate for automodeling.
* *
* This predicate is extensible, so that different packages can be selected at runtime. * This predicate is extensible, so that different endpoints can be selected at runtime.
*/ */
extensible predicate automodelCandidatePackageFilter(string package); extensible predicate automodelCandidateFilter(
string package, string type, string name, string signature
);
/** /**
* Holds if the given package is a candidate for automodeling. * Holds if the given package, type, name and signature is a candidate for automodeling.
* *
* This relies on an extensible predicate, and if that is not supplied then * This relies on an extensible predicate, and if that is not supplied then
* all packages are considered candidates. * all endpoints are considered candidates.
*/ */
bindingset[package] bindingset[package, type, name, signature]
predicate automodelCandidateFilter(string package) { predicate includeAutomodelCandidate(string package, string type, string name, string signature) {
not automodelCandidatePackageFilter(_) or not automodelCandidateFilter(_, _, _, _) or
automodelCandidatePackageFilter(package) automodelCandidateFilter(package, type, name, signature)
} }