Skip to content

Commit bddd22f

Browse files
committed
Sync files and make language specific adjustments.
1 parent 62fc1b6 commit bddd22f

File tree

10 files changed

+71
-71
lines changed

10 files changed

+71
-71
lines changed

go/ql/lib/semmle/go/dataflow/internal/FlowSummaryImpl.qll

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ module Public {
2323
* content type, or a return kind.
2424
*/
2525
class SummaryComponent extends TSummaryComponent {
26-
/** Gets a textual representation of this component used for flow summaries. */
27-
string getAccessStep() {
28-
result = getAccessStepSpecific(this)
26+
/** Gets a textual representation of this component used for MaD models. */
27+
string getMadRepresentation() {
28+
result = getMadRepresentationSpecific(this)
2929
or
3030
exists(ArgumentPosition pos |
3131
this = TParameterSummaryComponent(pos) and
@@ -46,7 +46,7 @@ module Public {
4646
}
4747

4848
/** Gets a textual representation of this summary component. */
49-
string toString() { result = this.getAccessStep() }
49+
string toString() { result = this.getMadRepresentation() }
5050
}
5151

5252
/** Provides predicates for constructing summary components. */
@@ -127,21 +127,21 @@ module Public {
127127
}
128128

129129
/** Gets a textual representation of this stack used for MaD models. */
130-
string getAccessPath() {
130+
string getMadRepresentation() {
131131
exists(SummaryComponent head, SummaryComponentStack tail |
132132
head = this.head() and
133133
tail = this.tail() and
134-
result = tail.getAccessPath() + "." + head.getAccessStep()
134+
result = tail.getMadRepresentation() + "." + head.getMadRepresentation()
135135
)
136136
or
137137
exists(SummaryComponent c |
138138
this = TSingletonSummaryComponentStack(c) and
139-
result = c.getAccessStep()
139+
result = c.getMadRepresentation()
140140
)
141141
}
142142

143143
/** Gets a textual representation of this stack. */
144-
string toString() { result = this.getAccessPath() }
144+
string toString() { result = this.getMadRepresentation() }
145145
}
146146

147147
/** Provides predicates for constructing stacks of summary components. */
@@ -1350,8 +1350,8 @@ module Private {
13501350
c.relevantSummary(input, output, preservesValue) and
13511351
csv =
13521352
c.getCallableCsv() // Callable information
1353-
+ input.getAccessPath() + ";" // input
1354-
+ output.getAccessPath() + ";" // output
1353+
+ input.getMadRepresentation() + ";" // input
1354+
+ output.getMadRepresentation() + ";" // output
13551355
+ renderKind(preservesValue) + ";" // kind
13561356
+ renderProvenance(c) // provenance
13571357
)

go/ql/lib/semmle/go/dataflow/internal/FlowSummaryImplSpecific.qll

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ DataFlowCallable inject(SummarizedCallable c) { result.asSummarizedCallable() =
2222
/** Gets the parameter position of the instance parameter. */
2323
ArgumentPosition callbackSelfParameterPosition() { result = -1 }
2424

25-
/** Gets the textual representation of a parameter position in the format used for flow summaries. */
25+
/** Gets the textual representation of a parameter position in the format used for MaD models. */
2626
string getParameterPosition(ParameterPosition pos) { result = pos.toString() }
2727

28-
/** Gets the textual representation of an argument position in the format used for flow summaries. */
28+
/** Gets the textual representation of an argument position in the format used for MaD models. */
2929
string getArgumentPosition(ArgumentPosition pos) { result = pos.toString() }
3030

3131
/** Gets the synthesized data-flow call for `receiver`. */
@@ -110,8 +110,8 @@ private string getContentSpecific(Content c) {
110110
c instanceof PointerContent and result = "Dereference"
111111
}
112112

113-
/** Gets the textual representation of the content in the format used for flow summaries. */
114-
string getAccessStepSpecific(SummaryComponent sc) {
113+
/** Gets the textual representation of the content in the format used for MaD models. */
114+
string getMadRepresentationSpecific(SummaryComponent sc) {
115115
exists(Content c | sc = TContentSummaryComponent(c) and result = getContentSpecific(c))
116116
or
117117
exists(ReturnKind rk |

java/ql/lib/semmle/code/java/dataflow/internal/FlowSummaryImpl.qll

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ module Public {
2323
* content type, or a return kind.
2424
*/
2525
class SummaryComponent extends TSummaryComponent {
26-
/** Gets a textual representation of this component used for flow summaries. */
27-
string getAccessStep() {
28-
result = getAccessStepSpecific(this)
26+
/** Gets a textual representation of this component used for MaD models. */
27+
string getMadRepresentation() {
28+
result = getMadRepresentationSpecific(this)
2929
or
3030
exists(ArgumentPosition pos |
3131
this = TParameterSummaryComponent(pos) and
@@ -46,7 +46,7 @@ module Public {
4646
}
4747

4848
/** Gets a textual representation of this summary component. */
49-
string toString() { result = this.getAccessStep() }
49+
string toString() { result = this.getMadRepresentation() }
5050
}
5151

5252
/** Provides predicates for constructing summary components. */
@@ -127,21 +127,21 @@ module Public {
127127
}
128128

129129
/** Gets a textual representation of this stack used for MaD models. */
130-
string getAccessPath() {
130+
string getMadRepresentation() {
131131
exists(SummaryComponent head, SummaryComponentStack tail |
132132
head = this.head() and
133133
tail = this.tail() and
134-
result = tail.getAccessPath() + "." + head.getAccessStep()
134+
result = tail.getMadRepresentation() + "." + head.getMadRepresentation()
135135
)
136136
or
137137
exists(SummaryComponent c |
138138
this = TSingletonSummaryComponentStack(c) and
139-
result = c.getAccessStep()
139+
result = c.getMadRepresentation()
140140
)
141141
}
142142

143143
/** Gets a textual representation of this stack. */
144-
string toString() { result = this.getAccessPath() }
144+
string toString() { result = this.getMadRepresentation() }
145145
}
146146

147147
/** Provides predicates for constructing stacks of summary components. */
@@ -1350,8 +1350,8 @@ module Private {
13501350
c.relevantSummary(input, output, preservesValue) and
13511351
csv =
13521352
c.getCallableCsv() // Callable information
1353-
+ input.getAccessPath() + ";" // input
1354-
+ output.getAccessPath() + ";" // output
1353+
+ input.getMadRepresentation() + ";" // input
1354+
+ output.getMadRepresentation() + ";" // output
13551355
+ renderKind(preservesValue) + ";" // kind
13561356
+ renderProvenance(c) // provenance
13571357
)

java/ql/lib/semmle/code/java/dataflow/internal/FlowSummaryImplSpecific.qll

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,8 @@ private string getContentSpecific(Content c) {
193193
c instanceof MapValueContent and result = "MapValue"
194194
}
195195

196-
/** Gets the textual representation of the content in the format used for flow summaries. */
197-
string getAccessStepSpecific(SummaryComponent sc) {
196+
/** Gets the textual representation of the content in the format used for MaD models. */
197+
string getMadRepresentationSpecific(SummaryComponent sc) {
198198
exists(Content c | sc = TContentSummaryComponent(c) and result = getContentSpecific(c))
199199
}
200200

@@ -203,10 +203,10 @@ private string positionToString(int pos) {
203203
if pos = -1 then result = "this" else result = pos.toString()
204204
}
205205

206-
/** Gets the textual representation of a parameter position in the format used for flow summaries. */
206+
/** Gets the textual representation of a parameter position in the format used for MaD models. */
207207
string getParameterPosition(ParameterPosition pos) { result = positionToString(pos) }
208208

209-
/** Gets the textual representation of an argument position in the format used for flow summaries. */
209+
/** Gets the textual representation of an argument position in the format used for MaD models. */
210210
string getArgumentPosition(ArgumentPosition pos) { result = positionToString(pos) }
211211

212212
/** Holds if input specification component `c` needs a reference. */

python/ql/lib/semmle/python/dataflow/new/internal/FlowSummaryImpl.qll

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ module Public {
2323
* content type, or a return kind.
2424
*/
2525
class SummaryComponent extends TSummaryComponent {
26-
/** Gets a textual representation of this component used for flow summaries. */
27-
string getAccessStep() {
28-
result = getAccessStepSpecific(this)
26+
/** Gets a textual representation of this component used for MaD models. */
27+
string getMadRepresentation() {
28+
result = getMadRepresentationSpecific(this)
2929
or
3030
exists(ArgumentPosition pos |
3131
this = TParameterSummaryComponent(pos) and
@@ -46,7 +46,7 @@ module Public {
4646
}
4747

4848
/** Gets a textual representation of this summary component. */
49-
string toString() { result = this.getAccessStep() }
49+
string toString() { result = this.getMadRepresentation() }
5050
}
5151

5252
/** Provides predicates for constructing summary components. */
@@ -127,21 +127,21 @@ module Public {
127127
}
128128

129129
/** Gets a textual representation of this stack used for MaD models. */
130-
string getAccessPath() {
130+
string getMadRepresentation() {
131131
exists(SummaryComponent head, SummaryComponentStack tail |
132132
head = this.head() and
133133
tail = this.tail() and
134-
result = tail.getAccessPath() + "." + head.getAccessStep()
134+
result = tail.getMadRepresentation() + "." + head.getMadRepresentation()
135135
)
136136
or
137137
exists(SummaryComponent c |
138138
this = TSingletonSummaryComponentStack(c) and
139-
result = c.getAccessStep()
139+
result = c.getMadRepresentation()
140140
)
141141
}
142142

143143
/** Gets a textual representation of this stack. */
144-
string toString() { result = this.getAccessPath() }
144+
string toString() { result = this.getMadRepresentation() }
145145
}
146146

147147
/** Provides predicates for constructing stacks of summary components. */
@@ -1350,8 +1350,8 @@ module Private {
13501350
c.relevantSummary(input, output, preservesValue) and
13511351
csv =
13521352
c.getCallableCsv() // Callable information
1353-
+ input.getAccessPath() + ";" // input
1354-
+ output.getAccessPath() + ";" // output
1353+
+ input.getMadRepresentation() + ";" // input
1354+
+ output.getMadRepresentation() + ";" // output
13551355
+ renderKind(preservesValue) + ";" // kind
13561356
+ renderProvenance(c) // provenance
13571357
)

python/ql/lib/semmle/python/dataflow/new/internal/FlowSummaryImplSpecific.qll

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,15 +146,15 @@ private string getContentSpecific(Content cs) {
146146
exists(string attr | cs = TAttributeContent(attr) and result = "Attribute[" + attr + "]")
147147
}
148148

149-
/** Gets the textual representation of a summary component in the format used for flow summaries. */
150-
string getAccessStepSpecific(SummaryComponent sc) {
149+
/** Gets the textual representation of a summary component in the format used for MaD models. */
150+
string getMadRepresentationSpecific(SummaryComponent sc) {
151151
exists(Content c |
152152
sc = TContentSummaryComponent(c) and
153153
result = getContentSpecific(c)
154154
)
155155
}
156156

157-
/** Gets the textual representation of a parameter position in the format used for flow summaries. */
157+
/** Gets the textual representation of a parameter position in the format used for MaD models. */
158158
string getParameterPosition(ParameterPosition pos) {
159159
pos.isSelf() and result = "self"
160160
or
@@ -169,7 +169,7 @@ string getParameterPosition(ParameterPosition pos) {
169169
)
170170
}
171171

172-
/** Gets the textual representation of an argument position in the format used for flow summaries. */
172+
/** Gets the textual representation of an argument position in the format used for MaD models. */
173173
string getArgumentPosition(ArgumentPosition pos) {
174174
pos.isSelf() and result = "self"
175175
or

ruby/ql/lib/codeql/ruby/dataflow/internal/FlowSummaryImpl.qll

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ module Public {
2323
* content type, or a return kind.
2424
*/
2525
class SummaryComponent extends TSummaryComponent {
26-
/** Gets a textual representation of this component used for flow summaries. */
27-
string getAccessStep() {
28-
result = getAccessStepSpecific(this)
26+
/** Gets a textual representation of this component used for MaD models. */
27+
string getMadRepresentation() {
28+
result = getMadRepresentationSpecific(this)
2929
or
3030
exists(ArgumentPosition pos |
3131
this = TParameterSummaryComponent(pos) and
@@ -46,7 +46,7 @@ module Public {
4646
}
4747

4848
/** Gets a textual representation of this summary component. */
49-
string toString() { result = this.getAccessStep() }
49+
string toString() { result = this.getMadRepresentation() }
5050
}
5151

5252
/** Provides predicates for constructing summary components. */
@@ -127,21 +127,21 @@ module Public {
127127
}
128128

129129
/** Gets a textual representation of this stack used for MaD models. */
130-
string getAccessPath() {
130+
string getMadRepresentation() {
131131
exists(SummaryComponent head, SummaryComponentStack tail |
132132
head = this.head() and
133133
tail = this.tail() and
134-
result = tail.getAccessPath() + "." + head.getAccessStep()
134+
result = tail.getMadRepresentation() + "." + head.getMadRepresentation()
135135
)
136136
or
137137
exists(SummaryComponent c |
138138
this = TSingletonSummaryComponentStack(c) and
139-
result = c.getAccessStep()
139+
result = c.getMadRepresentation()
140140
)
141141
}
142142

143143
/** Gets a textual representation of this stack. */
144-
string toString() { result = this.getAccessPath() }
144+
string toString() { result = this.getMadRepresentation() }
145145
}
146146

147147
/** Provides predicates for constructing stacks of summary components. */
@@ -1350,8 +1350,8 @@ module Private {
13501350
c.relevantSummary(input, output, preservesValue) and
13511351
csv =
13521352
c.getCallableCsv() // Callable information
1353-
+ input.getAccessPath() + ";" // input
1354-
+ output.getAccessPath() + ";" // output
1353+
+ input.getMadRepresentation() + ";" // input
1354+
+ output.getMadRepresentation() + ";" // output
13551355
+ renderKind(preservesValue) + ";" // kind
13561356
+ renderProvenance(c) // provenance
13571357
)

ruby/ql/lib/codeql/ruby/dataflow/internal/FlowSummaryImplSpecific.qll

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,8 @@ private string getContentSetSpecific(ContentSet cs) {
165165
)
166166
}
167167

168-
/** Gets the textual representation of a summary component in the format used for flow summaries. */
169-
string getAccessStepSpecific(SummaryComponent sc) {
168+
/** Gets the textual representation of a summary component in the format used for MaD models. */
169+
string getMadRepresentationSpecific(SummaryComponent sc) {
170170
exists(ContentSet cs | sc = TContentSummaryComponent(cs) and result = getContentSetSpecific(cs))
171171
or
172172
exists(ContentSet cs |
@@ -186,7 +186,7 @@ string getAccessStepSpecific(SummaryComponent sc) {
186186
)
187187
}
188188

189-
/** Gets the textual representation of a parameter position in the format used for flow summaries. */
189+
/** Gets the textual representation of a parameter position in the format used for MaD models. */
190190
string getParameterPosition(ParameterPosition pos) {
191191
exists(int i |
192192
pos.isPositional(i) and
@@ -219,7 +219,7 @@ string getParameterPosition(ParameterPosition pos) {
219219
result = "hash-splat"
220220
}
221221

222-
/** Gets the textual representation of an argument position in the format used for flow summaries. */
222+
/** Gets the textual representation of an argument position in the format used for MaD models. */
223223
string getArgumentPosition(ArgumentPosition pos) {
224224
pos.isSelf() and result = "self"
225225
or

swift/ql/lib/codeql/swift/dataflow/internal/FlowSummaryImpl.qll

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ module Public {
2323
* content type, or a return kind.
2424
*/
2525
class SummaryComponent extends TSummaryComponent {
26-
/** Gets a textual representation of this component used for flow summaries. */
27-
string getAccessStep() {
28-
result = getAccessStepSpecific(this)
26+
/** Gets a textual representation of this component used for MaD models. */
27+
string getMadRepresentation() {
28+
result = getMadRepresentationSpecific(this)
2929
or
3030
exists(ArgumentPosition pos |
3131
this = TParameterSummaryComponent(pos) and
@@ -46,7 +46,7 @@ module Public {
4646
}
4747

4848
/** Gets a textual representation of this summary component. */
49-
string toString() { result = this.getAccessStep() }
49+
string toString() { result = this.getMadRepresentation() }
5050
}
5151

5252
/** Provides predicates for constructing summary components. */
@@ -127,21 +127,21 @@ module Public {
127127
}
128128

129129
/** Gets a textual representation of this stack used for MaD models. */
130-
string getAccessPath() {
130+
string getMadRepresentation() {
131131
exists(SummaryComponent head, SummaryComponentStack tail |
132132
head = this.head() and
133133
tail = this.tail() and
134-
result = tail.getAccessPath() + "." + head.getAccessStep()
134+
result = tail.getMadRepresentation() + "." + head.getMadRepresentation()
135135
)
136136
or
137137
exists(SummaryComponent c |
138138
this = TSingletonSummaryComponentStack(c) and
139-
result = c.getAccessStep()
139+
result = c.getMadRepresentation()
140140
)
141141
}
142142

143143
/** Gets a textual representation of this stack. */
144-
string toString() { result = this.getAccessPath() }
144+
string toString() { result = this.getMadRepresentation() }
145145
}
146146

147147
/** Provides predicates for constructing stacks of summary components. */
@@ -1350,8 +1350,8 @@ module Private {
13501350
c.relevantSummary(input, output, preservesValue) and
13511351
csv =
13521352
c.getCallableCsv() // Callable information
1353-
+ input.getAccessPath() + ";" // input
1354-
+ output.getAccessPath() + ";" // output
1353+
+ input.getMadRepresentation() + ";" // input
1354+
+ output.getMadRepresentation() + ";" // output
13551355
+ renderKind(preservesValue) + ";" // kind
13561356
+ renderProvenance(c) // provenance
13571357
)

0 commit comments

Comments
 (0)