@@ -126,6 +126,120 @@ module EvaluatorLog {
126126 }
127127}
128128
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+
218+ class SentinelEmpty extends SummaryEvent {
219+ SentinelEmpty ( ) { evaluationStrategy = "SENTINEL_EMPTY" }
220+ }
221+
222+ class ComputeSimple extends SummaryEvent {
223+ ComputeSimple ( ) { evaluationStrategy = "COMPUTE_SIMPLE" }
224+ }
225+
226+ class ComputeRecursive extends SummaryEvent {
227+ ComputeRecursive ( ) { evaluationStrategy = "COMPUTE_RECURSIVE" }
228+ }
229+
230+ class InLayer extends SummaryEvent {
231+ InLayer ( ) { evaluationStrategy = "IN_LAYER" }
232+ }
233+
234+ class ComputedExtensional extends SummaryEvent {
235+ ComputedExtensional ( ) { evaluationStrategy = "COMPUTED_EXTENSIONAL" }
236+ }
237+
238+ class Extensional extends SummaryEvent {
239+ Extensional ( ) { evaluationStrategy = "EXTENSIONAL" }
240+ }
241+ }
242+
129243// Stuff to test whether we've covered all event types
130244private File logFile ( ) { result = any ( EvaluatorLog:: LogHeader h ) .getLocation ( ) .getFile ( ) }
131245
0 commit comments