@@ -202,13 +202,13 @@ module Node {
202202 }
203203
204204 /** Holds is this node is a source node of kind `kind`. */
205- predicate isSource ( string kind ) {
206- this .getSummaryNode ( ) .( FlowSummaryImpl:: Private:: SourceOutputNode ) .isEntry ( kind )
205+ predicate isSource ( string kind , string model ) {
206+ this .getSummaryNode ( ) .( FlowSummaryImpl:: Private:: SourceOutputNode ) .isEntry ( kind , model )
207207 }
208208
209209 /** Holds is this node is a sink node of kind `kind`. */
210- predicate isSink ( string kind ) {
211- this .getSummaryNode ( ) .( FlowSummaryImpl:: Private:: SinkInputNode ) .isExit ( kind )
210+ predicate isSink ( string kind , string model ) {
211+ this .getSummaryNode ( ) .( FlowSummaryImpl:: Private:: SinkInputNode ) .isExit ( kind , model )
212212 }
213213
214214 override CfgScope getCfgScope ( ) {
@@ -1305,9 +1305,13 @@ module RustDataFlow implements InputSig<Location> {
13051305 /** Extra data flow steps needed for lambda flow analysis. */
13061306 predicate additionalLambdaFlowStep ( Node nodeFrom , Node nodeTo , boolean preservesValue ) { none ( ) }
13071307
1308- predicate knownSourceModel ( Node source , string model ) { none ( ) }
1308+ predicate knownSourceModel ( Node source , string model ) {
1309+ source .( Node:: FlowSummaryNode ) .isSource ( _, model )
1310+ }
13091311
1310- predicate knownSinkModel ( Node sink , string model ) { none ( ) }
1312+ predicate knownSinkModel ( Node sink , string model ) {
1313+ sink .( Node:: FlowSummaryNode ) .isSink ( _, model )
1314+ }
13111315
13121316 class DataFlowSecondLevelScope = Void ;
13131317}
@@ -1575,11 +1579,11 @@ private module Cached {
15751579
15761580 /** Holds if `n` is a flow source of kind `kind`. */
15771581 cached
1578- predicate sourceNode ( Node n , string kind ) { n .( Node:: FlowSummaryNode ) .isSource ( kind ) }
1582+ predicate sourceNode ( Node n , string kind ) { n .( Node:: FlowSummaryNode ) .isSource ( kind , _ ) }
15791583
15801584 /** Holds if `n` is a flow sink of kind `kind`. */
15811585 cached
1582- predicate sinkNode ( Node n , string kind ) { n .( Node:: FlowSummaryNode ) .isSink ( kind ) }
1586+ predicate sinkNode ( Node n , string kind ) { n .( Node:: FlowSummaryNode ) .isSink ( kind , _ ) }
15831587}
15841588
15851589import Cached
0 commit comments