crux-0.7: Simple top-level library for Crucible Simulation
Safe HaskellSafe-Inferred
LanguageHaskell2010

Crux.Overrides

Synopsis

Documentation

mkFresh :: IsSymInterface sym => SolverSymbol -> BaseTypeRepr ty -> OverM personality sym ext (RegValue sym (BaseToType ty)) Source #

Create a fresh constant (freshConstant) with the given base type

mkFreshFloat :: IsSymInterface sym => SolverSymbol -> FloatInfoRepr fi -> OverM personality sym ext (RegValue sym (FloatType fi)) Source #

Create a fresh float constant (freshFloatConstant)

baseFreshOverride Source #

Arguments

:: IsSymInterface sym 
=> BaseTypeRepr bty 
-> TypeRepr stringTy

The language's string type (e.g., LLVMPointerType for LLVM)

-> (RegValue' sym stringTy -> OverM p sym ext SolverSymbol)

Get the variable name as a concrete string from the override arguments

-> TypedOverride (p sym) sym ext (EmptyCtx ::> stringTy) (BaseToType bty) 

Build an override that takes a string and returns a fresh constant with that string as its name.

baseFreshOverride' Source #

Arguments

:: IsSymInterface sym 
=> SolverSymbol

Variable name

-> BaseTypeRepr bty 
-> TypedOverride (p sym) sym ext EmptyCtx (BaseToType bty) 

Build an override that takes no arguments and returns a fresh constant that uses the given name. Generally, frontends should prefer baseFreshOverride, to allow users to specify variable names.