State Map #
Mapping KEVM to EvmYul states.
SortGeneratedTopCell
Getters #
Getters for accessing cells from the Generated Top Cell.
Instances For
Instances For
Instances For
Instances For
Instances For
Instances For
Instances For
Equations
Instances For
Instances For
Instances For
Instances For
Instances For
Equations
- tc.memoryUsed = tc.kevm.ethereum.evm.callState.memoryUsed
Instances For
Instances For
Instances For
Instances For
Instances For
Instances For
Instances For
Instances For
Instances For
Instances For
Instances For
KItem projections to subsorts
Equations
- (SortKItem.inj_SortAccount acc).toAccountSort = some acc
- k.toAccountSort = none
Instances For
Subsort projections to KItem
Equations
Instances For
Type Mapping #
Maps from K types to EvmYul types.
Equations
Instances For
Equations
Instances For
Equations
Instances For
Equations
- StateMap.pcCellMap pcc = StateMap.intMap pcc.val
Instances For
Equations
Instances For
Equations
Instances For
Equations
- StateMap.idMap idc = StateMap.accountAddressMap idc.val
Instances For
Equations
- StateMap.storageMap stor = Axioms.SortStorageCellMap stor
Instances For
Equations
Instances For
Equations
- StateMap.accCodeMap (SortAccountCode.inj_SortBytes code) = code
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- StateMap.memory_map { val := b } = b
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
State Map #
The function mapping KEVM states to EvmYul states.
State Mapping: Mapping KEVM states to EvmYul states
We temporarely require the symState
argument since we don't map the entire KEVM state yet
The following data structures are axiomatically mapped:
Substate.accessedStorageKeys
: TheEvmYul
data representation for this is anRBSet
, which is hard to reason about. The mapping will remain an axiom until a better reasoning interface is provided or we have time to implement itState.accountMap
: Similar reasons as above
Equations
- One or more equations did not get rendered due to their size.
Instances For
State Mapping Results #
Theorems to make life easier.
State Map Axioms #
Axioms that have to do with the axiomatic state mapping.
This axiom states that if an account is in an AccountCellMap
, then
Batteries.RBMap.find?
finds it in the image of the axiomatized mapping
The second element of AccountCellMapItem
is provided embedded in accCellMap_def
for
ease of use when proving theorems
Expected behavior of SortAccountsCellMap
w.r.t. Batteries.RBMap.find?
This axiom states that
- Given an
accountsCell
(accCellMap2
) containing an account identifiable byID_CELL
(acc
) - The (axiomatic) mapping of
accCellMap2
contains the mapping ofacc
- And, in particular,
RBMap.find?
correctly finds the mappedacc
if provided with the mappedID_CELL
Expected behavior of SortAccountsCellMap
w.r.t. Batteries.RBMap.insert
This axiom states that
- Given an
accountsCell
(initCellMap
) containing an account identifiable byID_CELL
(initAccount
) with symbolic storageSTORAGE_CELL
- Given an updated
accountsCell
(updatedCellMap
) consisting ofinitAccount
with an updatedSTORAGE_CELL
which contains the symbolic (key
,value
) pair (stor_update
) RBMap.insert
ing the mapped (key
,value
) pair into the (axiomatically) mappedinitCellMap
equals to the (axiomatic) mapping ofupdatedCellMap
Expected behavior of SortAccessedStorageCellMap
w.r.t. Batteries.RBSet.insert
This axiom states that
- Given a symbolic map of accessed storage keys
ACCESSEDSTORAGE_CELL
- Given an update of
ACCESSEDSTORAGE_CELL
containing the accountID_CELL
and the keykey
(stor_update
) RBMap.insert
ing the mapped pair (ID_CELL
,key
) into the (axiomatically) mappedACCESSEDSTORAGE_CELL
equals to the (axiomatic) mapping ofstor_update
Mapping a SortStorageCell
through Axioms.SortStorageCellMap
results
in an equivalence of behavior between K's lookup
function and EvmYul's findD
.
Provided that lookup
results in some result
.
Mapping a SortAccessedStorageCell
through Axioms.SortAccessedStorageCellMap
results
in an equivalence of behavior between K's «#inStorage»
function and EvmYul's RBSet.contains
.