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
279279
280280private module PropagateContentFlow = ContentDataFlow:: Global< PropagateContentFlowConfig > ;
281281
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 ) {
285283 exists ( ContentSet head , PropagateContentFlow:: AccessPath tail |
286284 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 )
289291 )
290292}
291293
294+ private string printStoreAccessPath ( PropagateContentFlow:: AccessPath ap ) {
295+ result = concat ( int i | | getContent ( ap , i ) , "" order by i )
296+ }
297+
292298private 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 )
300300}
301301
302302string captureContentFlow ( DataFlowSummaryTargetApi api ) {
Original file line number Diff line number Diff line change @@ -279,24 +279,24 @@ private module PropagateContentFlowConfig implements ContentDataFlow::ConfigSig
279279
280280private module PropagateContentFlow = ContentDataFlow:: Global< PropagateContentFlowConfig > ;
281281
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 ) {
285283 exists ( ContentSet head , PropagateContentFlow:: AccessPath tail |
286284 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 )
289291 )
290292}
291293
294+ private string printStoreAccessPath ( PropagateContentFlow:: AccessPath ap ) {
295+ result = concat ( int i | | getContent ( ap , i ) , "" order by i )
296+ }
297+
292298private 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 )
300300}
301301
302302string captureContentFlow ( DataFlowSummaryTargetApi api ) {
You can’t perform that action at this time.
0 commit comments