@@ -252,10 +252,11 @@ Control Flow
252252
253253``` k
254254 syntax KItem ::= Exception
255- syntax KItem ::= "#exception" StatusCode | "#end"
256- syntax Exception ::= "#exception" | "#revert"
257- // ---------------------------------------------
255+ syntax KItem ::= "#exception" StatusCode | "#end" | "#revert"
256+ syntax Exception ::= "#exception"
257+ // ---------------------------------
258258 rule <k> #end => #exception EVM_SUCCESS ... </k>
259+ rule <k> #revert => #exception EVM_REVERT ... </k>
259260 rule <k> #exception SC => #exception ... </k> <statusCode> _ => SC </statusCode>
260261
261262 rule <k> EX:Exception ~> (_:Int => .) ... </k>
@@ -269,8 +270,7 @@ Control Flow
269270``` k
270271 syntax KItem ::= "#?" K ":" K "?#"
271272 // ----------------------------------
272- rule <k> #? B1 : _ ?# => B1 ... </k>
273- rule <k> #revert ~> #? B1 : _ ?# => B1 ~> #revert ... </k>
273+ rule <k> #? B1 : _ ?# => B1 ... </k>
274274 rule <statusCode> SC </statusCode>
275275 <k> #exception ~> #? B1 : B2 ?# => #if isExceptionalStatusCode(SC) #then B2 #else B1 #fi ~> #exception ... </k>
276276```
@@ -1446,7 +1446,8 @@ The various `CALL*` (and other inter-contract control flow) operations will be d
14461446 </k>
14471447 <output> _ => .WordStack </output>
14481448
1449- rule <k> #revert ~> #return RETSTART RETWIDTH
1449+ rule <statusCode> EVM_REVERT </statusCode>
1450+ <k> #exception ~> #return RETSTART RETWIDTH
14501451 => #popCallStack ~> #popWorldState
14511452 ~> 0 ~> #push ~> #refund GAVAIL ~> #setLocalMem RETSTART RETWIDTH OUT
14521453 ...
@@ -1606,7 +1607,8 @@ For each `CALL*` operation, we make a corresponding call to `#call` and a state-
16061607 // ---------------------------------------------------
16071608 rule <statusCode> _:ExceptionalStatusCode </statusCode>
16081609 <k> #exception ~> #codeDeposit _ => #popCallStack ~> #popWorldState ~> 0 ~> #push ... </k> <output> _ => .WordStack </output>
1609- rule <k> #revert ~> #codeDeposit _ => #popCallStack ~> #popWorldState ~> #refund GAVAIL ~> 0 ~> #push ... </k>
1610+ rule <statusCode> EVM_REVERT </statusCode>
1611+ <k> #exception ~> #codeDeposit _ => #popCallStack ~> #popWorldState ~> #refund GAVAIL ~> 0 ~> #push ... </k>
16101612 <gas> GAVAIL </gas>
16111613
16121614 rule <statusCode> EVM_SUCCESS </statusCode>
0 commit comments