@@ -87,8 +87,12 @@ signature module InputSig {
8787 none ( )
8888 }
8989
90- /** Get the separator used between namespace segments. */
90+ /** Gets the separator used between namespace segments. */
9191 default string namespaceSegmentSeparator ( ) { result = "." }
92+
93+ /** Gets a cleaned-up version of the namespace for presentation in model coverage. */
94+ bindingset [ ns]
95+ default string cleanNamespace ( string ns ) { result = ns }
9296}
9397
9498module ModelsAsData< ExtensionsSig Extensions, InputSig Input> {
@@ -278,9 +282,11 @@ module ModelsAsData<ExtensionsSig Extensions, InputSig Input> {
278282 }
279283
280284 private predicate relevantNamespace ( string namespace ) {
281- sourceModel ( namespace , _, _, _, _, _, _, _, _, _) or
282- sinkModel ( namespace , _, _, _, _, _, _, _, _, _) or
283- summaryModel ( namespace , _, _, _, _, _, _, _, _, _, _)
285+ exists ( string ns | namespace = Input:: cleanNamespace ( ns ) |
286+ sourceModel ( ns , _, _, _, _, _, _, _, _, _) or
287+ sinkModel ( ns , _, _, _, _, _, _, _, _, _) or
288+ summaryModel ( ns , _, _, _, _, _, _, _, _, _, _)
289+ )
284290 }
285291
286292 private predicate namespaceLink ( string shortns , string longns ) {
@@ -309,25 +315,28 @@ module ModelsAsData<ExtensionsSig Extensions, InputSig Input> {
309315 (
310316 part = "source" and
311317 n =
312- strictcount ( string subns , string type , boolean subtypes , string name , string signature ,
313- string ext , string output , string provenance |
314- canonicalNamespaceLink ( namespace , subns ) and
318+ strictcount ( string subns , string subnsClean , string type , boolean subtypes , string name ,
319+ string signature , string ext , string output , string provenance |
320+ canonicalNamespaceLink ( namespace , subnsClean ) and
321+ subnsClean = Input:: cleanNamespace ( subns ) and
315322 sourceModel ( subns , type , subtypes , name , signature , ext , output , kind , provenance , _)
316323 )
317324 or
318325 part = "sink" and
319326 n =
320- strictcount ( string subns , string type , boolean subtypes , string name , string signature ,
321- string ext , string input , string provenance |
322- canonicalNamespaceLink ( namespace , subns ) and
327+ strictcount ( string subns , string subnsClean , string type , boolean subtypes , string name ,
328+ string signature , string ext , string input , string provenance |
329+ canonicalNamespaceLink ( namespace , subnsClean ) and
330+ subnsClean = Input:: cleanNamespace ( subns ) and
323331 sinkModel ( subns , type , subtypes , name , signature , ext , input , kind , provenance , _)
324332 )
325333 or
326334 part = "summary" and
327335 n =
328- strictcount ( string subns , string type , boolean subtypes , string name , string signature ,
329- string ext , string input , string output , string provenance |
330- canonicalNamespaceLink ( namespace , subns ) and
336+ strictcount ( string subns , string subnsClean , string type , boolean subtypes , string name ,
337+ string signature , string ext , string input , string output , string provenance |
338+ canonicalNamespaceLink ( namespace , subnsClean ) and
339+ subnsClean = Input:: cleanNamespace ( subns ) and
331340 summaryModel ( subns , type , subtypes , name , signature , ext , input , output , kind , provenance ,
332341 _)
333342 )
0 commit comments