@@ -126,26 +126,24 @@ module Stages {
126126 }
127127
128128 /**
129- * The `dataflow` stage.
129+ * The points-to stage.
130130 */
131131 cached
132- module DataFlow {
132+ module PointsTo {
133133 /**
134134 * Always holds.
135- * Ensures that a predicate is evaluated as part of the DataFlow stage.
135+ * Ensures that a predicate is evaluated as part of the points-to stage.
136136 */
137137 cached
138138 predicate ref ( ) { 1 = 1 }
139139
140- private import semmle.python.dataflow.new.internal.DataFlowPublic as DataFlowPublic
141- private import semmle.python.dataflow.new.internal.LocalSources as LocalSources
142- private import semmle.python.internal.Awaited as Awaited
143140 private import semmle.python.pointsto.Base as PointsToBase
144141 private import semmle.python.types.Object as TypeObject
145142 private import semmle.python.objects.TObject as TObject
146143 private import semmle.python.Flow as Flow
147144 private import semmle.python.objects.ObjectInternal as ObjectInternal
148- private import semmle.python.pointsto.PointsTo as PointsTo
145+ // have to alias since this module is also called PointsTo
146+ private import semmle.python.pointsto.PointsTo as RealPointsTo
149147
150148 /**
151149 * DONT USE!
@@ -155,14 +153,6 @@ module Stages {
155153 predicate backref ( ) {
156154 1 = 1
157155 or
158- exists ( any ( DataFlowPublic:: Node node ) .toString ( ) )
159- or
160- any ( DataFlowPublic:: Node node ) .hasLocationInfo ( _, _, _, _, _)
161- or
162- any ( LocalSources:: LocalSourceNode n ) .flowsTo ( _)
163- or
164- exists ( Awaited:: awaited ( _) )
165- or
166156 PointsToBase:: BaseFlow:: scope_entry_value_transfer_from_earlier ( _, _, _, _)
167157 or
168158 exists ( TypeObject:: Object a )
@@ -173,7 +163,41 @@ module Stages {
173163 or
174164 exists ( any ( ObjectInternal:: ObjectInternal o ) .toString ( ) )
175165 or
176- PointsTo:: AttributePointsTo:: variableAttributePointsTo ( _, _, _, _, _)
166+ RealPointsTo:: AttributePointsTo:: variableAttributePointsTo ( _, _, _, _, _)
167+ }
168+ }
169+
170+ /**
171+ * The `dataflow` stage.
172+ */
173+ cached
174+ module DataFlow {
175+ /**
176+ * Always holds.
177+ * Ensures that a predicate is evaluated as part of the DataFlow stage.
178+ */
179+ cached
180+ predicate ref ( ) { 1 = 1 }
181+
182+ private import semmle.python.dataflow.new.internal.DataFlowPublic as DataFlowPublic
183+ private import semmle.python.dataflow.new.internal.LocalSources as LocalSources
184+ private import semmle.python.internal.Awaited as Awaited
185+
186+ /**
187+ * DONT USE!
188+ * Contains references to each predicate that use the above `ref` predicate.
189+ */
190+ cached
191+ predicate backref ( ) {
192+ 1 = 1
193+ or
194+ exists ( any ( DataFlowPublic:: Node node ) .toString ( ) )
195+ or
196+ any ( DataFlowPublic:: Node node ) .hasLocationInfo ( _, _, _, _, _)
197+ or
198+ any ( LocalSources:: LocalSourceNode n ) .flowsTo ( _)
199+ or
200+ exists ( Awaited:: awaited ( _) )
177201 }
178202 }
179203}
0 commit comments