From 64f19637d49457e24e177a65a4fa692855cbfeef Mon Sep 17 00:00:00 2001 From: Tom Hvitved Date: Mon, 24 Jan 2022 13:32:51 +0100 Subject: [PATCH] Address review comments --- .../code/csharp/dataflow/internal/FlowSummaryImpl.qll | 9 ++------- .../code/java/dataflow/internal/FlowSummaryImpl.qll | 9 ++------- .../codeql/ruby/dataflow/internal/FlowSummaryImpl.qll | 9 ++------- 3 files changed, 6 insertions(+), 21 deletions(-) diff --git a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/FlowSummaryImpl.qll b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/FlowSummaryImpl.qll index 4576e349df4..1ded4e7bed1 100644 --- a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/FlowSummaryImpl.qll +++ b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/FlowSummaryImpl.qll @@ -171,20 +171,15 @@ module Public { ) } - private newtype TRequiredSummaryComponentStack = MkRequiredSummaryComponentStack() - /** * A class that exists for QL technical reasons only (the IPA type used * to represent component stacks needs to be bounded). */ - class RequiredSummaryComponentStack extends TRequiredSummaryComponentStack { - /** Gets a textual representation of this element. */ - string toString() { none() } - + class RequiredSummaryComponentStack extends Unit { /** * Holds if the stack obtained by pushing `head` onto `tail` is required. */ - predicate required(SummaryComponent head, SummaryComponentStack tail) { none() } + abstract predicate required(SummaryComponent head, SummaryComponentStack tail); } /** A callable with a flow summary. */ diff --git a/java/ql/lib/semmle/code/java/dataflow/internal/FlowSummaryImpl.qll b/java/ql/lib/semmle/code/java/dataflow/internal/FlowSummaryImpl.qll index 4576e349df4..1ded4e7bed1 100644 --- a/java/ql/lib/semmle/code/java/dataflow/internal/FlowSummaryImpl.qll +++ b/java/ql/lib/semmle/code/java/dataflow/internal/FlowSummaryImpl.qll @@ -171,20 +171,15 @@ module Public { ) } - private newtype TRequiredSummaryComponentStack = MkRequiredSummaryComponentStack() - /** * A class that exists for QL technical reasons only (the IPA type used * to represent component stacks needs to be bounded). */ - class RequiredSummaryComponentStack extends TRequiredSummaryComponentStack { - /** Gets a textual representation of this element. */ - string toString() { none() } - + class RequiredSummaryComponentStack extends Unit { /** * Holds if the stack obtained by pushing `head` onto `tail` is required. */ - predicate required(SummaryComponent head, SummaryComponentStack tail) { none() } + abstract predicate required(SummaryComponent head, SummaryComponentStack tail); } /** A callable with a flow summary. */ diff --git a/ruby/ql/lib/codeql/ruby/dataflow/internal/FlowSummaryImpl.qll b/ruby/ql/lib/codeql/ruby/dataflow/internal/FlowSummaryImpl.qll index 4576e349df4..1ded4e7bed1 100644 --- a/ruby/ql/lib/codeql/ruby/dataflow/internal/FlowSummaryImpl.qll +++ b/ruby/ql/lib/codeql/ruby/dataflow/internal/FlowSummaryImpl.qll @@ -171,20 +171,15 @@ module Public { ) } - private newtype TRequiredSummaryComponentStack = MkRequiredSummaryComponentStack() - /** * A class that exists for QL technical reasons only (the IPA type used * to represent component stacks needs to be bounded). */ - class RequiredSummaryComponentStack extends TRequiredSummaryComponentStack { - /** Gets a textual representation of this element. */ - string toString() { none() } - + class RequiredSummaryComponentStack extends Unit { /** * Holds if the stack obtained by pushing `head` onto `tail` is required. */ - predicate required(SummaryComponent head, SummaryComponentStack tail) { none() } + abstract predicate required(SummaryComponent head, SummaryComponentStack tail); } /** A callable with a flow summary. */