@@ -204,6 +204,29 @@ private predicate summaryModel(
204204 )
205205}
206206
207+ /**
208+ * Holds if CSV framework coverage of `package` is `n` api endpoints of the
209+ * kind `(kind, part)`.
210+ */
211+ predicate modelCoverage ( string package , string kind , string part , int n ) {
212+ part = "source" and
213+ n =
214+ strictcount ( string type , boolean subtypes , string name , string signature , string ext ,
215+ string output | sourceModel ( package , type , subtypes , name , signature , ext , output , kind ) )
216+ or
217+ part = "sink" and
218+ n =
219+ strictcount ( string type , boolean subtypes , string name , string signature , string ext ,
220+ string input | sinkModel ( package , type , subtypes , name , signature , ext , input , kind ) )
221+ or
222+ part = "summary" and
223+ n =
224+ strictcount ( string type , boolean subtypes , string name , string signature , string ext ,
225+ string input , string output |
226+ summaryModel ( package , type , subtypes , name , signature , ext , input , output , kind )
227+ )
228+ }
229+
207230/** Provides a query predicate to check the CSV data for validation errors. */
208231module CsvValidation {
209232 /** Holds if some row in a CSV-based flow model appears to contain typos. */
0 commit comments