From dcbb66d3660c073e7b94581d7cb16fe32db9622b Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Tue, 3 Sep 2024 11:55:41 +0100 Subject: [PATCH 01/23] Go: extract and expose struct tags, interface method IDs This enables us to distinguish all database types in QL. Previously structs with the same field names and types but differing tags, and interface types with matching method names and at least one non-exported method but declared in differing packages, were impossible or only sometimes possible to distinguish in QL. With this change these types can be distinguished, as well as permitting queries to examine struct field tags, e.g. to read JSON field name associations. --- .../go.dbscheme | 546 +++++++++++++++++ .../old.dbscheme | 552 ++++++++++++++++++ .../upgrade.properties | 5 + go/extractor/dbscheme/tables.go | 14 + go/extractor/extractor.go | 8 + go/ql/lib/go.dbscheme | 6 + go/ql/lib/semmle/go/Scopes.qll | 7 + go/ql/lib/semmle/go/Types.qll | 44 +- .../component_tags.ql | 7 + .../go.dbscheme | 552 ++++++++++++++++++ .../old.dbscheme | 546 +++++++++++++++++ .../upgrade.properties | 3 + .../semmle/go/Types/Field_getPackage.expected | 4 + .../go/Types/Field_hasQualifiedName2.expected | 4 + .../go/Types/Field_hasQualifiedName3.expected | 4 + .../semmle/go/Types/InterfaceIds.expected | 2 + .../semmle/go/Types/InterfaceIds.ql | 6 + .../semmle/go/Types/MethodCount.expected | 1 + .../semmle/go/Types/MethodTypes.expected | 2 + .../Types/Method_hasQualifiedName2.expected | 2 + .../Types/Method_hasQualifiedName3.expected | 2 + .../semmle/go/Types/Methods.expected | 2 + .../semmle/go/Types/QualifiedNames.expected | 4 + .../semmle/go/Types/StructFields.expected | 4 + .../semmle/go/Types/Types.expected | 4 + .../semmle/go/Types/pkg1/interfaces.go | 5 + .../library-tests/semmle/go/Types/pkg2/tst.go | 5 + .../semmle/go/Types/struct_tags.expected | 4 + .../semmle/go/Types/struct_tags.go | 11 + .../semmle/go/Types/struct_tags.ql | 6 + 30 files changed, 2359 insertions(+), 3 deletions(-) create mode 100644 go/downgrades/e47462df302b3e58a60d2e21f99aba63f973326f/go.dbscheme create mode 100644 go/downgrades/e47462df302b3e58a60d2e21f99aba63f973326f/old.dbscheme create mode 100644 go/downgrades/e47462df302b3e58a60d2e21f99aba63f973326f/upgrade.properties create mode 100644 go/ql/lib/upgrades/a58b81b1b4c4cccc8ca11731c1db86622f33af57/component_tags.ql create mode 100644 go/ql/lib/upgrades/a58b81b1b4c4cccc8ca11731c1db86622f33af57/go.dbscheme create mode 100644 go/ql/lib/upgrades/a58b81b1b4c4cccc8ca11731c1db86622f33af57/old.dbscheme create mode 100644 go/ql/lib/upgrades/a58b81b1b4c4cccc8ca11731c1db86622f33af57/upgrade.properties create mode 100644 go/ql/test/library-tests/semmle/go/Types/InterfaceIds.expected create mode 100644 go/ql/test/library-tests/semmle/go/Types/InterfaceIds.ql create mode 100644 go/ql/test/library-tests/semmle/go/Types/struct_tags.expected create mode 100644 go/ql/test/library-tests/semmle/go/Types/struct_tags.go create mode 100644 go/ql/test/library-tests/semmle/go/Types/struct_tags.ql diff --git a/go/downgrades/e47462df302b3e58a60d2e21f99aba63f973326f/go.dbscheme b/go/downgrades/e47462df302b3e58a60d2e21f99aba63f973326f/go.dbscheme new file mode 100644 index 000000000000..a58b81b1b4c4 --- /dev/null +++ b/go/downgrades/e47462df302b3e58a60d2e21f99aba63f973326f/go.dbscheme @@ -0,0 +1,546 @@ +/** Auto-generated dbscheme; do not edit. */ + + +/** Duplicate code **/ + +duplicateCode( + unique int id : @duplication, + varchar(900) relativePath : string ref, + int equivClass : int ref); + +similarCode( + unique int id : @similarity, + varchar(900) relativePath : string ref, + int equivClass : int ref); + +@duplication_or_similarity = @duplication | @similarity; + +tokens( + int id : @duplication_or_similarity ref, + int offset : int ref, + int beginLine : int ref, + int beginColumn : int ref, + int endLine : int ref, + int endColumn : int ref); + +/** External data **/ + +externalData( + int id : @externalDataElement, + varchar(900) path : string ref, + int column: int ref, + varchar(900) value : string ref +); + +snapshotDate(unique date snapshotDate : date ref); + +sourceLocationPrefix(varchar(900) prefix : string ref); + + +/* + * XML Files + */ + +xmlEncoding( + unique int id: @file ref, + string encoding: string ref +); + +xmlDTDs( + unique int id: @xmldtd, + string root: string ref, + string publicId: string ref, + string systemId: string ref, + int fileid: @file ref +); + +xmlElements( + unique int id: @xmlelement, + string name: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int fileid: @file ref +); + +xmlAttrs( + unique int id: @xmlattribute, + int elementid: @xmlelement ref, + string name: string ref, + string value: string ref, + int idx: int ref, + int fileid: @file ref +); + +xmlNs( + int id: @xmlnamespace, + string prefixName: string ref, + string URI: string ref, + int fileid: @file ref +); + +xmlHasNs( + int elementId: @xmlnamespaceable ref, + int nsId: @xmlnamespace ref, + int fileid: @file ref +); + +xmlComments( + unique int id: @xmlcomment, + string text: string ref, + int parentid: @xmlparent ref, + int fileid: @file ref +); + +xmlChars( + unique int id: @xmlcharacters, + string text: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int isCDATA: int ref, + int fileid: @file ref +); + +@xmlparent = @file | @xmlelement; +@xmlnamespaceable = @xmlelement | @xmlattribute; + +xmllocations( + int xmlElement: @xmllocatable ref, + int location: @location_default ref +); + +@xmllocatable = @xmlcharacters | @xmlelement | @xmlcomment | @xmlattribute | @xmldtd | @file | @xmlnamespace; + +compilations(unique int id: @compilation, string cwd: string ref); + +#keyset[id, num] +compilation_args(int id: @compilation ref, int num: int ref, string arg: string ref); + +#keyset[id, num, kind] +compilation_time(int id: @compilation ref, int num: int ref, int kind: int ref, float secs: float ref); + +diagnostic_for(unique int diagnostic: @diagnostic ref, int compilation: @compilation ref, int file_number: int ref, int file_number_diagnostic_number: int ref); + +compilation_finished(unique int id: @compilation ref, float cpu_seconds: float ref, float elapsed_seconds: float ref); + +#keyset[id, num] +compilation_compiling_files(int id: @compilation ref, int num: int ref, int file: @file ref); + +diagnostics(unique int id: @diagnostic, int severity: int ref, string error_tag: string ref, string error_message: string ref, + string full_error_message: string ref, int location: @location ref); + +locations_default(unique int id: @location_default, int file: @file ref, int beginLine: int ref, int beginColumn: int ref, + int endLine: int ref, int endColumn: int ref); + +numlines(int element_id: @sourceline ref, int num_lines: int ref, int num_code: int ref, int num_comment: int ref); + +files(unique int id: @file, string name: string ref); + +folders(unique int id: @folder, string name: string ref); + +containerparent(int parent: @container ref, unique int child: @container ref); + +has_location(unique int locatable: @locatable ref, int location: @location ref); + +#keyset[parent, idx] +comment_groups(unique int id: @comment_group, int parent: @file ref, int idx: int ref); + +comments(unique int id: @comment, int kind: int ref, int parent: @comment_group ref, int idx: int ref, string text: string ref); + +doc_comments(unique int node: @documentable ref, int comment: @comment_group ref); + +#keyset[parent, idx] +exprs(unique int id: @expr, int kind: int ref, int parent: @exprparent ref, int idx: int ref); + +literals(unique int expr: @expr ref, string value: string ref, string raw: string ref); + +constvalues(unique int expr: @expr ref, string value: string ref, string exact: string ref); + +fields(unique int id: @field, int parent: @fieldparent ref, int idx: int ref); + +typeparamdecls(unique int id: @typeparamdecl, int parent: @typeparamdeclparent ref, int idx: int ref); + +#keyset[parent, idx] +stmts(unique int id: @stmt, int kind: int ref, int parent: @stmtparent ref, int idx: int ref); + +#keyset[parent, idx] +decls(unique int id: @decl, int kind: int ref, int parent: @declparent ref, int idx: int ref); + +#keyset[parent, idx] +specs(unique int id: @spec, int kind: int ref, int parent: @gendecl ref, int idx: int ref); + +scopes(unique int id: @scope, int kind: int ref); + +scopenesting(unique int inner: @scope ref, int outer: @scope ref); + +scopenodes(unique int node: @scopenode ref, int scope: @localscope ref); + +objects(unique int id: @object, int kind: int ref, string name: string ref); + +objectscopes(unique int object: @object ref, int scope: @scope ref); + +objecttypes(unique int object: @object ref, int tp: @type ref); + +methodreceivers(unique int method: @object ref, int receiver: @object ref); + +fieldstructs(unique int field: @object ref, int struct: @structtype ref); + +methodhosts(int method: @object ref, int host: @namedtype ref); + +defs(int ident: @ident ref, int object: @object ref); + +uses(int ident: @ident ref, int object: @object ref); + +types(unique int id: @type, int kind: int ref); + +type_of(unique int expr: @expr ref, int tp: @type ref); + +typename(unique int tp: @type ref, string name: string ref); + +key_type(unique int map: @maptype ref, int tp: @type ref); + +element_type(unique int container: @containertype ref, int tp: @type ref); + +base_type(unique int ptr: @pointertype ref, int tp: @type ref); + +underlying_type(unique int named: @namedtype ref, int tp: @type ref); + +#keyset[parent, index] +component_types(int parent: @compositetype ref, int index: int ref, string name: string ref, int tp: @type ref); + +array_length(unique int tp: @arraytype ref, string len: string ref); + +type_objects(unique int tp: @type ref, int object: @object ref); + +packages(unique int id: @package, string name: string ref, string path: string ref, int scope: @packagescope ref); + +#keyset[parent, idx] +modexprs(unique int id: @modexpr, int kind: int ref, int parent: @modexprparent ref, int idx: int ref); + +#keyset[parent, idx] +modtokens(string token: string ref, int parent: @modexpr ref, int idx: int ref); + +#keyset[package, idx] +errors(unique int id: @error, int kind: int ref, string msg: string ref, string rawpos: string ref, + string file: string ref, int line: int ref, int col: int ref, int package: @package ref, int idx: int ref); + +has_ellipsis(int id: @callorconversionexpr ref); + +variadic(int id: @signaturetype ref); + +#keyset[parent, idx] +typeparam(unique int tp: @typeparamtype ref, string name: string ref, int bound: @compositetype ref, + int parent: @typeparamparentobject ref, int idx: int ref); + +@container = @file | @folder; + +@locatable = @xmllocatable | @node | @localscope; + +@node = @documentable | @exprparent | @modexprparent | @fieldparent | @stmtparent | @declparent | @typeparamdeclparent + | @scopenode | @comment_group | @comment; + +@documentable = @file | @field | @typeparamdecl | @spec | @gendecl | @funcdecl | @modexpr; + +@exprparent = @funcdef | @file | @expr | @field | @stmt | @decl | @typeparamdecl | @spec; + +@modexprparent = @file | @modexpr; + +@fieldparent = @decl | @structtypeexpr | @functypeexpr | @interfacetypeexpr; + +@stmtparent = @funcdef | @stmt | @decl; + +@declparent = @file | @declstmt; + +@typeparamdeclparent = @funcdecl | @typespec; + +@funcdef = @funclit | @funcdecl; + +@scopenode = @file | @functypeexpr | @blockstmt | @ifstmt | @caseclause | @switchstmt | @commclause | @loopstmt; + +@location = @location_default; + +@sourceline = @locatable; + +case @comment.kind of + 0 = @slashslashcomment +| 1 = @slashstarcomment; + +case @expr.kind of + 0 = @badexpr +| 1 = @ident +| 2 = @ellipsis +| 3 = @intlit +| 4 = @floatlit +| 5 = @imaglit +| 6 = @charlit +| 7 = @stringlit +| 8 = @funclit +| 9 = @compositelit +| 10 = @parenexpr +| 11 = @selectorexpr +| 12 = @indexexpr +| 13 = @genericfunctioninstantiationexpr +| 14 = @generictypeinstantiationexpr +| 15 = @sliceexpr +| 16 = @typeassertexpr +| 17 = @callorconversionexpr +| 18 = @starexpr +| 19 = @keyvalueexpr +| 20 = @arraytypeexpr +| 21 = @structtypeexpr +| 22 = @functypeexpr +| 23 = @interfacetypeexpr +| 24 = @maptypeexpr +| 25 = @typesetliteralexpr +| 26 = @plusexpr +| 27 = @minusexpr +| 28 = @notexpr +| 29 = @complementexpr +| 30 = @derefexpr +| 31 = @addressexpr +| 32 = @arrowexpr +| 33 = @lorexpr +| 34 = @landexpr +| 35 = @eqlexpr +| 36 = @neqexpr +| 37 = @lssexpr +| 38 = @leqexpr +| 39 = @gtrexpr +| 40 = @geqexpr +| 41 = @addexpr +| 42 = @subexpr +| 43 = @orexpr +| 44 = @xorexpr +| 45 = @mulexpr +| 46 = @quoexpr +| 47 = @remexpr +| 48 = @shlexpr +| 49 = @shrexpr +| 50 = @andexpr +| 51 = @andnotexpr +| 52 = @sendchantypeexpr +| 53 = @recvchantypeexpr +| 54 = @sendrcvchantypeexpr; + +@basiclit = @intlit | @floatlit | @imaglit | @charlit | @stringlit; + +@operatorexpr = @logicalexpr | @arithmeticexpr | @bitwiseexpr | @unaryexpr | @binaryexpr; + +@logicalexpr = @logicalunaryexpr | @logicalbinaryexpr; + +@arithmeticexpr = @arithmeticunaryexpr | @arithmeticbinaryexpr; + +@bitwiseexpr = @bitwiseunaryexpr | @bitwisebinaryexpr; + +@unaryexpr = @logicalunaryexpr | @bitwiseunaryexpr | @arithmeticunaryexpr | @derefexpr | @addressexpr | @arrowexpr; + +@logicalunaryexpr = @notexpr; + +@bitwiseunaryexpr = @complementexpr; + +@arithmeticunaryexpr = @plusexpr | @minusexpr; + +@binaryexpr = @logicalbinaryexpr | @bitwisebinaryexpr | @arithmeticbinaryexpr | @comparison; + +@logicalbinaryexpr = @lorexpr | @landexpr; + +@bitwisebinaryexpr = @shiftexpr | @orexpr | @xorexpr | @andexpr | @andnotexpr; + +@arithmeticbinaryexpr = @addexpr | @subexpr | @mulexpr | @quoexpr | @remexpr; + +@shiftexpr = @shlexpr | @shrexpr; + +@comparison = @equalitytest | @relationalcomparison; + +@equalitytest = @eqlexpr | @neqexpr; + +@relationalcomparison = @lssexpr | @leqexpr | @gtrexpr | @geqexpr; + +@chantypeexpr = @sendchantypeexpr | @recvchantypeexpr | @sendrcvchantypeexpr; + +case @stmt.kind of + 0 = @badstmt +| 1 = @declstmt +| 2 = @emptystmt +| 3 = @labeledstmt +| 4 = @exprstmt +| 5 = @sendstmt +| 6 = @incstmt +| 7 = @decstmt +| 8 = @gostmt +| 9 = @deferstmt +| 10 = @returnstmt +| 11 = @breakstmt +| 12 = @continuestmt +| 13 = @gotostmt +| 14 = @fallthroughstmt +| 15 = @blockstmt +| 16 = @ifstmt +| 17 = @caseclause +| 18 = @exprswitchstmt +| 19 = @typeswitchstmt +| 20 = @commclause +| 21 = @selectstmt +| 22 = @forstmt +| 23 = @rangestmt +| 24 = @assignstmt +| 25 = @definestmt +| 26 = @addassignstmt +| 27 = @subassignstmt +| 28 = @mulassignstmt +| 29 = @quoassignstmt +| 30 = @remassignstmt +| 31 = @andassignstmt +| 32 = @orassignstmt +| 33 = @xorassignstmt +| 34 = @shlassignstmt +| 35 = @shrassignstmt +| 36 = @andnotassignstmt; + +@incdecstmt = @incstmt | @decstmt; + +@assignment = @simpleassignstmt | @compoundassignstmt; + +@simpleassignstmt = @assignstmt | @definestmt; + +@compoundassignstmt = @addassignstmt | @subassignstmt | @mulassignstmt | @quoassignstmt | @remassignstmt + | @andassignstmt | @orassignstmt | @xorassignstmt | @shlassignstmt | @shrassignstmt | @andnotassignstmt; + +@branchstmt = @breakstmt | @continuestmt | @gotostmt | @fallthroughstmt; + +@switchstmt = @exprswitchstmt | @typeswitchstmt; + +@loopstmt = @forstmt | @rangestmt; + +case @decl.kind of + 0 = @baddecl +| 1 = @importdecl +| 2 = @constdecl +| 3 = @typedecl +| 4 = @vardecl +| 5 = @funcdecl; + +@gendecl = @importdecl | @constdecl | @typedecl | @vardecl; + +case @spec.kind of + 0 = @importspec +| 1 = @valuespec +| 2 = @typedefspec +| 3 = @aliasspec; + +@typespec = @typedefspec | @aliasspec; + +case @object.kind of + 0 = @pkgobject +| 1 = @decltypeobject +| 2 = @builtintypeobject +| 3 = @declconstobject +| 4 = @builtinconstobject +| 5 = @declvarobject +| 6 = @declfunctionobject +| 7 = @builtinfunctionobject +| 8 = @labelobject; + +@typeparamparentobject = @decltypeobject | @declfunctionobject; + +@declobject = @decltypeobject | @declconstobject | @declvarobject | @declfunctionobject; + +@builtinobject = @builtintypeobject | @builtinconstobject | @builtinfunctionobject; + +@typeobject = @decltypeobject | @builtintypeobject; + +@valueobject = @constobject | @varobject | @functionobject; + +@constobject = @declconstobject | @builtinconstobject; + +@varobject = @declvarobject; + +@functionobject = @declfunctionobject | @builtinfunctionobject; + +case @scope.kind of + 0 = @universescope +| 1 = @packagescope +| 2 = @localscope; + +case @type.kind of + 0 = @invalidtype +| 1 = @boolexprtype +| 2 = @inttype +| 3 = @int8type +| 4 = @int16type +| 5 = @int32type +| 6 = @int64type +| 7 = @uinttype +| 8 = @uint8type +| 9 = @uint16type +| 10 = @uint32type +| 11 = @uint64type +| 12 = @uintptrtype +| 13 = @float32type +| 14 = @float64type +| 15 = @complex64type +| 16 = @complex128type +| 17 = @stringexprtype +| 18 = @unsafepointertype +| 19 = @boolliteraltype +| 20 = @intliteraltype +| 21 = @runeliteraltype +| 22 = @floatliteraltype +| 23 = @complexliteraltype +| 24 = @stringliteraltype +| 25 = @nilliteraltype +| 26 = @typeparamtype +| 27 = @arraytype +| 28 = @slicetype +| 29 = @structtype +| 30 = @pointertype +| 31 = @interfacetype +| 32 = @tupletype +| 33 = @signaturetype +| 34 = @maptype +| 35 = @sendchantype +| 36 = @recvchantype +| 37 = @sendrcvchantype +| 38 = @namedtype +| 39 = @typesetliteraltype; + +@basictype = @booltype | @numerictype | @stringtype | @literaltype | @invalidtype | @unsafepointertype; + +@booltype = @boolexprtype | @boolliteraltype; + +@numerictype = @integertype | @floattype | @complextype; + +@integertype = @signedintegertype | @unsignedintegertype; + +@signedintegertype = @inttype | @int8type | @int16type | @int32type | @int64type | @intliteraltype | @runeliteraltype; + +@unsignedintegertype = @uinttype | @uint8type | @uint16type | @uint32type | @uint64type | @uintptrtype; + +@floattype = @float32type | @float64type | @floatliteraltype; + +@complextype = @complex64type | @complex128type | @complexliteraltype; + +@stringtype = @stringexprtype | @stringliteraltype; + +@literaltype = @boolliteraltype | @intliteraltype | @runeliteraltype | @floatliteraltype | @complexliteraltype + | @stringliteraltype | @nilliteraltype; + +@compositetype = @typeparamtype | @containertype | @structtype | @pointertype | @interfacetype | @tupletype + | @signaturetype | @namedtype | @typesetliteraltype; + +@containertype = @arraytype | @slicetype | @maptype | @chantype; + +@chantype = @sendchantype | @recvchantype | @sendrcvchantype; + +case @modexpr.kind of + 0 = @modcommentblock +| 1 = @modline +| 2 = @modlineblock +| 3 = @modlparen +| 4 = @modrparen; + +case @error.kind of + 0 = @unknownerror +| 1 = @listerror +| 2 = @parseerror +| 3 = @typeerror; + diff --git a/go/downgrades/e47462df302b3e58a60d2e21f99aba63f973326f/old.dbscheme b/go/downgrades/e47462df302b3e58a60d2e21f99aba63f973326f/old.dbscheme new file mode 100644 index 000000000000..e47462df302b --- /dev/null +++ b/go/downgrades/e47462df302b3e58a60d2e21f99aba63f973326f/old.dbscheme @@ -0,0 +1,552 @@ +/** Auto-generated dbscheme; do not edit. */ + + +/** Duplicate code **/ + +duplicateCode( + unique int id : @duplication, + varchar(900) relativePath : string ref, + int equivClass : int ref); + +similarCode( + unique int id : @similarity, + varchar(900) relativePath : string ref, + int equivClass : int ref); + +@duplication_or_similarity = @duplication | @similarity; + +tokens( + int id : @duplication_or_similarity ref, + int offset : int ref, + int beginLine : int ref, + int beginColumn : int ref, + int endLine : int ref, + int endColumn : int ref); + +/** External data **/ + +externalData( + int id : @externalDataElement, + varchar(900) path : string ref, + int column: int ref, + varchar(900) value : string ref +); + +snapshotDate(unique date snapshotDate : date ref); + +sourceLocationPrefix(varchar(900) prefix : string ref); + + +/* + * XML Files + */ + +xmlEncoding( + unique int id: @file ref, + string encoding: string ref +); + +xmlDTDs( + unique int id: @xmldtd, + string root: string ref, + string publicId: string ref, + string systemId: string ref, + int fileid: @file ref +); + +xmlElements( + unique int id: @xmlelement, + string name: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int fileid: @file ref +); + +xmlAttrs( + unique int id: @xmlattribute, + int elementid: @xmlelement ref, + string name: string ref, + string value: string ref, + int idx: int ref, + int fileid: @file ref +); + +xmlNs( + int id: @xmlnamespace, + string prefixName: string ref, + string URI: string ref, + int fileid: @file ref +); + +xmlHasNs( + int elementId: @xmlnamespaceable ref, + int nsId: @xmlnamespace ref, + int fileid: @file ref +); + +xmlComments( + unique int id: @xmlcomment, + string text: string ref, + int parentid: @xmlparent ref, + int fileid: @file ref +); + +xmlChars( + unique int id: @xmlcharacters, + string text: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int isCDATA: int ref, + int fileid: @file ref +); + +@xmlparent = @file | @xmlelement; +@xmlnamespaceable = @xmlelement | @xmlattribute; + +xmllocations( + int xmlElement: @xmllocatable ref, + int location: @location_default ref +); + +@xmllocatable = @xmlcharacters | @xmlelement | @xmlcomment | @xmlattribute | @xmldtd | @file | @xmlnamespace; + +compilations(unique int id: @compilation, string cwd: string ref); + +#keyset[id, num] +compilation_args(int id: @compilation ref, int num: int ref, string arg: string ref); + +#keyset[id, num, kind] +compilation_time(int id: @compilation ref, int num: int ref, int kind: int ref, float secs: float ref); + +diagnostic_for(unique int diagnostic: @diagnostic ref, int compilation: @compilation ref, int file_number: int ref, int file_number_diagnostic_number: int ref); + +compilation_finished(unique int id: @compilation ref, float cpu_seconds: float ref, float elapsed_seconds: float ref); + +#keyset[id, num] +compilation_compiling_files(int id: @compilation ref, int num: int ref, int file: @file ref); + +diagnostics(unique int id: @diagnostic, int severity: int ref, string error_tag: string ref, string error_message: string ref, + string full_error_message: string ref, int location: @location ref); + +locations_default(unique int id: @location_default, int file: @file ref, int beginLine: int ref, int beginColumn: int ref, + int endLine: int ref, int endColumn: int ref); + +numlines(int element_id: @sourceline ref, int num_lines: int ref, int num_code: int ref, int num_comment: int ref); + +files(unique int id: @file, string name: string ref); + +folders(unique int id: @folder, string name: string ref); + +containerparent(int parent: @container ref, unique int child: @container ref); + +has_location(unique int locatable: @locatable ref, int location: @location ref); + +#keyset[parent, idx] +comment_groups(unique int id: @comment_group, int parent: @file ref, int idx: int ref); + +comments(unique int id: @comment, int kind: int ref, int parent: @comment_group ref, int idx: int ref, string text: string ref); + +doc_comments(unique int node: @documentable ref, int comment: @comment_group ref); + +#keyset[parent, idx] +exprs(unique int id: @expr, int kind: int ref, int parent: @exprparent ref, int idx: int ref); + +literals(unique int expr: @expr ref, string value: string ref, string raw: string ref); + +constvalues(unique int expr: @expr ref, string value: string ref, string exact: string ref); + +fields(unique int id: @field, int parent: @fieldparent ref, int idx: int ref); + +typeparamdecls(unique int id: @typeparamdecl, int parent: @typeparamdeclparent ref, int idx: int ref); + +#keyset[parent, idx] +stmts(unique int id: @stmt, int kind: int ref, int parent: @stmtparent ref, int idx: int ref); + +#keyset[parent, idx] +decls(unique int id: @decl, int kind: int ref, int parent: @declparent ref, int idx: int ref); + +#keyset[parent, idx] +specs(unique int id: @spec, int kind: int ref, int parent: @gendecl ref, int idx: int ref); + +scopes(unique int id: @scope, int kind: int ref); + +scopenesting(unique int inner: @scope ref, int outer: @scope ref); + +scopenodes(unique int node: @scopenode ref, int scope: @localscope ref); + +objects(unique int id: @object, int kind: int ref, string name: string ref); + +objectscopes(unique int object: @object ref, int scope: @scope ref); + +objecttypes(unique int object: @object ref, int tp: @type ref); + +methodreceivers(unique int method: @object ref, int receiver: @object ref); + +fieldstructs(unique int field: @object ref, int struct: @structtype ref); + +methodhosts(int method: @object ref, int host: @namedtype ref); + +defs(int ident: @ident ref, int object: @object ref); + +uses(int ident: @ident ref, int object: @object ref); + +types(unique int id: @type, int kind: int ref); + +type_of(unique int expr: @expr ref, int tp: @type ref); + +typename(unique int tp: @type ref, string name: string ref); + +key_type(unique int map: @maptype ref, int tp: @type ref); + +element_type(unique int container: @containertype ref, int tp: @type ref); + +base_type(unique int ptr: @pointertype ref, int tp: @type ref); + +underlying_type(unique int named: @namedtype ref, int tp: @type ref); + +#keyset[parent, index] +component_types(int parent: @compositetype ref, int index: int ref, string name: string ref, int tp: @type ref); + +#keyset[parent, index] +component_tags(int parent: @compositetype ref, int index: int ref, string tag: string ref); + +#keyset[interface, index] +interface_private_method_ids(int interface: @interfacetype ref, int index: int ref, string id: string ref); + +array_length(unique int tp: @arraytype ref, string len: string ref); + +type_objects(unique int tp: @type ref, int object: @object ref); + +packages(unique int id: @package, string name: string ref, string path: string ref, int scope: @packagescope ref); + +#keyset[parent, idx] +modexprs(unique int id: @modexpr, int kind: int ref, int parent: @modexprparent ref, int idx: int ref); + +#keyset[parent, idx] +modtokens(string token: string ref, int parent: @modexpr ref, int idx: int ref); + +#keyset[package, idx] +errors(unique int id: @error, int kind: int ref, string msg: string ref, string rawpos: string ref, + string file: string ref, int line: int ref, int col: int ref, int package: @package ref, int idx: int ref); + +has_ellipsis(int id: @callorconversionexpr ref); + +variadic(int id: @signaturetype ref); + +#keyset[parent, idx] +typeparam(unique int tp: @typeparamtype ref, string name: string ref, int bound: @compositetype ref, + int parent: @typeparamparentobject ref, int idx: int ref); + +@container = @file | @folder; + +@locatable = @xmllocatable | @node | @localscope; + +@node = @documentable | @exprparent | @modexprparent | @fieldparent | @stmtparent | @declparent | @typeparamdeclparent + | @scopenode | @comment_group | @comment; + +@documentable = @file | @field | @typeparamdecl | @spec | @gendecl | @funcdecl | @modexpr; + +@exprparent = @funcdef | @file | @expr | @field | @stmt | @decl | @typeparamdecl | @spec; + +@modexprparent = @file | @modexpr; + +@fieldparent = @decl | @structtypeexpr | @functypeexpr | @interfacetypeexpr; + +@stmtparent = @funcdef | @stmt | @decl; + +@declparent = @file | @declstmt; + +@typeparamdeclparent = @funcdecl | @typespec; + +@funcdef = @funclit | @funcdecl; + +@scopenode = @file | @functypeexpr | @blockstmt | @ifstmt | @caseclause | @switchstmt | @commclause | @loopstmt; + +@location = @location_default; + +@sourceline = @locatable; + +case @comment.kind of + 0 = @slashslashcomment +| 1 = @slashstarcomment; + +case @expr.kind of + 0 = @badexpr +| 1 = @ident +| 2 = @ellipsis +| 3 = @intlit +| 4 = @floatlit +| 5 = @imaglit +| 6 = @charlit +| 7 = @stringlit +| 8 = @funclit +| 9 = @compositelit +| 10 = @parenexpr +| 11 = @selectorexpr +| 12 = @indexexpr +| 13 = @genericfunctioninstantiationexpr +| 14 = @generictypeinstantiationexpr +| 15 = @sliceexpr +| 16 = @typeassertexpr +| 17 = @callorconversionexpr +| 18 = @starexpr +| 19 = @keyvalueexpr +| 20 = @arraytypeexpr +| 21 = @structtypeexpr +| 22 = @functypeexpr +| 23 = @interfacetypeexpr +| 24 = @maptypeexpr +| 25 = @typesetliteralexpr +| 26 = @plusexpr +| 27 = @minusexpr +| 28 = @notexpr +| 29 = @complementexpr +| 30 = @derefexpr +| 31 = @addressexpr +| 32 = @arrowexpr +| 33 = @lorexpr +| 34 = @landexpr +| 35 = @eqlexpr +| 36 = @neqexpr +| 37 = @lssexpr +| 38 = @leqexpr +| 39 = @gtrexpr +| 40 = @geqexpr +| 41 = @addexpr +| 42 = @subexpr +| 43 = @orexpr +| 44 = @xorexpr +| 45 = @mulexpr +| 46 = @quoexpr +| 47 = @remexpr +| 48 = @shlexpr +| 49 = @shrexpr +| 50 = @andexpr +| 51 = @andnotexpr +| 52 = @sendchantypeexpr +| 53 = @recvchantypeexpr +| 54 = @sendrcvchantypeexpr; + +@basiclit = @intlit | @floatlit | @imaglit | @charlit | @stringlit; + +@operatorexpr = @logicalexpr | @arithmeticexpr | @bitwiseexpr | @unaryexpr | @binaryexpr; + +@logicalexpr = @logicalunaryexpr | @logicalbinaryexpr; + +@arithmeticexpr = @arithmeticunaryexpr | @arithmeticbinaryexpr; + +@bitwiseexpr = @bitwiseunaryexpr | @bitwisebinaryexpr; + +@unaryexpr = @logicalunaryexpr | @bitwiseunaryexpr | @arithmeticunaryexpr | @derefexpr | @addressexpr | @arrowexpr; + +@logicalunaryexpr = @notexpr; + +@bitwiseunaryexpr = @complementexpr; + +@arithmeticunaryexpr = @plusexpr | @minusexpr; + +@binaryexpr = @logicalbinaryexpr | @bitwisebinaryexpr | @arithmeticbinaryexpr | @comparison; + +@logicalbinaryexpr = @lorexpr | @landexpr; + +@bitwisebinaryexpr = @shiftexpr | @orexpr | @xorexpr | @andexpr | @andnotexpr; + +@arithmeticbinaryexpr = @addexpr | @subexpr | @mulexpr | @quoexpr | @remexpr; + +@shiftexpr = @shlexpr | @shrexpr; + +@comparison = @equalitytest | @relationalcomparison; + +@equalitytest = @eqlexpr | @neqexpr; + +@relationalcomparison = @lssexpr | @leqexpr | @gtrexpr | @geqexpr; + +@chantypeexpr = @sendchantypeexpr | @recvchantypeexpr | @sendrcvchantypeexpr; + +case @stmt.kind of + 0 = @badstmt +| 1 = @declstmt +| 2 = @emptystmt +| 3 = @labeledstmt +| 4 = @exprstmt +| 5 = @sendstmt +| 6 = @incstmt +| 7 = @decstmt +| 8 = @gostmt +| 9 = @deferstmt +| 10 = @returnstmt +| 11 = @breakstmt +| 12 = @continuestmt +| 13 = @gotostmt +| 14 = @fallthroughstmt +| 15 = @blockstmt +| 16 = @ifstmt +| 17 = @caseclause +| 18 = @exprswitchstmt +| 19 = @typeswitchstmt +| 20 = @commclause +| 21 = @selectstmt +| 22 = @forstmt +| 23 = @rangestmt +| 24 = @assignstmt +| 25 = @definestmt +| 26 = @addassignstmt +| 27 = @subassignstmt +| 28 = @mulassignstmt +| 29 = @quoassignstmt +| 30 = @remassignstmt +| 31 = @andassignstmt +| 32 = @orassignstmt +| 33 = @xorassignstmt +| 34 = @shlassignstmt +| 35 = @shrassignstmt +| 36 = @andnotassignstmt; + +@incdecstmt = @incstmt | @decstmt; + +@assignment = @simpleassignstmt | @compoundassignstmt; + +@simpleassignstmt = @assignstmt | @definestmt; + +@compoundassignstmt = @addassignstmt | @subassignstmt | @mulassignstmt | @quoassignstmt | @remassignstmt + | @andassignstmt | @orassignstmt | @xorassignstmt | @shlassignstmt | @shrassignstmt | @andnotassignstmt; + +@branchstmt = @breakstmt | @continuestmt | @gotostmt | @fallthroughstmt; + +@switchstmt = @exprswitchstmt | @typeswitchstmt; + +@loopstmt = @forstmt | @rangestmt; + +case @decl.kind of + 0 = @baddecl +| 1 = @importdecl +| 2 = @constdecl +| 3 = @typedecl +| 4 = @vardecl +| 5 = @funcdecl; + +@gendecl = @importdecl | @constdecl | @typedecl | @vardecl; + +case @spec.kind of + 0 = @importspec +| 1 = @valuespec +| 2 = @typedefspec +| 3 = @aliasspec; + +@typespec = @typedefspec | @aliasspec; + +case @object.kind of + 0 = @pkgobject +| 1 = @decltypeobject +| 2 = @builtintypeobject +| 3 = @declconstobject +| 4 = @builtinconstobject +| 5 = @declvarobject +| 6 = @declfunctionobject +| 7 = @builtinfunctionobject +| 8 = @labelobject; + +@typeparamparentobject = @decltypeobject | @declfunctionobject; + +@declobject = @decltypeobject | @declconstobject | @declvarobject | @declfunctionobject; + +@builtinobject = @builtintypeobject | @builtinconstobject | @builtinfunctionobject; + +@typeobject = @decltypeobject | @builtintypeobject; + +@valueobject = @constobject | @varobject | @functionobject; + +@constobject = @declconstobject | @builtinconstobject; + +@varobject = @declvarobject; + +@functionobject = @declfunctionobject | @builtinfunctionobject; + +case @scope.kind of + 0 = @universescope +| 1 = @packagescope +| 2 = @localscope; + +case @type.kind of + 0 = @invalidtype +| 1 = @boolexprtype +| 2 = @inttype +| 3 = @int8type +| 4 = @int16type +| 5 = @int32type +| 6 = @int64type +| 7 = @uinttype +| 8 = @uint8type +| 9 = @uint16type +| 10 = @uint32type +| 11 = @uint64type +| 12 = @uintptrtype +| 13 = @float32type +| 14 = @float64type +| 15 = @complex64type +| 16 = @complex128type +| 17 = @stringexprtype +| 18 = @unsafepointertype +| 19 = @boolliteraltype +| 20 = @intliteraltype +| 21 = @runeliteraltype +| 22 = @floatliteraltype +| 23 = @complexliteraltype +| 24 = @stringliteraltype +| 25 = @nilliteraltype +| 26 = @typeparamtype +| 27 = @arraytype +| 28 = @slicetype +| 29 = @structtype +| 30 = @pointertype +| 31 = @interfacetype +| 32 = @tupletype +| 33 = @signaturetype +| 34 = @maptype +| 35 = @sendchantype +| 36 = @recvchantype +| 37 = @sendrcvchantype +| 38 = @namedtype +| 39 = @typesetliteraltype; + +@basictype = @booltype | @numerictype | @stringtype | @literaltype | @invalidtype | @unsafepointertype; + +@booltype = @boolexprtype | @boolliteraltype; + +@numerictype = @integertype | @floattype | @complextype; + +@integertype = @signedintegertype | @unsignedintegertype; + +@signedintegertype = @inttype | @int8type | @int16type | @int32type | @int64type | @intliteraltype | @runeliteraltype; + +@unsignedintegertype = @uinttype | @uint8type | @uint16type | @uint32type | @uint64type | @uintptrtype; + +@floattype = @float32type | @float64type | @floatliteraltype; + +@complextype = @complex64type | @complex128type | @complexliteraltype; + +@stringtype = @stringexprtype | @stringliteraltype; + +@literaltype = @boolliteraltype | @intliteraltype | @runeliteraltype | @floatliteraltype | @complexliteraltype + | @stringliteraltype | @nilliteraltype; + +@compositetype = @typeparamtype | @containertype | @structtype | @pointertype | @interfacetype | @tupletype + | @signaturetype | @namedtype | @typesetliteraltype; + +@containertype = @arraytype | @slicetype | @maptype | @chantype; + +@chantype = @sendchantype | @recvchantype | @sendrcvchantype; + +case @modexpr.kind of + 0 = @modcommentblock +| 1 = @modline +| 2 = @modlineblock +| 3 = @modlparen +| 4 = @modrparen; + +case @error.kind of + 0 = @unknownerror +| 1 = @listerror +| 2 = @parseerror +| 3 = @typeerror; + diff --git a/go/downgrades/e47462df302b3e58a60d2e21f99aba63f973326f/upgrade.properties b/go/downgrades/e47462df302b3e58a60d2e21f99aba63f973326f/upgrade.properties new file mode 100644 index 000000000000..976c2c81bfa4 --- /dev/null +++ b/go/downgrades/e47462df302b3e58a60d2e21f99aba63f973326f/upgrade.properties @@ -0,0 +1,5 @@ +description: Remove component-tags and interface-method-id tables +compatibility: full + +component_tags.rel: delete +interface_private_method_ids.rel: delete diff --git a/go/extractor/dbscheme/tables.go b/go/extractor/dbscheme/tables.go index e987cb402ae4..89cc7ffeadb0 100644 --- a/go/extractor/dbscheme/tables.go +++ b/go/extractor/dbscheme/tables.go @@ -1150,6 +1150,20 @@ var ComponentTypesTable = NewTable("component_types", EntityColumn(TypeType, "tp"), ).KeySet("parent", "index") +// ComponentTagsTable is the table associating composite types with their component types' tags +var ComponentTagsTable = NewTable("component_tags", + EntityColumn(CompositeType, "parent"), + IntColumn("index"), + StringColumn("tag"), +).KeySet("parent", "index") + +// InterfacePrivateMethodIdsTable is the table associating interface types with their private method ids +var InterfacePrivateMethodIdsTable = NewTable("interface_private_method_ids", + EntityColumn(InterfaceType, "interface"), + IntColumn("index"), + StringColumn("id"), +).KeySet("interface", "index") + // ArrayLengthTable is the table associating array types with their length (represented as a string // since Go array lengths are 64-bit and hence do not always fit into a QL integer) var ArrayLengthTable = NewTable("array_length", diff --git a/go/extractor/extractor.go b/go/extractor/extractor.go index b1d476d10948..33186a9380f8 100644 --- a/go/extractor/extractor.go +++ b/go/extractor/extractor.go @@ -1624,6 +1624,7 @@ func extractType(tw *trap.Writer, tp types.Type) trap.Label { name = "" } extractComponentType(tw, lbl, i, name, field.Type()) + dbscheme.ComponentTagsTable.Emit(tw, lbl, i, tp.Tag(i)) } case *types.Pointer: kind = dbscheme.PointerType.Index() @@ -1641,6 +1642,13 @@ func extractType(tw *trap.Writer, tp types.Type) trap.Label { extractMethod(tw, meth) extractComponentType(tw, lbl, i, meth.Name(), meth.Type()) + + // meth.Id() will be equal to meth.Name() for an exported method, or + // packge-qualified otherwise. + privateMethodId := meth.Id() + if privateMethodId != meth.Name() { + dbscheme.InterfacePrivateMethodIdsTable.Emit(tw, lbl, i, privateMethodId) + } } for i := 0; i < tp.NumEmbeddeds(); i++ { component := tp.EmbeddedType(i) diff --git a/go/ql/lib/go.dbscheme b/go/ql/lib/go.dbscheme index a58b81b1b4c4..e47462df302b 100644 --- a/go/ql/lib/go.dbscheme +++ b/go/ql/lib/go.dbscheme @@ -207,6 +207,12 @@ underlying_type(unique int named: @namedtype ref, int tp: @type ref); #keyset[parent, index] component_types(int parent: @compositetype ref, int index: int ref, string name: string ref, int tp: @type ref); +#keyset[parent, index] +component_tags(int parent: @compositetype ref, int index: int ref, string tag: string ref); + +#keyset[interface, index] +interface_private_method_ids(int interface: @interfacetype ref, int index: int ref, string id: string ref); + array_length(unique int tp: @arraytype ref, string len: string ref); type_objects(unique int tp: @type ref, int object: @object ref); diff --git a/go/ql/lib/semmle/go/Scopes.qll b/go/ql/lib/semmle/go/Scopes.qll index 7386b81868fc..32213d1efca3 100644 --- a/go/ql/lib/semmle/go/Scopes.qll +++ b/go/ql/lib/semmle/go/Scopes.qll @@ -385,6 +385,13 @@ class Field extends Variable { this = base.getField(f) ) } + + /** + * Gets the tag associated with this field, or the empty string if this field has no tag. + */ + string getTag() { + declaringType.hasOwnFieldWithTag(_, this.getName(), this.getType(), _, result) + } } /** diff --git a/go/ql/lib/semmle/go/Types.qll b/go/ql/lib/semmle/go/Types.qll index f7bb6afe3d7a..16e2c528ef47 100644 --- a/go/ql/lib/semmle/go/Types.qll +++ b/go/ql/lib/semmle/go/Types.qll @@ -457,6 +457,17 @@ class StructType extends @structtype, CompositeType { ) } + /** + * Holds if this struct contains a field `name` with type `tp` and tag `tag`; + * `isEmbedded` is true if the field is embedded. + * + * Note that this predicate does not take promoted fields into account. + */ + predicate hasOwnFieldWithTag(int i, string name, Type tp, boolean isEmbedded, string tag) { + this.hasOwnField(i, name, tp, isEmbedded) and + component_tags(this, i, tag) + } + /** * Get a field with the name `name`; `isEmbedded` is true if the field is embedded. * @@ -575,10 +586,12 @@ class StructType extends @structtype, CompositeType { override string pp() { result = "struct { " + - concat(int i, string name, Type tp | - component_types(this, i, name, tp) + concat(int i, string name, Type tp, string tag, string tagToPrint | + component_types(this, i, name, tp) and + component_tags(this, i, tag) and + (if tag = "" then tagToPrint = "" else tagToPrint = " `" + tag + "`") | - name + " " + tp.pp(), "; " order by i + name + " " + tp.pp() + tagToPrint, "; " order by i ) + " }" } @@ -747,6 +760,31 @@ class InterfaceType extends @interfacetype, CompositeType { exists(int i | i >= 0 | component_types(this, i, name, result)) } + /** + * Gets the type of method `id` of this interface type. + * + * This differs from `getMethodType` in that if the method is not exported, the `id` + * will be package-qualified. This means that the set of `id`s` together with any + * embedded types fully distinguishes the interface from any other, whereas the set + * of names matched by `getMethodName` may be ambiguous between interfaces with matching + * exported methods and unexported methods that have matching names but belong to + * different packages. + * + * For example, `interface { Exported() int; notExported() int }` declared in two + * different packages defines two distinct types, but they appear identical according to + * `getMethodType`. + */ + Type getMethodTypeById(string id) { + exists(int i, string name | i >= 0 | + component_types(this, i, name, result) and + ( + interface_private_method_ids(this, i, id) + or + name = id and not interface_private_method_ids(this, i, _) + ) + ) + } + override predicate hasMethod(string m, SignatureType t) { t = this.getMethodType(m) } /** diff --git a/go/ql/lib/upgrades/a58b81b1b4c4cccc8ca11731c1db86622f33af57/component_tags.ql b/go/ql/lib/upgrades/a58b81b1b4c4cccc8ca11731c1db86622f33af57/component_tags.ql new file mode 100644 index 000000000000..7efd29b4ea53 --- /dev/null +++ b/go/ql/lib/upgrades/a58b81b1b4c4cccc8ca11731c1db86622f33af57/component_tags.ql @@ -0,0 +1,7 @@ +class StructType extends @structtype { + string toString() { result = "struct type" } +} + +from StructType st, int index +where component_types(st, index, _, _) +select st, index, "" diff --git a/go/ql/lib/upgrades/a58b81b1b4c4cccc8ca11731c1db86622f33af57/go.dbscheme b/go/ql/lib/upgrades/a58b81b1b4c4cccc8ca11731c1db86622f33af57/go.dbscheme new file mode 100644 index 000000000000..e47462df302b --- /dev/null +++ b/go/ql/lib/upgrades/a58b81b1b4c4cccc8ca11731c1db86622f33af57/go.dbscheme @@ -0,0 +1,552 @@ +/** Auto-generated dbscheme; do not edit. */ + + +/** Duplicate code **/ + +duplicateCode( + unique int id : @duplication, + varchar(900) relativePath : string ref, + int equivClass : int ref); + +similarCode( + unique int id : @similarity, + varchar(900) relativePath : string ref, + int equivClass : int ref); + +@duplication_or_similarity = @duplication | @similarity; + +tokens( + int id : @duplication_or_similarity ref, + int offset : int ref, + int beginLine : int ref, + int beginColumn : int ref, + int endLine : int ref, + int endColumn : int ref); + +/** External data **/ + +externalData( + int id : @externalDataElement, + varchar(900) path : string ref, + int column: int ref, + varchar(900) value : string ref +); + +snapshotDate(unique date snapshotDate : date ref); + +sourceLocationPrefix(varchar(900) prefix : string ref); + + +/* + * XML Files + */ + +xmlEncoding( + unique int id: @file ref, + string encoding: string ref +); + +xmlDTDs( + unique int id: @xmldtd, + string root: string ref, + string publicId: string ref, + string systemId: string ref, + int fileid: @file ref +); + +xmlElements( + unique int id: @xmlelement, + string name: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int fileid: @file ref +); + +xmlAttrs( + unique int id: @xmlattribute, + int elementid: @xmlelement ref, + string name: string ref, + string value: string ref, + int idx: int ref, + int fileid: @file ref +); + +xmlNs( + int id: @xmlnamespace, + string prefixName: string ref, + string URI: string ref, + int fileid: @file ref +); + +xmlHasNs( + int elementId: @xmlnamespaceable ref, + int nsId: @xmlnamespace ref, + int fileid: @file ref +); + +xmlComments( + unique int id: @xmlcomment, + string text: string ref, + int parentid: @xmlparent ref, + int fileid: @file ref +); + +xmlChars( + unique int id: @xmlcharacters, + string text: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int isCDATA: int ref, + int fileid: @file ref +); + +@xmlparent = @file | @xmlelement; +@xmlnamespaceable = @xmlelement | @xmlattribute; + +xmllocations( + int xmlElement: @xmllocatable ref, + int location: @location_default ref +); + +@xmllocatable = @xmlcharacters | @xmlelement | @xmlcomment | @xmlattribute | @xmldtd | @file | @xmlnamespace; + +compilations(unique int id: @compilation, string cwd: string ref); + +#keyset[id, num] +compilation_args(int id: @compilation ref, int num: int ref, string arg: string ref); + +#keyset[id, num, kind] +compilation_time(int id: @compilation ref, int num: int ref, int kind: int ref, float secs: float ref); + +diagnostic_for(unique int diagnostic: @diagnostic ref, int compilation: @compilation ref, int file_number: int ref, int file_number_diagnostic_number: int ref); + +compilation_finished(unique int id: @compilation ref, float cpu_seconds: float ref, float elapsed_seconds: float ref); + +#keyset[id, num] +compilation_compiling_files(int id: @compilation ref, int num: int ref, int file: @file ref); + +diagnostics(unique int id: @diagnostic, int severity: int ref, string error_tag: string ref, string error_message: string ref, + string full_error_message: string ref, int location: @location ref); + +locations_default(unique int id: @location_default, int file: @file ref, int beginLine: int ref, int beginColumn: int ref, + int endLine: int ref, int endColumn: int ref); + +numlines(int element_id: @sourceline ref, int num_lines: int ref, int num_code: int ref, int num_comment: int ref); + +files(unique int id: @file, string name: string ref); + +folders(unique int id: @folder, string name: string ref); + +containerparent(int parent: @container ref, unique int child: @container ref); + +has_location(unique int locatable: @locatable ref, int location: @location ref); + +#keyset[parent, idx] +comment_groups(unique int id: @comment_group, int parent: @file ref, int idx: int ref); + +comments(unique int id: @comment, int kind: int ref, int parent: @comment_group ref, int idx: int ref, string text: string ref); + +doc_comments(unique int node: @documentable ref, int comment: @comment_group ref); + +#keyset[parent, idx] +exprs(unique int id: @expr, int kind: int ref, int parent: @exprparent ref, int idx: int ref); + +literals(unique int expr: @expr ref, string value: string ref, string raw: string ref); + +constvalues(unique int expr: @expr ref, string value: string ref, string exact: string ref); + +fields(unique int id: @field, int parent: @fieldparent ref, int idx: int ref); + +typeparamdecls(unique int id: @typeparamdecl, int parent: @typeparamdeclparent ref, int idx: int ref); + +#keyset[parent, idx] +stmts(unique int id: @stmt, int kind: int ref, int parent: @stmtparent ref, int idx: int ref); + +#keyset[parent, idx] +decls(unique int id: @decl, int kind: int ref, int parent: @declparent ref, int idx: int ref); + +#keyset[parent, idx] +specs(unique int id: @spec, int kind: int ref, int parent: @gendecl ref, int idx: int ref); + +scopes(unique int id: @scope, int kind: int ref); + +scopenesting(unique int inner: @scope ref, int outer: @scope ref); + +scopenodes(unique int node: @scopenode ref, int scope: @localscope ref); + +objects(unique int id: @object, int kind: int ref, string name: string ref); + +objectscopes(unique int object: @object ref, int scope: @scope ref); + +objecttypes(unique int object: @object ref, int tp: @type ref); + +methodreceivers(unique int method: @object ref, int receiver: @object ref); + +fieldstructs(unique int field: @object ref, int struct: @structtype ref); + +methodhosts(int method: @object ref, int host: @namedtype ref); + +defs(int ident: @ident ref, int object: @object ref); + +uses(int ident: @ident ref, int object: @object ref); + +types(unique int id: @type, int kind: int ref); + +type_of(unique int expr: @expr ref, int tp: @type ref); + +typename(unique int tp: @type ref, string name: string ref); + +key_type(unique int map: @maptype ref, int tp: @type ref); + +element_type(unique int container: @containertype ref, int tp: @type ref); + +base_type(unique int ptr: @pointertype ref, int tp: @type ref); + +underlying_type(unique int named: @namedtype ref, int tp: @type ref); + +#keyset[parent, index] +component_types(int parent: @compositetype ref, int index: int ref, string name: string ref, int tp: @type ref); + +#keyset[parent, index] +component_tags(int parent: @compositetype ref, int index: int ref, string tag: string ref); + +#keyset[interface, index] +interface_private_method_ids(int interface: @interfacetype ref, int index: int ref, string id: string ref); + +array_length(unique int tp: @arraytype ref, string len: string ref); + +type_objects(unique int tp: @type ref, int object: @object ref); + +packages(unique int id: @package, string name: string ref, string path: string ref, int scope: @packagescope ref); + +#keyset[parent, idx] +modexprs(unique int id: @modexpr, int kind: int ref, int parent: @modexprparent ref, int idx: int ref); + +#keyset[parent, idx] +modtokens(string token: string ref, int parent: @modexpr ref, int idx: int ref); + +#keyset[package, idx] +errors(unique int id: @error, int kind: int ref, string msg: string ref, string rawpos: string ref, + string file: string ref, int line: int ref, int col: int ref, int package: @package ref, int idx: int ref); + +has_ellipsis(int id: @callorconversionexpr ref); + +variadic(int id: @signaturetype ref); + +#keyset[parent, idx] +typeparam(unique int tp: @typeparamtype ref, string name: string ref, int bound: @compositetype ref, + int parent: @typeparamparentobject ref, int idx: int ref); + +@container = @file | @folder; + +@locatable = @xmllocatable | @node | @localscope; + +@node = @documentable | @exprparent | @modexprparent | @fieldparent | @stmtparent | @declparent | @typeparamdeclparent + | @scopenode | @comment_group | @comment; + +@documentable = @file | @field | @typeparamdecl | @spec | @gendecl | @funcdecl | @modexpr; + +@exprparent = @funcdef | @file | @expr | @field | @stmt | @decl | @typeparamdecl | @spec; + +@modexprparent = @file | @modexpr; + +@fieldparent = @decl | @structtypeexpr | @functypeexpr | @interfacetypeexpr; + +@stmtparent = @funcdef | @stmt | @decl; + +@declparent = @file | @declstmt; + +@typeparamdeclparent = @funcdecl | @typespec; + +@funcdef = @funclit | @funcdecl; + +@scopenode = @file | @functypeexpr | @blockstmt | @ifstmt | @caseclause | @switchstmt | @commclause | @loopstmt; + +@location = @location_default; + +@sourceline = @locatable; + +case @comment.kind of + 0 = @slashslashcomment +| 1 = @slashstarcomment; + +case @expr.kind of + 0 = @badexpr +| 1 = @ident +| 2 = @ellipsis +| 3 = @intlit +| 4 = @floatlit +| 5 = @imaglit +| 6 = @charlit +| 7 = @stringlit +| 8 = @funclit +| 9 = @compositelit +| 10 = @parenexpr +| 11 = @selectorexpr +| 12 = @indexexpr +| 13 = @genericfunctioninstantiationexpr +| 14 = @generictypeinstantiationexpr +| 15 = @sliceexpr +| 16 = @typeassertexpr +| 17 = @callorconversionexpr +| 18 = @starexpr +| 19 = @keyvalueexpr +| 20 = @arraytypeexpr +| 21 = @structtypeexpr +| 22 = @functypeexpr +| 23 = @interfacetypeexpr +| 24 = @maptypeexpr +| 25 = @typesetliteralexpr +| 26 = @plusexpr +| 27 = @minusexpr +| 28 = @notexpr +| 29 = @complementexpr +| 30 = @derefexpr +| 31 = @addressexpr +| 32 = @arrowexpr +| 33 = @lorexpr +| 34 = @landexpr +| 35 = @eqlexpr +| 36 = @neqexpr +| 37 = @lssexpr +| 38 = @leqexpr +| 39 = @gtrexpr +| 40 = @geqexpr +| 41 = @addexpr +| 42 = @subexpr +| 43 = @orexpr +| 44 = @xorexpr +| 45 = @mulexpr +| 46 = @quoexpr +| 47 = @remexpr +| 48 = @shlexpr +| 49 = @shrexpr +| 50 = @andexpr +| 51 = @andnotexpr +| 52 = @sendchantypeexpr +| 53 = @recvchantypeexpr +| 54 = @sendrcvchantypeexpr; + +@basiclit = @intlit | @floatlit | @imaglit | @charlit | @stringlit; + +@operatorexpr = @logicalexpr | @arithmeticexpr | @bitwiseexpr | @unaryexpr | @binaryexpr; + +@logicalexpr = @logicalunaryexpr | @logicalbinaryexpr; + +@arithmeticexpr = @arithmeticunaryexpr | @arithmeticbinaryexpr; + +@bitwiseexpr = @bitwiseunaryexpr | @bitwisebinaryexpr; + +@unaryexpr = @logicalunaryexpr | @bitwiseunaryexpr | @arithmeticunaryexpr | @derefexpr | @addressexpr | @arrowexpr; + +@logicalunaryexpr = @notexpr; + +@bitwiseunaryexpr = @complementexpr; + +@arithmeticunaryexpr = @plusexpr | @minusexpr; + +@binaryexpr = @logicalbinaryexpr | @bitwisebinaryexpr | @arithmeticbinaryexpr | @comparison; + +@logicalbinaryexpr = @lorexpr | @landexpr; + +@bitwisebinaryexpr = @shiftexpr | @orexpr | @xorexpr | @andexpr | @andnotexpr; + +@arithmeticbinaryexpr = @addexpr | @subexpr | @mulexpr | @quoexpr | @remexpr; + +@shiftexpr = @shlexpr | @shrexpr; + +@comparison = @equalitytest | @relationalcomparison; + +@equalitytest = @eqlexpr | @neqexpr; + +@relationalcomparison = @lssexpr | @leqexpr | @gtrexpr | @geqexpr; + +@chantypeexpr = @sendchantypeexpr | @recvchantypeexpr | @sendrcvchantypeexpr; + +case @stmt.kind of + 0 = @badstmt +| 1 = @declstmt +| 2 = @emptystmt +| 3 = @labeledstmt +| 4 = @exprstmt +| 5 = @sendstmt +| 6 = @incstmt +| 7 = @decstmt +| 8 = @gostmt +| 9 = @deferstmt +| 10 = @returnstmt +| 11 = @breakstmt +| 12 = @continuestmt +| 13 = @gotostmt +| 14 = @fallthroughstmt +| 15 = @blockstmt +| 16 = @ifstmt +| 17 = @caseclause +| 18 = @exprswitchstmt +| 19 = @typeswitchstmt +| 20 = @commclause +| 21 = @selectstmt +| 22 = @forstmt +| 23 = @rangestmt +| 24 = @assignstmt +| 25 = @definestmt +| 26 = @addassignstmt +| 27 = @subassignstmt +| 28 = @mulassignstmt +| 29 = @quoassignstmt +| 30 = @remassignstmt +| 31 = @andassignstmt +| 32 = @orassignstmt +| 33 = @xorassignstmt +| 34 = @shlassignstmt +| 35 = @shrassignstmt +| 36 = @andnotassignstmt; + +@incdecstmt = @incstmt | @decstmt; + +@assignment = @simpleassignstmt | @compoundassignstmt; + +@simpleassignstmt = @assignstmt | @definestmt; + +@compoundassignstmt = @addassignstmt | @subassignstmt | @mulassignstmt | @quoassignstmt | @remassignstmt + | @andassignstmt | @orassignstmt | @xorassignstmt | @shlassignstmt | @shrassignstmt | @andnotassignstmt; + +@branchstmt = @breakstmt | @continuestmt | @gotostmt | @fallthroughstmt; + +@switchstmt = @exprswitchstmt | @typeswitchstmt; + +@loopstmt = @forstmt | @rangestmt; + +case @decl.kind of + 0 = @baddecl +| 1 = @importdecl +| 2 = @constdecl +| 3 = @typedecl +| 4 = @vardecl +| 5 = @funcdecl; + +@gendecl = @importdecl | @constdecl | @typedecl | @vardecl; + +case @spec.kind of + 0 = @importspec +| 1 = @valuespec +| 2 = @typedefspec +| 3 = @aliasspec; + +@typespec = @typedefspec | @aliasspec; + +case @object.kind of + 0 = @pkgobject +| 1 = @decltypeobject +| 2 = @builtintypeobject +| 3 = @declconstobject +| 4 = @builtinconstobject +| 5 = @declvarobject +| 6 = @declfunctionobject +| 7 = @builtinfunctionobject +| 8 = @labelobject; + +@typeparamparentobject = @decltypeobject | @declfunctionobject; + +@declobject = @decltypeobject | @declconstobject | @declvarobject | @declfunctionobject; + +@builtinobject = @builtintypeobject | @builtinconstobject | @builtinfunctionobject; + +@typeobject = @decltypeobject | @builtintypeobject; + +@valueobject = @constobject | @varobject | @functionobject; + +@constobject = @declconstobject | @builtinconstobject; + +@varobject = @declvarobject; + +@functionobject = @declfunctionobject | @builtinfunctionobject; + +case @scope.kind of + 0 = @universescope +| 1 = @packagescope +| 2 = @localscope; + +case @type.kind of + 0 = @invalidtype +| 1 = @boolexprtype +| 2 = @inttype +| 3 = @int8type +| 4 = @int16type +| 5 = @int32type +| 6 = @int64type +| 7 = @uinttype +| 8 = @uint8type +| 9 = @uint16type +| 10 = @uint32type +| 11 = @uint64type +| 12 = @uintptrtype +| 13 = @float32type +| 14 = @float64type +| 15 = @complex64type +| 16 = @complex128type +| 17 = @stringexprtype +| 18 = @unsafepointertype +| 19 = @boolliteraltype +| 20 = @intliteraltype +| 21 = @runeliteraltype +| 22 = @floatliteraltype +| 23 = @complexliteraltype +| 24 = @stringliteraltype +| 25 = @nilliteraltype +| 26 = @typeparamtype +| 27 = @arraytype +| 28 = @slicetype +| 29 = @structtype +| 30 = @pointertype +| 31 = @interfacetype +| 32 = @tupletype +| 33 = @signaturetype +| 34 = @maptype +| 35 = @sendchantype +| 36 = @recvchantype +| 37 = @sendrcvchantype +| 38 = @namedtype +| 39 = @typesetliteraltype; + +@basictype = @booltype | @numerictype | @stringtype | @literaltype | @invalidtype | @unsafepointertype; + +@booltype = @boolexprtype | @boolliteraltype; + +@numerictype = @integertype | @floattype | @complextype; + +@integertype = @signedintegertype | @unsignedintegertype; + +@signedintegertype = @inttype | @int8type | @int16type | @int32type | @int64type | @intliteraltype | @runeliteraltype; + +@unsignedintegertype = @uinttype | @uint8type | @uint16type | @uint32type | @uint64type | @uintptrtype; + +@floattype = @float32type | @float64type | @floatliteraltype; + +@complextype = @complex64type | @complex128type | @complexliteraltype; + +@stringtype = @stringexprtype | @stringliteraltype; + +@literaltype = @boolliteraltype | @intliteraltype | @runeliteraltype | @floatliteraltype | @complexliteraltype + | @stringliteraltype | @nilliteraltype; + +@compositetype = @typeparamtype | @containertype | @structtype | @pointertype | @interfacetype | @tupletype + | @signaturetype | @namedtype | @typesetliteraltype; + +@containertype = @arraytype | @slicetype | @maptype | @chantype; + +@chantype = @sendchantype | @recvchantype | @sendrcvchantype; + +case @modexpr.kind of + 0 = @modcommentblock +| 1 = @modline +| 2 = @modlineblock +| 3 = @modlparen +| 4 = @modrparen; + +case @error.kind of + 0 = @unknownerror +| 1 = @listerror +| 2 = @parseerror +| 3 = @typeerror; + diff --git a/go/ql/lib/upgrades/a58b81b1b4c4cccc8ca11731c1db86622f33af57/old.dbscheme b/go/ql/lib/upgrades/a58b81b1b4c4cccc8ca11731c1db86622f33af57/old.dbscheme new file mode 100644 index 000000000000..a58b81b1b4c4 --- /dev/null +++ b/go/ql/lib/upgrades/a58b81b1b4c4cccc8ca11731c1db86622f33af57/old.dbscheme @@ -0,0 +1,546 @@ +/** Auto-generated dbscheme; do not edit. */ + + +/** Duplicate code **/ + +duplicateCode( + unique int id : @duplication, + varchar(900) relativePath : string ref, + int equivClass : int ref); + +similarCode( + unique int id : @similarity, + varchar(900) relativePath : string ref, + int equivClass : int ref); + +@duplication_or_similarity = @duplication | @similarity; + +tokens( + int id : @duplication_or_similarity ref, + int offset : int ref, + int beginLine : int ref, + int beginColumn : int ref, + int endLine : int ref, + int endColumn : int ref); + +/** External data **/ + +externalData( + int id : @externalDataElement, + varchar(900) path : string ref, + int column: int ref, + varchar(900) value : string ref +); + +snapshotDate(unique date snapshotDate : date ref); + +sourceLocationPrefix(varchar(900) prefix : string ref); + + +/* + * XML Files + */ + +xmlEncoding( + unique int id: @file ref, + string encoding: string ref +); + +xmlDTDs( + unique int id: @xmldtd, + string root: string ref, + string publicId: string ref, + string systemId: string ref, + int fileid: @file ref +); + +xmlElements( + unique int id: @xmlelement, + string name: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int fileid: @file ref +); + +xmlAttrs( + unique int id: @xmlattribute, + int elementid: @xmlelement ref, + string name: string ref, + string value: string ref, + int idx: int ref, + int fileid: @file ref +); + +xmlNs( + int id: @xmlnamespace, + string prefixName: string ref, + string URI: string ref, + int fileid: @file ref +); + +xmlHasNs( + int elementId: @xmlnamespaceable ref, + int nsId: @xmlnamespace ref, + int fileid: @file ref +); + +xmlComments( + unique int id: @xmlcomment, + string text: string ref, + int parentid: @xmlparent ref, + int fileid: @file ref +); + +xmlChars( + unique int id: @xmlcharacters, + string text: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int isCDATA: int ref, + int fileid: @file ref +); + +@xmlparent = @file | @xmlelement; +@xmlnamespaceable = @xmlelement | @xmlattribute; + +xmllocations( + int xmlElement: @xmllocatable ref, + int location: @location_default ref +); + +@xmllocatable = @xmlcharacters | @xmlelement | @xmlcomment | @xmlattribute | @xmldtd | @file | @xmlnamespace; + +compilations(unique int id: @compilation, string cwd: string ref); + +#keyset[id, num] +compilation_args(int id: @compilation ref, int num: int ref, string arg: string ref); + +#keyset[id, num, kind] +compilation_time(int id: @compilation ref, int num: int ref, int kind: int ref, float secs: float ref); + +diagnostic_for(unique int diagnostic: @diagnostic ref, int compilation: @compilation ref, int file_number: int ref, int file_number_diagnostic_number: int ref); + +compilation_finished(unique int id: @compilation ref, float cpu_seconds: float ref, float elapsed_seconds: float ref); + +#keyset[id, num] +compilation_compiling_files(int id: @compilation ref, int num: int ref, int file: @file ref); + +diagnostics(unique int id: @diagnostic, int severity: int ref, string error_tag: string ref, string error_message: string ref, + string full_error_message: string ref, int location: @location ref); + +locations_default(unique int id: @location_default, int file: @file ref, int beginLine: int ref, int beginColumn: int ref, + int endLine: int ref, int endColumn: int ref); + +numlines(int element_id: @sourceline ref, int num_lines: int ref, int num_code: int ref, int num_comment: int ref); + +files(unique int id: @file, string name: string ref); + +folders(unique int id: @folder, string name: string ref); + +containerparent(int parent: @container ref, unique int child: @container ref); + +has_location(unique int locatable: @locatable ref, int location: @location ref); + +#keyset[parent, idx] +comment_groups(unique int id: @comment_group, int parent: @file ref, int idx: int ref); + +comments(unique int id: @comment, int kind: int ref, int parent: @comment_group ref, int idx: int ref, string text: string ref); + +doc_comments(unique int node: @documentable ref, int comment: @comment_group ref); + +#keyset[parent, idx] +exprs(unique int id: @expr, int kind: int ref, int parent: @exprparent ref, int idx: int ref); + +literals(unique int expr: @expr ref, string value: string ref, string raw: string ref); + +constvalues(unique int expr: @expr ref, string value: string ref, string exact: string ref); + +fields(unique int id: @field, int parent: @fieldparent ref, int idx: int ref); + +typeparamdecls(unique int id: @typeparamdecl, int parent: @typeparamdeclparent ref, int idx: int ref); + +#keyset[parent, idx] +stmts(unique int id: @stmt, int kind: int ref, int parent: @stmtparent ref, int idx: int ref); + +#keyset[parent, idx] +decls(unique int id: @decl, int kind: int ref, int parent: @declparent ref, int idx: int ref); + +#keyset[parent, idx] +specs(unique int id: @spec, int kind: int ref, int parent: @gendecl ref, int idx: int ref); + +scopes(unique int id: @scope, int kind: int ref); + +scopenesting(unique int inner: @scope ref, int outer: @scope ref); + +scopenodes(unique int node: @scopenode ref, int scope: @localscope ref); + +objects(unique int id: @object, int kind: int ref, string name: string ref); + +objectscopes(unique int object: @object ref, int scope: @scope ref); + +objecttypes(unique int object: @object ref, int tp: @type ref); + +methodreceivers(unique int method: @object ref, int receiver: @object ref); + +fieldstructs(unique int field: @object ref, int struct: @structtype ref); + +methodhosts(int method: @object ref, int host: @namedtype ref); + +defs(int ident: @ident ref, int object: @object ref); + +uses(int ident: @ident ref, int object: @object ref); + +types(unique int id: @type, int kind: int ref); + +type_of(unique int expr: @expr ref, int tp: @type ref); + +typename(unique int tp: @type ref, string name: string ref); + +key_type(unique int map: @maptype ref, int tp: @type ref); + +element_type(unique int container: @containertype ref, int tp: @type ref); + +base_type(unique int ptr: @pointertype ref, int tp: @type ref); + +underlying_type(unique int named: @namedtype ref, int tp: @type ref); + +#keyset[parent, index] +component_types(int parent: @compositetype ref, int index: int ref, string name: string ref, int tp: @type ref); + +array_length(unique int tp: @arraytype ref, string len: string ref); + +type_objects(unique int tp: @type ref, int object: @object ref); + +packages(unique int id: @package, string name: string ref, string path: string ref, int scope: @packagescope ref); + +#keyset[parent, idx] +modexprs(unique int id: @modexpr, int kind: int ref, int parent: @modexprparent ref, int idx: int ref); + +#keyset[parent, idx] +modtokens(string token: string ref, int parent: @modexpr ref, int idx: int ref); + +#keyset[package, idx] +errors(unique int id: @error, int kind: int ref, string msg: string ref, string rawpos: string ref, + string file: string ref, int line: int ref, int col: int ref, int package: @package ref, int idx: int ref); + +has_ellipsis(int id: @callorconversionexpr ref); + +variadic(int id: @signaturetype ref); + +#keyset[parent, idx] +typeparam(unique int tp: @typeparamtype ref, string name: string ref, int bound: @compositetype ref, + int parent: @typeparamparentobject ref, int idx: int ref); + +@container = @file | @folder; + +@locatable = @xmllocatable | @node | @localscope; + +@node = @documentable | @exprparent | @modexprparent | @fieldparent | @stmtparent | @declparent | @typeparamdeclparent + | @scopenode | @comment_group | @comment; + +@documentable = @file | @field | @typeparamdecl | @spec | @gendecl | @funcdecl | @modexpr; + +@exprparent = @funcdef | @file | @expr | @field | @stmt | @decl | @typeparamdecl | @spec; + +@modexprparent = @file | @modexpr; + +@fieldparent = @decl | @structtypeexpr | @functypeexpr | @interfacetypeexpr; + +@stmtparent = @funcdef | @stmt | @decl; + +@declparent = @file | @declstmt; + +@typeparamdeclparent = @funcdecl | @typespec; + +@funcdef = @funclit | @funcdecl; + +@scopenode = @file | @functypeexpr | @blockstmt | @ifstmt | @caseclause | @switchstmt | @commclause | @loopstmt; + +@location = @location_default; + +@sourceline = @locatable; + +case @comment.kind of + 0 = @slashslashcomment +| 1 = @slashstarcomment; + +case @expr.kind of + 0 = @badexpr +| 1 = @ident +| 2 = @ellipsis +| 3 = @intlit +| 4 = @floatlit +| 5 = @imaglit +| 6 = @charlit +| 7 = @stringlit +| 8 = @funclit +| 9 = @compositelit +| 10 = @parenexpr +| 11 = @selectorexpr +| 12 = @indexexpr +| 13 = @genericfunctioninstantiationexpr +| 14 = @generictypeinstantiationexpr +| 15 = @sliceexpr +| 16 = @typeassertexpr +| 17 = @callorconversionexpr +| 18 = @starexpr +| 19 = @keyvalueexpr +| 20 = @arraytypeexpr +| 21 = @structtypeexpr +| 22 = @functypeexpr +| 23 = @interfacetypeexpr +| 24 = @maptypeexpr +| 25 = @typesetliteralexpr +| 26 = @plusexpr +| 27 = @minusexpr +| 28 = @notexpr +| 29 = @complementexpr +| 30 = @derefexpr +| 31 = @addressexpr +| 32 = @arrowexpr +| 33 = @lorexpr +| 34 = @landexpr +| 35 = @eqlexpr +| 36 = @neqexpr +| 37 = @lssexpr +| 38 = @leqexpr +| 39 = @gtrexpr +| 40 = @geqexpr +| 41 = @addexpr +| 42 = @subexpr +| 43 = @orexpr +| 44 = @xorexpr +| 45 = @mulexpr +| 46 = @quoexpr +| 47 = @remexpr +| 48 = @shlexpr +| 49 = @shrexpr +| 50 = @andexpr +| 51 = @andnotexpr +| 52 = @sendchantypeexpr +| 53 = @recvchantypeexpr +| 54 = @sendrcvchantypeexpr; + +@basiclit = @intlit | @floatlit | @imaglit | @charlit | @stringlit; + +@operatorexpr = @logicalexpr | @arithmeticexpr | @bitwiseexpr | @unaryexpr | @binaryexpr; + +@logicalexpr = @logicalunaryexpr | @logicalbinaryexpr; + +@arithmeticexpr = @arithmeticunaryexpr | @arithmeticbinaryexpr; + +@bitwiseexpr = @bitwiseunaryexpr | @bitwisebinaryexpr; + +@unaryexpr = @logicalunaryexpr | @bitwiseunaryexpr | @arithmeticunaryexpr | @derefexpr | @addressexpr | @arrowexpr; + +@logicalunaryexpr = @notexpr; + +@bitwiseunaryexpr = @complementexpr; + +@arithmeticunaryexpr = @plusexpr | @minusexpr; + +@binaryexpr = @logicalbinaryexpr | @bitwisebinaryexpr | @arithmeticbinaryexpr | @comparison; + +@logicalbinaryexpr = @lorexpr | @landexpr; + +@bitwisebinaryexpr = @shiftexpr | @orexpr | @xorexpr | @andexpr | @andnotexpr; + +@arithmeticbinaryexpr = @addexpr | @subexpr | @mulexpr | @quoexpr | @remexpr; + +@shiftexpr = @shlexpr | @shrexpr; + +@comparison = @equalitytest | @relationalcomparison; + +@equalitytest = @eqlexpr | @neqexpr; + +@relationalcomparison = @lssexpr | @leqexpr | @gtrexpr | @geqexpr; + +@chantypeexpr = @sendchantypeexpr | @recvchantypeexpr | @sendrcvchantypeexpr; + +case @stmt.kind of + 0 = @badstmt +| 1 = @declstmt +| 2 = @emptystmt +| 3 = @labeledstmt +| 4 = @exprstmt +| 5 = @sendstmt +| 6 = @incstmt +| 7 = @decstmt +| 8 = @gostmt +| 9 = @deferstmt +| 10 = @returnstmt +| 11 = @breakstmt +| 12 = @continuestmt +| 13 = @gotostmt +| 14 = @fallthroughstmt +| 15 = @blockstmt +| 16 = @ifstmt +| 17 = @caseclause +| 18 = @exprswitchstmt +| 19 = @typeswitchstmt +| 20 = @commclause +| 21 = @selectstmt +| 22 = @forstmt +| 23 = @rangestmt +| 24 = @assignstmt +| 25 = @definestmt +| 26 = @addassignstmt +| 27 = @subassignstmt +| 28 = @mulassignstmt +| 29 = @quoassignstmt +| 30 = @remassignstmt +| 31 = @andassignstmt +| 32 = @orassignstmt +| 33 = @xorassignstmt +| 34 = @shlassignstmt +| 35 = @shrassignstmt +| 36 = @andnotassignstmt; + +@incdecstmt = @incstmt | @decstmt; + +@assignment = @simpleassignstmt | @compoundassignstmt; + +@simpleassignstmt = @assignstmt | @definestmt; + +@compoundassignstmt = @addassignstmt | @subassignstmt | @mulassignstmt | @quoassignstmt | @remassignstmt + | @andassignstmt | @orassignstmt | @xorassignstmt | @shlassignstmt | @shrassignstmt | @andnotassignstmt; + +@branchstmt = @breakstmt | @continuestmt | @gotostmt | @fallthroughstmt; + +@switchstmt = @exprswitchstmt | @typeswitchstmt; + +@loopstmt = @forstmt | @rangestmt; + +case @decl.kind of + 0 = @baddecl +| 1 = @importdecl +| 2 = @constdecl +| 3 = @typedecl +| 4 = @vardecl +| 5 = @funcdecl; + +@gendecl = @importdecl | @constdecl | @typedecl | @vardecl; + +case @spec.kind of + 0 = @importspec +| 1 = @valuespec +| 2 = @typedefspec +| 3 = @aliasspec; + +@typespec = @typedefspec | @aliasspec; + +case @object.kind of + 0 = @pkgobject +| 1 = @decltypeobject +| 2 = @builtintypeobject +| 3 = @declconstobject +| 4 = @builtinconstobject +| 5 = @declvarobject +| 6 = @declfunctionobject +| 7 = @builtinfunctionobject +| 8 = @labelobject; + +@typeparamparentobject = @decltypeobject | @declfunctionobject; + +@declobject = @decltypeobject | @declconstobject | @declvarobject | @declfunctionobject; + +@builtinobject = @builtintypeobject | @builtinconstobject | @builtinfunctionobject; + +@typeobject = @decltypeobject | @builtintypeobject; + +@valueobject = @constobject | @varobject | @functionobject; + +@constobject = @declconstobject | @builtinconstobject; + +@varobject = @declvarobject; + +@functionobject = @declfunctionobject | @builtinfunctionobject; + +case @scope.kind of + 0 = @universescope +| 1 = @packagescope +| 2 = @localscope; + +case @type.kind of + 0 = @invalidtype +| 1 = @boolexprtype +| 2 = @inttype +| 3 = @int8type +| 4 = @int16type +| 5 = @int32type +| 6 = @int64type +| 7 = @uinttype +| 8 = @uint8type +| 9 = @uint16type +| 10 = @uint32type +| 11 = @uint64type +| 12 = @uintptrtype +| 13 = @float32type +| 14 = @float64type +| 15 = @complex64type +| 16 = @complex128type +| 17 = @stringexprtype +| 18 = @unsafepointertype +| 19 = @boolliteraltype +| 20 = @intliteraltype +| 21 = @runeliteraltype +| 22 = @floatliteraltype +| 23 = @complexliteraltype +| 24 = @stringliteraltype +| 25 = @nilliteraltype +| 26 = @typeparamtype +| 27 = @arraytype +| 28 = @slicetype +| 29 = @structtype +| 30 = @pointertype +| 31 = @interfacetype +| 32 = @tupletype +| 33 = @signaturetype +| 34 = @maptype +| 35 = @sendchantype +| 36 = @recvchantype +| 37 = @sendrcvchantype +| 38 = @namedtype +| 39 = @typesetliteraltype; + +@basictype = @booltype | @numerictype | @stringtype | @literaltype | @invalidtype | @unsafepointertype; + +@booltype = @boolexprtype | @boolliteraltype; + +@numerictype = @integertype | @floattype | @complextype; + +@integertype = @signedintegertype | @unsignedintegertype; + +@signedintegertype = @inttype | @int8type | @int16type | @int32type | @int64type | @intliteraltype | @runeliteraltype; + +@unsignedintegertype = @uinttype | @uint8type | @uint16type | @uint32type | @uint64type | @uintptrtype; + +@floattype = @float32type | @float64type | @floatliteraltype; + +@complextype = @complex64type | @complex128type | @complexliteraltype; + +@stringtype = @stringexprtype | @stringliteraltype; + +@literaltype = @boolliteraltype | @intliteraltype | @runeliteraltype | @floatliteraltype | @complexliteraltype + | @stringliteraltype | @nilliteraltype; + +@compositetype = @typeparamtype | @containertype | @structtype | @pointertype | @interfacetype | @tupletype + | @signaturetype | @namedtype | @typesetliteraltype; + +@containertype = @arraytype | @slicetype | @maptype | @chantype; + +@chantype = @sendchantype | @recvchantype | @sendrcvchantype; + +case @modexpr.kind of + 0 = @modcommentblock +| 1 = @modline +| 2 = @modlineblock +| 3 = @modlparen +| 4 = @modrparen; + +case @error.kind of + 0 = @unknownerror +| 1 = @listerror +| 2 = @parseerror +| 3 = @typeerror; + diff --git a/go/ql/lib/upgrades/a58b81b1b4c4cccc8ca11731c1db86622f33af57/upgrade.properties b/go/ql/lib/upgrades/a58b81b1b4c4cccc8ca11731c1db86622f33af57/upgrade.properties new file mode 100644 index 000000000000..5eacd9417fc7 --- /dev/null +++ b/go/ql/lib/upgrades/a58b81b1b4c4cccc8ca11731c1db86622f33af57/upgrade.properties @@ -0,0 +1,3 @@ +description: Add tables for struct tags and interface method IDs +compatibility: full +component_tags.rel: run component_tags.qlo diff --git a/go/ql/test/library-tests/semmle/go/Types/Field_getPackage.expected b/go/ql/test/library-tests/semmle/go/Types/Field_getPackage.expected index 758199c63523..50bd36a2174e 100644 --- a/go/ql/test/library-tests/semmle/go/Types/Field_getPackage.expected +++ b/go/ql/test/library-tests/semmle/go/Types/Field_getPackage.expected @@ -46,3 +46,7 @@ | pkg1/tst.go:30:2:30:5 | flag | package github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg1 | | pkg2/tst.go:4:2:4:2 | g | package github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg2 | | pkg2/tst.go:8:2:8:2 | g | package github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg2 | +| struct_tags.go:4:3:4:8 | field1 | package github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types | +| struct_tags.go:5:3:5:8 | field2 | package github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types | +| struct_tags.go:9:3:9:8 | field1 | package github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types | +| struct_tags.go:10:3:10:8 | field2 | package github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types | diff --git a/go/ql/test/library-tests/semmle/go/Types/Field_hasQualifiedName2.expected b/go/ql/test/library-tests/semmle/go/Types/Field_hasQualifiedName2.expected index 4c69f36880be..bfdde9bb82d0 100644 --- a/go/ql/test/library-tests/semmle/go/Types/Field_hasQualifiedName2.expected +++ b/go/ql/test/library-tests/semmle/go/Types/Field_hasQualifiedName2.expected @@ -64,3 +64,7 @@ | pkg2/tst.go:4:2:4:2 | g | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg2.T | g | | pkg2/tst.go:8:2:8:2 | g | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg2.G | g | | pkg2/tst.go:8:2:8:2 | g | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg2.T | g | +| struct_tags.go:4:3:4:8 | field1 | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types.S1 | field1 | +| struct_tags.go:5:3:5:8 | field2 | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types.S1 | field2 | +| struct_tags.go:9:3:9:8 | field1 | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types.S2 | field1 | +| struct_tags.go:10:3:10:8 | field2 | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types.S2 | field2 | diff --git a/go/ql/test/library-tests/semmle/go/Types/Field_hasQualifiedName3.expected b/go/ql/test/library-tests/semmle/go/Types/Field_hasQualifiedName3.expected index 4fe8aee19f4c..559bce80b73c 100644 --- a/go/ql/test/library-tests/semmle/go/Types/Field_hasQualifiedName3.expected +++ b/go/ql/test/library-tests/semmle/go/Types/Field_hasQualifiedName3.expected @@ -64,3 +64,7 @@ | pkg2/tst.go:4:2:4:2 | g | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg2 | T | g | | pkg2/tst.go:8:2:8:2 | g | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg2 | G | g | | pkg2/tst.go:8:2:8:2 | g | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg2 | T | g | +| struct_tags.go:4:3:4:8 | field1 | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types | S1 | field1 | +| struct_tags.go:5:3:5:8 | field2 | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types | S1 | field2 | +| struct_tags.go:9:3:9:8 | field1 | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types | S2 | field1 | +| struct_tags.go:10:3:10:8 | field2 | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types | S2 | field2 | diff --git a/go/ql/test/library-tests/semmle/go/Types/InterfaceIds.expected b/go/ql/test/library-tests/semmle/go/Types/InterfaceIds.expected new file mode 100644 index 000000000000..13f82aca2839 --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/Types/InterfaceIds.expected @@ -0,0 +1,2 @@ +| interface { Exported func() ; notExported func() } | func() | Exported | +| interface { Exported func() ; notExported func() } | func() | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg1.notExported | diff --git a/go/ql/test/library-tests/semmle/go/Types/InterfaceIds.ql b/go/ql/test/library-tests/semmle/go/Types/InterfaceIds.ql new file mode 100644 index 000000000000..b36e807aa3c3 --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/Types/InterfaceIds.ql @@ -0,0 +1,6 @@ +import go + +from NamedType nt, InterfaceType it, Type methodType, string id +where nt.getName() = "MixedExportedAndNot" and it = nt.getUnderlyingType() +and methodType = it.getMethodTypeById(id) +select it.pp(), methodType.pp(), id diff --git a/go/ql/test/library-tests/semmle/go/Types/MethodCount.expected b/go/ql/test/library-tests/semmle/go/Types/MethodCount.expected index 2b6dc32cada9..a91da6a8e90c 100644 --- a/go/ql/test/library-tests/semmle/go/Types/MethodCount.expected +++ b/go/ql/test/library-tests/semmle/go/Types/MethodCount.expected @@ -14,6 +14,7 @@ | C | 2 | | Foo | 1 | | GenericInterface | 1 | +| MixedExportedAndNot | 2 | | MyInterface | 17 | | T | 1 | | T3 | 1 | diff --git a/go/ql/test/library-tests/semmle/go/Types/MethodTypes.expected b/go/ql/test/library-tests/semmle/go/Types/MethodTypes.expected index da2e9c1eb308..50f66d1c4128 100644 --- a/go/ql/test/library-tests/semmle/go/Types/MethodTypes.expected +++ b/go/ql/test/library-tests/semmle/go/Types/MethodTypes.expected @@ -48,6 +48,8 @@ | pkg1/interfaces.go:26:6:26:14 | AExtended | m | func() | | pkg1/interfaces.go:26:6:26:14 | AExtended | n | func() | | pkg1/interfaces.go:31:6:31:7 | A2 | m | func() | +| pkg1/interfaces.go:35:6:35:24 | MixedExportedAndNot | Exported | func() | +| pkg1/interfaces.go:35:6:35:24 | MixedExportedAndNot | notExported | func() | | pkg1/tst.go:3:6:3:6 | T | half | func() Foo | | pkg1/tst.go:14:6:14:7 | T3 | half | func() Foo | | pkg1/tst.go:19:6:19:7 | T4 | half | func() Foo | diff --git a/go/ql/test/library-tests/semmle/go/Types/Method_hasQualifiedName2.expected b/go/ql/test/library-tests/semmle/go/Types/Method_hasQualifiedName2.expected index bf1bd76aa338..94b3a0759152 100644 --- a/go/ql/test/library-tests/semmle/go/Types/Method_hasQualifiedName2.expected +++ b/go/ql/test/library-tests/semmle/go/Types/Method_hasQualifiedName2.expected @@ -53,6 +53,8 @@ | pkg1/interfaces.go:14:2:14:2 | o | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg1.C | o | | pkg1/interfaces.go:28:2:28:2 | n | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg1.AExtended | n | | pkg1/interfaces.go:32:2:32:2 | m | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg1.A2 | m | +| pkg1/interfaces.go:36:2:36:9 | Exported | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg1.MixedExportedAndNot | Exported | +| pkg1/interfaces.go:37:2:37:12 | notExported | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg1.MixedExportedAndNot | notExported | | pkg1/tst.go:33:16:33:19 | half | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg1.Foo | half | | pkg1/tst.go:33:16:33:19 | half | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg1.T | half | | pkg1/tst.go:33:16:33:19 | half | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg1.T3 | half | diff --git a/go/ql/test/library-tests/semmle/go/Types/Method_hasQualifiedName3.expected b/go/ql/test/library-tests/semmle/go/Types/Method_hasQualifiedName3.expected index 24eac7cebc14..7a625f1ac93c 100644 --- a/go/ql/test/library-tests/semmle/go/Types/Method_hasQualifiedName3.expected +++ b/go/ql/test/library-tests/semmle/go/Types/Method_hasQualifiedName3.expected @@ -53,6 +53,8 @@ | pkg1/interfaces.go:14:2:14:2 | o | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg1 | C | o | | pkg1/interfaces.go:28:2:28:2 | n | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg1 | AExtended | n | | pkg1/interfaces.go:32:2:32:2 | m | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg1 | A2 | m | +| pkg1/interfaces.go:36:2:36:9 | Exported | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg1 | MixedExportedAndNot | Exported | +| pkg1/interfaces.go:37:2:37:12 | notExported | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg1 | MixedExportedAndNot | notExported | | pkg1/tst.go:33:16:33:19 | half | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg1 | Foo | half | | pkg1/tst.go:33:16:33:19 | half | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg1 | T | half | | pkg1/tst.go:33:16:33:19 | half | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg1 | T3 | half | diff --git a/go/ql/test/library-tests/semmle/go/Types/Methods.expected b/go/ql/test/library-tests/semmle/go/Types/Methods.expected index 8b2406ec8589..ac32d41d9ea9 100644 --- a/go/ql/test/library-tests/semmle/go/Types/Methods.expected +++ b/go/ql/test/library-tests/semmle/go/Types/Methods.expected @@ -24,6 +24,8 @@ | C | o | pkg1/interfaces.go:14:2:14:2 | o | | Foo | half | pkg1/tst.go:33:16:33:19 | half | | GenericInterface | GetT | generic.go:33:2:33:5 | GetT | +| MixedExportedAndNot | Exported | pkg1/interfaces.go:36:2:36:9 | Exported | +| MixedExportedAndNot | notExported | pkg1/interfaces.go:37:2:37:12 | notExported | | MyInterface | clone | generic.go:48:2:48:6 | clone | | MyInterface | dummy1 | generic.go:49:2:49:7 | dummy1 | | MyInterface | dummy2 | generic.go:50:2:50:7 | dummy2 | diff --git a/go/ql/test/library-tests/semmle/go/Types/QualifiedNames.expected b/go/ql/test/library-tests/semmle/go/Types/QualifiedNames.expected index bedfbc5fa00a..b2befe28a2d1 100644 --- a/go/ql/test/library-tests/semmle/go/Types/QualifiedNames.expected +++ b/go/ql/test/library-tests/semmle/go/Types/QualifiedNames.expected @@ -90,6 +90,7 @@ | pkg1/interfaces.go:21:6:21:7 | AC | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg1.AC | | pkg1/interfaces.go:26:6:26:14 | AExtended | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg1.AExtended | | pkg1/interfaces.go:31:6:31:7 | A2 | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg1.A2 | +| pkg1/interfaces.go:35:6:35:24 | MixedExportedAndNot | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg1.MixedExportedAndNot | | pkg1/tst.go:3:6:3:6 | T | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg1.T | | pkg1/tst.go:9:6:9:7 | T2 | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg1.T2 | | pkg1/tst.go:14:6:14:7 | T3 | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg1.T3 | @@ -98,3 +99,6 @@ | pkg1/tst.go:29:6:29:8 | Bar | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg1.Bar | | pkg2/tst.go:3:6:3:6 | T | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg2.T | | pkg2/tst.go:7:6:7:6 | G | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg2.G | +| pkg2/tst.go:11:6:11:24 | MixedExportedAndNot | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg2.MixedExportedAndNot | +| struct_tags.go:3:6:3:7 | S1 | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types.S1 | +| struct_tags.go:8:6:8:7 | S2 | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types.S2 | diff --git a/go/ql/test/library-tests/semmle/go/Types/StructFields.expected b/go/ql/test/library-tests/semmle/go/Types/StructFields.expected index 5bce8e1d7df1..a8194965721e 100644 --- a/go/ql/test/library-tests/semmle/go/Types/StructFields.expected +++ b/go/ql/test/library-tests/semmle/go/Types/StructFields.expected @@ -66,3 +66,7 @@ | pkg2/tst.go:3:6:3:6 | T | pkg2/tst.go:7:8:9:1 | struct type | g | int | | pkg2/tst.go:7:6:7:6 | G | pkg2/tst.go:3:8:5:1 | struct type | g | int | | pkg2/tst.go:7:6:7:6 | G | pkg2/tst.go:7:8:9:1 | struct type | g | int | +| struct_tags.go:3:6:3:7 | S1 | struct_tags.go:3:9:6:1 | struct type | field1 | int | +| struct_tags.go:3:6:3:7 | S1 | struct_tags.go:3:9:6:1 | struct type | field2 | int | +| struct_tags.go:8:6:8:7 | S2 | struct_tags.go:8:9:11:1 | struct type | field1 | int | +| struct_tags.go:8:6:8:7 | S2 | struct_tags.go:8:9:11:1 | struct type | field2 | int | diff --git a/go/ql/test/library-tests/semmle/go/Types/Types.expected b/go/ql/test/library-tests/semmle/go/Types/Types.expected index 3801769db02d..19cfb7bd4f2e 100644 --- a/go/ql/test/library-tests/semmle/go/Types/Types.expected +++ b/go/ql/test/library-tests/semmle/go/Types/Types.expected @@ -90,6 +90,7 @@ | pkg1/interfaces.go:21:6:21:7 | AC | AC | | pkg1/interfaces.go:26:6:26:14 | AExtended | AExtended | | pkg1/interfaces.go:31:6:31:7 | A2 | A2 | +| pkg1/interfaces.go:35:6:35:24 | MixedExportedAndNot | MixedExportedAndNot | | pkg1/tst.go:3:6:3:6 | T | T | | pkg1/tst.go:9:6:9:7 | T2 | T2 | | pkg1/tst.go:14:6:14:7 | T3 | T3 | @@ -98,3 +99,6 @@ | pkg1/tst.go:29:6:29:8 | Bar | Bar | | pkg2/tst.go:3:6:3:6 | T | T | | pkg2/tst.go:7:6:7:6 | G | G | +| pkg2/tst.go:11:6:11:24 | MixedExportedAndNot | MixedExportedAndNot | +| struct_tags.go:3:6:3:7 | S1 | S1 | +| struct_tags.go:8:6:8:7 | S2 | S2 | diff --git a/go/ql/test/library-tests/semmle/go/Types/pkg1/interfaces.go b/go/ql/test/library-tests/semmle/go/Types/pkg1/interfaces.go index caeb62ea40ca..81a5e5854072 100644 --- a/go/ql/test/library-tests/semmle/go/Types/pkg1/interfaces.go +++ b/go/ql/test/library-tests/semmle/go/Types/pkg1/interfaces.go @@ -31,3 +31,8 @@ type AExtended interface { type A2 interface { m() } + +type MixedExportedAndNot interface { + Exported() + notExported() +} diff --git a/go/ql/test/library-tests/semmle/go/Types/pkg2/tst.go b/go/ql/test/library-tests/semmle/go/Types/pkg2/tst.go index 7f6f7f2d2877..bb4139c3b5a6 100644 --- a/go/ql/test/library-tests/semmle/go/Types/pkg2/tst.go +++ b/go/ql/test/library-tests/semmle/go/Types/pkg2/tst.go @@ -7,3 +7,8 @@ type T struct { type G struct { g int } + +type MixedExportedAndNot { + Exported() + notExported() +} diff --git a/go/ql/test/library-tests/semmle/go/Types/struct_tags.expected b/go/ql/test/library-tests/semmle/go/Types/struct_tags.expected new file mode 100644 index 000000000000..d0668076d5fe --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/Types/struct_tags.expected @@ -0,0 +1,4 @@ +| struct { field1 int `tag1a`; field2 int `tag2a` } | struct_tags.go:4:3:4:8 | field1 | tag1a | +| struct { field1 int `tag1a`; field2 int `tag2a` } | struct_tags.go:5:3:5:8 | field2 | tag2a | +| struct { field1 int `tag1b`; field2 int `tag2b` } | struct_tags.go:9:3:9:8 | field1 | tag1b | +| struct { field1 int `tag1b`; field2 int `tag2b` } | struct_tags.go:10:3:10:8 | field2 | tag2b | diff --git a/go/ql/test/library-tests/semmle/go/Types/struct_tags.go b/go/ql/test/library-tests/semmle/go/Types/struct_tags.go new file mode 100644 index 000000000000..ae3efaf8dcbf --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/Types/struct_tags.go @@ -0,0 +1,11 @@ +package main + +type S1 struct { + field1 int `tag1a` + field2 int `tag2a` +} + +type S2 struct { + field1 int `tag1b` + field2 int `tag2b` +} diff --git a/go/ql/test/library-tests/semmle/go/Types/struct_tags.ql b/go/ql/test/library-tests/semmle/go/Types/struct_tags.ql new file mode 100644 index 000000000000..4eb120e9f03a --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/Types/struct_tags.ql @@ -0,0 +1,6 @@ +import go + +from StructType s, Field f, string tag +where f = s.getOwnField(_, _) and tag = f.getTag() +and tag != "" +select s.pp(), f, tag From 9bb2a4bfcea5acffdd3bb966540044add5d3abd3 Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Tue, 3 Sep 2024 12:17:51 +0100 Subject: [PATCH 02/23] Change note --- go/ql/lib/change-notes/2024-09-03-tags-and-interface-ids.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 go/ql/lib/change-notes/2024-09-03-tags-and-interface-ids.md diff --git a/go/ql/lib/change-notes/2024-09-03-tags-and-interface-ids.md b/go/ql/lib/change-notes/2024-09-03-tags-and-interface-ids.md new file mode 100644 index 000000000000..2baa8cd6da2c --- /dev/null +++ b/go/ql/lib/change-notes/2024-09-03-tags-and-interface-ids.md @@ -0,0 +1,5 @@ +--- +category: minorAnalysis +--- +* Added methods `StructTag.hasOwnFieldWithTag` and `Field.getTag`, which enable CodeQL queries to examine struct field tags. +* Added method `InterfaceType.getMethodTypeById`, which enables CodeQL queries to distinguish interfaces with matching non-exported method names that are declared in different packages, and are therefore incompatible. From 22ed2f9ae38804f92f9acf9aa393d08ac4cd5cbc Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Tue, 3 Sep 2024 12:27:12 +0100 Subject: [PATCH 03/23] Autoformat CodeQL --- go/ql/lib/semmle/go/Scopes.qll | 4 +--- go/ql/test/library-tests/semmle/go/Types/InterfaceIds.ql | 6 ++++-- go/ql/test/library-tests/semmle/go/Types/struct_tags.ql | 6 ++++-- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/go/ql/lib/semmle/go/Scopes.qll b/go/ql/lib/semmle/go/Scopes.qll index 32213d1efca3..82785b00cdc6 100644 --- a/go/ql/lib/semmle/go/Scopes.qll +++ b/go/ql/lib/semmle/go/Scopes.qll @@ -389,9 +389,7 @@ class Field extends Variable { /** * Gets the tag associated with this field, or the empty string if this field has no tag. */ - string getTag() { - declaringType.hasOwnFieldWithTag(_, this.getName(), this.getType(), _, result) - } + string getTag() { declaringType.hasOwnFieldWithTag(_, this.getName(), this.getType(), _, result) } } /** diff --git a/go/ql/test/library-tests/semmle/go/Types/InterfaceIds.ql b/go/ql/test/library-tests/semmle/go/Types/InterfaceIds.ql index b36e807aa3c3..5b04b068e6ba 100644 --- a/go/ql/test/library-tests/semmle/go/Types/InterfaceIds.ql +++ b/go/ql/test/library-tests/semmle/go/Types/InterfaceIds.ql @@ -1,6 +1,8 @@ import go from NamedType nt, InterfaceType it, Type methodType, string id -where nt.getName() = "MixedExportedAndNot" and it = nt.getUnderlyingType() -and methodType = it.getMethodTypeById(id) +where + nt.getName() = "MixedExportedAndNot" and + it = nt.getUnderlyingType() and + methodType = it.getMethodTypeById(id) select it.pp(), methodType.pp(), id diff --git a/go/ql/test/library-tests/semmle/go/Types/struct_tags.ql b/go/ql/test/library-tests/semmle/go/Types/struct_tags.ql index 4eb120e9f03a..05ce098aed4b 100644 --- a/go/ql/test/library-tests/semmle/go/Types/struct_tags.ql +++ b/go/ql/test/library-tests/semmle/go/Types/struct_tags.ql @@ -1,6 +1,8 @@ import go from StructType s, Field f, string tag -where f = s.getOwnField(_, _) and tag = f.getTag() -and tag != "" +where + f = s.getOwnField(_, _) and + tag = f.getTag() and + tag != "" select s.pp(), f, tag From 5d14070cd4f89919839bc9452f04f92ae217417d Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Tue, 3 Sep 2024 12:44:33 +0100 Subject: [PATCH 04/23] Fix test file --- go/ql/test/library-tests/semmle/go/Types/InterfaceIds.expected | 1 + go/ql/test/library-tests/semmle/go/Types/MethodTypes.expected | 2 ++ .../semmle/go/Types/Method_hasQualifiedName2.expected | 2 ++ .../semmle/go/Types/Method_hasQualifiedName3.expected | 2 ++ go/ql/test/library-tests/semmle/go/Types/Methods.expected | 2 ++ go/ql/test/library-tests/semmle/go/Types/pkg2/tst.go | 2 +- 6 files changed, 10 insertions(+), 1 deletion(-) diff --git a/go/ql/test/library-tests/semmle/go/Types/InterfaceIds.expected b/go/ql/test/library-tests/semmle/go/Types/InterfaceIds.expected index 13f82aca2839..9bcfcde1db96 100644 --- a/go/ql/test/library-tests/semmle/go/Types/InterfaceIds.expected +++ b/go/ql/test/library-tests/semmle/go/Types/InterfaceIds.expected @@ -1,2 +1,3 @@ | interface { Exported func() ; notExported func() } | func() | Exported | | interface { Exported func() ; notExported func() } | func() | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg1.notExported | +| interface { Exported func() ; notExported func() } | func() | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg2.notExported | diff --git a/go/ql/test/library-tests/semmle/go/Types/MethodTypes.expected b/go/ql/test/library-tests/semmle/go/Types/MethodTypes.expected index 50f66d1c4128..695f2cb7e906 100644 --- a/go/ql/test/library-tests/semmle/go/Types/MethodTypes.expected +++ b/go/ql/test/library-tests/semmle/go/Types/MethodTypes.expected @@ -53,3 +53,5 @@ | pkg1/tst.go:3:6:3:6 | T | half | func() Foo | | pkg1/tst.go:14:6:14:7 | T3 | half | func() Foo | | pkg1/tst.go:19:6:19:7 | T4 | half | func() Foo | +| pkg2/tst.go:11:6:11:24 | MixedExportedAndNot | Exported | func() | +| pkg2/tst.go:11:6:11:24 | MixedExportedAndNot | notExported | func() | diff --git a/go/ql/test/library-tests/semmle/go/Types/Method_hasQualifiedName2.expected b/go/ql/test/library-tests/semmle/go/Types/Method_hasQualifiedName2.expected index 94b3a0759152..41b744e78e7f 100644 --- a/go/ql/test/library-tests/semmle/go/Types/Method_hasQualifiedName2.expected +++ b/go/ql/test/library-tests/semmle/go/Types/Method_hasQualifiedName2.expected @@ -59,3 +59,5 @@ | pkg1/tst.go:33:16:33:19 | half | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg1.T | half | | pkg1/tst.go:33:16:33:19 | half | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg1.T3 | half | | pkg1/tst.go:33:16:33:19 | half | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg1.T4 | half | +| pkg2/tst.go:12:9:12:16 | Exported | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg2.MixedExportedAndNot | Exported | +| pkg2/tst.go:13:9:13:19 | notExported | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg2.MixedExportedAndNot | notExported | diff --git a/go/ql/test/library-tests/semmle/go/Types/Method_hasQualifiedName3.expected b/go/ql/test/library-tests/semmle/go/Types/Method_hasQualifiedName3.expected index 7a625f1ac93c..c0aa74196854 100644 --- a/go/ql/test/library-tests/semmle/go/Types/Method_hasQualifiedName3.expected +++ b/go/ql/test/library-tests/semmle/go/Types/Method_hasQualifiedName3.expected @@ -59,3 +59,5 @@ | pkg1/tst.go:33:16:33:19 | half | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg1 | T | half | | pkg1/tst.go:33:16:33:19 | half | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg1 | T3 | half | | pkg1/tst.go:33:16:33:19 | half | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg1 | T4 | half | +| pkg2/tst.go:12:9:12:16 | Exported | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg2 | MixedExportedAndNot | Exported | +| pkg2/tst.go:13:9:13:19 | notExported | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg2 | MixedExportedAndNot | notExported | diff --git a/go/ql/test/library-tests/semmle/go/Types/Methods.expected b/go/ql/test/library-tests/semmle/go/Types/Methods.expected index ac32d41d9ea9..914b29bdcfb1 100644 --- a/go/ql/test/library-tests/semmle/go/Types/Methods.expected +++ b/go/ql/test/library-tests/semmle/go/Types/Methods.expected @@ -25,7 +25,9 @@ | Foo | half | pkg1/tst.go:33:16:33:19 | half | | GenericInterface | GetT | generic.go:33:2:33:5 | GetT | | MixedExportedAndNot | Exported | pkg1/interfaces.go:36:2:36:9 | Exported | +| MixedExportedAndNot | Exported | pkg2/tst.go:12:9:12:16 | Exported | | MixedExportedAndNot | notExported | pkg1/interfaces.go:37:2:37:12 | notExported | +| MixedExportedAndNot | notExported | pkg2/tst.go:13:9:13:19 | notExported | | MyInterface | clone | generic.go:48:2:48:6 | clone | | MyInterface | dummy1 | generic.go:49:2:49:7 | dummy1 | | MyInterface | dummy2 | generic.go:50:2:50:7 | dummy2 | diff --git a/go/ql/test/library-tests/semmle/go/Types/pkg2/tst.go b/go/ql/test/library-tests/semmle/go/Types/pkg2/tst.go index bb4139c3b5a6..b5f00526671f 100644 --- a/go/ql/test/library-tests/semmle/go/Types/pkg2/tst.go +++ b/go/ql/test/library-tests/semmle/go/Types/pkg2/tst.go @@ -8,7 +8,7 @@ type G struct { g int } -type MixedExportedAndNot { +type MixedExportedAndNot interface { Exported() notExported() } From 7a7ff4a91ea24c06be2ffd016373119c1e282968 Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Mon, 30 Sep 2024 16:33:26 +0100 Subject: [PATCH 05/23] Apply review comments --- .../go.dbscheme | 0 .../old.dbscheme | 2 +- .../upgrade.properties | 0 go/extractor/dbscheme/tables.go | 6 ++-- go/extractor/extractor.go | 11 +++---- .../2024-09-03-tags-and-interface-ids.md | 4 +-- go/ql/lib/go.dbscheme | 2 +- go/ql/lib/semmle/go/Types.qll | 31 ++++++++++++------- .../go.dbscheme | 2 +- ...s.expected => InterfaceMethodIds.expected} | 0 ...{InterfaceIds.ql => InterfaceMethodIds.ql} | 2 +- 11 files changed, 34 insertions(+), 26 deletions(-) rename go/downgrades/{e47462df302b3e58a60d2e21f99aba63f973326f => d2066c23fe3de023d76d7e5a52dec6771d308534}/go.dbscheme (100%) rename go/downgrades/{e47462df302b3e58a60d2e21f99aba63f973326f => d2066c23fe3de023d76d7e5a52dec6771d308534}/old.dbscheme (99%) rename go/downgrades/{e47462df302b3e58a60d2e21f99aba63f973326f => d2066c23fe3de023d76d7e5a52dec6771d308534}/upgrade.properties (100%) rename go/ql/test/library-tests/semmle/go/Types/{InterfaceIds.expected => InterfaceMethodIds.expected} (100%) rename go/ql/test/library-tests/semmle/go/Types/{InterfaceIds.ql => InterfaceMethodIds.ql} (79%) diff --git a/go/downgrades/e47462df302b3e58a60d2e21f99aba63f973326f/go.dbscheme b/go/downgrades/d2066c23fe3de023d76d7e5a52dec6771d308534/go.dbscheme similarity index 100% rename from go/downgrades/e47462df302b3e58a60d2e21f99aba63f973326f/go.dbscheme rename to go/downgrades/d2066c23fe3de023d76d7e5a52dec6771d308534/go.dbscheme diff --git a/go/downgrades/e47462df302b3e58a60d2e21f99aba63f973326f/old.dbscheme b/go/downgrades/d2066c23fe3de023d76d7e5a52dec6771d308534/old.dbscheme similarity index 99% rename from go/downgrades/e47462df302b3e58a60d2e21f99aba63f973326f/old.dbscheme rename to go/downgrades/d2066c23fe3de023d76d7e5a52dec6771d308534/old.dbscheme index e47462df302b..d2066c23fe3d 100644 --- a/go/downgrades/e47462df302b3e58a60d2e21f99aba63f973326f/old.dbscheme +++ b/go/downgrades/d2066c23fe3de023d76d7e5a52dec6771d308534/old.dbscheme @@ -208,7 +208,7 @@ underlying_type(unique int named: @namedtype ref, int tp: @type ref); component_types(int parent: @compositetype ref, int index: int ref, string name: string ref, int tp: @type ref); #keyset[parent, index] -component_tags(int parent: @compositetype ref, int index: int ref, string tag: string ref); +component_tags(int parent: @structtype ref, int index: int ref, string tag: string ref); #keyset[interface, index] interface_private_method_ids(int interface: @interfacetype ref, int index: int ref, string id: string ref); diff --git a/go/downgrades/e47462df302b3e58a60d2e21f99aba63f973326f/upgrade.properties b/go/downgrades/d2066c23fe3de023d76d7e5a52dec6771d308534/upgrade.properties similarity index 100% rename from go/downgrades/e47462df302b3e58a60d2e21f99aba63f973326f/upgrade.properties rename to go/downgrades/d2066c23fe3de023d76d7e5a52dec6771d308534/upgrade.properties diff --git a/go/extractor/dbscheme/tables.go b/go/extractor/dbscheme/tables.go index 89cc7ffeadb0..ec74c7a2c0d7 100644 --- a/go/extractor/dbscheme/tables.go +++ b/go/extractor/dbscheme/tables.go @@ -1150,14 +1150,14 @@ var ComponentTypesTable = NewTable("component_types", EntityColumn(TypeType, "tp"), ).KeySet("parent", "index") -// ComponentTagsTable is the table associating composite types with their component types' tags +// ComponentTagsTable is the table associating struct types with their component types' tags var ComponentTagsTable = NewTable("component_tags", - EntityColumn(CompositeType, "parent"), + EntityColumn(StructType, "parent"), IntColumn("index"), StringColumn("tag"), ).KeySet("parent", "index") -// InterfacePrivateMethodIdsTable is the table associating interface types with their private method ids +// InterfacePrivateMethodIdsTable is the table associating interface types with the indices and ids of their private methods. var InterfacePrivateMethodIdsTable = NewTable("interface_private_method_ids", EntityColumn(InterfaceType, "interface"), IntColumn("index"), diff --git a/go/extractor/extractor.go b/go/extractor/extractor.go index 33186a9380f8..8a399eb2b902 100644 --- a/go/extractor/extractor.go +++ b/go/extractor/extractor.go @@ -1624,7 +1624,9 @@ func extractType(tw *trap.Writer, tp types.Type) trap.Label { name = "" } extractComponentType(tw, lbl, i, name, field.Type()) - dbscheme.ComponentTagsTable.Emit(tw, lbl, i, tp.Tag(i)) + if tp.Tag(i) != "" { + dbscheme.ComponentTagsTable.Emit(tw, lbl, i, tp.Tag(i)) + } } case *types.Pointer: kind = dbscheme.PointerType.Index() @@ -1643,11 +1645,8 @@ func extractType(tw *trap.Writer, tp types.Type) trap.Label { extractComponentType(tw, lbl, i, meth.Name(), meth.Type()) - // meth.Id() will be equal to meth.Name() for an exported method, or - // packge-qualified otherwise. - privateMethodId := meth.Id() - if privateMethodId != meth.Name() { - dbscheme.InterfacePrivateMethodIdsTable.Emit(tw, lbl, i, privateMethodId) + if !meth.Exported() { + dbscheme.InterfacePrivateMethodIdsTable.Emit(tw, lbl, i, meth.Id()) } } for i := 0; i < tp.NumEmbeddeds(); i++ { diff --git a/go/ql/lib/change-notes/2024-09-03-tags-and-interface-ids.md b/go/ql/lib/change-notes/2024-09-03-tags-and-interface-ids.md index 2baa8cd6da2c..c8c6e88ab4cb 100644 --- a/go/ql/lib/change-notes/2024-09-03-tags-and-interface-ids.md +++ b/go/ql/lib/change-notes/2024-09-03-tags-and-interface-ids.md @@ -1,5 +1,5 @@ --- category: minorAnalysis --- -* Added methods `StructTag.hasOwnFieldWithTag` and `Field.getTag`, which enable CodeQL queries to examine struct field tags. -* Added method `InterfaceType.getMethodTypeById`, which enables CodeQL queries to distinguish interfaces with matching non-exported method names that are declared in different packages, and are therefore incompatible. +* Added member predicates `StructTag.hasOwnFieldWithTag` and `Field.getTag`, which enable CodeQL queries to examine struct field tags. +* Added member predicate `InterfaceType.getMethodTypeByQualifiedName`, which enables CodeQL queries to distinguish interfaces with matching non-exported method names that are declared in different packages, and are therefore incompatible. diff --git a/go/ql/lib/go.dbscheme b/go/ql/lib/go.dbscheme index e47462df302b..d2066c23fe3d 100644 --- a/go/ql/lib/go.dbscheme +++ b/go/ql/lib/go.dbscheme @@ -208,7 +208,7 @@ underlying_type(unique int named: @namedtype ref, int tp: @type ref); component_types(int parent: @compositetype ref, int index: int ref, string name: string ref, int tp: @type ref); #keyset[parent, index] -component_tags(int parent: @compositetype ref, int index: int ref, string tag: string ref); +component_tags(int parent: @structtype ref, int index: int ref, string tag: string ref); #keyset[interface, index] interface_private_method_ids(int interface: @interfacetype ref, int index: int ref, string id: string ref); diff --git a/go/ql/lib/semmle/go/Types.qll b/go/ql/lib/semmle/go/Types.qll index 16e2c528ef47..51e9a9539202 100644 --- a/go/ql/lib/semmle/go/Types.qll +++ b/go/ql/lib/semmle/go/Types.qll @@ -465,7 +465,11 @@ class StructType extends @structtype, CompositeType { */ predicate hasOwnFieldWithTag(int i, string name, Type tp, boolean isEmbedded, string tag) { this.hasOwnField(i, name, tp, isEmbedded) and - component_tags(this, i, tag) + ( + component_tags(this, i, tag) + or + not component_tags(this, i, _) and tag = "" + ) } /** @@ -586,10 +590,13 @@ class StructType extends @structtype, CompositeType { override string pp() { result = "struct { " + - concat(int i, string name, Type tp, string tag, string tagToPrint | + concat(int i, string name, Type tp, string tagToPrint | component_types(this, i, name, tp) and - component_tags(this, i, tag) and - (if tag = "" then tagToPrint = "" else tagToPrint = " `" + tag + "`") + ( + tagToPrint = " `" + any(string tag | component_tags(this, i, tag)) + "`" + or + tagToPrint = "" and not component_tags(this, i, _) + ) | name + " " + tp.pp() + tagToPrint, "; " order by i ) + " }" @@ -761,10 +768,10 @@ class InterfaceType extends @interfacetype, CompositeType { } /** - * Gets the type of method `id` of this interface type. + * Gets the type of method `qname` of this interface type. * - * This differs from `getMethodType` in that if the method is not exported, the `id` - * will be package-qualified. This means that the set of `id`s` together with any + * This differs from `getMethodType` in that if the method is not exported, the `qname` + * will be package-qualified. This means that the set of `qname`s` together with any * embedded types fully distinguishes the interface from any other, whereas the set * of names matched by `getMethodName` may be ambiguous between interfaces with matching * exported methods and unexported methods that have matching names but belong to @@ -772,15 +779,17 @@ class InterfaceType extends @interfacetype, CompositeType { * * For example, `interface { Exported() int; notExported() int }` declared in two * different packages defines two distinct types, but they appear identical according to - * `getMethodType`. + * `getMethodType`. If the packages were named `a` and `b`, `getMethodType` would yield + * `notExported -> int` for both, whereas this method would yield `a.notExported -> int` + * and `b.notExported -> int` respectively. */ - Type getMethodTypeById(string id) { + Type getMethodTypeByQualifiedName(string qname) { exists(int i, string name | i >= 0 | component_types(this, i, name, result) and ( - interface_private_method_ids(this, i, id) + interface_private_method_ids(this, i, qname) or - name = id and not interface_private_method_ids(this, i, _) + name = qname and not interface_private_method_ids(this, i, _) ) ) } diff --git a/go/ql/lib/upgrades/a58b81b1b4c4cccc8ca11731c1db86622f33af57/go.dbscheme b/go/ql/lib/upgrades/a58b81b1b4c4cccc8ca11731c1db86622f33af57/go.dbscheme index e47462df302b..d2066c23fe3d 100644 --- a/go/ql/lib/upgrades/a58b81b1b4c4cccc8ca11731c1db86622f33af57/go.dbscheme +++ b/go/ql/lib/upgrades/a58b81b1b4c4cccc8ca11731c1db86622f33af57/go.dbscheme @@ -208,7 +208,7 @@ underlying_type(unique int named: @namedtype ref, int tp: @type ref); component_types(int parent: @compositetype ref, int index: int ref, string name: string ref, int tp: @type ref); #keyset[parent, index] -component_tags(int parent: @compositetype ref, int index: int ref, string tag: string ref); +component_tags(int parent: @structtype ref, int index: int ref, string tag: string ref); #keyset[interface, index] interface_private_method_ids(int interface: @interfacetype ref, int index: int ref, string id: string ref); diff --git a/go/ql/test/library-tests/semmle/go/Types/InterfaceIds.expected b/go/ql/test/library-tests/semmle/go/Types/InterfaceMethodIds.expected similarity index 100% rename from go/ql/test/library-tests/semmle/go/Types/InterfaceIds.expected rename to go/ql/test/library-tests/semmle/go/Types/InterfaceMethodIds.expected diff --git a/go/ql/test/library-tests/semmle/go/Types/InterfaceIds.ql b/go/ql/test/library-tests/semmle/go/Types/InterfaceMethodIds.ql similarity index 79% rename from go/ql/test/library-tests/semmle/go/Types/InterfaceIds.ql rename to go/ql/test/library-tests/semmle/go/Types/InterfaceMethodIds.ql index 5b04b068e6ba..b6246cf683a0 100644 --- a/go/ql/test/library-tests/semmle/go/Types/InterfaceIds.ql +++ b/go/ql/test/library-tests/semmle/go/Types/InterfaceMethodIds.ql @@ -4,5 +4,5 @@ from NamedType nt, InterfaceType it, Type methodType, string id where nt.getName() = "MixedExportedAndNot" and it = nt.getUnderlyingType() and - methodType = it.getMethodTypeById(id) + methodType = it.getMethodTypeByQualifiedName(id) select it.pp(), methodType.pp(), id From e1963a5fcd0c00aba6f2ba5bf3acd6f2663a99b9 Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Mon, 30 Sep 2024 16:35:58 +0100 Subject: [PATCH 06/23] autoformat --- .../semmle/go/Types/Field_getPackage.expected | 8 ++++---- .../semmle/go/Types/Field_hasQualifiedName2.expected | 8 ++++---- .../semmle/go/Types/Field_hasQualifiedName3.expected | 8 ++++---- .../semmle/go/Types/Method_hasQualifiedName2.expected | 4 ++-- .../semmle/go/Types/Method_hasQualifiedName3.expected | 4 ++-- go/ql/test/library-tests/semmle/go/Types/Methods.expected | 4 ++-- go/ql/test/library-tests/semmle/go/Types/pkg2/tst.go | 4 ++-- .../library-tests/semmle/go/Types/struct_tags.expected | 8 ++++---- go/ql/test/library-tests/semmle/go/Types/struct_tags.go | 8 ++++---- 9 files changed, 28 insertions(+), 28 deletions(-) diff --git a/go/ql/test/library-tests/semmle/go/Types/Field_getPackage.expected b/go/ql/test/library-tests/semmle/go/Types/Field_getPackage.expected index 50bd36a2174e..6fd88c35259e 100644 --- a/go/ql/test/library-tests/semmle/go/Types/Field_getPackage.expected +++ b/go/ql/test/library-tests/semmle/go/Types/Field_getPackage.expected @@ -46,7 +46,7 @@ | pkg1/tst.go:30:2:30:5 | flag | package github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg1 | | pkg2/tst.go:4:2:4:2 | g | package github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg2 | | pkg2/tst.go:8:2:8:2 | g | package github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg2 | -| struct_tags.go:4:3:4:8 | field1 | package github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types | -| struct_tags.go:5:3:5:8 | field2 | package github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types | -| struct_tags.go:9:3:9:8 | field1 | package github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types | -| struct_tags.go:10:3:10:8 | field2 | package github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types | +| struct_tags.go:4:2:4:7 | field1 | package github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types | +| struct_tags.go:5:2:5:7 | field2 | package github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types | +| struct_tags.go:9:2:9:7 | field1 | package github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types | +| struct_tags.go:10:2:10:7 | field2 | package github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types | diff --git a/go/ql/test/library-tests/semmle/go/Types/Field_hasQualifiedName2.expected b/go/ql/test/library-tests/semmle/go/Types/Field_hasQualifiedName2.expected index bfdde9bb82d0..910d9a0dd5ff 100644 --- a/go/ql/test/library-tests/semmle/go/Types/Field_hasQualifiedName2.expected +++ b/go/ql/test/library-tests/semmle/go/Types/Field_hasQualifiedName2.expected @@ -64,7 +64,7 @@ | pkg2/tst.go:4:2:4:2 | g | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg2.T | g | | pkg2/tst.go:8:2:8:2 | g | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg2.G | g | | pkg2/tst.go:8:2:8:2 | g | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg2.T | g | -| struct_tags.go:4:3:4:8 | field1 | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types.S1 | field1 | -| struct_tags.go:5:3:5:8 | field2 | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types.S1 | field2 | -| struct_tags.go:9:3:9:8 | field1 | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types.S2 | field1 | -| struct_tags.go:10:3:10:8 | field2 | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types.S2 | field2 | +| struct_tags.go:4:2:4:7 | field1 | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types.S1 | field1 | +| struct_tags.go:5:2:5:7 | field2 | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types.S1 | field2 | +| struct_tags.go:9:2:9:7 | field1 | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types.S2 | field1 | +| struct_tags.go:10:2:10:7 | field2 | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types.S2 | field2 | diff --git a/go/ql/test/library-tests/semmle/go/Types/Field_hasQualifiedName3.expected b/go/ql/test/library-tests/semmle/go/Types/Field_hasQualifiedName3.expected index 559bce80b73c..1b8e88be66ff 100644 --- a/go/ql/test/library-tests/semmle/go/Types/Field_hasQualifiedName3.expected +++ b/go/ql/test/library-tests/semmle/go/Types/Field_hasQualifiedName3.expected @@ -64,7 +64,7 @@ | pkg2/tst.go:4:2:4:2 | g | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg2 | T | g | | pkg2/tst.go:8:2:8:2 | g | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg2 | G | g | | pkg2/tst.go:8:2:8:2 | g | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg2 | T | g | -| struct_tags.go:4:3:4:8 | field1 | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types | S1 | field1 | -| struct_tags.go:5:3:5:8 | field2 | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types | S1 | field2 | -| struct_tags.go:9:3:9:8 | field1 | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types | S2 | field1 | -| struct_tags.go:10:3:10:8 | field2 | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types | S2 | field2 | +| struct_tags.go:4:2:4:7 | field1 | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types | S1 | field1 | +| struct_tags.go:5:2:5:7 | field2 | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types | S1 | field2 | +| struct_tags.go:9:2:9:7 | field1 | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types | S2 | field1 | +| struct_tags.go:10:2:10:7 | field2 | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types | S2 | field2 | diff --git a/go/ql/test/library-tests/semmle/go/Types/Method_hasQualifiedName2.expected b/go/ql/test/library-tests/semmle/go/Types/Method_hasQualifiedName2.expected index 41b744e78e7f..e39dc1c37bf2 100644 --- a/go/ql/test/library-tests/semmle/go/Types/Method_hasQualifiedName2.expected +++ b/go/ql/test/library-tests/semmle/go/Types/Method_hasQualifiedName2.expected @@ -59,5 +59,5 @@ | pkg1/tst.go:33:16:33:19 | half | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg1.T | half | | pkg1/tst.go:33:16:33:19 | half | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg1.T3 | half | | pkg1/tst.go:33:16:33:19 | half | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg1.T4 | half | -| pkg2/tst.go:12:9:12:16 | Exported | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg2.MixedExportedAndNot | Exported | -| pkg2/tst.go:13:9:13:19 | notExported | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg2.MixedExportedAndNot | notExported | +| pkg2/tst.go:12:2:12:9 | Exported | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg2.MixedExportedAndNot | Exported | +| pkg2/tst.go:13:2:13:12 | notExported | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg2.MixedExportedAndNot | notExported | diff --git a/go/ql/test/library-tests/semmle/go/Types/Method_hasQualifiedName3.expected b/go/ql/test/library-tests/semmle/go/Types/Method_hasQualifiedName3.expected index c0aa74196854..6bf4488df233 100644 --- a/go/ql/test/library-tests/semmle/go/Types/Method_hasQualifiedName3.expected +++ b/go/ql/test/library-tests/semmle/go/Types/Method_hasQualifiedName3.expected @@ -59,5 +59,5 @@ | pkg1/tst.go:33:16:33:19 | half | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg1 | T | half | | pkg1/tst.go:33:16:33:19 | half | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg1 | T3 | half | | pkg1/tst.go:33:16:33:19 | half | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg1 | T4 | half | -| pkg2/tst.go:12:9:12:16 | Exported | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg2 | MixedExportedAndNot | Exported | -| pkg2/tst.go:13:9:13:19 | notExported | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg2 | MixedExportedAndNot | notExported | +| pkg2/tst.go:12:2:12:9 | Exported | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg2 | MixedExportedAndNot | Exported | +| pkg2/tst.go:13:2:13:12 | notExported | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg2 | MixedExportedAndNot | notExported | diff --git a/go/ql/test/library-tests/semmle/go/Types/Methods.expected b/go/ql/test/library-tests/semmle/go/Types/Methods.expected index 914b29bdcfb1..d84593653ad9 100644 --- a/go/ql/test/library-tests/semmle/go/Types/Methods.expected +++ b/go/ql/test/library-tests/semmle/go/Types/Methods.expected @@ -25,9 +25,9 @@ | Foo | half | pkg1/tst.go:33:16:33:19 | half | | GenericInterface | GetT | generic.go:33:2:33:5 | GetT | | MixedExportedAndNot | Exported | pkg1/interfaces.go:36:2:36:9 | Exported | -| MixedExportedAndNot | Exported | pkg2/tst.go:12:9:12:16 | Exported | +| MixedExportedAndNot | Exported | pkg2/tst.go:12:2:12:9 | Exported | | MixedExportedAndNot | notExported | pkg1/interfaces.go:37:2:37:12 | notExported | -| MixedExportedAndNot | notExported | pkg2/tst.go:13:9:13:19 | notExported | +| MixedExportedAndNot | notExported | pkg2/tst.go:13:2:13:12 | notExported | | MyInterface | clone | generic.go:48:2:48:6 | clone | | MyInterface | dummy1 | generic.go:49:2:49:7 | dummy1 | | MyInterface | dummy2 | generic.go:50:2:50:7 | dummy2 | diff --git a/go/ql/test/library-tests/semmle/go/Types/pkg2/tst.go b/go/ql/test/library-tests/semmle/go/Types/pkg2/tst.go index b5f00526671f..af91e514b77c 100644 --- a/go/ql/test/library-tests/semmle/go/Types/pkg2/tst.go +++ b/go/ql/test/library-tests/semmle/go/Types/pkg2/tst.go @@ -9,6 +9,6 @@ type G struct { } type MixedExportedAndNot interface { - Exported() - notExported() + Exported() + notExported() } diff --git a/go/ql/test/library-tests/semmle/go/Types/struct_tags.expected b/go/ql/test/library-tests/semmle/go/Types/struct_tags.expected index d0668076d5fe..33c7afd80ec6 100644 --- a/go/ql/test/library-tests/semmle/go/Types/struct_tags.expected +++ b/go/ql/test/library-tests/semmle/go/Types/struct_tags.expected @@ -1,4 +1,4 @@ -| struct { field1 int `tag1a`; field2 int `tag2a` } | struct_tags.go:4:3:4:8 | field1 | tag1a | -| struct { field1 int `tag1a`; field2 int `tag2a` } | struct_tags.go:5:3:5:8 | field2 | tag2a | -| struct { field1 int `tag1b`; field2 int `tag2b` } | struct_tags.go:9:3:9:8 | field1 | tag1b | -| struct { field1 int `tag1b`; field2 int `tag2b` } | struct_tags.go:10:3:10:8 | field2 | tag2b | +| struct { field1 int `tag1a`; field2 int `tag2a` } | struct_tags.go:4:2:4:7 | field1 | tag1a | +| struct { field1 int `tag1a`; field2 int `tag2a` } | struct_tags.go:5:2:5:7 | field2 | tag2a | +| struct { field1 int `tag1b`; field2 int `tag2b` } | struct_tags.go:9:2:9:7 | field1 | tag1b | +| struct { field1 int `tag1b`; field2 int `tag2b` } | struct_tags.go:10:2:10:7 | field2 | tag2b | diff --git a/go/ql/test/library-tests/semmle/go/Types/struct_tags.go b/go/ql/test/library-tests/semmle/go/Types/struct_tags.go index ae3efaf8dcbf..c06f8395135a 100644 --- a/go/ql/test/library-tests/semmle/go/Types/struct_tags.go +++ b/go/ql/test/library-tests/semmle/go/Types/struct_tags.go @@ -1,11 +1,11 @@ package main type S1 struct { - field1 int `tag1a` - field2 int `tag2a` + field1 int `tag1a` + field2 int `tag2a` } type S2 struct { - field1 int `tag1b` - field2 int `tag2b` + field1 int `tag1b` + field2 int `tag2b` } From 442e58188ba6e144591e4c16a437b5ae74483ed5 Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Mon, 9 Sep 2024 11:42:57 +0100 Subject: [PATCH 07/23] Update stats --- go/ql/lib/go.dbscheme.stats | 12212 +++++++++++++++++++++------------- 1 file changed, 7714 insertions(+), 4498 deletions(-) diff --git a/go/ql/lib/go.dbscheme.stats b/go/ql/lib/go.dbscheme.stats index b18e8556fb24..50565d963aad 100644 --- a/go/ql/lib/go.dbscheme.stats +++ b/go/ql/lib/go.dbscheme.stats @@ -1,11 +1,15 @@ - @similarity + @duplication 0 - @duplication + @externalDataElement + 0 + + + @similarity 0 @@ -14,15 +18,11 @@ @xmlelement - 504 + 8655540 @xmlattribute - 408 - - - @externalDataElement - 0 + 3762921 @xmlnamespace @@ -30,667 +30,695 @@ @xmlcomment - 30 + 131455 @xmlcharacters - 869 + 13383839 @compilation - 1 + 31407 @diagnostic - 0 + 233782 @file - 529 + 146783 @folder - 210 + 98591 @comment_group - 12083 + 2493839 @slashslashcomment - 24878 + 2514613 @slashstarcomment - 846 + 77689 + + + @location_default + 37058201 @ident - 237316 + 5500549 @ellipsis - 141 + 42416 @intlit - 7683 - - - @floatlit - 27 + 8029312 @charlit - 838 + 44853 @stringlit - 24892 + 936836 @funclit - 678 + 145208 @compositelit - 2704 + 638762 @parenexpr - 343 + 44180 @selectorexpr - 54353 + 1563876 @indexexpr - 4581 + 1269900 @sliceexpr - 836 + 26235 @typeassertexpr - 2127 + 86701 @callorconversionexpr - 32041 + 1123396 @starexpr - 10360 + 401599 @keyvalueexpr - 5616 + 2321152 @arraytypeexpr - 3465 + 172175 @structtypeexpr - 1207 + 126802 @functypeexpr - 6015 + 302047 @interfacetypeexpr - 509 + 154636 @maptypeexpr - 1013 + 71689 @minusexpr - 270 + 183167 @notexpr - 1190 - - - @complementexpr - 21 + 36971 @addressexpr - 1739 + 112784 @arrowexpr - 92 + 27351 @lorexpr - 612 + 27296 @landexpr - 1234 + 99629 @eqlexpr - 3244 + 91950 @neqexpr - 4103 - - - @lssexpr - 785 - - - @leqexpr - 248 + 326490 @gtrexpr - 619 + 38816 @geqexpr - 270 + 21923 @addexpr - 1272 + 194589 @subexpr - 557 + 222492 - @orexpr - 146 + @mulexpr + 32053 - @xorexpr - 14 + @sendchantypeexpr + 22312 - @mulexpr - 207 + @recvchantypeexpr + 9117 - @quoexpr - 53 + @sendrcvchantypeexpr + 25432 - @remexpr - 24 + @badexpr + 2 - @shlexpr - 164 + @floatlit + 393088 - @shrexpr - 57 + @imaglit + 1233 - @andexpr - 235 + @genericfunctioninstantiationexpr + 9823 - @andnotexpr - 19 + @generictypeinstantiationexpr + 4188 - @sendchantypeexpr - 7 + @typesetliteralexpr + 1171 - @recvchantypeexpr - 9 + @plusexpr + 370 - @sendrcvchantypeexpr - 101 + @complementexpr + 3979 - @badexpr + @derefexpr 0 - @imaglit - 0 + @lssexpr + 32125 - @plusexpr - 0 + @leqexpr + 9262 - @derefexpr - 0 + @orexpr + 81746 - @field - 19974 + @xorexpr + 1753 - @location_default - 539178 + @quoexpr + 61619 - @declstmt - 1454 + @remexpr + 2999 - @labeledstmt - 49 + @shlexpr + 82494 + + + @shrexpr + 7813 + + + @andexpr + 11860 + + + @andnotexpr + 396 + + + @field + 995459 + + + @typeparamdecl + 9798 + + + @declstmt + 74013 @exprstmt - 7605 + 460278 @sendstmt - 69 + 16794 @incstmt - 614 + 15889 @decstmt - 71 + 9601 @gostmt - 72 + 20539 @deferstmt - 358 + 98332 @returnstmt - 9225 + 355294 @breakstmt - 301 + 14232 @continuestmt - 606 - - - @gotostmt - 8 - - - @fallthroughstmt - 7 + 45187 @blockstmt - 19358 + 539596 @ifstmt - 9728 + 313551 @caseclause - 3476 + 79016 @exprswitchstmt - 378 + 17092 @typeswitchstmt - 400 + 9269 @commclause - 72 + 25912 @selectstmt - 35 + 11996 @forstmt - 654 + 25752 @rangestmt - 2135 + 64694 @assignstmt - 7478 + 641512 @definestmt - 9514 + 433774 @addassignstmt - 223 + 21683 - @subassignstmt - 18 + @badstmt + 0 - @mulassignstmt - 5 + @emptystmt + 181 - @quoassignstmt - 3 + @labeledstmt + 4273 - @orassignstmt - 63 + @gotostmt + 4431 - @xorassignstmt - 3 + @fallthroughstmt + 11233 - @shlassignstmt - 2 + @subassignstmt + 6675 - @shrassignstmt - 3 + @mulassignstmt + 470 - @andnotassignstmt - 3 + @quoassignstmt + 556 - @badstmt - 0 + @remassignstmt + 171 - @emptystmt - 0 + @andassignstmt + 279 - @remassignstmt - 0 + @orassignstmt + 9913 - @andassignstmt - 0 + @xorassignstmt + 2562 + + + @shlassignstmt + 367 + + + @shrassignstmt + 429 + + + @andnotassignstmt + 279 @importdecl - 479 + 83355 @constdecl - 280 + 54489 @typedecl - 1349 + 100497 @vardecl - 1769 + 118650 @funcdecl - 4813 + 283367 @baddecl - 0 + 214 @importspec - 3468 + 247378 @valuespec - 3056 + 152556 @typedefspec - 1349 + 101666 @aliasspec - 16 + 17497 @universescope - 1 + 5401 @packagescope - 346 + 924779 @localscope - 36428 + 919952 @pkgobject - 3468 + 247378 @decltypeobject - 3602 + 13124885 @builtintypeobject - 20 + 118831 @declconstobject - 8857 + 80430386 @builtinconstobject - 4 + 21605 @declvarobject - 51098 + 118985930 @declfunctionobject - 17793 + 93191570 @builtinfunctionobject - 18 + 140437 @labelobject - 49 + 4273 @invalidtype - 1 + 5401 @boolexprtype - 1 + 5401 @inttype - 1 + 5401 @int8type - 1 + 5401 @int16type - 1 + 5401 @int32type - 1 + 5401 @int64type - 1 + 5401 @uinttype - 1 + 5401 @uint8type - 1 + 5401 @uint16type - 1 + 5401 @uint32type - 1 + 5401 @uint64type - 1 + 5401 @uintptrtype - 1 + 5401 @float32type - 1 + 5401 @float64type - 1 + 5401 @complex64type - 1 + 4107 @complex128type - 1 + 5401 @stringexprtype - 1 + 5401 @unsafepointertype - 1 + 5401 @boolliteraltype - 1 + 5401 @intliteraltype - 1 + 5401 @runeliteraltype - 1 + 5401 @floatliteraltype - 1 + 5401 @stringliteraltype - 1 + 5401 @nilliteraltype - 1 + 5401 + + + @typeparamtype + 331358 @arraytype - 293 + 1528173 @slicetype - 637 + 2313692 @structtype - 2409 + 8070007 @pointertype - 1903 + 8158995 @interfacetype - 247 + 1636684 @tupletype - 559 + 69835 @signaturetype - 8010 + 28950823 @maptype - 430 + 866786 @sendchantype - 13 + 32408 @recvchantype - 10 + 48612 @sendrcvchantype - 29 + 101202 @namedtype - 3567 + 12852686 + + + @typesetliteraltype + 59325 + + + @typealias + 660784 @complexliteraltype - 0 + 88 @package - 346 + 924779 @modline - 6 + 191935 @modlineblock - 1 + 22683 @modlparen - 1 + 22683 @modrparen - 1 + 22683 @modcommentblock - 0 + 431 @unknownerror @@ -698,15 +726,15 @@ @listerror - 0 + 22275 @parseerror - 0 + 3428 @typeerror - 0 + 219425 @@ -738,7 +766,7 @@ 1 2 - 1 + 403 @@ -754,7 +782,7 @@ 1 2 - 1 + 403 @@ -830,7 +858,7 @@ 1 2 - 1 + 403 @@ -846,7 +874,7 @@ 1 2 - 1 + 403 @@ -1383,11 +1411,11 @@ sourceLocationPrefix - 1 + 5401 prefix - 1 + 5401 @@ -1416,7 +1444,7 @@ 1 2 - 1 + 403 @@ -1470,7 +1498,7 @@ 1 2 - 1 + 403 @@ -1486,7 +1514,7 @@ 1 2 - 1 + 403 @@ -1502,7 +1530,7 @@ 1 2 - 1 + 403 @@ -1518,7 +1546,7 @@ 1 2 - 1 + 403 @@ -1688,27 +1716,27 @@ xmlElements - 504 + 8655540 id - 504 + 8655540 name - 38 + 160211 parentid - 199 + 2961862 idx - 86 + 1302233 fileid - 14 + 90375 @@ -1722,7 +1750,7 @@ 1 2 - 504 + 8655540 @@ -1738,7 +1766,7 @@ 1 2 - 504 + 8655540 @@ -1754,7 +1782,7 @@ 1 2 - 504 + 8655540 @@ -1770,7 +1798,7 @@ 1 2 - 504 + 8655540 @@ -1786,52 +1814,72 @@ 1 2 - 11 + 24647 2 3 - 3 + 8215 3 4 - 4 + 8215 4 + 5 + 12323 + + + 5 6 - 3 + 4107 - 7 - 12 - 3 + 8 + 9 + 12323 - 12 + 13 14 - 2 + 8215 - 14 - 16 - 3 + 18 + 22 + 12323 - 16 - 22 - 3 + 22 + 30 + 12323 - 27 + 30 40 - 3 + 12323 - 55 - 101 - 3 + 49 + 52 + 12323 + + + 52 + 58 + 8215 + + + 135 + 200 + 12323 + + + 233 + 570 + 12323 @@ -1847,47 +1895,57 @@ 1 2 - 15 + 49295 2 3 - 4 - - - 3 - 4 - 4 + 8215 4 5 - 3 + 20539 5 - 6 - 1 + 11 + 8215 - 6 - 7 - 3 + 11 + 12 + 8215 - 7 - 18 - 3 + 13 + 19 + 12323 - 18 + 19 22 - 3 + 12323 - 29 - 76 - 2 + 22 + 30 + 12323 + + + 33 + 53 + 12323 + + + 72 + 132 + 12323 + + + 302 + 303 + 4107 @@ -1903,52 +1961,52 @@ 1 2 - 12 + 41079 2 3 - 4 + 28755 3 4 - 5 + 12323 4 5 - 1 + 12323 5 6 - 3 + 12323 - 6 - 9 - 3 + 7 + 10 + 12323 - 10 - 11 - 2 + 11 + 14 + 12323 - 13 - 15 - 3 + 14 + 16 + 12323 - 15 - 17 - 3 + 33 + 50 + 12323 - 17 - 41 - 2 + 212 + 213 + 4107 @@ -1964,37 +2022,37 @@ 1 2 - 18 + 86267 2 3 - 7 + 12323 - 3 - 4 - 3 + 10 + 11 + 24647 - 4 - 5 - 1 + 13 + 19 + 8215 - 5 - 6 - 4 + 19 + 21 + 12323 - 7 - 11 - 3 + 21 + 22 + 8215 - 11 - 14 - 2 + 22 + 23 + 8215 @@ -2010,27 +2068,32 @@ 1 2 - 116 + 1429581 2 3 - 37 + 788734 3 4 - 22 + 172535 4 - 8 - 15 + 5 + 168427 - 8 - 61 - 9 + 5 + 7 + 267019 + + + 7 + 311 + 135563 @@ -2046,17 +2109,17 @@ 1 2 - 160 + 2185452 2 3 - 23 + 636738 3 - 8 - 16 + 10 + 139671 @@ -2072,27 +2135,32 @@ 1 2 - 116 + 1429581 2 3 - 37 + 788734 3 4 - 22 + 172535 4 - 8 - 15 + 5 + 168427 - 8 - 61 - 9 + 5 + 7 + 267019 + + + 7 + 311 + 135563 @@ -2108,7 +2176,7 @@ 1 2 - 199 + 2961862 @@ -2124,32 +2192,17 @@ 1 2 - 54 + 1125589 2 - 3 - 4 - - - 3 - 4 - 11 - - - 4 6 - 6 + 110915 6 - 21 - 7 - - - 40 - 141 - 4 + 404 + 65727 @@ -2165,32 +2218,17 @@ 1 2 - 54 + 1125589 2 3 - 5 + 106807 3 - 4 - 11 - - - 4 - 5 - 6 - - - 5 - 12 - 7 - - - 14 26 - 3 + 69835 @@ -2206,32 +2244,17 @@ 1 2 - 54 + 1125589 2 - 3 - 4 - - - 3 - 4 - 11 - - - 4 6 - 6 + 110915 6 - 21 - 7 - - - 40 - 141 - 4 + 404 + 65727 @@ -2247,32 +2270,12 @@ 1 2 - 54 + 1236505 2 - 3 - 4 - - - 3 - 4 - 11 - - - 4 - 5 - 8 - - - 5 - 13 - 7 - - - 13 - 15 - 2 + 23 + 65727 @@ -2286,64 +2289,49 @@ 12 - 2 - 3 - 1 - - - 7 - 8 - 1 + 6 + 7 + 4107 8 9 - 2 - - - 10 - 11 - 1 - - - 16 - 17 - 1 + 8215 - 18 - 19 - 1 + 9 + 10 + 12323 - 20 - 21 - 1 + 10 + 11 + 8215 - 21 - 22 - 2 + 13 + 16 + 8215 - 58 - 59 - 1 + 19 + 39 + 8215 - 100 - 101 - 1 + 40 + 41 + 4107 - 107 - 108 - 1 + 41 + 42 + 28755 - 108 - 109 - 1 + 67 + 1560 + 8215 @@ -2356,55 +2344,35 @@ 12 - - 2 - 3 - 1 - - - 3 - 4 - 2 - - - 4 - 5 - 1 - - - 5 - 6 - 2 - 6 7 - 2 + 8215 - 8 - 9 - 2 + 7 + 8 + 12323 - 11 - 12 - 1 + 8 + 9 + 20539 - 16 - 17 - 1 + 9 + 15 + 8215 - 17 - 18 - 1 + 15 + 16 + 36971 - 19 - 20 - 1 + 31 + 32 + 4107 @@ -2418,54 +2386,29 @@ 12 - 2 - 3 - 2 + 3 + 4 + 4107 4 5 - 1 - - - 6 - 7 - 2 - - - 7 - 8 - 3 - - - 9 - 10 - 1 - - - 10 - 11 - 1 - - - 20 - 21 - 1 + 32863 - 23 - 24 - 1 + 5 + 6 + 8215 - 47 - 48 - 1 + 13 + 14 + 36971 - 49 - 50 - 1 + 38 + 522 + 8215 @@ -2479,59 +2422,39 @@ 12 - 1 - 2 - 1 - - - 3 - 4 - 2 + 2 + 3 + 4107 - 4 - 5 - 1 + 5 + 6 + 24647 - 7 + 6 8 - 3 + 8215 - 8 - 9 - 1 + 11 + 13 + 8215 13 14 - 1 + 12323 14 15 - 1 + 24647 16 - 17 - 1 - - - 30 - 31 - 1 - - - 34 - 35 - 1 - - - 67 - 68 - 1 + 314 + 8215 @@ -2541,31 +2464,31 @@ xmlAttrs - 408 + 3762921 id - 408 + 3762921 elementid - 288 + 2744139 name - 28 + 180751 value - 235 + 1713032 idx - 6 + 20539 fileid - 14 + 90375 @@ -2579,7 +2502,7 @@ 1 2 - 408 + 3762921 @@ -2595,7 +2518,7 @@ 1 2 - 408 + 3762921 @@ -2611,7 +2534,7 @@ 1 2 - 408 + 3762921 @@ -2627,7 +2550,7 @@ 1 2 - 408 + 3762921 @@ -2643,7 +2566,7 @@ 1 2 - 408 + 3762921 @@ -2659,22 +2582,17 @@ 1 2 - 195 + 1963620 2 3 - 69 + 579226 3 - 4 - 23 - - - 6 - 7 - 1 + 6 + 201291 @@ -2690,22 +2608,17 @@ 1 2 - 195 + 1963620 2 3 - 69 + 579226 3 - 4 - 23 - - - 6 - 7 - 1 + 6 + 201291 @@ -2721,22 +2634,17 @@ 1 2 - 195 + 1963620 2 3 - 70 + 579226 3 - 4 - 22 - - - 4 - 5 - 1 + 6 + 201291 @@ -2752,22 +2660,17 @@ 1 2 - 195 + 1963620 2 3 - 69 + 579226 3 - 4 - 23 - - - 6 - 7 - 1 + 6 + 201291 @@ -2783,7 +2686,7 @@ 1 2 - 288 + 2744139 @@ -2799,42 +2702,42 @@ 1 2 - 12 + 65727 2 3 - 3 + 8215 3 4 - 4 + 24647 - 5 - 15 - 2 + 4 + 6 + 16431 - 21 - 22 - 2 + 8 + 12 + 16431 - 22 - 23 - 2 + 17 + 30 + 16431 - 45 - 97 - 2 + 30 + 50 + 16431 - 132 - 133 - 1 + 50 + 250 + 16431 @@ -2850,42 +2753,42 @@ 1 2 - 12 + 65727 2 3 - 3 + 8215 3 4 - 4 + 24647 - 5 - 15 - 2 + 4 + 6 + 16431 - 21 - 22 - 2 + 8 + 12 + 16431 - 22 - 23 - 2 + 17 + 30 + 16431 - 45 - 97 - 2 + 30 + 50 + 16431 - 132 - 133 - 1 + 50 + 250 + 16431 @@ -2901,37 +2804,32 @@ 1 2 - 16 + 94483 2 3 - 2 + 20539 3 4 - 3 - - - 11 - 12 - 1 + 20539 - 15 - 16 - 2 + 4 + 5 + 12323 - 21 - 36 - 2 + 5 + 14 + 16431 - 41 - 75 - 2 + 30 + 178 + 16431 @@ -2947,17 +2845,17 @@ 1 2 - 19 + 135563 2 3 - 5 + 28755 3 - 4 - 4 + 5 + 16431 @@ -2973,32 +2871,37 @@ 1 2 - 18 + 102699 2 3 - 2 + 12323 3 - 4 - 2 + 8 + 16431 - 4 - 6 - 2 + 9 + 12 + 16431 - 10 - 11 - 3 + 14 + 17 + 12323 - 13 - 14 - 1 + 17 + 18 + 12323 + + + 19 + 20 + 8215 @@ -3014,22 +2917,27 @@ 1 2 - 171 + 1294017 2 3 - 32 + 127347 3 5 - 18 + 139671 5 - 13 - 14 + 17 + 131455 + + + 19 + 31 + 20539 @@ -3045,22 +2953,27 @@ 1 2 - 174 + 1298125 2 3 - 29 + 127347 3 5 - 18 + 135563 5 - 13 - 14 + 17 + 131455 + + + 19 + 31 + 20539 @@ -3076,12 +2989,12 @@ 1 2 - 230 + 1688384 2 4 - 5 + 24647 @@ -3097,12 +3010,12 @@ 1 2 - 224 + 1671952 2 4 - 11 + 41079 @@ -3118,17 +3031,17 @@ 1 2 - 193 + 1474769 2 - 3 - 32 + 6 + 127347 - 3 - 7 - 10 + 9 + 20 + 110915 @@ -3142,24 +3055,29 @@ 12 - 1 - 2 - 3 + 3 + 4 + 4107 - 24 - 25 - 1 + 6 + 7 + 4107 + + + 49 + 50 + 4107 - 93 - 94 - 1 + 190 + 191 + 4107 - 288 - 289 - 1 + 668 + 669 + 4107 @@ -3173,24 +3091,29 @@ 12 - 1 - 2 - 3 + 3 + 4 + 4107 - 24 - 25 - 1 + 6 + 7 + 4107 - 93 - 94 - 1 + 49 + 50 + 4107 + + + 190 + 191 + 4107 - 288 - 289 - 1 + 668 + 669 + 4107 @@ -3204,24 +3127,29 @@ 12 - 1 - 2 - 3 + 2 + 3 + 4107 - 8 - 9 - 1 + 4 + 5 + 4107 - 14 - 15 - 1 + 9 + 10 + 4107 - 16 - 17 - 1 + 21 + 22 + 4107 + + + 25 + 26 + 4107 @@ -3235,24 +3163,29 @@ 12 - 1 - 2 - 3 + 3 + 4 + 4107 - 23 - 24 - 1 + 6 + 7 + 4107 - 64 - 65 - 1 + 21 + 22 + 4107 + + + 72 + 73 + 4107 - 157 - 158 - 1 + 326 + 327 + 4107 @@ -3266,24 +3199,19 @@ 12 - 1 - 2 - 3 - - - 6 - 7 - 1 - - - 12 - 13 - 1 + 3 + 4 + 8215 14 15 - 1 + 4107 + + + 22 + 23 + 8215 @@ -3297,64 +3225,54 @@ 12 - 2 - 3 - 1 + 3 + 4 + 4107 4 5 - 1 + 8215 - 10 - 11 - 2 + 9 + 10 + 4107 11 12 - 1 + 12323 12 - 13 - 1 - - - 17 - 18 - 1 + 14 + 8215 18 - 19 - 1 - - - 19 - 20 - 1 + 38 + 8215 - 22 - 23 - 1 + 39 + 40 + 12323 - 48 - 49 - 1 + 40 + 41 + 12323 - 73 - 74 - 2 + 41 + 42 + 12323 - 89 - 90 - 1 + 91 + 333 + 8215 @@ -3368,64 +3286,49 @@ 12 - 1 - 2 - 1 + 2 + 3 + 4107 - 4 - 5 - 1 + 3 + 4 + 8215 - 8 - 9 - 2 + 5 + 7 + 8215 - 9 - 10 - 1 + 7 + 8 + 12323 - 11 + 9 12 - 1 - - - 12 - 13 - 2 - - - 16 - 17 - 1 + 8215 17 18 - 1 - - - 18 - 19 - 1 + 4107 - 42 - 43 - 1 + 25 + 26 + 12323 - 63 - 64 - 1 + 26 + 27 + 24647 - 67 - 68 - 1 + 58 + 303 + 8215 @@ -3438,40 +3341,55 @@ 12 - - 2 - 3 - 2 - 3 4 - 2 + 4107 4 5 - 4 + 8215 5 6 - 1 + 4107 - 6 - 7 - 2 + 8 + 9 + 8215 - 7 - 8 - 2 + 9 + 10 + 12323 - 23 - 24 - 1 + 10 + 11 + 4107 + + + 11 + 12 + 12323 + + + 12 + 13 + 24647 + + + 13 + 17 + 8215 + + + 20 + 21 + 4107 @@ -3484,70 +3402,50 @@ 12 - - 2 - 3 - 1 - 3 4 - 1 - - - 6 - 7 - 1 + 4107 - 8 - 9 - 2 + 4 + 5 + 8215 9 10 - 1 + 4107 - 10 - 11 - 1 - - - 13 - 14 - 1 + 11 + 12 + 20539 - 14 - 15 - 1 + 17 + 27 + 8215 - 18 - 19 - 1 + 33 + 34 + 12323 - 32 - 33 - 1 + 34 + 35 + 12323 - 54 - 55 - 1 + 35 + 36 + 12323 60 - 61 - 1 - - - 61 - 62 - 1 + 244 + 8215 @@ -3560,25 +3458,20 @@ 12 - - 1 - 2 - 2 - 2 3 - 6 + 32863 3 4 - 5 + 45187 - 6 - 7 - 1 + 5 + 6 + 12323 @@ -3812,23 +3705,23 @@ xmlComments - 30 + 131455 id - 30 + 131455 text - 18 + 98591 parentid - 20 + 115023 fileid - 10 + 49295 @@ -3842,7 +3735,7 @@ 1 2 - 30 + 131455 @@ -3858,7 +3751,7 @@ 1 2 - 30 + 131455 @@ -3874,7 +3767,7 @@ 1 2 - 30 + 131455 @@ -3890,22 +3783,17 @@ 1 2 - 13 + 86267 - 2 - 3 - 3 + 3 + 4 + 4107 4 5 - 1 - - - 7 - 8 - 1 + 8215 @@ -3921,22 +3809,17 @@ 1 2 - 14 + 86267 - 2 - 3 - 2 + 3 + 4 + 4107 4 5 - 1 - - - 7 - 8 - 1 + 8215 @@ -3952,17 +3835,17 @@ 1 2 - 15 + 86267 - 2 - 3 - 2 + 3 + 4 + 4107 - 7 - 8 - 1 + 4 + 5 + 8215 @@ -3978,22 +3861,12 @@ 1 2 - 15 + 98591 2 3 - 3 - - - 4 - 5 - 1 - - - 5 - 6 - 1 + 16431 @@ -4009,22 +3882,12 @@ 1 2 - 15 + 98591 2 3 - 3 - - - 3 - 4 - 1 - - - 5 - 6 - 1 + 16431 @@ -4040,7 +3903,7 @@ 1 2 - 20 + 115023 @@ -4056,27 +3919,22 @@ 1 2 - 6 + 28755 2 3 - 1 - - - 4 - 5 - 1 + 12323 - 8 - 9 - 1 + 3 + 4 + 4107 - 10 - 11 - 1 + 16 + 17 + 4107 @@ -4092,27 +3950,22 @@ 1 2 - 6 + 28755 2 3 - 1 - - - 4 - 5 - 1 + 12323 - 5 - 6 - 1 + 3 + 4 + 4107 - 9 - 10 - 1 + 16 + 17 + 4107 @@ -4128,17 +3981,17 @@ 1 2 - 7 + 41079 - 3 - 4 - 1 + 2 + 3 + 4107 - 5 - 6 - 2 + 16 + 17 + 4107 @@ -4148,31 +4001,31 @@ xmlChars - 869 + 13383839 id - 869 + 13383839 text - 427 + 5862105 parentid - 432 + 6926075 idx - 87 + 1281693 isCDATA - 1 + 4107 fileid - 14 + 94483 @@ -4186,7 +4039,7 @@ 1 2 - 869 + 13383839 @@ -4202,7 +4055,7 @@ 1 2 - 869 + 13383839 @@ -4218,7 +4071,7 @@ 1 2 - 869 + 13383839 @@ -4234,7 +4087,7 @@ 1 2 - 869 + 13383839 @@ -4250,7 +4103,7 @@ 1 2 - 869 + 13383839 @@ -4266,22 +4119,17 @@ 1 2 - 339 + 5081586 2 - 3 - 53 - - - 3 - 49 - 33 + 4 + 480635 - 68 - 90 - 2 + 4 + 567 + 299883 @@ -4297,22 +4145,17 @@ 1 2 - 342 + 5098018 2 - 3 - 50 - - - 3 - 28 - 33 + 4 + 484743 - 28 - 32 - 2 + 4 + 179 + 279343 @@ -4328,12 +4171,12 @@ 1 2 - 400 + 5701893 2 - 58 - 27 + 298 + 160211 @@ -4349,7 +4192,7 @@ 1 2 - 427 + 5862105 @@ -4365,17 +4208,12 @@ 1 2 - 380 + 5710109 2 - 4 - 36 - - - 4 - 11 - 11 + 22 + 151995 @@ -4391,27 +4229,22 @@ 1 2 - 302 + 5328066 2 3 - 53 + 583334 3 - 4 - 28 - - - 4 - 7 - 34 + 5 + 521715 - 7 - 60 - 15 + 5 + 308 + 492959 @@ -4427,22 +4260,22 @@ 1 2 - 314 + 5664921 2 3 - 67 + 558686 3 - 5 - 37 + 7 + 595658 - 5 - 26 - 14 + 7 + 14 + 106807 @@ -4458,27 +4291,22 @@ 1 2 - 302 + 5328066 2 3 - 53 + 583334 3 - 4 - 28 - - - 4 - 7 - 34 + 5 + 521715 - 7 - 60 - 15 + 5 + 308 + 492959 @@ -4494,7 +4322,7 @@ 1 2 - 432 + 6926075 @@ -4510,7 +4338,7 @@ 1 2 - 432 + 6926075 @@ -4526,32 +4354,17 @@ 1 2 - 55 - - - 2 - 3 - 3 + 1105050 3 - 4 - 11 - - - 4 - 7 - 7 - - - 8 - 28 - 7 + 6 + 110915 - 41 - 408 - 4 + 6 + 1550 + 65727 @@ -4567,32 +4380,17 @@ 1 2 - 55 + 1105050 2 3 - 3 + 102699 3 - 4 - 12 - - - 4 - 7 - 7 - - - 7 - 28 - 7 - - - 44 - 251 - 3 + 923 + 73943 @@ -4608,32 +4406,17 @@ 1 2 - 55 - - - 2 - 3 - 3 + 1105050 3 - 4 - 11 - - - 4 - 7 - 7 - - - 8 - 28 - 7 + 6 + 110915 - 41 - 408 - 4 + 6 + 1550 + 65727 @@ -4649,7 +4432,7 @@ 1 2 - 87 + 1281693 @@ -4665,32 +4448,12 @@ 1 2 - 55 - - - 2 - 3 - 3 - - - 3 - 4 - 12 + 1215965 4 - 5 - 7 - - - 5 - 12 - 7 - - - 13 - 15 - 3 + 24 + 65727 @@ -4704,9 +4467,9 @@ 12 - 869 - 870 - 1 + 3258 + 3259 + 4107 @@ -4720,9 +4483,9 @@ 12 - 427 - 428 - 1 + 1427 + 1428 + 4107 @@ -4736,9 +4499,9 @@ 12 - 432 - 433 - 1 + 1686 + 1687 + 4107 @@ -4752,9 +4515,9 @@ 12 - 87 - 88 - 1 + 312 + 313 + 4107 @@ -4768,9 +4531,9 @@ 12 - 14 - 15 - 1 + 23 + 24 + 4107 @@ -4784,69 +4547,54 @@ 12 - 5 - 6 - 1 + 1 + 10 + 8215 - 13 - 14 - 1 + 11 + 13 + 8215 - 14 + 13 15 - 2 + 8215 - 17 - 18 - 1 + 15 + 16 + 4107 - 28 - 29 - 1 + 16 + 17 + 8215 - 30 - 31 - 1 + 18 + 21 + 8215 - 34 - 35 - 1 + 23 + 49 + 8215 - 35 - 36 - 1 + 51 + 52 + 4107 - 36 - 37 - 1 - - - 80 - 81 - 1 - - - 177 - 178 - 1 - - - 191 - 192 - 1 + 52 + 53 + 28755 - 195 - 196 - 1 + 118 + 2510 + 8215 @@ -4860,69 +4608,54 @@ 12 - 3 - 4 - 1 - - - 7 - 8 - 2 + 1 + 2 + 4107 - 9 - 10 - 1 + 4 + 5 + 16431 - 13 - 14 - 1 + 5 + 6 + 4107 - 15 - 16 - 1 + 6 + 7 + 12323 - 18 - 19 - 1 + 7 + 8 + 4107 - 24 - 25 - 1 + 8 + 9 + 8215 - 25 - 26 - 1 + 23 + 24 + 4107 26 27 - 1 - - - 49 - 50 - 1 - - - 100 - 101 - 1 + 28755 - 105 - 106 - 1 + 27 + 37 + 8215 - 118 - 119 - 1 + 1314 + 1315 + 4107 @@ -4936,64 +4669,44 @@ 12 - 3 - 4 - 1 - - - 7 - 8 - 1 - - - 9 - 10 - 2 - - - 10 - 11 - 1 - - - 14 - 15 - 1 + 1 + 2 + 4107 - 15 - 16 - 2 + 5 + 6 + 28755 - 18 - 19 - 1 + 6 + 7 + 8215 - 20 - 21 - 1 + 7 + 9 + 8215 - 33 - 34 - 1 + 23 + 24 + 4107 - 88 - 89 - 1 + 26 + 27 + 28755 - 95 - 96 - 1 + 27 + 55 + 8215 - 96 - 97 - 1 + 1337 + 1338 + 4107 @@ -5007,54 +4720,49 @@ 12 - 2 - 3 - 1 - - - 4 - 5 - 2 + 1 + 4 + 8215 - 5 - 6 - 1 + 6 + 7 + 8215 7 8 - 3 + 20539 - 9 - 10 - 1 + 8 + 9 + 8215 - 13 - 14 - 1 + 11 + 12 + 4107 - 15 - 16 - 2 + 12 + 13 + 8215 - 32 - 33 - 1 + 13 + 14 + 8215 - 35 - 36 - 1 + 14 + 15 + 24647 - 65 - 66 - 1 + 310 + 311 + 4107 @@ -5070,7 +4778,7 @@ 1 2 - 14 + 94483 @@ -5080,15 +4788,15 @@ xmllocations - 1825 + 26028241 xmlElement - 1825 + 26028241 location - 1825 + 26028241 @@ -5102,7 +4810,7 @@ 1 2 - 1825 + 26028241 @@ -5118,7 +4826,7 @@ 1 2 - 1825 + 26028241 @@ -5128,15 +4836,15 @@ compilations - 1 + 31407 id - 1 + 31407 cwd - 1 + 31407 @@ -5150,7 +4858,7 @@ 1 2 - 1 + 31407 @@ -5166,7 +4874,7 @@ 1 2 - 1 + 31407 @@ -5176,19 +4884,19 @@ compilation_args - 3 + 94222 id - 1 + 31407 num - 3 + 5234 arg - 3 + 5234 @@ -5202,7 +4910,7 @@ 3 4 - 1 + 31407 @@ -5218,7 +4926,7 @@ 3 4 - 1 + 31407 @@ -5232,9 +4940,9 @@ 12 - 1 - 2 - 3 + 18 + 19 + 5234 @@ -5250,7 +4958,7 @@ 1 2 - 3 + 5234 @@ -5264,9 +4972,9 @@ 12 - 1 - 2 - 3 + 18 + 19 + 5234 @@ -5282,7 +4990,7 @@ 1 2 - 3 + 5234 @@ -5436,23 +5144,23 @@ diagnostic_for - 0 + 233782 diagnostic - 0 + 233782 compilation - 0 + 214 file_number - 0 + 56356 file_number_diagnostic_number - 0 + 19713 @@ -5466,7 +5174,7 @@ 1 2 - 1 + 233782 @@ -5482,7 +5190,7 @@ 1 2 - 1 + 233782 @@ -5498,7 +5206,7 @@ 1 2 - 1 + 233782 @@ -5510,7 +5218,13 @@ 12 - + + + 1091 + 1092 + 214 + + @@ -5520,7 +5234,13 @@ 12 - + + + 263 + 264 + 214 + + @@ -5530,7 +5250,13 @@ 12 - + + + 92 + 93 + 214 + + @@ -5540,7 +5266,43 @@ 12 - + + + 1 + 2 + 26999 + + + 2 + 3 + 8142 + + + 3 + 4 + 5785 + + + 4 + 6 + 4928 + + + 6 + 11 + 4714 + + + 11 + 18 + 4285 + + + 18 + 93 + 1499 + + @@ -5550,7 +5312,13 @@ 12 - + + + 1 + 2 + 56356 + + @@ -5560,7 +5328,43 @@ 12 - + + + 1 + 2 + 26999 + + + 2 + 3 + 8142 + + + 3 + 4 + 5785 + + + 4 + 6 + 4928 + + + 6 + 11 + 4714 + + + 11 + 18 + 4285 + + + 18 + 93 + 1499 + + @@ -5570,47 +5374,125 @@ 12 - - - - - - file_number_diagnostic_number - compilation - - - 12 - - - - - - file_number_diagnostic_number - file_number - - - 12 - - + + + 1 + 2 + 6642 + + + 2 + 3 + 4714 + + + 3 + 4 + 3428 + + + 4 + 10 + 1499 + + + 10 + 33 + 1499 + + + 33 + 100 + 1499 + + + 137 + 264 + 428 + + + + + + + file_number_diagnostic_number + compilation + + + 12 + + + 1 + 2 + 19713 + + + + + + + file_number_diagnostic_number + file_number + + + 12 + + + 1 + 2 + 6642 + + + 2 + 3 + 4714 + + + 3 + 4 + 3428 + + + 4 + 10 + 1499 + + + 10 + 33 + 1499 + + + 33 + 100 + 1499 + + + 137 + 264 + 428 + + + compilation_finished - 1 + 31407 id - 1 + 31407 cpu_seconds - 1 + 1744 elapsed_seconds - 1 + 31407 @@ -5624,7 +5506,7 @@ 1 2 - 1 + 31407 @@ -5640,7 +5522,7 @@ 1 2 - 1 + 31407 @@ -5654,9 +5536,9 @@ 12 - 1 - 2 - 1 + 18 + 19 + 1744 @@ -5670,9 +5552,9 @@ 12 - 1 - 2 - 1 + 18 + 19 + 1744 @@ -5688,7 +5570,7 @@ 1 2 - 1 + 31407 @@ -5704,7 +5586,7 @@ 1 2 - 1 + 31407 @@ -5714,19 +5596,19 @@ compilation_compiling_files - 515 + 82070 id - 1 + 214 num - 515 + 82070 file - 515 + 82070 @@ -5738,9 +5620,9 @@ 12 - 515 - 516 - 1 + 383 + 384 + 214 @@ -5754,9 +5636,9 @@ 12 - 515 - 516 - 1 + 383 + 384 + 214 @@ -5772,7 +5654,7 @@ 1 2 - 515 + 82070 @@ -5788,7 +5670,7 @@ 1 2 - 515 + 82070 @@ -5804,7 +5686,7 @@ 1 2 - 515 + 82070 @@ -5820,7 +5702,7 @@ 1 2 - 515 + 82070 @@ -5830,31 +5712,31 @@ diagnostics - 0 + 233782 id - 0 + 233782 severity - 0 + 214 error_tag - 0 + 642 error_message - 0 + 56999 full_error_message - 0 + 56999 location - 0 + 149140 @@ -5868,7 +5750,7 @@ 1 2 - 1 + 233782 @@ -5884,7 +5766,7 @@ 1 2 - 1 + 233782 @@ -5900,7 +5782,7 @@ 1 2 - 1 + 233782 @@ -5916,7 +5798,7 @@ 1 2 - 1 + 233782 @@ -5932,7 +5814,7 @@ 1 2 - 1 + 233782 @@ -5944,7 +5826,13 @@ 12 - + + + 1091 + 1092 + 214 + + @@ -5954,7 +5842,13 @@ 12 - + + + 3 + 4 + 214 + + @@ -5964,7 +5858,13 @@ 12 - + + + 266 + 267 + 214 + + @@ -5974,7 +5874,13 @@ 12 - + + + 266 + 267 + 214 + + @@ -5984,7 +5890,13 @@ 12 - + + + 696 + 697 + 214 + + @@ -5994,7 +5906,23 @@ 12 - + + + 16 + 17 + 214 + + + 51 + 52 + 214 + + + 1024 + 1025 + 214 + + @@ -6004,7 +5932,13 @@ 12 - + + + 1 + 2 + 642 + + @@ -6014,7 +5948,23 @@ 12 - + + + 10 + 11 + 214 + + + 47 + 48 + 214 + + + 210 + 211 + 214 + + @@ -6024,7 +5974,23 @@ 12 - + + + 10 + 11 + 214 + + + 47 + 48 + 214 + + + 210 + 211 + 214 + + @@ -6034,7 +6000,23 @@ 12 - + + + 9 + 10 + 214 + + + 39 + 40 + 214 + + + 680 + 681 + 214 + + @@ -6044,7 +6026,38 @@ 12 - + + + 1 + 2 + 32142 + + + 2 + 3 + 8357 + + + 3 + 4 + 6428 + + + 4 + 7 + 4928 + + + 7 + 17 + 4285 + + + 20 + 214 + 857 + + @@ -6054,7 +6067,13 @@ 12 - + + + 1 + 2 + 56999 + + @@ -6064,7 +6083,18 @@ 12 - + + + 1 + 2 + 56784 + + + 2 + 3 + 214 + + @@ -6074,7 +6104,13 @@ 12 - + + + 1 + 2 + 56999 + + @@ -6084,27 +6120,90 @@ 12 - - - - - - full_error_message - id - - - 12 - - - - - - full_error_message - severity + + + 1 + 2 + 39642 + + + 2 + 3 + 6214 + + + 3 + 4 + 4071 + + + 4 + 8 + 4499 + + + 8 + 214 + 2571 + + + + + + + full_error_message + id 12 - + + + 1 + 2 + 32142 + + + 2 + 3 + 8357 + + + 3 + 4 + 6428 + + + 4 + 7 + 4928 + + + 7 + 17 + 4285 + + + 20 + 214 + 857 + + + + + + + full_error_message + severity + + + 12 + + + 1 + 2 + 56999 + + @@ -6114,7 +6213,18 @@ 12 - + + + 1 + 2 + 56784 + + + 2 + 3 + 214 + + @@ -6124,7 +6234,13 @@ 12 - + + + 1 + 2 + 56999 + + @@ -6134,7 +6250,33 @@ 12 - + + + 1 + 2 + 39642 + + + 2 + 3 + 6214 + + + 3 + 4 + 4071 + + + 4 + 8 + 4499 + + + 8 + 214 + 2571 + + @@ -6144,7 +6286,23 @@ 12 - + + + 1 + 2 + 133069 + + + 2 + 4 + 11571 + + + 4 + 93 + 4499 + + @@ -6154,7 +6312,13 @@ 12 - + + + 1 + 2 + 149140 + + @@ -6164,7 +6328,18 @@ 12 - + + + 1 + 2 + 142283 + + + 2 + 3 + 6857 + + @@ -6174,7 +6349,18 @@ 12 - + + + 1 + 2 + 142069 + + + 2 + 15 + 7071 + + @@ -6184,7 +6370,18 @@ 12 - + + + 1 + 2 + 142069 + + + 2 + 15 + 7071 + + @@ -6192,31 +6389,31 @@ locations_default - 539178 + 37058201 id - 539178 + 37058201 file - 529 + 115023 beginLine - 10312 + 6174312 beginColumn - 211 + 1026998 endLine - 10378 + 7357414 endColumn - 274 + 1154345 @@ -6230,7 +6427,7 @@ 1 2 - 539178 + 37058201 @@ -6246,7 +6443,7 @@ 1 2 - 539178 + 37058201 @@ -6262,7 +6459,7 @@ 1 2 - 539178 + 37058201 @@ -6278,7 +6475,7 @@ 1 2 - 539178 + 37058201 @@ -6294,7 +6491,7 @@ 1 2 - 539178 + 37058201 @@ -6308,74 +6505,74 @@ 12 - 4 - 39 - 41 + 2 + 24 + 8215 - 39 - 120 - 40 + 28 + 30 + 8215 - 120 - 208 - 40 + 33 + 38 + 8215 - 210 - 290 - 40 + 38 + 39 + 8215 - 291 - 372 - 40 + 44 + 48 + 8215 - 372 - 453 - 41 + 58 + 68 + 8215 - 456 - 563 - 40 + 72 + 86 + 8215 - 565 - 769 - 40 + 126 + 132 + 8215 - 774 - 1007 - 40 + 133 + 134 + 4107 - 1012 - 1339 - 42 + 134 + 135 + 12323 - 1347 - 1700 - 40 + 135 + 136 + 12323 - 1701 - 2804 - 40 + 211 + 279 + 8215 - 2873 - 6918 - 40 + 1057 + 1261 + 8215 - 8171 - 11207 - 5 + 4417 + 4418 + 4107 @@ -6389,69 +6586,64 @@ 12 - 3 - 15 - 44 - - - 15 - 27 - 42 + 2 + 11 + 8215 - 27 - 46 - 40 + 12 + 14 + 8215 - 46 - 63 - 43 + 14 + 16 + 8215 - 63 - 78 - 40 + 16 + 17 + 4107 - 78 - 94 - 41 + 17 + 18 + 8215 - 95 - 120 - 40 + 20 + 21 + 8215 - 120 - 152 - 41 + 21 + 24 + 8215 - 152 - 188 - 40 + 28 + 34 + 8215 - 189 - 247 - 41 + 34 + 35 + 32863 - 249 - 325 - 40 + 40 + 109 + 8215 - 336 - 544 - 40 + 168 + 228 + 8215 - 554 - 10233 - 37 + 1355 + 1356 + 4107 @@ -6465,69 +6657,79 @@ 12 - 3 - 16 - 40 + 2 + 18 + 8215 - 16 - 34 - 40 + 19 + 20 + 8215 - 34 - 44 - 40 + 21 + 22 + 8215 - 45 - 51 - 44 + 22 + 23 + 8215 - 51 - 58 - 41 + 23 + 24 + 8215 - 58 - 63 - 47 + 25 + 27 + 8215 - 63 - 68 - 44 + 32 + 59 + 8215 - 68 - 73 - 43 + 60 + 65 + 8215 - 73 - 80 - 47 + 65 + 67 + 8215 - 80 - 86 - 43 + 67 + 68 + 4107 - 86 - 98 - 42 + 68 + 69 + 8215 - 98 - 115 - 42 + 69 + 70 + 4107 + + + 70 + 71 + 8215 + + + 80 + 93 + 8215 - 115 - 157 - 16 + 101 + 132 + 8215 @@ -6541,74 +6743,69 @@ 12 - 3 - 16 - 41 - - - 16 - 31 - 40 + 2 + 12 + 8215 - 31 - 52 - 40 + 12 + 14 + 8215 - 52 - 73 - 43 + 14 + 15 + 4107 - 73 - 92 - 42 + 15 + 16 + 8215 - 92 - 111 - 40 + 16 + 17 + 8215 - 111 - 139 - 40 + 19 + 20 + 8215 - 139 - 180 - 40 + 26 + 29 + 8215 - 180 - 219 - 40 + 30 + 38 + 8215 - 223 - 293 - 40 + 38 + 39 + 20539 - 294 - 370 - 40 + 39 + 40 + 12323 - 373 - 616 - 40 + 40 + 110 + 8215 - 617 - 1835 - 40 + 202 + 266 + 8215 - 2166 - 10377 - 3 + 1676 + 1677 + 4107 @@ -6622,69 +6819,79 @@ 12 - 4 - 21 - 42 + 2 + 17 + 8215 - 22 - 45 - 41 + 18 + 20 + 8215 - 46 - 59 - 43 + 23 + 25 + 8215 - 59 - 65 - 40 + 25 + 26 + 8215 - 65 - 71 - 42 + 26 + 31 + 8215 - 71 - 76 - 47 + 33 + 41 + 8215 - 76 - 81 - 40 + 42 + 61 + 8215 - 81 - 85 - 48 + 71 + 72 + 4107 85 - 91 - 41 + 86 + 8215 - 91 - 97 - 42 + 86 + 87 + 4107 - 97 - 105 - 41 + 88 + 89 + 8215 - 105 - 119 - 42 + 89 + 91 + 8215 - 119 - 166 - 20 + 91 + 92 + 8215 + + + 92 + 102 + 8215 + + + 125 + 149 + 8215 @@ -6700,32 +6907,47 @@ 1 2 - 6869 + 1142021 2 - 7 - 843 + 3 + 1092726 - 7 - 20 - 796 + 3 + 4 + 1039322 - 20 - 80 - 780 + 4 + 5 + 603874 - 80 - 698 - 774 + 5 + 6 + 612090 - 699 - 1775 - 250 + 6 + 7 + 390259 + + + 7 + 9 + 546363 + + + 9 + 21 + 484743 + + + 21 + 179 + 262911 @@ -6741,32 +6963,22 @@ 1 2 - 6947 + 5311634 2 3 - 868 + 353287 3 - 6 - 899 - - - 6 - 24 - 774 - - - 24 - 304 - 774 + 22 + 464203 - 305 - 530 - 50 + 22 + 29 + 45187 @@ -6782,32 +6994,47 @@ 1 2 - 6894 + 1146129 2 + 3 + 1121481 + + + 3 + 4 + 1051646 + + + 4 5 - 789 + 665494 5 - 11 - 780 + 6 + 624414 - 11 - 30 - 796 + 6 + 7 + 402583 - 30 - 72 - 779 + 7 + 8 + 517607 - 72 - 115 - 274 + 8 + 17 + 497067 + + + 17 + 57 + 147887 @@ -6823,27 +7050,17 @@ 1 2 - 7630 + 2690735 2 3 - 1017 + 3031698 3 - 6 - 779 - - - 6 - 21 - 792 - - - 21 - 315 - 94 + 14 + 451879 @@ -6859,32 +7076,47 @@ 1 2 - 6871 + 1630873 2 + 3 + 624414 + + + 3 + 4 + 1063970 + + + 4 5 - 793 + 636738 5 - 12 - 789 + 6 + 644954 - 12 - 33 - 778 + 6 + 7 + 480635 - 33 - 81 - 781 + 7 + 9 + 464203 - 81 - 127 - 300 + 9 + 19 + 476527 + + + 19 + 65 + 151995 @@ -6900,67 +7132,52 @@ 1 2 - 29 + 308099 2 - 4 - 19 - - - 4 - 9 - 16 - - - 10 - 22 - 16 - - - 22 - 62 - 16 + 3 + 127347 - 62 - 141 - 16 + 3 + 5 + 94483 - 144 - 330 - 16 + 5 + 8 + 90375 - 330 - 759 - 16 + 9 + 16 + 82159 - 781 - 1804 - 16 + 16 + 35 + 78051 - 1846 - 3757 - 16 + 35 + 66 + 78051 - 4042 - 8613 - 16 + 72 + 105 + 78051 - 8764 - 22092 - 16 + 105 + 408 + 78051 - 28067 - 55590 - 3 + 500 + 1007 + 12323 @@ -6976,62 +7193,47 @@ 1 2 - 36 + 320423 2 - 4 - 14 - - - 4 - 10 - 18 - - - 10 - 22 - 17 - - - 22 - 48 - 17 + 3 + 151995 - 49 - 96 - 17 + 3 + 4 + 53403 - 96 - 180 - 16 + 4 + 5 + 90375 - 180 - 292 - 16 + 5 + 6 + 98591 - 297 - 382 - 16 + 6 + 9 + 82159 - 383 - 430 - 16 + 9 + 13 + 69835 - 431 - 463 - 16 + 13 + 17 + 78051 - 463 - 530 - 12 + 17 + 29 + 82159 @@ -7047,67 +7249,47 @@ 1 2 - 36 + 394367 2 - 4 - 13 - - - 4 - 9 - 16 - - - 9 - 20 - 16 - - - 20 - 53 - 16 - - - 55 - 103 - 16 + 3 + 143779 - 107 - 209 - 16 + 3 + 5 + 86267 - 221 - 412 - 16 + 5 + 14 + 78051 - 422 - 682 - 16 + 14 + 32 + 82159 - 706 - 975 - 16 + 32 + 58 + 78051 - 977 - 1410 - 16 + 61 + 82 + 82159 - 1417 - 1983 - 16 + 83 + 623 + 78051 - 2809 - 10184 - 2 + 752 + 753 + 4107 @@ -7123,62 +7305,47 @@ 1 2 - 36 + 394367 2 - 4 - 13 - - - 4 - 9 - 16 - - - 9 - 21 - 19 - - - 24 - 55 - 16 + 3 + 143779 - 58 - 128 - 16 + 3 + 5 + 86267 - 131 - 226 - 16 + 5 + 14 + 78051 - 231 - 453 - 16 + 14 + 31 + 78051 - 480 - 769 - 16 + 31 + 56 + 78051 - 783 - 1037 - 16 + 57 + 80 + 82159 - 1057 - 1521 - 16 + 81 + 412 + 78051 - 1526 - 10180 - 15 + 627 + 773 + 8215 @@ -7194,62 +7361,42 @@ 1 2 - 31 + 468311 2 3 - 16 + 94483 3 - 6 - 17 - - - 6 - 12 - 17 - - - 12 - 21 - 16 - - - 21 - 28 - 16 - - - 28 - 35 - 17 + 5 + 78051 - 35 - 45 - 16 + 5 + 13 + 78051 - 46 - 56 - 16 + 13 + 23 + 90375 - 56 - 77 - 17 + 25 + 34 + 82159 - 77 - 101 - 17 + 34 + 41 + 82159 - 101 - 201 - 15 + 41 + 106 + 53403 @@ -7265,32 +7412,47 @@ 1 2 - 6731 + 3093318 2 + 3 + 505283 + + + 3 + 4 + 796950 + + + 4 + 5 + 801058 + + + 5 6 - 903 + 443663 6 - 16 - 817 + 7 + 303991 - 16 - 58 - 785 + 7 + 8 + 579226 - 58 - 457 - 779 + 8 + 21 + 562794 - 458 - 1734 - 363 + 21 + 174 + 271127 @@ -7306,32 +7468,22 @@ 1 2 - 6847 + 6318092 2 3 - 810 + 382043 3 - 5 - 787 - - - 5 - 14 - 802 - - - 14 - 104 - 780 + 16 + 554578 - 105 - 530 - 352 + 16 + 29 + 102699 @@ -7347,27 +7499,17 @@ 1 2 - 7766 + 4962455 2 3 - 956 + 1934864 3 - 7 - 860 - - - 7 - 27 - 785 - - - 27 - 31 - 11 + 8 + 460095 @@ -7383,32 +7525,47 @@ 1 2 - 6749 + 3101534 2 + 3 + 521715 + + + 3 4 - 616 + 813382 4 - 8 - 878 + 5 + 870894 - 8 - 21 - 799 + 5 + 6 + 468311 - 21 - 53 - 779 + 6 + 7 + 308099 - 53 - 113 - 557 + 7 + 8 + 640846 + + + 8 + 24 + 562794 + + + 24 + 54 + 69835 @@ -7424,32 +7581,47 @@ 1 2 - 6792 + 3130290 2 + 3 + 529931 + + + 3 + 4 + 796950 + + + 4 5 - 936 + 854462 5 - 12 - 801 + 6 + 443663 - 12 - 34 - 791 + 6 + 7 + 414907 - 34 - 83 - 787 + 7 + 9 + 583334 - 83 - 127 - 271 + 9 + 32 + 554578 + + + 33 + 66 + 49295 @@ -7465,57 +7637,57 @@ 1 2 - 33 + 262911 2 3 - 60 + 180751 3 - 9 - 23 + 4 + 32863 - 9 - 40 - 21 + 4 + 5 + 98591 - 43 - 111 - 21 + 5 + 7 + 90375 - 121 - 347 - 21 + 7 + 15 + 90375 - 369 - 1229 - 21 + 15 + 37 + 90375 - 1267 - 3311 - 21 + 40 + 71 + 90375 - 3642 - 7560 - 21 + 71 + 101 + 90375 - 7682 - 12716 - 21 + 101 + 144 + 90375 - 12740 - 20483 - 11 + 146 + 448 + 36971 @@ -7531,52 +7703,52 @@ 1 2 - 94 + 312207 2 - 6 - 19 + 3 + 156103 - 6 - 16 - 21 + 3 + 4 + 53403 - 16 - 45 - 21 + 4 + 5 + 119131 - 45 - 110 - 21 + 5 + 6 + 94483 - 123 - 281 - 21 + 6 + 9 + 102699 - 290 - 393 - 21 + 9 + 12 + 90375 - 395 - 445 - 21 + 12 + 15 + 82159 - 446 - 468 - 21 + 15 + 19 + 94483 - 470 - 530 - 14 + 19 + 29 + 49295 @@ -7592,52 +7764,47 @@ 1 2 - 94 + 414907 2 - 6 - 19 - - - 6 - 21 - 21 + 3 + 160211 - 21 - 52 - 21 + 3 + 5 + 102699 - 54 - 154 - 21 + 5 + 11 + 94483 - 157 - 449 - 21 + 11 + 38 + 90375 - 455 - 808 - 21 + 40 + 66 + 90375 - 814 - 1132 - 21 + 67 + 86 + 90375 - 1145 - 1769 - 21 + 86 + 126 + 94483 - 1792 - 2365 - 14 + 126 + 352 + 16431 @@ -7653,57 +7820,47 @@ 1 2 - 39 + 460095 2 3 - 56 + 102699 3 - 7 - 23 + 4 + 69835 - 7 - 18 - 21 - - - 18 - 27 - 24 - - - 27 - 37 - 22 + 4 + 8 + 106807 - 37 - 49 - 23 + 8 + 16 + 94483 - 49 - 63 - 22 + 16 + 26 + 94483 - 63 - 74 - 20 + 26 + 31 + 86267 - 74 - 102 - 21 + 31 + 35 + 94483 - 103 - 172 - 3 + 35 + 58 + 45187 @@ -7719,52 +7876,47 @@ 1 2 - 94 + 414907 2 - 6 - 19 - - - 6 - 21 - 21 + 3 + 160211 - 21 - 52 - 21 + 3 + 5 + 102699 - 53 - 153 - 21 + 5 + 11 + 94483 - 156 - 444 - 21 + 11 + 38 + 90375 - 446 - 789 - 21 + 40 + 67 + 94483 - 806 - 1121 - 21 + 68 + 87 + 90375 - 1138 - 1726 - 21 + 87 + 127 + 90375 - 1787 - 2357 - 14 + 131 + 394 + 16431 @@ -7774,23 +7926,23 @@ numlines - 514 + 81641 element_id - 514 + 81641 num_lines - 309 + 22071 num_code - 350 + 17999 num_comment - 150 + 10928 @@ -7804,7 +7956,7 @@ 1 2 - 514 + 81641 @@ -7820,7 +7972,7 @@ 1 2 - 514 + 81641 @@ -7836,7 +7988,7 @@ 1 2 - 514 + 81641 @@ -7852,22 +8004,47 @@ 1 2 - 183 + 7285 2 3 - 74 + 3857 3 4 - 32 + 1285 4 + 5 + 2142 + + + 5 + 6 + 1928 + + + 6 7 - 20 + 1928 + + + 7 + 9 + 1285 + + + 9 + 11 + 1285 + + + 11 + 12 + 1071 @@ -7883,22 +8060,37 @@ 1 2 - 187 + 8357 2 3 - 82 + 3642 3 4 - 23 + 2142 4 - 7 - 17 + 5 + 2357 + + + 5 + 6 + 2785 + + + 6 + 8 + 1928 + + + 8 + 10 + 857 @@ -7914,22 +8106,37 @@ 1 2 - 188 + 8785 2 3 - 79 + 3857 3 4 - 28 + 2357 4 + 5 + 2357 + + + 5 + 6 + 1928 + + + 6 7 - 14 + 1285 + + + 7 + 10 + 1499 @@ -7945,22 +8152,37 @@ 1 2 - 252 + 6214 2 3 - 65 + 4071 3 - 5 - 28 + 4 + 2142 - 6 - 18 - 5 + 5 + 8 + 1285 + + + 8 + 10 + 1285 + + + 10 + 13 + 1499 + + + 14 + 22 + 1499 @@ -7976,17 +8198,42 @@ 1 2 - 256 + 7071 2 3 - 67 + 3428 3 + 4 + 2142 + + + 4 + 7 + 1499 + + + 7 + 9 + 1285 + + + 9 + 10 + 857 + + + 10 + 15 + 1499 + + + 17 18 - 27 + 214 @@ -8002,22 +8249,37 @@ 1 2 - 259 + 7071 2 3 - 63 + 3428 3 + 4 + 2142 + + + 4 + 6 + 857 + + + 6 7 - 27 + 1714 - 17 - 18 - 1 + 7 + 9 + 1499 + + + 9 + 16 + 1285 @@ -8033,37 +8295,47 @@ 1 2 - 65 + 3214 2 3 - 27 + 2142 3 4 - 17 + 1285 4 - 5 - 7 + 7 + 642 - 5 - 6 - 10 + 7 + 8 + 428 - 6 - 10 - 12 + 8 + 9 + 1071 - 10 - 31 - 12 + 11 + 18 + 857 + + + 18 + 28 + 857 + + + 37 + 84 + 428 @@ -8079,37 +8351,47 @@ 1 2 - 65 + 3214 2 3 - 27 + 2357 3 4 - 18 + 1285 4 5 - 7 + 214 - 5 - 6 - 10 + 6 + 7 + 857 - 6 - 10 - 13 + 7 + 9 + 857 10 - 25 - 10 + 13 + 642 + + + 14 + 16 + 857 + + + 22 + 39 + 642 @@ -8125,37 +8407,47 @@ 1 2 - 66 + 3214 2 3 - 27 + 2357 3 4 - 17 + 1285 4 - 5 - 6 - - - 5 6 - 10 + 642 6 - 9 - 12 + 8 + 642 - 9 - 24 - 12 + 8 + 10 + 857 + + + 10 + 14 + 857 + + + 14 + 26 + 857 + + + 33 + 34 + 214 @@ -8165,15 +8457,15 @@ files - 529 + 146783 id - 529 + 146783 name - 529 + 146783 @@ -8187,7 +8479,7 @@ 1 2 - 529 + 146783 @@ -8203,7 +8495,7 @@ 1 2 - 529 + 146783 @@ -8213,15 +8505,15 @@ folders - 210 + 98591 id - 210 + 98591 name - 210 + 98591 @@ -8235,7 +8527,7 @@ 1 2 - 210 + 98591 @@ -8251,7 +8543,7 @@ 1 2 - 210 + 98591 @@ -8261,15 +8553,15 @@ containerparent - 738 + 243853 parent - 210 + 97284 child - 738 + 243853 @@ -8283,32 +8575,27 @@ 1 2 - 115 + 56142 2 3 - 32 + 21856 3 4 - 12 + 6214 4 - 6 - 19 - - - 6 - 12 - 16 + 7 + 8357 - 13 - 38 - 16 + 7 + 95 + 4714 @@ -8324,7 +8611,7 @@ 1 2 - 738 + 243853 @@ -8334,15 +8621,15 @@ has_location - 599339 + 14587326 locatable - 599339 + 14587326 location - 537353 + 11868805 @@ -8356,7 +8643,7 @@ 1 2 - 599339 + 14587326 @@ -8372,17 +8659,12 @@ 1 2 - 475682 + 9150285 2 3 - 61627 - - - 3 - 75 - 44 + 2718520 @@ -8392,19 +8674,19 @@ comment_groups - 12083 + 2493839 id - 12083 + 2493839 parent - 509 + 3187 idx - 720 + 846614 @@ -8418,7 +8700,7 @@ 1 2 - 12083 + 2493839 @@ -8434,7 +8716,7 @@ 1 2 - 12083 + 2493839 @@ -8450,67 +8732,52 @@ 1 2 - 44 + 691 2 3 - 45 + 384 3 4 - 32 + 230 4 - 5 - 27 - - - 5 - 7 - 38 - - - 7 - 10 - 47 + 6 + 268 - 10 - 13 - 34 + 6 + 12 + 268 - 13 - 17 - 47 + 12 + 18 + 230 - 17 - 23 - 40 + 18 + 24 + 268 - 23 - 29 - 40 + 34 + 110 + 230 - 29 - 38 - 39 + 256 + 257 + 460 - 38 - 70 - 39 - - - 70 - 721 - 37 + 7980 + 22048 + 153 @@ -8526,67 +8793,52 @@ 1 2 - 44 + 691 2 3 - 45 + 384 3 4 - 32 + 230 4 - 5 - 27 - - - 5 - 7 - 38 - - - 7 - 10 - 47 - - - 10 - 13 - 34 + 6 + 268 - 13 - 17 - 47 + 6 + 12 + 268 - 17 - 23 - 40 + 12 + 18 + 230 - 23 - 29 - 40 + 18 + 24 + 268 - 29 - 38 - 39 + 34 + 110 + 230 - 38 - 70 - 39 + 256 + 257 + 460 - 70 - 721 - 37 + 7980 + 22048 + 153 @@ -8602,37 +8854,27 @@ 1 2 - 429 + 182133 2 3 - 53 + 136129 3 - 8 - 66 + 4 + 221916 - 8 - 16 - 57 + 4 + 5 + 296604 16 - 44 - 54 - - - 44 - 311 - 54 - - - 323 - 510 - 7 + 84 + 9830 @@ -8648,37 +8890,27 @@ 1 2 - 429 + 182133 2 3 - 53 + 136129 3 - 8 - 66 + 4 + 221916 - 8 - 16 - 57 + 4 + 5 + 296604 16 - 44 - 54 - - - 44 - 311 - 54 - - - 323 - 510 - 7 + 84 + 9830 @@ -8688,27 +8920,27 @@ comments - 25724 + 2514805 id - 25724 + 2514805 kind - 2 + 76 parent - 12083 + 2493839 idx - 156 + 1728 text - 20683 + 541522 @@ -8722,7 +8954,7 @@ 1 2 - 25724 + 2514805 @@ -8738,7 +8970,7 @@ 1 2 - 25724 + 2514805 @@ -8754,7 +8986,7 @@ 1 2 - 25724 + 2514805 @@ -8770,7 +9002,7 @@ 1 2 - 25724 + 2514805 @@ -8784,14 +9016,14 @@ 12 - 846 - 847 - 1 + 5 + 6 + 38 - 24878 - 24879 - 1 + 65484 + 65485 + 38 @@ -8805,14 +9037,14 @@ 12 - 846 - 847 - 1 + 5 + 6 + 38 - 11239 - 11240 - 1 + 64938 + 64939 + 38 @@ -8826,14 +9058,14 @@ 12 - 2 - 3 - 1 + 1 + 2 + 38 - 156 - 157 - 1 + 45 + 46 + 38 @@ -8847,14 +9079,14 @@ 12 - 690 - 691 - 1 + 5 + 6 + 38 - 19993 - 19994 - 1 + 14097 + 14098 + 38 @@ -8870,27 +9102,12 @@ 1 2 - 7828 + 2484930 2 - 3 - 1787 - - - 3 - 4 - 1289 - - - 4 - 11 - 937 - - - 11 - 157 - 242 + 46 + 8908 @@ -8906,12 +9123,7 @@ 1 2 - 12081 - - - 2 - 3 - 2 + 2493839 @@ -8927,27 +9139,12 @@ 1 2 - 7828 + 2484930 2 - 3 - 1787 - - - 3 - 4 - 1289 - - - 4 - 11 - 937 - - - 11 - 157 - 242 + 46 + 8908 @@ -8963,27 +9160,12 @@ 1 2 - 7828 + 2484930 2 - 3 - 1817 - - - 3 - 4 - 1275 - - - 4 - 10 - 937 - - - 10 - 131 - 226 + 33 + 8908 @@ -8999,57 +9181,32 @@ 1 2 - 36 + 921 2 - 4 - 13 - - - 4 - 5 - 16 + 3 + 307 5 - 7 - 12 - - - 7 - 9 - 12 - - - 9 - 11 - 6 - - - 12 - 14 - 13 - - - 14 - 24 - 13 + 10 + 153 - 26 - 52 - 12 + 11 + 20 + 153 - 59 - 218 - 12 + 34 + 233 + 153 - 242 - 12084 - 11 + 64943 + 64944 + 38 @@ -9065,12 +9222,12 @@ 1 2 - 154 + 1689 2 3 - 2 + 38 @@ -9086,57 +9243,32 @@ 1 2 - 36 + 921 2 - 4 - 13 - - - 4 - 5 - 16 + 3 + 307 5 - 7 - 12 - - - 7 - 9 - 12 - - - 9 - 11 - 6 - - - 12 - 14 - 13 - - - 14 - 24 - 13 + 10 + 153 - 26 - 52 - 12 + 11 + 20 + 153 - 59 - 218 - 12 + 34 + 233 + 153 - 242 - 12084 - 11 + 64943 + 64944 + 38 @@ -9152,52 +9284,32 @@ 1 2 - 36 + 960 2 - 4 - 14 + 3 + 268 4 - 5 - 18 - - - 5 - 7 - 14 - - - 7 - 9 - 11 - - - 9 - 12 - 14 - - - 12 - 17 - 12 + 8 + 153 - 19 - 36 - 13 + 8 + 15 + 153 - 39 - 128 - 12 + 29 + 188 + 153 - 165 - 10500 - 12 + 13716 + 13717 + 38 @@ -9213,12 +9325,17 @@ 1 2 - 19550 + 494827 2 - 1935 - 1133 + 12 + 40819 + + + 12 + 45601 + 5875 @@ -9234,7 +9351,7 @@ 1 2 - 20683 + 541522 @@ -9250,12 +9367,17 @@ 1 2 - 19575 + 494904 2 - 828 - 1108 + 12 + 40742 + + + 12 + 45601 + 5875 @@ -9271,12 +9393,12 @@ 1 2 - 20523 + 540255 2 - 107 - 160 + 18 + 1267 @@ -9286,15 +9408,15 @@ doc_comments - 4330 + 273911 node - 4330 + 273911 comment - 4330 + 273911 @@ -9308,7 +9430,7 @@ 1 2 - 4330 + 273911 @@ -9324,7 +9446,7 @@ 1 2 - 4330 + 273911 @@ -9334,23 +9456,23 @@ exprs - 414037 + 8869156 id - 414037 + 8869156 kind - 48 + 14536 parent - 219324 + 4516748 idx - 5163 + 258019 @@ -9364,7 +9486,7 @@ 1 2 - 414037 + 8869156 @@ -9380,7 +9502,7 @@ 1 2 - 414037 + 8869156 @@ -9396,7 +9518,7 @@ 1 2 - 414037 + 8869156 @@ -9410,64 +9532,64 @@ 12 - 7 - 20 - 4 + 1 + 2 + 1211 - 21 - 54 - 4 + 2 + 3 + 1615 - 57 - 142 - 4 + 5 + 10 + 1211 - 146 - 236 - 4 + 11 + 13 + 1211 - 248 - 344 - 4 + 13 + 16 + 1211 - 509 - 620 - 4 + 17 + 36 + 1211 - 678 - 839 - 4 + 37 + 44 + 1211 - 1013 - 1235 - 4 + 49 + 120 + 1211 - 1272 - 2705 - 4 + 193 + 250 + 1211 - 3244 - 4582 - 4 + 322 + 516 + 1211 - 5616 - 10361 - 4 + 752 + 1581 + 1211 - 24892 - 237317 - 4 + 3202 + 12977 + 807 @@ -9481,64 +9603,64 @@ 12 - 7 - 20 - 4 + 1 + 2 + 1211 - 21 - 54 - 4 + 2 + 3 + 1615 - 57 - 142 - 4 + 5 + 10 + 1211 - 144 - 207 - 4 + 11 + 13 + 1211 - 233 - 324 - 4 + 13 + 16 + 1211 - 509 - 613 - 4 + 17 + 36 + 1211 - 676 - 790 - 4 + 37 + 39 + 1211 - 1013 - 1226 - 4 + 49 + 107 + 1211 - 1239 - 1949 - 4 + 119 + 177 + 1211 - 2582 - 3985 - 4 + 245 + 323 + 1211 - 4252 - 10115 - 4 + 414 + 1535 + 1211 - 14086 - 154744 - 4 + 2864 + 8533 + 807 @@ -9554,52 +9676,32 @@ 1 2 - 3 + 4441 2 3 - 8 + 4845 3 4 - 10 + 1615 4 - 5 - 6 - - - 5 - 7 - 4 - - - 7 - 8 - 4 - - - 8 - 14 - 3 - - - 15 - 22 - 4 + 11 + 1211 - 23 - 34 - 4 + 11 + 13 + 1211 - 1057 - 5164 - 2 + 14 + 638 + 1211 @@ -9615,22 +9717,22 @@ 1 2 - 65804 + 1170575 2 3 - 133334 + 2867283 3 - 5 - 17889 + 4 + 315760 - 5 - 5144 - 2297 + 4 + 637 + 163129 @@ -9646,17 +9748,17 @@ 1 2 - 137263 + 2711018 2 3 - 75813 + 1642197 3 - 7 - 6248 + 5 + 163533 @@ -9672,22 +9774,22 @@ 1 2 - 65804 + 1170575 2 3 - 133334 + 2867283 3 - 5 - 17889 + 4 + 315760 - 5 - 5144 - 2297 + 4 + 637 + 163129 @@ -9703,22 +9805,12 @@ 1 2 - 3910 + 249943 2 - 3 - 183 - - - 3 - 4 - 782 - - - 4 - 180006 - 288 + 9640 + 8075 @@ -9734,17 +9826,12 @@ 1 2 - 4087 + 250347 2 - 3 - 1033 - - - 3 - 48 - 43 + 33 + 7671 @@ -9760,22 +9847,12 @@ 1 2 - 3910 + 249943 2 - 3 - 183 - - - 3 - 4 - 782 - - - 4 - 180006 - 288 + 9640 + 8075 @@ -9785,19 +9862,19 @@ literals - 270756 + 8555361 expr - 270756 + 8555361 value - 25795 + 75495 raw - 27594 + 77891 @@ -9811,7 +9888,7 @@ 1 2 - 270756 + 8555361 @@ -9827,7 +9904,7 @@ 1 2 - 270756 + 8555361 @@ -9843,37 +9920,42 @@ 1 2 - 14635 + 27811 2 3 - 3291 + 12538 3 4 - 1783 + 6753 4 - 6 - 1931 + 5 + 5276 - 6 - 12 - 1968 + 5 + 8 + 6269 - 12 - 139 - 1935 + 8 + 17 + 5809 + + + 17 + 1233 + 5663 - 139 - 6840 - 252 + 1234 + 3959 + 5373 @@ -9889,12 +9971,12 @@ 1 2 - 24051 + 73171 2 - 5 - 1744 + 4 + 2323 @@ -9910,32 +9992,42 @@ 1 2 - 16038 + 29191 2 3 - 3521 + 13046 3 4 - 1869 + 6777 4 - 7 - 2553 + 5 + 5276 - 7 - 18 - 2129 + 5 + 8 + 6632 - 18 - 6833 - 1484 + 8 + 17 + 5857 + + + 17 + 1239 + 5857 + + + 1240 + 3937 + 5252 @@ -9951,7 +10043,7 @@ 1 2 - 27594 + 77891 @@ -9961,19 +10053,19 @@ constvalues - 43931 + 8093673 expr - 43931 + 8093673 value - 16896 + 27230 exact - 16897 + 27230 @@ -9987,7 +10079,7 @@ 1 2 - 43931 + 8093673 @@ -10003,7 +10095,7 @@ 1 2 - 43931 + 8093673 @@ -10019,17 +10111,37 @@ 1 2 - 14932 + 15539 2 - 4 - 1388 + 3 + 2420 - 4 - 6766 - 576 + 3 + 6 + 2130 + + + 6 + 1243 + 2105 + + + 1243 + 1281 + 2105 + + + 1281 + 1340 + 2057 + + + 1340 + 3974 + 871 @@ -10045,12 +10157,7 @@ 1 2 - 16895 - - - 2 - 3 - 1 + 27230 @@ -10066,17 +10173,37 @@ 1 2 - 14933 + 15539 2 - 4 - 1388 + 3 + 2420 - 4 - 6766 - 576 + 3 + 6 + 2130 + + + 6 + 1243 + 2105 + + + 1243 + 1281 + 2105 + + + 1281 + 1340 + 2057 + + + 1340 + 3974 + 871 @@ -10092,7 +10219,7 @@ 1 2 - 16897 + 27230 @@ -10102,19 +10229,19 @@ fields - 19974 + 995459 id - 19974 + 995459 parent - 9600 + 346065 idx - 57 + 48913 @@ -10128,7 +10255,7 @@ 1 2 - 19974 + 995459 @@ -10144,7 +10271,7 @@ 1 2 - 19974 + 995459 @@ -10160,27 +10287,32 @@ 1 2 - 4790 + 141898 2 3 - 2214 + 76625 3 4 - 1363 + 45908 4 5 - 653 + 32219 5 - 53 - 580 + 7 + 29548 + + + 7 + 290 + 19865 @@ -10196,27 +10328,32 @@ 1 2 - 4790 + 141898 2 3 - 2214 + 76625 3 4 - 1363 + 45908 4 5 - 653 + 32219 5 - 53 - 580 + 7 + 29548 + + + 7 + 290 + 19865 @@ -10232,47 +10369,27 @@ 1 2 - 14 + 38729 2 - 3 - 8 - - - 3 - 6 - 5 + 4 + 1836 - 6 - 11 - 5 + 4 + 12 + 3672 12 - 18 - 5 - - - 19 - 31 - 5 - - - 46 - 105 - 5 - - - 115 - 633 - 5 + 185 + 3672 - 914 - 7063 - 5 + 269 + 1368 + 1001 @@ -10288,47 +10405,27 @@ 1 2 - 14 + 38729 2 - 3 - 8 - - - 3 - 6 - 5 + 4 + 1836 - 6 - 11 - 5 + 4 + 12 + 3672 12 - 18 - 5 - - - 19 - 31 - 5 - - - 46 - 105 - 5 - - - 115 - 633 - 5 + 185 + 3672 - 914 - 7063 - 5 + 269 + 1368 + 1001 @@ -10337,30 +10434,26 @@ - stmts - 73990 + typeparamdecls + 9798 id - 73990 - - - kind - 33 + 9798 parent - 41543 + 8398 idx - 81 + 1399 id - kind + parent 12 @@ -10368,7 +10461,7 @@ 1 2 - 73990 + 9798 @@ -10376,7 +10469,7 @@ id - parent + idx 12 @@ -10384,15 +10477,15 @@ 1 2 - 73990 + 9798 - id - idx + parent + id 12 @@ -10400,85 +10493,61 @@ 1 2 - 73990 + 6999 + + + 2 + 3 + 1399 - kind - id + parent + idx 12 - 2 - 3 - 1 - - - 3 - 4 - 4 - - - 5 - 9 - 3 - - - 18 - 50 - 3 - - - 63 - 72 - 3 - - - 72 - 224 - 3 - - - 301 - 379 - 3 - - - 400 - 615 - 3 - - - 654 - 2136 - 3 + 1 + 2 + 6999 - 3476 - 7606 - 3 + 2 + 3 + 1399 + + + + + + idx + id + + + 12 + - 9225 - 9729 - 3 + 2 + 3 + 699 - 19358 - 19359 - 1 + 12 + 13 + 699 - kind + idx parent @@ -10487,62 +10556,185 @@ 2 3 - 1 + 699 - 3 + 12 + 13 + 699 + + + + + + + + + stmts + 1915917 + + + id + 1915917 + + + kind + 30538 + + + parent + 935456 + + + idx + 33753 + + + + + id + kind + + + 12 + + + 1 + 2 + 1915917 + + + + + + + id + parent + + + 12 + + + 1 + 2 + 1915917 + + + + + + + id + idx + + + 12 + + + 1 + 2 + 1915917 + + + + + + + kind + id + + + 12 + + + 1 + 2 + 1607 + + + 3 4 - 4 + 1607 + + + 4 + 5 + 3214 5 + 6 + 1607 + + + 6 + 7 + 1607 + + + 7 + 8 + 1607 + + + 8 9 - 3 + 1607 - 17 - 35 - 3 + 11 + 12 + 1607 - 47 - 69 - 3 + 13 + 14 + 1607 - 69 - 205 - 3 + 14 + 15 + 1607 + + + 17 + 18 + 1607 + + + 33 + 34 + 1607 - 301 - 367 - 3 + 95 + 96 + 1607 - 385 - 586 - 3 + 106 + 107 + 1607 - 606 - 1154 - 3 + 177 + 178 + 1607 - 1719 - 5672 - 3 + 191 + 192 + 1607 - 5912 - 9226 - 3 + 208 + 209 + 1607 - 18820 - 18821 - 1 + 289 + 290 + 1607 @@ -10550,7 +10742,7 @@ kind - idx + parent 12 @@ -10558,70 +10750,95 @@ 1 2 - 1 + 1607 2 3 - 5 + 1607 3 + 4 + 1607 + + + 4 5 - 2 + 4821 5 - 8 - 3 + 6 + 1607 - 8 - 9 - 3 + 6 + 7 + 1607 - 9 + 7 + 8 + 1607 + + + 12 13 - 3 + 1607 13 - 16 - 3 + 14 + 1607 - 16 - 17 - 2 + 15 + 16 + 1607 17 - 27 - 3 + 18 + 1607 - 27 - 33 - 3 + 75 + 76 + 1607 - 44 - 47 - 3 + 88 + 89 + 1607 - 55 - 82 - 2 + 92 + 93 + 1607 + + + 106 + 107 + 1607 + + + 154 + 155 + 1607 + + + 274 + 275 + 1607 - parent - id + kind + idx 12 @@ -10629,22 +10846,57 @@ 1 2 - 29362 + 3214 2 3 - 6137 + 1607 3 + 4 + 9643 + + + 4 5 - 3650 + 3214 5 - 82 - 2394 + 6 + 1607 + + + 9 + 10 + 1607 + + + 12 + 13 + 1607 + + + 13 + 14 + 1607 + + + 15 + 16 + 3214 + + + 16 + 17 + 1607 + + + 20 + 21 + 1607 @@ -10652,7 +10904,7 @@ parent - kind + id 12 @@ -10660,22 +10912,22 @@ 1 2 - 31418 + 622030 2 3 - 5760 + 162338 3 5 - 3597 + 85187 5 - 11 - 768 + 22 + 65899 @@ -10683,7 +10935,7 @@ parent - idx + kind 12 @@ -10691,30 +10943,30 @@ 1 2 - 29362 + 683108 2 3 - 6137 + 155909 3 - 5 - 3650 + 6 + 72329 - 5 - 82 - 2394 + 6 + 8 + 24109 - idx - id + parent + idx 12 @@ -10722,52 +10974,22 @@ 1 2 - 6 + 622030 2 3 - 20 - - - 5 - 6 - 3 + 162338 - 7 - 8 - 11 - - - 10 - 15 - 7 - - - 15 - 27 - 7 - - - 27 - 70 - 7 - - - 85 - 262 - 7 - - - 314 - 1279 - 7 + 3 + 5 + 85187 - 1720 - 24879 - 6 + 5 + 22 + 65899 @@ -10775,7 +10997,7 @@ idx - kind + id 12 @@ -10783,52 +11005,87 @@ 1 2 - 12 + 1607 - 2 - 3 - 22 + 6 + 7 + 4821 - 3 - 5 - 7 - - - 5 - 6 - 6 + 7 + 8 + 3214 - 6 - 7 - 4 + 8 + 9 + 1607 - 7 - 9 - 7 + 10 + 11 + 1607 - 9 - 13 - 7 + 11 + 12 + 3214 - 13 + 17 18 - 7 + 1607 + + + 19 + 20 + 1607 20 - 28 - 6 + 21 + 1607 + + + 25 + 26 + 1607 29 - 34 - 3 + 30 + 1607 + + + 37 + 38 + 1607 + + + 41 + 42 + 1607 + + + 98 + 99 + 1607 + + + 167 + 168 + 1607 + + + 331 + 332 + 1607 + + + 335 + 336 + 1607 @@ -10836,7 +11093,7 @@ idx - parent + kind 12 @@ -10844,52 +11101,163 @@ 1 2 - 6 + 3214 2 3 - 20 + 1607 + + + 3 + 4 + 3214 + + + 4 + 5 + 4821 5 6 - 3 + 4821 + + + 6 + 7 + 1607 7 8 - 11 + 3214 + + + 8 + 9 + 1607 + + + 9 + 10 + 3214 10 + 11 + 1607 + + + 12 + 13 + 1607 + + + 14 15 - 7 + 1607 - 15 - 27 - 7 + 16 + 17 + 1607 + + + + + + idx + parent + + + 12 + - 27 - 70 - 7 + 1 + 2 + 1607 - 85 - 262 - 7 + 6 + 7 + 4821 + + + 7 + 8 + 3214 + + + 8 + 9 + 1607 + + + 10 + 11 + 1607 + + + 11 + 12 + 3214 + + + 17 + 18 + 1607 + + + 19 + 20 + 1607 + + + 20 + 21 + 1607 + + + 25 + 26 + 1607 + + + 29 + 30 + 1607 + + + 37 + 38 + 1607 + + + 41 + 42 + 1607 + + + 98 + 99 + 1607 + + + 167 + 168 + 1607 - 314 - 1279 - 7 + 331 + 332 + 1607 - 1720 - 24879 - 6 + 335 + 336 + 1607 @@ -10899,23 +11267,23 @@ decls - 8690 + 443378 id - 8690 + 443378 kind - 5 + 528 parent - 1951 + 123356 idx - 226 + 59475 @@ -10929,7 +11297,7 @@ 1 2 - 8690 + 443378 @@ -10945,7 +11313,7 @@ 1 2 - 8690 + 443378 @@ -10961,7 +11329,7 @@ 1 2 - 8690 + 443378 @@ -10975,29 +11343,34 @@ 12 - 280 - 281 - 1 + 2 + 3 + 88 + + + 45 + 46 + 88 - 479 - 480 - 1 + 208 + 209 + 88 - 1349 - 1350 - 1 + 421 + 422 + 88 - 1769 - 1770 - 1 + 1140 + 1141 + 88 - 4813 - 4814 - 1 + 3216 + 3217 + 88 @@ -11011,29 +11384,34 @@ 12 - 196 - 197 - 1 + 2 + 3 + 88 + + + 34 + 35 + 88 - 336 - 337 - 1 + 100 + 101 + 88 - 478 - 479 - 1 + 421 + 422 + 88 - 483 - 484 - 1 + 547 + 548 + 88 - 1566 - 1567 - 1 + 882 + 883 + 88 @@ -11047,29 +11425,29 @@ 12 - 2 - 3 - 1 + 1 + 2 + 176 - 39 - 40 - 1 + 15 + 16 + 88 - 105 - 106 - 1 + 26 + 27 + 88 - 219 - 220 - 1 + 237 + 238 + 88 - 225 - 226 - 1 + 675 + 676 + 88 @@ -11085,27 +11463,27 @@ 1 2 - 1460 + 80886 2 - 6 - 149 + 3 + 16476 - 6 - 12 - 155 + 3 + 5 + 9956 - 12 - 36 - 147 + 5 + 12 + 9956 - 36 - 227 - 40 + 12 + 676 + 6079 @@ -11121,27 +11499,17 @@ 1 2 - 1463 + 83089 2 3 - 111 + 31632 3 - 4 - 185 - - - 4 - 5 - 141 - - - 5 6 - 51 + 8634 @@ -11157,27 +11525,27 @@ 1 2 - 1460 + 80886 2 - 6 - 149 + 3 + 16476 - 6 - 12 - 155 + 3 + 5 + 9956 - 12 - 36 - 147 + 5 + 12 + 9956 - 36 - 227 - 40 + 12 + 676 + 6079 @@ -11193,57 +11561,22 @@ 1 2 - 4 + 38592 2 3 - 30 + 13833 3 - 4 - 18 - - - 4 - 5 - 66 - - - 5 - 6 - 2 - - - 6 - 7 - 31 - - - 7 - 11 - 17 - - - 11 - 31 - 17 - - - 31 - 65 - 17 - - - 67 - 275 - 17 + 17 + 4581 - 323 - 1952 - 7 + 19 + 1401 + 2467 @@ -11259,27 +11592,17 @@ 1 2 - 7 + 38592 2 3 - 113 + 18503 3 - 4 - 69 - - - 4 - 5 - 35 - - - 5 - 6 - 2 + 7 + 2379 @@ -11295,57 +11618,22 @@ 1 2 - 4 + 38592 2 3 - 30 + 13833 3 - 4 - 18 + 17 + 4581 - 4 - 5 - 66 - - - 5 - 6 - 2 - - - 6 - 7 - 31 - - - 7 - 11 - 17 - - - 11 - 31 - 17 - - - 31 - 65 - 17 - - - 67 - 275 - 17 - - - 323 - 1952 - 7 + 19 + 1401 + 2467 @@ -11355,23 +11643,23 @@ specs - 7889 + 397829 id - 7889 + 397829 kind - 4 + 5234 parent - 3877 + 193680 idx - 108 + 31407 @@ -11385,7 +11673,7 @@ 1 2 - 7889 + 397829 @@ -11401,7 +11689,7 @@ 1 2 - 7889 + 397829 @@ -11417,7 +11705,7 @@ 1 2 - 7889 + 397829 @@ -11431,24 +11719,19 @@ 12 - 16 - 17 - 1 - - - 1349 - 1350 - 1 + 18 + 19 + 1744 - 3056 - 3057 - 1 + 70 + 71 + 1744 - 3468 - 3469 - 1 + 140 + 141 + 1744 @@ -11462,24 +11745,19 @@ 12 - 16 - 17 - 1 - - - 479 - 480 - 1 + 18 + 19 + 1744 - 1333 - 1334 - 1 + 23 + 24 + 1744 - 2049 - 2050 - 1 + 70 + 71 + 1744 @@ -11495,22 +11773,12 @@ 1 2 - 1 + 3489 - 14 - 15 - 1 - - - 36 - 37 - 1 - - - 108 - 109 - 1 + 18 + 19 + 1744 @@ -11526,22 +11794,22 @@ 1 2 - 3206 + 157037 2 - 6 - 343 + 5 + 15703 6 - 18 - 298 + 11 + 15703 - 18 - 109 - 30 + 14 + 19 + 5234 @@ -11557,7 +11825,7 @@ 1 2 - 3877 + 193680 @@ -11573,22 +11841,22 @@ 1 2 - 3206 + 157037 2 - 6 - 343 + 5 + 15703 6 - 18 - 298 + 11 + 15703 - 18 - 109 - 30 + 14 + 19 + 5234 @@ -11604,32 +11872,47 @@ 1 2 - 53 + 6979 - 2 - 3 - 19 + 3 + 4 + 6979 - 3 - 6 - 9 + 4 + 5 + 3489 - 6 - 28 - 9 + 9 + 10 + 3489 - 30 - 156 - 9 + 12 + 13 + 3489 + + + 14 + 15 + 1744 + + + 16 + 17 + 1744 + + + 21 + 22 + 1744 - 188 - 3878 - 9 + 111 + 112 + 1744 @@ -11645,22 +11928,12 @@ 1 2 - 72 - - - 2 - 3 - 22 + 29662 3 4 - 13 - - - 4 - 5 - 1 + 1744 @@ -11676,32 +11949,47 @@ 1 2 - 53 + 6979 - 2 - 3 - 19 + 3 + 4 + 6979 - 3 - 6 - 9 + 4 + 5 + 3489 - 6 - 28 - 9 + 9 + 10 + 3489 - 30 - 156 - 9 + 12 + 13 + 3489 + + + 14 + 15 + 1744 + + + 16 + 17 + 1744 + + + 21 + 22 + 1744 - 188 - 3878 - 9 + 111 + 112 + 1744 @@ -11711,15 +11999,15 @@ scopes - 36775 + 1519778 id - 36775 + 1519778 kind - 3 + 5234 @@ -11733,7 +12021,7 @@ 1 2 - 36775 + 1519778 @@ -11749,17 +12037,17 @@ 1 2 - 1 + 1744 - 346 - 347 - 1 + 340 + 341 + 1744 - 36428 - 36429 - 1 + 530 + 531 + 1744 @@ -11769,15 +12057,15 @@ scopenesting - 36774 + 1518033 inner - 36774 + 1518033 outer - 21713 + 397829 @@ -11791,7 +12079,7 @@ 1 2 - 36774 + 1518033 @@ -11807,22 +12095,22 @@ 1 2 - 16964 + 280923 2 3 - 2474 + 71539 3 - 7 - 1759 + 5 + 34897 - 7 - 347 - 516 + 5 + 531 + 10469 @@ -11832,15 +12120,15 @@ scopenodes - 36428 + 919952 node - 36428 + 919952 scope - 36428 + 919952 @@ -11854,7 +12142,7 @@ 1 2 - 36428 + 919952 @@ -11870,7 +12158,7 @@ 1 2 - 36428 + 919952 @@ -11880,19 +12168,19 @@ objects - 84909 + 260849313 id - 84909 + 260849313 kind - 9 + 32863 name - 30576 + 153297959 @@ -11906,7 +12194,7 @@ 1 2 - 84909 + 260849313 @@ -11922,7 +12210,7 @@ 1 2 - 84909 + 260849313 @@ -11938,47 +12226,42 @@ 4 5 - 1 - - - 18 - 19 - 1 + 4107 - 20 - 21 - 1 + 22 + 23 + 4107 - 49 - 50 - 1 + 26 + 27 + 4107 - 3468 - 3469 - 1 + 33 + 34 + 4107 - 3602 - 3603 - 1 + 3147 + 3148 + 4107 - 8857 - 8858 - 1 + 17646 + 17647 + 4107 - 17793 - 17794 - 1 + 19579 + 19580 + 4107 - 51098 - 51099 - 1 + 23041 + 23042 + 4107 @@ -11994,47 +12277,42 @@ 4 5 - 1 - - - 18 - 19 - 1 + 4107 - 20 - 21 - 1 + 22 + 23 + 4107 - 38 - 39 - 1 + 23 + 24 + 4107 - 203 - 204 - 1 + 26 + 27 + 4107 - 3004 - 3005 - 1 + 2654 + 2655 + 4107 - 8418 - 8419 - 1 + 7829 + 7830 + 4107 - 10132 - 10133 - 1 + 10951 + 10952 + 4107 - 10913 - 10914 - 1 + 17127 + 17128 + 4107 @@ -12050,22 +12328,17 @@ 1 2 - 25286 + 124595415 2 3 - 2613 + 20954870 3 - 20 - 2304 - - - 20 - 2222 - 373 + 1189 + 7747674 @@ -12081,12 +12354,12 @@ 1 2 - 28809 + 148692899 2 6 - 1767 + 4605059 @@ -12096,15 +12369,15 @@ objectscopes - 54774 + 140464590 object - 54774 + 140464590 scope - 13947 + 1068078 @@ -12118,7 +12391,7 @@ 1 2 - 54774 + 140464590 @@ -12134,32 +12407,72 @@ 1 2 - 7112 + 73943 2 3 - 2972 + 57511 3 4 - 1274 + 69835 4 - 6 - 1264 + 7 + 86267 - 6 - 15 - 1055 + 7 + 13 + 82159 - 15 - 2694 - 270 + 13 + 18 + 86267 + + + 18 + 24 + 86267 + + + 24 + 35 + 86267 + + + 35 + 48 + 82159 + + + 48 + 62 + 82159 + + + 63 + 106 + 82159 + + + 108 + 186 + 82159 + + + 206 + 689 + 82159 + + + 711 + 10035 + 28755 @@ -12169,15 +12482,15 @@ objecttypes - 84907 + 258988392 object - 84907 + 258988392 tp - 13462 + 47738981 @@ -12191,7 +12504,7 @@ 1 2 - 84907 + 258988392 @@ -12207,32 +12520,32 @@ 1 2 - 7893 + 29216043 2 3 - 2114 + 7813401 3 4 - 892 + 3039914 4 7 - 1190 + 3730057 7 - 25 - 1011 + 53 + 3582169 - 25 - 4267 - 362 + 53 + 13253 + 357395 @@ -12242,15 +12555,15 @@ methodreceivers - 9873 + 70035448 method - 9873 + 70035448 receiver - 9873 + 70035448 @@ -12264,7 +12577,7 @@ 1 2 - 9873 + 70035448 @@ -12280,7 +12593,7 @@ 1 2 - 9873 + 70035448 @@ -12290,15 +12603,15 @@ fieldstructs - 10934 + 41038845 field - 10934 + 41038845 struct - 2408 + 8035233 @@ -12312,7 +12625,7 @@ 1 2 - 10934 + 41038845 @@ -12328,42 +12641,42 @@ 1 2 - 260 + 936622 2 3 - 677 + 2033456 3 4 - 468 + 1425473 4 5 - 292 + 1031106 5 6 - 194 + 640846 6 8 - 208 + 694250 8 - 13 - 199 + 12 + 681926 - 13 - 65 - 110 + 12 + 80 + 591550 @@ -12373,15 +12686,15 @@ methodhosts - 838 + 8181678 method - 699 + 5569613 host - 258 + 1579104 @@ -12395,17 +12708,27 @@ 1 2 - 625 + 4430215 2 3 - 56 + 509500 3 - 16 - 18 + 4 + 122140 + + + 4 + 5 + 439706 + + + 5 + 28 + 68049 @@ -12421,55 +12744,60 @@ 1 2 - 99 + 645600 2 3 - 56 + 272199 3 4 - 37 + 158782 4 5 - 20 + 90733 5 - 6 - 15 + 8 + 130864 - 6 + 8 11 - 21 + 123885 11 - 53 - 10 + 19 + 118650 - - - + + 19 + 293 + 38387 + + + + defs - 40703 + 1417649 ident - 40703 + 1417649 object - 40490 + 1388768 @@ -12483,7 +12811,7 @@ 1 2 - 40703 + 1417649 @@ -12499,12 +12827,12 @@ 1 2 - 40383 + 1370071 2 - 15 - 107 + 7 + 18697 @@ -12514,15 +12842,15 @@ uses - 195902 + 4531459 ident - 195902 + 4531459 object - 41616 + 802598 @@ -12536,7 +12864,7 @@ 1 2 - 195902 + 4531459 @@ -12552,37 +12880,37 @@ 1 2 - 15493 + 294651 2 3 - 9727 + 231900 3 4 - 5056 + 77848 4 5 - 2974 + 50873 5 - 7 - 3203 + 8 + 68403 - 7 - 14 - 3336 + 8 + 21 + 60890 - 14 - 6833 - 1827 + 21 + 3870 + 18031 @@ -12592,15 +12920,15 @@ types - 18132 + 64230277 id - 18132 + 64230277 kind - 37 + 68049 @@ -12614,7 +12942,7 @@ 1 2 - 18132 + 64230277 @@ -12630,27 +12958,32 @@ 1 2 - 25 + 41876 - 10 - 30 - 3 + 12 + 25 + 5234 + + + 34 + 143 + 5234 - 247 - 431 - 3 + 158 + 413 + 5234 - 559 - 1904 - 3 + 938 + 4626 + 5234 - 2409 - 8011 - 3 + 4676 + 16593 + 5234 @@ -12660,15 +12993,15 @@ type_of - 397965 + 8829217 expr - 397965 + 8829217 tp - 8687 + 26916 @@ -12682,7 +13015,7 @@ 1 2 - 397965 + 8829217 @@ -12698,57 +13031,52 @@ 1 2 - 2019 + 4744 2 3 - 967 + 5567 3 4 - 711 + 2154 4 5 - 388 + 2444 5 7 - 780 + 2420 7 10 - 772 + 2105 10 15 - 734 + 2033 15 - 23 - 700 - - - 23 - 43 - 652 + 26 + 2105 - 43 - 143 - 652 + 26 + 90 + 2081 - 143 - 46949 - 312 + 90 + 331257 + 1258 @@ -12758,15 +13086,15 @@ typename - 3567 + 13128374 tp - 3567 + 13128374 name - 2983 + 10010298 @@ -12780,7 +13108,7 @@ 1 2 - 3567 + 13128374 @@ -12796,17 +13124,17 @@ 1 2 - 2660 + 8108394 2 - 4 - 267 + 3 + 1210937 - 4 - 17 - 56 + 3 + 26 + 690967 @@ -12816,15 +13144,15 @@ key_type - 430 + 866786 map - 430 + 866786 tp - 149 + 283451 @@ -12838,7 +13166,7 @@ 1 2 - 430 + 866786 @@ -12854,27 +13182,27 @@ 1 2 - 106 + 201291 2 3 - 17 + 28755 3 6 - 12 + 24647 - 6 + 9 13 - 12 + 24647 - 20 - 136 - 2 + 65 + 66 + 4107 @@ -12884,15 +13212,15 @@ element_type - 1412 + 4132640 container - 1412 + 4132640 tp - 916 + 2382635 @@ -12906,7 +13234,7 @@ 1 2 - 1412 + 4132640 @@ -12922,17 +13250,17 @@ 1 2 - 773 + 2008808 2 3 - 94 + 250587 3 - 68 - 49 + 78 + 123239 @@ -12942,15 +13270,15 @@ base_type - 1903 + 8158995 ptr - 1903 + 8158995 tp - 1903 + 8158995 @@ -12964,7 +13292,7 @@ 1 2 - 1903 + 8158995 @@ -12980,7 +13308,7 @@ 1 2 - 1903 + 8158995 @@ -12990,15 +13318,15 @@ underlying_type - 3567 + 12852686 named - 3567 + 12852686 tp - 2755 + 9731120 @@ -13012,7 +13340,7 @@ 1 2 - 3567 + 12852686 @@ -13028,12 +13356,75 @@ 1 2 - 2582 + 8959889 + + + 2 + 9 + 732843 + + + 9 + 252 + 38387 + + + + + + + + + alias_rhs + 660784 + + + alias + 660784 + + + tp + 320067 + + + + + alias + tp + + + 12 + + + 1 + 2 + 660784 + + + + + + + tp + alias + + + 12 + + + 1 + 2 + 284886 2 - 154 - 173 + 4 + 28679 + + + 4 + 348 + 6500 @@ -13043,23 +13434,23 @@ component_types - 36474 + 130391792 parent - 11221 + 37395056 index - 74 + 361503 name - 5540 + 21435505 tp - 4295 + 15006496 @@ -13073,37 +13464,37 @@ 1 2 - 1198 + 4761163 2 3 - 3864 + 10956016 3 4 - 2953 + 9378547 4 5 - 1446 + 5356822 5 6 - 780 + 3076886 6 - 13 - 860 + 11 + 2982402 - 13 - 65 - 120 + 11 + 80 + 883218 @@ -13119,22 +13510,27 @@ 1 2 - 8936 + 29495386 2 3 - 733 + 2230639 3 - 6 - 1008 + 5 + 2768787 - 6 - 64 - 544 + 5 + 39 + 2805758 + + + 39 + 80 + 94483 @@ -13150,32 +13546,32 @@ 1 2 - 2194 + 6646732 2 3 - 4537 + 13724803 3 4 - 2475 + 9657890 4 5 - 1110 + 4284636 5 12 - 848 + 2818082 12 - 52 - 57 + 34 + 262911 @@ -13191,62 +13587,62 @@ 1 2 - 15 + 65727 2 - 4 - 6 + 3 + 32863 - 4 - 7 - 4 + 3 + 5 + 28755 - 8 - 13 - 6 + 5 + 11 + 28755 - 13 - 18 - 6 + 12 + 23 + 28755 - 18 - 28 - 6 + 23 + 31 + 28755 - 29 - 49 - 6 + 34 + 50 + 28755 - 52 - 82 - 6 + 51 + 75 + 28755 - 89 - 193 - 6 + 79 + 149 + 28755 - 232 - 824 - 6 + 169 + 511 + 28755 - 1505 - 6458 - 6 + 778 + 5506 + 28755 - 10274 - 10275 - 1 + 8121 + 8122 + 4107 @@ -13262,52 +13658,52 @@ 1 2 - 22 + 94483 2 - 6 - 6 + 3 + 32863 - 6 - 9 - 6 + 4 + 6 + 28755 - 9 - 16 - 4 + 6 + 14 + 32863 - 16 - 24 - 6 + 17 + 22 + 28755 - 24 - 37 - 6 + 22 + 34 + 28755 - 39 - 61 - 6 + 35 + 55 + 28755 - 69 - 116 - 6 + 58 + 102 + 28755 - 153 - 379 - 6 + 110 + 277 + 28755 - 475 - 1260 - 6 + 331 + 1018 + 28755 @@ -13323,62 +13719,62 @@ 1 2 - 15 + 65727 2 - 4 - 6 + 3 + 32863 - 4 - 7 - 6 + 3 + 5 + 32863 - 7 - 11 - 5 + 5 + 7 + 24647 - 11 - 14 - 5 + 9 + 15 + 28755 15 19 - 6 + 28755 20 - 27 - 5 + 25 + 28755 - 29 - 44 - 6 + 25 + 37 + 28755 - 45 - 72 - 6 + 38 + 59 + 28755 - 86 - 161 - 6 + 67 + 149 + 28755 - 224 - 1436 - 6 + 179 + 1225 + 28755 - 1878 - 2153 - 2 + 1559 + 1560 + 4107 @@ -13394,22 +13790,22 @@ 1 2 - 3941 + 13843935 2 3 - 851 + 4633815 3 - 6 - 484 + 5 + 1733572 - 6 - 8917 - 264 + 5 + 7182 + 1224181 @@ -13425,22 +13821,22 @@ 1 2 - 4284 + 16793473 2 3 - 737 + 2998834 3 - 6 - 440 + 12 + 1618549 - 6 - 28 - 79 + 12 + 31 + 24647 @@ -13456,22 +13852,17 @@ 1 2 - 4599 + 18029979 2 3 - 518 + 2099184 3 - 21 - 416 - - - 21 - 3014 - 7 + 2295 + 1306341 @@ -13487,32 +13878,32 @@ 1 2 - 2055 + 7665514 2 3 - 812 + 2748247 3 4 - 408 + 1207749 4 6 - 394 + 1277585 6 - 11 - 342 + 12 + 1199533 - 11 - 2187 - 284 + 12 + 2060 + 907866 @@ -13528,32 +13919,27 @@ 1 2 - 2111 + 8893803 2 3 - 859 + 2863270 3 4 - 580 + 1409041 4 - 5 - 352 - - - 5 - 10 - 328 + 6 + 1146129 - 10 - 51 - 65 + 6 + 68 + 694250 @@ -13569,22 +13955,22 @@ 1 2 - 2897 + 11165523 2 3 - 865 + 2193668 3 - 5 - 343 + 6 + 1187209 - 5 - 738 - 190 + 6 + 719 + 460095 @@ -13593,38 +13979,26 @@ - array_length - 293 + component_tags + 41038845 - tp - 293 + parent + 8035233 - len - 103 + index + 324531 + + + tag + 747654 - tp - len - - - 12 - - - 1 - 2 - 293 - - - - - - - len - tp + parent + index 12 @@ -13632,56 +14006,50 @@ 1 2 - 62 + 936622 2 3 - 15 + 2033456 3 4 - 7 + 1425473 4 - 7 - 8 + 5 + 1031106 - 7 - 15 - 7 + 5 + 6 + 640846 - 15 - 26 - 4 + 6 + 8 + 694250 + + + 8 + 12 + 681926 + + + 12 + 80 + 591550 - - - - type_objects - 3567 - - - tp - 3567 - - - object - 3567 - - - - tp - object + parent + tag 12 @@ -13689,15 +14057,20 @@ 1 2 - 3567 + 7891453 + + + 2 + 36 + 143779 - object - tp + index + parent 12 @@ -13705,39 +14078,70 @@ 1 2 - 3567 + 57511 + + + 2 + 3 + 32863 + + + 4 + 5 + 24647 + + + 6 + 11 + 24647 + + + 12 + 22 + 24647 + + + 22 + 25 + 24647 + + + 26 + 36 + 24647 + + + 39 + 55 + 24647 + + + 58 + 93 + 24647 + + + 105 + 220 + 24647 + + + 252 + 887 + 24647 + + + 1233 + 1957 + 12323 - - - - packages - 346 - - - id - 346 - - - name - 281 - - - path - 346 - - - scope - 346 - - - - id - name + index + tag 12 @@ -13745,15 +14149,35 @@ 1 2 - 346 + 180751 + + + 2 + 3 + 73943 + + + 3 + 7 + 24647 + + + 9 + 15 + 24647 + + + 15 + 29 + 20539 - id - path + tag + parent 12 @@ -13761,15 +14185,25 @@ 1 2 - 346 + 673710 + + + 2 + 4 + 61619 + + + 4 + 1931 + 12323 - id - scope + tag + index 12 @@ -13777,15 +14211,40 @@ 1 2 - 346 + 690142 + + + 2 + 80 + 57511 + + + + interface_private_method_ids + 439555 + + + interface + 156103 + + + index + 94483 + + + id + 386151 + + + - name - id + interface + index 12 @@ -13793,25 +14252,45 @@ 1 2 - 255 + 53403 2 3 - 23 + 53403 3 - 40 - 3 + 4 + 12323 + + + 4 + 5 + 8215 + + + 5 + 6 + 12323 + + + 7 + 10 + 12323 + + + 12 + 13 + 4107 - name - path + interface + id 12 @@ -13819,25 +14298,45 @@ 1 2 - 255 + 53403 2 3 - 23 + 53403 3 - 40 - 3 + 4 + 12323 + + + 4 + 5 + 8215 + + + 5 + 6 + 12323 + + + 7 + 10 + 12323 + + + 12 + 13 + 4107 - name - scope + index + interface 12 @@ -13845,24 +14344,39 @@ 1 2 - 255 + 24647 2 3 - 23 + 28755 3 - 40 - 3 + 4 + 16431 + + + 5 + 10 + 8215 + + + 10 + 14 + 8215 + + + 18 + 21 + 8215 - path + index id @@ -13871,31 +14385,40 @@ 1 2 - 346 + 32863 - - - - - - path - name - - - 12 - - 1 - 2 - 346 + 2 + 3 + 28755 + + + 3 + 4 + 8215 + + + 5 + 10 + 8215 + + + 10 + 14 + 8215 + + + 18 + 21 + 8215 - path - scope + id + interface 12 @@ -13903,15 +14426,25 @@ 1 2 - 346 + 345071 + + + 2 + 3 + 28755 + + + 3 + 4 + 12323 - scope - id + id + index 12 @@ -13919,15 +14452,36 @@ 1 2 - 346 + 361503 + + + 2 + 4 + 24647 - - scope - name + + + + array_length + 1528173 + + + tp + 1528173 + + + len + 488851 + + + + + tp + len 12 @@ -13935,15 +14489,15 @@ 1 2 - 346 + 1528173 - scope - path + len + tp 12 @@ -13951,7 +14505,37 @@ 1 2 - 346 + 258803 + + + 2 + 3 + 90375 + + + 3 + 4 + 24647 + + + 4 + 5 + 24647 + + + 5 + 7 + 41079 + + + 8 + 15 + 36971 + + + 16 + 28 + 12323 @@ -13960,30 +14544,78 @@ - modexprs - 9 + type_objects + 13128374 + + + tp + 13128374 + + + object + 13128374 + + + + + tp + object + + + 12 + + + 1 + 2 + 13128374 + + + + + + + object + tp + + + 12 + + + 1 + 2 + 13128374 + + + + + + + + + packages + 924779 id - 9 + 924779 - kind - 4 + name + 570571 - parent - 2 + path + 924779 - idx - 6 + scope + 924779 id - kind + name 12 @@ -13991,7 +14623,7 @@ 1 2 - 9 + 924779 @@ -13999,7 +14631,7 @@ id - parent + path 12 @@ -14007,7 +14639,7 @@ 1 2 - 9 + 924779 @@ -14015,7 +14647,7 @@ id - idx + scope 12 @@ -14023,14 +14655,14 @@ 1 2 - 9 + 924779 - kind + name id @@ -14039,20 +14671,25 @@ 1 2 - 3 + 479838 - 6 - 7 - 1 + 2 + 3 + 57580 + + + 3 + 53 + 33152 - kind - parent + name + path 12 @@ -14060,20 +14697,25 @@ 1 2 - 3 + 479838 2 3 - 1 + 57580 + + + 3 + 53 + 33152 - kind - idx + name + scope 12 @@ -14081,82 +14723,72 @@ 1 2 - 3 + 479838 - 5 - 6 - 1 + 2 + 3 + 57580 + + + 3 + 53 + 33152 - parent + path id 12 - 3 - 4 - 1 - - - 6 - 7 - 1 + 1 + 2 + 924779 - parent - kind + path + name 12 - 2 - 3 - 1 - - - 3 - 4 - 1 + 1 + 2 + 924779 - parent - idx + path + scope 12 - 3 - 4 - 1 - - - 6 - 7 - 1 + 1 + 2 + 924779 - idx + scope id @@ -14165,20 +14797,15 @@ 1 2 - 3 - - - 2 - 3 - 3 + 924779 - idx - kind + scope + name 12 @@ -14186,20 +14813,15 @@ 1 2 - 4 - - - 2 - 3 - 2 + 924779 - idx - parent + scope + path 12 @@ -14207,12 +14829,7 @@ 1 2 - 3 - - - 2 - 3 - 3 + 924779 @@ -14221,26 +14838,30 @@ - modtokens - 13 + modexprs + 259985 - token - 13 + id + 259985 + + + kind + 6979 parent - 7 + 54090 idx - 2 + 24428 - token - parent + id + kind 12 @@ -14248,15 +14869,15 @@ 1 2 - 13 + 259985 - token - idx + id + parent 12 @@ -14264,15 +14885,15 @@ 1 2 - 13 + 259985 - parent - token + id + idx 12 @@ -14280,143 +14901,134 @@ 1 2 - 1 - - - 2 - 3 - 6 + 259985 - parent - idx + kind + id 12 - 1 - 2 - 1 + 13 + 14 + 5234 - 2 - 3 - 6 + 110 + 111 + 1744 - idx - token + kind + parent 12 - 6 - 7 - 1 + 12 + 13 + 1744 - 7 - 8 - 1 + 13 + 14 + 3489 + + + 31 + 32 + 1744 - idx - parent + kind + idx 12 - 6 - 7 - 1 + 1 + 2 + 1744 - 7 - 8 - 1 + 2 + 3 + 1744 + + + 5 + 6 + 1744 + + + 13 + 14 + 1744 - - - - errors - 0 - - - id - 0 - - - kind - 0 - - - msg - 0 - - - rawpos - 0 - - - file - 0 - - - line - 0 - - - col - 0 - - - package - 0 - - - idx - 0 - - - - id - kind + parent + id 12 - 1 - 2 - 1 + 2 + 3 + 8724 + + + 3 + 4 + 19193 + + + 4 + 5 + 6979 + + + 5 + 6 + 10469 + + + 11 + 12 + 5234 + + + 13 + 15 + 3489 - id - msg + parent + kind 12 @@ -14424,31 +15036,66 @@ 1 2 - 1 + 10469 + + + 2 + 3 + 20938 + + + 3 + 4 + 22683 - id - rawpos + parent + idx 12 - 1 - 2 - 1 + 2 + 3 + 8724 + + + 3 + 4 + 19193 + + + 4 + 5 + 6979 + + + 5 + 6 + 10469 + + + 11 + 12 + 5234 + + + 13 + 15 + 3489 - id - file + idx + id 12 @@ -14456,15 +15103,45 @@ 1 2 - 1 + 1744 + + + 2 + 3 + 3489 + + + 5 + 6 + 10469 + + + 11 + 12 + 1744 + + + 15 + 16 + 1744 + + + 26 + 27 + 1744 + + + 31 + 32 + 3489 - id - line + idx + kind 12 @@ -14472,15 +15149,25 @@ 1 2 - 1 + 13958 + + + 2 + 3 + 8724 + + + 3 + 4 + 1744 - id - col + idx + parent 12 @@ -14488,15 +15175,65 @@ 1 2 - 1 + 1744 + + + 2 + 3 + 3489 + + + 5 + 6 + 10469 + + + 11 + 12 + 1744 + + + 15 + 16 + 1744 + + + 26 + 27 + 1744 + + + 31 + 32 + 3489 + + + + modtokens + 410043 + + + token + 164017 + + + parent + 214618 + + + idx + 5234 + + + - id - package + token + parent 12 @@ -14504,14 +15241,34 @@ 1 2 - 1 + 76774 + + + 2 + 3 + 54090 + + + 3 + 5 + 13958 + + + 5 + 9 + 13958 + + + 15 + 19 + 5234 - id + token idx @@ -14520,664 +15277,3123 @@ 1 2 - 1 + 162272 + + + 2 + 3 + 1744 - kind - id - - - 12 - - - - - - kind - msg + parent + token 12 - - - - - - kind - rawpos - - - 12 - - - - - - kind - file - - - 12 - - - - - - kind - line - - - 12 - + + + 1 + 2 + 22683 + + + 2 + 3 + 188445 + + + 3 + 4 + 3489 + + - kind - col + parent + idx 12 - + + + 1 + 2 + 22683 + + + 2 + 3 + 188445 + + + 3 + 4 + 3489 + + - kind - package + idx + token 12 - + + + 2 + 3 + 1744 + + + 40 + 41 + 1744 + + + 53 + 54 + 1744 + + - kind - idx + idx + parent 12 - + + + 2 + 3 + 1744 + + + 110 + 111 + 1744 + + + 123 + 124 + 1744 + + + + + + errors + 232496 + + + id + 232496 + + + kind + 642 + + + msg + 55713 + + + rawpos + 155997 + + + file + 56356 + + + line + 21856 + + + col + 10071 + + + package + 16928 + + + idx + 89355 + + + - msg - id + id + kind 12 - + + + 1 + 2 + 232496 + + - msg - kind + id + msg 12 - + + + 1 + 2 + 232496 + + - msg + id rawpos 12 - + + + 1 + 2 + 232496 + + - msg + id file 12 - + + + 1 + 2 + 232496 + + - msg + id line 12 - + + + 1 + 2 + 232496 + + - msg + id col 12 - + + + 1 + 2 + 232496 + + - msg + id package 12 - + + + 1 + 2 + 232496 + + - msg + id idx 12 - + + + 1 + 2 + 232496 + + - rawpos + kind id 12 - + + + 16 + 17 + 214 + + + 45 + 46 + 214 + + + 1024 + 1025 + 214 + + - rawpos - kind + kind + msg 12 - + + + 10 + 11 + 214 + + + 41 + 42 + 214 + + + 210 + 211 + 214 + + - rawpos - msg + kind + rawpos 12 - - - - + + + 9 + 10 + 214 + + + 39 + 40 + 214 + + + 680 + 681 + 214 + + + + + - rawpos + kind file 12 - + + + 4 + 5 + 214 + + + 26 + 27 + 214 + + + 262 + 263 + 214 + + - rawpos + kind line 12 - + + + 6 + 7 + 214 + + + 16 + 17 + 214 + + + 102 + 103 + 214 + + - rawpos + kind col 12 - + + + 6 + 7 + 214 + + + 8 + 9 + 214 + + + 42 + 43 + 214 + + - rawpos + kind package 12 - + + + 3 + 4 + 214 + + + 36 + 37 + 214 + + + 45 + 46 + 214 + + - rawpos + kind idx 12 - + + + 1 + 2 + 214 + + + 13 + 14 + 214 + + + 417 + 418 + 214 + + - file + msg id 12 - + + + 1 + 2 + 30856 + + + 2 + 3 + 8357 + + + 3 + 4 + 6428 + + + 4 + 7 + 4928 + + + 7 + 17 + 4285 + + + 20 + 214 + 857 + + - file + msg kind 12 - + + + 1 + 2 + 55499 + + + 2 + 3 + 214 + + - file - msg + msg + rawpos 12 - + + + 1 + 2 + 38142 + + + 2 + 3 + 6428 + + + 3 + 4 + 4071 + + + 4 + 8 + 4499 + + + 8 + 214 + 2571 + + - file - rawpos + msg + file 12 - + + + 1 + 2 + 39642 + + + 2 + 3 + 6857 + + + 3 + 5 + 4499 + + + 5 + 17 + 4285 + + + 20 + 214 + 428 + + - file + msg line 12 - + + + 1 + 2 + 42213 + + + 2 + 3 + 5999 + + + 3 + 5 + 4285 + + + 5 + 52 + 3214 + + - file + msg col 12 - + + + 1 + 2 + 51856 + + + 2 + 5 + 3857 + + - file + msg package 12 - + + + 1 + 2 + 49499 + + + 2 + 5 + 4714 + + + 5 + 10 + 1499 + + - file + msg idx 12 - - - - - - line - id - - - 12 - - - - - - line - kind - - - 12 - + + + 1 + 2 + 33213 + + + 2 + 3 + 7928 + + + 3 + 4 + 5999 + + + 4 + 8 + 4285 + + + 8 + 163 + 4285 + + - line - msg + rawpos + id 12 - + + + 1 + 2 + 146355 + + + 2 + 93 + 9642 + + - line - rawpos + rawpos + kind 12 - + + + 1 + 2 + 155997 + + - line - file + rawpos + msg 12 - + + + 1 + 2 + 155354 + + + 3 + 8 + 642 + + - line - col + rawpos + file 12 - + + + 1 + 2 + 155997 + + - line - package + rawpos + line 12 - + + + 1 + 2 + 155997 + + - line - idx + rawpos + col 12 - + + + 1 + 2 + 155997 + + - col - id + rawpos + package 12 - + + + 1 + 2 + 155783 + + + 7 + 8 + 214 + + - col - kind + rawpos + idx 12 - + + + 1 + 2 + 146569 + + + 2 + 93 + 9428 + + - col - msg + file + id 12 - + + + 1 + 2 + 26999 + + + 2 + 3 + 8142 + + + 3 + 4 + 5785 + + + 4 + 6 + 4928 + + + 6 + 11 + 4928 + + + 11 + 19 + 4285 + + + 19 + 93 + 1285 + + - col - rawpos + file + kind 12 - + + + 1 + 2 + 50570 + + + 2 + 3 + 5357 + + + 3 + 4 + 428 + + - col - file + file + msg 12 - + + + 1 + 2 + 28071 + + + 2 + 3 + 9856 + + + 3 + 4 + 7071 + + + 4 + 6 + 4499 + + + 6 + 11 + 5142 + + + 11 + 17 + 1714 + + - col - line + file + rawpos 12 - + + + 1 + 2 + 28071 + + + 2 + 3 + 10071 + + + 3 + 4 + 6642 + + + 4 + 6 + 4071 + + + 6 + 11 + 4928 + + + 11 + 18 + 2571 + + - col - package + file + line 12 - - - - - - col - idx - + + + 1 + 2 + 29999 + + + 2 + 3 + 9214 + + + 3 + 4 + 5999 + + + 4 + 6 + 5142 + + + 6 + 12 + 5142 + + + 12 + 16 + 857 + + + + + + + file + col + 12 - + + + 1 + 2 + 43499 + + + 2 + 3 + 5785 + + + 3 + 5 + 5142 + + + 5 + 9 + 1928 + + - package + file + package + + + 12 + + + 1 + 2 + 50999 + + + 2 + 4 + 4285 + + + 4 + 9 + 1071 + + + + + + + file + idx + + + 12 + + + 1 + 2 + 28285 + + + 2 + 3 + 7499 + + + 3 + 4 + 5785 + + + 4 + 5 + 2571 + + + 5 + 8 + 4499 + + + 8 + 13 + 4499 + + + 13 + 93 + 3214 + + + + + + + line id 12 - + + + 1 + 2 + 6642 + + + 2 + 3 + 3642 + + + 3 + 4 + 1499 + + + 4 + 5 + 1071 + + + 5 + 6 + 1071 + + + 6 + 7 + 2142 + + + 7 + 13 + 1714 + + + 14 + 31 + 1714 + + + 31 + 50 + 1714 + + + 53 + 208 + 642 + + - package + line kind 12 - + + + 1 + 2 + 17999 + + + 2 + 3 + 2999 + + + 3 + 4 + 857 + + - package + line msg 12 - + + + 1 + 2 + 7714 + + + 2 + 3 + 3214 + + + 3 + 4 + 2571 + + + 4 + 5 + 1928 + + + 5 + 6 + 1499 + + + 6 + 10 + 1714 + + + 10 + 16 + 1714 + + + 16 + 23 + 1499 + + - package + line rawpos 12 - + + + 1 + 2 + 6857 + + + 2 + 3 + 3642 + + + 3 + 4 + 2142 + + + 4 + 5 + 1285 + + + 5 + 6 + 1499 + + + 6 + 7 + 1714 + + + 7 + 19 + 1928 + + + 20 + 32 + 1714 + + + 32 + 87 + 1071 + + - package + line file 12 - + + + 1 + 2 + 7071 + + + 2 + 3 + 4071 + + + 3 + 4 + 1928 + + + 4 + 5 + 1714 + + + 5 + 6 + 857 + + + 6 + 7 + 1928 + + + 7 + 18 + 1499 + + + 18 + 27 + 1714 + + + 29 + 86 + 1071 + + + + + + + line + col + + + 12 + + + 1 + 2 + 10499 + + + 2 + 3 + 3857 + + + 3 + 4 + 2571 + + + 4 + 5 + 2785 + + + 5 + 9 + 1928 + + + 10 + 11 + 214 + + + + + + + line + package + + + 12 + + + 1 + 2 + 8142 + + + 2 + 3 + 5571 + + + 3 + 4 + 2571 + + + 4 + 6 + 1714 + + + 7 + 10 + 1928 + + + 10 + 19 + 1714 + + + 21 + 22 + 214 + + + + + + + line + idx + + + 12 + + + 1 + 2 + 7071 + + + 2 + 3 + 3642 + + + 3 + 4 + 1714 + + + 4 + 6 + 1928 + + + 6 + 7 + 2142 + + + 7 + 14 + 1714 + + + 15 + 30 + 1714 + + + 30 + 77 + 1714 + + + 187 + 188 + 214 + + + + + + + col + id + + + 12 + + + 1 + 2 + 3428 + + + 2 + 3 + 2142 + + + 3 + 4 + 1071 + + + 4 + 7 + 642 + + + 7 + 10 + 857 + + + 10 + 14 + 642 + + + 17 + 24 + 857 + + + 107 + 768 + 428 + + + + + + + col + kind + + + 12 + + + 1 + 2 + 8142 + + + 2 + 3 + 1928 + + + + + + + col + msg + + + 12 + + + 1 + 2 + 4499 + + + 2 + 3 + 2357 + + + 3 + 6 + 857 + + + 6 + 9 + 857 + + + 9 + 12 + 642 + + + 13 + 84 + 857 + + + + + + + col + rawpos + + + 12 + + + 1 + 2 + 3428 + + + 2 + 3 + 2571 + + + 3 + 4 + 1071 + + + 4 + 8 + 857 + + + 8 + 14 + 857 + + + 17 + 22 + 857 + + + 100 + 436 + 428 + + + + + + + col + file + + + 12 + + + 1 + 2 + 4714 + + + 2 + 3 + 2357 + + + 3 + 7 + 857 + + + 7 + 8 + 428 + + + 9 + 11 + 857 + + + 15 + 223 + 857 + + + + + + + col + line + + + 12 + + + 1 + 2 + 4285 + + + 2 + 3 + 2357 + + + 3 + 4 + 857 + + + 4 + 7 + 857 + + + 7 + 12 + 642 + + + 13 + 19 + 857 + + + 80 + 81 + 214 + + + + + + + col + package + + + 12 + + + 1 + 2 + 5785 + + + 2 + 3 + 2142 + + + 3 + 5 + 857 + + + 8 + 13 + 857 + + + 14 + 45 + 428 + + + + + + + col + idx + + + 12 + + + 1 + 2 + 3642 + + + 2 + 3 + 2142 + + + 3 + 4 + 1071 + + + 4 + 7 + 642 + + + 7 + 9 + 857 + + + 9 + 14 + 857 + + + 17 + 358 + 857 + + + + + + + package + id + + + 12 + + + 1 + 2 + 11571 + + + 2 + 3 + 1285 + + + 3 + 5 + 1285 + + + 5 + 10 + 1285 + + + 15 + 204 + 1285 + + + 417 + 418 + 214 + + + + + + + package + kind + + + 12 + + + 1 + 2 + 16285 + + + 2 + 4 + 642 + + + + + + + package + msg + + + 12 + + + 1 + 2 + 11571 + + + 2 + 3 + 1714 + + + 3 + 4 + 1285 + + + 4 + 15 + 1499 + + + 25 + 71 + 857 + + + + + + + package + rawpos + + + 12 + + + 1 + 2 + 11571 + + + 2 + 3 + 1285 + + + 3 + 4 + 1285 + + + 5 + 10 + 1285 + + + 15 + 128 + 1285 + + + 258 + 259 + 214 + + + + + + + package + file + + + 12 + + + 1 + 2 + 14356 + + + 2 + 4 + 1285 + + + 4 + 95 + 1285 + + + + + + + package + line + + + 12 + + + 1 + 2 + 11785 + + + 2 + 3 + 1285 + + + 3 + 5 + 1285 + + + 5 + 15 + 1285 + + + 15 + 68 + 1285 + + + + + + + package + col + + + 12 + + + 1 + 2 + 14142 + + + 2 + 5 + 1285 + + + 5 + 23 + 1285 + + + 23 + 24 + 214 + + + + + + + package + idx + + + 12 + + + 1 + 2 + 11571 + + + 2 + 3 + 1285 + + + 3 + 5 + 1285 + + + 5 + 10 + 1285 + + + 15 + 204 + 1285 + + + 417 + 418 + 214 + + + + + + + idx + id + + + 12 + + + 1 + 2 + 45856 + + + 2 + 3 + 9642 + + + 3 + 4 + 8357 + + + 4 + 5 + 18428 + + + 5 + 26 + 6857 + + + 79 + 80 + 214 + + + + + + + idx + kind + + + 12 + + + 1 + 2 + 86570 + + + 2 + 4 + 2785 + + + + + + + idx + msg + + + 12 + + + 1 + 2 + 45856 + + + 2 + 3 + 11999 + + + 3 + 4 + 14356 + + + 4 + 5 + 14785 + + + 5 + 60 + 2357 + + + + + + + idx + rawpos + + + 12 + + + 1 + 2 + 45856 + + + 2 + 3 + 9642 + + + 3 + 4 + 8357 + + + 4 + 5 + 18428 + + + 5 + 26 + 6857 + + + 73 + 74 + 214 + + + + + + + idx + file + + + 12 + + + 1 + 2 + 45856 + + + 2 + 3 + 9642 + + + 3 + 4 + 8357 + + + 4 + 5 + 18428 + + + 5 + 26 + 6857 + + + 44 + 45 + 214 + + + + + + + idx + line + + + 12 + + + 1 + 2 + 45856 + + + 2 + 3 + 10285 + + + 3 + 4 + 10071 + + + 4 + 5 + 18214 + + + 5 + 19 + 4928 + + + + + + + idx + col + + + 12 + + + 1 + 2 + 66856 + + + 2 + 3 + 17999 + + + 3 + 9 + 4499 + + + + + + + idx + package + + + 12 + + + 1 + 2 + 45856 + + + 2 + 3 + 9642 + + + 3 + 4 + 8357 + + + 4 + 5 + 18428 + + + 5 + 26 + 6857 + + + 79 + 80 + 214 + + + + + + + + + has_ellipsis + 45900 + + + id + 45900 + + + + + + variadic + 2105580 + + + id + 2105580 + + + + + + typeparam + 331358 + + + tp + 331358 + + + name + 19381 + + + bound + 42513 + + + parent + 249456 + + + idx + 3126 + + + + + tp + name + + + 12 + + + 1 + 2 + 331358 + + + + + + + tp + bound + + + 12 + + + 1 + 2 + 331358 + + + + + + + tp + parent + + + 12 + + + 1 + 2 + 331358 + + + + + + + tp + idx + + + 12 + + + 1 + 2 + 331358 + + + + + + + name + tp + + + 12 + + + 1 + 2 + 6877 + + + 2 + 3 + 2500 + + + 3 + 4 + 2500 + + + 4 + 6 + 1250 + + + 6 + 9 + 1250 + + + 10 + 12 + 1250 + + + 27 + 34 + 1250 + + + 69 + 74 + 1250 + + + 109 + 145 + 1250 + + + + + + + name + bound + + + 12 + + + 1 + 2 + 12504 + + + 2 + 3 + 1875 + + + 3 + 4 + 2500 + + + 4 + 12 + 1250 + + + 12 + 32 + 1250 + + + + + + + name + parent + + + 12 + + + 1 + 2 + 6877 + + + 2 + 3 + 2500 + + + 3 + 4 + 2500 + + + 4 + 6 + 1250 + + + 6 + 9 + 1250 + + + 10 + 12 + 1250 + + + 27 + 34 + 1250 + + + 69 + 74 + 1250 + + + 109 + 145 + 1250 + + + + + + + name + idx + + + 12 + + + 1 + 2 + 14379 + + + 2 + 3 + 3126 + + + 3 + 4 + 1250 + + + 4 + 5 + 625 + + + + + + + bound + tp + + + 12 + + + 1 + 2 + 32510 + + + 2 + 4 + 3126 + + + 4 + 7 + 3751 + + + 15 + 271 + 3126 + + - package - line + bound + name 12 - + + + 1 + 2 + 36887 + + + 2 + 3 + 3751 + + + 4 + 18 + 1875 + + - package - col + bound + parent 12 - + + + 1 + 2 + 33761 + + + 2 + 4 + 1875 + + + 4 + 7 + 3751 + + + 15 + 260 + 3126 + + - package + bound idx 12 - + + + 1 + 2 + 38762 + + + 2 + 6 + 3751 + + - idx - id + parent + tp 12 - + + + 1 + 2 + 183185 + + + 2 + 3 + 55018 + + + 3 + 6 + 11253 + + - idx - kind + parent + name 12 - + + + 1 + 2 + 183185 + + + 2 + 3 + 55018 + + + 3 + 6 + 11253 + + - idx - msg + parent + bound 12 - + + + 1 + 2 + 187561 + + + 2 + 3 + 51892 + + + 3 + 5 + 10003 + + - idx - rawpos + parent + idx 12 - + + + 1 + 2 + 183185 + + + 2 + 3 + 55018 + + + 3 + 6 + 11253 + + idx - file + tp 12 - + + + 1 + 2 + 625 + + + 6 + 7 + 625 + + + 18 + 19 + 625 + + + 110 + 111 + 625 + + + 395 + 396 + 625 + + idx - line + name 12 - + + + 1 + 2 + 625 + + + 4 + 5 + 625 + + + 6 + 7 + 625 + + + 13 + 14 + 625 + + + 19 + 20 + 625 + + idx - col + bound 12 - + + + 1 + 2 + 625 + + + 3 + 4 + 625 + + + 9 + 10 + 625 + + + 11 + 12 + 625 + + + 57 + 58 + 625 + + idx - package + parent 12 - + + + 1 + 2 + 625 + + + 6 + 7 + 625 + + + 18 + 19 + 625 + + + 110 + 111 + 625 + + + 395 + 396 + 625 + + - - has_ellipsis - 268 - - - id - 268 - - - - From fd615fb7a3472dcba905b8ce919070de668fa1a3 Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Mon, 30 Sep 2024 17:25:20 +0100 Subject: [PATCH 08/23] Prevent bad magic --- go/ql/lib/semmle/go/Types.qll | 1 + 1 file changed, 1 insertion(+) diff --git a/go/ql/lib/semmle/go/Types.qll b/go/ql/lib/semmle/go/Types.qll index 51e9a9539202..8a9bcf1f91c1 100644 --- a/go/ql/lib/semmle/go/Types.qll +++ b/go/ql/lib/semmle/go/Types.qll @@ -69,6 +69,7 @@ class Type extends @type { * is contained in the method set of this type and any type restrictions are * satisfied. */ + pragma[nomagic] predicate implements(InterfaceType i) { if i = any(ComparableType comparable).getUnderlyingType() then this.implementsComparable() From 1511927a2b56ea85c6915e324df3d7916f60bd5a Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Mon, 30 Sep 2024 17:43:06 +0100 Subject: [PATCH 09/23] Remove unnecessary table population on upgrade --- .../component_tags.ql | 7 ------- .../upgrade.properties | 1 - 2 files changed, 8 deletions(-) delete mode 100644 go/ql/lib/upgrades/a58b81b1b4c4cccc8ca11731c1db86622f33af57/component_tags.ql diff --git a/go/ql/lib/upgrades/a58b81b1b4c4cccc8ca11731c1db86622f33af57/component_tags.ql b/go/ql/lib/upgrades/a58b81b1b4c4cccc8ca11731c1db86622f33af57/component_tags.ql deleted file mode 100644 index 7efd29b4ea53..000000000000 --- a/go/ql/lib/upgrades/a58b81b1b4c4cccc8ca11731c1db86622f33af57/component_tags.ql +++ /dev/null @@ -1,7 +0,0 @@ -class StructType extends @structtype { - string toString() { result = "struct type" } -} - -from StructType st, int index -where component_types(st, index, _, _) -select st, index, "" diff --git a/go/ql/lib/upgrades/a58b81b1b4c4cccc8ca11731c1db86622f33af57/upgrade.properties b/go/ql/lib/upgrades/a58b81b1b4c4cccc8ca11731c1db86622f33af57/upgrade.properties index 5eacd9417fc7..68a09f8148c7 100644 --- a/go/ql/lib/upgrades/a58b81b1b4c4cccc8ca11731c1db86622f33af57/upgrade.properties +++ b/go/ql/lib/upgrades/a58b81b1b4c4cccc8ca11731c1db86622f33af57/upgrade.properties @@ -1,3 +1,2 @@ description: Add tables for struct tags and interface method IDs compatibility: full -component_tags.rel: run component_tags.qlo From d04a0f4b873c5506473d961bb1a0bfdc49ce4f4e Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Tue, 31 May 2022 15:18:50 +0100 Subject: [PATCH 10/23] Add note explaining how to regenerate dbscheme --- .../go.dbscheme | 0 .../old.dbscheme | 2 +- .../upgrade.properties | 0 go/extractor/dbscheme/dbscheme.go | 2 +- go/ql/lib/go.dbscheme | 2 +- .../a58b81b1b4c4cccc8ca11731c1db86622f33af57/go.dbscheme | 2 +- 6 files changed, 4 insertions(+), 4 deletions(-) rename go/downgrades/{d2066c23fe3de023d76d7e5a52dec6771d308534 => 76243dd9f77adbf125835fb83a510465b2f29a24}/go.dbscheme (100%) rename go/downgrades/{d2066c23fe3de023d76d7e5a52dec6771d308534 => 76243dd9f77adbf125835fb83a510465b2f29a24}/old.dbscheme (99%) rename go/downgrades/{d2066c23fe3de023d76d7e5a52dec6771d308534 => 76243dd9f77adbf125835fb83a510465b2f29a24}/upgrade.properties (100%) diff --git a/go/downgrades/d2066c23fe3de023d76d7e5a52dec6771d308534/go.dbscheme b/go/downgrades/76243dd9f77adbf125835fb83a510465b2f29a24/go.dbscheme similarity index 100% rename from go/downgrades/d2066c23fe3de023d76d7e5a52dec6771d308534/go.dbscheme rename to go/downgrades/76243dd9f77adbf125835fb83a510465b2f29a24/go.dbscheme diff --git a/go/downgrades/d2066c23fe3de023d76d7e5a52dec6771d308534/old.dbscheme b/go/downgrades/76243dd9f77adbf125835fb83a510465b2f29a24/old.dbscheme similarity index 99% rename from go/downgrades/d2066c23fe3de023d76d7e5a52dec6771d308534/old.dbscheme rename to go/downgrades/76243dd9f77adbf125835fb83a510465b2f29a24/old.dbscheme index d2066c23fe3d..76243dd9f77a 100644 --- a/go/downgrades/d2066c23fe3de023d76d7e5a52dec6771d308534/old.dbscheme +++ b/go/downgrades/76243dd9f77adbf125835fb83a510465b2f29a24/old.dbscheme @@ -1,4 +1,4 @@ -/** Auto-generated dbscheme; do not edit. */ +/** Auto-generated dbscheme; do not edit. Run `make gen` in directory `go/` to regenerate. */ /** Duplicate code **/ diff --git a/go/downgrades/d2066c23fe3de023d76d7e5a52dec6771d308534/upgrade.properties b/go/downgrades/76243dd9f77adbf125835fb83a510465b2f29a24/upgrade.properties similarity index 100% rename from go/downgrades/d2066c23fe3de023d76d7e5a52dec6771d308534/upgrade.properties rename to go/downgrades/76243dd9f77adbf125835fb83a510465b2f29a24/upgrade.properties diff --git a/go/extractor/dbscheme/dbscheme.go b/go/extractor/dbscheme/dbscheme.go index 923fda859dba..550c7920c711 100644 --- a/go/extractor/dbscheme/dbscheme.go +++ b/go/extractor/dbscheme/dbscheme.go @@ -410,7 +410,7 @@ func AddDefaultSnippet(snippet string) bool { // PrintDbScheme prints the schema of this database to the writer `w` func PrintDbScheme(w io.Writer) { - fmt.Fprintf(w, "/** Auto-generated dbscheme; do not edit. */\n\n") + fmt.Fprintf(w, "/** Auto-generated dbscheme; do not edit. Run `make gen` in directory `go/` to regenerate. */\n\n") for _, snippet := range defaultSnippets { fmt.Fprintf(w, "%s\n", snippet) } diff --git a/go/ql/lib/go.dbscheme b/go/ql/lib/go.dbscheme index d2066c23fe3d..76243dd9f77a 100644 --- a/go/ql/lib/go.dbscheme +++ b/go/ql/lib/go.dbscheme @@ -1,4 +1,4 @@ -/** Auto-generated dbscheme; do not edit. */ +/** Auto-generated dbscheme; do not edit. Run `make gen` in directory `go/` to regenerate. */ /** Duplicate code **/ diff --git a/go/ql/lib/upgrades/a58b81b1b4c4cccc8ca11731c1db86622f33af57/go.dbscheme b/go/ql/lib/upgrades/a58b81b1b4c4cccc8ca11731c1db86622f33af57/go.dbscheme index d2066c23fe3d..76243dd9f77a 100644 --- a/go/ql/lib/upgrades/a58b81b1b4c4cccc8ca11731c1db86622f33af57/go.dbscheme +++ b/go/ql/lib/upgrades/a58b81b1b4c4cccc8ca11731c1db86622f33af57/go.dbscheme @@ -1,4 +1,4 @@ -/** Auto-generated dbscheme; do not edit. */ +/** Auto-generated dbscheme; do not edit. Run `make gen` in directory `go/` to regenerate. */ /** Duplicate code **/ From 74cba9056b4095fa9ab7839d4bbb8c7ddfa437d1 Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Tue, 1 Oct 2024 14:12:51 +0100 Subject: [PATCH 11/23] Optimise join orders --- go/ql/lib/semmle/go/AST.qll | 1 + go/ql/lib/semmle/go/Scopes.qll | 18 +++++++++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/go/ql/lib/semmle/go/AST.qll b/go/ql/lib/semmle/go/AST.qll index 92bf9dc2cb8f..64c6231d1054 100644 --- a/go/ql/lib/semmle/go/AST.qll +++ b/go/ql/lib/semmle/go/AST.qll @@ -79,6 +79,7 @@ class AstNode extends @node, Locatable { } /** Gets the innermost function definition to which this AST node belongs, if any. */ + pragma[nomagic] FuncDef getEnclosingFunction() { result = this.getParent().parentInSameFunction*() } /** diff --git a/go/ql/lib/semmle/go/Scopes.qll b/go/ql/lib/semmle/go/Scopes.qll index 82785b00cdc6..52abff8cc6b9 100644 --- a/go/ql/lib/semmle/go/Scopes.qll +++ b/go/ql/lib/semmle/go/Scopes.qll @@ -479,6 +479,13 @@ class Function extends ValueEntity, @functionobject { ResultVariable getAResult() { result = this.getResult(_) } } +pragma[inline_late] +bindingset[m] +private Type implementsIncludingInterfaceMethodsCand(Method m, string mname) { + result.implements(m.getReceiverType().getUnderlyingType()) and + mname = m.getName() +} + /** * A method, that is, a function with a receiver variable, or a function declared in an interface. * @@ -580,9 +587,14 @@ class Method extends Function { predicate implementsIncludingInterfaceMethods(Method m) { this = m or - exists(Type t | - this = t.getMethod(m.getName()) and - t.implements(m.getReceiverType().getUnderlyingType()) + // Take all methods + // Get receiver type then underlying type ==> [method, recvutype] + // Map through Type.implements ==> [method, candtype] + // Get method name ==> [mname, candtype] + // Get corresponding method + exists(Type t, string mname | + t = implementsIncludingInterfaceMethodsCand(m, mname) and + this = t.getMethod(mname) ) } From c1a1edf24e3970e864f92708427b0e423d9e88e8 Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Tue, 1 Oct 2024 14:33:27 +0100 Subject: [PATCH 12/23] Autoformat --- go/ql/lib/semmle/go/Scopes.qll | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go/ql/lib/semmle/go/Scopes.qll b/go/ql/lib/semmle/go/Scopes.qll index 52abff8cc6b9..277afdb216e3 100644 --- a/go/ql/lib/semmle/go/Scopes.qll +++ b/go/ql/lib/semmle/go/Scopes.qll @@ -479,8 +479,8 @@ class Function extends ValueEntity, @functionobject { ResultVariable getAResult() { result = this.getResult(_) } } -pragma[inline_late] bindingset[m] +pragma[inline_late] private Type implementsIncludingInterfaceMethodsCand(Method m, string mname) { result.implements(m.getReceiverType().getUnderlyingType()) and mname = m.getName() From 288e0ec565bd0b094868a4e4282613a470c40246 Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Tue, 1 Oct 2024 14:39:32 +0100 Subject: [PATCH 13/23] component_tags -> struct_tags --- .../go.dbscheme | 0 .../old.dbscheme | 2 +- .../upgrade.properties | 2 +- go/extractor/dbscheme/tables.go | 4 ++-- go/extractor/extractor.go | 2 +- go/ql/lib/go.dbscheme | 2 +- go/ql/lib/go.dbscheme.stats | 2 +- go/ql/lib/semmle/go/Types.qll | 8 ++++---- .../a58b81b1b4c4cccc8ca11731c1db86622f33af57/go.dbscheme | 2 +- 9 files changed, 12 insertions(+), 12 deletions(-) rename go/downgrades/{76243dd9f77adbf125835fb83a510465b2f29a24 => 4bd57e093275e5e892dfb16b55ed4bd76ea662be}/go.dbscheme (100%) rename go/downgrades/{76243dd9f77adbf125835fb83a510465b2f29a24 => 4bd57e093275e5e892dfb16b55ed4bd76ea662be}/old.dbscheme (99%) rename go/downgrades/{76243dd9f77adbf125835fb83a510465b2f29a24 => 4bd57e093275e5e892dfb16b55ed4bd76ea662be}/upgrade.properties (82%) diff --git a/go/downgrades/76243dd9f77adbf125835fb83a510465b2f29a24/go.dbscheme b/go/downgrades/4bd57e093275e5e892dfb16b55ed4bd76ea662be/go.dbscheme similarity index 100% rename from go/downgrades/76243dd9f77adbf125835fb83a510465b2f29a24/go.dbscheme rename to go/downgrades/4bd57e093275e5e892dfb16b55ed4bd76ea662be/go.dbscheme diff --git a/go/downgrades/76243dd9f77adbf125835fb83a510465b2f29a24/old.dbscheme b/go/downgrades/4bd57e093275e5e892dfb16b55ed4bd76ea662be/old.dbscheme similarity index 99% rename from go/downgrades/76243dd9f77adbf125835fb83a510465b2f29a24/old.dbscheme rename to go/downgrades/4bd57e093275e5e892dfb16b55ed4bd76ea662be/old.dbscheme index 76243dd9f77a..4bd57e093275 100644 --- a/go/downgrades/76243dd9f77adbf125835fb83a510465b2f29a24/old.dbscheme +++ b/go/downgrades/4bd57e093275e5e892dfb16b55ed4bd76ea662be/old.dbscheme @@ -208,7 +208,7 @@ underlying_type(unique int named: @namedtype ref, int tp: @type ref); component_types(int parent: @compositetype ref, int index: int ref, string name: string ref, int tp: @type ref); #keyset[parent, index] -component_tags(int parent: @structtype ref, int index: int ref, string tag: string ref); +struct_tags(int parent: @structtype ref, int index: int ref, string tag: string ref); #keyset[interface, index] interface_private_method_ids(int interface: @interfacetype ref, int index: int ref, string id: string ref); diff --git a/go/downgrades/76243dd9f77adbf125835fb83a510465b2f29a24/upgrade.properties b/go/downgrades/4bd57e093275e5e892dfb16b55ed4bd76ea662be/upgrade.properties similarity index 82% rename from go/downgrades/76243dd9f77adbf125835fb83a510465b2f29a24/upgrade.properties rename to go/downgrades/4bd57e093275e5e892dfb16b55ed4bd76ea662be/upgrade.properties index 976c2c81bfa4..0cda1e3644f8 100644 --- a/go/downgrades/76243dd9f77adbf125835fb83a510465b2f29a24/upgrade.properties +++ b/go/downgrades/4bd57e093275e5e892dfb16b55ed4bd76ea662be/upgrade.properties @@ -1,5 +1,5 @@ description: Remove component-tags and interface-method-id tables compatibility: full -component_tags.rel: delete +struct_tags.rel: delete interface_private_method_ids.rel: delete diff --git a/go/extractor/dbscheme/tables.go b/go/extractor/dbscheme/tables.go index ec74c7a2c0d7..aa44c6248424 100644 --- a/go/extractor/dbscheme/tables.go +++ b/go/extractor/dbscheme/tables.go @@ -1150,8 +1150,8 @@ var ComponentTypesTable = NewTable("component_types", EntityColumn(TypeType, "tp"), ).KeySet("parent", "index") -// ComponentTagsTable is the table associating struct types with their component types' tags -var ComponentTagsTable = NewTable("component_tags", +// StructTagsTable is the table associating struct types with their component types' tags +var StructTagsTable = NewTable("struct_tags", EntityColumn(StructType, "parent"), IntColumn("index"), StringColumn("tag"), diff --git a/go/extractor/extractor.go b/go/extractor/extractor.go index 8a399eb2b902..c157f7c8f672 100644 --- a/go/extractor/extractor.go +++ b/go/extractor/extractor.go @@ -1625,7 +1625,7 @@ func extractType(tw *trap.Writer, tp types.Type) trap.Label { } extractComponentType(tw, lbl, i, name, field.Type()) if tp.Tag(i) != "" { - dbscheme.ComponentTagsTable.Emit(tw, lbl, i, tp.Tag(i)) + dbscheme.StructTagsTable.Emit(tw, lbl, i, tp.Tag(i)) } } case *types.Pointer: diff --git a/go/ql/lib/go.dbscheme b/go/ql/lib/go.dbscheme index 76243dd9f77a..4bd57e093275 100644 --- a/go/ql/lib/go.dbscheme +++ b/go/ql/lib/go.dbscheme @@ -208,7 +208,7 @@ underlying_type(unique int named: @namedtype ref, int tp: @type ref); component_types(int parent: @compositetype ref, int index: int ref, string name: string ref, int tp: @type ref); #keyset[parent, index] -component_tags(int parent: @structtype ref, int index: int ref, string tag: string ref); +struct_tags(int parent: @structtype ref, int index: int ref, string tag: string ref); #keyset[interface, index] interface_private_method_ids(int interface: @interfacetype ref, int index: int ref, string id: string ref); diff --git a/go/ql/lib/go.dbscheme.stats b/go/ql/lib/go.dbscheme.stats index 50565d963aad..a602a143ee0c 100644 --- a/go/ql/lib/go.dbscheme.stats +++ b/go/ql/lib/go.dbscheme.stats @@ -13979,7 +13979,7 @@ - component_tags + struct_tags 41038845 diff --git a/go/ql/lib/semmle/go/Types.qll b/go/ql/lib/semmle/go/Types.qll index 8a9bcf1f91c1..651cda82eb6e 100644 --- a/go/ql/lib/semmle/go/Types.qll +++ b/go/ql/lib/semmle/go/Types.qll @@ -467,9 +467,9 @@ class StructType extends @structtype, CompositeType { predicate hasOwnFieldWithTag(int i, string name, Type tp, boolean isEmbedded, string tag) { this.hasOwnField(i, name, tp, isEmbedded) and ( - component_tags(this, i, tag) + struct_tags(this, i, tag) or - not component_tags(this, i, _) and tag = "" + not struct_tags(this, i, _) and tag = "" ) } @@ -594,9 +594,9 @@ class StructType extends @structtype, CompositeType { concat(int i, string name, Type tp, string tagToPrint | component_types(this, i, name, tp) and ( - tagToPrint = " `" + any(string tag | component_tags(this, i, tag)) + "`" + tagToPrint = " `" + any(string tag | struct_tags(this, i, tag)) + "`" or - tagToPrint = "" and not component_tags(this, i, _) + tagToPrint = "" and not struct_tags(this, i, _) ) | name + " " + tp.pp() + tagToPrint, "; " order by i diff --git a/go/ql/lib/upgrades/a58b81b1b4c4cccc8ca11731c1db86622f33af57/go.dbscheme b/go/ql/lib/upgrades/a58b81b1b4c4cccc8ca11731c1db86622f33af57/go.dbscheme index 76243dd9f77a..4bd57e093275 100644 --- a/go/ql/lib/upgrades/a58b81b1b4c4cccc8ca11731c1db86622f33af57/go.dbscheme +++ b/go/ql/lib/upgrades/a58b81b1b4c4cccc8ca11731c1db86622f33af57/go.dbscheme @@ -208,7 +208,7 @@ underlying_type(unique int named: @namedtype ref, int tp: @type ref); component_types(int parent: @compositetype ref, int index: int ref, string name: string ref, int tp: @type ref); #keyset[parent, index] -component_tags(int parent: @structtype ref, int index: int ref, string tag: string ref); +struct_tags(int parent: @structtype ref, int index: int ref, string tag: string ref); #keyset[interface, index] interface_private_method_ids(int interface: @interfacetype ref, int index: int ref, string id: string ref); From 0f95a8d7243715e94c2c09763f0930b76132ab85 Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Tue, 1 Oct 2024 14:46:04 +0100 Subject: [PATCH 14/23] Clarify doc --- go/ql/lib/semmle/go/Types.qll | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go/ql/lib/semmle/go/Types.qll b/go/ql/lib/semmle/go/Types.qll index 651cda82eb6e..0b5ac334c9b7 100644 --- a/go/ql/lib/semmle/go/Types.qll +++ b/go/ql/lib/semmle/go/Types.qll @@ -782,7 +782,7 @@ class InterfaceType extends @interfacetype, CompositeType { * different packages defines two distinct types, but they appear identical according to * `getMethodType`. If the packages were named `a` and `b`, `getMethodType` would yield * `notExported -> int` for both, whereas this method would yield `a.notExported -> int` - * and `b.notExported -> int` respectively. + * and `b.notExported -> int` respectively, while both yielding `Exported -> int`. */ Type getMethodTypeByQualifiedName(string qname) { exists(int i, string name | i >= 0 | From ab99509a11017df930746f4a74767aaa36508718 Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Tue, 1 Oct 2024 18:46:14 +0100 Subject: [PATCH 15/23] Rework interface for querying private interface method ids --- .../2024-09-03-tags-and-interface-ids.md | 2 +- go/ql/lib/semmle/go/Types.qll | 28 ++++--------------- .../semmle/go/Types/InterfaceMethodIds.ql | 6 +++- 3 files changed, 12 insertions(+), 24 deletions(-) diff --git a/go/ql/lib/change-notes/2024-09-03-tags-and-interface-ids.md b/go/ql/lib/change-notes/2024-09-03-tags-and-interface-ids.md index c8c6e88ab4cb..749ae4cde998 100644 --- a/go/ql/lib/change-notes/2024-09-03-tags-and-interface-ids.md +++ b/go/ql/lib/change-notes/2024-09-03-tags-and-interface-ids.md @@ -2,4 +2,4 @@ category: minorAnalysis --- * Added member predicates `StructTag.hasOwnFieldWithTag` and `Field.getTag`, which enable CodeQL queries to examine struct field tags. -* Added member predicate `InterfaceType.getMethodTypeByQualifiedName`, which enables CodeQL queries to distinguish interfaces with matching non-exported method names that are declared in different packages, and are therefore incompatible. +* Added member predicate `InterfaceType.hasPrivateMethodWithQualifiedName`, which enables CodeQL queries to distinguish interfaces with matching non-exported method names that are declared in different packages, and are therefore incompatible. diff --git a/go/ql/lib/semmle/go/Types.qll b/go/ql/lib/semmle/go/Types.qll index 0b5ac334c9b7..d71869aa995c 100644 --- a/go/ql/lib/semmle/go/Types.qll +++ b/go/ql/lib/semmle/go/Types.qll @@ -769,29 +769,13 @@ class InterfaceType extends @interfacetype, CompositeType { } /** - * Gets the type of method `qname` of this interface type. - * - * This differs from `getMethodType` in that if the method is not exported, the `qname` - * will be package-qualified. This means that the set of `qname`s` together with any - * embedded types fully distinguishes the interface from any other, whereas the set - * of names matched by `getMethodName` may be ambiguous between interfaces with matching - * exported methods and unexported methods that have matching names but belong to - * different packages. - * - * For example, `interface { Exported() int; notExported() int }` declared in two - * different packages defines two distinct types, but they appear identical according to - * `getMethodType`. If the packages were named `a` and `b`, `getMethodType` would yield - * `notExported -> int` for both, whereas this method would yield `a.notExported -> int` - * and `b.notExported -> int` respectively, while both yielding `Exported -> int`. + * Holds if this interface type has a private method `name`, + * with qualified name `qname` and type `type`. */ - Type getMethodTypeByQualifiedName(string qname) { - exists(int i, string name | i >= 0 | - component_types(this, i, name, result) and - ( - interface_private_method_ids(this, i, qname) - or - name = qname and not interface_private_method_ids(this, i, _) - ) + predicate hasPrivateMethodWithQualifiedName(string name, string qname, Type type) { + exists(int i | i >= 0 | + component_types(this, i, name, type) and + interface_private_method_ids(this, i, qname) ) } diff --git a/go/ql/test/library-tests/semmle/go/Types/InterfaceMethodIds.ql b/go/ql/test/library-tests/semmle/go/Types/InterfaceMethodIds.ql index b6246cf683a0..356bc85c931b 100644 --- a/go/ql/test/library-tests/semmle/go/Types/InterfaceMethodIds.ql +++ b/go/ql/test/library-tests/semmle/go/Types/InterfaceMethodIds.ql @@ -4,5 +4,9 @@ from NamedType nt, InterfaceType it, Type methodType, string id where nt.getName() = "MixedExportedAndNot" and it = nt.getUnderlyingType() and - methodType = it.getMethodTypeByQualifiedName(id) + ( + it.hasPrivateMethodWithQualifiedName(_, id, methodType) + or + it.hasMethod(id, methodType) and not it.hasPrivateMethodWithQualifiedName(id, _, _) + ) select it.pp(), methodType.pp(), id From 36a031833f9728940141ef745c078b9825c70b15 Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Wed, 2 Oct 2024 15:16:47 +0100 Subject: [PATCH 16/23] Further optimisation --- go/ql/lib/semmle/go/Expr.qll | 1 + go/ql/lib/semmle/go/controlflow/IR.qll | 3 ++- .../go/dataflow/internal/TaintTrackingUtil.qll | 1 + .../security/OpenUrlRedirectCustomizations.qll | 18 ++++++++++++------ 4 files changed, 16 insertions(+), 7 deletions(-) diff --git a/go/ql/lib/semmle/go/Expr.qll b/go/ql/lib/semmle/go/Expr.qll index b1e1a1697843..ce6c7d4cf1f6 100644 --- a/go/ql/lib/semmle/go/Expr.qll +++ b/go/ql/lib/semmle/go/Expr.qll @@ -2098,6 +2098,7 @@ class LabelName extends Name { * may be identified as such, so not all type expressions can be determined by * a bottom-up analysis. In such cases, `isTypeExprTopDown` below is useful. */ +pragma[nomagic] private predicate isTypeExprBottomUp(Expr e) { e instanceof TypeName or diff --git a/go/ql/lib/semmle/go/controlflow/IR.qll b/go/ql/lib/semmle/go/controlflow/IR.qll index d337f526cdef..59060e406558 100644 --- a/go/ql/lib/semmle/go/controlflow/IR.qll +++ b/go/ql/lib/semmle/go/controlflow/IR.qll @@ -501,10 +501,11 @@ module IR { override StructLit lit; /** Gets the name of the initialized field. */ + pragma[nomagic] string getFieldName() { if elt instanceof KeyValueExpr then result = elt.(KeyValueExpr).getKey().(Ident).getName() - else lit.getStructType().hasOwnField(i, result, _, _) + else pragma[only_bind_out](lit.getStructType()).hasOwnField(i, result, _, _) } /** Gets the initialized field. */ diff --git a/go/ql/lib/semmle/go/dataflow/internal/TaintTrackingUtil.qll b/go/ql/lib/semmle/go/dataflow/internal/TaintTrackingUtil.qll index 1b521d89d98d..281e283890ad 100644 --- a/go/ql/lib/semmle/go/dataflow/internal/TaintTrackingUtil.qll +++ b/go/ql/lib/semmle/go/dataflow/internal/TaintTrackingUtil.qll @@ -190,6 +190,7 @@ predicate sliceStep(DataFlow::Node pred, DataFlow::Node succ) { */ abstract class FunctionModel extends Function { /** Holds if taint propagates through this function from `input` to `output`. */ + pragma[nomagic] abstract predicate hasTaintFlow(FunctionInput input, FunctionOutput output); /** Gets an input node for this model for the call `c`. */ diff --git a/go/ql/lib/semmle/go/security/OpenUrlRedirectCustomizations.qll b/go/ql/lib/semmle/go/security/OpenUrlRedirectCustomizations.qll index 304bc004e038..720f7ba44fd0 100644 --- a/go/ql/lib/semmle/go/security/OpenUrlRedirectCustomizations.qll +++ b/go/ql/lib/semmle/go/security/OpenUrlRedirectCustomizations.qll @@ -75,6 +75,15 @@ module OpenUrlRedirect { } } + bindingset[var, w] + pragma[inline_late] + private predicate useIsDominated( + SsaWithFields var, Write w, DataFlow::ReadNode sanitizedRead + ) { + w.dominatesNode(sanitizedRead.asInstruction()) and + sanitizedRead = var.getAUse() + } + /** * An access to a variable that is preceded by an assignment to its `Path` field. * @@ -83,13 +92,10 @@ module OpenUrlRedirect { */ class PathAssignmentBarrier extends Barrier, Read { PathAssignmentBarrier() { - exists(Write w, Field f, SsaWithFields var | - f.getName() = "Path" and + exists(Write w, SsaWithFields var | hasHostnameSanitizingSubstring(w.getRhs()) and - this = var.getAUse() - | - w.writesField(var.getAUse(), f, _) and - w.dominatesNode(insn) + w.writesField(var.getAUse(), any(Field f | f.getName() = "Path"), _) and + useIsDominated(var, w, this) ) } } From 365ccf4903cc3c9a4ed0ce40b74591a85233c263 Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Wed, 2 Oct 2024 15:27:54 +0100 Subject: [PATCH 17/23] autoformat --- .../lib/semmle/go/security/OpenUrlRedirectCustomizations.qll | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/go/ql/lib/semmle/go/security/OpenUrlRedirectCustomizations.qll b/go/ql/lib/semmle/go/security/OpenUrlRedirectCustomizations.qll index 720f7ba44fd0..870edeee9621 100644 --- a/go/ql/lib/semmle/go/security/OpenUrlRedirectCustomizations.qll +++ b/go/ql/lib/semmle/go/security/OpenUrlRedirectCustomizations.qll @@ -77,9 +77,7 @@ module OpenUrlRedirect { bindingset[var, w] pragma[inline_late] - private predicate useIsDominated( - SsaWithFields var, Write w, DataFlow::ReadNode sanitizedRead - ) { + private predicate useIsDominated(SsaWithFields var, Write w, DataFlow::ReadNode sanitizedRead) { w.dominatesNode(sanitizedRead.asInstruction()) and sanitizedRead = var.getAUse() } From bf5ba33c2efe0904e72e5971bddadecf6e07c7ed Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Wed, 2 Oct 2024 23:16:22 +0100 Subject: [PATCH 18/23] Improve join orders for top 5 perf regressions in QA --- go/ql/lib/semmle/go/frameworks/Afero.qll | 4 ++-- go/ql/lib/semmle/go/frameworks/GoMicro.qll | 8 +++++++- go/ql/lib/semmle/go/frameworks/Twirp.qll | 8 +++++++- go/ql/src/Security/CWE-798/HardcodedCredentials.ql | 6 +++++- 4 files changed, 21 insertions(+), 5 deletions(-) diff --git a/go/ql/lib/semmle/go/frameworks/Afero.qll b/go/ql/lib/semmle/go/frameworks/Afero.qll index 598036de22bc..c03bf6114334 100644 --- a/go/ql/lib/semmle/go/frameworks/Afero.qll +++ b/go/ql/lib/semmle/go/frameworks/Afero.qll @@ -65,7 +65,7 @@ module Afero { exists(Function f | f.hasQualifiedName(aferoPackage(), ["WriteReader", "SafeWriteReader", "WriteFile", "ReadFile", "ReadDir"]) and - this = f.getACall() and + this = pragma[only_bind_out](f.getACall()) and pathArg = 1 and not aferoSanitizer(this.getArgument(0)) ) @@ -73,7 +73,7 @@ module Afero { exists(Method m | m.hasQualifiedName(aferoPackage(), "Afero", ["WriteReader", "SafeWriteReader", "WriteFile", "ReadFile", "ReadDir"]) and - this = m.getACall() and + this = pragma[only_bind_out](m.getACall()) and pathArg = 0 and not aferoSanitizer(this.getReceiver()) ) diff --git a/go/ql/lib/semmle/go/frameworks/GoMicro.qll b/go/ql/lib/semmle/go/frameworks/GoMicro.qll index 55f5bded6276..116ebee030ea 100644 --- a/go/ql/lib/semmle/go/frameworks/GoMicro.qll +++ b/go/ql/lib/semmle/go/frameworks/GoMicro.qll @@ -98,6 +98,12 @@ module GoMicro { } } + bindingset[m] + pragma[inline_late] + private predicate implementsServiceType(Method m) { + m.implements(any(ServiceInterfaceType i).getNamedType().getMethod(_)) + } + /** * A service handler. */ @@ -106,7 +112,7 @@ module GoMicro { exists(DataFlow::CallNode call | call.getTarget() instanceof ServiceRegisterHandler and this = call.getArgument(1).getType().getMethod(_) and - this.implements(any(ServiceInterfaceType i).getNamedType().getMethod(_)) + implementsServiceType(this) ) } } diff --git a/go/ql/lib/semmle/go/frameworks/Twirp.qll b/go/ql/lib/semmle/go/frameworks/Twirp.qll index 3efd91eee4d7..7f338816b383 100644 --- a/go/ql/lib/semmle/go/frameworks/Twirp.qll +++ b/go/ql/lib/semmle/go/frameworks/Twirp.qll @@ -118,13 +118,19 @@ module Twirp { override string getKind() { result = "URL" } } + bindingset[m] + pragma[inline_late] + private predicate implementsServiceType(Method m) { + m.implements(any(ServiceInterfaceType i).getNamedType().getMethod(_)) + } + /** A service handler. */ class ServiceHandler extends Method { ServiceHandler() { exists(DataFlow::CallNode call | call.getTarget() instanceof ServerConstructor and this = call.getArgument(0).getType().getMethod(_) and - this.implements(any(ServiceInterfaceType i).getNamedType().getMethod(_)) + implementsServiceType(this) ) } } diff --git a/go/ql/src/Security/CWE-798/HardcodedCredentials.ql b/go/ql/src/Security/CWE-798/HardcodedCredentials.ql index 6dd422413f7f..9f88f8449f7a 100644 --- a/go/ql/src/Security/CWE-798/HardcodedCredentials.ql +++ b/go/ql/src/Security/CWE-798/HardcodedCredentials.ql @@ -17,13 +17,17 @@ import go import semmle.go.security.HardcodedCredentials import semmle.go.security.SensitiveActions +bindingset[write] +pragma[inline_late] +private predicate isWriteRhs(Write write, DataFlow::Node rhs) { write.getRhs() = rhs } + /** * Holds if `sink` is used in a context that suggests it may hold sensitive data of * the given `type`. */ predicate isSensitive(DataFlow::Node sink, SensitiveExpr::Classification type) { exists(Write write, string name | - write.getRhs() = sink and + isWriteRhs(write, sink) and name = write.getLhs().getName() and // allow obvious test password variables not name.regexpMatch(HeuristicNames::notSensitive()) From ed9a6bd8200835267ac4285c4e55af7ef863e7bc Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Thu, 3 Oct 2024 22:17:44 +0100 Subject: [PATCH 19/23] Further join order optimisations --- go/ql/lib/semmle/go/Expr.qll | 1 + go/ql/lib/semmle/go/controlflow/IR.qll | 2 +- .../semmle/go/dataflow/internal/DataFlowDispatch.qll | 4 ++-- .../lib/semmle/go/dataflow/internal/DataFlowNodes.qll | 1 + go/ql/lib/semmle/go/dataflow/internal/DataFlowUtil.qll | 8 +++++--- .../semmle/go/dataflow/internal/TaintTrackingUtil.qll | 10 +++++----- 6 files changed, 15 insertions(+), 11 deletions(-) diff --git a/go/ql/lib/semmle/go/Expr.qll b/go/ql/lib/semmle/go/Expr.qll index ce6c7d4cf1f6..4a4ab00f0538 100644 --- a/go/ql/lib/semmle/go/Expr.qll +++ b/go/ql/lib/semmle/go/Expr.qll @@ -2137,6 +2137,7 @@ private predicate isTypeExprBottomUp(Expr e) { * it may be the latter and so this predicate does not consider the expression to be * a type expression. */ +pragma[nomagic] private predicate isTypeExprTopDown(Expr e) { e = any(CompositeLit cl).getTypeExpr() or diff --git a/go/ql/lib/semmle/go/controlflow/IR.qll b/go/ql/lib/semmle/go/controlflow/IR.qll index 59060e406558..b036ddf6d0f5 100644 --- a/go/ql/lib/semmle/go/controlflow/IR.qll +++ b/go/ql/lib/semmle/go/controlflow/IR.qll @@ -1481,7 +1481,7 @@ module IR { override predicate refersTo(ValueEntity e) { this instanceof MkLhs and - loc = e.getAReference() + pragma[only_bind_out](loc) = e.getAReference() or exists(WriteResultInstruction wr | this = MkResultWriteTarget(wr) | e = wr.getResultVariable() diff --git a/go/ql/lib/semmle/go/dataflow/internal/DataFlowDispatch.qll b/go/ql/lib/semmle/go/dataflow/internal/DataFlowDispatch.qll index b045d6dc5522..a06edad0be2c 100644 --- a/go/ql/lib/semmle/go/dataflow/internal/DataFlowDispatch.qll +++ b/go/ql/lib/semmle/go/dataflow/internal/DataFlowDispatch.qll @@ -8,9 +8,9 @@ private import DataFlowPrivate private predicate isInterfaceCallReceiver( DataFlow::CallNode call, DataFlow::Node recv, InterfaceType tp, string m ) { - call.getReceiver() = recv and + pragma[only_bind_out](call).getReceiver() = recv and recv.getType().getUnderlyingType() = tp and - m = call.getACalleeIncludingExternals().asFunction().getName() + m = pragma[only_bind_out](call).getACalleeIncludingExternals().asFunction().getName() } /** Gets a data-flow node that may flow into the receiver value of `call`, which is an interface value. */ diff --git a/go/ql/lib/semmle/go/dataflow/internal/DataFlowNodes.qll b/go/ql/lib/semmle/go/dataflow/internal/DataFlowNodes.qll index 6b088f44e73a..0aa517b3fdad 100644 --- a/go/ql/lib/semmle/go/dataflow/internal/DataFlowNodes.qll +++ b/go/ql/lib/semmle/go/dataflow/internal/DataFlowNodes.qll @@ -525,6 +525,7 @@ module Public { * As `getACalleeIncludingExternals`, except excluding external functions (those for which * we lack a definition, such as standard library functions). */ + pragma[nomagic] FuncDef getACallee() { result = this.getACalleeIncludingExternals().getFuncDef() } /** diff --git a/go/ql/lib/semmle/go/dataflow/internal/DataFlowUtil.qll b/go/ql/lib/semmle/go/dataflow/internal/DataFlowUtil.qll index 9f76e7c7c95b..75ab4dbb2ebd 100644 --- a/go/ql/lib/semmle/go/dataflow/internal/DataFlowUtil.qll +++ b/go/ql/lib/semmle/go/dataflow/internal/DataFlowUtil.qll @@ -284,9 +284,11 @@ signature predicate guardChecksSig(Node g, Expr e, boolean branch); module BarrierGuard { /** Gets a node that is safely guarded by the given guard check. */ Node getABarrierNode() { - exists(ControlFlow::ConditionGuardNode guard, SsaWithFields var | result = var.getAUse() | + exists(ControlFlow::ConditionGuardNode guard, SsaWithFields var | + result = pragma[only_bind_out](var).getAUse() + | guards(_, guard, _, var) and - guard.dominates(result.getBasicBlock()) + pragma[only_bind_out](guard).dominates(result.getBasicBlock()) ) } @@ -353,7 +355,7 @@ module BarrierGuard { ) { exists(FuncDecl fd, Node arg, Node ret | fd.getFunction() = f and - localFlow(inp.getExitNode(fd), arg) and + localFlow(inp.getExitNode(fd), pragma[only_bind_out](arg)) and ret = outp.getEntryNode(fd) and ( // Case: a function like "if someBarrierGuard(arg) { return true } else { return false }" diff --git a/go/ql/lib/semmle/go/dataflow/internal/TaintTrackingUtil.qll b/go/ql/lib/semmle/go/dataflow/internal/TaintTrackingUtil.qll index 281e283890ad..85f6bb0874f5 100644 --- a/go/ql/lib/semmle/go/dataflow/internal/TaintTrackingUtil.qll +++ b/go/ql/lib/semmle/go/dataflow/internal/TaintTrackingUtil.qll @@ -203,8 +203,8 @@ abstract class FunctionModel extends Function { predicate taintStepForCall(DataFlow::Node pred, DataFlow::Node succ, DataFlow::CallNode c) { c = this.getACall() and exists(FunctionInput inp, FunctionOutput outp | this.hasTaintFlow(inp, outp) | - pred = inp.getNode(c) and - succ = outp.getNode(c) + pred = pragma[only_bind_out](inp).getNode(c) and + succ = pragma[only_bind_out](outp).getNode(c) ) } @@ -383,9 +383,9 @@ predicate inputIsConstantIfOutputHasProperty( ) { exists(Function f, FunctionInput inp, FunctionOutput outp, DataFlow::CallNode call | functionEnsuresInputIsConstant(f, inp, outp, p) and - call = f.getACall() and - inputNode = inp.getNode(call) and - DataFlow::localFlow(outp.getNode(call), outputNode) + call = pragma[only_bind_out](f).getACall() and + inputNode = pragma[only_bind_out](inp).getNode(call) and + DataFlow::localFlow(pragma[only_bind_out](outp).getNode(call), outputNode) ) } From c79da8b2b51c3f29c4e9113f6f40bfffb97407fe Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Fri, 4 Oct 2024 10:30:36 +0100 Subject: [PATCH 20/23] Avoid pathological case where getExampleMethodName picks a very common method name --- go/ql/lib/semmle/go/Types.qll | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/go/ql/lib/semmle/go/Types.qll b/go/ql/lib/semmle/go/Types.qll index d71869aa995c..12236d73dad9 100644 --- a/go/ql/lib/semmle/go/Types.qll +++ b/go/ql/lib/semmle/go/Types.qll @@ -1064,10 +1064,19 @@ class ErrorType extends Type { ErrorType() { this.implements(Builtin::error().getType().getUnderlyingType()) } } +/** + * Gets the number of types with method `name`. + */ +bindingset[name] +int numberOfTypesWithMethodName(string name) { result = count(Type t | t.hasMethod(name, _)) } + /** * Gets the name of a method in the method set of `i`. * * This is used to restrict the set of interfaces to consider in the definition of `implements`, - * so it does not matter which method name is chosen (we use the lexicographically least). + * so it does not matter which method name is chosen (we use the most unusual name the interface + * require; this is the most discriminating and so shrinks the search space the most). */ -private string getExampleMethodName(InterfaceType i) { result = min(string m | i.hasMethod(m, _)) } +private string getExampleMethodName(InterfaceType i) { + result = min(string m | i.hasMethod(m, _) | m order by numberOfTypesWithMethodName(m)) +} From d401891d3086589c91844b601482eb6eca915078 Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Fri, 4 Oct 2024 11:16:01 +0100 Subject: [PATCH 21/23] copyedit --- go/ql/lib/semmle/go/Scopes.qll | 5 ----- go/ql/lib/semmle/go/Types.qll | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/go/ql/lib/semmle/go/Scopes.qll b/go/ql/lib/semmle/go/Scopes.qll index 277afdb216e3..191534759ea6 100644 --- a/go/ql/lib/semmle/go/Scopes.qll +++ b/go/ql/lib/semmle/go/Scopes.qll @@ -587,11 +587,6 @@ class Method extends Function { predicate implementsIncludingInterfaceMethods(Method m) { this = m or - // Take all methods - // Get receiver type then underlying type ==> [method, recvutype] - // Map through Type.implements ==> [method, candtype] - // Get method name ==> [mname, candtype] - // Get corresponding method exists(Type t, string mname | t = implementsIncludingInterfaceMethodsCand(m, mname) and this = t.getMethod(mname) diff --git a/go/ql/lib/semmle/go/Types.qll b/go/ql/lib/semmle/go/Types.qll index 12236d73dad9..4818db2f774d 100644 --- a/go/ql/lib/semmle/go/Types.qll +++ b/go/ql/lib/semmle/go/Types.qll @@ -1075,7 +1075,7 @@ int numberOfTypesWithMethodName(string name) { result = count(Type t | t.hasMeth * * This is used to restrict the set of interfaces to consider in the definition of `implements`, * so it does not matter which method name is chosen (we use the most unusual name the interface - * require; this is the most discriminating and so shrinks the search space the most). + * requires; this is the most discriminating and so shrinks the search space the most). */ private string getExampleMethodName(InterfaceType i) { result = min(string m | i.hasMethod(m, _) | m order by numberOfTypesWithMethodName(m)) From 629a7a601d1aadada2dbf5a3334ff4fcfb4114ca Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Tue, 8 Oct 2024 15:34:12 +0100 Subject: [PATCH 22/23] Further optimise guardingFunction: remove redundant condition, and order guard -> guardFunction case to work backwards from interesting return sites, allowing us to go backwards not forwards through BasicBlock::dominates --- .../go/dataflow/internal/DataFlowUtil.qll | 31 +++++++++++-------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/go/ql/lib/semmle/go/dataflow/internal/DataFlowUtil.qll b/go/ql/lib/semmle/go/dataflow/internal/DataFlowUtil.qll index 75ab4dbb2ebd..68ffe57f5f59 100644 --- a/go/ql/lib/semmle/go/dataflow/internal/DataFlowUtil.qll +++ b/go/ql/lib/semmle/go/dataflow/internal/DataFlowUtil.qll @@ -341,6 +341,21 @@ module BarrierGuard { localFlow(pragma[only_bind_out](outp.getNode(c)), resNode) } + private predicate onlyPossibleReturnSatisfyingProperty( + FuncDecl fd, FunctionOutput outp, Node ret, DataFlow::Property p + ) { + exists(boolean b | + onlyPossibleReturnOfBool(fd, outp, ret, b) and + p.isBoolean(b) + ) + or + onlyPossibleReturnOfNonNil(fd, outp, ret) and + p.isNonNil() + or + onlyPossibleReturnOfNil(fd, outp, ret) and + p.isNil() + } + /** * Holds if whenever `p` holds of output `outp` of function `f`, this node * is known to validate the input `inp` of `f`. @@ -356,23 +371,13 @@ module BarrierGuard { exists(FuncDecl fd, Node arg, Node ret | fd.getFunction() = f and localFlow(inp.getExitNode(fd), pragma[only_bind_out](arg)) and - ret = outp.getEntryNode(fd) and ( // Case: a function like "if someBarrierGuard(arg) { return true } else { return false }" exists(ControlFlow::ConditionGuardNode guard | - guards(g, guard, arg) and - guard.dominates(ret.getBasicBlock()) + guards(g, pragma[only_bind_out](guard), arg) and + guard.dominates(pragma[only_bind_out](ret).getBasicBlock()) | - exists(boolean b | - onlyPossibleReturnOfBool(fd, outp, ret, b) and - p.isBoolean(b) - ) - or - onlyPossibleReturnOfNonNil(fd, outp, ret) and - p.isNonNil() - or - onlyPossibleReturnOfNil(fd, outp, ret) and - p.isNil() + onlyPossibleReturnSatisfyingProperty(fd, outp, ret, p) ) or // Case: a function like "return someBarrierGuard(arg)" From 837387aeae62a454f37ace21ed6257045faf0675 Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Tue, 8 Oct 2024 18:51:41 +0100 Subject: [PATCH 23/23] Re-optimise isSensitive routine --- go/ql/src/Security/CWE-798/HardcodedCredentials.ql | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/go/ql/src/Security/CWE-798/HardcodedCredentials.ql b/go/ql/src/Security/CWE-798/HardcodedCredentials.ql index 9f88f8449f7a..37ebbad8f68b 100644 --- a/go/ql/src/Security/CWE-798/HardcodedCredentials.ql +++ b/go/ql/src/Security/CWE-798/HardcodedCredentials.ql @@ -17,18 +17,14 @@ import go import semmle.go.security.HardcodedCredentials import semmle.go.security.SensitiveActions -bindingset[write] -pragma[inline_late] -private predicate isWriteRhs(Write write, DataFlow::Node rhs) { write.getRhs() = rhs } - /** * Holds if `sink` is used in a context that suggests it may hold sensitive data of * the given `type`. */ predicate isSensitive(DataFlow::Node sink, SensitiveExpr::Classification type) { exists(Write write, string name | - isWriteRhs(write, sink) and - name = write.getLhs().getName() and + pragma[only_bind_out](write).getRhs() = sink and + name = pragma[only_bind_out](write).getLhs().getName() and // allow obvious test password variables not name.regexpMatch(HeuristicNames::notSensitive()) |