Skip to content

Commit 64f1963

Browse files
committed
Address review comments
1 parent f9b906d commit 64f1963

File tree

3 files changed

+6
-21
lines changed

3 files changed

+6
-21
lines changed

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

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -171,20 +171,15 @@ module Public {
171171
)
172172
}
173173

174-
private newtype TRequiredSummaryComponentStack = MkRequiredSummaryComponentStack()
175-
176174
/**
177175
* A class that exists for QL technical reasons only (the IPA type used
178176
* to represent component stacks needs to be bounded).
179177
*/
180-
class RequiredSummaryComponentStack extends TRequiredSummaryComponentStack {
181-
/** Gets a textual representation of this element. */
182-
string toString() { none() }
183-
178+
class RequiredSummaryComponentStack extends Unit {
184179
/**
185180
* Holds if the stack obtained by pushing `head` onto `tail` is required.
186181
*/
187-
predicate required(SummaryComponent head, SummaryComponentStack tail) { none() }
182+
abstract predicate required(SummaryComponent head, SummaryComponentStack tail);
188183
}
189184

190185
/** A callable with a flow summary. */

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

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -171,20 +171,15 @@ module Public {
171171
)
172172
}
173173

174-
private newtype TRequiredSummaryComponentStack = MkRequiredSummaryComponentStack()
175-
176174
/**
177175
* A class that exists for QL technical reasons only (the IPA type used
178176
* to represent component stacks needs to be bounded).
179177
*/
180-
class RequiredSummaryComponentStack extends TRequiredSummaryComponentStack {
181-
/** Gets a textual representation of this element. */
182-
string toString() { none() }
183-
178+
class RequiredSummaryComponentStack extends Unit {
184179
/**
185180
* Holds if the stack obtained by pushing `head` onto `tail` is required.
186181
*/
187-
predicate required(SummaryComponent head, SummaryComponentStack tail) { none() }
182+
abstract predicate required(SummaryComponent head, SummaryComponentStack tail);
188183
}
189184

190185
/** A callable with a flow summary. */

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

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -171,20 +171,15 @@ module Public {
171171
)
172172
}
173173

174-
private newtype TRequiredSummaryComponentStack = MkRequiredSummaryComponentStack()
175-
176174
/**
177175
* A class that exists for QL technical reasons only (the IPA type used
178176
* to represent component stacks needs to be bounded).
179177
*/
180-
class RequiredSummaryComponentStack extends TRequiredSummaryComponentStack {
181-
/** Gets a textual representation of this element. */
182-
string toString() { none() }
183-
178+
class RequiredSummaryComponentStack extends Unit {
184179
/**
185180
* Holds if the stack obtained by pushing `head` onto `tail` is required.
186181
*/
187-
predicate required(SummaryComponent head, SummaryComponentStack tail) { none() }
182+
abstract predicate required(SummaryComponent head, SummaryComponentStack tail);
188183
}
189184

190185
/** A callable with a flow summary. */

0 commit comments

Comments
 (0)