Copyright | (c) Galois Inc 2015 |
---|---|
Maintainer | Joe Hendrix <jhendrix@galois.com> |
Safe Haskell | None |
Language | Haskell2010 |
Data.Macaw.Types
Description
The type of machine words, including bit vectors and floating point
Synopsis
- data Type
- data FloatInfoRepr (fi :: FloatInfo) where
- n0 :: NatRepr 0
- n1 :: NatRepr 1
- n64 :: NatRepr 64
- type BoolType = 'BoolType
- type FloatType = 'FloatType
- n4 :: NatRepr 4
- n8 :: NatRepr 8
- n16 :: NatRepr 16
- n32 :: NatRepr 32
- n80 :: NatRepr 80
- n128 :: NatRepr 128
- n256 :: NatRepr 256
- n512 :: NatRepr 512
- data FloatInfo
- type HalfFloat = 'HalfFloat
- type SingleFloat = 'SingleFloat
- type DoubleFloat = 'DoubleFloat
- type QuadFloat = 'QuadFloat
- type X86_80Float = 'X86_80Float
- type family FloatInfoBytes (fi :: FloatInfo) :: Nat where ...
- floatInfoBytes :: forall (fi :: FloatInfo). FloatInfoRepr fi -> NatRepr (FloatInfoBytes fi)
- floatInfoBytesIsPos :: forall (fi :: FloatInfo). FloatInfoRepr fi -> LeqProof 1 (FloatInfoBytes fi)
- type FloatInfoBits (fi :: FloatInfo) = 8 * FloatInfoBytes fi
- floatInfoBits :: forall (fi :: FloatInfo). FloatInfoRepr fi -> NatRepr (FloatInfoBits fi)
- floatInfoBitsIsPos :: forall (fi :: FloatInfo). FloatInfoRepr fi -> LeqProof 1 (FloatInfoBits fi)
- type BVType = 'BVType
- type TupleType = 'TupleType
- type VecType = 'VecType
- type family TypeBytes (tp :: Type) :: Nat where ...
- type family TypeBits (tp :: Type) :: Nat where ...
- type FloatBVType (fi :: FloatInfo) = BVType (FloatInfoBits fi)
- data TypeRepr (tp :: Type) where
- BoolTypeRepr :: TypeRepr 'BoolType
- BVTypeRepr :: forall (n :: Natural). 1 <= n => !(NatRepr n) -> TypeRepr ('BVType n)
- FloatTypeRepr :: forall (fi :: FloatInfo). !(FloatInfoRepr fi) -> TypeRepr ('FloatType fi)
- TupleTypeRepr :: forall (ctx :: [Type]). !(List TypeRepr ctx) -> TypeRepr ('TupleType ctx)
- VecTypeRepr :: forall (n :: Nat) (tp1 :: Type). NatRepr n -> TypeRepr tp1 -> TypeRepr ('VecType n tp1)
- type_width :: forall (n :: Nat). TypeRepr (BVType n) -> NatRepr n
- floatBVTypeRepr :: forall (fi :: FloatInfo). FloatInfoRepr fi -> TypeRepr (FloatBVType fi)
- class HasRepr (f :: k -> Type) (v :: k -> Type) | f -> v where
- typeRepr :: forall (tp :: k). f tp -> v tp
- typeWidth :: forall f (w :: Nat). HasRepr f TypeRepr => f (BVType w) -> NatRepr w
- class KnownNat (n :: Nat)
- type Nat = Natural
- data NatRepr (n :: Nat)
- knownNat :: forall (n :: Nat). KnownNat n => NatRepr n
Documentation
Constructors
BVType Nat | A bitvector with the given number of bits. |
FloatType FloatInfo | A floating point in the given format. |
BoolType | A Boolean value |
TupleType [Type] | A tuple of types |
VecType Nat Type | A vector of types |
Instances
TestEquality MemRepr Source # | |
Defined in Data.Macaw.CFG.AssignRhs | |
TestEquality TypeRepr Source # | |
Defined in Data.Macaw.Types | |
HashableF MemRepr | |
Defined in Data.Macaw.CFG.AssignRhs | |
OrdF MemRepr | |
Defined in Data.Macaw.CFG.AssignRhs Methods compareF :: forall (x :: Type) (y :: Type). MemRepr x -> MemRepr y -> OrderingF x y leqF :: forall (x :: Type) (y :: Type). MemRepr x -> MemRepr y -> Bool ltF :: forall (x :: Type) (y :: Type). MemRepr x -> MemRepr y -> Bool geqF :: forall (x :: Type) (y :: Type). MemRepr x -> MemRepr y -> Bool gtF :: forall (x :: Type) (y :: Type). MemRepr x -> MemRepr y -> Bool | |
OrdF TypeRepr Source # | |
Defined in Data.Macaw.Types Methods compareF :: forall (x :: Type) (y :: Type). TypeRepr x -> TypeRepr y -> OrderingF x y leqF :: forall (x :: Type) (y :: Type). TypeRepr x -> TypeRepr y -> Bool ltF :: forall (x :: Type) (y :: Type). TypeRepr x -> TypeRepr y -> Bool geqF :: forall (x :: Type) (y :: Type). TypeRepr x -> TypeRepr y -> Bool gtF :: forall (x :: Type) (y :: Type). TypeRepr x -> TypeRepr y -> Bool | |
ShowF TypeRepr Source # | |
HasRepr MemRepr TypeRepr Source # | |
KnownRepr TypeRepr BoolType Source # | |
Defined in Data.Macaw.Types | |
FoldableFC App Source # | |
Defined in Data.Macaw.CFG.App Methods foldMapFC :: forall f m. Monoid m => (forall (x :: Type). f x -> m) -> forall (x :: Type). App f x -> m # foldrFC :: (forall (x :: Type). f x -> b -> b) -> forall (x :: Type). b -> App f x -> b # foldlFC :: forall f b. (forall (x :: Type). b -> f x -> b) -> forall (x :: Type). b -> App f x -> b # foldrFC' :: (forall (x :: Type). f x -> b -> b) -> forall (x :: Type). b -> App f x -> b # foldlFC' :: forall f b. (forall (x :: Type). b -> f x -> b) -> forall (x :: Type). b -> App f x -> b # toListFC :: (forall (x :: Type). f x -> a) -> forall (x :: Type). App f x -> [a] # | |
FunctorFC App | |
TraversableFC App | |
Defined in Data.Macaw.CFG.App Methods traverseFC :: forall f g m. Applicative m => (forall (x :: Type). f x -> m (g x)) -> forall (x :: Type). App f x -> m (App g x) | |
(KnownNat n, 1 <= n) => KnownRepr TypeRepr (BVType n :: Type) Source # | |
Defined in Data.Macaw.Types | |
KnownRepr FloatInfoRepr fi => KnownRepr TypeRepr (FloatType fi :: Type) Source # | |
Defined in Data.Macaw.Types | |
KnownRepr (List TypeRepr) l => KnownRepr TypeRepr (TupleType l :: Type) Source # | |
Defined in Data.Macaw.Types | |
FoldableFC (ArchFn arch) => FoldableFC (AssignRhs arch :: (Type -> Type) -> Type -> Type) Source # | |
Defined in Data.Macaw.CFG.AssignRhs Methods foldMapFC :: forall f m. Monoid m => (forall (x :: Type). f x -> m) -> forall (x :: Type). AssignRhs arch f x -> m # foldrFC :: (forall (x :: Type). f x -> b -> b) -> forall (x :: Type). b -> AssignRhs arch f x -> b # foldlFC :: forall f b. (forall (x :: Type). b -> f x -> b) -> forall (x :: Type). b -> AssignRhs arch f x -> b # foldrFC' :: (forall (x :: Type). f x -> b -> b) -> forall (x :: Type). b -> AssignRhs arch f x -> b # foldlFC' :: forall f b. (forall (x :: Type). b -> f x -> b) -> forall (x :: Type). b -> AssignRhs arch f x -> b # toListFC :: (forall (x :: Type). f x -> a) -> forall (x :: Type). AssignRhs arch f x -> [a] # | |
(KnownNat n, KnownRepr TypeRepr r) => KnownRepr TypeRepr (VecType n r :: Type) Source # | |
Defined in Data.Macaw.Types | |
TestEquality r => TestEquality (BoundLoc r :: Type -> Type) Source # | |
Defined in Data.Macaw.AbsDomain.StackAnalysis | |
TestEquality (ArchReg arch) => TestEquality (InitInferValue arch :: Type -> Type) Source # | |
Defined in Data.Macaw.Analysis.RegisterUse Methods testEquality :: forall (a :: Type) (b :: Type). InitInferValue arch a -> InitInferValue arch b -> Maybe (a :~: b) # | |
TestEquality (MemSlice wtp :: Type -> Type) Source # | |
Defined in Data.Macaw.Analysis.RegisterUse | |
TestEquality f => TestEquality (App f :: Type -> Type) Source # | |
Defined in Data.Macaw.CFG.App | |
TestEquality (AssignId ids :: Type -> Type) Source # | |
Defined in Data.Macaw.CFG.Core | |
TestEquality (CValue arch :: Type -> Type) Source # | |
Defined in Data.Macaw.CFG.Core | |
ShowF r => PrettyF (BoundLoc r :: Type -> Type) Source # | |
EqF (AbsValue w :: Type -> Type) | |
(HashableF f, TestEquality f) => HashableF (App f :: Type -> Type) | |
Defined in Data.Macaw.CFG.App | |
HashableF (CValue arch :: Type -> Type) | |
Defined in Data.Macaw.CFG.Core | |
OrdF r => OrdF (BoundLoc r :: Type -> Type) | |
Defined in Data.Macaw.AbsDomain.StackAnalysis Methods compareF :: forall (x :: Type) (y :: Type). BoundLoc r x -> BoundLoc r y -> OrderingF x y leqF :: forall (x :: Type) (y :: Type). BoundLoc r x -> BoundLoc r y -> Bool ltF :: forall (x :: Type) (y :: Type). BoundLoc r x -> BoundLoc r y -> Bool geqF :: forall (x :: Type) (y :: Type). BoundLoc r x -> BoundLoc r y -> Bool gtF :: forall (x :: Type) (y :: Type). BoundLoc r x -> BoundLoc r y -> Bool | |
OrdF (ArchReg arch) => OrdF (InitInferValue arch :: Type -> Type) | |
Defined in Data.Macaw.Analysis.RegisterUse Methods compareF :: forall (x :: Type) (y :: Type). InitInferValue arch x -> InitInferValue arch y -> OrderingF x y leqF :: forall (x :: Type) (y :: Type). InitInferValue arch x -> InitInferValue arch y -> Bool ltF :: forall (x :: Type) (y :: Type). InitInferValue arch x -> InitInferValue arch y -> Bool geqF :: forall (x :: Type) (y :: Type). InitInferValue arch x -> InitInferValue arch y -> Bool gtF :: forall (x :: Type) (y :: Type). InitInferValue arch x -> InitInferValue arch y -> Bool | |
OrdF (MemSlice wtp :: Type -> Type) | |
Defined in Data.Macaw.Analysis.RegisterUse Methods compareF :: forall (x :: Type) (y :: Type). MemSlice wtp x -> MemSlice wtp y -> OrderingF x y leqF :: forall (x :: Type) (y :: Type). MemSlice wtp x -> MemSlice wtp y -> Bool ltF :: forall (x :: Type) (y :: Type). MemSlice wtp x -> MemSlice wtp y -> Bool geqF :: forall (x :: Type) (y :: Type). MemSlice wtp x -> MemSlice wtp y -> Bool gtF :: forall (x :: Type) (y :: Type). MemSlice wtp x -> MemSlice wtp y -> Bool | |
OrdF f => OrdF (App f :: Type -> Type) | |
Defined in Data.Macaw.CFG.App Methods compareF :: forall (x :: Type) (y :: Type). App f x -> App f y -> OrderingF x y leqF :: forall (x :: Type) (y :: Type). App f x -> App f y -> Bool ltF :: forall (x :: Type) (y :: Type). App f x -> App f y -> Bool geqF :: forall (x :: Type) (y :: Type). App f x -> App f y -> Bool gtF :: forall (x :: Type) (y :: Type). App f x -> App f y -> Bool | |
OrdF (AssignId ids :: Type -> Type) | |
Defined in Data.Macaw.CFG.Core Methods compareF :: forall (x :: Type) (y :: Type). AssignId ids x -> AssignId ids y -> OrderingF x y leqF :: forall (x :: Type) (y :: Type). AssignId ids x -> AssignId ids y -> Bool ltF :: forall (x :: Type) (y :: Type). AssignId ids x -> AssignId ids y -> Bool geqF :: forall (x :: Type) (y :: Type). AssignId ids x -> AssignId ids y -> Bool gtF :: forall (x :: Type) (y :: Type). AssignId ids x -> AssignId ids y -> Bool | |
OrdF (CValue arch :: Type -> Type) | |
Defined in Data.Macaw.CFG.Core Methods compareF :: forall (x :: Type) (y :: Type). CValue arch x -> CValue arch y -> OrderingF x y leqF :: forall (x :: Type) (y :: Type). CValue arch x -> CValue arch y -> Bool ltF :: forall (x :: Type) (y :: Type). CValue arch x -> CValue arch y -> Bool geqF :: forall (x :: Type) (y :: Type). CValue arch x -> CValue arch y -> Bool gtF :: forall (x :: Type) (y :: Type). CValue arch x -> CValue arch y -> Bool | |
ShowF r => ShowF (BoundLoc r :: Type -> Type) | |
ShowF (ArchReg arch) => ShowF (InitInferValue arch :: Type -> Type) | |
Defined in Data.Macaw.Analysis.RegisterUse Methods withShow :: forall p q (tp :: Type) a. p (InitInferValue arch) -> q tp -> (Show (InitInferValue arch tp) => a) -> a showF :: forall (tp :: Type). InitInferValue arch tp -> String showsPrecF :: forall (tp :: Type). Int -> InitInferValue arch tp -> String -> String | |
ShowF (AssignId ids :: Type -> Type) | |
HasRepr r TypeRepr => HasRepr (BoundLoc r :: Type -> Type) TypeRepr Source # | |
HasRepr (App f :: Type -> Type) TypeRepr Source # | |
HasRepr (CValue arch :: Type -> Type) TypeRepr Source # | |
TestEquality (ArchReg arch) => TestEquality (BlockInferValue arch ids :: Type -> Type) Source # | |
Defined in Data.Macaw.Analysis.RegisterUse Methods testEquality :: forall (a :: Type) (b :: Type). BlockInferValue arch ids a -> BlockInferValue arch ids b -> Maybe (a :~: b) # | |
OrdF (ArchReg arch) => TestEquality (Value arch ids :: Type -> Type) Source # | |
Defined in Data.Macaw.CFG.Core | |
OrdF (ArchReg arch) => EqF (Value arch ids :: Type -> Type) | |
OrdF (ArchReg arch) => OrdF (BlockInferValue arch ids :: Type -> Type) | |
Defined in Data.Macaw.Analysis.RegisterUse Methods compareF :: forall (x :: Type) (y :: Type). BlockInferValue arch ids x -> BlockInferValue arch ids y -> OrderingF x y leqF :: forall (x :: Type) (y :: Type). BlockInferValue arch ids x -> BlockInferValue arch ids y -> Bool ltF :: forall (x :: Type) (y :: Type). BlockInferValue arch ids x -> BlockInferValue arch ids y -> Bool geqF :: forall (x :: Type) (y :: Type). BlockInferValue arch ids x -> BlockInferValue arch ids y -> Bool gtF :: forall (x :: Type) (y :: Type). BlockInferValue arch ids x -> BlockInferValue arch ids y -> Bool | |
OrdF (ArchReg arch) => OrdF (Value arch ids :: Type -> Type) | |
Defined in Data.Macaw.CFG.Core Methods compareF :: forall (x :: Type) (y :: Type). Value arch ids x -> Value arch ids y -> OrderingF x y leqF :: forall (x :: Type) (y :: Type). Value arch ids x -> Value arch ids y -> Bool ltF :: forall (x :: Type) (y :: Type). Value arch ids x -> Value arch ids y -> Bool geqF :: forall (x :: Type) (y :: Type). Value arch ids x -> Value arch ids y -> Bool gtF :: forall (x :: Type) (y :: Type). Value arch ids x -> Value arch ids y -> Bool | |
ShowF (ArchReg arch) => ShowF (BlockInferValue arch ids :: Type -> Type) | |
Defined in Data.Macaw.Analysis.RegisterUse Methods withShow :: forall p q (tp :: Type) a. p (BlockInferValue arch ids) -> q tp -> (Show (BlockInferValue arch ids tp) => a) -> a showF :: forall (tp :: Type). BlockInferValue arch ids tp -> String showsPrecF :: forall (tp :: Type). Int -> BlockInferValue arch ids tp -> String -> String | |
HasRepr (AssignRhs arch f :: Type -> Type) TypeRepr Source # | |
HasRepr (ArchReg arch) TypeRepr => HasRepr (Value arch ids :: Type -> Type) TypeRepr Source # | |
PrettyRegValue r f => Show (RegState r f) Source # | |
PrettyRegValue r f => Pretty (RegState r f) | |
Defined in Data.Macaw.CFG.Core |
data FloatInfoRepr (fi :: FloatInfo) where Source #
Constructors
Instances
Constructors
HalfFloat | 16 bit binary IEE754* |
SingleFloat | 32 bit binary IEE754 |
DoubleFloat | 64 bit binary IEE754 |
QuadFloat | 128 bit binary IEE754 |
X86_80Float | X86 80-bit extended floats |
Instances
type SingleFloat = 'SingleFloat Source #
type DoubleFloat = 'DoubleFloat Source #
type X86_80Float = 'X86_80Float Source #
type family FloatInfoBytes (fi :: FloatInfo) :: Nat where ... Source #
Equations
FloatInfoBytes HalfFloat = 2 | |
FloatInfoBytes SingleFloat = 4 | |
FloatInfoBytes DoubleFloat = 8 | |
FloatInfoBytes QuadFloat = 16 | |
FloatInfoBytes X86_80Float = 10 |
floatInfoBytes :: forall (fi :: FloatInfo). FloatInfoRepr fi -> NatRepr (FloatInfoBytes fi) Source #
floatInfoBytesIsPos :: forall (fi :: FloatInfo). FloatInfoRepr fi -> LeqProof 1 (FloatInfoBytes fi) Source #
type FloatInfoBits (fi :: FloatInfo) = 8 * FloatInfoBytes fi Source #
floatInfoBits :: forall (fi :: FloatInfo). FloatInfoRepr fi -> NatRepr (FloatInfoBits fi) Source #
floatInfoBitsIsPos :: forall (fi :: FloatInfo). FloatInfoRepr fi -> LeqProof 1 (FloatInfoBits fi) Source #
type FloatBVType (fi :: FloatInfo) = BVType (FloatInfoBits fi) Source #
The bitvector associated with the given floating-point format.
data TypeRepr (tp :: Type) where Source #
A runtime representation of Type
for case matching purposes.
Constructors
BoolTypeRepr :: TypeRepr 'BoolType | |
BVTypeRepr :: forall (n :: Natural). 1 <= n => !(NatRepr n) -> TypeRepr ('BVType n) | |
FloatTypeRepr :: forall (fi :: FloatInfo). !(FloatInfoRepr fi) -> TypeRepr ('FloatType fi) | |
TupleTypeRepr :: forall (ctx :: [Type]). !(List TypeRepr ctx) -> TypeRepr ('TupleType ctx) | |
VecTypeRepr :: forall (n :: Nat) (tp1 :: Type). NatRepr n -> TypeRepr tp1 -> TypeRepr ('VecType n tp1) |
Instances
floatBVTypeRepr :: forall (fi :: FloatInfo). FloatInfoRepr fi -> TypeRepr (FloatBVType fi) Source #
class HasRepr (f :: k -> Type) (v :: k -> Type) | f -> v where Source #
A multi-parameter type class that allows one to represent that a parameterized type value has some representative type such as a TypeRepr.
Instances
HasRepr MemRepr TypeRepr Source # | |
HasRepr r TypeRepr => HasRepr (BoundLoc r :: Type -> Type) TypeRepr Source # | |
HasRepr (App f :: Type -> Type) TypeRepr Source # | |
HasRepr (CValue arch :: Type -> Type) TypeRepr Source # | |
HasRepr (AssignRhs arch f :: Type -> Type) TypeRepr Source # | |
HasRepr (ArchReg arch) TypeRepr => HasRepr (Value arch ids :: Type -> Type) TypeRepr Source # | |
This class gives the integer associated with a type-level natural. There are instances of the class for every concrete literal: 0, 1, 2, etc.
Since: base-4.7.0.0
Minimal complete definition
A type synonym for Natural
.
Previously, this was an opaque data type, but it was changed to a type synonym.
Since: base-4.16.0.0
Instances
TestEquality NatRepr | |
Defined in Data.Parameterized.NatRepr.Internal | |
HashableF NatRepr | |
Defined in Data.Parameterized.NatRepr.Internal | |
OrdF NatRepr | |
Defined in Data.Parameterized.NatRepr.Internal Methods compareF :: forall (x :: Nat) (y :: Nat). NatRepr x -> NatRepr y -> OrderingF x y leqF :: forall (x :: Nat) (y :: Nat). NatRepr x -> NatRepr y -> Bool ltF :: forall (x :: Nat) (y :: Nat). NatRepr x -> NatRepr y -> Bool geqF :: forall (x :: Nat) (y :: Nat). NatRepr x -> NatRepr y -> Bool gtF :: forall (x :: Nat) (y :: Nat). NatRepr x -> NatRepr y -> Bool | |
ShowF NatRepr | |
DecidableEq NatRepr | |
IsRepr NatRepr | |
Defined in Data.Parameterized.WithRepr | |
KnownNat n => KnownRepr NatRepr (n :: Nat) | |
Defined in Data.Parameterized.NatRepr.Internal | |
KnownNat n => Data (NatRepr n) | |
Defined in Data.Parameterized.NatRepr.Internal Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> NatRepr n -> c (NatRepr n) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (NatRepr n) # toConstr :: NatRepr n -> Constr # dataTypeOf :: NatRepr n -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (NatRepr n)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (NatRepr n)) # gmapT :: (forall b. Data b => b -> b) -> NatRepr n -> NatRepr n # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> NatRepr n -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> NatRepr n -> r # gmapQ :: (forall d. Data d => d -> u) -> NatRepr n -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> NatRepr n -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> NatRepr n -> m (NatRepr n) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> NatRepr n -> m (NatRepr n) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> NatRepr n -> m (NatRepr n) # | |
Show (NatRepr n) | |
Eq (NatRepr m) | |
Hashable (NatRepr n) | |
Defined in Data.Parameterized.NatRepr.Internal | |
PolyEq (NatRepr m) (NatRepr n) | |