@@ -73,16 +73,23 @@ abstract class AtmConfig extends string {
7373 not exists ( this .getAReasonSinkExcluded ( candidateSink ) )
7474 }
7575
76+ /**
77+ * Gets the list of characteristics that cause `candidateSink` to be excluded as an effective sink.
78+ */
7679 final EndpointCharacteristics:: EndpointCharacteristic getAReasonSinkExcluded (
7780 JS:: DataFlow:: Node candidateSink
7881 ) {
79- // An endpoint is an effective sink if it has neither standard endpoint filter characteristics nor endpoint filter
80- // characteristics that are specific to this sink type.
81- // TODO: Experiment with excluding all endpoints that have a medium- or high-confidence characteristic that implies
82- // they're not sinks for this sink type (or not sinks for any sink type), not just the EndpointFilterCharacteristics.
82+ // An endpoint is an effective sink (sink candidate) if none of its characteristics give much indication whether or
83+ // not it is a sink. Historically, we used endpoint filters, and scored endpoints that are filtered out neither by
84+ // a standard endpoint filter nor by an endpoint filter specific to this sink type. To replicate this behaviour, we
85+ // have given the endpoint filter characteristics medium confidence, and we exclude endpoints that have a
86+ // medium-confidence characteristic that indicates that they are not sinks, either in general or for this sink type.
8387 exists ( EndpointCharacteristics:: EndpointCharacteristic filter , float confidence |
8488 filter .getEndpoints ( candidateSink ) and
8589 confidence >= filter .mediumConfidence ( ) and
90+ // TODO: Experiment with excluding all endpoints that have a medium- or high-confidence characteristic that
91+ // implies they're not sinks, rather than using only medium-confidence characteristics, by deleting the following
92+ // line.
8693 confidence < filter .highConfidence ( ) and
8794 (
8895 // Exclude endpoints that have a characteristic that implies they're not sinks for _any_ sink type.
0 commit comments