Java: add negative numbers

This commit is contained in:
Jami Cogswell
2022-12-07 17:17:35 -05:00
parent b82f9b1911
commit aa7e6d7811
7 changed files with 179 additions and 38 deletions

View File

@@ -261,9 +261,28 @@ module Public {
NegativeSummarizedCallable() { negativeSummaryElement(this, _) }
/**
* Holds if the negative summary is auto generated.
* Holds if the negative summary is auto generated and not manually generated.
*/
predicate isAutoGenerated() { negativeSummaryElement(this, true) }
predicate isAutoGenerated() {
negativeSummaryElement(this, true) and
not negativeSummaryElement(this, false)
} // ! okay to adjust this to "and not manually generated"? Will that mess up anything that currently uses this?
/**
* Holds if the summary is manually generated and not auto generated.
*/
predicate isManuallyGenerated() {
negativeSummaryElement(this, false) and
not negativeSummaryElement(this, true)
}
/**
* Holds if the summary is both auto generated and manually generated.
*/
predicate isBothAutoAndManuallyGenerated() {
negativeSummaryElement(this, true) and
negativeSummaryElement(this, false)
}
}
}