KEVM Interface #
This file provides a proving interface for the KEVM function definitions. Some of the contents of this file may be ported to a utils file in the future.
Simple function behavior #
Behavioral results about simple functions like arithmetic or boolean operations.
Behavior of «#sizeWordStack» #
Equating #sizeWordStack to List.length.
Equations
Instances For
Behavior of K's in_keys function #
Axiomatically asserting in_keys behavior.
NOTE: These functions depend on the dummy implementation as maps
being List (Key × Value).
Equations
- KEVMInterface.keys l = List.map (fun (pair : K × V) => pair.1) l
Instances For
Equations
- KEVMInterface.inKeys_compute map key = List.elem (inj key) (KEVMInterface.keys map.coll)
Instances For
Behavior of #inStorage function #
This definition of #inStorage depends on the above inKeys_compute.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Memory results #
Results that have to do with memory-related operations.
Explicit account for «#memoryUsageUpdate» with positive width.
Explicit account for mapWriteRange.
Explicit account for «#padToWidth».
This axiom states the following:
Int2Bytes behaves as BE for positive integers and big endian representation.
Note that the first parameter of Int2Bytes is the length of the
corresponding encoding sequence.
Explicit account for «#asByteStack».
This result notoriously depends on Axioms.BE_IntToBytes_eq, which
should be a theorem at some point.
Given n : ℕ with n < UInt256.size, converting it to byteStack
and padding the result to width 32, is the same as
UInt256.toByteArray (n : UInt256).
For any ByteArray b, Bytes2Int b .bigEndianBytes .unsignedBytes
computes the same as fromByteArrayBigEndian b.
This should be proved at some point.
Friendlier interface for #range.
This should be proven at some point.
Converting a 32-byte chunk of memory into an unsigned integer never
overflows chop.
Misc #
Miscellaneous and helpful results.
Explicit account for the SortInt → SortAccount injection instance.