hevm-0.50.5: Ethereum virtual machine evaluator
Safe HaskellSafe-Inferred
LanguageGHC2021

EVM.Solvers

Description

 
Synopsis

Documentation

data Solver Source #

Supported solvers

Constructors

Z3 
CVC5 
Bitwuzla 
Custom Text 

Instances

Instances details
Show Solver Source # 
Instance details

Defined in EVM.Solvers

data SolverInstance Source #

A running solver instance

newtype SolverGroup Source #

A channel representing a group of solvers

Constructors

SolverGroup (Chan Task) 

data Task Source #

A script to be executed, a list of models to be extracted in the case of a sat result, and a channel where the result should be written

Constructors

Task 

data CheckSatResult Source #

The result of a call to (check-sat)

Constructors

Sat SMTCex 
Unsat 
Unknown 
Error Text 

Instances

Instances details
Show CheckSatResult Source # 
Instance details

Defined in EVM.Solvers

Eq CheckSatResult Source # 
Instance details

Defined in EVM.Solvers

solverArgs :: Solver -> Maybe Natural -> [Text] Source #

Arguments used when spawing a solver instance

spawnSolver :: Solver -> Maybe Natural -> IO SolverInstance Source #

Spawns a solver instance, and sets the various global config options that we use for our queries

stopSolver :: SolverInstance -> IO () Source #

Cleanly shutdown a running solver instnace

sendScript :: SolverInstance -> SMT2 -> IO (Either Text ()) Source #

Sends a list of commands to the solver. Returns the first error, if there was one.

sendCommand :: SolverInstance -> Text -> IO Text Source #

Sends a single command to the solver, returns the first available line from the output buffer

sendLine :: SolverInstance -> Text -> IO Text Source #

Sends a string to the solver and appends a newline, returns the first available line from the output buffer

sendLine' :: SolverInstance -> Text -> IO () Source #

Sends a string to the solver and appends a newline, doesn't return stdout

getValue :: SolverInstance -> Text -> IO Text Source #

Returns a string representation of the model for the requested variable

readSExpr :: Handle -> IO [Text] Source #

Reads lines from h until we have a balanced sexpr