2424 */
2525
2626private import csharp
27+ private import codeql.util.Boolean
2728private import DataFlowImplCommon
2829private import DataFlowImplSpecific:: Private
2930private import DataFlowImplSpecific:: Private as DataFlowPrivate
3031
3132/**
3233 * An input configuration for content data flow.
3334 */
34- signature module ContentConfigSig {
35+ signature module ConfigSig {
3536 /**
3637 * Holds if `source` is a relevant data flow source.
3738 */
@@ -76,7 +77,7 @@ signature module ContentConfigSig {
7677/**
7778 * Constructs a global content data flow computation.
7879 */
79- module Global< ContentConfigSig ContentConfig> implements DataFlow :: GlobalFlowSig {
80+ module Global< ConfigSig ContentConfig> {
8081 private module FlowConfig implements DataFlow:: StateConfigSig {
8182 class FlowState = State ;
8283
@@ -116,8 +117,6 @@ module Global<ContentConfigSig ContentConfig> implements DataFlow::GlobalFlowSig
116117
117118 private module Flow = DataFlow:: GlobalWithState< FlowConfig > ;
118119
119- import Flow
120-
121120 /**
122121 * Holds if data stored inside `sourceAp` on `source` flows to `sinkAp` inside `sink`
123122 * for this configuration. `preservesValue` indicates whether any of the additional
@@ -131,7 +130,7 @@ module Global<ContentConfigSig ContentConfig> implements DataFlow::GlobalFlowSig
131130 * that was last stored into. That is, if `sinkAp` is `Field1.Field2` (with `Field1`
132131 * being the top of the stack), then there is flow into `sink.Field1.Field2`.
133132 */
134- additional predicate flow (
133+ predicate flow (
135134 DataFlow:: Node source , AccessPath sourceAp , DataFlow:: Node sink , AccessPath sinkAp ,
136135 boolean preservesValue
137136 ) {
@@ -150,15 +149,11 @@ module Global<ContentConfigSig ContentConfig> implements DataFlow::GlobalFlowSig
150149 }
151150
152151 private newtype TState =
153- TInitState ( boolean preservesValue ) { preservesValue in [ false , true ] } or
154- TStoreState ( int size , boolean preservesValue ) {
155- size in [ 1 .. ContentConfig:: accessPathLimit ( ) ] and
156- preservesValue in [ false , true ]
152+ TInitState ( Boolean preservesValue ) or
153+ TStoreState ( int size , Boolean preservesValue ) {
154+ size in [ 1 .. ContentConfig:: accessPathLimit ( ) ]
157155 } or
158- TReadState ( int size , boolean preservesValue ) {
159- size in [ 1 .. ContentConfig:: accessPathLimit ( ) ] and
160- preservesValue in [ false , true ]
161- }
156+ TReadState ( int size , Boolean preservesValue ) { size in [ 1 .. ContentConfig:: accessPathLimit ( ) ] }
162157
163158 abstract private class State extends TState {
164159 abstract string toString ( ) ;
@@ -260,7 +255,7 @@ module Global<ContentConfigSig ContentConfig> implements DataFlow::GlobalFlowSig
260255 }
261256
262257 /** An access path. */
263- additional class AccessPath extends TAccessPath {
258+ class AccessPath extends TAccessPath {
264259 /** Gets the head of this access path, if any. */
265260 DataFlow:: ContentSet getHead ( ) { this = TAccessPathCons ( result , _) }
266261
0 commit comments