Skip to content

Commit 64a48e4

Browse files
committed
MaD: Use "namespace" instead "package" in shared code.
1 parent 7f8d077 commit 64a48e4

File tree

5 files changed

+11
-9
lines changed

5 files changed

+11
-9
lines changed

cpp/ql/lib/semmle/code/cpp/dataflow/internal/ExternalFlowExtensions.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,5 +54,5 @@ extensible predicate neutralModel(
5454
module Extensions implements SharedMaD::ExtensionsSig {
5555
import ExternalFlowExtensions
5656

57-
predicate packageGrouping(string group, string package) { none() }
57+
predicate namespaceGrouping(string group, string namespace) { none() }
5858
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,5 +54,5 @@ extensible predicate neutralModel(
5454
module Extensions implements SharedMaD::ExtensionsSig {
5555
import ExternalFlowExtensions
5656

57-
predicate packageGrouping(string group, string package) { none() }
57+
predicate namespaceGrouping(string group, string namespace) { none() }
5858
}

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,6 @@ extensible predicate packageGrouping(string group, string package);
5858

5959
module Extensions implements SharedMaD::ExtensionsSig {
6060
import ExternalFlowExtensions
61+
62+
predicate namespaceGrouping = packageGrouping/2;
6163
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,5 +99,5 @@ extensible predicate experimentalSummaryModel(
9999
module Extensions implements SharedMaD::ExtensionsSig {
100100
import ExternalFlowExtensions
101101

102-
predicate packageGrouping(string group, string package) { none() }
102+
predicate namespaceGrouping(string group, string namespace) { none() }
103103
}

shared/mad/codeql/mad/static/ModelsAsData.qll

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ signature module ExtensionsSig {
5151
);
5252

5353
/**
54-
* Holds if the package `package` is part of the group `group`.
54+
* Holds if the namespace `namespace` is part of the group `group`.
5555
*/
56-
predicate packageGrouping(string group, string package);
56+
predicate namespaceGrouping(string group, string namespace);
5757
}
5858

5959
signature module InputSig {
@@ -166,14 +166,14 @@ module ModelsAsData<ExtensionsSig Extensions, InputSig Input> {
166166
)
167167
}
168168

169-
/** Gets the prefix for a group of packages/namespaces. */
169+
/** Gets the prefix for a group of namespaces. */
170170
private string groupPrefix() { result = "group:" }
171171

172172
/**
173-
* Gets a package/namespace represented by `namespaceOrGroup`.
173+
* Gets a namespace represented by `namespaceOrGroup`.
174174
*
175175
* If `namespaceOrGroup` is of the form `group:<groupname>` then `result` is a
176-
* package/namespace in the group `<groupname>`, as determined by `packageGrouping`.
176+
* namespace in the group `<groupname>`, as determined by `namespaceGrouping`.
177177
* Otherwise, `result` is `namespaceOrGroup`.
178178
*/
179179
bindingset[namespaceOrGroup]
@@ -182,7 +182,7 @@ module ModelsAsData<ExtensionsSig Extensions, InputSig Input> {
182182
result = namespaceOrGroup
183183
or
184184
exists(string group |
185-
Extensions::packageGrouping(group, result) and
185+
Extensions::namespaceGrouping(group, result) and
186186
namespaceOrGroup = groupPrefix() + group
187187
)
188188
}

0 commit comments

Comments
 (0)