Copyright | (c) Galois Inc 2014 |
---|---|
License | BSD3 |
Maintainer | Joe Hendrix <jhendrix@galois.com> |
Stability | provisional |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Lang.Crucible.Types
Description
This module exports the types used in Crucible expressions.
These types are largely used as indexes to various GADTs and type families as a way to let the GHC typechecker help us keep expressions of the embedded CFG language apart.
In addition, we provide a value-level reification of the type
indices that can be examined by pattern matching, called TypeRepr
.
The KnownRepr
class computes the value-level representation
of a given type index, when the type is known at compile time.
Similar setups exist for other components of the type system:
bitvector data and type contexts.
Synopsis
- data CrucibleType
- type AnyType = 'AnyType
- type UnitType = 'UnitType
- type BoolType = BaseToType BaseBoolType
- type NatType = 'NatType
- type IntegerType = BaseToType BaseIntegerType
- type RealValType = BaseToType BaseRealType
- type SymbolicStructType flds = BaseToType (BaseStructType flds)
- type ComplexRealType = BaseToType BaseComplexType
- type BVType w = BaseToType (BaseBVType w)
- type FloatType = 'FloatType
- type IEEEFloatType p = BaseToType (BaseFloatType p)
- type CharType = 'CharType
- type StringType si = BaseToType (BaseStringType si)
- type FunctionHandleType = 'FunctionHandleType
- type MaybeType = 'MaybeType
- type RecursiveType = 'RecursiveType
- type IntrinsicType ctx = 'IntrinsicType ctx
- type VectorType = 'VectorType
- type SequenceType = 'SequenceType
- type StructType = 'StructType
- type VariantType = 'VariantType
- type ReferenceType = 'ReferenceType
- type WordMapType = 'WordMapType
- type StringMapType = 'StringMapType
- type SymbolicArrayType idx xs = BaseToType (BaseArrayType idx xs)
- class IsRecursiveType (nm :: Symbol) where
- type UnrollType nm (ctx :: Ctx CrucibleType) :: CrucibleType
- unrollType :: SymbolRepr nm -> CtxRepr ctx -> TypeRepr (UnrollType nm ctx)
- type BaseToType = 'BaseToType
- baseToType :: BaseTypeRepr bt -> TypeRepr (BaseToType bt)
- data AsBaseType tp where
- AsBaseType :: tp ~ BaseToType bt => BaseTypeRepr bt -> AsBaseType tp
- NotBaseType :: AsBaseType tp
- asBaseType :: TypeRepr tp -> AsBaseType tp
- type CtxRepr = Assignment TypeRepr
- pattern KnownBV :: forall n. (1 <= n, KnownNat n) => TypeRepr (BVType n)
- ppTypeRepr :: Monad f => (forall s ctx. SymbolRepr s -> CtxRepr ctx -> f (Doc ann)) -> TypeRepr tp -> f (Doc ann)
- ppIntrinsicDefault :: SymbolRepr s -> CtxRepr ctx -> Doc ann
- data TypeRepr (tp :: CrucibleType) where
- AnyRepr :: TypeRepr AnyType
- UnitRepr :: TypeRepr UnitType
- BoolRepr :: TypeRepr BoolType
- NatRepr :: TypeRepr NatType
- IntegerRepr :: TypeRepr IntegerType
- RealValRepr :: TypeRepr RealValType
- ComplexRealRepr :: TypeRepr ComplexRealType
- BVRepr :: 1 <= n => !(NatRepr n) -> TypeRepr (BVType n)
- IntrinsicRepr :: !(SymbolRepr nm) -> !(CtxRepr ctx) -> TypeRepr (IntrinsicType nm ctx)
- RecursiveRepr :: IsRecursiveType nm => SymbolRepr nm -> CtxRepr ctx -> TypeRepr (RecursiveType nm ctx)
- FloatRepr :: !(FloatInfoRepr flt) -> TypeRepr (FloatType flt)
- IEEEFloatRepr :: !(FloatPrecisionRepr ps) -> TypeRepr (IEEEFloatType ps)
- CharRepr :: TypeRepr CharType
- StringRepr :: StringInfoRepr si -> TypeRepr (StringType si)
- FunctionHandleRepr :: !(CtxRepr ctx) -> !(TypeRepr ret) -> TypeRepr (FunctionHandleType ctx ret)
- MaybeRepr :: !(TypeRepr tp) -> TypeRepr (MaybeType tp)
- SequenceRepr :: !(TypeRepr tp) -> TypeRepr (SequenceType tp)
- VectorRepr :: !(TypeRepr tp) -> TypeRepr (VectorType tp)
- StructRepr :: !(CtxRepr ctx) -> TypeRepr (StructType ctx)
- VariantRepr :: !(CtxRepr ctx) -> TypeRepr (VariantType ctx)
- ReferenceRepr :: !(TypeRepr a) -> TypeRepr (ReferenceType a)
- WordMapRepr :: 1 <= n => !(NatRepr n) -> !(BaseTypeRepr tp) -> TypeRepr (WordMapType n tp)
- StringMapRepr :: !(TypeRepr tp) -> TypeRepr (StringMapType tp)
- SymbolicArrayRepr :: !(Assignment BaseTypeRepr (idx ::> tp)) -> !(BaseTypeRepr t) -> TypeRepr (SymbolicArrayType (idx ::> tp) t)
- SymbolicStructRepr :: Assignment BaseTypeRepr ctx -> TypeRepr (SymbolicStructType ctx)
- module Data.Parameterized.Ctx
- module Data.Parameterized.NatRepr
- module Data.Parameterized.SymbolRepr
- module What4.BaseTypes
- module What4.InterpretedFloatingPoint
CrucibleType data kind
data CrucibleType Source #
This data kind describes the types of values and expressions that can occur in Crucible CFGs.
Instances
TestEquality GlobalVar Source # | |
Defined in Lang.Crucible.CFG.Common | |
TestEquality RefCell Source # | |
Defined in Lang.Crucible.FunctionHandle | |
TestEquality TypeRepr Source # | |
Defined in Lang.Crucible.Types | |
PrettyApp EmptyExprExtension Source # | |
Defined in Lang.Crucible.CFG.Extension | |
PrettyApp EmptyStmtExtension Source # | |
Defined in Lang.Crucible.CFG.Extension | |
EqF TypeRepr Source # | |
HashableF TypeRepr Source # | |
Defined in Lang.Crucible.Types | |
OrdF GlobalVar Source # | |
Defined in Lang.Crucible.CFG.Common Methods compareF :: forall (x :: k) (y :: k). GlobalVar x -> GlobalVar y -> OrderingF x y # leqF :: forall (x :: k) (y :: k). GlobalVar x -> GlobalVar y -> Bool # ltF :: forall (x :: k) (y :: k). GlobalVar x -> GlobalVar y -> Bool # geqF :: forall (x :: k) (y :: k). GlobalVar x -> GlobalVar y -> Bool # gtF :: forall (x :: k) (y :: k). GlobalVar x -> GlobalVar y -> Bool # | |
OrdF RefCell Source # | |
Defined in Lang.Crucible.FunctionHandle Methods compareF :: forall (x :: k) (y :: k). RefCell x -> RefCell y -> OrderingF x y # leqF :: forall (x :: k) (y :: k). RefCell x -> RefCell y -> Bool # ltF :: forall (x :: k) (y :: k). RefCell x -> RefCell y -> Bool # geqF :: forall (x :: k) (y :: k). RefCell x -> RefCell y -> Bool # gtF :: forall (x :: k) (y :: k). RefCell x -> RefCell y -> Bool # | |
OrdF TypeRepr Source # | |
Defined in Lang.Crucible.Types Methods compareF :: forall (x :: k) (y :: k). TypeRepr x -> TypeRepr y -> OrderingF x y # leqF :: forall (x :: k) (y :: k). TypeRepr x -> TypeRepr y -> Bool # ltF :: forall (x :: k) (y :: k). TypeRepr x -> TypeRepr y -> Bool # geqF :: forall (x :: k) (y :: k). TypeRepr x -> TypeRepr y -> Bool # gtF :: forall (x :: k) (y :: k). TypeRepr x -> TypeRepr y -> Bool # | |
ShowF GlobalVar Source # | |
ShowF RefCell Source # | |
ShowF TypeRepr Source # | |
KnownRepr TypeRepr AnyType Source # | |
Defined in Lang.Crucible.Types | |
KnownRepr TypeRepr CharType Source # | |
Defined in Lang.Crucible.Types | |
KnownRepr TypeRepr NatType Source # | |
Defined in Lang.Crucible.Types | |
KnownRepr TypeRepr UnitType Source # | |
Defined in Lang.Crucible.Types | |
ApplyEmbedding' Reg Source # | |
Defined in Lang.Crucible.CFG.Core Methods applyEmbedding' :: forall (ctx :: Ctx k) (ctx' :: Ctx k) (v :: k'). CtxEmbedding ctx ctx' -> Reg ctx v -> Reg ctx' v # | |
ExtendContext' Reg Source # | |
Defined in Lang.Crucible.CFG.Core | |
FoldableFC EmptyExprExtension Source # | |
Defined in Lang.Crucible.CFG.Extension Methods foldMapFC :: forall f m. Monoid m => (forall (x :: k). f x -> m) -> forall (x :: l). EmptyExprExtension f x -> m # foldrFC :: (forall (x :: k). f x -> b -> b) -> forall (x :: l). b -> EmptyExprExtension f x -> b # foldlFC :: forall f b. (forall (x :: k). b -> f x -> b) -> forall (x :: l). b -> EmptyExprExtension f x -> b # foldrFC' :: (forall (x :: k). f x -> b -> b) -> forall (x :: l). b -> EmptyExprExtension f x -> b # foldlFC' :: forall f b. (forall (x :: k). b -> f x -> b) -> forall (x :: l). b -> EmptyExprExtension f x -> b # toListFC :: (forall (x :: k). f x -> a) -> forall (x :: l). EmptyExprExtension f x -> [a] # | |
FoldableFC EmptyStmtExtension Source # | |
Defined in Lang.Crucible.CFG.Extension Methods foldMapFC :: forall f m. Monoid m => (forall (x :: k). f x -> m) -> forall (x :: l). EmptyStmtExtension f x -> m # foldrFC :: (forall (x :: k). f x -> b -> b) -> forall (x :: l). b -> EmptyStmtExtension f x -> b # foldlFC :: forall f b. (forall (x :: k). b -> f x -> b) -> forall (x :: l). b -> EmptyStmtExtension f x -> b # foldrFC' :: (forall (x :: k). f x -> b -> b) -> forall (x :: l). b -> EmptyStmtExtension f x -> b # foldlFC' :: forall f b. (forall (x :: k). b -> f x -> b) -> forall (x :: l). b -> EmptyStmtExtension f x -> b # toListFC :: (forall (x :: k). f x -> a) -> forall (x :: l). EmptyStmtExtension f x -> [a] # | |
FoldableFC BaseTerm Source # | |
Defined in Lang.Crucible.CFG.Expr Methods foldMapFC :: forall f m. Monoid m => (forall (x :: k). f x -> m) -> forall (x :: l). BaseTerm f x -> m # foldrFC :: (forall (x :: k). f x -> b -> b) -> forall (x :: l). b -> BaseTerm f x -> b # foldlFC :: forall f b. (forall (x :: k). b -> f x -> b) -> forall (x :: l). b -> BaseTerm f x -> b # foldrFC' :: (forall (x :: k). f x -> b -> b) -> forall (x :: l). b -> BaseTerm f x -> b # foldlFC' :: forall f b. (forall (x :: k). b -> f x -> b) -> forall (x :: l). b -> BaseTerm f x -> b # toListFC :: (forall (x :: k). f x -> a) -> forall (x :: l). BaseTerm f x -> [a] # | |
FunctorFC EmptyExprExtension Source # | |
Defined in Lang.Crucible.CFG.Extension Methods fmapFC :: (forall (x :: k). f x -> g x) -> forall (x :: l). EmptyExprExtension f x -> EmptyExprExtension g x # | |
FunctorFC EmptyStmtExtension Source # | |
Defined in Lang.Crucible.CFG.Extension Methods fmapFC :: (forall (x :: k). f x -> g x) -> forall (x :: l). EmptyStmtExtension f x -> EmptyStmtExtension g x # | |
FunctorFC BaseTerm Source # | |
Defined in Lang.Crucible.CFG.Expr | |
HashableFC EmptyExprExtension Source # | |
Defined in Lang.Crucible.CFG.Extension Methods hashWithSaltFC :: (forall (x :: k). Int -> f x -> Int) -> forall (x :: l). Int -> EmptyExprExtension f x -> Int # | |
HashableFC EmptyStmtExtension Source # | |
Defined in Lang.Crucible.CFG.Extension Methods hashWithSaltFC :: (forall (x :: k). Int -> f x -> Int) -> forall (x :: l). Int -> EmptyStmtExtension f x -> Int # | |
OrdFC EmptyExprExtension Source # | |
Defined in Lang.Crucible.CFG.Extension Methods compareFC :: (forall (x :: k) (y :: k). f x -> f y -> OrderingF x y) -> forall (x :: l) (y :: l). EmptyExprExtension f x -> EmptyExprExtension f y -> OrderingF x y # | |
OrdFC EmptyStmtExtension Source # | |
Defined in Lang.Crucible.CFG.Extension Methods compareFC :: (forall (x :: k) (y :: k). f x -> f y -> OrderingF x y) -> forall (x :: l) (y :: l). EmptyStmtExtension f x -> EmptyStmtExtension f y -> OrderingF x y # | |
OrdFC BaseTerm Source # | |
ShowFC EmptyExprExtension Source # | |
Defined in Lang.Crucible.CFG.Extension Methods showFC :: (forall (x :: k). f x -> String) -> forall (x :: l). EmptyExprExtension f x -> String # showsPrecFC :: (forall (x :: k). Int -> f x -> ShowS) -> forall (x :: l). Int -> EmptyExprExtension f x -> ShowS # | |
ShowFC EmptyStmtExtension Source # | |
Defined in Lang.Crucible.CFG.Extension Methods showFC :: (forall (x :: k). f x -> String) -> forall (x :: l). EmptyStmtExtension f x -> String # showsPrecFC :: (forall (x :: k). Int -> f x -> ShowS) -> forall (x :: l). Int -> EmptyStmtExtension f x -> ShowS # | |
TestEqualityFC EmptyExprExtension Source # | |
Defined in Lang.Crucible.CFG.Extension Methods testEqualityFC :: (forall (x :: k) (y :: k). f x -> f y -> Maybe (x :~: y)) -> forall (x :: l) (y :: l). EmptyExprExtension f x -> EmptyExprExtension f y -> Maybe (x :~: y) # | |
TestEqualityFC EmptyStmtExtension Source # | |
Defined in Lang.Crucible.CFG.Extension Methods testEqualityFC :: (forall (x :: k) (y :: k). f x -> f y -> Maybe (x :~: y)) -> forall (x :: l) (y :: l). EmptyStmtExtension f x -> EmptyStmtExtension f y -> Maybe (x :~: y) # | |
TestEqualityFC BaseTerm Source # | |
Defined in Lang.Crucible.CFG.Expr | |
TraversableFC EmptyExprExtension Source # | |
Defined in Lang.Crucible.CFG.Extension Methods traverseFC :: forall f g m. Applicative m => (forall (x :: k). f x -> m (g x)) -> forall (x :: l). EmptyExprExtension f x -> m (EmptyExprExtension g x) # | |
TraversableFC EmptyStmtExtension Source # | |
Defined in Lang.Crucible.CFG.Extension Methods traverseFC :: forall f g m. Applicative m => (forall (x :: k). f x -> m (g x)) -> forall (x :: l). EmptyStmtExtension f x -> m (EmptyStmtExtension g x) # | |
TraversableFC BaseTerm Source # | |
Defined in Lang.Crucible.CFG.Expr Methods traverseFC :: forall f g m. Applicative m => (forall (x :: k). f x -> m (g x)) -> forall (x :: l). BaseTerm f x -> m (BaseTerm g x) # | |
KnownRepr BaseTypeRepr bt => KnownRepr TypeRepr (BaseToType bt :: CrucibleType) Source # | |
Defined in Lang.Crucible.Types Methods knownRepr :: TypeRepr (BaseToType bt) # | |
KnownRepr FloatInfoRepr flt => KnownRepr TypeRepr (FloatType flt :: CrucibleType) Source # | |
Defined in Lang.Crucible.Types | |
KnownRepr FloatPrecisionRepr ps => KnownRepr TypeRepr (IEEEFloatType ps :: CrucibleType) Source # | |
Defined in Lang.Crucible.Types Methods knownRepr :: TypeRepr (IEEEFloatType ps) # | |
KnownRepr TypeRepr tp => KnownRepr TypeRepr (MaybeType tp :: CrucibleType) Source # | |
Defined in Lang.Crucible.Types | |
KnownRepr TypeRepr a => KnownRepr TypeRepr (ReferenceType a :: CrucibleType) Source # | |
Defined in Lang.Crucible.Types Methods knownRepr :: TypeRepr (ReferenceType a) # | |
KnownRepr TypeRepr tp => KnownRepr TypeRepr (SequenceType tp :: CrucibleType) Source # | |
Defined in Lang.Crucible.Types Methods knownRepr :: TypeRepr (SequenceType tp) # | |
KnownRepr TypeRepr tp => KnownRepr TypeRepr (StringMapType tp :: CrucibleType) Source # | |
Defined in Lang.Crucible.Types Methods knownRepr :: TypeRepr (StringMapType tp) # | |
KnownCtx TypeRepr ctx => KnownRepr TypeRepr (StructType ctx :: CrucibleType) Source # | |
Defined in Lang.Crucible.Types Methods knownRepr :: TypeRepr (StructType ctx) # | |
KnownCtx TypeRepr ctx => KnownRepr TypeRepr (VariantType ctx :: CrucibleType) Source # | |
Defined in Lang.Crucible.Types Methods knownRepr :: TypeRepr (VariantType ctx) # | |
KnownRepr TypeRepr tp => KnownRepr TypeRepr (VectorType tp :: CrucibleType) Source # | |
Defined in Lang.Crucible.Types Methods knownRepr :: TypeRepr (VectorType tp) # | |
TraversableFC (ExprExtension ext) => ApplyEmbedding' (Expr ext :: Ctx CrucibleType -> CrucibleType -> Type) Source # | |
Defined in Lang.Crucible.CFG.Core Methods applyEmbedding' :: forall (ctx :: Ctx k) (ctx' :: Ctx k) (v :: k'). CtxEmbedding ctx ctx' -> Expr ext ctx v -> Expr ext ctx' v # | |
ApplyEmbedding' (SwitchTarget blocks :: Ctx CrucibleType -> CrucibleType -> Type) Source # | |
Defined in Lang.Crucible.CFG.Core Methods applyEmbedding' :: forall (ctx :: Ctx k) (ctx' :: Ctx k) (v :: k'). CtxEmbedding ctx ctx' -> SwitchTarget blocks ctx v -> SwitchTarget blocks ctx' v # | |
TraversableFC (ExprExtension ext) => ExtendContext' (Expr ext :: Ctx CrucibleType -> CrucibleType -> Type) Source # | |
Defined in Lang.Crucible.CFG.Core | |
ExtendContext' (SwitchTarget blocks :: Ctx CrucibleType -> CrucibleType -> Type) Source # | |
Defined in Lang.Crucible.CFG.Core Methods extendContext' :: forall (ctx :: Ctx k) (ctx' :: Ctx k) (v :: k'). Diff ctx ctx' -> SwitchTarget blocks ctx v -> SwitchTarget blocks ctx' v # | |
TraversableFC (ExprExtension ext) => FoldableFC (App ext :: (CrucibleType -> Type) -> CrucibleType -> Type) Source # | |
Defined in Lang.Crucible.CFG.Expr Methods foldMapFC :: forall f m. Monoid m => (forall (x :: k). f x -> m) -> forall (x :: l). App ext f x -> m # foldrFC :: (forall (x :: k). f x -> b -> b) -> forall (x :: l). b -> App ext f x -> b # foldlFC :: forall f b. (forall (x :: k). b -> f x -> b) -> forall (x :: l). b -> App ext f x -> b # foldrFC' :: (forall (x :: k). f x -> b -> b) -> forall (x :: l). b -> App ext f x -> b # foldlFC' :: forall f b. (forall (x :: k). b -> f x -> b) -> forall (x :: l). b -> App ext f x -> b # toListFC :: (forall (x :: k). f x -> a) -> forall (x :: l). App ext f x -> [a] # | |
TraversableFC (ExprExtension ext) => FunctorFC (App ext :: (CrucibleType -> Type) -> CrucibleType -> Type) Source # | |
Defined in Lang.Crucible.CFG.Expr | |
OrdFC (ExprExtension ext) => OrdFC (App ext :: (CrucibleType -> Type) -> CrucibleType -> Type) Source # | |
TestEqualityFC (ExprExtension ext) => TestEqualityFC (App ext :: (CrucibleType -> Type) -> CrucibleType -> Type) Source # | |
Defined in Lang.Crucible.CFG.Expr | |
TraversableFC (ExprExtension ext) => TraversableFC (App ext :: (CrucibleType -> Type) -> CrucibleType -> Type) Source # | |
Defined in Lang.Crucible.CFG.Expr Methods traverseFC :: forall f g m. Applicative m => (forall (x :: k). f x -> m (g x)) -> forall (x :: l). App ext f x -> m (App ext g x) # | |
(KnownCtx TypeRepr ctx, KnownRepr TypeRepr ret) => KnownRepr TypeRepr (FunctionHandleType ctx ret :: CrucibleType) Source # | |
Defined in Lang.Crucible.Types Methods knownRepr :: TypeRepr (FunctionHandleType ctx ret) # | |
(KnownSymbol s, KnownCtx TypeRepr ctx) => KnownRepr TypeRepr (IntrinsicType s ctx :: CrucibleType) Source # | |
Defined in Lang.Crucible.Types Methods knownRepr :: TypeRepr (IntrinsicType s ctx) # | |
(KnownSymbol s, KnownCtx TypeRepr ctx, IsRecursiveType s) => KnownRepr TypeRepr (RecursiveType s ctx :: CrucibleType) Source # | |
Defined in Lang.Crucible.Types Methods knownRepr :: TypeRepr (RecursiveType s ctx) # | |
(1 <= w, KnownNat w, KnownRepr BaseTypeRepr tp) => KnownRepr TypeRepr (WordMapType w tp :: CrucibleType) Source # | |
Defined in Lang.Crucible.Types Methods knownRepr :: TypeRepr (WordMapType w tp) # | |
TestEquality (Reg ctx :: CrucibleType -> Type) Source # | |
Defined in Lang.Crucible.CFG.Core | |
TestEquality (Atom s :: CrucibleType -> Type) Source # | |
Defined in Lang.Crucible.CFG.Reg | |
TestEquality (LambdaLabel s :: CrucibleType -> Type) Source # | |
Defined in Lang.Crucible.CFG.Reg Methods testEquality :: forall (a :: k) (b :: k). LambdaLabel s a -> LambdaLabel s b -> Maybe (a :~: b) # | |
TestEquality (Reg s :: CrucibleType -> Type) Source # | |
Defined in Lang.Crucible.CFG.Reg | |
TestEquality (Value s :: CrucibleType -> Type) Source # | |
Defined in Lang.Crucible.CFG.Reg | |
PrettyApp (ExprExtension ext) => PrettyApp (App ext :: (CrucibleType -> Type) -> CrucibleType -> Type) Source # | |
OrdF (Reg ctx :: CrucibleType -> Type) Source # | |
Defined in Lang.Crucible.CFG.Core Methods compareF :: forall (x :: k) (y :: k). Reg ctx x -> Reg ctx y -> OrderingF x y # leqF :: forall (x :: k) (y :: k). Reg ctx x -> Reg ctx y -> Bool # ltF :: forall (x :: k) (y :: k). Reg ctx x -> Reg ctx y -> Bool # geqF :: forall (x :: k) (y :: k). Reg ctx x -> Reg ctx y -> Bool # gtF :: forall (x :: k) (y :: k). Reg ctx x -> Reg ctx y -> Bool # | |
OrdF (Atom s :: CrucibleType -> Type) Source # | |
Defined in Lang.Crucible.CFG.Reg Methods compareF :: forall (x :: k) (y :: k). Atom s x -> Atom s y -> OrderingF x y # leqF :: forall (x :: k) (y :: k). Atom s x -> Atom s y -> Bool # ltF :: forall (x :: k) (y :: k). Atom s x -> Atom s y -> Bool # geqF :: forall (x :: k) (y :: k). Atom s x -> Atom s y -> Bool # gtF :: forall (x :: k) (y :: k). Atom s x -> Atom s y -> Bool # | |
OrdF (LambdaLabel s :: CrucibleType -> Type) Source # | |
Defined in Lang.Crucible.CFG.Reg Methods compareF :: forall (x :: k) (y :: k). LambdaLabel s x -> LambdaLabel s y -> OrderingF x y # leqF :: forall (x :: k) (y :: k). LambdaLabel s x -> LambdaLabel s y -> Bool # ltF :: forall (x :: k) (y :: k). LambdaLabel s x -> LambdaLabel s y -> Bool # geqF :: forall (x :: k) (y :: k). LambdaLabel s x -> LambdaLabel s y -> Bool # gtF :: forall (x :: k) (y :: k). LambdaLabel s x -> LambdaLabel s y -> Bool # | |
OrdF (Reg s :: CrucibleType -> Type) Source # | |
Defined in Lang.Crucible.CFG.Reg Methods compareF :: forall (x :: k) (y :: k). Reg s x -> Reg s y -> OrderingF x y # leqF :: forall (x :: k) (y :: k). Reg s x -> Reg s y -> Bool # ltF :: forall (x :: k) (y :: k). Reg s x -> Reg s y -> Bool # geqF :: forall (x :: k) (y :: k). Reg s x -> Reg s y -> Bool # gtF :: forall (x :: k) (y :: k). Reg s x -> Reg s y -> Bool # | |
OrdF (Value s :: CrucibleType -> Type) Source # | |
Defined in Lang.Crucible.CFG.Reg Methods compareF :: forall (x :: k) (y :: k). Value s x -> Value s y -> OrderingF x y # leqF :: forall (x :: k) (y :: k). Value s x -> Value s y -> Bool # ltF :: forall (x :: k) (y :: k). Value s x -> Value s y -> Bool # geqF :: forall (x :: k) (y :: k). Value s x -> Value s y -> Bool # gtF :: forall (x :: k) (y :: k). Value s x -> Value s y -> Bool # | |
ShowF dom => ShowF (Pointed dom :: CrucibleType -> Type) Source # | |
ShowF (Reg ctx :: CrucibleType -> Type) Source # | |
ShowF (Reg s :: CrucibleType -> Type) Source # | |
ShowF (Value s :: CrucibleType -> Type) Source # | |
ApplyEmbedding (JumpTarget blocks :: Ctx CrucibleType -> Type) Source # | |
Defined in Lang.Crucible.CFG.Core Methods applyEmbedding :: forall (ctx :: Ctx k) (ctx' :: Ctx k). CtxEmbedding ctx ctx' -> JumpTarget blocks ctx -> JumpTarget blocks ctx' # | |
ExtendContext (JumpTarget blocks :: Ctx CrucibleType -> Type) Source # | |
Defined in Lang.Crucible.CFG.Core Methods extendContext :: forall (ctx :: Ctx k) (ctx' :: Ctx k). Diff ctx ctx' -> JumpTarget blocks ctx -> JumpTarget blocks ctx' # | |
(TestEqualityFC (ExprExtension ext), TestEquality f) => TestEquality (App ext f :: CrucibleType -> Type) Source # | |
Defined in Lang.Crucible.CFG.Expr | |
(OrdFC (ExprExtension ext), OrdF f) => OrdF (App ext f :: CrucibleType -> Type) Source # | |
Defined in Lang.Crucible.CFG.Expr Methods compareF :: forall (x :: k) (y :: k). App ext f x -> App ext f y -> OrderingF x y # leqF :: forall (x :: k) (y :: k). App ext f x -> App ext f y -> Bool # ltF :: forall (x :: k) (y :: k). App ext f x -> App ext f y -> Bool # geqF :: forall (x :: k) (y :: k). App ext f x -> App ext f y -> Bool # gtF :: forall (x :: k) (y :: k). App ext f x -> App ext f y -> Bool # | |
PrettyExt ext => ShowF (Expr ext s :: CrucibleType -> Type) Source # | |
ApplyEmbedding (TermStmt blocks ret :: Ctx CrucibleType -> Type) Source # | |
Defined in Lang.Crucible.CFG.Core Methods applyEmbedding :: forall (ctx :: Ctx k) (ctx' :: Ctx k). CtxEmbedding ctx ctx' -> TermStmt blocks ret ctx -> TermStmt blocks ret ctx' # | |
ExtendContext (TermStmt blocks ret :: Ctx CrucibleType -> Type) Source # | |
Defined in Lang.Crucible.CFG.Core | |
TraverseExt ext => ApplyEmbedding (StmtSeq ext blocks ret :: Ctx CrucibleType -> Type) Source # | |
Defined in Lang.Crucible.CFG.Core Methods applyEmbedding :: forall (ctx :: Ctx k) (ctx' :: Ctx k). CtxEmbedding ctx ctx' -> StmtSeq ext blocks ret ctx -> StmtSeq ext blocks ret ctx' # | |
Pretty (ValueSet s) Source # | |
Defined in Lang.Crucible.CFG.Reg | |
TestEquality (BlockID blocks :: Ctx CrucibleType -> Type) Source # | |
Defined in Lang.Crucible.CFG.Core | |
TestEquality (CrucibleBranchTarget f :: Maybe (Ctx CrucibleType) -> Type) Source # | |
Defined in Lang.Crucible.Simulator.CallFrame Methods testEquality :: forall (a :: k) (b :: k). CrucibleBranchTarget f a -> CrucibleBranchTarget f b -> Maybe (a :~: b) # | |
OrdF (BlockID blocks :: Ctx CrucibleType -> Type) Source # | |
Defined in Lang.Crucible.CFG.Core Methods compareF :: forall (x :: k) (y :: k). BlockID blocks x -> BlockID blocks y -> OrderingF x y # leqF :: forall (x :: k) (y :: k). BlockID blocks x -> BlockID blocks y -> Bool # ltF :: forall (x :: k) (y :: k). BlockID blocks x -> BlockID blocks y -> Bool # geqF :: forall (x :: k) (y :: k). BlockID blocks x -> BlockID blocks y -> Bool # gtF :: forall (x :: k) (y :: k). BlockID blocks x -> BlockID blocks y -> Bool # | |
ShowF (BlockID blocks :: Ctx CrucibleType -> Type) Source # | |
ShowF dom => ShowF (PointAbstraction blocks dom :: Ctx CrucibleType -> Type) Source # | |
Defined in Lang.Crucible.Analysis.Fixpoint Methods withShow :: forall p q (tp :: k) a. p (PointAbstraction blocks dom) -> q tp -> (Show (PointAbstraction blocks dom tp) => a) -> a # showF :: forall (tp :: k). PointAbstraction blocks dom tp -> String # showsPrecF :: forall (tp :: k). Int -> PointAbstraction blocks dom tp -> String -> String # | |
PrettyExt ext => ShowF (Block ext blocks ret :: Ctx CrucibleType -> Type) Source # | |
Defined in Lang.Crucible.CFG.Core | |
MonadState (SimState p sym ext rtp (OverrideLang ret) ('Just args)) (OverrideSim p sym ext rtp args ret) Source # | |
Defined in Lang.Crucible.Simulator.OverrideSim Methods get :: OverrideSim p sym ext rtp args ret (SimState p sym ext rtp (OverrideLang ret) ('Just args)) # put :: SimState p sym ext rtp (OverrideLang ret) ('Just args) -> OverrideSim p sym ext rtp args ret () # state :: (SimState p sym ext rtp (OverrideLang ret) ('Just args) -> (a, SimState p sym ext rtp (OverrideLang ret) ('Just args))) -> OverrideSim p sym ext rtp args ret a # |
Constructors for kind CrucibleType
Arguments
= 'AnyType |
|
A dynamic type that can contain values of any type.
Arguments
= BaseToType BaseBoolType |
|
type IntegerType Source #
Arguments
= BaseToType BaseIntegerType |
|
type RealValType Source #
Arguments
= BaseToType BaseRealType |
|
type SymbolicStructType flds Source #
Arguments
= BaseToType (BaseStructType flds) |
|
type ComplexRealType Source #
Arguments
= BaseToType BaseComplexType |
|
Arguments
= BaseToType (BaseBVType w) |
|
Arguments
= 'FloatType |
|
A type index for floating point numbers, whose interpretation depends on the symbolic backend.
type IEEEFloatType p Source #
Arguments
= BaseToType (BaseFloatType p) | :: FloatPrecision -> CrucibleType |
Arguments
= 'CharType |
|
A single character, as a 16-bit wide char.
type StringType si Source #
Arguments
= BaseToType (BaseStringType si) |
|
type FunctionHandleType Source #
Arguments
= 'FunctionHandleType |
|
A function handle taking a context of formal arguments and a return type.
Arguments
= 'MaybeType |
|
The Maybe
type lifted into Crucible expressions.
type RecursiveType Source #
Arguments
= 'RecursiveType |
|
Named recursive types, named by the given symbol. To use
recursive types you must provide an instance of the
IsRecursiveType
class that gives the unfolding of this recursive
type. The RollRecursive
and
UnrollRecursive
operations witness the
isomorphism between a recursive type and its one-step unrolling.
Similar to Haskell's newtype
, recursive types do not necessarily
have to mention the recursive type being defined; in which case,
the type is simply a new named type which is isomorphic to its
definition.
type IntrinsicType ctx Source #
Arguments
= 'IntrinsicType ctx |
|
Named intrinsic types. Intrinsic types are a way to extend the
Crucible type system after-the-fact and add new type
implementations. Core Crucible provides no operations on intrinsic
types; they must be provided as built-in override functions. See
the IntrinsicClass
typeclass
and the Intrinsic
type family
defined in Lang.Crucible.Simulator.Intrinsics.
type VectorType Source #
Arguments
= 'VectorType |
|
A finite (one-dimensional) sequence of values. Vectors are optimized for random-access indexing and updating. Vectors of different lengths may not be combined at join points.
type SequenceType Source #
Arguments
= 'SequenceType |
|
Sequences of values, represented as linked lists of cons cells. Sequences only allow access to the front. Unlike Vectors, sequences of different lengths may be combined at join points.
type StructType Source #
Arguments
= 'StructType |
|
A structure is an aggregate type consisting of a sequence of values. The type of each value is known statically.
type VariantType Source #
Arguments
= 'VariantType |
|
A variant is a disjoint union of the types listed in the context.
type ReferenceType Source #
Arguments
= 'ReferenceType |
|
The type of mutable reference cells.
type WordMapType Source #
Arguments
= 'WordMapType |
|
A finite map from bitvector values to the given Crucible type.
The Nat
index gives the width of the bitvector values used to
index the map.
type StringMapType Source #
Arguments
= 'StringMapType |
|
A partial map from strings to values.
type SymbolicArrayType idx xs Source #
Arguments
= BaseToType (BaseArrayType idx xs) |
|
IsRecursiveType
class IsRecursiveType (nm :: Symbol) where Source #
This typeclass is used to register recursive Crucible types with the compiler. This class defines, for a given symbol, both the type-level and the representative-level unrolling of a named recursive type.
The symbol constitutes a unique compile-time identifier for the recursive type, allowing recursive types to be unrolled at run time without requiring dynamic checks.
Parameter nm
has kind Symbol
.
Associated Types
type UnrollType nm (ctx :: Ctx CrucibleType) :: CrucibleType Source #
Methods
unrollType :: SymbolRepr nm -> CtxRepr ctx -> TypeRepr (UnrollType nm ctx) Source #
Base type injection
type BaseToType Source #
Arguments
= 'BaseToType |
|
baseToType :: BaseTypeRepr bt -> TypeRepr (BaseToType bt) Source #
data AsBaseType tp where Source #
Constructors
AsBaseType :: tp ~ BaseToType bt => BaseTypeRepr bt -> AsBaseType tp | |
NotBaseType :: AsBaseType tp |
asBaseType :: TypeRepr tp -> AsBaseType tp Source #
Other stuff
type CtxRepr = Assignment TypeRepr Source #
pattern KnownBV :: forall n. (1 <= n, KnownNat n) => TypeRepr (BVType n) Source #
Pattern synonym specifying bitvector TypeReprs. Intended to be use
with type applications, e.g., KnownBV @32
.
Arguments
:: Monad f | |
=> (forall s ctx. SymbolRepr s -> CtxRepr ctx -> f (Doc ann)) | How to print |
-> TypeRepr tp | |
-> f (Doc ann) |
Pretty-print a type.
Attempts to be consistent with the syntax provided in the crucible-syntax
package.
This is monadic mostly to allow failure, e.g., in case the caller finds an intrinsic type that it doesn't expect.
ppIntrinsicDefault :: SymbolRepr s -> CtxRepr ctx -> Doc ann Source #
A default printer for IntrinsicRepr
, suitable for use with ppTypeRepr
.
Representation of Crucible types
data TypeRepr (tp :: CrucibleType) where Source #
A family of representatives for Crucible types. Parameter tp
has kind CrucibleType
.
Constructors
Instances
Re-exports
module Data.Parameterized.Ctx
module Data.Parameterized.NatRepr
module What4.BaseTypes