@@ -76,16 +76,6 @@ private module Frameworks {
7676 private import semmle.go.frameworks.Stdlib
7777}
7878
79- private class BuiltinModel extends SummaryModelCsv {
80- override predicate row ( string row ) {
81- row =
82- [
83- ";;false;append;;;Argument[0].ArrayElement;ReturnValue.ArrayElement;value" ,
84- ";;false;append;;;Argument[1];ReturnValue.ArrayElement;value"
85- ]
86- }
87- }
88-
8979/**
9080 * A unit class for adding additional source model rows.
9181 *
@@ -126,65 +116,13 @@ predicate sinkModel(string row) { any(SinkModelCsv s).row(row) }
126116predicate summaryModel ( string row ) { any ( SummaryModelCsv s ) .row ( row ) }
127117
128118/** Holds if a source model exists for the given parameters. */
129- predicate sourceModel (
130- string namespace , string type , boolean subtypes , string name , string signature , string ext ,
131- string output , string kind , string provenance
132- ) {
133- exists ( string row |
134- sourceModel ( row ) and
135- row .splitAt ( ";" , 0 ) = namespace and
136- row .splitAt ( ";" , 1 ) = type and
137- row .splitAt ( ";" , 2 ) = subtypes .toString ( ) and
138- subtypes = [ true , false ] and
139- row .splitAt ( ";" , 3 ) = name and
140- row .splitAt ( ";" , 4 ) = signature and
141- row .splitAt ( ";" , 5 ) = ext and
142- row .splitAt ( ";" , 6 ) = output and
143- row .splitAt ( ";" , 7 ) = kind and
144- provenance = "manual"
145- )
146- }
119+ predicate sourceModel = Extensions:: sourceModel / 9 ;
147120
148121/** Holds if a sink model exists for the given parameters. */
149- predicate sinkModel (
150- string namespace , string type , boolean subtypes , string name , string signature , string ext ,
151- string input , string kind , string provenance
152- ) {
153- exists ( string row |
154- sinkModel ( row ) and
155- row .splitAt ( ";" , 0 ) = namespace and
156- row .splitAt ( ";" , 1 ) = type and
157- row .splitAt ( ";" , 2 ) = subtypes .toString ( ) and
158- subtypes = [ true , false ] and
159- row .splitAt ( ";" , 3 ) = name and
160- row .splitAt ( ";" , 4 ) = signature and
161- row .splitAt ( ";" , 5 ) = ext and
162- row .splitAt ( ";" , 6 ) = input and
163- row .splitAt ( ";" , 7 ) = kind and
164- provenance = "manual"
165- )
166- }
122+ predicate sinkModel = Extensions:: sinkModel / 9 ;
167123
168124/** Holds if a summary model exists for the given parameters. */
169- predicate summaryModel (
170- string namespace , string type , boolean subtypes , string name , string signature , string ext ,
171- string input , string output , string kind , string provenance
172- ) {
173- exists ( string row |
174- summaryModel ( row ) and
175- row .splitAt ( ";" , 0 ) = namespace and
176- row .splitAt ( ";" , 1 ) = type and
177- row .splitAt ( ";" , 2 ) = subtypes .toString ( ) and
178- subtypes = [ true , false ] and
179- row .splitAt ( ";" , 3 ) = name and
180- row .splitAt ( ";" , 4 ) = signature and
181- row .splitAt ( ";" , 5 ) = ext and
182- row .splitAt ( ";" , 6 ) = input and
183- row .splitAt ( ";" , 7 ) = output and
184- row .splitAt ( ";" , 8 ) = kind
185- ) and
186- provenance = "manual"
187- }
125+ predicate summaryModel = Extensions:: summaryModel / 10 ;
188126
189127/** Holds if `package` have CSV framework coverage. */
190128private predicate packageHasCsvCoverage ( string package ) {
0 commit comments