Use not exists

This commit is contained in:
Joe Farebrother
2024-04-11 09:38:41 +01:00
parent 0a3d73d902
commit ec973ac1f3

View File

@@ -57,7 +57,7 @@ module MassAssignment {
/** Holds if `h` is an empty hash or contains an empty hash at one if its (possibly nested) values. */
private predicate hasEmptyHash(Expr e) {
e instanceof HashLiteral and
count(e.(HashLiteral).getAKeyValuePair()) = 0
not exists(e.(HashLiteral).getAKeyValuePair())
or
hasEmptyHash(e.(HashLiteral).getAKeyValuePair().getValue())
or