@@ -213,6 +213,8 @@ private module MadInput implements SharedMaD::InputSig {
213213 provenance = "manual" and
214214 model = ""
215215 }
216+
217+ string namespaceSegmentSeparator ( ) { result = "::" }
216218}
217219
218220private module MaD = SharedMaD:: ModelsAsData< Extensions , MadInput > ;
@@ -247,62 +249,6 @@ predicate summaryModel(
247249 )
248250}
249251
250- private predicate relevantNamespace ( string namespace ) {
251- sourceModel ( namespace , _, _, _, _, _, _, _, _, _) or
252- sinkModel ( namespace , _, _, _, _, _, _, _, _, _) or
253- summaryModel ( namespace , _, _, _, _, _, _, _, _, _, _)
254- }
255-
256- private predicate namespaceLink ( string shortns , string longns ) {
257- relevantNamespace ( shortns ) and
258- relevantNamespace ( longns ) and
259- longns .prefix ( longns .indexOf ( "::" ) ) = shortns
260- }
261-
262- private predicate canonicalNamespace ( string namespace ) {
263- relevantNamespace ( namespace ) and not namespaceLink ( _, namespace )
264- }
265-
266- private predicate canonicalNamespaceLink ( string namespace , string subns ) {
267- canonicalNamespace ( namespace ) and
268- ( subns = namespace or namespaceLink ( namespace , subns ) )
269- }
270-
271- /**
272- * Holds if MaD framework coverage of `namespace` is `n` api endpoints of the
273- * kind `(kind, part)`, and `namespaces` is the number of subnamespaces of
274- * `namespace` which have MaD framework coverage (including `namespace`
275- * itself).
276- */
277- predicate modelCoverage ( string namespace , int namespaces , string kind , string part , int n ) {
278- namespaces = strictcount ( string subns | canonicalNamespaceLink ( namespace , subns ) ) and
279- (
280- part = "source" and
281- n =
282- strictcount ( string subns , string type , boolean subtypes , string name , string signature ,
283- string ext , string output , string provenance , string model |
284- canonicalNamespaceLink ( namespace , subns ) and
285- sourceModel ( subns , type , subtypes , name , signature , ext , output , kind , provenance , model )
286- )
287- or
288- part = "sink" and
289- n =
290- strictcount ( string subns , string type , boolean subtypes , string name , string signature ,
291- string ext , string input , string provenance , string model |
292- canonicalNamespaceLink ( namespace , subns ) and
293- sinkModel ( subns , type , subtypes , name , signature , ext , input , kind , provenance , model )
294- )
295- or
296- part = "summary" and
297- n =
298- strictcount ( string subns , string type , boolean subtypes , string name , string signature ,
299- string ext , string input , string output , string provenance |
300- canonicalNamespaceLink ( namespace , subns ) and
301- summaryModel ( subns , type , subtypes , name , signature , ext , input , output , kind , provenance , _)
302- )
303- )
304- }
305-
306252/** Provides a query predicate to check the CSV data for validation errors. */
307253module CsvValidation {
308254 private string getInvalidModelInput ( ) {
0 commit comments