Skip to content

Commit 7475ca9

Browse files
jbertholdrv-auditorehildenb
authored
make #gasExec(EXP _ _) preserve definedness (#2261)
* make #gasExec(EXP _ _) preserve definedness `#gasExec(EXP _ W1)` will only be called on non-negative `W1`. This change sets the result to `0` for negative `W1` and asserts definedness for the equaton for `W1 > 0` (without this condition the `log256Int(W1)` call would diverge). * Set Version: 1.0.420 * Use <Int in equation condition Co-authored-by: Everett Hildenbrandt <[email protected]> --------- Co-authored-by: devops <[email protected]> Co-authored-by: Everett Hildenbrandt <[email protected]>
1 parent 5d510fc commit 7475ca9

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

kevm-pyk/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
44

55
[tool.poetry]
66
name = "kevm-pyk"
7-
version = "1.0.419"
7+
version = "1.0.420"
88
description = ""
99
authors = [
1010
"Runtime Verification, Inc. <[email protected]>",

kevm-pyk/src/kevm_pyk/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
from typing import Final
77

88

9-
VERSION: Final = '1.0.419'
9+
VERSION: Final = '1.0.420'

kevm-pyk/src/kevm_pyk/kproj/evm-semantics/evm.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2066,8 +2066,8 @@ The intrinsic gas calculation mirrors the style of the YellowPaper (appendix H).
20662066
requires Ghassstorestipend << SCHED >>
20672067
andBool GAVAIL <=Gas Gcallstipend < SCHED >
20682068
2069-
rule <k> #gasExec(SCHED, EXP _ 0) => Gexp < SCHED > ... </k>
2070-
rule <k> #gasExec(SCHED, EXP _ W1) => Gexp < SCHED > +Int (Gexpbyte < SCHED > *Int (1 +Int (log256Int(W1)))) ... </k> requires W1 =/=Int 0
2069+
rule <k> #gasExec(SCHED, EXP _ W1) => Gexp < SCHED > ... </k> requires W1 <=Int 0
2070+
rule <k> #gasExec(SCHED, EXP _ W1) => Gexp < SCHED > +Int (Gexpbyte < SCHED > *Int (1 +Int (log256Int(W1)))) ... </k> requires 0 <Int W1 [preserves-definedness]
20712071
20722072
rule <k> #gasExec(SCHED, CALLDATACOPY _ _ WIDTH) => Gverylow < SCHED > +Int (Gcopy < SCHED > *Int (WIDTH up/Int 32)) ... </k>
20732073
rule <k> #gasExec(SCHED, RETURNDATACOPY _ _ WIDTH) => Gverylow < SCHED > +Int (Gcopy < SCHED > *Int (WIDTH up/Int 32)) ... </k>

package/version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.0.419
1+
1.0.420

0 commit comments

Comments
 (0)