@@ -454,6 +454,14 @@ private API::Node getNodeFromPath(string type, AccessPath path, int n) {
454454 or
455455 // Apply a type step
456456 typeStep ( getNodeFromPath ( type , path , n ) , result )
457+ or
458+ // Apply a fuzzy step (without advancing 'n')
459+ path .getToken ( n ) .getName ( ) = "Fuzzy" and
460+ result = Specific:: getAFuzzySuccessor ( getNodeFromPath ( type , path , n ) )
461+ or
462+ // Skip a fuzzy step (advance 'n' without changing the current node)
463+ path .getToken ( n - 1 ) .getName ( ) = "Fuzzy" and
464+ result = getNodeFromPath ( type , path , n - 1 )
457465}
458466
459467/**
@@ -500,6 +508,14 @@ private API::Node getNodeFromSubPath(API::Node base, AccessPath subPath, int n)
500508 // will themselves find by following type-steps.
501509 n > 0 and
502510 n < subPath .getNumToken ( )
511+ or
512+ // Apply a fuzzy step (without advancing 'n')
513+ subPath .getToken ( n ) .getName ( ) = "Fuzzy" and
514+ result = Specific:: getAFuzzySuccessor ( getNodeFromSubPath ( base , subPath , n ) )
515+ or
516+ // Skip a fuzzy step (advance 'n' without changing the current node)
517+ subPath .getToken ( n - 1 ) .getName ( ) = "Fuzzy" and
518+ result = getNodeFromSubPath ( base , subPath , n - 1 )
503519}
504520
505521/**
@@ -561,7 +577,7 @@ private Specific::InvokeNode getInvocationFromPath(string type, AccessPath path)
561577 */
562578bindingset [ name]
563579private predicate isValidTokenNameInIdentifyingAccessPath ( string name ) {
564- name = [ "Argument" , "Parameter" , "ReturnValue" , "WithArity" , "TypeVar" ]
580+ name = [ "Argument" , "Parameter" , "ReturnValue" , "WithArity" , "TypeVar" , "Fuzzy" ]
565581 or
566582 Specific:: isExtraValidTokenNameInIdentifyingAccessPath ( name )
567583}
@@ -572,7 +588,7 @@ private predicate isValidTokenNameInIdentifyingAccessPath(string name) {
572588 */
573589bindingset [ name]
574590private predicate isValidNoArgumentTokenInIdentifyingAccessPath ( string name ) {
575- name = "ReturnValue"
591+ name = [ "ReturnValue" , "Fuzzy" ]
576592 or
577593 Specific:: isExtraValidNoArgumentTokenInIdentifyingAccessPath ( name )
578594}
0 commit comments