File tree Expand file tree Collapse file tree 2 files changed +24
-24
lines changed
csharp/ql/src/utils/modelgenerator/internal
java/ql/src/utils/modelgenerator/internal Expand file tree Collapse file tree 2 files changed +24
-24
lines changed Original file line number Diff line number Diff line change @@ -279,24 +279,24 @@ private module PropagateContentFlowConfig implements ContentDataFlow::ConfigSig
279
279
280
280
private module PropagateContentFlow = ContentDataFlow:: Global< PropagateContentFlowConfig > ;
281
281
282
- private string printStoreAccessPath ( PropagateContentFlow:: AccessPath ap ) {
283
- not exists ( ap .getHead ( ) ) and result = ""
284
- or
282
+ private string getContent ( PropagateContentFlow:: AccessPath ap , int i ) {
285
283
exists ( ContentSet head , PropagateContentFlow:: AccessPath tail |
286
284
head = ap .getHead ( ) and
287
- tail = ap .getTail ( ) and
288
- result = "." + printContent ( head ) + printStoreAccessPath ( tail )
285
+ tail = ap .getTail ( )
286
+ |
287
+ i = 0 and
288
+ result = "." + printContent ( head )
289
+ or
290
+ i > 0 and result = getContent ( tail , i - 1 )
289
291
)
290
292
}
291
293
294
+ private string printStoreAccessPath ( PropagateContentFlow:: AccessPath ap ) {
295
+ result = concat ( int i | | getContent ( ap , i ) , "" order by i )
296
+ }
297
+
292
298
private string printReadAccessPath ( PropagateContentFlow:: AccessPath ap ) {
293
- not exists ( ap .getHead ( ) ) and result = ""
294
- or
295
- exists ( ContentSet head , PropagateContentFlow:: AccessPath tail |
296
- head = ap .getHead ( ) and
297
- tail = ap .getTail ( ) and
298
- result = printReadAccessPath ( tail ) + "." + printContent ( head )
299
- )
299
+ result = concat ( int i | | getContent ( ap , i ) , "" order by i desc )
300
300
}
301
301
302
302
string captureContentFlow ( DataFlowSummaryTargetApi api ) {
Original file line number Diff line number Diff line change @@ -279,24 +279,24 @@ private module PropagateContentFlowConfig implements ContentDataFlow::ConfigSig
279
279
280
280
private module PropagateContentFlow = ContentDataFlow:: Global< PropagateContentFlowConfig > ;
281
281
282
- private string printStoreAccessPath ( PropagateContentFlow:: AccessPath ap ) {
283
- not exists ( ap .getHead ( ) ) and result = ""
284
- or
282
+ private string getContent ( PropagateContentFlow:: AccessPath ap , int i ) {
285
283
exists ( ContentSet head , PropagateContentFlow:: AccessPath tail |
286
284
head = ap .getHead ( ) and
287
- tail = ap .getTail ( ) and
288
- result = "." + printContent ( head ) + printStoreAccessPath ( tail )
285
+ tail = ap .getTail ( )
286
+ |
287
+ i = 0 and
288
+ result = "." + printContent ( head )
289
+ or
290
+ i > 0 and result = getContent ( tail , i - 1 )
289
291
)
290
292
}
291
293
294
+ private string printStoreAccessPath ( PropagateContentFlow:: AccessPath ap ) {
295
+ result = concat ( int i | | getContent ( ap , i ) , "" order by i )
296
+ }
297
+
292
298
private string printReadAccessPath ( PropagateContentFlow:: AccessPath ap ) {
293
- not exists ( ap .getHead ( ) ) and result = ""
294
- or
295
- exists ( ContentSet head , PropagateContentFlow:: AccessPath tail |
296
- head = ap .getHead ( ) and
297
- tail = ap .getTail ( ) and
298
- result = printReadAccessPath ( tail ) + "." + printContent ( head )
299
- )
299
+ result = concat ( int i | | getContent ( ap , i ) , "" order by i desc )
300
300
}
301
301
302
302
string captureContentFlow ( DataFlowSummaryTargetApi api ) {
You can’t perform that action at this time.
0 commit comments