-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
proofs: add executable run statement
- Loading branch information
Showing
8 changed files
with
359 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
CoqOfPython/ethereum/paris/vm/simulations/proofs/exceptions.v
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
Require Import CoqOfPython.CoqOfPython. | ||
Require Import simulations.proofs.CoqOfPython. | ||
Require Import simulations.proofs.heap. | ||
|
||
Require Import ethereum.paris.vm.simulations.exceptions. | ||
|
||
Import Run. | ||
|
||
Module ExceptionalHalt. | ||
Definition to_value (exn : ExceptionalHalt.t) : Value.t := | ||
match exn with | ||
| ExceptionalHalt.StackUnderflowError => | ||
Value.Make "exceptions" "StackUnderflowError" (Pointer.Imm Object.empty) | ||
| ExceptionalHalt.StackOverflowError => | ||
Value.Make "exceptions" "StackOverflowError" (Pointer.Imm Object.empty) | ||
| ExceptionalHalt.OutOfGasError => | ||
Value.Make "exceptions" "OutOfGasError" (Pointer.Imm Object.empty) | ||
| ExceptionalHalt.InvalidOpcode code => | ||
Value.Make "exceptions" "InvalidOpcode" (Pointer.Imm (Object.wrapper (Data.Integer code))) | ||
| ExceptionalHalt.InvalidJumpDestError => | ||
Value.Make "exceptions" "InvalidJumpDestError" (Pointer.Imm Object.empty) | ||
| ExceptionalHalt.StackDepthLimitError => | ||
Value.Make "exceptions" "StackDepthLimitError" (Pointer.Imm Object.empty) | ||
| ExceptionalHalt.WriteInStaticContext => | ||
Value.Make "exceptions" "WriteInStaticContext" (Pointer.Imm Object.empty) | ||
| ExceptionalHalt.OutOfBoundsRead => | ||
Value.Make "exceptions" "OutOfBoundsRead" (Pointer.Imm Object.empty) | ||
| ExceptionalHalt.InvalidParameter => | ||
Value.Make "exceptions" "InvalidParameter" (Pointer.Imm Object.empty) | ||
| ExceptionalHalt.InvalidContractPrefix => | ||
Value.Make "exceptions" "InvalidContractPrefix" (Pointer.Imm Object.empty) | ||
| ExceptionalHalt.AddressCollision => | ||
Value.Make "exceptions" "AddressCollision" (Pointer.Imm Object.empty) | ||
end. | ||
End ExceptionalHalt. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
Require Import CoqOfPython.CoqOfPython. | ||
Require Import simulations.proofs.CoqOfPython. | ||
Require Import simulations.proofs.heap. | ||
|
||
Require ethereum.paris.vm.simulations.proofs.exceptions. | ||
Require ethereum.simulations.exceptions. | ||
|
||
Import Run. | ||
|
||
Module EthereumException. | ||
Definition to_value (exn : exceptions.EthereumException.t) : Value.t := | ||
match exn with | ||
| exceptions.EthereumException.ExceptionalHalt exn => | ||
Value.Make "exceptions" "ExceptionalHalt" (Pointer.Imm Object.empty) | ||
end. | ||
End EthereumException. |
Oops, something went wrong.