@@ -90,22 +90,18 @@ private predicate relevantPackage(string package) {
9090 summaryModel ( package , _, _, _, _, _, _, _, _, _, _)
9191}
9292
93- /**
94- * Holds if `package` and `subpkg` have MaD framework coverage and `subpkg`
95- * is a subpackage of `package`.
96- */
97- private predicate packageHasASubpackage ( string package , string subpkg ) {
98- relevantPackage ( package ) and
99- relevantPackage ( subpkg ) and
100- subpkg .prefix ( subpkg .indexOf ( "." ) ) = package
93+ private predicate packageLink ( string shortpkg , string longpkg ) {
94+ relevantPackage ( shortpkg ) and
95+ relevantPackage ( longpkg ) and
96+ longpkg .prefix ( longpkg .indexOf ( "." ) ) = shortpkg
10197}
10298
10399/**
104100 * Holds if `package` has MaD framework coverage and it is not a subpackage of
105101 * any other package with MaD framework coverage.
106102 */
107103private predicate canonicalPackage ( string package ) {
108- relevantPackage ( package ) and not packageHasASubpackage ( _, package )
104+ relevantPackage ( package ) and not packageLink ( _, package )
109105}
110106
111107/**
@@ -115,7 +111,7 @@ private predicate canonicalPackage(string package) {
115111 */
116112private predicate canonicalPackageHasASubpackage ( string package , string subpkg ) {
117113 canonicalPackage ( package ) and
118- ( subpkg = package or packageHasASubpackage ( package , subpkg ) )
114+ ( subpkg = package or packageLink ( package , subpkg ) )
119115}
120116
121117/**
0 commit comments