C#/Java/Ruby/Swift: Address review comments.

This commit is contained in:
Michael Nebel
2022-08-18 14:16:46 +02:00
parent f728ddf823
commit 761ed283b6
12 changed files with 28 additions and 40 deletions

View File

@@ -639,12 +639,12 @@ module CsvValidation {
}
private string getInvalidModelSubtype() {
exists(string pred, string row, int expect |
sourceModel(row) and expect = 9 and pred = "source"
exists(string pred, string row |
sourceModel(row) and pred = "source"
or
sinkModel(row) and expect = 9 and pred = "sink"
sinkModel(row) and pred = "sink"
or
summaryModel(row) and expect = 10 and pred = "summary"
summaryModel(row) and pred = "summary"
|
exists(string b |
b = row.splitAt(";", 2) and

View File

@@ -79,8 +79,8 @@ predicate summaryElement(Callable c, string input, string output, string kind, b
}
/**
* Holds if an external flow summary exists for `c` which means that there is no
* flow through `c` and a flag `generated` stating whether the summary is autogenerated.
* Holds if a negative flow summary exists for `c`, which means that there is no
* flow through `c`. The flag `generated` states whether the summary is autogenerated.
*/
predicate negativeSummaryElement(Callable c, boolean generated) {
exists(string namespace, string type, string name, string signature, string provenance |

View File

@@ -50,8 +50,6 @@ private string asSummaryModel(TargetApi api, string input, string output, string
string asNegativeSummaryModel(TargetApi api) { result = asPartialNegativeModel(api) + "generated" }
predicate partialNegativeModel = asPartialNegativeModel/1;
/**
* Gets the value summary model for `api` with `input` and `output`.
*/

View File

@@ -74,13 +74,9 @@ string captureFlow(TargetApi api) {
/**
* Gets the negative summary for `api`, if any.
* A negative summary is generated, if there does not exist any positive flow that
* shares the same summary prefix - otherwise these models will be indistinguishable.
* A negative summary is generated, if there does not exist any positive flow.
*/
string captureNoFlow(TargetApi api) {
not exists(TargetApi other, string flow |
flow = captureFlow(other) and
partialNegativeModel(other) = partialNegativeModel(api)
) and
not exists(captureFlow(api)) and
result = asNegativeSummaryModel(api)
}