@@ -415,44 +415,23 @@ predicate sinkNode(DataFlow::Node node, string kind) { sinkNode(node, kind, _) }
415415
416416// adapter class for converting Mad summaries to `SummarizedCallable`s
417417private class SummarizedCallableAdapter extends Public:: SummarizedCallable {
418- SummarizedCallableAdapter ( ) { summaryElement ( this , _, _, _, _, _) }
418+ string input_ ;
419+ string output_ ;
420+ string kind ;
421+ Public:: Provenance p_ ;
422+ string model_ ;
419423
420- private predicate relevantSummaryElementManual (
421- string input , string output , string kind , string model
422- ) {
423- exists ( Public:: Provenance provenance |
424- summaryElement ( this , input , output , kind , provenance , model ) and
425- provenance .isManual ( )
426- )
427- }
428-
429- private predicate relevantSummaryElementGenerated (
430- string input , string output , string kind , string model
431- ) {
432- exists ( Public:: Provenance provenance |
433- summaryElement ( this , input , output , kind , provenance , model ) and
434- provenance .isGenerated ( )
435- ) and
436- not exists ( Public:: Provenance provenance |
437- neutralElement ( this , "summary" , provenance ) and
438- provenance .isManual ( )
439- )
440- }
424+ SummarizedCallableAdapter ( ) { summaryElement ( this , input_ , output_ , kind , p_ , model_ ) }
441425
442426 override predicate propagatesFlow (
443- string input , string output , boolean preservesValue , string model
427+ string input , string output , boolean preservesValue , Public:: Provenance p , boolean isExact ,
428+ string model
444429 ) {
445- exists ( string kind |
446- this .relevantSummaryElementManual ( input , output , kind , model )
447- or
448- not this .relevantSummaryElementManual ( _, _, _, _) and
449- this .relevantSummaryElementGenerated ( input , output , kind , model )
450- |
451- if kind = "value" then preservesValue = true else preservesValue = false
452- )
453- }
454-
455- override predicate hasProvenance ( Public:: Provenance provenance ) {
456- summaryElement ( this , _, _, _, provenance , _)
430+ input = input_ and
431+ output = output_ and
432+ ( if kind = "value" then preservesValue = true else preservesValue = false ) and
433+ p = p_ and
434+ isExact = true and
435+ model = model_
457436 }
458437}
0 commit comments