@@ -287,7 +287,7 @@ API::Node getSuccessorFromNode(API::Node node, AccessPathToken token) {
287287 * Gets an API-graph successor for the given invocation.
288288 */
289289bindingset [ token]
290- API:: Node getSuccessorFromInvoke ( API :: InvokeNode invoke , AccessPathToken token ) {
290+ API:: Node getSuccessorFromInvoke ( Specific :: InvokeNode invoke , AccessPathToken token ) {
291291 token .getName ( ) = "Argument" and
292292 (
293293 result = invoke .getParameter ( getAnIntFromStringUnbounded ( token .getAnArgument ( ) ) )
@@ -308,7 +308,7 @@ API::Node getSuccessorFromInvoke(API::InvokeNode invoke, AccessPathToken token)
308308 * Holds if `invoke` invokes a call-site filter given by `token`.
309309 */
310310pragma [ inline]
311- private predicate invocationMatchesCallSiteFilter ( API :: InvokeNode invoke , AccessPathToken token ) {
311+ private predicate invocationMatchesCallSiteFilter ( Specific :: InvokeNode invoke , AccessPathToken token ) {
312312 token .getName ( ) = "WithArity" and
313313 invoke .getNumArgument ( ) = getAnIntFromStringUnbounded ( token .getAnArgument ( ) )
314314 or
@@ -322,10 +322,6 @@ pragma[nomagic]
322322API:: Node getNodeFromPath ( string package , string type , AccessPath path , int n ) {
323323 isRelevantFullPath ( package , type , path ) and
324324 (
325- type = "" and
326- n = 0 and
327- result = API:: moduleImport ( package )
328- or
329325 n = 0 and
330326 exists ( string package2 , string type2 , AccessPath path2 |
331327 typeModel ( package , type , package2 , type2 , path2 ) and
@@ -353,15 +349,15 @@ API::Node getNodeFromPath(string package, string type, AccessPath path) {
353349 *
354350 * Unlike `getNodeFromPath`, the `path` may end with one or more call-site filters.
355351 */
356- API :: InvokeNode getInvocationFromPath ( string package , string type , AccessPath path , int n ) {
357- result = getNodeFromPath ( package , type , path , n ) . getAnInvocation ( )
352+ Specific :: InvokeNode getInvocationFromPath ( string package , string type , AccessPath path , int n ) {
353+ result = Specific :: getAnInvocationOf ( getNodeFromPath ( package , type , path , n ) )
358354 or
359355 result = getInvocationFromPath ( package , type , path , n - 1 ) and
360356 invocationMatchesCallSiteFilter ( result , path .getToken ( n - 1 ) )
361357}
362358
363359/** Gets an invocation identified by the given `(package, type, path)` tuple. */
364- API :: InvokeNode getInvocationFromPath ( string package , string type , AccessPath path ) {
360+ Specific :: InvokeNode getInvocationFromPath ( string package , string type , AccessPath path ) {
365361 result = getInvocationFromPath ( package , type , path , path .getNumToken ( ) )
366362}
367363
@@ -472,12 +468,22 @@ module ModelOutput {
472468 )
473469 }
474470
471+ /**
472+ * Holds if a relevant CSV summary row has the given `kind`, `input` and `output`.
473+ */
474+ predicate summaryModel ( string input , string output , string kind ) {
475+ exists ( string package |
476+ isRelevantPackage ( package ) and
477+ summaryModel ( package , _, _, input , output , kind )
478+ )
479+ }
480+
475481 /**
476482 * Holds if a summary edge with the given `input, output, kind` columns have a `package, type, path` tuple
477483 * that resolves to `baseNode`.
478484 */
479485 predicate resolvedSummaryBase (
480- API :: InvokeNode baseNode , AccessPath input , AccessPath output , string kind
486+ Specific :: InvokeNode baseNode , AccessPath input , AccessPath output , string kind
481487 ) {
482488 exists ( string package , string type , AccessPath path |
483489 summaryModel ( package , type , path , input , output , kind ) and
0 commit comments