diff --git a/java/downgrades/7cbc85b1f3ecda39661ad4806dedbd0973d2c4c0/old.dbscheme b/java/downgrades/7cbc85b1f3ecda39661ad4806dedbd0973d2c4c0/old.dbscheme new file mode 100644 index 000000000000..7cbc85b1f3ec --- /dev/null +++ b/java/downgrades/7cbc85b1f3ecda39661ad4806dedbd0973d2c4c0/old.dbscheme @@ -0,0 +1,1255 @@ +/** + * An invocation of the compiler. Note that more than one file may be + * compiled per invocation. For example, this command compiles three + * source files: + * + * javac A.java B.java C.java + * + * The `id` simply identifies the invocation, while `cwd` is the working + * directory from which the compiler was invoked. + */ +compilations( + /** + * An invocation of the compiler. Note that more than one file may + * be compiled per invocation. For example, this command compiles + * three source files: + * + * javac A.java B.java C.java + */ + unique int id : @compilation, + int kind: int ref, + string cwd : string ref, + string name : string ref +); + +case @compilation.kind of + 1 = @javacompilation +| 2 = @kotlincompilation +; + +compilation_started( + int id : @compilation ref +) + +compilation_info( + int id : @compilation ref, + string info_key: string ref, + string info_value: string ref +) + +/** + * The arguments that were passed to the extractor for a compiler + * invocation. If `id` is for the compiler invocation + * + * javac A.java B.java C.java + * + * then typically there will be rows for + * + * num | arg + * --- | --- + * 0 | *path to extractor* + * 1 | `--javac-args` + * 2 | A.java + * 3 | B.java + * 4 | C.java + */ +#keyset[id, num] +compilation_args( + int id : @compilation ref, + int num : int ref, + string arg : string ref +); + +/** + * The expanded arguments that were passed to the extractor for a + * compiler invocation. This is similar to `compilation_args`, but + * for a `@@@someFile` argument, it includes the arguments from that + * file, rather than just taking the argument literally. + */ +#keyset[id, num] +compilation_expanded_args( + int id : @compilation ref, + int num : int ref, + string arg : string ref +); + +/** + * The source files that are compiled by a compiler invocation. + * If `id` is for the compiler invocation + * + * javac A.java B.java C.java + * + * then there will be rows for + * + * num | arg + * --- | --- + * 0 | A.java + * 1 | B.java + * 2 | C.java + */ +#keyset[id, num] +compilation_compiling_files( + int id : @compilation ref, + int num : int ref, + int file : @file ref +); + +/** + * For each file recorded in `compilation_compiling_files`, + * there will be a corresponding row in + * `compilation_compiling_files_completed` once extraction + * of that file is complete. The `result` will indicate the + * extraction result: + * + * 0: Successfully extracted + * 1: Errors were encountered, but extraction recovered + * 2: Errors were encountered, and extraction could not recover + */ +#keyset[id, num] +compilation_compiling_files_completed( + int id : @compilation ref, + int num : int ref, + int result : int ref +); + +/** + * The time taken by the extractor for a compiler invocation. + * + * For each file `num`, there will be rows for + * + * kind | seconds + * ---- | --- + * 1 | CPU seconds used by the extractor frontend + * 2 | Elapsed seconds during the extractor frontend + * 3 | CPU seconds used by the extractor backend + * 4 | Elapsed seconds during the extractor backend + */ +#keyset[id, num, kind] +compilation_time( + int id : @compilation ref, + int num : int ref, + /* kind: + 1 = frontend_cpu_seconds + 2 = frontend_elapsed_seconds + 3 = extractor_cpu_seconds + 4 = extractor_elapsed_seconds + */ + int kind : int ref, + float seconds : float ref +); + +/** + * An error or warning generated by the extractor. + * The diagnostic message `diagnostic` was generated during compiler + * invocation `compilation`, and is the `file_number_diagnostic_number`th + * message generated while extracting the `file_number`th file of that + * invocation. + */ +#keyset[compilation, file_number, file_number_diagnostic_number] +diagnostic_for( + unique int diagnostic : @diagnostic ref, + int compilation : @compilation ref, + int file_number : int ref, + int file_number_diagnostic_number : int ref +); + +/** + * The `cpu_seconds` and `elapsed_seconds` are the CPU time and elapsed + * time (respectively) that the original compilation (not the extraction) + * took for compiler invocation `id`. + */ +compilation_compiler_times( + unique int id : @compilation ref, + float cpu_seconds : float ref, + float elapsed_seconds : float ref +); + +/** + * If extraction was successful, then `cpu_seconds` and + * `elapsed_seconds` are the CPU time and elapsed time (respectively) + * that extraction took for compiler invocation `id`. + * The `result` will indicate the extraction result: + * + * 0: Successfully extracted + * 1: Errors were encountered, but extraction recovered + * 2: Errors were encountered, and extraction could not recover + */ +compilation_finished( + unique int id : @compilation ref, + float cpu_seconds : float ref, + float elapsed_seconds : float ref, + int result : int ref +); + +diagnostics( + unique int id: @diagnostic, + string generated_by: string ref, // TODO: Sync this with the other languages? + int severity: int ref, + string error_tag: string ref, + string error_message: string ref, + string full_error_message: string ref, + int location: @location_default ref +); + +/* + * External artifacts + */ + +externalData( + int id : @externalDataElement, + string path : string ref, + int column: int ref, + string value : string ref +); + +snapshotDate( + unique date snapshotDate : date ref +); + +sourceLocationPrefix( + string prefix : string ref +); + +/* + * Duplicate code + */ + +duplicateCode( + unique int id : @duplication, + string relativePath : string ref, + int equivClass : int ref +); + +similarCode( + unique int id : @similarity, + string 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 +); + +/* + * SMAP + */ + +smap_header( + int outputFileId: @file ref, + string outputFilename: string ref, + string defaultStratum: string ref +); + +smap_files( + int outputFileId: @file ref, + string stratum: string ref, + int inputFileNum: int ref, + string inputFileName: string ref, + int inputFileId: @file ref +); + +smap_lines( + int outputFileId: @file ref, + string stratum: string ref, + int inputFileNum: int ref, + int inputStartLine: int ref, + int inputLineCount: int ref, + int outputStartLine: int ref, + int outputLineIncrement: int ref +); + +/* + * Locations and files + */ + +@location = @location_default ; + +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 +); + +hasLocation( + int locatableid: @locatable ref, + int id: @location ref +); + +@sourceline = @locatable ; + +#keyset[element_id] +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 +); + +@container = @folder | @file + +containerparent( + int parent: @container ref, + unique int child: @container ref +); + +/* + * Java + */ + +cupackage( + unique int id: @file ref, + int packageid: @package ref +); + +#keyset[fileid,keyName] +jarManifestMain( + int fileid: @file ref, + string keyName: string ref, + string value: string ref +); + +#keyset[fileid,entryName,keyName] +jarManifestEntries( + int fileid: @file ref, + string entryName: string ref, + string keyName: string ref, + string value: string ref +); + +packages( + unique int id: @package, + string nodeName: string ref +); + +primitives( + unique int id: @primitive, + string nodeName: string ref +); + +modifiers( + unique int id: @modifier, + string nodeName: string ref +); + +/** + * An errortype is used when the extractor is unable to extract a type + * correctly for some reason. + */ +error_type( + unique int id: @errortype +); + +classes_or_interfaces( + unique int id: @classorinterface, + string nodeName: string ref, + int parentid: @package ref, + int sourceid: @classorinterface ref +); + +file_class( + int id: @classorinterface ref +); + +class_object( + unique int id: @classorinterface ref, + unique int instance: @field ref +); + +type_companion_object( + unique int id: @classorinterface ref, + unique int instance: @field ref, + unique int companion_object: @classorinterface ref +); + +kt_nullable_types( + unique int id: @kt_nullable_type, + int classid: @reftype ref +) + +kt_notnull_types( + unique int id: @kt_notnull_type, + int classid: @reftype ref +) + +kt_type_alias( + unique int id: @kt_type_alias, + string name: string ref, + int kttypeid: @kt_type ref +) + +@kt_type = @kt_nullable_type | @kt_notnull_type + +isInterface( + unique int id: @classorinterface ref +); + +isRecord( + unique int id: @classorinterface ref +); + +fielddecls( + unique int id: @fielddecl, + int parentid: @reftype ref +); + +#keyset[fieldId] #keyset[fieldDeclId,pos] +fieldDeclaredIn( + int fieldId: @field ref, + int fieldDeclId: @fielddecl ref, + int pos: int ref +); + +fields( + unique int id: @field, + string nodeName: string ref, + int typeid: @type ref, + int parentid: @reftype ref, + int sourceid: @field ref +); + +fieldsKotlinType( + unique int id: @field ref, + int kttypeid: @kt_type ref +); + +constrs( + unique int id: @constructor, + string nodeName: string ref, + string signature: string ref, + int typeid: @type ref, + int parentid: @reftype ref, + int sourceid: @constructor ref +); + +constrsKotlinType( + unique int id: @constructor ref, + int kttypeid: @kt_type ref +); + +methods( + unique int id: @method, + string nodeName: string ref, + string signature: string ref, + int typeid: @type ref, + int parentid: @reftype ref, + int sourceid: @method ref +); + +methodsKotlinType( + unique int id: @method ref, + int kttypeid: @kt_type ref +); + +#keyset[parentid,pos] +params( + unique int id: @param, + int typeid: @type ref, + int pos: int ref, + int parentid: @callable ref, + int sourceid: @param ref +); + +paramsKotlinType( + unique int id: @param ref, + int kttypeid: @kt_type ref +); + +paramName( + unique int id: @param ref, + string nodeName: string ref +); + +isVarargsParam( + int param: @param ref +); + +exceptions( + unique int id: @exception, + int typeid: @type ref, + int parentid: @callable ref +); + +isAnnotType( + int interfaceid: @classorinterface ref +); + +isAnnotElem( + int methodid: @method ref +); + +annotValue( + int parentid: @annotation ref, + int id2: @method ref, + unique int value: @expr ref +); + +isEnumType( + int classid: @classorinterface ref +); + +isEnumConst( + int fieldid: @field ref +); + +#keyset[parentid,pos] +typeVars( + unique int id: @typevariable, + string nodeName: string ref, + int pos: int ref, + int kind: int ref, // deprecated + int parentid: @classorinterfaceorcallable ref +); + +wildcards( + unique int id: @wildcard, + string nodeName: string ref, + int kind: int ref +); + +#keyset[parentid,pos] +typeBounds( + unique int id: @typebound, + int typeid: @reftype ref, + int pos: int ref, + int parentid: @boundedtype ref +); + +#keyset[parentid,pos] +typeArgs( + int argumentid: @reftype ref, + int pos: int ref, + int parentid: @classorinterfaceorcallable ref +); + +isParameterized( + int memberid: @member ref +); + +isRaw( + int memberid: @member ref +); + +erasure( + unique int memberid: @member ref, + int erasureid: @member ref +); + +#keyset[classid] #keyset[parent] +isAnonymClass( + int classid: @classorinterface ref, + int parent: @classinstancexpr ref +); + +#keyset[typeid] #keyset[parent] +isLocalClassOrInterface( + int typeid: @classorinterface ref, + int parent: @localtypedeclstmt ref +); + +isDefConstr( + int constructorid: @constructor ref +); + +#keyset[exprId] +lambdaKind( + int exprId: @lambdaexpr ref, + int bodyKind: int ref +); + +arrays( + unique int id: @array, + string nodeName: string ref, + int elementtypeid: @type ref, + int dimension: int ref, + int componenttypeid: @type ref +); + +enclInReftype( + unique int child: @reftype ref, + int parent: @reftype ref +); + +extendsReftype( + int id1: @reftype ref, + int id2: @classorinterface ref +); + +implInterface( + int id1: @classorarray ref, + int id2: @classorinterface ref +); + +permits( + int id1: @classorinterface ref, + int id2: @classorinterface ref +); + +hasModifier( + int id1: @modifiable ref, + int id2: @modifier ref +); + +imports( + unique int id: @import, + int holder: @classorinterfaceorpackage ref, + string name: string ref, + int kind: int ref +); + +#keyset[parent,idx] +stmts( + unique int id: @stmt, + int kind: int ref, + int parent: @stmtparent ref, + int idx: int ref, + int bodydecl: @callable ref +); + +@stmtparent = @callable | @stmt | @switchexpr | @whenexpr| @stmtexpr; + +case @stmt.kind of + 0 = @block +| 1 = @ifstmt +| 2 = @forstmt +| 3 = @enhancedforstmt +| 4 = @whilestmt +| 5 = @dostmt +| 6 = @trystmt +| 7 = @switchstmt +| 8 = @synchronizedstmt +| 9 = @returnstmt +| 10 = @throwstmt +| 11 = @breakstmt +| 12 = @continuestmt +| 13 = @emptystmt +| 14 = @exprstmt +| 15 = @labeledstmt +| 16 = @assertstmt +| 17 = @localvariabledeclstmt +| 18 = @localtypedeclstmt +| 19 = @constructorinvocationstmt +| 20 = @superconstructorinvocationstmt +| 21 = @case +| 22 = @catchclause +| 23 = @yieldstmt +| 24 = @errorstmt +| 25 = @whenbranch +; + +#keyset[parent,idx] +exprs( + unique int id: @expr, + int kind: int ref, + int typeid: @type ref, + int parent: @exprparent ref, + int idx: int ref +); + +exprsKotlinType( + unique int id: @expr ref, + int kttypeid: @kt_type ref +); + +callableEnclosingExpr( + unique int id: @expr ref, + int callable_id: @callable ref +); + +statementEnclosingExpr( + unique int id: @expr ref, + int statement_id: @stmt ref +); + +isParenthesized( + unique int id: @expr ref, + int parentheses: int ref +); + +case @expr.kind of + 1 = @arrayaccess +| 2 = @arraycreationexpr +| 3 = @arrayinit +| 4 = @assignexpr +| 5 = @assignaddexpr +| 6 = @assignsubexpr +| 7 = @assignmulexpr +| 8 = @assigndivexpr +| 9 = @assignremexpr +| 10 = @assignandexpr +| 11 = @assignorexpr +| 12 = @assignxorexpr +| 13 = @assignlshiftexpr +| 14 = @assignrshiftexpr +| 15 = @assignurshiftexpr +| 16 = @booleanliteral +| 17 = @integerliteral +| 18 = @longliteral +| 19 = @floatingpointliteral +| 20 = @doubleliteral +| 21 = @characterliteral +| 22 = @stringliteral +| 23 = @nullliteral +| 24 = @mulexpr +| 25 = @divexpr +| 26 = @remexpr +| 27 = @addexpr +| 28 = @subexpr +| 29 = @lshiftexpr +| 30 = @rshiftexpr +| 31 = @urshiftexpr +| 32 = @andbitexpr +| 33 = @orbitexpr +| 34 = @xorbitexpr +| 35 = @andlogicalexpr +| 36 = @orlogicalexpr +| 37 = @ltexpr +| 38 = @gtexpr +| 39 = @leexpr +| 40 = @geexpr +| 41 = @eqexpr +| 42 = @neexpr +| 43 = @postincexpr +| 44 = @postdecexpr +| 45 = @preincexpr +| 46 = @predecexpr +| 47 = @minusexpr +| 48 = @plusexpr +| 49 = @bitnotexpr +| 50 = @lognotexpr +| 51 = @castexpr +| 52 = @newexpr +| 53 = @conditionalexpr +| 54 = @parexpr // deprecated +| 55 = @instanceofexpr +| 56 = @localvariabledeclexpr +| 57 = @typeliteral +| 58 = @thisaccess +| 59 = @superaccess +| 60 = @varaccess +| 61 = @methodaccess +| 62 = @unannotatedtypeaccess +| 63 = @arraytypeaccess +| 64 = @packageaccess +| 65 = @wildcardtypeaccess +| 66 = @declannotation +| 67 = @uniontypeaccess +| 68 = @lambdaexpr +| 69 = @memberref +| 70 = @annotatedtypeaccess +| 71 = @typeannotation +| 72 = @intersectiontypeaccess +| 73 = @switchexpr +| 74 = @errorexpr +| 75 = @whenexpr +| 76 = @getclassexpr +| 77 = @safecastexpr +| 78 = @implicitcastexpr +| 79 = @implicitnotnullexpr +| 80 = @implicitcoerciontounitexpr +| 81 = @notinstanceofexpr +| 82 = @stmtexpr +| 83 = @stringtemplateexpr +| 84 = @notnullexpr +| 85 = @unsafecoerceexpr +| 86 = @valueeqexpr +| 87 = @valueneexpr +| 88 = @propertyref +; + +/** Holds if this `when` expression was written as an `if` expression. */ +when_if(unique int id: @whenexpr ref); + +/** Holds if this `when` branch was written as an `else` branch. */ +when_branch_else(unique int id: @whenbranch ref); + +@classinstancexpr = @newexpr | @lambdaexpr | @memberref | @propertyref + +@annotation = @declannotation | @typeannotation +@typeaccess = @unannotatedtypeaccess | @annotatedtypeaccess + +@assignment = @assignexpr + | @assignop; + +@unaryassignment = @postincexpr + | @postdecexpr + | @preincexpr + | @predecexpr; + +@assignop = @assignaddexpr + | @assignsubexpr + | @assignmulexpr + | @assigndivexpr + | @assignremexpr + | @assignandexpr + | @assignorexpr + | @assignxorexpr + | @assignlshiftexpr + | @assignrshiftexpr + | @assignurshiftexpr; + +@literal = @booleanliteral + | @integerliteral + | @longliteral + | @floatingpointliteral + | @doubleliteral + | @characterliteral + | @stringliteral + | @nullliteral; + +@binaryexpr = @mulexpr + | @divexpr + | @remexpr + | @addexpr + | @subexpr + | @lshiftexpr + | @rshiftexpr + | @urshiftexpr + | @andbitexpr + | @orbitexpr + | @xorbitexpr + | @andlogicalexpr + | @orlogicalexpr + | @ltexpr + | @gtexpr + | @leexpr + | @geexpr + | @eqexpr + | @neexpr + | @valueeqexpr + | @valueneexpr; + +@unaryexpr = @postincexpr + | @postdecexpr + | @preincexpr + | @predecexpr + | @minusexpr + | @plusexpr + | @bitnotexpr + | @lognotexpr + | @notnullexpr; + +@caller = @classinstancexpr + | @methodaccess + | @constructorinvocationstmt + | @superconstructorinvocationstmt; + +callableBinding( + unique int callerid: @caller ref, + int callee: @callable ref +); + +memberRefBinding( + unique int id: @expr ref, + int callable: @callable ref +); + +propertyRefGetBinding( + unique int id: @expr ref, + int getter: @callable ref +); + +propertyRefFieldBinding( + unique int id: @expr ref, + int field: @field ref +); + +propertyRefSetBinding( + unique int id: @expr ref, + int setter: @callable ref +); + +@exprparent = @stmt | @expr | @whenbranch | @callable | @field | @fielddecl | @classorinterface | @param | @localvar | @typevariable; + +variableBinding( + unique int expr: @varaccess ref, + int variable: @variable ref +); + +@variable = @localscopevariable | @field; + +@localscopevariable = @localvar | @param; + +localvars( + unique int id: @localvar, + string nodeName: string ref, + int typeid: @type ref, + int parentid: @localvariabledeclexpr ref +); + +localvarsKotlinType( + unique int id: @localvar ref, + int kttypeid: @kt_type ref +); + +@namedexprorstmt = @breakstmt + | @continuestmt + | @labeledstmt + | @literal; + +namestrings( + string name: string ref, + string value: string ref, + unique int parent: @namedexprorstmt ref +); + +/* + * Modules + */ + +#keyset[name] +modules( + unique int id: @module, + string name: string ref +); + +isOpen( + int id: @module ref +); + +#keyset[fileId] +cumodule( + int fileId: @file ref, + int moduleId: @module ref +); + +@directive = @requires + | @exports + | @opens + | @uses + | @provides + +#keyset[directive] +directives( + int id: @module ref, + int directive: @directive ref +); + +requires( + unique int id: @requires, + int target: @module ref +); + +isTransitive( + int id: @requires ref +); + +isStatic( + int id: @requires ref +); + +exports( + unique int id: @exports, + int target: @package ref +); + +exportsTo( + int id: @exports ref, + int target: @module ref +); + +opens( + unique int id: @opens, + int target: @package ref +); + +opensTo( + int id: @opens ref, + int target: @module ref +); + +uses( + unique int id: @uses, + string serviceInterface: string ref +); + +provides( + unique int id: @provides, + string serviceInterface: string ref +); + +providesWith( + int id: @provides ref, + string serviceImpl: string ref +); + +/* + * Javadoc + */ + +javadoc( + unique int id: @javadoc +); + +isNormalComment( + int commentid : @javadoc ref +); + +isEolComment( + int commentid : @javadoc ref +); + +hasJavadoc( + int documentableid: @member ref, + int javadocid: @javadoc ref +); + +#keyset[parentid,idx] +javadocTag( + unique int id: @javadocTag, + string name: string ref, + int parentid: @javadocParent ref, + int idx: int ref +); + +#keyset[parentid,idx] +javadocText( + unique int id: @javadocText, + string text: string ref, + int parentid: @javadocParent ref, + int idx: int ref +); + +@javadocParent = @javadoc | @javadocTag; +@javadocElement = @javadocTag | @javadocText; + +@classorinterfaceorpackage = @classorinterface | @package; +@classorinterfaceorcallable = @classorinterface | @callable; +@boundedtype = @typevariable | @wildcard; +@reftype = @classorinterface | @array | @boundedtype | @errortype; +@classorarray = @classorinterface | @array; +@type = @primitive | @reftype; +@callable = @method | @constructor; + +/** A program element that has a name. */ +@element = @package | @modifier | @annotation | @errortype | + @locatableElement; + +@locatableElement = @file | @primitive | @classorinterface | @method | @constructor | @param | @exception | @field | + @boundedtype | @array | @localvar | @expr | @stmt | @import | @fielddecl | @kt_type | @kt_type_alias | + @kt_property; + +@modifiable = @member_modifiable| @param | @localvar | @typevariable; + +@member_modifiable = @classorinterface | @method | @constructor | @field | @kt_property; + +@member = @method | @constructor | @field | @reftype ; + +/** A program element that has a location. */ +@locatable = @typebound | @javadoc | @javadocTag | @javadocText | @xmllocatable | @ktcomment | + @locatableElement; + +@top = @element | @locatable | @folder; + +/* + * 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; + +/* + * configuration files with key value pairs + */ + +configs( + unique int id: @config +); + +configNames( + unique int id: @configName, + int config: @config ref, + string name: string ref +); + +configValues( + unique int id: @configValue, + int config: @config ref, + string value: string ref +); + +configLocations( + int locatable: @configLocatable ref, + int location: @location_default ref +); + +@configLocatable = @config | @configName | @configValue; + +ktComments( + unique int id: @ktcomment, + int kind: int ref, + string text : string ref +) + +ktCommentSections( + unique int id: @ktcommentsection, + int comment: @ktcomment ref, + string content : string ref +) + +ktCommentSectionNames( + unique int id: @ktcommentsection ref, + string name : string ref +) + +ktCommentSectionSubjectNames( + unique int id: @ktcommentsection ref, + string subjectname : string ref +) + +#keyset[id, owner] +ktCommentOwners( + int id: @ktcomment ref, + int owner: @top ref +) + +ktExtensionFunctions( + unique int id: @method ref, + int typeid: @type ref, + int kttypeid: @kt_type ref +) + +ktProperties( + unique int id: @kt_property, + string nodeName: string ref +) + +ktPropertyGetters( + unique int id: @kt_property ref, + int getter: @method ref +) + +ktPropertySetters( + unique int id: @kt_property ref, + int setter: @method ref +) + +ktPropertyBackingFields( + unique int id: @kt_property ref, + int backingField: @field ref +) + +ktSyntheticBody( + unique int id: @callable ref, + int kind: int ref + // 1: ENUM_VALUES + // 2: ENUM_VALUEOF +) + +ktLocalFunction( + unique int id: @method ref +) + +ktInitializerAssignment( + unique int id: @assignexpr ref +) + +ktPropertyDelegates( + unique int id: @kt_property ref, + unique int variableId: @variable ref +) + +/** + * If `id` is a compiler generated element, then the kind indicates the + * reason that the compiler generated it. + * See `Element.compilerGeneratedReason()` for an explanation of what + * each `kind` means. + */ +compiler_generated( + unique int id: @element ref, + int kind: int ref +) + +ktFunctionOriginalNames( + unique int id: @method ref, + string name: string ref +) + +ktDataClasses( + unique int id: @classorinterface ref +) diff --git a/java/downgrades/7cbc85b1f3ecda39661ad4806dedbd0973d2c4c0/semmlecode.dbscheme b/java/downgrades/7cbc85b1f3ecda39661ad4806dedbd0973d2c4c0/semmlecode.dbscheme new file mode 100644 index 000000000000..934bf10b4bd3 --- /dev/null +++ b/java/downgrades/7cbc85b1f3ecda39661ad4806dedbd0973d2c4c0/semmlecode.dbscheme @@ -0,0 +1,1242 @@ +/** + * An invocation of the compiler. Note that more than one file may be + * compiled per invocation. For example, this command compiles three + * source files: + * + * javac A.java B.java C.java + * + * The `id` simply identifies the invocation, while `cwd` is the working + * directory from which the compiler was invoked. + */ +compilations( + /** + * An invocation of the compiler. Note that more than one file may + * be compiled per invocation. For example, this command compiles + * three source files: + * + * javac A.java B.java C.java + */ + unique int id : @compilation, + int kind: int ref, + string cwd : string ref, + string name : string ref +); + +case @compilation.kind of + 1 = @javacompilation +| 2 = @kotlincompilation +; + +compilation_started( + int id : @compilation ref +) + +compilation_info( + int id : @compilation ref, + string info_key: string ref, + string info_value: string ref +) + +/** + * The arguments that were passed to the extractor for a compiler + * invocation. If `id` is for the compiler invocation + * + * javac A.java B.java C.java + * + * then typically there will be rows for + * + * num | arg + * --- | --- + * 0 | *path to extractor* + * 1 | `--javac-args` + * 2 | A.java + * 3 | B.java + * 4 | C.java + */ +#keyset[id, num] +compilation_args( + int id : @compilation ref, + int num : int ref, + string arg : string ref +); + +/** + * The source files that are compiled by a compiler invocation. + * If `id` is for the compiler invocation + * + * javac A.java B.java C.java + * + * then there will be rows for + * + * num | arg + * --- | --- + * 0 | A.java + * 1 | B.java + * 2 | C.java + */ +#keyset[id, num] +compilation_compiling_files( + int id : @compilation ref, + int num : int ref, + int file : @file ref +); + +/** + * For each file recorded in `compilation_compiling_files`, + * there will be a corresponding row in + * `compilation_compiling_files_completed` once extraction + * of that file is complete. The `result` will indicate the + * extraction result: + * + * 0: Successfully extracted + * 1: Errors were encountered, but extraction recovered + * 2: Errors were encountered, and extraction could not recover + */ +#keyset[id, num] +compilation_compiling_files_completed( + int id : @compilation ref, + int num : int ref, + int result : int ref +); + +/** + * The time taken by the extractor for a compiler invocation. + * + * For each file `num`, there will be rows for + * + * kind | seconds + * ---- | --- + * 1 | CPU seconds used by the extractor frontend + * 2 | Elapsed seconds during the extractor frontend + * 3 | CPU seconds used by the extractor backend + * 4 | Elapsed seconds during the extractor backend + */ +#keyset[id, num, kind] +compilation_time( + int id : @compilation ref, + int num : int ref, + /* kind: + 1 = frontend_cpu_seconds + 2 = frontend_elapsed_seconds + 3 = extractor_cpu_seconds + 4 = extractor_elapsed_seconds + */ + int kind : int ref, + float seconds : float ref +); + +/** + * An error or warning generated by the extractor. + * The diagnostic message `diagnostic` was generated during compiler + * invocation `compilation`, and is the `file_number_diagnostic_number`th + * message generated while extracting the `file_number`th file of that + * invocation. + */ +#keyset[compilation, file_number, file_number_diagnostic_number] +diagnostic_for( + unique int diagnostic : @diagnostic ref, + int compilation : @compilation ref, + int file_number : int ref, + int file_number_diagnostic_number : int ref +); + +/** + * The `cpu_seconds` and `elapsed_seconds` are the CPU time and elapsed + * time (respectively) that the original compilation (not the extraction) + * took for compiler invocation `id`. + */ +compilation_compiler_times( + unique int id : @compilation ref, + float cpu_seconds : float ref, + float elapsed_seconds : float ref +); + +/** + * If extraction was successful, then `cpu_seconds` and + * `elapsed_seconds` are the CPU time and elapsed time (respectively) + * that extraction took for compiler invocation `id`. + * The `result` will indicate the extraction result: + * + * 0: Successfully extracted + * 1: Errors were encountered, but extraction recovered + * 2: Errors were encountered, and extraction could not recover + */ +compilation_finished( + unique int id : @compilation ref, + float cpu_seconds : float ref, + float elapsed_seconds : float ref, + int result : int ref +); + +diagnostics( + unique int id: @diagnostic, + string generated_by: string ref, // TODO: Sync this with the other languages? + int severity: int ref, + string error_tag: string ref, + string error_message: string ref, + string full_error_message: string ref, + int location: @location_default ref +); + +/* + * External artifacts + */ + +externalData( + int id : @externalDataElement, + string path : string ref, + int column: int ref, + string value : string ref +); + +snapshotDate( + unique date snapshotDate : date ref +); + +sourceLocationPrefix( + string prefix : string ref +); + +/* + * Duplicate code + */ + +duplicateCode( + unique int id : @duplication, + string relativePath : string ref, + int equivClass : int ref +); + +similarCode( + unique int id : @similarity, + string 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 +); + +/* + * SMAP + */ + +smap_header( + int outputFileId: @file ref, + string outputFilename: string ref, + string defaultStratum: string ref +); + +smap_files( + int outputFileId: @file ref, + string stratum: string ref, + int inputFileNum: int ref, + string inputFileName: string ref, + int inputFileId: @file ref +); + +smap_lines( + int outputFileId: @file ref, + string stratum: string ref, + int inputFileNum: int ref, + int inputStartLine: int ref, + int inputLineCount: int ref, + int outputStartLine: int ref, + int outputLineIncrement: int ref +); + +/* + * Locations and files + */ + +@location = @location_default ; + +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 +); + +hasLocation( + int locatableid: @locatable ref, + int id: @location ref +); + +@sourceline = @locatable ; + +#keyset[element_id] +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 +); + +@container = @folder | @file + +containerparent( + int parent: @container ref, + unique int child: @container ref +); + +/* + * Java + */ + +cupackage( + unique int id: @file ref, + int packageid: @package ref +); + +#keyset[fileid,keyName] +jarManifestMain( + int fileid: @file ref, + string keyName: string ref, + string value: string ref +); + +#keyset[fileid,entryName,keyName] +jarManifestEntries( + int fileid: @file ref, + string entryName: string ref, + string keyName: string ref, + string value: string ref +); + +packages( + unique int id: @package, + string nodeName: string ref +); + +primitives( + unique int id: @primitive, + string nodeName: string ref +); + +modifiers( + unique int id: @modifier, + string nodeName: string ref +); + +/** + * An errortype is used when the extractor is unable to extract a type + * correctly for some reason. + */ +error_type( + unique int id: @errortype +); + +classes_or_interfaces( + unique int id: @classorinterface, + string nodeName: string ref, + int parentid: @package ref, + int sourceid: @classorinterface ref +); + +file_class( + int id: @classorinterface ref +); + +class_object( + unique int id: @classorinterface ref, + unique int instance: @field ref +); + +type_companion_object( + unique int id: @classorinterface ref, + unique int instance: @field ref, + unique int companion_object: @classorinterface ref +); + +kt_nullable_types( + unique int id: @kt_nullable_type, + int classid: @reftype ref +) + +kt_notnull_types( + unique int id: @kt_notnull_type, + int classid: @reftype ref +) + +kt_type_alias( + unique int id: @kt_type_alias, + string name: string ref, + int kttypeid: @kt_type ref +) + +@kt_type = @kt_nullable_type | @kt_notnull_type + +isInterface( + unique int id: @classorinterface ref +); + +isRecord( + unique int id: @classorinterface ref +); + +fielddecls( + unique int id: @fielddecl, + int parentid: @reftype ref +); + +#keyset[fieldId] #keyset[fieldDeclId,pos] +fieldDeclaredIn( + int fieldId: @field ref, + int fieldDeclId: @fielddecl ref, + int pos: int ref +); + +fields( + unique int id: @field, + string nodeName: string ref, + int typeid: @type ref, + int parentid: @reftype ref, + int sourceid: @field ref +); + +fieldsKotlinType( + unique int id: @field ref, + int kttypeid: @kt_type ref +); + +constrs( + unique int id: @constructor, + string nodeName: string ref, + string signature: string ref, + int typeid: @type ref, + int parentid: @reftype ref, + int sourceid: @constructor ref +); + +constrsKotlinType( + unique int id: @constructor ref, + int kttypeid: @kt_type ref +); + +methods( + unique int id: @method, + string nodeName: string ref, + string signature: string ref, + int typeid: @type ref, + int parentid: @reftype ref, + int sourceid: @method ref +); + +methodsKotlinType( + unique int id: @method ref, + int kttypeid: @kt_type ref +); + +#keyset[parentid,pos] +params( + unique int id: @param, + int typeid: @type ref, + int pos: int ref, + int parentid: @callable ref, + int sourceid: @param ref +); + +paramsKotlinType( + unique int id: @param ref, + int kttypeid: @kt_type ref +); + +paramName( + unique int id: @param ref, + string nodeName: string ref +); + +isVarargsParam( + int param: @param ref +); + +exceptions( + unique int id: @exception, + int typeid: @type ref, + int parentid: @callable ref +); + +isAnnotType( + int interfaceid: @classorinterface ref +); + +isAnnotElem( + int methodid: @method ref +); + +annotValue( + int parentid: @annotation ref, + int id2: @method ref, + unique int value: @expr ref +); + +isEnumType( + int classid: @classorinterface ref +); + +isEnumConst( + int fieldid: @field ref +); + +#keyset[parentid,pos] +typeVars( + unique int id: @typevariable, + string nodeName: string ref, + int pos: int ref, + int kind: int ref, // deprecated + int parentid: @classorinterfaceorcallable ref +); + +wildcards( + unique int id: @wildcard, + string nodeName: string ref, + int kind: int ref +); + +#keyset[parentid,pos] +typeBounds( + unique int id: @typebound, + int typeid: @reftype ref, + int pos: int ref, + int parentid: @boundedtype ref +); + +#keyset[parentid,pos] +typeArgs( + int argumentid: @reftype ref, + int pos: int ref, + int parentid: @classorinterfaceorcallable ref +); + +isParameterized( + int memberid: @member ref +); + +isRaw( + int memberid: @member ref +); + +erasure( + unique int memberid: @member ref, + int erasureid: @member ref +); + +#keyset[classid] #keyset[parent] +isAnonymClass( + int classid: @classorinterface ref, + int parent: @classinstancexpr ref +); + +#keyset[typeid] #keyset[parent] +isLocalClassOrInterface( + int typeid: @classorinterface ref, + int parent: @localtypedeclstmt ref +); + +isDefConstr( + int constructorid: @constructor ref +); + +#keyset[exprId] +lambdaKind( + int exprId: @lambdaexpr ref, + int bodyKind: int ref +); + +arrays( + unique int id: @array, + string nodeName: string ref, + int elementtypeid: @type ref, + int dimension: int ref, + int componenttypeid: @type ref +); + +enclInReftype( + unique int child: @reftype ref, + int parent: @reftype ref +); + +extendsReftype( + int id1: @reftype ref, + int id2: @classorinterface ref +); + +implInterface( + int id1: @classorarray ref, + int id2: @classorinterface ref +); + +permits( + int id1: @classorinterface ref, + int id2: @classorinterface ref +); + +hasModifier( + int id1: @modifiable ref, + int id2: @modifier ref +); + +imports( + unique int id: @import, + int holder: @classorinterfaceorpackage ref, + string name: string ref, + int kind: int ref +); + +#keyset[parent,idx] +stmts( + unique int id: @stmt, + int kind: int ref, + int parent: @stmtparent ref, + int idx: int ref, + int bodydecl: @callable ref +); + +@stmtparent = @callable | @stmt | @switchexpr | @whenexpr| @stmtexpr; + +case @stmt.kind of + 0 = @block +| 1 = @ifstmt +| 2 = @forstmt +| 3 = @enhancedforstmt +| 4 = @whilestmt +| 5 = @dostmt +| 6 = @trystmt +| 7 = @switchstmt +| 8 = @synchronizedstmt +| 9 = @returnstmt +| 10 = @throwstmt +| 11 = @breakstmt +| 12 = @continuestmt +| 13 = @emptystmt +| 14 = @exprstmt +| 15 = @labeledstmt +| 16 = @assertstmt +| 17 = @localvariabledeclstmt +| 18 = @localtypedeclstmt +| 19 = @constructorinvocationstmt +| 20 = @superconstructorinvocationstmt +| 21 = @case +| 22 = @catchclause +| 23 = @yieldstmt +| 24 = @errorstmt +| 25 = @whenbranch +; + +#keyset[parent,idx] +exprs( + unique int id: @expr, + int kind: int ref, + int typeid: @type ref, + int parent: @exprparent ref, + int idx: int ref +); + +exprsKotlinType( + unique int id: @expr ref, + int kttypeid: @kt_type ref +); + +callableEnclosingExpr( + unique int id: @expr ref, + int callable_id: @callable ref +); + +statementEnclosingExpr( + unique int id: @expr ref, + int statement_id: @stmt ref +); + +isParenthesized( + unique int id: @expr ref, + int parentheses: int ref +); + +case @expr.kind of + 1 = @arrayaccess +| 2 = @arraycreationexpr +| 3 = @arrayinit +| 4 = @assignexpr +| 5 = @assignaddexpr +| 6 = @assignsubexpr +| 7 = @assignmulexpr +| 8 = @assigndivexpr +| 9 = @assignremexpr +| 10 = @assignandexpr +| 11 = @assignorexpr +| 12 = @assignxorexpr +| 13 = @assignlshiftexpr +| 14 = @assignrshiftexpr +| 15 = @assignurshiftexpr +| 16 = @booleanliteral +| 17 = @integerliteral +| 18 = @longliteral +| 19 = @floatingpointliteral +| 20 = @doubleliteral +| 21 = @characterliteral +| 22 = @stringliteral +| 23 = @nullliteral +| 24 = @mulexpr +| 25 = @divexpr +| 26 = @remexpr +| 27 = @addexpr +| 28 = @subexpr +| 29 = @lshiftexpr +| 30 = @rshiftexpr +| 31 = @urshiftexpr +| 32 = @andbitexpr +| 33 = @orbitexpr +| 34 = @xorbitexpr +| 35 = @andlogicalexpr +| 36 = @orlogicalexpr +| 37 = @ltexpr +| 38 = @gtexpr +| 39 = @leexpr +| 40 = @geexpr +| 41 = @eqexpr +| 42 = @neexpr +| 43 = @postincexpr +| 44 = @postdecexpr +| 45 = @preincexpr +| 46 = @predecexpr +| 47 = @minusexpr +| 48 = @plusexpr +| 49 = @bitnotexpr +| 50 = @lognotexpr +| 51 = @castexpr +| 52 = @newexpr +| 53 = @conditionalexpr +| 54 = @parexpr // deprecated +| 55 = @instanceofexpr +| 56 = @localvariabledeclexpr +| 57 = @typeliteral +| 58 = @thisaccess +| 59 = @superaccess +| 60 = @varaccess +| 61 = @methodaccess +| 62 = @unannotatedtypeaccess +| 63 = @arraytypeaccess +| 64 = @packageaccess +| 65 = @wildcardtypeaccess +| 66 = @declannotation +| 67 = @uniontypeaccess +| 68 = @lambdaexpr +| 69 = @memberref +| 70 = @annotatedtypeaccess +| 71 = @typeannotation +| 72 = @intersectiontypeaccess +| 73 = @switchexpr +| 74 = @errorexpr +| 75 = @whenexpr +| 76 = @getclassexpr +| 77 = @safecastexpr +| 78 = @implicitcastexpr +| 79 = @implicitnotnullexpr +| 80 = @implicitcoerciontounitexpr +| 81 = @notinstanceofexpr +| 82 = @stmtexpr +| 83 = @stringtemplateexpr +| 84 = @notnullexpr +| 85 = @unsafecoerceexpr +| 86 = @valueeqexpr +| 87 = @valueneexpr +| 88 = @propertyref +; + +/** Holds if this `when` expression was written as an `if` expression. */ +when_if(unique int id: @whenexpr ref); + +/** Holds if this `when` branch was written as an `else` branch. */ +when_branch_else(unique int id: @whenbranch ref); + +@classinstancexpr = @newexpr | @lambdaexpr | @memberref | @propertyref + +@annotation = @declannotation | @typeannotation +@typeaccess = @unannotatedtypeaccess | @annotatedtypeaccess + +@assignment = @assignexpr + | @assignop; + +@unaryassignment = @postincexpr + | @postdecexpr + | @preincexpr + | @predecexpr; + +@assignop = @assignaddexpr + | @assignsubexpr + | @assignmulexpr + | @assigndivexpr + | @assignremexpr + | @assignandexpr + | @assignorexpr + | @assignxorexpr + | @assignlshiftexpr + | @assignrshiftexpr + | @assignurshiftexpr; + +@literal = @booleanliteral + | @integerliteral + | @longliteral + | @floatingpointliteral + | @doubleliteral + | @characterliteral + | @stringliteral + | @nullliteral; + +@binaryexpr = @mulexpr + | @divexpr + | @remexpr + | @addexpr + | @subexpr + | @lshiftexpr + | @rshiftexpr + | @urshiftexpr + | @andbitexpr + | @orbitexpr + | @xorbitexpr + | @andlogicalexpr + | @orlogicalexpr + | @ltexpr + | @gtexpr + | @leexpr + | @geexpr + | @eqexpr + | @neexpr + | @valueeqexpr + | @valueneexpr; + +@unaryexpr = @postincexpr + | @postdecexpr + | @preincexpr + | @predecexpr + | @minusexpr + | @plusexpr + | @bitnotexpr + | @lognotexpr + | @notnullexpr; + +@caller = @classinstancexpr + | @methodaccess + | @constructorinvocationstmt + | @superconstructorinvocationstmt; + +callableBinding( + unique int callerid: @caller ref, + int callee: @callable ref +); + +memberRefBinding( + unique int id: @expr ref, + int callable: @callable ref +); + +propertyRefGetBinding( + unique int id: @expr ref, + int getter: @callable ref +); + +propertyRefFieldBinding( + unique int id: @expr ref, + int field: @field ref +); + +propertyRefSetBinding( + unique int id: @expr ref, + int setter: @callable ref +); + +@exprparent = @stmt | @expr | @whenbranch | @callable | @field | @fielddecl | @classorinterface | @param | @localvar | @typevariable; + +variableBinding( + unique int expr: @varaccess ref, + int variable: @variable ref +); + +@variable = @localscopevariable | @field; + +@localscopevariable = @localvar | @param; + +localvars( + unique int id: @localvar, + string nodeName: string ref, + int typeid: @type ref, + int parentid: @localvariabledeclexpr ref +); + +localvarsKotlinType( + unique int id: @localvar ref, + int kttypeid: @kt_type ref +); + +@namedexprorstmt = @breakstmt + | @continuestmt + | @labeledstmt + | @literal; + +namestrings( + string name: string ref, + string value: string ref, + unique int parent: @namedexprorstmt ref +); + +/* + * Modules + */ + +#keyset[name] +modules( + unique int id: @module, + string name: string ref +); + +isOpen( + int id: @module ref +); + +#keyset[fileId] +cumodule( + int fileId: @file ref, + int moduleId: @module ref +); + +@directive = @requires + | @exports + | @opens + | @uses + | @provides + +#keyset[directive] +directives( + int id: @module ref, + int directive: @directive ref +); + +requires( + unique int id: @requires, + int target: @module ref +); + +isTransitive( + int id: @requires ref +); + +isStatic( + int id: @requires ref +); + +exports( + unique int id: @exports, + int target: @package ref +); + +exportsTo( + int id: @exports ref, + int target: @module ref +); + +opens( + unique int id: @opens, + int target: @package ref +); + +opensTo( + int id: @opens ref, + int target: @module ref +); + +uses( + unique int id: @uses, + string serviceInterface: string ref +); + +provides( + unique int id: @provides, + string serviceInterface: string ref +); + +providesWith( + int id: @provides ref, + string serviceImpl: string ref +); + +/* + * Javadoc + */ + +javadoc( + unique int id: @javadoc +); + +isNormalComment( + int commentid : @javadoc ref +); + +isEolComment( + int commentid : @javadoc ref +); + +hasJavadoc( + int documentableid: @member ref, + int javadocid: @javadoc ref +); + +#keyset[parentid,idx] +javadocTag( + unique int id: @javadocTag, + string name: string ref, + int parentid: @javadocParent ref, + int idx: int ref +); + +#keyset[parentid,idx] +javadocText( + unique int id: @javadocText, + string text: string ref, + int parentid: @javadocParent ref, + int idx: int ref +); + +@javadocParent = @javadoc | @javadocTag; +@javadocElement = @javadocTag | @javadocText; + +@classorinterfaceorpackage = @classorinterface | @package; +@classorinterfaceorcallable = @classorinterface | @callable; +@boundedtype = @typevariable | @wildcard; +@reftype = @classorinterface | @array | @boundedtype | @errortype; +@classorarray = @classorinterface | @array; +@type = @primitive | @reftype; +@callable = @method | @constructor; + +/** A program element that has a name. */ +@element = @package | @modifier | @annotation | @errortype | + @locatableElement; + +@locatableElement = @file | @primitive | @classorinterface | @method | @constructor | @param | @exception | @field | + @boundedtype | @array | @localvar | @expr | @stmt | @import | @fielddecl | @kt_type | @kt_type_alias | + @kt_property; + +@modifiable = @member_modifiable| @param | @localvar | @typevariable; + +@member_modifiable = @classorinterface | @method | @constructor | @field | @kt_property; + +@member = @method | @constructor | @field | @reftype ; + +/** A program element that has a location. */ +@locatable = @typebound | @javadoc | @javadocTag | @javadocText | @xmllocatable | @ktcomment | + @locatableElement; + +@top = @element | @locatable | @folder; + +/* + * 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; + +/* + * configuration files with key value pairs + */ + +configs( + unique int id: @config +); + +configNames( + unique int id: @configName, + int config: @config ref, + string name: string ref +); + +configValues( + unique int id: @configValue, + int config: @config ref, + string value: string ref +); + +configLocations( + int locatable: @configLocatable ref, + int location: @location_default ref +); + +@configLocatable = @config | @configName | @configValue; + +ktComments( + unique int id: @ktcomment, + int kind: int ref, + string text : string ref +) + +ktCommentSections( + unique int id: @ktcommentsection, + int comment: @ktcomment ref, + string content : string ref +) + +ktCommentSectionNames( + unique int id: @ktcommentsection ref, + string name : string ref +) + +ktCommentSectionSubjectNames( + unique int id: @ktcommentsection ref, + string subjectname : string ref +) + +#keyset[id, owner] +ktCommentOwners( + int id: @ktcomment ref, + int owner: @top ref +) + +ktExtensionFunctions( + unique int id: @method ref, + int typeid: @type ref, + int kttypeid: @kt_type ref +) + +ktProperties( + unique int id: @kt_property, + string nodeName: string ref +) + +ktPropertyGetters( + unique int id: @kt_property ref, + int getter: @method ref +) + +ktPropertySetters( + unique int id: @kt_property ref, + int setter: @method ref +) + +ktPropertyBackingFields( + unique int id: @kt_property ref, + int backingField: @field ref +) + +ktSyntheticBody( + unique int id: @callable ref, + int kind: int ref + // 1: ENUM_VALUES + // 2: ENUM_VALUEOF +) + +ktLocalFunction( + unique int id: @method ref +) + +ktInitializerAssignment( + unique int id: @assignexpr ref +) + +ktPropertyDelegates( + unique int id: @kt_property ref, + unique int variableId: @variable ref +) + +/** + * If `id` is a compiler generated element, then the kind indicates the + * reason that the compiler generated it. + * See `Element.compilerGeneratedReason()` for an explanation of what + * each `kind` means. + */ +compiler_generated( + unique int id: @element ref, + int kind: int ref +) + +ktFunctionOriginalNames( + unique int id: @method ref, + string name: string ref +) + +ktDataClasses( + unique int id: @classorinterface ref +) diff --git a/java/downgrades/7cbc85b1f3ecda39661ad4806dedbd0973d2c4c0/upgrade.properties b/java/downgrades/7cbc85b1f3ecda39661ad4806dedbd0973d2c4c0/upgrade.properties new file mode 100644 index 000000000000..0e9d417b1ee8 --- /dev/null +++ b/java/downgrades/7cbc85b1f3ecda39661ad4806dedbd0973d2c4c0/upgrade.properties @@ -0,0 +1,3 @@ +description: Remove compilation_expanded_args +compatibility: full +compilation_expanded_args.rel: delete diff --git a/java/ql/lib/change-notes/2023-03-22-expanded-args.md b/java/ql/lib/change-notes/2023-03-22-expanded-args.md new file mode 100644 index 000000000000..9d5fe32e6b80 --- /dev/null +++ b/java/ql/lib/change-notes/2023-03-22-expanded-args.md @@ -0,0 +1,4 @@ +--- +category: feature +--- +* Predicates `Compilation.getExpandedArgument` and `Compilation.getAnExpandedArgument` has been added. diff --git a/java/ql/lib/change-notes/2023-03-31-compilation-names.md b/java/ql/lib/change-notes/2023-03-31-compilation-names.md new file mode 100644 index 000000000000..c581a5851994 --- /dev/null +++ b/java/ql/lib/change-notes/2023-03-31-compilation-names.md @@ -0,0 +1,4 @@ +--- +category: minorAnalysis +--- +* The filenames embedded in `Compilation.toString()` now use `/` as the path separator on all platforms. diff --git a/java/ql/lib/config/semmlecode.dbscheme b/java/ql/lib/config/semmlecode.dbscheme index 934bf10b4bd3..7cbc85b1f3ec 100644 --- a/java/ql/lib/config/semmlecode.dbscheme +++ b/java/ql/lib/config/semmlecode.dbscheme @@ -60,6 +60,19 @@ compilation_args( string arg : string ref ); +/** + * The expanded arguments that were passed to the extractor for a + * compiler invocation. This is similar to `compilation_args`, but + * for a `@@@someFile` argument, it includes the arguments from that + * file, rather than just taking the argument literally. + */ +#keyset[id, num] +compilation_expanded_args( + int id : @compilation ref, + int num : int ref, + string arg : string ref +); + /** * The source files that are compiled by a compiler invocation. * If `id` is for the compiler invocation diff --git a/java/ql/lib/config/semmlecode.dbscheme.stats b/java/ql/lib/config/semmlecode.dbscheme.stats index 05a477fec739..f069e1773d81 100644 --- a/java/ql/lib/config/semmlecode.dbscheme.stats +++ b/java/ql/lib/config/semmlecode.dbscheme.stats @@ -2,7 +2,7 @@ @javacompilation - 8628 + 1138 @kotlincompilation @@ -10,7 +10,7 @@ @diagnostic - 64190 + 57106 @externalDataElement @@ -30,11 +30,11 @@ @folder - 293711 + 211876 @package - 121135 + 96053 @primitive @@ -56,6 +56,10 @@ @kt_nullable_type 262 + + @location_default + 82315299 + @kt_notnull_type 156265 @@ -68,10 +72,6 @@ @fielddecl 210035 - - @location_default - 82315299 - @field 2886451 @@ -110,7 +110,7 @@ @import - 441072 + 356137 @block @@ -118,7 +118,7 @@ @ifstmt - 188285 + 188282 @forstmt @@ -126,7 +126,7 @@ @enhancedforstmt - 23697 + 21607 @whilestmt @@ -150,7 +150,7 @@ @returnstmt - 345813 + 345793 @throwstmt @@ -174,7 +174,7 @@ @assertstmt - 15159 + 15158 @localvariabledeclstmt @@ -182,7 +182,7 @@ @localtypedeclstmt - 3533 + 3532 @constructorinvocationstmt @@ -194,7 +194,7 @@ @case - 107945 + 107927 @catchclause @@ -214,11 +214,11 @@ @whenbranch - 207293 + 207292 @arrayaccess - 409681 + 409677 @arraycreationexpr @@ -250,7 +250,7 @@ @assignandexpr - 3971 + 3970 @assignorexpr @@ -258,19 +258,19 @@ @booleanliteral - 589912 + 524468 @integerliteral - 1151458 + 1151446 @longliteral - 185904 + 185873 @floatingpointliteral - 2824996 + 2824967 @doubleliteral @@ -282,7 +282,7 @@ @stringliteral - 1262818 + 1262851 @nullliteral @@ -318,7 +318,7 @@ @urshiftexpr - 9644 + 9643 @andbitexpr @@ -358,7 +358,7 @@ @eqexpr - 104275 + 104273 @neexpr @@ -366,7 +366,7 @@ @postincexpr - 41859 + 41857 @postdecexpr @@ -382,7 +382,7 @@ @minusexpr - 744386 + 744379 @plusexpr @@ -394,11 +394,11 @@ @lognotexpr - 40111 + 40110 @castexpr - 93187 + 93185 @newexpr @@ -426,7 +426,7 @@ @superaccess - 53024 + 53021 @varaccess @@ -434,7 +434,7 @@ @methodaccess - 1512385 + 1512380 @unannotatedtypeaccess @@ -446,7 +446,7 @@ @wildcardtypeaccess - 74889 + 78834 @declannotation @@ -510,7 +510,7 @@ @errorexpr - 1 + 4 @whenexpr @@ -526,7 +526,7 @@ @implicitcastexpr - 28818 + 28817 @implicitnotnullexpr @@ -542,7 +542,7 @@ @stmtexpr - 50553 + 50550 @stringtemplateexpr @@ -566,7 +566,7 @@ @propertyref - 8440 + 8439 @localvar @@ -574,7 +574,7 @@ @module - 7965 + 6092 @requires @@ -582,19 +582,19 @@ @exports - 35013 + 26163 @opens - 165 + 716 @uses - 10786 + 7884 @provides - 2323 + 1792 @javadoc @@ -646,11 +646,11 @@ @ktcomment - 74439 + 116780 @ktcommentsection - 47690 + 74919 @kt_property @@ -660,23 +660,23 @@ compilations - 8628 + 2356 id - 8628 + 2356 kind - 165 + 94 cwd - 165 + 94 name - 8628 + 2356 @@ -690,7 +690,7 @@ 1 2 - 8628 + 2356 @@ -706,7 +706,7 @@ 1 2 - 8628 + 2356 @@ -722,7 +722,7 @@ 1 2 - 8628 + 2356 @@ -736,9 +736,9 @@ 12 - 52 - 53 - 165 + 25 + 26 + 94 @@ -754,7 +754,7 @@ 1 2 - 165 + 94 @@ -768,9 +768,9 @@ 12 - 52 - 53 - 165 + 25 + 26 + 94 @@ -784,9 +784,9 @@ 12 - 52 - 53 - 165 + 25 + 26 + 94 @@ -802,7 +802,7 @@ 1 2 - 165 + 94 @@ -816,9 +816,9 @@ 12 - 52 - 53 - 165 + 25 + 26 + 94 @@ -834,7 +834,7 @@ 1 2 - 8628 + 2356 @@ -850,7 +850,7 @@ 1 2 - 8628 + 2356 @@ -866,7 +866,7 @@ 1 2 - 8628 + 2356 @@ -1248,20 +1248,20 @@ - compilation_compiling_files - 62421 + compilation_expanded_args + 69428 id - 731 + 1138 num - 9199 + 45527 - file - 62421 + arg + 54632 @@ -1273,69 +1273,14 @@ 12 - 1 - 2 - 59 - - - 2 - 6 - 59 - - - 6 - 10 - 59 - - - 10 - 14 - 59 - - - 14 - 20 - 59 - - - 20 - 27 - 67 - - - 27 - 35 - 59 - - - 36 - 47 - 59 - - - 51 - 70 - 59 - - - 72 - 123 - 59 - - - 124 - 176 - 59 - - - 208 - 1130 - 59 + 42 + 43 + 569 - 1233 - 1234 - 7 + 80 + 81 + 569 @@ -1343,75 +1288,20 @@ id - file + arg 12 - 1 - 2 - 59 - - - 2 - 6 - 59 - - - 6 - 10 - 59 - - - 10 - 14 - 59 - - - 14 - 20 - 59 - - - 20 - 27 - 67 - - - 27 - 35 - 59 - - - 36 - 47 - 59 - - - 51 - 70 - 59 - - - 72 - 123 - 59 - - - 124 - 176 - 59 - - - 208 - 1130 - 59 + 40 + 41 + 569 - 1233 - 1234 - 7 + 78 + 79 + 569 @@ -1427,42 +1317,12 @@ 1 2 - 775 + 21625 2 3 - 4342 - - - 3 - 5 - 790 - - - 5 - 6 - 880 - - - 6 - 8 - 686 - - - 8 - 16 - 768 - - - 16 - 42 - 701 - - - 42 - 99 - 253 + 23901 @@ -1470,7 +1330,7 @@ num - file + arg 12 @@ -1478,49 +1338,19 @@ 1 2 - 775 + 35283 2 3 - 4342 - - - 3 - 5 - 790 - - - 5 - 6 - 880 - - - 6 - 8 - 686 - - - 8 - 16 - 768 - - - 16 - 42 - 701 - - - 42 - 99 - 253 + 10243 - file + arg id @@ -1529,14 +1359,19 @@ 1 2 - 62421 + 42112 + + + 2 + 3 + 12519 - file + arg num @@ -1545,7 +1380,12 @@ 1 2 - 62421 + 53494 + + + 2 + 3 + 1138 @@ -1554,20 +1394,20 @@ - compilation_compiling_files_completed - 62421 + compilation_compiling_files + 60809 id - 731 + 757 num - 9199 + 9485 - result - 7 + file + 60809 @@ -1581,67 +1421,62 @@ 1 2 - 59 + 104 2 - 6 - 59 + 4 + 56 - 6 - 10 - 59 + 4 + 7 + 60 - 10 - 14 - 59 + 7 + 11 + 69 - 14 - 20 - 59 + 11 + 15 + 56 - 20 - 27 - 67 + 15 + 22 + 60 - 27 - 35 - 59 + 22 + 31 + 65 - 36 + 32 47 - 59 + 65 51 - 70 - 59 + 88 + 69 - 72 - 123 - 59 + 93 + 151 + 60 - 124 - 176 - 59 + 163 + 367 + 60 - 208 - 1130 - 59 - - - 1233 - 1234 - 7 + 441 + 2179 + 26 @@ -1649,7 +1484,7 @@ id - result + file 12 @@ -1657,7 +1492,62 @@ 1 2 - 731 + 104 + + + 2 + 4 + 56 + + + 4 + 7 + 60 + + + 7 + 11 + 69 + + + 11 + 15 + 56 + + + 15 + 22 + 60 + + + 22 + 31 + 65 + + + 32 + 47 + 65 + + + 51 + 88 + 69 + + + 93 + 151 + 60 + + + 163 + 367 + 60 + + + 441 + 2179 + 26 @@ -1673,42 +1563,37 @@ 1 2 - 775 + 4080 2 3 - 4342 + 452 3 - 5 - 790 - - - 5 - 6 - 880 + 4 + 2552 - 6 - 8 - 686 + 4 + 7 + 805 - 8 - 16 - 768 + 7 + 17 + 827 - 16 - 42 - 701 + 17 + 104 + 714 - 42 - 99 - 253 + 105 + 175 + 52 @@ -1716,7 +1601,7 @@ num - result + file 12 @@ -1724,39 +1609,69 @@ 1 2 - 9199 + 4080 + + + 2 + 3 + 452 + + + 3 + 4 + 2552 + + + 4 + 7 + 805 + + + 7 + 17 + 827 + + + 17 + 104 + 714 + + + 105 + 175 + 52 - result + file id 12 - 98 - 99 - 7 + 1 + 2 + 60809 - result + file num 12 - 1233 - 1234 - 7 + 1 + 2 + 60809 @@ -1765,24 +1680,20 @@ - compilation_time - 252612 + compilation_compiling_files_completed + 60809 id - 731 + 757 num - 9207 + 9485 - kind - 29 - - - seconds - 123672 + result + 4 @@ -1793,70 +1704,65 @@ 12 + + 1 + 2 + 104 + 2 - 3 - 59 + 4 + 56 - 3 + 4 7 - 59 + 60 7 11 - 59 + 69 11 15 - 59 + 56 15 - 21 - 59 - - - 21 - 28 - 67 - - - 28 - 36 - 59 + 22 + 60 - 37 - 48 - 59 + 22 + 31 + 65 - 52 - 71 - 59 + 32 + 47 + 65 - 73 - 124 - 59 + 51 + 88 + 69 - 125 - 177 - 59 + 93 + 151 + 60 - 209 - 1131 - 59 + 163 + 367 + 60 - 1234 - 1235 - 7 + 441 + 2179 + 26 @@ -1864,91 +1770,191 @@ id - kind + result 12 - 4 - 5 - 731 + 1 + 2 + 757 - id - seconds + num + id 12 - 4 - 5 - 59 + 1 + 2 + 4080 - 6 - 13 - 59 + 2 + 3 + 452 - 14 - 21 - 59 + 3 + 4 + 2552 - 22 - 29 - 59 + 4 + 7 + 805 - 30 - 41 - 59 + 7 + 17 + 827 - 42 - 55 - 67 + 17 + 104 + 714 - 56 - 71 - 59 + 105 + 175 + 52 + + + + + + num + result + + + 12 + - 74 - 95 - 59 + 1 + 2 + 9485 + + + + + + result + id + + + 12 + - 104 - 141 - 59 + 174 + 175 + 4 + + + + + + result + num + + + 12 + - 146 - 247 - 59 + 2178 + 2179 + 4 + + + + + + + + compilation_time + 166778 + + + id + 238 + + + num + 30464 + + + kind + 477 + + + seconds + 83269 + + + + + id + num + + + 12 + - 250 - 353 - 59 + 94 + 95 + 119 - 418 - 2247 - 59 + 255 + 256 + 119 + + + + + + id + kind + + + 12 + - 2436 - 2437 - 7 + 4 + 5 + 238 + + + + + + + id + seconds + + + 12 + + + 188 + 189 + 119 + + + 510 + 511 + 119 @@ -1964,42 +1970,12 @@ 1 2 - 775 + 19234 2 3 - 4342 - - - 3 - 5 - 790 - - - 5 - 6 - 880 - - - 6 - 8 - 686 - - - 8 - 16 - 768 - - - 16 - 42 - 701 - - - 42 - 99 - 261 + 11230 @@ -2015,7 +1991,7 @@ 4 5 - 9207 + 30464 @@ -2031,42 +2007,12 @@ 3 4 - 775 + 19353 5 6 - 4342 - - - 7 - 10 - 790 - - - 11 - 12 - 880 - - - 13 - 16 - 686 - - - 17 - 32 - 768 - - - 33 - 84 - 701 - - - 85 - 198 - 261 + 11110 @@ -2080,9 +2026,9 @@ 12 - 98 - 99 - 29 + 2 + 3 + 477 @@ -2096,9 +2042,9 @@ 12 - 1234 - 1235 - 29 + 255 + 256 + 477 @@ -2114,17 +2060,17 @@ 1 2 - 14 + 238 - 8222 - 8223 - 7 + 348 + 349 + 119 - 8364 - 8365 - 7 + 349 + 350 + 119 @@ -2140,12 +2086,12 @@ 1 2 - 122389 + 83150 2 - 99 - 1283 + 3 + 119 @@ -2161,12 +2107,12 @@ 1 2 - 121889 + 83150 - 2 - 1235 - 1783 + 255 + 256 + 119 @@ -2182,12 +2128,12 @@ 1 2 - 123582 + 83150 - 2 + 3 4 - 89 + 119 @@ -2197,23 +2143,23 @@ diagnostic_for - 64190 + 57106 diagnostic - 64190 + 57106 compilation - 716 + 374 file_number - 7 + 6678 file_number_diagnostic_number - 14475 + 1248 @@ -2227,7 +2173,7 @@ 1 2 - 64190 + 57106 @@ -2243,7 +2189,7 @@ 1 2 - 64190 + 57106 @@ -2259,7 +2205,7 @@ 1 2 - 64190 + 57106 @@ -2275,47 +2221,58 @@ 1 2 - 268 + 124 - 3 - 5 - 59 + 34 + 35 + 62 - 5 - 8 - 52 + 266 + 267 + 62 - 8 - 14 - 44 + 303 + 304 + 62 - 14 - 22 - 59 + 310 + 311 + 62 + + + + + + compilation + file_number + + + 12 + - 22 - 39 - 59 + 1 + 2 + 124 - 42 - 55 - 59 + 14 + 15 + 62 - 60 - 169 - 59 + 102 + 103 + 124 - 228 - 1941 - 52 + 104 + 105 + 62 @@ -2323,7 +2280,7 @@ compilation - file_number + file_number_diagnostic_number 12 @@ -2331,63 +2288,73 @@ 1 2 - 716 + 124 + + + 8 + 9 + 62 + + + 15 + 16 + 62 + + + 20 + 21 + 124 - compilation - file_number_diagnostic_number + file_number + diagnostic 12 1 - 2 - 268 + 5 + 312 - 3 - 5 - 59 + 6 + 7 + 3682 - 5 + 7 8 - 52 + 312 8 - 14 - 44 - - - 14 - 22 - 59 + 9 + 686 - 22 - 39 - 59 + 9 + 12 + 499 - 42 - 55 - 59 + 12 + 15 + 561 - 60 - 169 - 59 + 17 + 30 + 561 - 228 - 1941 - 52 + 47 + 48 + 62 @@ -2395,15 +2362,25 @@ file_number - diagnostic + compilation 12 - 8603 - 8604 - 7 + 1 + 3 + 436 + + + 3 + 4 + 5367 + + + 4 + 5 + 873 @@ -2411,31 +2388,121 @@ file_number - compilation + file_number_diagnostic_number 12 - 96 - 97 - 7 + 1 + 2 + 124 + + + 2 + 3 + 3994 + + + 3 + 4 + 873 + + + 4 + 5 + 312 + + + 5 + 6 + 436 + + + 6 + 8 + 499 + + + 8 + 21 + 436 - file_number - file_number_diagnostic_number + file_number_diagnostic_number + diagnostic 12 - 1940 - 1941 - 7 + 2 + 3 + 312 + + + 3 + 4 + 124 + + + 5 + 6 + 124 + + + 7 + 8 + 124 + + + 9 + 10 + 62 + + + 12 + 13 + 62 + + + 21 + 22 + 62 + + + 25 + 26 + 62 + + + 39 + 40 + 62 + + + 47 + 48 + 62 + + + 77 + 78 + 62 + + + 321 + 322 + 62 + + + 324 + 325 + 62 @@ -2443,50 +2510,30 @@ file_number_diagnostic_number - diagnostic + compilation 12 - - 1 - 2 - 3290 - 2 3 - 238 + 312 3 4 - 5081 + 436 4 5 - 2439 - - - 5 - 6 - 261 + 436 6 7 - 1462 - - - 7 - 14 - 1208 - - - 14 - 97 - 492 + 62 @@ -2494,7 +2541,7 @@ file_number_diagnostic_number - compilation + file_number 12 @@ -2502,58 +2549,67 @@ 1 2 - 3290 + 312 2 3 - 238 + 124 3 4 - 5081 + 124 4 5 - 2439 + 124 5 6 - 261 + 62 - 6 - 7 - 1462 + 7 + 8 + 62 - 7 - 14 - 1208 + 12 + 13 + 62 - 14 - 97 - 492 + 15 + 16 + 62 + + + 22 + 23 + 62 + + + 27 + 28 + 62 + + + 41 + 42 + 62 + + + 105 + 106 + 62 - - - - - - file_number_diagnostic_number - file_number - - - 12 - - 1 - 2 - 14475 + 107 + 108 + 62 @@ -2684,23 +2740,23 @@ compilation_finished - 8628 + 2261 id - 8628 + 2261 cpu_seconds - 165 + 94 elapsed_seconds - 8628 + 2261 result - 165 + 94 @@ -2714,7 +2770,7 @@ 1 2 - 8628 + 2261 @@ -2730,7 +2786,7 @@ 1 2 - 8628 + 2261 @@ -2746,7 +2802,7 @@ 1 2 - 8628 + 2261 @@ -2760,9 +2816,9 @@ 12 - 52 - 53 - 165 + 24 + 25 + 94 @@ -2776,9 +2832,9 @@ 12 - 52 - 53 - 165 + 24 + 25 + 94 @@ -2794,7 +2850,7 @@ 1 2 - 165 + 94 @@ -2810,7 +2866,7 @@ 1 2 - 8628 + 2261 @@ -2826,7 +2882,7 @@ 1 2 - 8628 + 2261 @@ -2842,7 +2898,7 @@ 1 2 - 8628 + 2261 @@ -2856,9 +2912,9 @@ 12 - 52 - 53 - 165 + 24 + 25 + 94 @@ -2874,7 +2930,7 @@ 1 2 - 165 + 94 @@ -2888,9 +2944,9 @@ 12 - 52 - 53 - 165 + 24 + 25 + 94 @@ -2900,35 +2956,35 @@ diagnostics - 64190 + 57106 id - 64190 + 57106 generated_by - 7 + 124 severity - 29 + 62 error_tag - 7 + 62 error_message - 2604 + 1435 full_error_message - 7 + 39319 location - 7 + 312 @@ -2942,7 +2998,7 @@ 1 2 - 64190 + 57106 @@ -2958,7 +3014,7 @@ 1 2 - 64190 + 57106 @@ -2974,7 +3030,7 @@ 1 2 - 64190 + 57106 @@ -2990,7 +3046,7 @@ 1 2 - 64190 + 57106 @@ -3006,7 +3062,7 @@ 1 2 - 64190 + 57106 @@ -3022,7 +3078,7 @@ 1 2 - 64190 + 57106 @@ -3036,9 +3092,14 @@ 12 - 8603 - 8604 - 7 + 2 + 3 + 62 + + + 913 + 914 + 62 @@ -3052,9 +3113,9 @@ 12 - 4 - 5 - 7 + 1 + 2 + 124 @@ -3070,7 +3131,7 @@ 1 2 - 7 + 124 @@ -3084,9 +3145,14 @@ 12 - 349 - 350 - 7 + 2 + 3 + 62 + + + 21 + 22 + 62 @@ -3102,7 +3168,12 @@ 1 2 - 7 + 62 + + + 629 + 630 + 62 @@ -3118,7 +3189,12 @@ 1 2 - 7 + 62 + + + 4 + 5 + 62 @@ -3132,24 +3208,9 @@ 12 - 4 - 5 - 7 - - - 13 - 14 - 7 - - - 95 - 96 - 7 - - - 8491 - 8492 - 7 + 915 + 916 + 62 @@ -3163,9 +3224,9 @@ 12 - 1 - 2 - 29 + 2 + 3 + 62 @@ -3181,7 +3242,7 @@ 1 2 - 29 + 62 @@ -3195,24 +3256,9 @@ 12 - 4 - 5 - 7 - - - 13 - 14 - 7 - - - 95 - 96 - 7 - - - 237 - 238 - 7 + 23 + 24 + 62 @@ -3226,9 +3272,9 @@ 12 - 1 - 2 - 29 + 630 + 631 + 62 @@ -3242,9 +3288,9 @@ 12 - 1 - 2 - 29 + 5 + 6 + 62 @@ -3258,9 +3304,9 @@ 12 - 8603 - 8604 - 7 + 915 + 916 + 62 @@ -3274,9 +3320,9 @@ 12 - 1 - 2 - 7 + 2 + 3 + 62 @@ -3290,9 +3336,9 @@ 12 - 4 - 5 - 7 + 1 + 2 + 62 @@ -3306,9 +3352,9 @@ 12 - 349 - 350 - 7 + 23 + 24 + 62 @@ -3322,9 +3368,9 @@ 12 - 1 - 2 - 7 + 630 + 631 + 62 @@ -3338,9 +3384,9 @@ 12 - 1 - 2 - 7 + 5 + 6 + 62 @@ -3356,17 +3402,47 @@ 1 2 - 2290 + 312 2 - 9 - 201 + 3 + 249 - 9 - 3692 - 111 + 4 + 7 + 124 + + + 7 + 10 + 124 + + + 13 + 16 + 124 + + + 19 + 23 + 124 + + + 25 + 27 + 124 + + + 48 + 81 + 124 + + + 314 + 315 + 124 @@ -3382,7 +3458,7 @@ 1 2 - 2604 + 1435 @@ -3398,7 +3474,7 @@ 1 2 - 2604 + 1435 @@ -3414,7 +3490,7 @@ 1 2 - 2604 + 1435 @@ -3430,7 +3506,47 @@ 1 2 - 2604 + 312 + + + 2 + 3 + 249 + + + 4 + 6 + 124 + + + 6 + 8 + 124 + + + 9 + 16 + 124 + + + 19 + 23 + 124 + + + 25 + 27 + 124 + + + 38 + 49 + 124 + + + 80 + 315 + 124 @@ -3446,7 +3562,12 @@ 1 2 - 2604 + 1373 + + + 3 + 4 + 62 @@ -3460,9 +3581,14 @@ 12 - 8603 - 8604 - 7 + 1 + 2 + 37010 + + + 2 + 37 + 2309 @@ -3478,7 +3604,7 @@ 1 2 - 7 + 39319 @@ -3492,9 +3618,9 @@ 12 - 4 - 5 - 7 + 1 + 2 + 39319 @@ -3510,7 +3636,7 @@ 1 2 - 7 + 39319 @@ -3524,9 +3650,14 @@ 12 - 349 - 350 - 7 + 1 + 2 + 39257 + + + 2 + 3 + 62 @@ -3542,7 +3673,7 @@ 1 2 - 7 + 39319 @@ -3556,9 +3687,29 @@ 12 - 8603 - 8604 - 7 + 2 + 3 + 62 + + + 3 + 4 + 62 + + + 4 + 5 + 62 + + + 6 + 7 + 62 + + + 900 + 901 + 62 @@ -3574,7 +3725,7 @@ 1 2 - 7 + 312 @@ -3588,9 +3739,9 @@ 12 - 4 - 5 - 7 + 1 + 2 + 312 @@ -3606,7 +3757,7 @@ 1 2 - 7 + 312 @@ -3620,9 +3771,19 @@ 12 - 349 - 350 - 7 + 1 + 2 + 187 + + + 2 + 3 + 62 + + + 20 + 21 + 62 @@ -3638,7 +3799,17 @@ 1 2 - 7 + 187 + + + 3 + 4 + 62 + + + 624 + 625 + 62 @@ -7323,15 +7494,15 @@ folders - 293711 + 211876 id - 293711 + 211876 name - 293711 + 211876 @@ -7345,7 +7516,7 @@ 1 2 - 293711 + 211876 @@ -7361,7 +7532,7 @@ 1 2 - 293711 + 211876 @@ -7542,19 +7713,19 @@ jarManifestMain - 172742 + 132371 fileid - 13275 + 8960 keyName - 12611 + 9676 value - 89772 + 67858 @@ -7567,58 +7738,68 @@ 1 - 4 - 995 + 5 + 358 5 6 - 2323 + 1792 6 7 - 2157 + 1075 9 - 13 - 1161 + 10 + 358 13 15 - 1161 + 597 15 - 17 - 829 + 16 + 716 - 17 + 16 18 - 829 + 716 - 19 + 18 21 - 829 + 716 21 - 24 - 1161 + 23 + 477 - 24 + 23 + 26 + 597 + + + 26 27 - 1161 + 358 - 28 - 35 - 663 + 27 + 29 + 716 + + + 29 + 36 + 477 @@ -7633,63 +7814,68 @@ 1 - 4 - 995 + 5 + 358 5 6 - 2489 + 1792 6 7 - 1991 + 1075 8 - 10 - 663 - - - 10 - 12 - 995 + 11 + 597 - 12 + 11 13 - 663 + 597 14 15 - 995 + 597 15 + 16 + 597 + + + 16 17 - 1161 + 358 17 18 - 829 + 716 18 - 20 - 1161 + 19 + 358 + + + 19 + 21 + 716 21 - 24 - 1161 + 23 + 597 - 29 - 30 - 165 + 23 + 29 + 597 @@ -7705,47 +7891,42 @@ 1 2 - 5144 + 4420 2 - 3 - 829 - - - 3 4 - 829 + 716 - 5 - 8 - 995 + 4 + 6 + 597 - 10 - 20 - 995 + 6 + 12 + 836 - 24 - 28 - 829 + 18 + 30 + 836 - 28 - 31 - 995 + 30 + 34 + 716 - 32 - 38 - 995 + 34 + 42 + 836 - 39 - 81 - 995 + 42 + 76 + 716 @@ -7761,42 +7942,42 @@ 1 2 - 5807 + 4898 2 3 - 995 + 597 3 - 5 - 995 + 4 + 716 - 5 - 8 - 995 + 4 + 9 + 836 - 10 - 16 - 1161 + 13 + 18 + 716 - 17 - 26 - 1161 + 18 + 31 + 836 - 27 - 36 - 995 + 32 + 42 + 836 - 37 - 53 - 497 + 51 + 54 + 238 @@ -7812,22 +7993,17 @@ 1 2 - 75999 + 58659 2 - 3 - 4480 - - - 3 - 6 - 6969 + 4 + 5615 - 6 - 81 - 2323 + 4 + 76 + 3584 @@ -7843,17 +8019,17 @@ 1 2 - 75668 + 56269 2 3 - 8794 + 6570 3 - 6 - 5310 + 5 + 5017 @@ -7863,23 +8039,23 @@ jarManifestEntries - 46193 + 30196 fileid - 29 + 61 entryName - 46141 + 30124 keyName - 59 + 27 value - 46171 + 30158 @@ -7893,22 +8069,72 @@ 1 2 - 7 + 4 - 264 - 265 - 7 + 4 + 10 + 3 - 1520 - 1521 - 7 + 10 + 12 + 4 - 4400 - 4401 - 7 + 12 + 31 + 4 + + + 65 + 82 + 4 + + + 123 + 164 + 4 + + + 178 + 240 + 4 + + + 253 + 294 + 4 + + + 307 + 357 + 4 + + + 361 + 395 + 4 + + + 433 + 461 + 4 + + + 591 + 662 + 4 + + + 957 + 2267 + 4 + + + 3647 + 3762 + 3 @@ -7924,43 +8150,93 @@ 1 2 - 22 + 57 + + + 6 + 10 + 3 + + + + + + + fileid + value + + + 12 + + + 1 + 2 + 4 + + + 3 + 8 + 4 + + + 9 + 13 + 4 + + + 24 + 66 + 4 + + + 70 + 124 + 4 + + + 127 + 179 + 4 + + + 195 + 254 + 4 + + + 265 + 308 + 4 + + + 320 + 362 + 4 - 7 - 8 - 7 + 381 + 434 + 4 - - - - - - fileid - value - - - 12 - - 4 - 5 - 7 + 434 + 592 + 4 - 264 - 265 - 7 + 618 + 958 + 4 - 1520 - 1521 - 7 + 1671 + 3648 + 4 - 4400 - 4401 - 7 + 3761 + 3762 + 1 @@ -7976,12 +8252,12 @@ 1 2 - 46133 + 30108 2 - 3 - 7 + 26 + 16 @@ -7997,12 +8273,12 @@ 1 2 - 46133 + 30121 - 7 - 8 - 7 + 6 + 10 + 3 @@ -8018,12 +8294,12 @@ 1 2 - 46126 + 30120 - 2 - 5 - 14 + 3 + 26 + 4 @@ -8039,12 +8315,22 @@ 1 2 - 52 + 21 + + + 2 + 3 + 3 3 4 - 7 + 1 + + + 32 + 33 + 1 @@ -8060,12 +8346,27 @@ 1 2 - 52 + 21 - 6183 - 6184 - 7 + 2 + 3 + 1 + + + 11 + 12 + 1 + + + 369 + 370 + 1 + + + 19366 + 19367 + 1 @@ -8081,12 +8382,22 @@ 1 2 - 52 + 22 - 6184 - 6185 - 7 + 2 + 3 + 1 + + + 369 + 370 + 1 + + + 19390 + 19391 + 1 @@ -8102,7 +8413,12 @@ 1 2 - 46171 + 30156 + + + 2 + 3 + 1 @@ -8118,7 +8434,12 @@ 1 2 - 46171 + 30156 + + + 11 + 12 + 1 @@ -8134,12 +8455,12 @@ 1 2 - 46148 + 30150 2 3 - 22 + 7 @@ -8149,15 +8470,15 @@ packages - 121135 + 96053 id - 121135 + 96053 nodeName - 121135 + 96053 @@ -8171,7 +8492,7 @@ 1 2 - 121135 + 96053 @@ -8187,7 +8508,7 @@ 1 2 - 121135 + 96053 @@ -8745,11 +9066,11 @@ file_class - 7249 + 17711 id - 7249 + 17711 @@ -12653,11 +12974,11 @@ isVarargsParam - 813764 + 684318 param - 813764 + 684318 @@ -12891,30 +13212,30 @@ isAnnotElem - 61065 + 49101 methodid - 61065 + 49101 annotValue - 1574925 + 1421553 parentid - 568174 + 1172586 id2 - 52104 + 1074 value - 1574925 + 1421553 @@ -12928,37 +13249,12 @@ 1 2 - 153493 + 1135381 2 - 3 - 252724 - - - 3 - 4 - 48951 - - - 4 - 6 - 26550 - - - 6 - 7 - 35179 - - - 7 - 9 - 46628 - - - 9 - 13 - 4646 + 18 + 37205 @@ -12974,37 +13270,12 @@ 1 2 - 138061 + 1133350 2 - 3 - 268157 - - - 3 - 4 - 47292 - - - 4 - 6 - 26052 - - - 6 - 8 - 39659 - - - 8 - 10 - 44139 - - - 10 - 13 - 4812 + 20 + 39235 @@ -13020,52 +13291,62 @@ 1 2 - 17091 + 198 2 3 - 5144 + 95 3 4 - 2655 - - - 4 - 6 - 4812 + 88 - 6 - 9 - 4314 + 5 + 8 + 88 - 9 - 15 - 4148 + 8 + 16 + 88 - 16 + 20 25 - 4314 + 88 - 27 - 86 - 3982 + 34 + 59 + 66 86 - 153 - 4148 + 102 + 80 - 164 - 1105 - 1493 + 121 + 185 + 51 + + + 203 + 684 + 80 + + + 1733 + 1734 + 125 + + + 1842 + 153327 + 22 @@ -13081,52 +13362,62 @@ 1 2 - 15266 + 198 2 3 - 6637 + 88 3 4 - 2820 + 88 4 - 6 - 3816 - - - 6 8 - 3816 + 95 8 - 10 - 4812 + 16 + 88 - 10 + 20 25 - 4148 + 88 - 25 - 53 - 3982 + 34 + 59 + 66 - 53 - 132 - 3982 + 86 + 102 + 80 + + + 127 + 185 + 51 + + + 203 + 684 + 80 - 134 - 1105 - 2820 + 1733 + 1734 + 88 + + + 1734 + 153327 + 58 @@ -13142,7 +13433,7 @@ 1 2 - 1574925 + 1421553 @@ -13158,7 +13449,7 @@ 1 2 - 1574925 + 1421553 @@ -14544,15 +14835,15 @@ isLocalClassOrInterface - 3533 + 3532 typeid - 3533 + 3532 parent - 3533 + 3532 @@ -14566,7 +14857,7 @@ 1 2 - 3533 + 3532 @@ -14582,7 +14873,7 @@ 1 2 - 3533 + 3532 @@ -14592,11 +14883,11 @@ isDefConstr - 139383 + 139376 constructorid - 139383 + 139376 @@ -15205,15 +15496,15 @@ implInterface - 3052687 + 3052545 id1 - 757298 + 757262 id2 - 2275569 + 2275463 @@ -15227,37 +15518,37 @@ 1 2 - 210035 + 210026 2 3 - 50057 + 50055 3 4 - 67415 + 67412 4 5 - 62041 + 62038 5 6 - 19333 + 19332 6 7 - 305943 + 305928 7 10 - 42471 + 42469 @@ -15273,12 +15564,12 @@ 1 2 - 2200149 + 2200047 2 63705 - 75420 + 75416 @@ -15288,15 +15579,15 @@ permits - 132 + 3703 id1 - 30 + 1075 id2 - 132 + 3703 @@ -15310,32 +15601,27 @@ 1 2 - 3 + 358 2 3 - 3 + 358 3 4 - 6 - - - 4 - 5 - 10 + 119 - 8 - 9 - 3 + 9 + 10 + 119 10 11 - 3 + 119 @@ -15351,7 +15637,7 @@ 1 2 - 132 + 3703 @@ -15469,23 +15755,23 @@ imports - 441072 + 356137 id - 441072 + 356137 holder - 52468 + 54477 name - 4282 + 8004 kind - 29 + 358 @@ -15499,7 +15785,7 @@ 1 2 - 441072 + 356137 @@ -15515,7 +15801,7 @@ 1 2 - 441072 + 356137 @@ -15531,7 +15817,7 @@ 1 2 - 441072 + 356137 @@ -15547,42 +15833,37 @@ 1 2 - 20638 + 24730 2 3 - 8976 + 8960 3 4 - 4991 + 5017 4 - 5 - 3335 - - - 5 - 7 - 4096 + 6 + 4420 - 7 - 12 - 4305 + 6 + 10 + 4181 - 12 - 32 - 3984 + 10 + 30 + 4181 - 32 - 1529 - 2141 + 31 + 113 + 2986 @@ -15598,12 +15879,12 @@ 1 2 - 50871 + 51132 2 - 54 - 1596 + 8 + 3345 @@ -15619,12 +15900,12 @@ 1 2 - 51200 + 51610 2 - 4 - 1268 + 3 + 2867 @@ -15640,27 +15921,32 @@ 1 2 - 2469 + 3584 2 3 - 962 + 1792 3 4 - 358 + 836 4 - 7 - 328 + 9 + 716 - 7 - 57945 - 164 + 9 + 32 + 716 + + + 45 + 2676 + 358 @@ -15676,12 +15962,17 @@ 1 2 - 4163 + 7048 + + + 2 + 3 + 716 - 2 - 6945 - 119 + 3 + 442 + 238 @@ -15697,12 +15988,12 @@ 1 2 - 4275 + 7884 - 3 - 4 - 7 + 2 + 3 + 119 @@ -15716,24 +16007,19 @@ 12 - 15 - 16 - 7 - - - 68 - 69 - 7 + 13 + 14 + 119 - 1170 - 1171 - 7 + 306 + 307 + 119 - 57861 - 57862 - 7 + 2662 + 2663 + 119 @@ -15747,24 +16033,19 @@ 12 - 10 - 11 - 7 - - - 25 - 26 - 7 + 5 + 6 + 119 - 257 - 258 - 7 + 39 + 40 + 119 - 6915 - 6916 - 7 + 436 + 437 + 119 @@ -15780,12 +16061,12 @@ 1 2 - 22 + 238 - 573 - 574 - 7 + 66 + 67 + 119 @@ -17679,15 +17960,15 @@ callableEnclosingExpr - 7299071 + 7298994 id - 7299071 + 7298994 callable_id - 19877 + 19876 @@ -17701,7 +17982,7 @@ 1 2 - 7299071 + 7298994 @@ -17792,15 +18073,15 @@ statementEnclosingExpr - 7258714 + 7258638 id - 7258714 + 7258638 statement_id - 525778 + 525773 @@ -17814,7 +18095,7 @@ 1 2 - 7258714 + 7258638 @@ -17830,7 +18111,7 @@ 1 3 - 29126 + 29125 3 @@ -17840,22 +18121,22 @@ 5 7 - 48474 + 48473 7 8 - 36042 + 36041 8 9 - 38145 + 38144 9 10 - 50447 + 50446 10 @@ -17865,7 +18146,7 @@ 11 12 - 127049 + 127048 12 @@ -17880,7 +18161,7 @@ 40 81 - 40222 + 40221 82 @@ -17970,15 +18251,15 @@ callableBinding - 1832520 + 1832514 callerid - 1832520 + 1832514 callee - 264311 + 264310 @@ -17992,7 +18273,7 @@ 1 2 - 1832520 + 1832514 @@ -18008,7 +18289,7 @@ 1 2 - 162995 + 162994 2 @@ -18144,12 +18425,12 @@ 1 2 - 1855 + 1854 2 3 - 3164 + 3163 3 @@ -18164,15 +18445,15 @@ propertyRefFieldBinding - 2 + 4 id - 2 + 4 field - 2 + 4 @@ -18186,7 +18467,7 @@ 1 2 - 2 + 4 @@ -18202,7 +18483,7 @@ 1 2 - 2 + 4 @@ -18719,11 +19000,11 @@ localvarsKotlinType - 149454 + 149446 id - 149454 + 149446 kttypeid @@ -18741,7 +19022,7 @@ 1 2 - 149454 + 149446 @@ -18767,19 +19048,19 @@ namestrings - 4022436 + 4022471 name - 23384 + 23402 value - 22166 + 22183 parent - 4022436 + 4022471 @@ -18793,7 +19074,7 @@ 1 2 - 23384 + 23402 @@ -18819,12 +19100,12 @@ 3 5 - 2150 + 2163 5 9 - 1769 + 1773 9 @@ -18860,7 +19141,7 @@ 1 2 - 21559 + 21576 2 @@ -18891,12 +19172,12 @@ 3 5 - 1912 + 1925 5 9 - 1665 + 1669 9 @@ -18932,7 +19213,7 @@ 1 2 - 4022436 + 4022471 @@ -18948,7 +19229,7 @@ 1 2 - 4022436 + 4022471 @@ -18958,15 +19239,15 @@ modules - 7965 + 6092 id - 7965 + 6092 name - 7965 + 6092 @@ -18980,7 +19261,7 @@ 1 2 - 7965 + 6092 @@ -18996,7 +19277,7 @@ 1 2 - 7965 + 6092 @@ -19017,15 +19298,15 @@ cumodule - 247580 + 188761 fileId - 247580 + 188761 moduleId - 1161 + 836 @@ -19039,7 +19320,7 @@ 1 2 - 247580 + 188761 @@ -19055,32 +19336,32 @@ 12 13 - 331 + 238 - 39 - 40 - 165 + 36 + 37 + 119 - 64 - 65 - 165 + 72 + 73 + 119 - 71 - 72 - 165 + 75 + 76 + 119 415 416 - 165 + 119 - 879 - 880 - 165 + 958 + 959 + 119 @@ -19090,15 +19371,15 @@ directives - 50279 + 37991 id - 1161 + 836 directive - 50279 + 37991 @@ -19112,37 +19393,37 @@ 3 4 - 165 + 119 4 5 - 165 + 119 7 8 - 165 + 119 9 10 - 165 + 119 43 44 - 165 + 119 89 90 - 165 + 119 - 148 - 149 - 165 + 163 + 164 + 119 @@ -19158,7 +19439,7 @@ 1 2 - 50279 + 37991 @@ -19261,11 +19542,11 @@ isTransitive - 829 + 597 id - 829 + 597 @@ -19283,15 +19564,15 @@ exports - 35013 + 26163 id - 35013 + 26163 target - 35013 + 26163 @@ -19305,7 +19586,7 @@ 1 2 - 35013 + 26163 @@ -19321,7 +19602,7 @@ 1 2 - 35013 + 26163 @@ -19331,15 +19612,15 @@ exportsTo - 28707 + 22579 id - 12279 + 9676 target - 7467 + 5734 @@ -19353,32 +19634,27 @@ 1 2 - 7301 + 5495 2 3 - 1825 + 1792 3 4 - 829 + 836 4 - 5 - 829 - - - 5 - 7 - 995 + 6 + 716 - 9 - 18 - 497 + 6 + 19 + 836 @@ -19394,42 +19670,47 @@ 1 2 - 1991 + 1672 2 3 - 1825 + 1194 3 4 - 663 + 716 4 5 - 663 + 358 5 6 - 663 + 477 6 7 - 331 + 238 8 10 - 663 + 477 - 11 + 10 13 - 663 + 358 + + + 13 + 14 + 238 @@ -19439,15 +19720,15 @@ opens - 165 + 716 id - 165 + 716 target - 165 + 716 @@ -19461,7 +19742,7 @@ 1 2 - 165 + 716 @@ -19477,7 +19758,7 @@ 1 2 - 165 + 716 @@ -19487,15 +19768,15 @@ opensTo - 165 + 716 id - 165 + 716 target - 165 + 238 @@ -19509,7 +19790,7 @@ 1 2 - 165 + 716 @@ -19525,7 +19806,12 @@ 1 2 - 165 + 119 + + + 5 + 6 + 119 @@ -19535,15 +19821,15 @@ uses - 10786 + 7884 id - 10786 + 7884 serviceInterface - 10786 + 7884 @@ -19557,7 +19843,7 @@ 1 2 - 10786 + 7884 @@ -19573,7 +19859,7 @@ 1 2 - 10786 + 7884 @@ -19583,15 +19869,15 @@ provides - 2323 + 1792 id - 2323 + 1792 serviceInterface - 2323 + 1792 @@ -19605,7 +19891,7 @@ 1 2 - 2323 + 1792 @@ -19621,7 +19907,7 @@ 1 2 - 2323 + 1792 @@ -19631,15 +19917,15 @@ providesWith - 5310 + 4181 id - 2323 + 1792 serviceImpl - 5310 + 4181 @@ -19653,22 +19939,27 @@ 1 2 - 1327 + 955 2 3 - 165 + 119 + + + 3 + 4 + 119 4 5 - 663 + 477 6 7 - 165 + 119 @@ -19684,7 +19975,7 @@ 1 2 - 5310 + 4181 @@ -25467,19 +25758,19 @@ ktComments - 74439 + 116780 id - 74439 + 116780 kind - 37 + 13 text - 51562 + 15129 @@ -25493,7 +25784,7 @@ 1 2 - 74439 + 116780 @@ -25509,7 +25800,7 @@ 1 2 - 74439 + 116780 @@ -25523,19 +25814,19 @@ 12 - 1196 - 1197 - 12 + 794 + 795 + 4 - 1284 - 1285 - 12 + 8820 + 8821 + 4 - 3517 - 3518 - 12 + 17201 + 17202 + 4 @@ -25549,19 +25840,19 @@ 12 - 17 - 18 - 12 + 20 + 21 + 4 - 1073 - 1074 - 12 + 680 + 681 + 4 - 3064 - 3065 - 12 + 2774 + 2775 + 4 @@ -25577,17 +25868,42 @@ 1 2 - 46101 + 6780 2 3 - 4232 + 692 3 - 572 - 1228 + 4 + 1506 + + + 4 + 5 + 126 + + + 5 + 6 + 3436 + + + 6 + 16 + 1258 + + + 16 + 32 + 1201 + + + 33 + 4236 + 126 @@ -25603,7 +25919,7 @@ 1 2 - 51562 + 15129 @@ -25613,19 +25929,19 @@ ktCommentSections - 47690 + 74919 id - 47690 + 74919 comment - 43655 + 74910 content - 40577 + 8109 @@ -25639,7 +25955,7 @@ 1 2 - 47690 + 74919 @@ -25655,7 +25971,7 @@ 1 2 - 47690 + 74919 @@ -25671,12 +25987,12 @@ 1 2 - 42029 + 74902 2 - 18 - 1626 + 3 + 8 @@ -25692,12 +26008,12 @@ 1 2 - 42029 + 74902 2 - 18 - 1626 + 3 + 8 @@ -25713,17 +26029,52 @@ 1 2 - 35910 + 3170 2 3 - 3910 + 522 3 - 63 - 757 + 5 + 518 + + + 5 + 6 + 962 + + + 6 + 9 + 622 + + + 9 + 10 + 34 + + + 10 + 11 + 718 + + + 11 + 21 + 675 + + + 21 + 37 + 622 + + + 42 + 504 + 261 @@ -25739,17 +26090,52 @@ 1 2 - 35997 + 3170 2 3 - 3835 + 522 3 - 56 - 744 + 5 + 518 + + + 5 + 6 + 962 + + + 6 + 9 + 622 + + + 9 + 10 + 34 + + + 10 + 11 + 718 + + + 11 + 21 + 675 + + + 21 + 37 + 622 + + + 42 + 504 + 261 @@ -25870,15 +26256,15 @@ ktCommentOwners - 68171 + 76609 id - 43432 + 74810 owner - 66520 + 71853 @@ -25892,22 +26278,12 @@ 1 2 - 28065 + 73186 2 - 3 - 9744 - - - 3 - 4 - 3649 - - - 4 6 - 1973 + 1624 @@ -25923,12 +26299,12 @@ 1 2 - 64881 + 69697 2 - 4 - 1638 + 5 + 2155 diff --git a/java/ql/lib/semmle/code/java/Compilation.qll b/java/ql/lib/semmle/code/java/Compilation.qll index c4b846edade0..2610413c20bc 100644 --- a/java/ql/lib/semmle/code/java/Compilation.qll +++ b/java/ql/lib/semmle/code/java/Compilation.qll @@ -83,6 +83,16 @@ class Compilation extends @compilation { */ string getArgument(int i) { compilation_args(this, i, result) } + /** + * Gets an expanded argument passed to the extractor on this invocation. + */ + string getAnExpandedArgument() { result = getExpandedArgument(_) } + + /** + * Gets the `i`th expanded argument passed to the extractor on this invocation. + */ + string getExpandedArgument(int i) { compilation_expanded_args(this, i, result) } + /** * Gets the total amount of CPU time spent processing all the files in the * compiler. diff --git a/java/ql/lib/upgrades/934bf10b4bd34cf648893efcd1d0d7be9471d39f/old.dbscheme b/java/ql/lib/upgrades/934bf10b4bd34cf648893efcd1d0d7be9471d39f/old.dbscheme new file mode 100644 index 000000000000..934bf10b4bd3 --- /dev/null +++ b/java/ql/lib/upgrades/934bf10b4bd34cf648893efcd1d0d7be9471d39f/old.dbscheme @@ -0,0 +1,1242 @@ +/** + * An invocation of the compiler. Note that more than one file may be + * compiled per invocation. For example, this command compiles three + * source files: + * + * javac A.java B.java C.java + * + * The `id` simply identifies the invocation, while `cwd` is the working + * directory from which the compiler was invoked. + */ +compilations( + /** + * An invocation of the compiler. Note that more than one file may + * be compiled per invocation. For example, this command compiles + * three source files: + * + * javac A.java B.java C.java + */ + unique int id : @compilation, + int kind: int ref, + string cwd : string ref, + string name : string ref +); + +case @compilation.kind of + 1 = @javacompilation +| 2 = @kotlincompilation +; + +compilation_started( + int id : @compilation ref +) + +compilation_info( + int id : @compilation ref, + string info_key: string ref, + string info_value: string ref +) + +/** + * The arguments that were passed to the extractor for a compiler + * invocation. If `id` is for the compiler invocation + * + * javac A.java B.java C.java + * + * then typically there will be rows for + * + * num | arg + * --- | --- + * 0 | *path to extractor* + * 1 | `--javac-args` + * 2 | A.java + * 3 | B.java + * 4 | C.java + */ +#keyset[id, num] +compilation_args( + int id : @compilation ref, + int num : int ref, + string arg : string ref +); + +/** + * The source files that are compiled by a compiler invocation. + * If `id` is for the compiler invocation + * + * javac A.java B.java C.java + * + * then there will be rows for + * + * num | arg + * --- | --- + * 0 | A.java + * 1 | B.java + * 2 | C.java + */ +#keyset[id, num] +compilation_compiling_files( + int id : @compilation ref, + int num : int ref, + int file : @file ref +); + +/** + * For each file recorded in `compilation_compiling_files`, + * there will be a corresponding row in + * `compilation_compiling_files_completed` once extraction + * of that file is complete. The `result` will indicate the + * extraction result: + * + * 0: Successfully extracted + * 1: Errors were encountered, but extraction recovered + * 2: Errors were encountered, and extraction could not recover + */ +#keyset[id, num] +compilation_compiling_files_completed( + int id : @compilation ref, + int num : int ref, + int result : int ref +); + +/** + * The time taken by the extractor for a compiler invocation. + * + * For each file `num`, there will be rows for + * + * kind | seconds + * ---- | --- + * 1 | CPU seconds used by the extractor frontend + * 2 | Elapsed seconds during the extractor frontend + * 3 | CPU seconds used by the extractor backend + * 4 | Elapsed seconds during the extractor backend + */ +#keyset[id, num, kind] +compilation_time( + int id : @compilation ref, + int num : int ref, + /* kind: + 1 = frontend_cpu_seconds + 2 = frontend_elapsed_seconds + 3 = extractor_cpu_seconds + 4 = extractor_elapsed_seconds + */ + int kind : int ref, + float seconds : float ref +); + +/** + * An error or warning generated by the extractor. + * The diagnostic message `diagnostic` was generated during compiler + * invocation `compilation`, and is the `file_number_diagnostic_number`th + * message generated while extracting the `file_number`th file of that + * invocation. + */ +#keyset[compilation, file_number, file_number_diagnostic_number] +diagnostic_for( + unique int diagnostic : @diagnostic ref, + int compilation : @compilation ref, + int file_number : int ref, + int file_number_diagnostic_number : int ref +); + +/** + * The `cpu_seconds` and `elapsed_seconds` are the CPU time and elapsed + * time (respectively) that the original compilation (not the extraction) + * took for compiler invocation `id`. + */ +compilation_compiler_times( + unique int id : @compilation ref, + float cpu_seconds : float ref, + float elapsed_seconds : float ref +); + +/** + * If extraction was successful, then `cpu_seconds` and + * `elapsed_seconds` are the CPU time and elapsed time (respectively) + * that extraction took for compiler invocation `id`. + * The `result` will indicate the extraction result: + * + * 0: Successfully extracted + * 1: Errors were encountered, but extraction recovered + * 2: Errors were encountered, and extraction could not recover + */ +compilation_finished( + unique int id : @compilation ref, + float cpu_seconds : float ref, + float elapsed_seconds : float ref, + int result : int ref +); + +diagnostics( + unique int id: @diagnostic, + string generated_by: string ref, // TODO: Sync this with the other languages? + int severity: int ref, + string error_tag: string ref, + string error_message: string ref, + string full_error_message: string ref, + int location: @location_default ref +); + +/* + * External artifacts + */ + +externalData( + int id : @externalDataElement, + string path : string ref, + int column: int ref, + string value : string ref +); + +snapshotDate( + unique date snapshotDate : date ref +); + +sourceLocationPrefix( + string prefix : string ref +); + +/* + * Duplicate code + */ + +duplicateCode( + unique int id : @duplication, + string relativePath : string ref, + int equivClass : int ref +); + +similarCode( + unique int id : @similarity, + string 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 +); + +/* + * SMAP + */ + +smap_header( + int outputFileId: @file ref, + string outputFilename: string ref, + string defaultStratum: string ref +); + +smap_files( + int outputFileId: @file ref, + string stratum: string ref, + int inputFileNum: int ref, + string inputFileName: string ref, + int inputFileId: @file ref +); + +smap_lines( + int outputFileId: @file ref, + string stratum: string ref, + int inputFileNum: int ref, + int inputStartLine: int ref, + int inputLineCount: int ref, + int outputStartLine: int ref, + int outputLineIncrement: int ref +); + +/* + * Locations and files + */ + +@location = @location_default ; + +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 +); + +hasLocation( + int locatableid: @locatable ref, + int id: @location ref +); + +@sourceline = @locatable ; + +#keyset[element_id] +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 +); + +@container = @folder | @file + +containerparent( + int parent: @container ref, + unique int child: @container ref +); + +/* + * Java + */ + +cupackage( + unique int id: @file ref, + int packageid: @package ref +); + +#keyset[fileid,keyName] +jarManifestMain( + int fileid: @file ref, + string keyName: string ref, + string value: string ref +); + +#keyset[fileid,entryName,keyName] +jarManifestEntries( + int fileid: @file ref, + string entryName: string ref, + string keyName: string ref, + string value: string ref +); + +packages( + unique int id: @package, + string nodeName: string ref +); + +primitives( + unique int id: @primitive, + string nodeName: string ref +); + +modifiers( + unique int id: @modifier, + string nodeName: string ref +); + +/** + * An errortype is used when the extractor is unable to extract a type + * correctly for some reason. + */ +error_type( + unique int id: @errortype +); + +classes_or_interfaces( + unique int id: @classorinterface, + string nodeName: string ref, + int parentid: @package ref, + int sourceid: @classorinterface ref +); + +file_class( + int id: @classorinterface ref +); + +class_object( + unique int id: @classorinterface ref, + unique int instance: @field ref +); + +type_companion_object( + unique int id: @classorinterface ref, + unique int instance: @field ref, + unique int companion_object: @classorinterface ref +); + +kt_nullable_types( + unique int id: @kt_nullable_type, + int classid: @reftype ref +) + +kt_notnull_types( + unique int id: @kt_notnull_type, + int classid: @reftype ref +) + +kt_type_alias( + unique int id: @kt_type_alias, + string name: string ref, + int kttypeid: @kt_type ref +) + +@kt_type = @kt_nullable_type | @kt_notnull_type + +isInterface( + unique int id: @classorinterface ref +); + +isRecord( + unique int id: @classorinterface ref +); + +fielddecls( + unique int id: @fielddecl, + int parentid: @reftype ref +); + +#keyset[fieldId] #keyset[fieldDeclId,pos] +fieldDeclaredIn( + int fieldId: @field ref, + int fieldDeclId: @fielddecl ref, + int pos: int ref +); + +fields( + unique int id: @field, + string nodeName: string ref, + int typeid: @type ref, + int parentid: @reftype ref, + int sourceid: @field ref +); + +fieldsKotlinType( + unique int id: @field ref, + int kttypeid: @kt_type ref +); + +constrs( + unique int id: @constructor, + string nodeName: string ref, + string signature: string ref, + int typeid: @type ref, + int parentid: @reftype ref, + int sourceid: @constructor ref +); + +constrsKotlinType( + unique int id: @constructor ref, + int kttypeid: @kt_type ref +); + +methods( + unique int id: @method, + string nodeName: string ref, + string signature: string ref, + int typeid: @type ref, + int parentid: @reftype ref, + int sourceid: @method ref +); + +methodsKotlinType( + unique int id: @method ref, + int kttypeid: @kt_type ref +); + +#keyset[parentid,pos] +params( + unique int id: @param, + int typeid: @type ref, + int pos: int ref, + int parentid: @callable ref, + int sourceid: @param ref +); + +paramsKotlinType( + unique int id: @param ref, + int kttypeid: @kt_type ref +); + +paramName( + unique int id: @param ref, + string nodeName: string ref +); + +isVarargsParam( + int param: @param ref +); + +exceptions( + unique int id: @exception, + int typeid: @type ref, + int parentid: @callable ref +); + +isAnnotType( + int interfaceid: @classorinterface ref +); + +isAnnotElem( + int methodid: @method ref +); + +annotValue( + int parentid: @annotation ref, + int id2: @method ref, + unique int value: @expr ref +); + +isEnumType( + int classid: @classorinterface ref +); + +isEnumConst( + int fieldid: @field ref +); + +#keyset[parentid,pos] +typeVars( + unique int id: @typevariable, + string nodeName: string ref, + int pos: int ref, + int kind: int ref, // deprecated + int parentid: @classorinterfaceorcallable ref +); + +wildcards( + unique int id: @wildcard, + string nodeName: string ref, + int kind: int ref +); + +#keyset[parentid,pos] +typeBounds( + unique int id: @typebound, + int typeid: @reftype ref, + int pos: int ref, + int parentid: @boundedtype ref +); + +#keyset[parentid,pos] +typeArgs( + int argumentid: @reftype ref, + int pos: int ref, + int parentid: @classorinterfaceorcallable ref +); + +isParameterized( + int memberid: @member ref +); + +isRaw( + int memberid: @member ref +); + +erasure( + unique int memberid: @member ref, + int erasureid: @member ref +); + +#keyset[classid] #keyset[parent] +isAnonymClass( + int classid: @classorinterface ref, + int parent: @classinstancexpr ref +); + +#keyset[typeid] #keyset[parent] +isLocalClassOrInterface( + int typeid: @classorinterface ref, + int parent: @localtypedeclstmt ref +); + +isDefConstr( + int constructorid: @constructor ref +); + +#keyset[exprId] +lambdaKind( + int exprId: @lambdaexpr ref, + int bodyKind: int ref +); + +arrays( + unique int id: @array, + string nodeName: string ref, + int elementtypeid: @type ref, + int dimension: int ref, + int componenttypeid: @type ref +); + +enclInReftype( + unique int child: @reftype ref, + int parent: @reftype ref +); + +extendsReftype( + int id1: @reftype ref, + int id2: @classorinterface ref +); + +implInterface( + int id1: @classorarray ref, + int id2: @classorinterface ref +); + +permits( + int id1: @classorinterface ref, + int id2: @classorinterface ref +); + +hasModifier( + int id1: @modifiable ref, + int id2: @modifier ref +); + +imports( + unique int id: @import, + int holder: @classorinterfaceorpackage ref, + string name: string ref, + int kind: int ref +); + +#keyset[parent,idx] +stmts( + unique int id: @stmt, + int kind: int ref, + int parent: @stmtparent ref, + int idx: int ref, + int bodydecl: @callable ref +); + +@stmtparent = @callable | @stmt | @switchexpr | @whenexpr| @stmtexpr; + +case @stmt.kind of + 0 = @block +| 1 = @ifstmt +| 2 = @forstmt +| 3 = @enhancedforstmt +| 4 = @whilestmt +| 5 = @dostmt +| 6 = @trystmt +| 7 = @switchstmt +| 8 = @synchronizedstmt +| 9 = @returnstmt +| 10 = @throwstmt +| 11 = @breakstmt +| 12 = @continuestmt +| 13 = @emptystmt +| 14 = @exprstmt +| 15 = @labeledstmt +| 16 = @assertstmt +| 17 = @localvariabledeclstmt +| 18 = @localtypedeclstmt +| 19 = @constructorinvocationstmt +| 20 = @superconstructorinvocationstmt +| 21 = @case +| 22 = @catchclause +| 23 = @yieldstmt +| 24 = @errorstmt +| 25 = @whenbranch +; + +#keyset[parent,idx] +exprs( + unique int id: @expr, + int kind: int ref, + int typeid: @type ref, + int parent: @exprparent ref, + int idx: int ref +); + +exprsKotlinType( + unique int id: @expr ref, + int kttypeid: @kt_type ref +); + +callableEnclosingExpr( + unique int id: @expr ref, + int callable_id: @callable ref +); + +statementEnclosingExpr( + unique int id: @expr ref, + int statement_id: @stmt ref +); + +isParenthesized( + unique int id: @expr ref, + int parentheses: int ref +); + +case @expr.kind of + 1 = @arrayaccess +| 2 = @arraycreationexpr +| 3 = @arrayinit +| 4 = @assignexpr +| 5 = @assignaddexpr +| 6 = @assignsubexpr +| 7 = @assignmulexpr +| 8 = @assigndivexpr +| 9 = @assignremexpr +| 10 = @assignandexpr +| 11 = @assignorexpr +| 12 = @assignxorexpr +| 13 = @assignlshiftexpr +| 14 = @assignrshiftexpr +| 15 = @assignurshiftexpr +| 16 = @booleanliteral +| 17 = @integerliteral +| 18 = @longliteral +| 19 = @floatingpointliteral +| 20 = @doubleliteral +| 21 = @characterliteral +| 22 = @stringliteral +| 23 = @nullliteral +| 24 = @mulexpr +| 25 = @divexpr +| 26 = @remexpr +| 27 = @addexpr +| 28 = @subexpr +| 29 = @lshiftexpr +| 30 = @rshiftexpr +| 31 = @urshiftexpr +| 32 = @andbitexpr +| 33 = @orbitexpr +| 34 = @xorbitexpr +| 35 = @andlogicalexpr +| 36 = @orlogicalexpr +| 37 = @ltexpr +| 38 = @gtexpr +| 39 = @leexpr +| 40 = @geexpr +| 41 = @eqexpr +| 42 = @neexpr +| 43 = @postincexpr +| 44 = @postdecexpr +| 45 = @preincexpr +| 46 = @predecexpr +| 47 = @minusexpr +| 48 = @plusexpr +| 49 = @bitnotexpr +| 50 = @lognotexpr +| 51 = @castexpr +| 52 = @newexpr +| 53 = @conditionalexpr +| 54 = @parexpr // deprecated +| 55 = @instanceofexpr +| 56 = @localvariabledeclexpr +| 57 = @typeliteral +| 58 = @thisaccess +| 59 = @superaccess +| 60 = @varaccess +| 61 = @methodaccess +| 62 = @unannotatedtypeaccess +| 63 = @arraytypeaccess +| 64 = @packageaccess +| 65 = @wildcardtypeaccess +| 66 = @declannotation +| 67 = @uniontypeaccess +| 68 = @lambdaexpr +| 69 = @memberref +| 70 = @annotatedtypeaccess +| 71 = @typeannotation +| 72 = @intersectiontypeaccess +| 73 = @switchexpr +| 74 = @errorexpr +| 75 = @whenexpr +| 76 = @getclassexpr +| 77 = @safecastexpr +| 78 = @implicitcastexpr +| 79 = @implicitnotnullexpr +| 80 = @implicitcoerciontounitexpr +| 81 = @notinstanceofexpr +| 82 = @stmtexpr +| 83 = @stringtemplateexpr +| 84 = @notnullexpr +| 85 = @unsafecoerceexpr +| 86 = @valueeqexpr +| 87 = @valueneexpr +| 88 = @propertyref +; + +/** Holds if this `when` expression was written as an `if` expression. */ +when_if(unique int id: @whenexpr ref); + +/** Holds if this `when` branch was written as an `else` branch. */ +when_branch_else(unique int id: @whenbranch ref); + +@classinstancexpr = @newexpr | @lambdaexpr | @memberref | @propertyref + +@annotation = @declannotation | @typeannotation +@typeaccess = @unannotatedtypeaccess | @annotatedtypeaccess + +@assignment = @assignexpr + | @assignop; + +@unaryassignment = @postincexpr + | @postdecexpr + | @preincexpr + | @predecexpr; + +@assignop = @assignaddexpr + | @assignsubexpr + | @assignmulexpr + | @assigndivexpr + | @assignremexpr + | @assignandexpr + | @assignorexpr + | @assignxorexpr + | @assignlshiftexpr + | @assignrshiftexpr + | @assignurshiftexpr; + +@literal = @booleanliteral + | @integerliteral + | @longliteral + | @floatingpointliteral + | @doubleliteral + | @characterliteral + | @stringliteral + | @nullliteral; + +@binaryexpr = @mulexpr + | @divexpr + | @remexpr + | @addexpr + | @subexpr + | @lshiftexpr + | @rshiftexpr + | @urshiftexpr + | @andbitexpr + | @orbitexpr + | @xorbitexpr + | @andlogicalexpr + | @orlogicalexpr + | @ltexpr + | @gtexpr + | @leexpr + | @geexpr + | @eqexpr + | @neexpr + | @valueeqexpr + | @valueneexpr; + +@unaryexpr = @postincexpr + | @postdecexpr + | @preincexpr + | @predecexpr + | @minusexpr + | @plusexpr + | @bitnotexpr + | @lognotexpr + | @notnullexpr; + +@caller = @classinstancexpr + | @methodaccess + | @constructorinvocationstmt + | @superconstructorinvocationstmt; + +callableBinding( + unique int callerid: @caller ref, + int callee: @callable ref +); + +memberRefBinding( + unique int id: @expr ref, + int callable: @callable ref +); + +propertyRefGetBinding( + unique int id: @expr ref, + int getter: @callable ref +); + +propertyRefFieldBinding( + unique int id: @expr ref, + int field: @field ref +); + +propertyRefSetBinding( + unique int id: @expr ref, + int setter: @callable ref +); + +@exprparent = @stmt | @expr | @whenbranch | @callable | @field | @fielddecl | @classorinterface | @param | @localvar | @typevariable; + +variableBinding( + unique int expr: @varaccess ref, + int variable: @variable ref +); + +@variable = @localscopevariable | @field; + +@localscopevariable = @localvar | @param; + +localvars( + unique int id: @localvar, + string nodeName: string ref, + int typeid: @type ref, + int parentid: @localvariabledeclexpr ref +); + +localvarsKotlinType( + unique int id: @localvar ref, + int kttypeid: @kt_type ref +); + +@namedexprorstmt = @breakstmt + | @continuestmt + | @labeledstmt + | @literal; + +namestrings( + string name: string ref, + string value: string ref, + unique int parent: @namedexprorstmt ref +); + +/* + * Modules + */ + +#keyset[name] +modules( + unique int id: @module, + string name: string ref +); + +isOpen( + int id: @module ref +); + +#keyset[fileId] +cumodule( + int fileId: @file ref, + int moduleId: @module ref +); + +@directive = @requires + | @exports + | @opens + | @uses + | @provides + +#keyset[directive] +directives( + int id: @module ref, + int directive: @directive ref +); + +requires( + unique int id: @requires, + int target: @module ref +); + +isTransitive( + int id: @requires ref +); + +isStatic( + int id: @requires ref +); + +exports( + unique int id: @exports, + int target: @package ref +); + +exportsTo( + int id: @exports ref, + int target: @module ref +); + +opens( + unique int id: @opens, + int target: @package ref +); + +opensTo( + int id: @opens ref, + int target: @module ref +); + +uses( + unique int id: @uses, + string serviceInterface: string ref +); + +provides( + unique int id: @provides, + string serviceInterface: string ref +); + +providesWith( + int id: @provides ref, + string serviceImpl: string ref +); + +/* + * Javadoc + */ + +javadoc( + unique int id: @javadoc +); + +isNormalComment( + int commentid : @javadoc ref +); + +isEolComment( + int commentid : @javadoc ref +); + +hasJavadoc( + int documentableid: @member ref, + int javadocid: @javadoc ref +); + +#keyset[parentid,idx] +javadocTag( + unique int id: @javadocTag, + string name: string ref, + int parentid: @javadocParent ref, + int idx: int ref +); + +#keyset[parentid,idx] +javadocText( + unique int id: @javadocText, + string text: string ref, + int parentid: @javadocParent ref, + int idx: int ref +); + +@javadocParent = @javadoc | @javadocTag; +@javadocElement = @javadocTag | @javadocText; + +@classorinterfaceorpackage = @classorinterface | @package; +@classorinterfaceorcallable = @classorinterface | @callable; +@boundedtype = @typevariable | @wildcard; +@reftype = @classorinterface | @array | @boundedtype | @errortype; +@classorarray = @classorinterface | @array; +@type = @primitive | @reftype; +@callable = @method | @constructor; + +/** A program element that has a name. */ +@element = @package | @modifier | @annotation | @errortype | + @locatableElement; + +@locatableElement = @file | @primitive | @classorinterface | @method | @constructor | @param | @exception | @field | + @boundedtype | @array | @localvar | @expr | @stmt | @import | @fielddecl | @kt_type | @kt_type_alias | + @kt_property; + +@modifiable = @member_modifiable| @param | @localvar | @typevariable; + +@member_modifiable = @classorinterface | @method | @constructor | @field | @kt_property; + +@member = @method | @constructor | @field | @reftype ; + +/** A program element that has a location. */ +@locatable = @typebound | @javadoc | @javadocTag | @javadocText | @xmllocatable | @ktcomment | + @locatableElement; + +@top = @element | @locatable | @folder; + +/* + * 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; + +/* + * configuration files with key value pairs + */ + +configs( + unique int id: @config +); + +configNames( + unique int id: @configName, + int config: @config ref, + string name: string ref +); + +configValues( + unique int id: @configValue, + int config: @config ref, + string value: string ref +); + +configLocations( + int locatable: @configLocatable ref, + int location: @location_default ref +); + +@configLocatable = @config | @configName | @configValue; + +ktComments( + unique int id: @ktcomment, + int kind: int ref, + string text : string ref +) + +ktCommentSections( + unique int id: @ktcommentsection, + int comment: @ktcomment ref, + string content : string ref +) + +ktCommentSectionNames( + unique int id: @ktcommentsection ref, + string name : string ref +) + +ktCommentSectionSubjectNames( + unique int id: @ktcommentsection ref, + string subjectname : string ref +) + +#keyset[id, owner] +ktCommentOwners( + int id: @ktcomment ref, + int owner: @top ref +) + +ktExtensionFunctions( + unique int id: @method ref, + int typeid: @type ref, + int kttypeid: @kt_type ref +) + +ktProperties( + unique int id: @kt_property, + string nodeName: string ref +) + +ktPropertyGetters( + unique int id: @kt_property ref, + int getter: @method ref +) + +ktPropertySetters( + unique int id: @kt_property ref, + int setter: @method ref +) + +ktPropertyBackingFields( + unique int id: @kt_property ref, + int backingField: @field ref +) + +ktSyntheticBody( + unique int id: @callable ref, + int kind: int ref + // 1: ENUM_VALUES + // 2: ENUM_VALUEOF +) + +ktLocalFunction( + unique int id: @method ref +) + +ktInitializerAssignment( + unique int id: @assignexpr ref +) + +ktPropertyDelegates( + unique int id: @kt_property ref, + unique int variableId: @variable ref +) + +/** + * If `id` is a compiler generated element, then the kind indicates the + * reason that the compiler generated it. + * See `Element.compilerGeneratedReason()` for an explanation of what + * each `kind` means. + */ +compiler_generated( + unique int id: @element ref, + int kind: int ref +) + +ktFunctionOriginalNames( + unique int id: @method ref, + string name: string ref +) + +ktDataClasses( + unique int id: @classorinterface ref +) diff --git a/java/ql/lib/upgrades/934bf10b4bd34cf648893efcd1d0d7be9471d39f/semmlecode.dbscheme b/java/ql/lib/upgrades/934bf10b4bd34cf648893efcd1d0d7be9471d39f/semmlecode.dbscheme new file mode 100644 index 000000000000..7cbc85b1f3ec --- /dev/null +++ b/java/ql/lib/upgrades/934bf10b4bd34cf648893efcd1d0d7be9471d39f/semmlecode.dbscheme @@ -0,0 +1,1255 @@ +/** + * An invocation of the compiler. Note that more than one file may be + * compiled per invocation. For example, this command compiles three + * source files: + * + * javac A.java B.java C.java + * + * The `id` simply identifies the invocation, while `cwd` is the working + * directory from which the compiler was invoked. + */ +compilations( + /** + * An invocation of the compiler. Note that more than one file may + * be compiled per invocation. For example, this command compiles + * three source files: + * + * javac A.java B.java C.java + */ + unique int id : @compilation, + int kind: int ref, + string cwd : string ref, + string name : string ref +); + +case @compilation.kind of + 1 = @javacompilation +| 2 = @kotlincompilation +; + +compilation_started( + int id : @compilation ref +) + +compilation_info( + int id : @compilation ref, + string info_key: string ref, + string info_value: string ref +) + +/** + * The arguments that were passed to the extractor for a compiler + * invocation. If `id` is for the compiler invocation + * + * javac A.java B.java C.java + * + * then typically there will be rows for + * + * num | arg + * --- | --- + * 0 | *path to extractor* + * 1 | `--javac-args` + * 2 | A.java + * 3 | B.java + * 4 | C.java + */ +#keyset[id, num] +compilation_args( + int id : @compilation ref, + int num : int ref, + string arg : string ref +); + +/** + * The expanded arguments that were passed to the extractor for a + * compiler invocation. This is similar to `compilation_args`, but + * for a `@@@someFile` argument, it includes the arguments from that + * file, rather than just taking the argument literally. + */ +#keyset[id, num] +compilation_expanded_args( + int id : @compilation ref, + int num : int ref, + string arg : string ref +); + +/** + * The source files that are compiled by a compiler invocation. + * If `id` is for the compiler invocation + * + * javac A.java B.java C.java + * + * then there will be rows for + * + * num | arg + * --- | --- + * 0 | A.java + * 1 | B.java + * 2 | C.java + */ +#keyset[id, num] +compilation_compiling_files( + int id : @compilation ref, + int num : int ref, + int file : @file ref +); + +/** + * For each file recorded in `compilation_compiling_files`, + * there will be a corresponding row in + * `compilation_compiling_files_completed` once extraction + * of that file is complete. The `result` will indicate the + * extraction result: + * + * 0: Successfully extracted + * 1: Errors were encountered, but extraction recovered + * 2: Errors were encountered, and extraction could not recover + */ +#keyset[id, num] +compilation_compiling_files_completed( + int id : @compilation ref, + int num : int ref, + int result : int ref +); + +/** + * The time taken by the extractor for a compiler invocation. + * + * For each file `num`, there will be rows for + * + * kind | seconds + * ---- | --- + * 1 | CPU seconds used by the extractor frontend + * 2 | Elapsed seconds during the extractor frontend + * 3 | CPU seconds used by the extractor backend + * 4 | Elapsed seconds during the extractor backend + */ +#keyset[id, num, kind] +compilation_time( + int id : @compilation ref, + int num : int ref, + /* kind: + 1 = frontend_cpu_seconds + 2 = frontend_elapsed_seconds + 3 = extractor_cpu_seconds + 4 = extractor_elapsed_seconds + */ + int kind : int ref, + float seconds : float ref +); + +/** + * An error or warning generated by the extractor. + * The diagnostic message `diagnostic` was generated during compiler + * invocation `compilation`, and is the `file_number_diagnostic_number`th + * message generated while extracting the `file_number`th file of that + * invocation. + */ +#keyset[compilation, file_number, file_number_diagnostic_number] +diagnostic_for( + unique int diagnostic : @diagnostic ref, + int compilation : @compilation ref, + int file_number : int ref, + int file_number_diagnostic_number : int ref +); + +/** + * The `cpu_seconds` and `elapsed_seconds` are the CPU time and elapsed + * time (respectively) that the original compilation (not the extraction) + * took for compiler invocation `id`. + */ +compilation_compiler_times( + unique int id : @compilation ref, + float cpu_seconds : float ref, + float elapsed_seconds : float ref +); + +/** + * If extraction was successful, then `cpu_seconds` and + * `elapsed_seconds` are the CPU time and elapsed time (respectively) + * that extraction took for compiler invocation `id`. + * The `result` will indicate the extraction result: + * + * 0: Successfully extracted + * 1: Errors were encountered, but extraction recovered + * 2: Errors were encountered, and extraction could not recover + */ +compilation_finished( + unique int id : @compilation ref, + float cpu_seconds : float ref, + float elapsed_seconds : float ref, + int result : int ref +); + +diagnostics( + unique int id: @diagnostic, + string generated_by: string ref, // TODO: Sync this with the other languages? + int severity: int ref, + string error_tag: string ref, + string error_message: string ref, + string full_error_message: string ref, + int location: @location_default ref +); + +/* + * External artifacts + */ + +externalData( + int id : @externalDataElement, + string path : string ref, + int column: int ref, + string value : string ref +); + +snapshotDate( + unique date snapshotDate : date ref +); + +sourceLocationPrefix( + string prefix : string ref +); + +/* + * Duplicate code + */ + +duplicateCode( + unique int id : @duplication, + string relativePath : string ref, + int equivClass : int ref +); + +similarCode( + unique int id : @similarity, + string 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 +); + +/* + * SMAP + */ + +smap_header( + int outputFileId: @file ref, + string outputFilename: string ref, + string defaultStratum: string ref +); + +smap_files( + int outputFileId: @file ref, + string stratum: string ref, + int inputFileNum: int ref, + string inputFileName: string ref, + int inputFileId: @file ref +); + +smap_lines( + int outputFileId: @file ref, + string stratum: string ref, + int inputFileNum: int ref, + int inputStartLine: int ref, + int inputLineCount: int ref, + int outputStartLine: int ref, + int outputLineIncrement: int ref +); + +/* + * Locations and files + */ + +@location = @location_default ; + +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 +); + +hasLocation( + int locatableid: @locatable ref, + int id: @location ref +); + +@sourceline = @locatable ; + +#keyset[element_id] +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 +); + +@container = @folder | @file + +containerparent( + int parent: @container ref, + unique int child: @container ref +); + +/* + * Java + */ + +cupackage( + unique int id: @file ref, + int packageid: @package ref +); + +#keyset[fileid,keyName] +jarManifestMain( + int fileid: @file ref, + string keyName: string ref, + string value: string ref +); + +#keyset[fileid,entryName,keyName] +jarManifestEntries( + int fileid: @file ref, + string entryName: string ref, + string keyName: string ref, + string value: string ref +); + +packages( + unique int id: @package, + string nodeName: string ref +); + +primitives( + unique int id: @primitive, + string nodeName: string ref +); + +modifiers( + unique int id: @modifier, + string nodeName: string ref +); + +/** + * An errortype is used when the extractor is unable to extract a type + * correctly for some reason. + */ +error_type( + unique int id: @errortype +); + +classes_or_interfaces( + unique int id: @classorinterface, + string nodeName: string ref, + int parentid: @package ref, + int sourceid: @classorinterface ref +); + +file_class( + int id: @classorinterface ref +); + +class_object( + unique int id: @classorinterface ref, + unique int instance: @field ref +); + +type_companion_object( + unique int id: @classorinterface ref, + unique int instance: @field ref, + unique int companion_object: @classorinterface ref +); + +kt_nullable_types( + unique int id: @kt_nullable_type, + int classid: @reftype ref +) + +kt_notnull_types( + unique int id: @kt_notnull_type, + int classid: @reftype ref +) + +kt_type_alias( + unique int id: @kt_type_alias, + string name: string ref, + int kttypeid: @kt_type ref +) + +@kt_type = @kt_nullable_type | @kt_notnull_type + +isInterface( + unique int id: @classorinterface ref +); + +isRecord( + unique int id: @classorinterface ref +); + +fielddecls( + unique int id: @fielddecl, + int parentid: @reftype ref +); + +#keyset[fieldId] #keyset[fieldDeclId,pos] +fieldDeclaredIn( + int fieldId: @field ref, + int fieldDeclId: @fielddecl ref, + int pos: int ref +); + +fields( + unique int id: @field, + string nodeName: string ref, + int typeid: @type ref, + int parentid: @reftype ref, + int sourceid: @field ref +); + +fieldsKotlinType( + unique int id: @field ref, + int kttypeid: @kt_type ref +); + +constrs( + unique int id: @constructor, + string nodeName: string ref, + string signature: string ref, + int typeid: @type ref, + int parentid: @reftype ref, + int sourceid: @constructor ref +); + +constrsKotlinType( + unique int id: @constructor ref, + int kttypeid: @kt_type ref +); + +methods( + unique int id: @method, + string nodeName: string ref, + string signature: string ref, + int typeid: @type ref, + int parentid: @reftype ref, + int sourceid: @method ref +); + +methodsKotlinType( + unique int id: @method ref, + int kttypeid: @kt_type ref +); + +#keyset[parentid,pos] +params( + unique int id: @param, + int typeid: @type ref, + int pos: int ref, + int parentid: @callable ref, + int sourceid: @param ref +); + +paramsKotlinType( + unique int id: @param ref, + int kttypeid: @kt_type ref +); + +paramName( + unique int id: @param ref, + string nodeName: string ref +); + +isVarargsParam( + int param: @param ref +); + +exceptions( + unique int id: @exception, + int typeid: @type ref, + int parentid: @callable ref +); + +isAnnotType( + int interfaceid: @classorinterface ref +); + +isAnnotElem( + int methodid: @method ref +); + +annotValue( + int parentid: @annotation ref, + int id2: @method ref, + unique int value: @expr ref +); + +isEnumType( + int classid: @classorinterface ref +); + +isEnumConst( + int fieldid: @field ref +); + +#keyset[parentid,pos] +typeVars( + unique int id: @typevariable, + string nodeName: string ref, + int pos: int ref, + int kind: int ref, // deprecated + int parentid: @classorinterfaceorcallable ref +); + +wildcards( + unique int id: @wildcard, + string nodeName: string ref, + int kind: int ref +); + +#keyset[parentid,pos] +typeBounds( + unique int id: @typebound, + int typeid: @reftype ref, + int pos: int ref, + int parentid: @boundedtype ref +); + +#keyset[parentid,pos] +typeArgs( + int argumentid: @reftype ref, + int pos: int ref, + int parentid: @classorinterfaceorcallable ref +); + +isParameterized( + int memberid: @member ref +); + +isRaw( + int memberid: @member ref +); + +erasure( + unique int memberid: @member ref, + int erasureid: @member ref +); + +#keyset[classid] #keyset[parent] +isAnonymClass( + int classid: @classorinterface ref, + int parent: @classinstancexpr ref +); + +#keyset[typeid] #keyset[parent] +isLocalClassOrInterface( + int typeid: @classorinterface ref, + int parent: @localtypedeclstmt ref +); + +isDefConstr( + int constructorid: @constructor ref +); + +#keyset[exprId] +lambdaKind( + int exprId: @lambdaexpr ref, + int bodyKind: int ref +); + +arrays( + unique int id: @array, + string nodeName: string ref, + int elementtypeid: @type ref, + int dimension: int ref, + int componenttypeid: @type ref +); + +enclInReftype( + unique int child: @reftype ref, + int parent: @reftype ref +); + +extendsReftype( + int id1: @reftype ref, + int id2: @classorinterface ref +); + +implInterface( + int id1: @classorarray ref, + int id2: @classorinterface ref +); + +permits( + int id1: @classorinterface ref, + int id2: @classorinterface ref +); + +hasModifier( + int id1: @modifiable ref, + int id2: @modifier ref +); + +imports( + unique int id: @import, + int holder: @classorinterfaceorpackage ref, + string name: string ref, + int kind: int ref +); + +#keyset[parent,idx] +stmts( + unique int id: @stmt, + int kind: int ref, + int parent: @stmtparent ref, + int idx: int ref, + int bodydecl: @callable ref +); + +@stmtparent = @callable | @stmt | @switchexpr | @whenexpr| @stmtexpr; + +case @stmt.kind of + 0 = @block +| 1 = @ifstmt +| 2 = @forstmt +| 3 = @enhancedforstmt +| 4 = @whilestmt +| 5 = @dostmt +| 6 = @trystmt +| 7 = @switchstmt +| 8 = @synchronizedstmt +| 9 = @returnstmt +| 10 = @throwstmt +| 11 = @breakstmt +| 12 = @continuestmt +| 13 = @emptystmt +| 14 = @exprstmt +| 15 = @labeledstmt +| 16 = @assertstmt +| 17 = @localvariabledeclstmt +| 18 = @localtypedeclstmt +| 19 = @constructorinvocationstmt +| 20 = @superconstructorinvocationstmt +| 21 = @case +| 22 = @catchclause +| 23 = @yieldstmt +| 24 = @errorstmt +| 25 = @whenbranch +; + +#keyset[parent,idx] +exprs( + unique int id: @expr, + int kind: int ref, + int typeid: @type ref, + int parent: @exprparent ref, + int idx: int ref +); + +exprsKotlinType( + unique int id: @expr ref, + int kttypeid: @kt_type ref +); + +callableEnclosingExpr( + unique int id: @expr ref, + int callable_id: @callable ref +); + +statementEnclosingExpr( + unique int id: @expr ref, + int statement_id: @stmt ref +); + +isParenthesized( + unique int id: @expr ref, + int parentheses: int ref +); + +case @expr.kind of + 1 = @arrayaccess +| 2 = @arraycreationexpr +| 3 = @arrayinit +| 4 = @assignexpr +| 5 = @assignaddexpr +| 6 = @assignsubexpr +| 7 = @assignmulexpr +| 8 = @assigndivexpr +| 9 = @assignremexpr +| 10 = @assignandexpr +| 11 = @assignorexpr +| 12 = @assignxorexpr +| 13 = @assignlshiftexpr +| 14 = @assignrshiftexpr +| 15 = @assignurshiftexpr +| 16 = @booleanliteral +| 17 = @integerliteral +| 18 = @longliteral +| 19 = @floatingpointliteral +| 20 = @doubleliteral +| 21 = @characterliteral +| 22 = @stringliteral +| 23 = @nullliteral +| 24 = @mulexpr +| 25 = @divexpr +| 26 = @remexpr +| 27 = @addexpr +| 28 = @subexpr +| 29 = @lshiftexpr +| 30 = @rshiftexpr +| 31 = @urshiftexpr +| 32 = @andbitexpr +| 33 = @orbitexpr +| 34 = @xorbitexpr +| 35 = @andlogicalexpr +| 36 = @orlogicalexpr +| 37 = @ltexpr +| 38 = @gtexpr +| 39 = @leexpr +| 40 = @geexpr +| 41 = @eqexpr +| 42 = @neexpr +| 43 = @postincexpr +| 44 = @postdecexpr +| 45 = @preincexpr +| 46 = @predecexpr +| 47 = @minusexpr +| 48 = @plusexpr +| 49 = @bitnotexpr +| 50 = @lognotexpr +| 51 = @castexpr +| 52 = @newexpr +| 53 = @conditionalexpr +| 54 = @parexpr // deprecated +| 55 = @instanceofexpr +| 56 = @localvariabledeclexpr +| 57 = @typeliteral +| 58 = @thisaccess +| 59 = @superaccess +| 60 = @varaccess +| 61 = @methodaccess +| 62 = @unannotatedtypeaccess +| 63 = @arraytypeaccess +| 64 = @packageaccess +| 65 = @wildcardtypeaccess +| 66 = @declannotation +| 67 = @uniontypeaccess +| 68 = @lambdaexpr +| 69 = @memberref +| 70 = @annotatedtypeaccess +| 71 = @typeannotation +| 72 = @intersectiontypeaccess +| 73 = @switchexpr +| 74 = @errorexpr +| 75 = @whenexpr +| 76 = @getclassexpr +| 77 = @safecastexpr +| 78 = @implicitcastexpr +| 79 = @implicitnotnullexpr +| 80 = @implicitcoerciontounitexpr +| 81 = @notinstanceofexpr +| 82 = @stmtexpr +| 83 = @stringtemplateexpr +| 84 = @notnullexpr +| 85 = @unsafecoerceexpr +| 86 = @valueeqexpr +| 87 = @valueneexpr +| 88 = @propertyref +; + +/** Holds if this `when` expression was written as an `if` expression. */ +when_if(unique int id: @whenexpr ref); + +/** Holds if this `when` branch was written as an `else` branch. */ +when_branch_else(unique int id: @whenbranch ref); + +@classinstancexpr = @newexpr | @lambdaexpr | @memberref | @propertyref + +@annotation = @declannotation | @typeannotation +@typeaccess = @unannotatedtypeaccess | @annotatedtypeaccess + +@assignment = @assignexpr + | @assignop; + +@unaryassignment = @postincexpr + | @postdecexpr + | @preincexpr + | @predecexpr; + +@assignop = @assignaddexpr + | @assignsubexpr + | @assignmulexpr + | @assigndivexpr + | @assignremexpr + | @assignandexpr + | @assignorexpr + | @assignxorexpr + | @assignlshiftexpr + | @assignrshiftexpr + | @assignurshiftexpr; + +@literal = @booleanliteral + | @integerliteral + | @longliteral + | @floatingpointliteral + | @doubleliteral + | @characterliteral + | @stringliteral + | @nullliteral; + +@binaryexpr = @mulexpr + | @divexpr + | @remexpr + | @addexpr + | @subexpr + | @lshiftexpr + | @rshiftexpr + | @urshiftexpr + | @andbitexpr + | @orbitexpr + | @xorbitexpr + | @andlogicalexpr + | @orlogicalexpr + | @ltexpr + | @gtexpr + | @leexpr + | @geexpr + | @eqexpr + | @neexpr + | @valueeqexpr + | @valueneexpr; + +@unaryexpr = @postincexpr + | @postdecexpr + | @preincexpr + | @predecexpr + | @minusexpr + | @plusexpr + | @bitnotexpr + | @lognotexpr + | @notnullexpr; + +@caller = @classinstancexpr + | @methodaccess + | @constructorinvocationstmt + | @superconstructorinvocationstmt; + +callableBinding( + unique int callerid: @caller ref, + int callee: @callable ref +); + +memberRefBinding( + unique int id: @expr ref, + int callable: @callable ref +); + +propertyRefGetBinding( + unique int id: @expr ref, + int getter: @callable ref +); + +propertyRefFieldBinding( + unique int id: @expr ref, + int field: @field ref +); + +propertyRefSetBinding( + unique int id: @expr ref, + int setter: @callable ref +); + +@exprparent = @stmt | @expr | @whenbranch | @callable | @field | @fielddecl | @classorinterface | @param | @localvar | @typevariable; + +variableBinding( + unique int expr: @varaccess ref, + int variable: @variable ref +); + +@variable = @localscopevariable | @field; + +@localscopevariable = @localvar | @param; + +localvars( + unique int id: @localvar, + string nodeName: string ref, + int typeid: @type ref, + int parentid: @localvariabledeclexpr ref +); + +localvarsKotlinType( + unique int id: @localvar ref, + int kttypeid: @kt_type ref +); + +@namedexprorstmt = @breakstmt + | @continuestmt + | @labeledstmt + | @literal; + +namestrings( + string name: string ref, + string value: string ref, + unique int parent: @namedexprorstmt ref +); + +/* + * Modules + */ + +#keyset[name] +modules( + unique int id: @module, + string name: string ref +); + +isOpen( + int id: @module ref +); + +#keyset[fileId] +cumodule( + int fileId: @file ref, + int moduleId: @module ref +); + +@directive = @requires + | @exports + | @opens + | @uses + | @provides + +#keyset[directive] +directives( + int id: @module ref, + int directive: @directive ref +); + +requires( + unique int id: @requires, + int target: @module ref +); + +isTransitive( + int id: @requires ref +); + +isStatic( + int id: @requires ref +); + +exports( + unique int id: @exports, + int target: @package ref +); + +exportsTo( + int id: @exports ref, + int target: @module ref +); + +opens( + unique int id: @opens, + int target: @package ref +); + +opensTo( + int id: @opens ref, + int target: @module ref +); + +uses( + unique int id: @uses, + string serviceInterface: string ref +); + +provides( + unique int id: @provides, + string serviceInterface: string ref +); + +providesWith( + int id: @provides ref, + string serviceImpl: string ref +); + +/* + * Javadoc + */ + +javadoc( + unique int id: @javadoc +); + +isNormalComment( + int commentid : @javadoc ref +); + +isEolComment( + int commentid : @javadoc ref +); + +hasJavadoc( + int documentableid: @member ref, + int javadocid: @javadoc ref +); + +#keyset[parentid,idx] +javadocTag( + unique int id: @javadocTag, + string name: string ref, + int parentid: @javadocParent ref, + int idx: int ref +); + +#keyset[parentid,idx] +javadocText( + unique int id: @javadocText, + string text: string ref, + int parentid: @javadocParent ref, + int idx: int ref +); + +@javadocParent = @javadoc | @javadocTag; +@javadocElement = @javadocTag | @javadocText; + +@classorinterfaceorpackage = @classorinterface | @package; +@classorinterfaceorcallable = @classorinterface | @callable; +@boundedtype = @typevariable | @wildcard; +@reftype = @classorinterface | @array | @boundedtype | @errortype; +@classorarray = @classorinterface | @array; +@type = @primitive | @reftype; +@callable = @method | @constructor; + +/** A program element that has a name. */ +@element = @package | @modifier | @annotation | @errortype | + @locatableElement; + +@locatableElement = @file | @primitive | @classorinterface | @method | @constructor | @param | @exception | @field | + @boundedtype | @array | @localvar | @expr | @stmt | @import | @fielddecl | @kt_type | @kt_type_alias | + @kt_property; + +@modifiable = @member_modifiable| @param | @localvar | @typevariable; + +@member_modifiable = @classorinterface | @method | @constructor | @field | @kt_property; + +@member = @method | @constructor | @field | @reftype ; + +/** A program element that has a location. */ +@locatable = @typebound | @javadoc | @javadocTag | @javadocText | @xmllocatable | @ktcomment | + @locatableElement; + +@top = @element | @locatable | @folder; + +/* + * 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; + +/* + * configuration files with key value pairs + */ + +configs( + unique int id: @config +); + +configNames( + unique int id: @configName, + int config: @config ref, + string name: string ref +); + +configValues( + unique int id: @configValue, + int config: @config ref, + string value: string ref +); + +configLocations( + int locatable: @configLocatable ref, + int location: @location_default ref +); + +@configLocatable = @config | @configName | @configValue; + +ktComments( + unique int id: @ktcomment, + int kind: int ref, + string text : string ref +) + +ktCommentSections( + unique int id: @ktcommentsection, + int comment: @ktcomment ref, + string content : string ref +) + +ktCommentSectionNames( + unique int id: @ktcommentsection ref, + string name : string ref +) + +ktCommentSectionSubjectNames( + unique int id: @ktcommentsection ref, + string subjectname : string ref +) + +#keyset[id, owner] +ktCommentOwners( + int id: @ktcomment ref, + int owner: @top ref +) + +ktExtensionFunctions( + unique int id: @method ref, + int typeid: @type ref, + int kttypeid: @kt_type ref +) + +ktProperties( + unique int id: @kt_property, + string nodeName: string ref +) + +ktPropertyGetters( + unique int id: @kt_property ref, + int getter: @method ref +) + +ktPropertySetters( + unique int id: @kt_property ref, + int setter: @method ref +) + +ktPropertyBackingFields( + unique int id: @kt_property ref, + int backingField: @field ref +) + +ktSyntheticBody( + unique int id: @callable ref, + int kind: int ref + // 1: ENUM_VALUES + // 2: ENUM_VALUEOF +) + +ktLocalFunction( + unique int id: @method ref +) + +ktInitializerAssignment( + unique int id: @assignexpr ref +) + +ktPropertyDelegates( + unique int id: @kt_property ref, + unique int variableId: @variable ref +) + +/** + * If `id` is a compiler generated element, then the kind indicates the + * reason that the compiler generated it. + * See `Element.compilerGeneratedReason()` for an explanation of what + * each `kind` means. + */ +compiler_generated( + unique int id: @element ref, + int kind: int ref +) + +ktFunctionOriginalNames( + unique int id: @method ref, + string name: string ref +) + +ktDataClasses( + unique int id: @classorinterface ref +) diff --git a/java/ql/lib/upgrades/934bf10b4bd34cf648893efcd1d0d7be9471d39f/upgrade.properties b/java/ql/lib/upgrades/934bf10b4bd34cf648893efcd1d0d7be9471d39f/upgrade.properties new file mode 100644 index 000000000000..652e17fd5034 --- /dev/null +++ b/java/ql/lib/upgrades/934bf10b4bd34cf648893efcd1d0d7be9471d39f/upgrade.properties @@ -0,0 +1,2 @@ +description: Add compilation_expanded_args +compatibility: backwards