Merge pull request #7442 from ethereum/develop

Merge develop into develop_060
This commit is contained in:
chriseth
2019-09-17 12:16:27 +02:00
committed by GitHub
44 changed files with 764 additions and 229 deletions
+7 -4
View File
@@ -962,18 +962,21 @@ pair<smt::Expression, smt::Expression> SMTEncoder::arithmeticOperation(
smt::Expression intValueRange = (0 - smt::minValue(intType)) + smt::maxValue(intType) + 1;
auto value = smt::Expression::ite(
valueNoMod > smt::maxValue(intType) || valueNoMod < smt::minValue(intType),
valueNoMod > smt::maxValue(intType),
valueNoMod % intValueRange,
valueNoMod
smt::Expression::ite(
valueNoMod < smt::minValue(intType),
valueNoMod % intValueRange,
valueNoMod
)
);
if (intType.isSigned())
{
value = smt::Expression::ite(
value > smt::maxValue(intType),
value - intValueRange,
value
);
}
return {value, valueNoMod};
}