@@ -1025,13 +1025,15 @@ predicate storeStep(Node node1, ContentSet c, Node node2) {
10251025 * Holds if there is a read step of content `c` from `node1` to `node2`.
10261026 */
10271027predicate readStep ( Node node1 , ContentSet c , Node node2 ) {
1028+ // Qualifier -> Member read
10281029 exists ( CfgNodes:: ExprNodes:: MemberExprReadAccessCfgNode var , Content:: FieldContent fc |
10291030 node2 .asExpr ( ) = var and
10301031 node1 .asExpr ( ) = var .getQualifier ( ) and
10311032 fc .getLowerCaseName ( ) = var .getLowerCaseMemberName ( ) and
10321033 c .isSingleton ( fc )
10331034 )
10341035 or
1036+ // Qualifier -> Index read
10351037 exists ( CfgNodes:: ExprNodes:: IndexExprReadAccessCfgNode var , CfgNodes:: ExprCfgNode e |
10361038 node2 .asExpr ( ) = var and
10371039 node1 .asExpr ( ) = var .getBase ( ) and
@@ -1046,32 +1048,37 @@ predicate readStep(Node node1, ContentSet c, Node node2) {
10461048 c .isAnyElement ( )
10471049 )
10481050 or
1051+ // Implicit read before a return
10491052 exists ( CfgNode cfgNode |
10501053 node1 = TPreReturnNodeImpl ( cfgNode , true ) and
10511054 node2 = TImplicitWrapNode ( cfgNode , true ) and
10521055 c .isSingleton ( any ( Content:: KnownElementContent ec | exists ( ec .getIndex ( ) .asInt ( ) ) ) )
10531056 )
10541057 or
1058+ // Implicit read before a process block
10551059 c .isAnyPositional ( ) and
10561060 exists ( CfgNodes:: ProcessBlockCfgNode processBlock |
10571061 processBlock .getPipelineParameterAccess ( ) = node1 .asExpr ( ) and
10581062 node2 = TProcessNode ( processBlock )
10591063 )
10601064 or
1065+ // Implicit read of a positional before a property-by-name process iteration
10611066 c .isAnyPositional ( ) and
10621067 exists ( CfgNodes:: ProcessBlockCfgNode pb , CfgNodes:: ExprNodes:: VarReadAccessCfgNode va |
10631068 va = pb .getAPipelineByPropertyNameParameterAccess ( ) and
10641069 node1 .asExpr ( ) = va and
10651070 node2 = TProcessPropertyByNameNode ( va .getVariable ( ) , false )
10661071 )
10671072 or
1073+ // Implicit read of a property before a property-by-name process iteration
10681074 exists ( PipelineByPropertyNameParameter p , Content:: KnownElementContent ec |
10691075 c .isKnownOrUnknownElement ( ec ) and
10701076 ec .getIndex ( ) .asString ( ) = p .getLowerCaseName ( ) and
10711077 node1 = TProcessPropertyByNameNode ( p , false ) and
10721078 node2 = TProcessPropertyByNameNode ( p , true )
10731079 )
10741080 or
1081+ // Summary read steps
10751082 FlowSummaryImpl:: Private:: Steps:: summaryReadStep ( node1 .( FlowSummaryNode ) .getSummaryNode ( ) , c ,
10761083 node2 .( FlowSummaryNode ) .getSummaryNode ( ) )
10771084}
0 commit comments