File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -421,7 +421,8 @@ A cons-list is used for the EVM wordstack.
421
421
// ---------------------------------------------------------------------
422
422
rule #drop(N, WS) => WS requires notBool N >Int 0
423
423
rule #drop(N, .WordStack) => .WordStack
424
- rule #drop(N, (W : WS)) => #drop(N -Int 1, WS) requires N >Int 0
424
+ rule #drop(N, (W : WS)) => #drop(1, #drop(N -Int 1, (W : WS))) requires N >Int 1
425
+ rule #drop(1, (_ : WS)) => WS
425
426
```
426
427
427
428
### Element Access
@@ -432,8 +433,8 @@ A cons-list is used for the EVM wordstack.
432
433
``` k
433
434
syntax Int ::= WordStack "[" Int "]" [function]
434
435
// -----------------------------------------------
435
- rule (W0 : WS) [N ] => W0 requires N ==Int 0
436
- rule (W0 : WS) [N ] => WS[N -Int 1 ] requires N >Int 0
436
+ rule (W : _) [ N ] => W requires N ==Int 0
437
+ rule WS [ N ] => #drop(N, WS) [ 0 ] requires N >Int 0
437
438
438
439
syntax WordStack ::= WordStack "[" Int ":=" Int "]" [function]
439
440
// --------------------------------------------------------------
You can’t perform that action at this time.
0 commit comments