Value Constraint Based Simplifier.

This commit is contained in:
chriseth
2019-03-25 15:32:54 +01:00
parent cb633c3a0c
commit 061276b28a
12 changed files with 598 additions and 5 deletions
@@ -0,0 +1,38 @@
{
let x := 2
if lt(x, 9) { sstore(0, 1) }
if lt(x, 2) { sstore(0, 1) }
if gt(x, 0) { sstore(0, 1) }
if lt(9, x) { sstore(0, 1) }
if lt(2, x) { sstore(0, 1) }
if gt(0, x) { sstore(0, 1) }
}
// ----
// valueConstraintBasedSimplifier
// {
// let x := 2
// if 1
// {
// sstore(0, 1)
// }
// if 0
// {
// sstore(0, 1)
// }
// if 1
// {
// sstore(0, 1)
// }
// if 0
// {
// sstore(0, 1)
// }
// if 0
// {
// sstore(0, 1)
// }
// if 0
// {
// sstore(0, 1)
// }
// }
@@ -0,0 +1,18 @@
{
let x := and(callvalue(), 0xff)
if lt(x, 0x100) { sstore(0, 1) }
if lt(x, 0xff) { sstore(0, 1) }
}
// ----
// valueConstraintBasedSimplifier
// {
// let x := and(callvalue(), 0xff)
// if 1
// {
// sstore(0, 1)
// }
// if lt(x, 0xff)
// {
// sstore(0, 1)
// }
// }
@@ -0,0 +1,6 @@
{
}
// ----
// valueConstraintBasedSimplifier
// {
// }