@@ -117,13 +117,14 @@ module SharedCharacteristics<CandidateSig Candidate> {
117117 }
118118
119119 /**
120- * Holds if the candidate sink `candidateSink` should be considered as a possible sink of type `sinkType`, and
121- * classified by the ML model. A candidate sink is a node that cannot be excluded from `sinkType` based on its
122- * characteristics.
120+ * Holds if the given `endpoint` should be considered as a candidate for type `endpointType`,
121+ * and classified by the ML model.
122+ *
123+ * A candidate is an endpoint that cannot be excluded from `endpointType` based on its characteristics.
123124 */
124- predicate isSinkCandidate ( Candidate:: Endpoint candidateSink , Candidate:: EndpointType sinkType ) {
125+ predicate isCandidate ( Candidate:: Endpoint candidateSink , Candidate:: EndpointType sinkType ) {
125126 not sinkType instanceof Candidate:: NegativeEndpointType and
126- not exists ( getAReasonSinkExcluded ( candidateSink , sinkType ) )
127+ not exists ( getAnExcludingCharacteristic ( candidateSink , sinkType ) )
127128 }
128129
129130 /**
@@ -139,15 +140,14 @@ module SharedCharacteristics<CandidateSig Candidate> {
139140 }
140141
141142 /**
142- * Gets the list of characteristics that cause `candidateSink` to be excluded as an effective sink for a given sink
143- * type.
143+ * Gets a characteristics that disbar `endpoint` from being a candidate for `endpointType`.
144144 */
145- EndpointCharacteristic getAReasonSinkExcluded (
146- Candidate:: Endpoint candidateSink , Candidate:: EndpointType sinkType
145+ EndpointCharacteristic getAnExcludingCharacteristic (
146+ Candidate:: Endpoint endpoint , Candidate:: EndpointType endpointType
147147 ) {
148148 // An endpoint is a sink candidate if none of its characteristics give much indication whether or not it is a sink.
149- not sinkType instanceof Candidate:: NegativeEndpointType and
150- result .appliesToEndpoint ( candidateSink ) and
149+ not endpointType instanceof Candidate:: NegativeEndpointType and
150+ result .appliesToEndpoint ( endpoint ) and
151151 (
152152 // Exclude endpoints that have a characteristic that implies they're not sinks for _any_ sink type.
153153 exists ( float confidence |
@@ -158,7 +158,7 @@ module SharedCharacteristics<CandidateSig Candidate> {
158158 // Exclude endpoints that have a characteristic that implies they're not sinks for _this particular_ sink type.
159159 exists ( float confidence |
160160 confidence >= mediumConfidence ( ) and
161- result .hasImplications ( sinkType , false , confidence )
161+ result .hasImplications ( endpointType , false , confidence )
162162 )
163163 )
164164 }
0 commit comments