[SMTChecker] Adding division by zero checks in the CHC engine

This commit is contained in:
Martin Blicha
2020-10-21 14:48:33 +02:00
parent a83ad58109
commit f0d81601db
16 changed files with 126 additions and 145 deletions
@@ -12,5 +12,6 @@ contract C {
}
}
// ----
// Warning 3046: (141-166): BMC: Division by zero happens here.
// Warning 3046: (263-278): BMC: Division by zero happens here.
// Warning 4281: (141-166): CHC: Division by zero happens here.
// Warning 6328: (170-184): CHC: Assertion violation happens here.
// Warning 4281: (263-278): CHC: Division by zero happens here.
@@ -22,5 +22,7 @@ contract C {
}
// ----
// Warning 6321: (253-260): Unnamed return variable can remain unassigned. Add an explicit return with value to all non-reverting code paths or name the variable.
// Warning 3046: (94-109): BMC: Division by zero happens here.
// Warning 3046: (180-195): BMC: Division by zero happens here.
// Warning 4281: (94-109): CHC: Division by zero happens here.
// Warning 6328: (113-126): CHC: Assertion violation happens here.
// Warning 4281: (180-195): CHC: Division by zero happens here.
// Warning 6328: (199-212): CHC: Assertion violation happens here.
@@ -12,5 +12,6 @@ contract C {
}
}
// ----
// Warning 3046: (141-166): BMC: Division by zero happens here.
// Warning 3046: (263-278): BMC: Division by zero happens here.
// Warning 4281: (141-166): CHC: Division by zero happens here.
// Warning 6328: (170-184): CHC: Assertion violation happens here.
// Warning 4281: (263-278): CHC: Division by zero happens here.
@@ -5,4 +5,4 @@ contract C {
uint x = 2 / z;
}
// ----
// Warning 6084: (69-74): BMC: Division by zero happens here.
// Warning 4281: (69-74): CHC: Division by zero happens here.
@@ -5,4 +5,4 @@ contract C {
}
}
// ----
// Warning 3046: (111-116): BMC: Division by zero happens here.
// Warning 4281: (111-116): CHC: Division by zero happens here.
@@ -6,5 +6,5 @@ contract C {
}
}
// ----
// Warning 4281: (110-115): CHC: Division by zero happens here.
// Warning 4984: (110-115): CHC: Overflow (resulting value larger than 0x80 * 2**248 - 1) happens here.
// Warning 3046: (110-115): BMC: Division by zero happens here.
@@ -6,4 +6,4 @@ contract C {
}
}
// ----
// Warning 3046: (110-115): BMC: Division by zero happens here.
// Warning 4281: (110-115): CHC: Division by zero happens here.
@@ -6,4 +6,4 @@ contract C {
}
}
// ----
// Warning 3046: (113-118): BMC: Division by zero happens here.
// Warning 4281: (113-118): CHC: Division by zero happens here.
@@ -6,4 +6,4 @@ contract C {
}
}
// ----
// Warning 3046: (113-118): BMC: Division by zero happens here.
// Warning 4281: (113-118): CHC: Division by zero happens here.
@@ -6,4 +6,4 @@ contract C {
}
}
// ----
// Warning 3046: (117-120): BMC: Division by zero happens here.
// Warning 4281: (117-120): CHC: Division by zero happens here.