@@ -220,7 +220,7 @@ predicate modelCoverage(string package, int pkgs, string kind, string part, int
220
220
/** Provides a query predicate to check the MaD models for validation errors. */
221
221
module ModelValidation {
222
222
private string getInvalidModelInput ( ) {
223
- exists ( string pred , string input , string part |
223
+ exists ( string pred , AccessPath input , AccessPathToken part |
224
224
sinkModel ( _, _, _, _, _, _, input , _, _) and pred = "sink"
225
225
or
226
226
summaryModel ( _, _, _, _, _, _, input , _, _, _) and pred = "summary"
@@ -229,9 +229,10 @@ module ModelValidation {
229
229
invalidSpecComponent ( input , part ) and
230
230
not part = "" and
231
231
not ( part = "Argument" and pred = "sink" ) and
232
- not parseArg ( part , _)
232
+ not parseArg ( part , _) and
233
+ not part .getName ( ) = "Field"
233
234
or
234
- part = input .( AccessPath ) . getToken ( 0 ) and
235
+ part = input .getToken ( 0 ) and
235
236
parseParam ( part , _)
236
237
or
237
238
invalidIndexComponent ( input , part )
@@ -241,15 +242,16 @@ module ModelValidation {
241
242
}
242
243
243
244
private string getInvalidModelOutput ( ) {
244
- exists ( string pred , string output , string part |
245
+ exists ( string pred , AccessPath output , AccessPathToken part |
245
246
sourceModel ( _, _, _, _, _, _, output , _, _) and pred = "source"
246
247
or
247
248
summaryModel ( _, _, _, _, _, _, _, output , _, _) and pred = "summary"
248
249
|
249
250
(
250
251
invalidSpecComponent ( output , part ) and
251
252
not part = "" and
252
- not ( part = [ "Argument" , "Parameter" ] and pred = "source" )
253
+ not ( part = [ "Argument" , "Parameter" ] and pred = "source" ) and
254
+ not part .getName ( ) = "Field"
253
255
or
254
256
invalidIndexComponent ( output , part )
255
257
) and
0 commit comments