foxdec-0.1.0.0: Formally Verified x86-64 Decompilation
Safe HaskellSafe-Inferred
LanguageHaskell2010

Base

Description

 
Synopsis

Documentation

class IntGraph g where Source #

Instances

Instances details
IntGraph Graph Source # 
Instance details

Defined in Base

IntGraph CFG Source # 
Instance details

Defined in WithAbstractPredicates.ControlFlow

showHex :: Integral a => a -> String Source #

Show the integer in hex.

showHex_list :: Integral a => [a] -> [Char] Source #

Show an integer list as hex-list.

showHex_set :: IntSet -> [Char] Source #

Show an integer set as hex-list.

showHex_option :: Integral a => Maybe a -> String Source #

Show an optional integer as an optional hex.

readHex' :: (Eq a, Num a) => String -> a Source #

Read an int from a string storing a hex.

show_set :: (Foldable t, Show a) => t a -> String Source #

im_lookup :: [Char] -> IntMap a -> Key -> a Source #

Lookup and produce error message if key does not exists in map.

orElse :: Eq a => Maybe a -> a -> a Source #

use a default value in case of Nothing

orTry :: Eq a => Maybe a -> Maybe a -> Maybe a Source #

try something else if first result failed

orElseM :: Monad m => m (Maybe a) -> m a -> m a Source #

orTryM :: Monad m => m (Maybe a) -> m (Maybe a) -> m (Maybe a) Source #

onlyWhen :: Bool -> a -> Maybe a Source #

return only if Bool holds

existsAndSatisfies :: Maybe t -> (t -> Bool) -> Bool Source #

A value exists (is not Nothing) and satisfies the predicate

firstJustsM :: (Monad m, Foldable f) => f (m (Maybe a)) -> m (Maybe a) Source #

Takes computations returnings Maybes; tries each one in order. The first one to return a Just wins. Returns Nothing if all computations return Nothing.

pair :: a -> b -> (a, b) Source #

create a tuple

findString :: Eq a => [a] -> [a] -> Maybe Int Source #

Find the index of one string in another.

takeUntilString :: String -> String -> String Source #

Take until the occurrence of the string

strip_parentheses :: [Char] -> [Char] Source #

Strip outer parentheses from a string, if it has them.

partitionWith :: (a -> Either b c) -> [a] -> ([b], [c]) Source #

Uses a function to determine which of two output lists an input element should join

bytes_to_word :: [Word8] -> Word64 Source #

In little endian, convert a byte-list to a 64 bit word. Assume the list is at most length 8.

word_to_sint :: Int -> Word64 -> Int Source #

Convert first n bytes of a word to an integer. Assume n<8.

average :: (Real a, Fractional b) => [a] -> b Source #

average of list of numbers

crossProduct :: [[a]] -> [[a]] Source #

neFromList :: Ord a => [a] -> NESet a Source #

quotientBy :: Ord a => (a -> a -> Bool) -> Set a -> Set (Set a) Source #

quotientByL :: Ord a => (a -> a -> Bool) -> [a] -> [[a]] Source #

sextend_32_64 :: (Bits a, Num a) => a -> a Source #

Sign-extension from 32 to 64 bits

sextend_16_64 :: (Bits a, Num a) => a -> a Source #

Sign-extension from 16 to 64 bits

sextend_8_64 :: (Bits a, Num a) => a -> a Source #

Sign-extension from 8 to 64 bits

sextend_16_32 :: (Bits a, Num a) => a -> a Source #

Sign-extension from 16 to 32 bits

sextend_8_32 :: (Bits a, Num a) => a -> a Source #

Sign-extension from 8 to 32 bits

sextend_8_16 :: (Bits a, Num a) => a -> a Source #

Sign-extension from 8 to 16 bits

data Graph Source #

Generic graph with ints as vertices.

Constructors

Edges (IntMap IntSet) 

Instances

Instances details
Generic Graph Source # 
Instance details

Defined in Base

Associated Types

type Rep Graph :: Type -> Type #

Methods

from :: Graph -> Rep Graph x #

to :: Rep Graph x -> Graph #

Show Graph Source # 
Instance details

Defined in Base

Methods

showsPrec :: Int -> Graph -> ShowS #

show :: Graph -> String #

showList :: [Graph] -> ShowS #

Serialize Graph Source # 
Instance details

Defined in Base

Methods

put :: Putter Graph #

get :: Get Graph #

NFData Graph Source # 
Instance details

Defined in Base

Methods

rnf :: Graph -> () #

IntGraph Graph Source # 
Instance details

Defined in Base

type Rep Graph Source # 
Instance details

Defined in Base

type Rep Graph = D1 ('MetaData "Graph" "Base" "foxdec-0.1.0.0-DGuc5MMkhbvOBLAebyTd5" 'False) (C1 ('MetaCons "Edges" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (IntMap IntSet))))

graph_add_edges :: Graph -> Key -> IntSet -> Graph Source #

add edges from v to all vertices vs

graph_delete :: Graph -> Key -> Graph Source #

delete all edges with v as parent or child

graph_is_parent :: Graph -> Key -> Bool Source #

is v parent of an edge?

graph_is_vertex :: Graph -> Key -> Bool Source #

is v a vertex in the graph?

graph_is_edge :: Graph -> Key -> Key -> Bool Source #

is (v0,v1) an edge?

try_find_end_node_from_node :: Graph -> Int -> Maybe Int Source #

Find an end (terminal node) reachable from the given node v0

getNESetOf :: Ord a => Get a -> Get (NESet a) Source #

Read as a list of elements.

hex_color_of_text :: String -> String Source #

decide whether text should be white or black based on background color

hex_colors :: [String] Source #

A list of RGB colors

allp :: [a -> Bool] -> a -> Bool Source #

Orphan instances

(Ord a, Serialize a) => Serialize (NESet a) Source # 
Instance details

Methods

put :: Putter (NESet a) #

get :: Get (NESet a) #