<ehildenb> I'm testing it out. In this example:
contract LoopInput {
uint x = 0;
function addLoop(uint256[] memory intArr) public {
uint256 tmpSum = 0;
uint256 i = 0;
for (i = 0; i < intArr.length; i++) {
tmpSum += intArr[i];
}
x = tmpSum;
}
}
It seems to correctly detect the loop, but loses too much information during loop abstraction and has messy control-flow afterward.
run_small.js
script from github and modifying it while building the image. I wanted to ask you if it was okay to include this file (via download or just the plain file) in the image repo
smtsolver.availableSolvers
to eldarica (or whichever solver you want) + modified settings
>>Int
is translated to shrInt
in smt, but I can't find a definition of shrInt
anywhere?
maxUInt48 &Int (X >>Int 48)
means "give me the second lowest 48 bits"
rule maxUInt48 &Int (X >>Int 48) => projectSecondLowest48(X)
projectSecondLowest48
directly.
project...
functions which can be used.