@@ -126,6 +126,148 @@ module EvaluatorLog {
126
126
}
127
127
}
128
128
129
+ module KindPredicatesLog {
130
+ class SummaryHeader extends Object {
131
+ SummaryHeader ( ) { exists ( this .getString ( "summaryLogVersion" ) ) }
132
+
133
+ string getSummaryLogVersion ( ) { result = this .getString ( "summaryLogVersion" ) }
134
+
135
+ string getCodeqlVersion ( ) { result = this .getString ( "codeqlVersion" ) }
136
+
137
+ private string getStartTimeString ( ) { result = this .getString ( "startTime" ) }
138
+
139
+ predicate hasStartTime (
140
+ int year , string month , int day , int hours , int minute , int second , int millisecond
141
+ ) {
142
+ exists ( string s , string r |
143
+ s = this .getStartTimeString ( ) and
144
+ r = "(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2})\\.(\\d{3})Z"
145
+ |
146
+ year = s .regexpCapture ( r , 1 ) .toInt ( ) and
147
+ month = s .regexpCapture ( r , 2 ) and
148
+ day = s .regexpCapture ( r , 3 ) .toInt ( ) and
149
+ hours = s .regexpCapture ( r , 4 ) .toInt ( ) and
150
+ minute = s .regexpCapture ( r , 5 ) .toInt ( ) and
151
+ second = s .regexpCapture ( r , 6 ) .toInt ( ) and
152
+ millisecond = s .regexpCapture ( r , 7 ) .toInt ( )
153
+ )
154
+ }
155
+ }
156
+
157
+ class AppearsAs extends Object {
158
+ SummaryEvent event ;
159
+
160
+ AppearsAs ( ) { event .getObject ( "appearsAs" ) = this }
161
+
162
+ SummaryEvent getSummaryEvent ( ) { result = event }
163
+
164
+ PredicateName getAPredicateName ( ) { result .getAppearsAs ( ) = this }
165
+ }
166
+
167
+ class PredicateName extends Object {
168
+ AppearsAs appearsAs ;
169
+
170
+ PredicateName ( ) { pragma [ only_bind_out ] ( appearsAs .getObject ( _) ) = this }
171
+
172
+ AppearsAs getAppearsAs ( ) { result = appearsAs }
173
+
174
+ Query getAQuery ( ) { result .getPredicateName ( ) = this }
175
+ }
176
+
177
+ class Query extends Array {
178
+ PredicateName predicateName ;
179
+
180
+ Query ( ) { this = predicateName .getArray ( _) }
181
+
182
+ PredicateName getPredicateName ( ) { result = predicateName }
183
+ }
184
+
185
+ class SummaryEvent extends Object {
186
+ string evaluationStrategy ;
187
+
188
+ SummaryEvent ( ) { evaluationStrategy = this .getString ( "evaluationStrategy" ) }
189
+
190
+ string getEvaluationStrategy ( ) { result = evaluationStrategy }
191
+
192
+ string getRAHash ( ) { result = this .getString ( "raHash" ) }
193
+
194
+ string getPredicateName ( ) { result = this .getString ( "predicateName" ) }
195
+
196
+ string getCompletionTimeString ( ) { result = this .getString ( "completionTime" ) }
197
+
198
+ AppearsAs getAppearsAs ( ) { result = this .getObject ( "appearsAs" ) }
199
+
200
+ predicate hasCompletionTime (
201
+ int year , string month , int day , int hours , int minute , int second , int millisecond
202
+ ) {
203
+ exists ( string s , string r |
204
+ s = this .getCompletionTimeString ( ) and
205
+ r = "(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2})\\.(\\d{3})Z"
206
+ |
207
+ year = s .regexpCapture ( r , 1 ) .toInt ( ) and
208
+ month = s .regexpCapture ( r , 2 ) and
209
+ day = s .regexpCapture ( r , 3 ) .toInt ( ) and
210
+ hours = s .regexpCapture ( r , 4 ) .toInt ( ) and
211
+ minute = s .regexpCapture ( r , 5 ) .toInt ( ) and
212
+ second = s .regexpCapture ( r , 6 ) .toInt ( ) and
213
+ millisecond = s .regexpCapture ( r , 7 ) .toInt ( )
214
+ )
215
+ }
216
+
217
+ int getResultSize ( ) { result = this .getNumber ( "resultSize" ) }
218
+ }
219
+
220
+ class SentinelEmpty extends SummaryEvent {
221
+ SentinelEmpty ( ) { evaluationStrategy = "SENTINEL_EMPTY" }
222
+ }
223
+
224
+ class PipeLineRun extends Object {
225
+ PipeLineRuns runs ;
226
+
227
+ PipeLineRun ( ) { runs .getObject ( _) = this }
228
+
229
+ PipeLineRuns getArray ( ) { result = runs }
230
+
231
+ string getRAReference ( ) { result = this .getString ( "raReference" ) }
232
+
233
+ Array getCounts ( ) { result = this .getArray ( "counts" ) }
234
+
235
+ Array getDuplicationPercentages ( ) { result = this .getArray ( "duplicationPercentages" ) }
236
+ }
237
+
238
+ class PipeLineRuns extends Array {
239
+ SummaryEvent event ;
240
+
241
+ PipeLineRuns ( ) { event .getArray ( "pipelineRuns" ) = this }
242
+
243
+ SummaryEvent getEvent ( ) { result = event }
244
+
245
+ PipeLineRun getRun ( int i ) { result = this .getObject ( i ) }
246
+ }
247
+
248
+ class ComputeSimple extends SummaryEvent {
249
+ ComputeSimple ( ) { evaluationStrategy = "COMPUTE_SIMPLE" }
250
+
251
+ PipeLineRun getPipelineRun ( ) { result .getArray ( ) = this .getArray ( "pipelineRuns" ) }
252
+ }
253
+
254
+ class ComputeRecursive extends SummaryEvent {
255
+ ComputeRecursive ( ) { evaluationStrategy = "COMPUTE_RECURSIVE" }
256
+ }
257
+
258
+ class InLayer extends SummaryEvent {
259
+ InLayer ( ) { evaluationStrategy = "IN_LAYER" }
260
+ }
261
+
262
+ class ComputedExtensional extends SummaryEvent {
263
+ ComputedExtensional ( ) { evaluationStrategy = "COMPUTED_EXTENSIONAL" }
264
+ }
265
+
266
+ class Extensional extends SummaryEvent {
267
+ Extensional ( ) { evaluationStrategy = "EXTENSIONAL" }
268
+ }
269
+ }
270
+
129
271
// Stuff to test whether we've covered all event types
130
272
private File logFile ( ) { result = any ( EvaluatorLog:: LogHeader h ) .getLocation ( ) .getFile ( ) }
131
273
0 commit comments