Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
WithNoAbstraction.SymbolicExecution
Contents
Description
Synopsis
- type Static bin v = LiftingEntry bin (Sstate SValue SPointer) (FInit SValue SPointer) v
- traceTop :: p -> a -> a
- mk_top :: String -> SValue
- ctry_immediate :: SValue -> Maybe Word64
- cis_deterministic :: SValue -> Bool
- mk_concrete :: BinaryClass bin => Static bin v -> String -> NESet SimpleExpr -> SValue
- mk_concreteS :: BinaryClass bin => Static bin v -> SimpleExpr -> SValue
- mk_saddends :: BinaryClass bin => (bin, Config, L0 (Sstate SValue SPointer) (FInit SValue SPointer) v, Word64) -> NESet SimpleExpr -> SValue
- group_immediates :: BinaryClass bin => Static bin v -> NESet SimpleExpr -> NESet SimpleExpr
- cimmediate :: (Integral i, BinaryClass bin) => Static bin v -> i -> SValue
- cwiden :: BinaryClass bin => Static bin v -> String -> SValue -> SValue
- expr_to_addends :: BinaryClass bin => Static bin v -> SimpleExpr -> [SimpleExpr]
- cjoin :: BinaryClass bin => (bin, Config, L0 (Sstate SValue SPointer) (FInit SValue SPointer) v, Word64) -> [Char] -> SValue -> SValue -> SValue
- cjoin_all :: Foldable t => BinaryClass bin => Static bin v -> String -> t SValue -> SValue
- cjoin_pointers :: BinaryClass bin => Static bin v -> [SPointer] -> [SPointer]
- mk_expr :: BinaryClass bin => Static bin v -> SimpleExpr -> SimpleExpr
- svalue_plus :: BinaryClass bin => Static bin v -> Int -> SValue -> SValue -> SValue
- svalue_minus :: BinaryClass bin => Static bin v -> Int -> SValue -> SValue -> SValue
- svalue_and :: BinaryClass bin => Static bin v -> Int -> SValue -> SValue -> SValue
- svalue_unop :: BinaryClass bin => Static bin v -> String -> (SimpleExpr -> SimpleExpr) -> SValue -> SValue
- svalue_takebits :: BinaryClass bin => Static bin v -> Int -> SValue -> SValue
- svalue_sextend :: BinaryClass bin => Static bin v -> Int -> Int -> SValue -> SValue
- svalue_apply :: BinaryClass bin => Static bin v -> String -> ([SimpleExpr] -> SimpleExpr) -> [SValue] -> SValue
- data CSemantics
- = ApplyPlus Int
- | ApplyMinus Int
- | ApplyNeg Int
- | ApplyDec Int
- | ApplyInc Int
- | ApplyAnd Int
- | ApplyMov
- | ApplyCMov
- | ApplySExtend Int Int
- | Apply ([SimpleExpr] -> SimpleExpr)
- | SetXX
- | SExtension_HI
- | NoSemantics
- csemantics :: BinaryClass bin => Static bin v -> String -> SymbolicOperation SValue -> SValue
- mnemonic_to_semantics :: Opcode -> Int -> Maybe Int -> CSemantics
- replace_rip_in_operand :: Integral a => a -> Operand -> Operand
- cflg_semantics :: BinaryClass bin => Static bin v -> a -> Instruction -> FlagStatus -> FlagStatus
- try_get_base :: BinaryClass bin => Static bin v -> SimpleExpr -> Maybe SimpleExpr
- base_to_expr :: PointerBase -> SimpleExpr
- cmk_mem_addresses :: BinaryClass bin => Static bin v -> String -> SValue -> Set SPointer
- cmk_init_reg_value :: BinaryClass bin => Static bin v -> Register -> SValue
- cmk_init_mem_value :: BinaryClass bin => Static bin v -> String -> SPointer -> Maybe ByteSize -> SValue
- cseparate :: BinaryClass bin => Static bin v -> String -> SPointer -> Maybe ByteSize -> SPointer -> Maybe ByteSize -> Bool
- lookup_finit :: Integral a => (a, b, L0 pred finit v, a) -> finit
- calias :: (Eq a, Eq a) => p -> a -> a -> a -> a -> Bool
- cnecessarily_enclosed :: p -> SPointer -> Maybe ByteSize -> SPointer -> Maybe ByteSize -> Bool
- csensitive :: BinaryClass p => (p, b, c, d) -> SPointer -> Maybe ByteSize -> SValue -> Bool
- cread_from_ro_data :: BinaryClass bin => Static bin v -> SPointer -> Maybe ByteSize -> Maybe SValue
- cis_local :: BinaryClass bin => (bin, b, c, d) -> SPointer -> Bool
- ckeep_for_finit :: BinaryClass bin => (bin, Config, L0 (Sstate SValue SPointer) (FInit SValue SPointer) v, Word64) -> SStatePart SPointer -> SValue -> Maybe (Set SPointer)
- is_function_pointer :: BinaryClass p => p -> SValue -> Bool
- check_regs_in_postcondition :: BinaryClass bin => Static bin v -> SValue -> SValue -> Bool
- ctry_resolve_error_call :: BinaryClass bin => (bin, Config, L0 pred finit v, d) -> Instruction -> SValue -> Maybe Indirection
- mapMaybeS :: Ord b => (a -> Maybe b) -> Set a -> Set b
- mapMaybeNES :: Ord b => (a -> Maybe b) -> NESet a -> Set b
- data ExternalFunctionOutput
- data ExternalFunctionBehavior = ExternalFunctionBehavior {}
- param :: (Eq a, Num a) => a -> Register
- pure_and_fresh :: ExternalFunctionBehavior
- pure_and_unknown :: ExternalFunctionBehavior
- external_function_behavior :: String -> ExternalFunctionBehavior
- transpose_bw_svalue :: BinaryClass bin => Static bin v -> Sstate SValue SPointer -> SValue -> SValue
- transpose_bw_addends :: BinaryClass bin => (bin, Config, L0 (Sstate SValue SPointer) (FInit SValue SPointer) v, Word64) -> Sstate SValue SPointer -> SimpleExpr -> SValue
- transpose_bw_spointer :: BinaryClass bin => Static bin v -> Sstate SValue SPointer -> SPointer -> Set SPointer
- transpose_bw_reg :: BinaryClass bin => Static bin v -> Sstate SValue SPointer -> (Register, SValue) -> Maybe (Register, SValue)
- transpose_bw_mem :: BinaryClass bin => Static bin v -> Sstate SValue SPointer -> ((SPointer, Maybe ByteSize), SValue) -> [((SPointer, Maybe ByteSize), SValue)]
- transpose_bw_e :: BinaryClass bin => Static bin v -> Sstate SValue SPointer -> SimpleExpr -> SValue
- transpose_bw_sp :: BinaryClass bin => Static bin v -> Sstate SValue SPointer -> StatePart -> SValue
- data FunctionType
- get_function_type :: BinaryClass bin => Static bin v -> Instruction -> String -> FunctionType
- call :: BinaryClass bin => Static bin v -> Instruction -> State (Sstate SValue SPointer, VCS SValue) ()
- is_top_stackframe :: SimpleExpr -> Maybe ByteSize -> Bool
- jump :: BinaryClass bin => Static bin v -> Instruction -> State (Sstate SValue SPointer, VCS SValue) ()
- ctry_jump_targets :: BinaryClass bin => Static bin v -> SValue -> Maybe (Set ResolvedJumpTarget)
Documentation
cis_deterministic :: SValue -> Bool Source #
mk_concrete :: BinaryClass bin => Static bin v -> String -> NESet SimpleExpr -> SValue Source #
mk_concreteS :: BinaryClass bin => Static bin v -> SimpleExpr -> SValue Source #
mk_saddends :: BinaryClass bin => (bin, Config, L0 (Sstate SValue SPointer) (FInit SValue SPointer) v, Word64) -> NESet SimpleExpr -> SValue Source #
group_immediates :: BinaryClass bin => Static bin v -> NESet SimpleExpr -> NESet SimpleExpr Source #
cimmediate :: (Integral i, BinaryClass bin) => Static bin v -> i -> SValue Source #
expr_to_addends :: BinaryClass bin => Static bin v -> SimpleExpr -> [SimpleExpr] Source #
cjoin :: BinaryClass bin => (bin, Config, L0 (Sstate SValue SPointer) (FInit SValue SPointer) v, Word64) -> [Char] -> SValue -> SValue -> SValue Source #
cjoin_pointers :: BinaryClass bin => Static bin v -> [SPointer] -> [SPointer] Source #
mk_expr :: BinaryClass bin => Static bin v -> SimpleExpr -> SimpleExpr Source #
svalue_plus :: BinaryClass bin => Static bin v -> Int -> SValue -> SValue -> SValue Source #
svalue_minus :: BinaryClass bin => Static bin v -> Int -> SValue -> SValue -> SValue Source #
svalue_and :: BinaryClass bin => Static bin v -> Int -> SValue -> SValue -> SValue Source #
svalue_unop :: BinaryClass bin => Static bin v -> String -> (SimpleExpr -> SimpleExpr) -> SValue -> SValue Source #
svalue_takebits :: BinaryClass bin => Static bin v -> Int -> SValue -> SValue Source #
svalue_sextend :: BinaryClass bin => Static bin v -> Int -> Int -> SValue -> SValue Source #
svalue_apply :: BinaryClass bin => Static bin v -> String -> ([SimpleExpr] -> SimpleExpr) -> [SValue] -> SValue Source #
data CSemantics Source #
Constructors
ApplyPlus Int | |
ApplyMinus Int | |
ApplyNeg Int | |
ApplyDec Int | |
ApplyInc Int | |
ApplyAnd Int | |
ApplyMov | |
ApplyCMov | |
ApplySExtend Int Int | |
Apply ([SimpleExpr] -> SimpleExpr) | |
SetXX | |
SExtension_HI | |
NoSemantics |
csemantics :: BinaryClass bin => Static bin v -> String -> SymbolicOperation SValue -> SValue Source #
mnemonic_to_semantics :: Opcode -> Int -> Maybe Int -> CSemantics Source #
cflg_semantics :: BinaryClass bin => Static bin v -> a -> Instruction -> FlagStatus -> FlagStatus Source #
try_get_base :: BinaryClass bin => Static bin v -> SimpleExpr -> Maybe SimpleExpr Source #
base_to_expr :: PointerBase -> SimpleExpr Source #
cmk_mem_addresses :: BinaryClass bin => Static bin v -> String -> SValue -> Set SPointer Source #
cmk_init_reg_value :: BinaryClass bin => Static bin v -> Register -> SValue Source #
cmk_init_mem_value :: BinaryClass bin => Static bin v -> String -> SPointer -> Maybe ByteSize -> SValue Source #
cseparate :: BinaryClass bin => Static bin v -> String -> SPointer -> Maybe ByteSize -> SPointer -> Maybe ByteSize -> Bool Source #
lookup_finit :: Integral a => (a, b, L0 pred finit v, a) -> finit Source #
cnecessarily_enclosed :: p -> SPointer -> Maybe ByteSize -> SPointer -> Maybe ByteSize -> Bool Source #
csensitive :: BinaryClass p => (p, b, c, d) -> SPointer -> Maybe ByteSize -> SValue -> Bool Source #
cread_from_ro_data :: BinaryClass bin => Static bin v -> SPointer -> Maybe ByteSize -> Maybe SValue Source #
ckeep_for_finit :: BinaryClass bin => (bin, Config, L0 (Sstate SValue SPointer) (FInit SValue SPointer) v, Word64) -> SStatePart SPointer -> SValue -> Maybe (Set SPointer) Source #
is_function_pointer :: BinaryClass p => p -> SValue -> Bool Source #
check_regs_in_postcondition :: BinaryClass bin => Static bin v -> SValue -> SValue -> Bool Source #
ctry_resolve_error_call :: BinaryClass bin => (bin, Config, L0 pred finit v, d) -> Instruction -> SValue -> Maybe Indirection Source #
data ExternalFunctionOutput Source #
Constructors
FreshPointer | |
UnknownReturnValue | |
Input Register |
data ExternalFunctionBehavior Source #
Constructors
ExternalFunctionBehavior | |
Fields |
external_function_behavior :: String -> ExternalFunctionBehavior Source #
a list of some function that return a heap-pointer through RAX. The pointer is assumed to be fresh.
transpose_bw_svalue :: BinaryClass bin => Static bin v -> Sstate SValue SPointer -> SValue -> SValue Source #
Backward transposition Let p be the current predicate and let the equality sp == v be from the predicate after execution of an internal function. For example, p contains: RSP == RSP0 - 64 RSI == 10
And after execution of the function, we have: *[RSP0+16,8] == RSI0
Transposing this equality produces: *[RSP0-40,8] == 10
transpose_bw_addends :: BinaryClass bin => (bin, Config, L0 (Sstate SValue SPointer) (FInit SValue SPointer) v, Word64) -> Sstate SValue SPointer -> SimpleExpr -> SValue Source #
transpose_bw_spointer :: BinaryClass bin => Static bin v -> Sstate SValue SPointer -> SPointer -> Set SPointer Source #
transpose_bw_reg :: BinaryClass bin => Static bin v -> Sstate SValue SPointer -> (Register, SValue) -> Maybe (Register, SValue) Source #
transpose_bw_mem :: BinaryClass bin => Static bin v -> Sstate SValue SPointer -> ((SPointer, Maybe ByteSize), SValue) -> [((SPointer, Maybe ByteSize), SValue)] Source #
transpose_bw_e :: BinaryClass bin => Static bin v -> Sstate SValue SPointer -> SimpleExpr -> SValue Source #
transpose_bw_sp :: BinaryClass bin => Static bin v -> Sstate SValue SPointer -> StatePart -> SValue Source #
data FunctionType Source #
get_function_type :: BinaryClass bin => Static bin v -> Instruction -> String -> FunctionType Source #
call :: BinaryClass bin => Static bin v -> Instruction -> State (Sstate SValue SPointer, VCS SValue) () Source #
Executes semantics for external functions.
is_top_stackframe :: SimpleExpr -> Maybe ByteSize -> Bool Source #
jump :: BinaryClass bin => Static bin v -> Instruction -> State (Sstate SValue SPointer, VCS SValue) () Source #
ctry_jump_targets :: BinaryClass bin => Static bin v -> SValue -> Maybe (Set ResolvedJumpTarget) Source #