Skip to content

Commit 6bfc49c

Browse files
committed
C#: Address review comments
1 parent f2fb26d commit 6bfc49c

File tree

6 files changed

+25
-25
lines changed

6 files changed

+25
-25
lines changed

csharp/ql/src/semmle/code/csharp/controlflow/internal/pressa/SsaImplCommon.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Provides a language-independant implementation of static single assignment
2+
* Provides a language-independent implementation of static single assignment
33
* (SSA) form.
44
*/
55

csharp/ql/src/semmle/code/csharp/dataflow/FlowSummary.qll

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/** Provides classes and predicates for definining flow summaries. */
1+
/** Provides classes and predicates for defining flow summaries. */
22

33
import csharp
44
private import internal.FlowSummaryImpl as Impl
@@ -70,14 +70,14 @@ module SummaryComponentStack {
7070
/** Gets a singleton stack representing a qualifier. */
7171
SummaryComponentStack qualifier() { result = singleton(SummaryComponent::qualifier()) }
7272

73-
/** Gets a stack representing an element of `of`. */
74-
SummaryComponentStack elementOf(SummaryComponentStack of) {
75-
result = push(SummaryComponent::element(), of)
73+
/** Gets a stack representing an element of `container`. */
74+
SummaryComponentStack elementOf(SummaryComponentStack container) {
75+
result = push(SummaryComponent::element(), container)
7676
}
7777

78-
/** Gets a stack representing a propery `p` of `of`. */
79-
SummaryComponentStack propertyOf(Property p, SummaryComponentStack of) {
80-
result = push(SummaryComponent::property(p), of)
78+
/** Gets a stack representing a propery `p` of `object`. */
79+
SummaryComponentStack propertyOf(Property p, SummaryComponentStack object) {
80+
result = push(SummaryComponent::property(p), object)
8181
}
8282

8383
/** Gets a stack representing a field `f` of `of`. */

csharp/ql/src/semmle/code/csharp/dataflow/internal/FlowSummaryImpl.qll

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
2-
* Provides classes and predicates for definining flow summaries.
2+
* Provides classes and predicates for defining flow summaries.
33
*
4-
* The definitions in this file are language-independant, and language-specific
4+
* The definitions in this file are language-independent, and language-specific
55
* definitions are passed in via the `DataFlowImplSpecific` and
66
* `FlowSummaryImplSpecific` modules.
77
*/
@@ -10,18 +10,20 @@ private import FlowSummaryImplSpecific
1010
private import DataFlowImplSpecific::Private
1111
private import DataFlowImplSpecific::Public
1212

13-
/** Provides classes and predicates for definining flow summaries. */
13+
/** Provides classes and predicates for defining flow summaries. */
1414
module Public {
15+
private import Private
16+
1517
/**
16-
* A compontent used in a flow summary.
18+
* A component used in a flow summary.
1719
*
1820
* Either a parameter or an argument at a given position, a specific
1921
* content type, or a return kind.
2022
*/
2123
class SummaryComponent extends TSummaryComponent {
2224
/** Gets a textual representation of this summary component. */
2325
string toString() {
24-
exists(Content c | this = TContantSummaryComponent(c) and result = c.toString())
26+
exists(Content c | this = TContentSummaryComponent(c) and result = c.toString())
2527
or
2628
exists(int i | this = TParameterSummaryComponent(i) and result = "parameter " + i)
2729
or
@@ -34,7 +36,7 @@ module Public {
3436
/** Provides predicates for constructing summary components. */
3537
module SummaryComponent {
3638
/** Gets a summary component for content `c`. */
37-
SummaryComponent content(Content c) { result = TContantSummaryComponent(c) }
39+
SummaryComponent content(Content c) { result = TContentSummaryComponent(c) }
3840

3941
/** Gets a summary component for parameter `i`. */
4042
SummaryComponent parameter(int i) { result = TParameterSummaryComponent(i) }
@@ -105,7 +107,7 @@ module Public {
105107
}
106108

107109
/**
108-
* Gets the stack obtained by push `head` onto `tail`.
110+
* Gets the stack obtained by pushing `head` onto `tail`.
109111
*
110112
* Make sure to override `RequiredSummaryComponentStack::required()` in order
111113
* to ensure that the constructed stack exists.
@@ -140,11 +142,11 @@ module Public {
140142
* `preservesValue` indicates whether this is a value-preserving step
141143
* or a taint-step.
142144
*
143-
* Input specications are restricted to stacks that end with
145+
* Input specifications are restricted to stacks that end with
144146
* `SummaryComponent::argument(_)`, preceded by zero or more
145147
* `SummaryComponent::return(_)` or `SummaryComponent::content(_)` components.
146148
*
147-
* Output specications are restricted to stacks that end with
149+
* Output specifications are restricted to stacks that end with
148150
* `SummaryComponent::return(_)` or `SummaryComponent::argument(_)`.
149151
*
150152
* Output stacks ending with `SummaryComponent::return(_)` can be preceded by zero
@@ -179,7 +181,7 @@ module Private {
179181
private import DataFlowImplCommon as DataFlowImplCommon
180182

181183
newtype TSummaryComponent =
182-
TContantSummaryComponent(Content c) or
184+
TContentSummaryComponent(Content c) or
183185
TParameterSummaryComponent(int i) { parameterPosition(i) } or
184186
TArgumentSummaryComponent(int i) { parameterPosition(i) } or
185187
TReturnSummaryComponent(ReturnKind rk)
@@ -368,7 +370,7 @@ module Private {
368370
n = summaryNodeInputState(c, s) and
369371
(
370372
exists(Content cont |
371-
head = TContantSummaryComponent(cont) and result = getContentType(cont)
373+
head = TContentSummaryComponent(cont) and result = getContentType(cont)
372374
)
373375
or
374376
exists(ReturnKind rk |
@@ -380,7 +382,7 @@ module Private {
380382
n = summaryNodeOutputState(c, s) and
381383
(
382384
exists(Content cont |
383-
head = TContantSummaryComponent(cont) and result = getContentType(cont)
385+
head = TContentSummaryComponent(cont) and result = getContentType(cont)
384386
)
385387
or
386388
s.length() = 1 and
@@ -670,5 +672,3 @@ module Private {
670672
}
671673
}
672674
}
673-
674-
private import Private

csharp/ql/src/semmle/code/csharp/dataflow/internal/FlowSummaryImplSpecific.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Provides C# specific classes and predicates for definining flow summaries.
2+
* Provides C# specific classes and predicates for defining flow summaries.
33
*/
44

55
private import csharp

csharp/ql/src/semmle/code/csharp/dataflow/internal/SsaImplCommon.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Provides a language-independant implementation of static single assignment
2+
* Provides a language-independent implementation of static single assignment
33
* (SSA) form.
44
*/
55

csharp/ql/src/semmle/code/csharp/dataflow/internal/basessa/SsaImplCommon.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Provides a language-independant implementation of static single assignment
2+
* Provides a language-independent implementation of static single assignment
33
* (SSA) form.
44
*/
55

0 commit comments

Comments
 (0)