hevm-0.46.0: Ethereum virtual machine evaluator
Safe HaskellNone
LanguageHaskell2010

EVM.SymExec

Synopsis

Documentation

sbytes32 :: Query [SWord 8] Source #

Convenience functions for generating large symbolic byte strings

sbytes128 :: Query [SWord 8] Source #

Convenience functions for generating large symbolic byte strings

sbytes256 :: Query [SWord 8] Source #

Convenience functions for generating large symbolic byte strings

sbytes512 :: Query [SWord 8] Source #

Convenience functions for generating large symbolic byte strings

sbytes1024 :: Query [SWord 8] Source #

Convenience functions for generating large symbolic byte strings

symAbiArg :: AbiType -> Query ([SWord 8], W256) Source #

Abstract calldata argument generation

symCalldata :: Text -> [AbiType] -> [String] -> Query ([SWord 8], W256) Source #

Generates calldata matching given type signature, optionally specialized with concrete arguments. Any argument given as "symbolic" or omitted at the tail of the list are kept symbolic.

data BranchInfo Source #

Constructors

BranchInfo 

interpret :: Fetcher -> Maybe Integer -> Stepper a -> StateT VM Query [a] Source #

Interpreter which explores all paths at | branching points. | returns a list of possible final evm states

verify :: VM -> Maybe Integer -> Maybe (BlockNumber, Text) -> Maybe Postcondition -> Query (Either (Tree BranchInfo) (Tree BranchInfo)) Source #

Symbolically execute the VM and check all endstates against the postcondition, if available. Returns `Right (Tree BranchInfo)` if the postcondition can be violated, or or `Left (Tree BranchInfo)`, if the postcondition holds for all endstates.

equivalenceCheck :: ByteString -> ByteString -> Maybe Integer -> Maybe (Text, [AbiType]) -> Query (Either ([VM], [VM]) VM) Source #

Compares two contract runtimes for trace equivalence by running two VMs and comparing the end states.

both' :: (a -> b) -> (a, a) -> (b, b) Source #