Skip to content

Commit

Permalink
Two additional summaries, for the end of the while loop and the funct…
Browse files Browse the repository at this point in the history
…ion.
  • Loading branch information
mariaKt committed Oct 3, 2024
1 parent 00ba216 commit a6f66df
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/uniswap-summaries.md
Original file line number Diff line number Diff line change
Expand Up @@ -3301,6 +3301,21 @@ module SOLIDITY-MATHSQRT-SUMMARY
</store>
<current-function> mathSqrt </current-function> [priority(40)]
// Skip environment updates when not needed.
// These occur due to the multiple block statements, introduced by the if
// statement that the while rewrites to.
rule <k> restoreEnv( _:Map ) ~> .Statements ~> restoreEnv( E:Map ) => restoreEnv(E) ...</k>
<summarize> true </summarize>
<current-function> mathSqrt </current-function> [priority(40)]
// End of function: final environment restoration to return to caller
rule <k> restoreEnv ( _:Map (z |-> var(Iz, uint256)) ) ~> .Statements ~> return z ; ~> .K => v (Vz, uint256) ~> K </k>
<summarize> true </summarize>
<env> _ => E </env>
<store> _ [ Iz <- Vz ] </store>
<current-function> mathSqrt => FUNC </current-function>
<call-stack>... ListItem(frame(K, E, FUNC)) => .List </call-stack> [priority(40)]
// y <= 3 && y != 0
rule <k> mathSqrt:Id ( v(V:MInt{256}, uint256), .TypedVals ) => v (1p256, uint256) ...</k>
<summarize> true </summarize>
Expand Down

0 comments on commit a6f66df

Please sign in to comment.