anchor.diff:  import 'package:analyzer/src/workspace/gn.dart';
   import 'package:analyzer_plugin/protocol/protocol_common.dart'
       show KytheEntry, KytheVName;
  +import 'package:path/path.dart' show relative;
   
   import 'schema.dart' as schema;
   
  
positive.code:   if (path.lastIndexOf('CORPUS_NAME') != -1) {
      return path.substring(path.lastIndexOf('CORPUS_NAME') + 12);
    }
    return path;
  }
  
  /// If a non-null element is passed, the [SignatureElementVisitor] is used to
  /// generate and return a [String] signature, otherwise [schema.DYNAMIC_KIND] is
  /// returned.
  String _getSignature(ResourceProvider provider, Element? element,
      String nodeKind, String corpus) {
    assert(nodeKind != schema.ANCHOR_KIND); // Call _getAnchorSignature instead
    if (element == null) {
      return schema.DYNAMIC_KIND;
    }
    if (element is CompilationUnitElement) {
      return _getPath(provider, element);
    }
    return '$nodeKind:${element.accept(SignatureElementVisitor.instance)}';
  }
  
  /// This visitor writes out Kythe facts and edges as specified by the Kythe
  
negative.code:   return '$start-$end';
  }
  
  String? _getNodeKind(Element e) {
    if (e is FieldElement && e.isEnumConstant) {
      // FieldElement is a kind of VariableElement, so this test case must be
      // before the e is VariableElement check.
      return schema.CONSTANT_KIND;
    } else if (e is VariableElement || e is PrefixElement) {
      return schema.VARIABLE_KIND;
    } else if (e is ExecutableElement) {
      return schema.FUNCTION_KIND;
    } else if (e is ClassElement || e is TypeParameterElement) {
      // TODO(jwren): this should be using absvar instead, see
      // https://kythe.io/docs/schema/#absvar
      return schema.RECORD_KIND;
    }
    return null;
  }
  
  String _getPath(ResourceProvider provider, Element? e,
      {String? sdkRootPath, String? corpus}) {
    // TODO(jwren) This method simply serves to provide the WORKSPACE relative
    // path for sources in Elements, it needs to be written in a more robust way.
    // TODO(jwren) figure out what source generates a e != null, but
  