1
1
/**
2
- * Provides classes and predicates for definining flow summaries.
2
+ * Provides classes and predicates for defining flow summaries.
3
3
*
4
- * The definitions in this file are language-independant , and language-specific
4
+ * The definitions in this file are language-independent , and language-specific
5
5
* definitions are passed in via the `DataFlowImplSpecific` and
6
6
* `FlowSummaryImplSpecific` modules.
7
7
*/
@@ -10,18 +10,20 @@ private import FlowSummaryImplSpecific
10
10
private import DataFlowImplSpecific:: Private
11
11
private import DataFlowImplSpecific:: Public
12
12
13
- /** Provides classes and predicates for definining flow summaries. */
13
+ /** Provides classes and predicates for defining flow summaries. */
14
14
module Public {
15
+ private import Private
16
+
15
17
/**
16
- * A compontent used in a flow summary.
18
+ * A component used in a flow summary.
17
19
*
18
20
* Either a parameter or an argument at a given position, a specific
19
21
* content type, or a return kind.
20
22
*/
21
23
class SummaryComponent extends TSummaryComponent {
22
24
/** Gets a textual representation of this summary component. */
23
25
string toString ( ) {
24
- exists ( Content c | this = TContantSummaryComponent ( c ) and result = c .toString ( ) )
26
+ exists ( Content c | this = TContentSummaryComponent ( c ) and result = c .toString ( ) )
25
27
or
26
28
exists ( int i | this = TParameterSummaryComponent ( i ) and result = "parameter " + i )
27
29
or
@@ -34,7 +36,7 @@ module Public {
34
36
/** Provides predicates for constructing summary components. */
35
37
module SummaryComponent {
36
38
/** Gets a summary component for content `c`. */
37
- SummaryComponent content ( Content c ) { result = TContantSummaryComponent ( c ) }
39
+ SummaryComponent content ( Content c ) { result = TContentSummaryComponent ( c ) }
38
40
39
41
/** Gets a summary component for parameter `i`. */
40
42
SummaryComponent parameter ( int i ) { result = TParameterSummaryComponent ( i ) }
@@ -105,7 +107,7 @@ module Public {
105
107
}
106
108
107
109
/**
108
- * Gets the stack obtained by push `head` onto `tail`.
110
+ * Gets the stack obtained by pushing `head` onto `tail`.
109
111
*
110
112
* Make sure to override `RequiredSummaryComponentStack::required()` in order
111
113
* to ensure that the constructed stack exists.
@@ -140,11 +142,11 @@ module Public {
140
142
* `preservesValue` indicates whether this is a value-preserving step
141
143
* or a taint-step.
142
144
*
143
- * Input specications are restricted to stacks that end with
145
+ * Input specifications are restricted to stacks that end with
144
146
* `SummaryComponent::argument(_)`, preceded by zero or more
145
147
* `SummaryComponent::return(_)` or `SummaryComponent::content(_)` components.
146
148
*
147
- * Output specications are restricted to stacks that end with
149
+ * Output specifications are restricted to stacks that end with
148
150
* `SummaryComponent::return(_)` or `SummaryComponent::argument(_)`.
149
151
*
150
152
* Output stacks ending with `SummaryComponent::return(_)` can be preceded by zero
@@ -179,7 +181,7 @@ module Private {
179
181
private import DataFlowImplCommon as DataFlowImplCommon
180
182
181
183
newtype TSummaryComponent =
182
- TContantSummaryComponent ( Content c ) or
184
+ TContentSummaryComponent ( Content c ) or
183
185
TParameterSummaryComponent ( int i ) { parameterPosition ( i ) } or
184
186
TArgumentSummaryComponent ( int i ) { parameterPosition ( i ) } or
185
187
TReturnSummaryComponent ( ReturnKind rk )
@@ -368,7 +370,7 @@ module Private {
368
370
n = summaryNodeInputState ( c , s ) and
369
371
(
370
372
exists ( Content cont |
371
- head = TContantSummaryComponent ( cont ) and result = getContentType ( cont )
373
+ head = TContentSummaryComponent ( cont ) and result = getContentType ( cont )
372
374
)
373
375
or
374
376
exists ( ReturnKind rk |
@@ -380,7 +382,7 @@ module Private {
380
382
n = summaryNodeOutputState ( c , s ) and
381
383
(
382
384
exists ( Content cont |
383
- head = TContantSummaryComponent ( cont ) and result = getContentType ( cont )
385
+ head = TContentSummaryComponent ( cont ) and result = getContentType ( cont )
384
386
)
385
387
or
386
388
s .length ( ) = 1 and
@@ -670,5 +672,3 @@ module Private {
670
672
}
671
673
}
672
674
}
673
-
674
- private import Private
0 commit comments