Copyright | (c) Sirui Lu 2021-2024 |
---|---|
License | BSD-3-Clause (see the LICENSE file) |
Maintainer | siruilu@cs.washington.edu |
Stability | Experimental |
Portability | GHC only |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Grisette.Internal.SymPrim.Prim.Internal.Term
Description
Synopsis
- class SupportedPrimConstraint t where
- type PrimConstraint t :: Constraint
- class (Lift t, NFData t, Typeable t, SupportedPrimConstraint t, SBVRep t) => SupportedPrim t where
- primTypeRep :: TypeRep t
- sameCon :: t -> t -> Bool
- hashConWithSalt :: Int -> t -> Int
- pformatCon :: t -> String
- defaultValue :: t
- pevalITETerm :: Term Bool -> Term t -> Term t -> Term t
- pevalEqTerm :: Term t -> Term t -> Term Bool
- pevalDistinctTerm :: NonEmpty (Term t) -> Term Bool
- conSBVTerm :: t -> SBVType t
- symSBVName :: TypedSymbol 'AnyKind t -> Int -> String
- symSBVTerm :: SBVFreshMonad m => String -> m (SBVType t)
- withPrim :: ((PrimConstraint t, SMTDefinable (SBVType t), Mergeable (SBVType t), Typeable (SBVType t)) => a) -> a
- sbvIte :: SBV Bool -> SBVType t -> SBVType t -> SBVType t
- sbvEq :: SBVType t -> SBVType t -> SBV Bool
- sbvDistinct :: NonEmpty (SBVType t) -> SBV Bool
- parseSMTModelResult :: Int -> ([([CV], CV)], CV) -> t
- castTypedSymbol :: IsSymbolKind knd' => TypedSymbol knd t -> Maybe (TypedSymbol knd' t)
- funcDummyConstraint :: SBVType t -> SBV Bool
- class SupportedPrim con => SymRep con where
- type SymType con
- class ConRep sym where
- type ConType sym
- class (ConRep sym, SymRep con, sym ~ SymType con, con ~ ConType sym) => LinkedRep con sym | con -> sym, sym -> con where
- underlyingTerm :: sym -> Term con
- wrapTerm :: Term con -> sym
- class PEvalApplyTerm f a b | f -> a b where
- pevalApplyTerm :: Term f -> Term a -> Term b
- sbvApplyTerm :: SBVType f -> SBVType a -> SBVType b
- class PEvalBitwiseTerm t where
- pevalAndBitsTerm :: Term t -> Term t -> Term t
- pevalOrBitsTerm :: Term t -> Term t -> Term t
- pevalXorBitsTerm :: Term t -> Term t -> Term t
- pevalComplementBitsTerm :: Term t -> Term t
- withSbvBitwiseTermConstraint :: (Bits (SBVType t) => r) -> r
- sbvAndBitsTerm :: SBVType t -> SBVType t -> SBVType t
- sbvOrBitsTerm :: SBVType t -> SBVType t -> SBVType t
- sbvXorBitsTerm :: SBVType t -> SBVType t -> SBVType t
- sbvComplementBitsTerm :: SBVType t -> SBVType t
- class PEvalShiftTerm t where
- pevalShiftLeftTerm :: Term t -> Term t -> Term t
- pevalShiftRightTerm :: Term t -> Term t -> Term t
- withSbvShiftTermConstraint :: (SIntegral (NonFuncSBVBaseType t) => r) -> r
- sbvShiftLeftTerm :: SBVType t -> SBVType t -> SBVType t
- sbvShiftRightTerm :: SBVType t -> SBVType t -> SBVType t
- class PEvalRotateTerm t where
- pevalRotateLeftTerm :: Term t -> Term t -> Term t
- pevalRotateRightTerm :: Term t -> Term t -> Term t
- withSbvRotateTermConstraint :: (SIntegral (NonFuncSBVBaseType t) => r) -> r
- sbvRotateLeftTerm :: SBVType t -> SBVType t -> SBVType t
- sbvRotateRightTerm :: SBVType t -> SBVType t -> SBVType t
- class Num t => PEvalNumTerm t where
- pevalAddNumTerm :: Term t -> Term t -> Term t
- pevalNegNumTerm :: Term t -> Term t
- pevalMulNumTerm :: Term t -> Term t -> Term t
- pevalAbsNumTerm :: Term t -> Term t
- pevalSignumNumTerm :: Term t -> Term t
- withSbvNumTermConstraint :: (Num (SBVType t) => r) -> r
- sbvAddNumTerm :: SBVType t -> SBVType t -> SBVType t
- sbvNegNumTerm :: SBVType t -> SBVType t
- sbvMulNumTerm :: SBVType t -> SBVType t -> SBVType t
- sbvAbsNumTerm :: SBVType t -> SBVType t
- sbvSignumNumTerm :: SBVType t -> SBVType t
- pevalSubNumTerm :: PEvalNumTerm a => Term a -> Term a -> Term a
- class PEvalOrdTerm t where
- pevalLtOrdTerm :: Term t -> Term t -> Term Bool
- pevalLeOrdTerm :: Term t -> Term t -> Term Bool
- withSbvOrdTermConstraint :: (OrdSymbolic (SBVType t) => r) -> r
- sbvLtOrdTerm :: SBVType t -> SBVType t -> SBV Bool
- sbvLeOrdTerm :: SBVType t -> SBVType t -> SBV Bool
- pevalGtOrdTerm :: PEvalOrdTerm a => Term a -> Term a -> Term Bool
- pevalGeOrdTerm :: PEvalOrdTerm a => Term a -> Term a -> Term Bool
- pevalNEqTerm :: SupportedPrim a => Term a -> Term a -> Term Bool
- class PEvalDivModIntegralTerm t where
- pevalDivIntegralTerm :: Term t -> Term t -> Term t
- pevalModIntegralTerm :: Term t -> Term t -> Term t
- pevalQuotIntegralTerm :: Term t -> Term t -> Term t
- pevalRemIntegralTerm :: Term t -> Term t -> Term t
- withSbvDivModIntegralTermConstraint :: (SDivisible (SBVType t) => r) -> r
- sbvDivIntegralTerm :: SBVType t -> SBVType t -> SBVType t
- sbvModIntegralTerm :: SBVType t -> SBVType t -> SBVType t
- sbvQuotIntegralTerm :: SBVType t -> SBVType t -> SBVType t
- sbvRemIntegralTerm :: SBVType t -> SBVType t -> SBVType t
- class BitCast a b => PEvalBitCastTerm a b where
- pevalBitCastTerm :: Term a -> Term b
- sbvBitCast :: SBVType a -> SBVType b
- class BitCastOr a b => PEvalBitCastOrTerm a b where
- pevalBitCastOrTerm :: Term b -> Term a -> Term b
- sbvBitCastOr :: SBVType b -> SBVType a -> SBVType b
- class (SizedBV bv, forall n. (KnownNat n, 1 <= n) => PEvalNumTerm (bv n), forall n. (KnownNat n, 1 <= n) => PEvalBitwiseTerm (bv n), forall n. (KnownNat n, 1 <= n) => FiniteBits (bv n), forall n. (KnownNat n, 1 <= n) => Num (bv n)) => PEvalBVTerm bv where
- pevalBVConcatTerm :: (KnownNat l, KnownNat r, 1 <= l, 1 <= r) => Term (bv l) -> Term (bv r) -> Term (bv (l + r))
- pevalBVExtendTerm :: (KnownNat l, KnownNat r, 1 <= l, 1 <= r, l <= r) => Bool -> proxy r -> Term (bv l) -> Term (bv r)
- pevalBVSelectTerm :: (KnownNat n, KnownNat ix, KnownNat w, 1 <= n, 1 <= w, (ix + w) <= n) => p ix -> q w -> Term (bv n) -> Term (bv w)
- sbvBVConcatTerm :: (KnownNat l, KnownNat r, 1 <= l, 1 <= r) => p1 l -> p2 r -> SBVType (bv l) -> SBVType (bv r) -> SBVType (bv (l + r))
- sbvBVExtendTerm :: (KnownNat l, KnownNat r, 1 <= l, 1 <= r, l <= r) => p1 l -> p2 r -> Bool -> SBVType (bv l) -> SBVType (bv r)
- sbvBVSelectTerm :: (KnownNat ix, KnownNat w, KnownNat n, 1 <= n, 1 <= w, (ix + w) <= n) => p1 ix -> p2 w -> p3 n -> SBVType (bv n) -> SBVType (bv w)
- class Fractional t => PEvalFractionalTerm t where
- pevalFdivTerm :: Term t -> Term t -> Term t
- pevalRecipTerm :: Term t -> Term t
- withSbvFractionalTermConstraint :: (Fractional (SBVType t) => r) -> r
- sbvFdivTerm :: SBVType t -> SBVType t -> SBVType t
- sbvRecipTerm :: SBVType t -> SBVType t
- class PEvalFPTerm fp where
- pevalFPTraitTerm :: ValidFP eb sb => FPTrait -> Term (fp eb sb) -> Term Bool
- pevalFPUnaryTerm :: ValidFP eb sb => FPUnaryOp -> Term (fp eb sb) -> Term (fp eb sb)
- pevalFPBinaryTerm :: ValidFP eb sb => FPBinaryOp -> Term (fp eb sb) -> Term (fp eb sb) -> Term (fp eb sb)
- pevalFPRoundingUnaryTerm :: ValidFP eb sb => FPRoundingUnaryOp -> Term FPRoundingMode -> Term (fp eb sb) -> Term (fp eb sb)
- pevalFPRoundingBinaryTerm :: ValidFP eb sb => FPRoundingBinaryOp -> Term FPRoundingMode -> Term (fp eb sb) -> Term (fp eb sb) -> Term (fp eb sb)
- pevalFPFMATerm :: ValidFP eb sb => Term FPRoundingMode -> Term (fp eb sb) -> Term (fp eb sb) -> Term (fp eb sb) -> Term (fp eb sb)
- sbvFPTraitTerm :: ValidFP eb sb => FPTrait -> SBVType (fp eb sb) -> SBVType Bool
- sbvFPUnaryTerm :: ValidFP eb sb => FPUnaryOp -> SBVType (fp eb sb) -> SBVType (fp eb sb)
- sbvFPBinaryTerm :: ValidFP eb sb => FPBinaryOp -> SBVType (fp eb sb) -> SBVType (fp eb sb) -> SBVType (fp eb sb)
- sbvFPRoundingUnaryTerm :: ValidFP eb sb => FPRoundingUnaryOp -> SBVType FPRoundingMode -> SBVType (fp eb sb) -> SBVType (fp eb sb)
- sbvFPRoundingBinaryTerm :: ValidFP eb sb => FPRoundingBinaryOp -> SBVType FPRoundingMode -> SBVType (fp eb sb) -> SBVType (fp eb sb) -> SBVType (fp eb sb)
- sbvFPFMATerm :: ValidFP eb sb => SBVType FPRoundingMode -> SBVType (fp eb sb) -> SBVType (fp eb sb) -> SBVType (fp eb sb) -> SBVType (fp eb sb)
- class PEvalFloatingTerm t where
- pevalFloatingUnaryTerm :: FloatingUnaryOp -> Term t -> Term t
- pevalPowerTerm :: Term t -> Term t -> Term t
- withSbvFloatingTermConstraint :: (Floating (SBVType t) => r) -> r
- sbvPowerTerm :: SBVType t -> SBVType t -> SBVType t
- sbvFloatingUnaryTerm :: FloatingUnaryOp -> SBVType t -> SBVType t
- class (Integral a, Num b) => PEvalFromIntegralTerm a b where
- pevalFromIntegralTerm :: Term a -> Term b
- sbvFromIntegralTerm :: SBVType a -> SBVType b
- class PEvalIEEEFPConvertibleTerm a where
- pevalFromFPOrTerm :: ValidFP eb sb => Term a -> Term FPRoundingMode -> Term (FP eb sb) -> Term a
- pevalToFPTerm :: ValidFP eb sb => Term FPRoundingMode -> Term a -> Term (FP eb sb)
- sbvFromFPOrTerm :: ValidFP eb sb => SBVType a -> SBVType FPRoundingMode -> SBVType (FP eb sb) -> SBVType a
- sbvToFPTerm :: ValidFP eb sb => SBVType FPRoundingMode -> SBVType a -> SBVType (FP eb sb)
- data SymbolKind
- data TypedSymbol (knd :: SymbolKind) t where
- TypedSymbol :: (SupportedPrim t, SymbolKindConstraint knd t, IsSymbolKind knd) => {..} -> TypedSymbol knd t
- typedConstantSymbol :: forall t. SupportedNonFuncPrim t => Symbol -> TypedSymbol 'ConstantKind t
- typedAnySymbol :: forall t. SupportedPrim t => Symbol -> TypedSymbol 'AnyKind t
- type TypedConstantSymbol = TypedSymbol 'ConstantKind
- type TypedAnySymbol = TypedSymbol 'AnyKind
- data SomeTypedSymbol knd where
- SomeTypedSymbol :: forall knd t. TypedSymbol knd t -> SomeTypedSymbol knd
- type SomeTypedConstantSymbol = SomeTypedSymbol 'ConstantKind
- type SomeTypedAnySymbol = SomeTypedSymbol 'AnyKind
- class IsSymbolKind (knd :: SymbolKind) where
- type SymbolKindConstraint knd :: Type -> Constraint
- decideSymbolKind :: Either (knd :~~: 'ConstantKind) (knd :~~: 'AnyKind)
- withSymbolKindConstraint :: TypedSymbol knd t -> (SymbolKindConstraint knd t => a) -> a
- showUntyped :: TypedSymbol knd t -> String
- someTypedSymbol :: forall knd t. TypedSymbol knd t -> SomeTypedSymbol knd
- eqHeteroSymbol :: forall ta a tb b. TypedSymbol ta a -> TypedSymbol tb b -> Bool
- castSomeTypedSymbol :: IsSymbolKind knd' => SomeTypedSymbol knd -> Maybe (SomeTypedSymbol knd')
- data FPTrait
- data FPUnaryOp
- data FPBinaryOp
- data FPRoundingUnaryOp
- data FPRoundingBinaryOp
- data FloatingUnaryOp
- data Term t where
- ConTerm' :: SupportedPrim t => !CachedInfo -> !t -> Term t
- SymTerm' :: !CachedInfo -> !(TypedSymbol 'AnyKind t) -> Term t
- ForallTerm' :: !CachedInfo -> !(TypedSymbol 'ConstantKind t) -> !(Term Bool) -> Term Bool
- ExistsTerm' :: !CachedInfo -> !(TypedSymbol 'ConstantKind t) -> !(Term Bool) -> Term Bool
- NotTerm' :: !CachedInfo -> !(Term Bool) -> Term Bool
- OrTerm' :: !CachedInfo -> !(Term Bool) -> !(Term Bool) -> !(HashSet (Term Bool)) -> Term Bool
- AndTerm' :: !CachedInfo -> !(Term Bool) -> !(Term Bool) -> !(HashSet (Term Bool)) -> Term Bool
- EqTerm' :: !CachedInfo -> !(Term t) -> !(Term t) -> Term Bool
- DistinctTerm' :: !CachedInfo -> !(NonEmpty (Term t)) -> Term Bool
- ITETerm' :: SupportedPrim t => !CachedInfo -> !(Term Bool) -> !(Term t) -> !(Term t) -> Term t
- AddNumTerm' :: (SupportedPrim t, PEvalNumTerm t) => !CachedInfo -> !(Term t) -> !(Term t) -> Term t
- NegNumTerm' :: (SupportedPrim t, PEvalNumTerm t) => !CachedInfo -> !(Term t) -> Term t
- MulNumTerm' :: (SupportedPrim t, PEvalNumTerm t) => !CachedInfo -> !(Term t) -> !(Term t) -> Term t
- AbsNumTerm' :: (SupportedPrim t, PEvalNumTerm t) => !CachedInfo -> !(Term t) -> Term t
- SignumNumTerm' :: (SupportedPrim t, PEvalNumTerm t) => !CachedInfo -> !(Term t) -> Term t
- LtOrdTerm' :: (SupportedPrim t, PEvalOrdTerm t) => !CachedInfo -> !(Term t) -> !(Term t) -> Term Bool
- LeOrdTerm' :: (SupportedPrim t, PEvalOrdTerm t) => !CachedInfo -> !(Term t) -> !(Term t) -> Term Bool
- AndBitsTerm' :: (SupportedPrim t, PEvalBitwiseTerm t) => !CachedInfo -> !(Term t) -> !(Term t) -> Term t
- OrBitsTerm' :: (SupportedPrim t, PEvalBitwiseTerm t) => !CachedInfo -> !(Term t) -> !(Term t) -> Term t
- XorBitsTerm' :: (SupportedPrim t, PEvalBitwiseTerm t) => !CachedInfo -> !(Term t) -> !(Term t) -> Term t
- ComplementBitsTerm' :: (SupportedPrim t, PEvalBitwiseTerm t) => !CachedInfo -> !(Term t) -> Term t
- ShiftLeftTerm' :: (SupportedPrim t, PEvalShiftTerm t) => !CachedInfo -> !(Term t) -> !(Term t) -> Term t
- ShiftRightTerm' :: (SupportedPrim t, PEvalShiftTerm t) => !CachedInfo -> !(Term t) -> !(Term t) -> Term t
- RotateLeftTerm' :: (SupportedPrim t, PEvalRotateTerm t) => !CachedInfo -> !(Term t) -> !(Term t) -> Term t
- RotateRightTerm' :: (SupportedPrim t, PEvalRotateTerm t) => !CachedInfo -> !(Term t) -> !(Term t) -> Term t
- BitCastTerm' :: (SupportedPrim b, PEvalBitCastTerm a b) => !CachedInfo -> !(Term a) -> Term b
- BitCastOrTerm' :: (SupportedPrim b, PEvalBitCastOrTerm a b) => !CachedInfo -> !(Term b) -> !(Term a) -> Term b
- BVConcatTerm' :: (PEvalBVTerm bv, KnownNat l, KnownNat r, KnownNat (l + r), 1 <= l, 1 <= r, 1 <= (l + r), SupportedPrim (bv (l + r))) => !CachedInfo -> !(Term (bv l)) -> !(Term (bv r)) -> Term (bv (l + r))
- BVSelectTerm' :: (PEvalBVTerm bv, KnownNat n, KnownNat ix, KnownNat w, 1 <= n, 1 <= w, (ix + w) <= n, SupportedPrim (bv w)) => !CachedInfo -> !(Proxy ix) -> !(Proxy w) -> !(Term (bv n)) -> Term (bv w)
- BVExtendTerm' :: (PEvalBVTerm bv, KnownNat l, KnownNat r, 1 <= l, 1 <= r, l <= r, SupportedPrim (bv r)) => !CachedInfo -> !Bool -> !(Proxy r) -> !(Term (bv l)) -> Term (bv r)
- ApplyTerm' :: (PEvalApplyTerm f a b, SupportedPrim b) => !CachedInfo -> !(Term f) -> !(Term a) -> Term b
- DivIntegralTerm' :: (SupportedPrim t, PEvalDivModIntegralTerm t) => !CachedInfo -> !(Term t) -> !(Term t) -> Term t
- ModIntegralTerm' :: (SupportedPrim t, PEvalDivModIntegralTerm t) => !CachedInfo -> !(Term t) -> !(Term t) -> Term t
- QuotIntegralTerm' :: (SupportedPrim t, PEvalDivModIntegralTerm t) => !CachedInfo -> !(Term t) -> !(Term t) -> Term t
- RemIntegralTerm' :: (SupportedPrim t, PEvalDivModIntegralTerm t) => !CachedInfo -> !(Term t) -> !(Term t) -> Term t
- FPTraitTerm' :: (ValidFP eb sb, SupportedPrim (fp eb sb), PEvalFPTerm fp) => !CachedInfo -> !FPTrait -> !(Term (fp eb sb)) -> Term Bool
- FdivTerm' :: (SupportedPrim t, PEvalFractionalTerm t) => !CachedInfo -> !(Term t) -> !(Term t) -> Term t
- RecipTerm' :: (SupportedPrim t, PEvalFractionalTerm t) => !CachedInfo -> !(Term t) -> Term t
- FloatingUnaryTerm' :: (SupportedPrim t, PEvalFloatingTerm t) => !CachedInfo -> !FloatingUnaryOp -> !(Term t) -> Term t
- PowerTerm' :: (SupportedPrim t, PEvalFloatingTerm t) => !CachedInfo -> !(Term t) -> !(Term t) -> Term t
- FPUnaryTerm' :: (ValidFP eb sb, SupportedPrim (fp eb sb), PEvalFPTerm fp) => !CachedInfo -> !FPUnaryOp -> !(Term (fp eb sb)) -> Term (fp eb sb)
- FPBinaryTerm' :: (ValidFP eb sb, SupportedPrim (fp eb sb), PEvalFPTerm fp) => !CachedInfo -> !FPBinaryOp -> !(Term (fp eb sb)) -> !(Term (fp eb sb)) -> Term (fp eb sb)
- FPRoundingUnaryTerm' :: (ValidFP eb sb, SupportedPrim (fp eb sb), PEvalFPTerm fp) => !CachedInfo -> !FPRoundingUnaryOp -> !(Term FPRoundingMode) -> !(Term (fp eb sb)) -> Term (fp eb sb)
- FPRoundingBinaryTerm' :: (ValidFP eb sb, SupportedPrim (fp eb sb), PEvalFPTerm fp) => !CachedInfo -> !FPRoundingBinaryOp -> !(Term FPRoundingMode) -> !(Term (fp eb sb)) -> !(Term (fp eb sb)) -> Term (fp eb sb)
- FPFMATerm' :: (ValidFP eb sb, SupportedPrim (fp eb sb), PEvalFPTerm fp) => !CachedInfo -> !(Term FPRoundingMode) -> !(Term (fp eb sb)) -> !(Term (fp eb sb)) -> !(Term (fp eb sb)) -> Term (fp eb sb)
- FromIntegralTerm' :: (PEvalFromIntegralTerm a b, SupportedPrim b) => !CachedInfo -> !(Term a) -> Term b
- FromFPOrTerm' :: (PEvalIEEEFPConvertibleTerm a, ValidFP eb sb, SupportedPrim a) => !CachedInfo -> !(Term a) -> !(Term FPRoundingMode) -> !(Term (FP eb sb)) -> Term a
- ToFPTerm' :: (PEvalIEEEFPConvertibleTerm a, ValidFP eb sb, SupportedPrim (FP eb sb)) => !CachedInfo -> !(Term FPRoundingMode) -> !(Term a) -> Proxy eb -> Proxy sb -> Term (FP eb sb)
- defaultValueDynamic :: forall t proxy. SupportedPrim t => proxy t -> ModelValue
- pattern DynTerm :: forall a b. SupportedPrim a => Term a -> Term b
- toCurThread :: forall t. Term t -> IO (Term t)
- data CachedInfo = CachedInfo {}
- termInfo :: Term t -> CachedInfo
- termThreadId :: Term t -> WeakThreadId
- termDigest :: Term t -> Digest
- termId :: Term t -> Id
- termStableIdent :: Term t -> StableIdent
- pformatTerm :: forall t. Term t -> String
- data ModelValue where
- ModelValue :: forall v. SupportedPrim v => v -> ModelValue
- toModelValue :: forall a. SupportedPrim a => a -> ModelValue
- unsafeFromModelValue :: forall a. Typeable a => ModelValue -> a
- data UTerm t where
- UConTerm :: SupportedPrim t => !t -> UTerm t
- USymTerm :: !(TypedSymbol 'AnyKind t) -> UTerm t
- UForallTerm :: !(TypedSymbol 'ConstantKind t) -> !(Term Bool) -> UTerm Bool
- UExistsTerm :: !(TypedSymbol 'ConstantKind t) -> !(Term Bool) -> UTerm Bool
- UNotTerm :: !(Term Bool) -> UTerm Bool
- UOrTerm :: !(Term Bool) -> !(Term Bool) -> !(HashSet (Term Bool)) -> UTerm Bool
- UAndTerm :: !(Term Bool) -> !(Term Bool) -> !(HashSet (Term Bool)) -> UTerm Bool
- UEqTerm :: !(Term t) -> !(Term t) -> UTerm Bool
- UDistinctTerm :: !(NonEmpty (Term t)) -> UTerm Bool
- UITETerm :: SupportedPrim t => !(Term Bool) -> !(Term t) -> !(Term t) -> UTerm t
- UAddNumTerm :: (SupportedPrim t, PEvalNumTerm t) => !(Term t) -> !(Term t) -> UTerm t
- UNegNumTerm :: (SupportedPrim t, PEvalNumTerm t) => !(Term t) -> UTerm t
- UMulNumTerm :: (SupportedPrim t, PEvalNumTerm t) => !(Term t) -> !(Term t) -> UTerm t
- UAbsNumTerm :: (SupportedPrim t, PEvalNumTerm t) => !(Term t) -> UTerm t
- USignumNumTerm :: (SupportedPrim t, PEvalNumTerm t) => !(Term t) -> UTerm t
- ULtOrdTerm :: (SupportedPrim t, PEvalOrdTerm t) => !(Term t) -> !(Term t) -> UTerm Bool
- ULeOrdTerm :: (SupportedPrim t, PEvalOrdTerm t) => !(Term t) -> !(Term t) -> UTerm Bool
- UAndBitsTerm :: (SupportedPrim t, PEvalBitwiseTerm t) => !(Term t) -> !(Term t) -> UTerm t
- UOrBitsTerm :: (SupportedPrim t, PEvalBitwiseTerm t) => !(Term t) -> !(Term t) -> UTerm t
- UXorBitsTerm :: (SupportedPrim t, PEvalBitwiseTerm t) => !(Term t) -> !(Term t) -> UTerm t
- UComplementBitsTerm :: (SupportedPrim t, PEvalBitwiseTerm t) => !(Term t) -> UTerm t
- UShiftLeftTerm :: (SupportedPrim t, PEvalShiftTerm t) => !(Term t) -> !(Term t) -> UTerm t
- UShiftRightTerm :: (SupportedPrim t, PEvalShiftTerm t) => !(Term t) -> !(Term t) -> UTerm t
- URotateLeftTerm :: (SupportedPrim t, PEvalRotateTerm t) => !(Term t) -> !(Term t) -> UTerm t
- URotateRightTerm :: (SupportedPrim t, PEvalRotateTerm t) => !(Term t) -> !(Term t) -> UTerm t
- UBitCastTerm :: (SupportedPrim b, PEvalBitCastTerm a b) => !(Term a) -> UTerm b
- UBitCastOrTerm :: (SupportedPrim b, PEvalBitCastOrTerm a b) => !(Term b) -> !(Term a) -> UTerm b
- UBVConcatTerm :: (PEvalBVTerm bv, KnownNat l, KnownNat r, KnownNat (l + r), 1 <= l, 1 <= r, 1 <= (l + r), SupportedPrim (bv (l + r))) => !(Term (bv l)) -> !(Term (bv r)) -> UTerm (bv (l + r))
- UBVSelectTerm :: (PEvalBVTerm bv, KnownNat n, KnownNat ix, KnownNat w, 1 <= n, 1 <= w, (ix + w) <= n, SupportedPrim (bv w)) => !(Proxy ix) -> !(Proxy w) -> !(Term (bv n)) -> UTerm (bv w)
- UBVExtendTerm :: (PEvalBVTerm bv, KnownNat l, KnownNat r, 1 <= l, 1 <= r, l <= r, SupportedPrim (bv r)) => !Bool -> !(Proxy r) -> !(Term (bv l)) -> UTerm (bv r)
- UApplyTerm :: (PEvalApplyTerm f a b, SupportedPrim b) => Term f -> Term a -> UTerm b
- UDivIntegralTerm :: (SupportedPrim t, PEvalDivModIntegralTerm t) => !(Term t) -> !(Term t) -> UTerm t
- UModIntegralTerm :: (SupportedPrim t, PEvalDivModIntegralTerm t) => !(Term t) -> !(Term t) -> UTerm t
- UQuotIntegralTerm :: (SupportedPrim t, PEvalDivModIntegralTerm t) => !(Term t) -> !(Term t) -> UTerm t
- URemIntegralTerm :: (SupportedPrim t, PEvalDivModIntegralTerm t) => !(Term t) -> !(Term t) -> UTerm t
- UFPTraitTerm :: (ValidFP eb sb, SupportedPrim (fp eb sb), PEvalFPTerm fp) => !FPTrait -> !(Term (fp eb sb)) -> UTerm Bool
- UFdivTerm :: (SupportedPrim t, PEvalFractionalTerm t) => !(Term t) -> !(Term t) -> UTerm t
- URecipTerm :: (SupportedPrim t, PEvalFractionalTerm t) => !(Term t) -> UTerm t
- UFloatingUnaryTerm :: (SupportedPrim t, PEvalFloatingTerm t) => !FloatingUnaryOp -> !(Term t) -> UTerm t
- UPowerTerm :: (SupportedPrim t, PEvalFloatingTerm t) => !(Term t) -> !(Term t) -> UTerm t
- UFPUnaryTerm :: (ValidFP eb sb, SupportedPrim (fp eb sb), PEvalFPTerm fp) => !FPUnaryOp -> !(Term (fp eb sb)) -> UTerm (fp eb sb)
- UFPBinaryTerm :: (ValidFP eb sb, SupportedPrim (fp eb sb), PEvalFPTerm fp) => !FPBinaryOp -> !(Term (fp eb sb)) -> !(Term (fp eb sb)) -> UTerm (fp eb sb)
- UFPRoundingUnaryTerm :: (ValidFP eb sb, SupportedPrim (fp eb sb), PEvalFPTerm fp) => !FPRoundingUnaryOp -> !(Term FPRoundingMode) -> !(Term (fp eb sb)) -> UTerm (fp eb sb)
- UFPRoundingBinaryTerm :: (ValidFP eb sb, SupportedPrim (fp eb sb), PEvalFPTerm fp) => !FPRoundingBinaryOp -> !(Term FPRoundingMode) -> !(Term (fp eb sb)) -> !(Term (fp eb sb)) -> UTerm (fp eb sb)
- UFPFMATerm :: (ValidFP eb sb, SupportedPrim (fp eb sb), PEvalFPTerm fp) => !(Term FPRoundingMode) -> !(Term (fp eb sb)) -> !(Term (fp eb sb)) -> !(Term (fp eb sb)) -> UTerm (fp eb sb)
- UFromIntegralTerm :: (PEvalFromIntegralTerm a b, SupportedPrim b) => !(Term a) -> UTerm b
- UFromFPOrTerm :: (PEvalIEEEFPConvertibleTerm a, SupportedPrim a, ValidFP eb sb) => Term a -> !(Term FPRoundingMode) -> !(Term (FP eb sb)) -> UTerm a
- UToFPTerm :: (PEvalIEEEFPConvertibleTerm a, ValidFP eb sb, SupportedPrim (FP eb sb)) => !(Term FPRoundingMode) -> !(Term a) -> Proxy eb -> Proxy sb -> UTerm (FP eb sb)
- prettyPrintTerm :: Term t -> Doc ann
- conTerm :: SupportedPrim t => t -> Term t
- symTerm :: TypedSymbol knd t -> Term t
- ssymTerm :: SupportedPrim t => Identifier -> Term t
- isymTerm :: SupportedPrim t => Identifier -> Int -> Term t
- forallTerm :: TypedSymbol 'ConstantKind t -> Term Bool -> Term Bool
- existsTerm :: TypedSymbol 'ConstantKind t -> Term Bool -> Term Bool
- notTerm :: Term Bool -> Term Bool
- orTerm :: Term Bool -> Term Bool -> Term Bool
- andTerm :: Term Bool -> Term Bool -> Term Bool
- eqTerm :: Term a -> Term a -> Term Bool
- distinctTerm :: NonEmpty (Term a) -> Term Bool
- iteTerm :: Term Bool -> Term a -> Term a -> Term a
- addNumTerm :: PEvalNumTerm a => Term a -> Term a -> Term a
- negNumTerm :: PEvalNumTerm a => Term a -> Term a
- mulNumTerm :: PEvalNumTerm a => Term a -> Term a -> Term a
- absNumTerm :: PEvalNumTerm a => Term a -> Term a
- signumNumTerm :: PEvalNumTerm a => Term a -> Term a
- ltOrdTerm :: PEvalOrdTerm a => Term a -> Term a -> Term Bool
- leOrdTerm :: PEvalOrdTerm a => Term a -> Term a -> Term Bool
- andBitsTerm :: PEvalBitwiseTerm a => Term a -> Term a -> Term a
- orBitsTerm :: PEvalBitwiseTerm a => Term a -> Term a -> Term a
- xorBitsTerm :: PEvalBitwiseTerm a => Term a -> Term a -> Term a
- complementBitsTerm :: PEvalBitwiseTerm a => Term a -> Term a
- shiftLeftTerm :: PEvalShiftTerm a => Term a -> Term a -> Term a
- rotateLeftTerm :: PEvalRotateTerm a => Term a -> Term a -> Term a
- shiftRightTerm :: PEvalShiftTerm a => Term a -> Term a -> Term a
- rotateRightTerm :: PEvalRotateTerm a => Term a -> Term a -> Term a
- bitCastTerm :: (PEvalBitCastTerm a b, SupportedPrim b) => Term a -> Term b
- bitCastOrTerm :: PEvalBitCastOrTerm a b => Term b -> Term a -> Term b
- bvConcatTerm :: forall bv l r. (PEvalBVTerm bv, KnownNat l, KnownNat r, KnownNat (l + r), 1 <= l, 1 <= r, 1 <= (l + r), SupportedPrim (bv (l + r))) => Term (bv l) -> Term (bv r) -> Term (bv (l + r))
- bvSelectTerm :: forall bv n ix w p q. (PEvalBVTerm bv, KnownNat n, KnownNat ix, KnownNat w, 1 <= n, 1 <= w, (ix + w) <= n, SupportedPrim (bv w)) => p ix -> q w -> Term (bv n) -> Term (bv w)
- bvExtendTerm :: forall bv l r proxy. (PEvalBVTerm bv, KnownNat l, KnownNat r, 1 <= l, 1 <= r, l <= r, SupportedPrim (bv r)) => Bool -> proxy r -> Term (bv l) -> Term (bv r)
- bvsignExtendTerm :: forall bv l r proxy. (PEvalBVTerm bv, KnownNat l, KnownNat r, 1 <= l, 1 <= r, l <= r, SupportedPrim (bv r)) => proxy r -> Term (bv l) -> Term (bv r)
- bvzeroExtendTerm :: forall bv l r proxy. (PEvalBVTerm bv, KnownNat l, KnownNat r, 1 <= l, 1 <= r, l <= r, SupportedPrim (bv r)) => proxy r -> Term (bv l) -> Term (bv r)
- applyTerm :: (PEvalApplyTerm f a b, SupportedPrim b) => Term f -> Term a -> Term b
- divIntegralTerm :: PEvalDivModIntegralTerm a => Term a -> Term a -> Term a
- modIntegralTerm :: PEvalDivModIntegralTerm a => Term a -> Term a -> Term a
- quotIntegralTerm :: PEvalDivModIntegralTerm a => Term a -> Term a -> Term a
- remIntegralTerm :: PEvalDivModIntegralTerm a => Term a -> Term a -> Term a
- fpTraitTerm :: (ValidFP eb sb, SupportedPrim (fp eb sb), PEvalFPTerm fp) => FPTrait -> Term (fp eb sb) -> Term Bool
- fdivTerm :: PEvalFractionalTerm a => Term a -> Term a -> Term a
- recipTerm :: PEvalFractionalTerm a => Term a -> Term a
- floatingUnaryTerm :: PEvalFloatingTerm a => FloatingUnaryOp -> Term a -> Term a
- powerTerm :: PEvalFloatingTerm a => Term a -> Term a -> Term a
- fpUnaryTerm :: (ValidFP eb sb, SupportedPrim (fp eb sb), PEvalFPTerm fp) => FPUnaryOp -> Term (fp eb sb) -> Term (fp eb sb)
- fpBinaryTerm :: (ValidFP eb sb, SupportedPrim (fp eb sb), PEvalFPTerm fp) => FPBinaryOp -> Term (fp eb sb) -> Term (fp eb sb) -> Term (fp eb sb)
- fpRoundingUnaryTerm :: (ValidFP eb sb, SupportedPrim (fp eb sb), PEvalFPTerm fp) => FPRoundingUnaryOp -> Term FPRoundingMode -> Term (fp eb sb) -> Term (fp eb sb)
- fpRoundingBinaryTerm :: (ValidFP eb sb, SupportedPrim (fp eb sb), PEvalFPTerm fp) => FPRoundingBinaryOp -> Term FPRoundingMode -> Term (fp eb sb) -> Term (fp eb sb) -> Term (fp eb sb)
- fpFMATerm :: (ValidFP eb sb, SupportedPrim (fp eb sb), PEvalFPTerm fp) => Term FPRoundingMode -> Term (fp eb sb) -> Term (fp eb sb) -> Term (fp eb sb) -> Term (fp eb sb)
- fromIntegralTerm :: (PEvalFromIntegralTerm a b, SupportedPrim b) => Term a -> Term b
- fromFPOrTerm :: (PEvalIEEEFPConvertibleTerm a, ValidFP eb sb) => Term a -> Term FPRoundingMode -> Term (FP eb sb) -> Term a
- toFPTerm :: forall a eb sb. (PEvalIEEEFPConvertibleTerm a, ValidFP eb sb, SupportedPrim (FP eb sb)) => Term FPRoundingMode -> Term a -> Term (FP eb sb)
- pattern SupportedTerm :: forall t. () => SupportedPrim t => Term t
- pattern SupportedTypedSymbol :: forall (k :: SymbolKind) t. () => (SupportedPrim t, SymbolKindConstraint k t, IsSymbolKind k) => TypedSymbol k t
- pattern SupportedConstantTypedSymbol :: forall k t. () => (SupportedPrim t, SymbolKindConstraint k t, IsSymbolKind k, k ~ 'ConstantKind) => TypedSymbol k t
- pattern ConTerm :: forall t. () => SupportedPrim t => t -> Term t
- pattern SymTerm :: forall t. () => SupportedPrim t => TypedSymbol 'AnyKind t -> Term t
- pattern ForallTerm :: forall r. () => forall t. (r ~ Bool, SupportedNonFuncPrim t) => TypedSymbol 'ConstantKind t -> Term Bool -> Term r
- pattern ExistsTerm :: forall r. () => forall t. (r ~ Bool, SupportedNonFuncPrim t) => TypedSymbol 'ConstantKind t -> Term Bool -> Term r
- pattern NotTerm :: forall r. () => r ~ Bool => Term Bool -> Term r
- pattern OrTerm :: forall r. () => r ~ Bool => Term Bool -> Term Bool -> Term r
- pattern AndTerm :: forall r. () => r ~ Bool => Term Bool -> Term Bool -> Term r
- pattern OrTermAll :: forall r. () => r ~ Bool => Term Bool -> Term Bool -> HashSet (Term Bool) -> Term r
- pattern AndTermAll :: forall r. () => r ~ Bool => Term Bool -> Term Bool -> HashSet (Term Bool) -> Term r
- pattern EqTerm :: forall r. () => forall t. (r ~ Bool, SupportedPrim t) => Term t -> Term t -> Term r
- pattern DistinctTerm :: forall r. () => forall t. (r ~ Bool, SupportedPrim t) => NonEmpty (Term t) -> Term r
- pattern ITETerm :: forall t. () => SupportedPrim t => Term Bool -> Term t -> Term t -> Term t
- pattern AddNumTerm :: forall t. () => (SupportedPrim t, PEvalNumTerm t) => Term t -> Term t -> Term t
- pattern NegNumTerm :: forall t. () => (SupportedPrim t, PEvalNumTerm t) => Term t -> Term t
- pattern MulNumTerm :: forall t. () => (SupportedPrim t, PEvalNumTerm t) => Term t -> Term t -> Term t
- pattern AbsNumTerm :: forall t. () => (SupportedPrim t, PEvalNumTerm t) => Term t -> Term t
- pattern SignumNumTerm :: forall t. () => (SupportedPrim t, PEvalNumTerm t) => Term t -> Term t
- pattern LtOrdTerm :: forall r. () => forall t. (r ~ Bool, SupportedPrim t, PEvalOrdTerm t) => Term t -> Term t -> Term r
- pattern LeOrdTerm :: forall r. () => forall t. (r ~ Bool, SupportedPrim t, PEvalOrdTerm t) => Term t -> Term t -> Term r
- pattern AndBitsTerm :: forall t. () => (SupportedPrim t, PEvalBitwiseTerm t) => Term t -> Term t -> Term t
- pattern OrBitsTerm :: forall t. () => (SupportedPrim t, PEvalBitwiseTerm t) => Term t -> Term t -> Term t
- pattern XorBitsTerm :: forall t. () => (SupportedPrim t, PEvalBitwiseTerm t) => Term t -> Term t -> Term t
- pattern ComplementBitsTerm :: forall t. () => (SupportedPrim t, PEvalBitwiseTerm t) => Term t -> Term t
- pattern ShiftLeftTerm :: forall t. () => (SupportedPrim t, PEvalShiftTerm t) => Term t -> Term t -> Term t
- pattern RotateLeftTerm :: forall t. () => (SupportedPrim t, PEvalRotateTerm t) => Term t -> Term t -> Term t
- pattern ShiftRightTerm :: forall t. () => (SupportedPrim t, PEvalShiftTerm t) => Term t -> Term t -> Term t
- pattern RotateRightTerm :: forall t. () => (SupportedPrim t, PEvalRotateTerm t) => Term t -> Term t -> Term t
- pattern BitCastTerm :: forall b. () => forall a. (SupportedPrim a, SupportedPrim b, PEvalBitCastTerm a b) => Term a -> Term b
- pattern BitCastOrTerm :: forall b. () => forall a. (SupportedPrim a, SupportedPrim b, PEvalBitCastOrTerm a b) => Term b -> Term a -> Term b
- pattern BVConcatTerm :: forall ret. () => forall bv l r. (PEvalBVTerm bv, KnownNat l, KnownNat r, KnownNat (l + r), 1 <= l, 1 <= r, 1 <= (l + r), SupportedPrim (bv l), SupportedPrim (bv r), SupportedPrim (bv (l + r)), ret ~ bv (l + r)) => Term (bv l) -> Term (bv r) -> Term ret
- pattern BVSelectTerm :: forall ret. () => forall bv w n ix. (PEvalBVTerm bv, KnownNat n, KnownNat ix, KnownNat w, 1 <= n, 1 <= w, (ix + w) <= n, SupportedPrim (bv n), SupportedPrim (bv w), ret ~ bv w) => Proxy ix -> Proxy w -> Term (bv n) -> Term ret
- pattern BVExtendTerm :: forall ret. () => forall bv l r. (PEvalBVTerm bv, KnownNat l, KnownNat r, 1 <= l, 1 <= r, l <= r, SupportedPrim (bv l), SupportedPrim (bv r), ret ~ bv r) => Bool -> Proxy r -> Term (bv l) -> Term ret
- pattern ApplyTerm :: forall b. () => forall f a. (PEvalApplyTerm f a b, SupportedPrim f, SupportedPrim a, SupportedPrim b) => Term f -> Term a -> Term b
- pattern DivIntegralTerm :: forall t. () => (SupportedPrim t, PEvalDivModIntegralTerm t) => Term t -> Term t -> Term t
- pattern ModIntegralTerm :: forall t. () => (SupportedPrim t, PEvalDivModIntegralTerm t) => Term t -> Term t -> Term t
- pattern QuotIntegralTerm :: forall t. () => (SupportedPrim t, PEvalDivModIntegralTerm t) => Term t -> Term t -> Term t
- pattern RemIntegralTerm :: forall t. () => (SupportedPrim t, PEvalDivModIntegralTerm t) => Term t -> Term t -> Term t
- pattern FPTraitTerm :: forall r. () => forall eb sb fp. (r ~ Bool, ValidFP eb sb, SupportedPrim (fp eb sb), PEvalFPTerm fp) => FPTrait -> Term (fp eb sb) -> Term r
- pattern FdivTerm :: forall t. () => (SupportedPrim t, PEvalFractionalTerm t) => Term t -> Term t -> Term t
- pattern RecipTerm :: forall t. () => (SupportedPrim t, PEvalFractionalTerm t) => Term t -> Term t
- pattern FloatingUnaryTerm :: forall t. () => (SupportedPrim t, PEvalFloatingTerm t) => FloatingUnaryOp -> Term t -> Term t
- pattern PowerTerm :: forall t. () => (SupportedPrim t, PEvalFloatingTerm t) => Term t -> Term t -> Term t
- pattern FPUnaryTerm :: forall ret. () => forall fp eb sb. (ret ~ fp eb sb, ValidFP eb sb, SupportedPrim (fp eb sb), PEvalFPTerm fp) => FPUnaryOp -> Term (fp eb sb) -> Term ret
- pattern FPBinaryTerm :: forall ret. () => forall fp eb sb. (ret ~ fp eb sb, ValidFP eb sb, SupportedPrim (fp eb sb), PEvalFPTerm fp) => FPBinaryOp -> Term (fp eb sb) -> Term (fp eb sb) -> Term ret
- pattern FPRoundingUnaryTerm :: forall ret. () => forall fp eb sb. (ret ~ fp eb sb, ValidFP eb sb, SupportedPrim (fp eb sb), PEvalFPTerm fp) => FPRoundingUnaryOp -> Term FPRoundingMode -> Term (fp eb sb) -> Term ret
- pattern FPRoundingBinaryTerm :: forall ret. () => forall fp eb sb. (ret ~ fp eb sb, ValidFP eb sb, SupportedPrim (fp eb sb), PEvalFPTerm fp) => FPRoundingBinaryOp -> Term FPRoundingMode -> Term (fp eb sb) -> Term (fp eb sb) -> Term ret
- pattern FPFMATerm :: forall ret. () => forall fp eb sb. (ret ~ fp eb sb, ValidFP eb sb, SupportedPrim (fp eb sb), PEvalFPTerm fp) => Term FPRoundingMode -> Term (fp eb sb) -> Term (fp eb sb) -> Term (fp eb sb) -> Term ret
- pattern FromIntegralTerm :: forall b. () => forall a. (PEvalFromIntegralTerm a b, SupportedPrim a, SupportedPrim b) => Term a -> Term b
- pattern FromFPOrTerm :: forall a. () => forall eb sb. (PEvalIEEEFPConvertibleTerm a, ValidFP eb sb, SupportedPrim a) => Term a -> Term FPRoundingMode -> Term (FP eb sb) -> Term a
- pattern ToFPTerm :: forall ret. () => forall eb sb a. (PEvalIEEEFPConvertibleTerm a, ValidFP eb sb, SupportedPrim (FP eb sb), SupportedPrim a, ret ~ FP eb sb) => Term FPRoundingMode -> Term a -> Proxy eb -> Proxy sb -> Term ret
- trueTerm :: Term Bool
- falseTerm :: Term Bool
- pattern BoolConTerm :: Bool -> Term a
- pattern TrueTerm :: Term a
- pattern FalseTerm :: Term a
- pattern BoolTerm :: Term Bool -> Term a
- pevalNotTerm :: Term Bool -> Term Bool
- pevalOrTerm :: Term Bool -> Term Bool -> Term Bool
- pevalAndTerm :: Term Bool -> Term Bool -> Term Bool
- pevalImplyTerm :: Term Bool -> Term Bool -> Term Bool
- pevalXorTerm :: Term Bool -> Term Bool -> Term Bool
- pevalITEBasic :: SupportedPrim a => Term Bool -> Term a -> Term a -> Maybe (Term a)
- pevalITEBasicTerm :: SupportedPrim a => Term Bool -> Term a -> Term a -> Term a
- pevalDefaultEqTerm :: SupportedNonFuncPrim a => Term a -> Term a -> Term Bool
- type NonFuncPrimConstraint a = (SymVal (NonFuncSBVBaseType a), EqSymbolic (SBVType a), Mergeable (SBVType a), SMTDefinable (SBVType a), Mergeable (SBVType a), SBVType a ~ SBV (NonFuncSBVBaseType a), PrimConstraint a)
- class (SupportedPrim a, Ord a, Eq a, Show a, Hashable a, Typeable a) => NonFuncSBVRep a where
- type NonFuncSBVBaseType a
- class NonFuncSBVRep a => SupportedNonFuncPrim a where
- conNonFuncSBVTerm :: a -> SBV (NonFuncSBVBaseType a)
- symNonFuncSBVTerm :: SBVFreshMonad m => String -> m (SBV (NonFuncSBVBaseType a))
- withNonFuncPrim :: (NonFuncPrimConstraint a => r) -> r
- class SBVRep t where
- type SBVType t
- class MonadIO m => SBVFreshMonad m where
- translateTypeError :: HasCallStack => Maybe String -> TypeRep a -> b
- parseSMTModelResultError :: HasCallStack => TypeRep a -> ([([CV], CV)], CV) -> a
- partitionCVArg :: forall a. SupportedNonFuncPrim a => [([CV], CV)] -> [(a, [([CV], CV)])]
- parseScalarSMTModelResult :: forall v r. (SatModel r, Typeable v) => (r -> v) -> ([([CV], CV)], CV) -> v
- bvIsNonZeroFromGEq1 :: forall w r proxy. 1 <= w => proxy w -> (BVIsNonZero w => r) -> r
- type PartialFun a b = a -> Maybe b
- type PartialRuleUnary a b = PartialFun (Term a) (Term b)
- type TotalRuleUnary a b = Term a -> Term b
- type PartialRuleBinary a b c = Term a -> PartialFun (Term b) (Term c)
- type TotalRuleBinary a b c = Term a -> Term b -> Term c
- totalize :: PartialFun a b -> (a -> b) -> a -> b
- totalize2 :: (a -> PartialFun b c) -> (a -> b -> c) -> a -> b -> c
- class UnaryPartialStrategy tag a b | tag a -> b where
- extractor :: tag -> Term a -> Maybe a
- constantHandler :: tag -> a -> Maybe (Term b)
- nonConstantHandler :: tag -> Term a -> Maybe (Term b)
- unaryPartial :: forall tag a b. UnaryPartialStrategy tag a b => tag -> PartialRuleUnary a b
- class BinaryCommPartialStrategy tag a c | tag a -> c where
- singleConstantHandler :: tag -> a -> Term a -> Maybe (Term c)
- class BinaryPartialStrategy tag a b c | tag a b -> c where
- extractora :: tag -> Term a -> Maybe a
- extractorb :: tag -> Term b -> Maybe b
- allConstantHandler :: tag -> a -> b -> Maybe (Term c)
- leftConstantHandler :: tag -> a -> Term b -> Maybe (Term c)
- rightConstantHandler :: tag -> Term a -> b -> Maybe (Term c)
- nonBinaryConstantHandler :: tag -> Term a -> Term b -> Maybe (Term c)
- binaryPartial :: forall tag a b c. BinaryPartialStrategy tag a b c => tag -> PartialRuleBinary a b c
- unaryUnfoldOnce :: forall a b. SupportedPrim b => PartialRuleUnary a b -> TotalRuleUnary a b -> TotalRuleUnary a b
- binaryUnfoldOnce :: forall a b c. SupportedPrim c => PartialRuleBinary a b c -> TotalRuleBinary a b c -> TotalRuleBinary a b c
- generalUnaryUnfolded :: forall a b. (Typeable a, SupportedPrim b) => (a -> b) -> (Term a -> Term b) -> Term a -> Term b
- generalBinaryUnfolded :: forall a b c. (Typeable a, Typeable b, SupportedPrim c) => (a -> b -> c) -> (Term a -> Term b -> Term c) -> Term a -> Term b -> Term c
- unsafePevalBVConcatTerm :: forall bv n1 n2 r. PEvalBVTerm bv => NatRepr n1 -> NatRepr n2 -> NatRepr r -> Term (bv n1) -> Term (bv n2) -> Term (bv r)
- unsafePevalBVExtendTerm :: forall bv l r. PEvalBVTerm bv => NatRepr l -> NatRepr r -> Bool -> Term (bv l) -> Term (bv r)
- unsafePevalBVSelectTerm :: forall bv n ix w. PEvalBVTerm bv => NatRepr n -> NatRepr ix -> NatRepr w -> Term (bv n) -> Term (bv w)
- boolToBVTerm :: forall bv n. (PEvalBVTerm bv, KnownNat n, 1 <= n, forall m. (KnownNat m, 1 <= m) => SupportedPrim (bv m)) => Term Bool -> Term (bv n)
- pevalDefaultAddNumTerm :: (PEvalNumTerm a, Eq a) => Term a -> Term a -> Term a
- pevalDefaultNegNumTerm :: (PEvalNumTerm a, Eq a) => Term a -> Term a
- pevalDefaultMulNumTerm :: (PEvalNumTerm a, Eq a) => Term a -> Term a -> Term a
- pevalBitsAbsNumTerm :: (PEvalNumTerm a, Bits a) => Term a -> Term a
- doPevalNoOverflowAbsNumTerm :: PEvalNumTerm a => Term a -> Maybe (Term a)
- pevalGeneralSignumNumTerm :: PEvalNumTerm a => Term a -> Term a
- doPevalNoOverflowSignumNumTerm :: PEvalNumTerm a => Term a -> Maybe (Term a)
Supported primitive types
class SupportedPrimConstraint t Source #
Type class for resolving the constraint for a supported primitive type.
Instances
class (Lift t, NFData t, Typeable t, SupportedPrimConstraint t, SBVRep t) => SupportedPrim t where Source #
Indicates that a type is supported, can be represented as a symbolic term, and can be lowered to an SBV term.
Minimal complete definition
defaultValue, pevalITETerm, pevalEqTerm, pevalDistinctTerm, conSBVTerm, symSBVName, symSBVTerm, parseSMTModelResult, castTypedSymbol, funcDummyConstraint
Methods
primTypeRep :: TypeRep t Source #
default primTypeRep :: Typeable t => TypeRep t Source #
sameCon :: t -> t -> Bool Source #
hashConWithSalt :: Int -> t -> Int Source #
pformatCon :: t -> String Source #
default pformatCon :: Show t => t -> String Source #
defaultValue :: t Source #
pevalITETerm :: Term Bool -> Term t -> Term t -> Term t Source #
pevalEqTerm :: Term t -> Term t -> Term Bool Source #
pevalDistinctTerm :: NonEmpty (Term t) -> Term Bool Source #
conSBVTerm :: t -> SBVType t Source #
symSBVName :: TypedSymbol 'AnyKind t -> Int -> String Source #
symSBVTerm :: SBVFreshMonad m => String -> m (SBVType t) Source #
withPrim :: ((PrimConstraint t, SMTDefinable (SBVType t), Mergeable (SBVType t), Typeable (SBVType t)) => a) -> a Source #
default withPrim :: (PrimConstraint t, SMTDefinable (SBVType t), Mergeable (SBVType t), Typeable (SBVType t)) => ((PrimConstraint t, SMTDefinable (SBVType t), Mergeable (SBVType t), Typeable (SBVType t)) => a) -> a Source #
sbvIte :: SBV Bool -> SBVType t -> SBVType t -> SBVType t Source #
sbvEq :: SBVType t -> SBVType t -> SBV Bool Source #
sbvDistinct :: NonEmpty (SBVType t) -> SBV Bool Source #
default sbvDistinct :: EqSymbolic (SBVType t) => NonEmpty (SBVType t) -> SBV Bool Source #
parseSMTModelResult :: Int -> ([([CV], CV)], CV) -> t Source #
castTypedSymbol :: IsSymbolKind knd' => TypedSymbol knd t -> Maybe (TypedSymbol knd' t) Source #
Instances
class SupportedPrim con => SymRep con Source #
Type family to resolve the symbolic type associated with a concrete type.
Instances
SymRep AlgReal Source # | |
Defined in Grisette.Internal.SymPrim.SymAlgReal | |
SymRep FPRoundingMode Source # | |
Defined in Grisette.Internal.SymPrim.SymFP Associated Types type SymType FPRoundingMode Source # | |
SymRep Integer Source # | |
Defined in Grisette.Internal.SymPrim.SymInteger | |
SymRep Bool Source # | |
Defined in Grisette.Internal.SymPrim.SymBool | |
(KnownNat n, 1 <= n) => SymRep (IntN n) Source # | |
Defined in Grisette.Internal.SymPrim.SymBV | |
(KnownNat n, 1 <= n) => SymRep (WordN n) Source # | |
Defined in Grisette.Internal.SymPrim.SymBV | |
ValidFP eb sb => SymRep (FP eb sb) Source # | |
Defined in Grisette.Internal.SymPrim.SymFP | |
(SymRep ca, SymRep cb, SupportedPrim (ca --> cb)) => SymRep (ca --> cb) Source # | |
Defined in Grisette.Internal.SymPrim.SymGeneralFun | |
(SymRep a, SymRep b, SupportedPrim (a =-> b)) => SymRep (a =-> b) Source # | |
Defined in Grisette.Internal.SymPrim.SymTabularFun |
Type family to resolve the concrete type associated with a symbolic type.
Instances
ConRep SymAlgReal Source # | |
Defined in Grisette.Internal.SymPrim.SymAlgReal Associated Types type ConType SymAlgReal Source # | |
ConRep SymBool Source # | |
Defined in Grisette.Internal.SymPrim.SymBool | |
ConRep SymFPRoundingMode Source # | |
Defined in Grisette.Internal.SymPrim.SymFP Associated Types type ConType SymFPRoundingMode Source # | |
ConRep SymInteger Source # | |
Defined in Grisette.Internal.SymPrim.SymInteger Associated Types type ConType SymInteger Source # | |
(KnownNat n, 1 <= n) => ConRep (SymIntN n) Source # | |
Defined in Grisette.Internal.SymPrim.SymBV | |
(KnownNat n, 1 <= n) => ConRep (SymWordN n) Source # | |
Defined in Grisette.Internal.SymPrim.SymBV | |
ConRep (SymFP eb sb) Source # | |
Defined in Grisette.Internal.SymPrim.SymFP | |
(ConRep a, ConRep b) => ConRep (a -~> b) Source # | |
Defined in Grisette.Internal.SymPrim.SymGeneralFun | |
(ConRep a, ConRep b) => ConRep (a =~> b) Source # | |
Defined in Grisette.Internal.SymPrim.SymTabularFun |
class (ConRep sym, SymRep con, sym ~ SymType con, con ~ ConType sym) => LinkedRep con sym | con -> sym, sym -> con where Source #
One-to-one mapping between symbolic types and concrete types.
Instances
Partial evaluation for the terms
class PEvalApplyTerm f a b | f -> a b where Source #
Partial evaluation and lowering for function application terms.
Methods
pevalApplyTerm :: Term f -> Term a -> Term b Source #
sbvApplyTerm :: SBVType f -> SBVType a -> SBVType b Source #
Instances
(SupportedPrim (a --> b), SupportedNonFuncPrim a, SupportedPrim b) => PEvalApplyTerm (a --> b) a b Source # | |
Defined in Grisette.Internal.SymPrim.GeneralFun | |
(SupportedPrim a, SupportedPrim b, Eq a, SupportedPrim (a =-> b)) => PEvalApplyTerm (a =-> b) a b Source # | |
Defined in Grisette.Internal.SymPrim.TabularFun |
class PEvalBitwiseTerm t where Source #
Partial evaluation and lowering for bitwise operation terms.
Minimal complete definition
pevalAndBitsTerm, pevalOrBitsTerm, pevalXorBitsTerm, pevalComplementBitsTerm, withSbvBitwiseTermConstraint
Methods
pevalAndBitsTerm :: Term t -> Term t -> Term t Source #
pevalOrBitsTerm :: Term t -> Term t -> Term t Source #
pevalXorBitsTerm :: Term t -> Term t -> Term t Source #
pevalComplementBitsTerm :: Term t -> Term t Source #
withSbvBitwiseTermConstraint :: (Bits (SBVType t) => r) -> r Source #
sbvAndBitsTerm :: SBVType t -> SBVType t -> SBVType t Source #
sbvOrBitsTerm :: SBVType t -> SBVType t -> SBVType t Source #
sbvXorBitsTerm :: SBVType t -> SBVType t -> SBVType t Source #
sbvComplementBitsTerm :: SBVType t -> SBVType t Source #
Instances
class PEvalShiftTerm t where Source #
Partial evaluation and lowering for symbolic shifting terms.
Minimal complete definition
pevalShiftLeftTerm, pevalShiftRightTerm, withSbvShiftTermConstraint
Methods
pevalShiftLeftTerm :: Term t -> Term t -> Term t Source #
pevalShiftRightTerm :: Term t -> Term t -> Term t Source #
withSbvShiftTermConstraint :: (SIntegral (NonFuncSBVBaseType t) => r) -> r Source #
sbvShiftLeftTerm :: SBVType t -> SBVType t -> SBVType t Source #
default sbvShiftLeftTerm :: SupportedNonFuncPrim t => SBVType t -> SBVType t -> SBVType t Source #
sbvShiftRightTerm :: SBVType t -> SBVType t -> SBVType t Source #
default sbvShiftRightTerm :: SupportedNonFuncPrim t => SBVType t -> SBVType t -> SBVType t Source #
Instances
class PEvalRotateTerm t where Source #
Partial evaluation and lowering for symbolic rotate terms.
Minimal complete definition
pevalRotateLeftTerm, pevalRotateRightTerm, withSbvRotateTermConstraint
Methods
pevalRotateLeftTerm :: Term t -> Term t -> Term t Source #
pevalRotateRightTerm :: Term t -> Term t -> Term t Source #
withSbvRotateTermConstraint :: (SIntegral (NonFuncSBVBaseType t) => r) -> r Source #
sbvRotateLeftTerm :: SBVType t -> SBVType t -> SBVType t Source #
default sbvRotateLeftTerm :: SupportedNonFuncPrim t => SBVType t -> SBVType t -> SBVType t Source #
sbvRotateRightTerm :: SBVType t -> SBVType t -> SBVType t Source #
default sbvRotateRightTerm :: SupportedNonFuncPrim t => SBVType t -> SBVType t -> SBVType t Source #
Instances
class Num t => PEvalNumTerm t where Source #
Partial evaluation and lowering for number terms.
Minimal complete definition
pevalAddNumTerm, pevalNegNumTerm, pevalMulNumTerm, pevalAbsNumTerm, pevalSignumNumTerm, withSbvNumTermConstraint
Methods
pevalAddNumTerm :: Term t -> Term t -> Term t Source #
pevalNegNumTerm :: Term t -> Term t Source #
pevalMulNumTerm :: Term t -> Term t -> Term t Source #
pevalAbsNumTerm :: Term t -> Term t Source #
pevalSignumNumTerm :: Term t -> Term t Source #
withSbvNumTermConstraint :: (Num (SBVType t) => r) -> r Source #
sbvAddNumTerm :: SBVType t -> SBVType t -> SBVType t Source #
sbvNegNumTerm :: SBVType t -> SBVType t Source #
sbvMulNumTerm :: SBVType t -> SBVType t -> SBVType t Source #
sbvAbsNumTerm :: SBVType t -> SBVType t Source #
sbvSignumNumTerm :: SBVType t -> SBVType t Source #
Instances
pevalSubNumTerm :: PEvalNumTerm a => Term a -> Term a -> Term a Source #
Partial evaluation for subtraction terms.
class PEvalOrdTerm t where Source #
Partial evaluation and lowering for comparison terms.
Minimal complete definition
Methods
pevalLtOrdTerm :: Term t -> Term t -> Term Bool Source #
pevalLeOrdTerm :: Term t -> Term t -> Term Bool Source #
withSbvOrdTermConstraint :: (OrdSymbolic (SBVType t) => r) -> r Source #
Instances
pevalGtOrdTerm :: PEvalOrdTerm a => Term a -> Term a -> Term Bool Source #
Partial evaluation for greater than terms.
pevalGeOrdTerm :: PEvalOrdTerm a => Term a -> Term a -> Term Bool Source #
Partial evaluation for greater than or equal to terms.
pevalNEqTerm :: SupportedPrim a => Term a -> Term a -> Term Bool Source #
Partial evaluation for inequality terms.
class PEvalDivModIntegralTerm t where Source #
Partial evaluation and lowering for integer division and modulo terms.
Minimal complete definition
pevalDivIntegralTerm, pevalModIntegralTerm, pevalQuotIntegralTerm, pevalRemIntegralTerm, withSbvDivModIntegralTermConstraint
Methods
pevalDivIntegralTerm :: Term t -> Term t -> Term t Source #
pevalModIntegralTerm :: Term t -> Term t -> Term t Source #
pevalQuotIntegralTerm :: Term t -> Term t -> Term t Source #
pevalRemIntegralTerm :: Term t -> Term t -> Term t Source #
withSbvDivModIntegralTermConstraint :: (SDivisible (SBVType t) => r) -> r Source #
sbvDivIntegralTerm :: SBVType t -> SBVType t -> SBVType t Source #
sbvModIntegralTerm :: SBVType t -> SBVType t -> SBVType t Source #
sbvQuotIntegralTerm :: SBVType t -> SBVType t -> SBVType t Source #
sbvRemIntegralTerm :: SBVType t -> SBVType t -> SBVType t Source #
Instances
class BitCast a b => PEvalBitCastTerm a b where Source #
Partial evaluation and lowering for bitcast terms.
Instances
PEvalBitCastTerm Bool (IntN 1) Source # | |
PEvalBitCastTerm Bool (WordN 1) Source # | |
PEvalBitCastTerm (IntN 1) Bool Source # | |
PEvalBitCastTerm (WordN 1) Bool Source # | |
(KnownNat n, 1 <= n) => PEvalBitCastTerm (IntN n) (WordN n) Source # | |
Defined in Grisette.Internal.SymPrim.Prim.Internal.Term | |
(KnownNat n, 1 <= n) => PEvalBitCastTerm (WordN n) (IntN n) Source # | |
Defined in Grisette.Internal.SymPrim.Prim.Internal.Term | |
(n ~ (eb + sb), ValidFP eb sb, KnownNat n, 1 <= n) => PEvalBitCastTerm (IntN n) (FP eb sb) Source # | |
(n ~ (eb + sb), ValidFP eb sb, KnownNat n, 1 <= n) => PEvalBitCastTerm (WordN n) (FP eb sb) Source # | |
class BitCastOr a b => PEvalBitCastOrTerm a b where Source #
Partial evaluation and lowering for bitcast or default value terms.
Methods
pevalBitCastOrTerm :: Term b -> Term a -> Term b Source #
sbvBitCastOr :: SBVType b -> SBVType a -> SBVType b Source #
class (SizedBV bv, forall n. (KnownNat n, 1 <= n) => PEvalNumTerm (bv n), forall n. (KnownNat n, 1 <= n) => PEvalBitwiseTerm (bv n), forall n. (KnownNat n, 1 <= n) => FiniteBits (bv n), forall n. (KnownNat n, 1 <= n) => Num (bv n)) => PEvalBVTerm bv where Source #
Partial evaluation and lowering for bit-vector terms.
Methods
pevalBVConcatTerm :: (KnownNat l, KnownNat r, 1 <= l, 1 <= r) => Term (bv l) -> Term (bv r) -> Term (bv (l + r)) Source #
pevalBVExtendTerm :: (KnownNat l, KnownNat r, 1 <= l, 1 <= r, l <= r) => Bool -> proxy r -> Term (bv l) -> Term (bv r) Source #
pevalBVSelectTerm :: (KnownNat n, KnownNat ix, KnownNat w, 1 <= n, 1 <= w, (ix + w) <= n) => p ix -> q w -> Term (bv n) -> Term (bv w) Source #
sbvBVConcatTerm :: (KnownNat l, KnownNat r, 1 <= l, 1 <= r) => p1 l -> p2 r -> SBVType (bv l) -> SBVType (bv r) -> SBVType (bv (l + r)) Source #
sbvBVExtendTerm :: (KnownNat l, KnownNat r, 1 <= l, 1 <= r, l <= r) => p1 l -> p2 r -> Bool -> SBVType (bv l) -> SBVType (bv r) Source #
sbvBVSelectTerm :: (KnownNat ix, KnownNat w, KnownNat n, 1 <= n, 1 <= w, (ix + w) <= n) => p1 ix -> p2 w -> p3 n -> SBVType (bv n) -> SBVType (bv w) Source #
Instances
PEvalBVTerm IntN Source # | |
Defined in Grisette.Internal.SymPrim.Prim.Internal.Term Methods pevalBVConcatTerm :: forall (l :: Nat) (r :: Nat). (KnownNat l, KnownNat r, 1 <= l, 1 <= r) => Term (IntN l) -> Term (IntN r) -> Term (IntN (l + r)) Source # pevalBVExtendTerm :: forall (l :: Nat) (r :: Nat) proxy. (KnownNat l, KnownNat r, 1 <= l, 1 <= r, l <= r) => Bool -> proxy r -> Term (IntN l) -> Term (IntN r) Source # pevalBVSelectTerm :: forall (n :: Nat) (ix :: Nat) (w :: Nat) p q. (KnownNat n, KnownNat ix, KnownNat w, 1 <= n, 1 <= w, (ix + w) <= n) => p ix -> q w -> Term (IntN n) -> Term (IntN w) Source # sbvBVConcatTerm :: forall (l :: Nat) (r :: Nat) p1 p2. (KnownNat l, KnownNat r, 1 <= l, 1 <= r) => p1 l -> p2 r -> SBVType (IntN l) -> SBVType (IntN r) -> SBVType (IntN (l + r)) Source # sbvBVExtendTerm :: forall (l :: Nat) (r :: Nat) p1 p2. (KnownNat l, KnownNat r, 1 <= l, 1 <= r, l <= r) => p1 l -> p2 r -> Bool -> SBVType (IntN l) -> SBVType (IntN r) Source # sbvBVSelectTerm :: forall (ix :: Nat) (w :: Nat) (n :: Nat) p1 p2 p3. (KnownNat ix, KnownNat w, KnownNat n, 1 <= n, 1 <= w, (ix + w) <= n) => p1 ix -> p2 w -> p3 n -> SBVType (IntN n) -> SBVType (IntN w) Source # | |
PEvalBVTerm WordN Source # | |
Defined in Grisette.Internal.SymPrim.Prim.Internal.Term Methods pevalBVConcatTerm :: forall (l :: Nat) (r :: Nat). (KnownNat l, KnownNat r, 1 <= l, 1 <= r) => Term (WordN l) -> Term (WordN r) -> Term (WordN (l + r)) Source # pevalBVExtendTerm :: forall (l :: Nat) (r :: Nat) proxy. (KnownNat l, KnownNat r, 1 <= l, 1 <= r, l <= r) => Bool -> proxy r -> Term (WordN l) -> Term (WordN r) Source # pevalBVSelectTerm :: forall (n :: Nat) (ix :: Nat) (w :: Nat) p q. (KnownNat n, KnownNat ix, KnownNat w, 1 <= n, 1 <= w, (ix + w) <= n) => p ix -> q w -> Term (WordN n) -> Term (WordN w) Source # sbvBVConcatTerm :: forall (l :: Nat) (r :: Nat) p1 p2. (KnownNat l, KnownNat r, 1 <= l, 1 <= r) => p1 l -> p2 r -> SBVType (WordN l) -> SBVType (WordN r) -> SBVType (WordN (l + r)) Source # sbvBVExtendTerm :: forall (l :: Nat) (r :: Nat) p1 p2. (KnownNat l, KnownNat r, 1 <= l, 1 <= r, l <= r) => p1 l -> p2 r -> Bool -> SBVType (WordN l) -> SBVType (WordN r) Source # sbvBVSelectTerm :: forall (ix :: Nat) (w :: Nat) (n :: Nat) p1 p2 p3. (KnownNat ix, KnownNat w, KnownNat n, 1 <= n, 1 <= w, (ix + w) <= n) => p1 ix -> p2 w -> p3 n -> SBVType (WordN n) -> SBVType (WordN w) Source # |
class Fractional t => PEvalFractionalTerm t where Source #
Partial evaluation and lowering for fractional terms.
Minimal complete definition
pevalFdivTerm, pevalRecipTerm, withSbvFractionalTermConstraint
Methods
pevalFdivTerm :: Term t -> Term t -> Term t Source #
pevalRecipTerm :: Term t -> Term t Source #
withSbvFractionalTermConstraint :: (Fractional (SBVType t) => r) -> r Source #
sbvFdivTerm :: SBVType t -> SBVType t -> SBVType t Source #
sbvRecipTerm :: SBVType t -> SBVType t Source #
Instances
PEvalFractionalTerm AlgReal Source # | |
Defined in Grisette.Internal.SymPrim.Prim.Internal.Instances.PEvalFractionalTerm | |
ValidFP eb sb => PEvalFractionalTerm (FP eb sb) Source # | |
Defined in Grisette.Internal.SymPrim.Prim.Internal.Instances.PEvalFractionalTerm Methods pevalFdivTerm :: Term (FP eb sb) -> Term (FP eb sb) -> Term (FP eb sb) Source # pevalRecipTerm :: Term (FP eb sb) -> Term (FP eb sb) Source # withSbvFractionalTermConstraint :: (Fractional (SBVType (FP eb sb)) => r) -> r Source # sbvFdivTerm :: SBVType (FP eb sb) -> SBVType (FP eb sb) -> SBVType (FP eb sb) Source # sbvRecipTerm :: SBVType (FP eb sb) -> SBVType (FP eb sb) Source # |
class PEvalFPTerm fp where Source #
Partial evaluation and lowering for floating point terms.
Methods
pevalFPTraitTerm :: ValidFP eb sb => FPTrait -> Term (fp eb sb) -> Term Bool Source #
pevalFPUnaryTerm :: ValidFP eb sb => FPUnaryOp -> Term (fp eb sb) -> Term (fp eb sb) Source #
pevalFPBinaryTerm :: ValidFP eb sb => FPBinaryOp -> Term (fp eb sb) -> Term (fp eb sb) -> Term (fp eb sb) Source #
pevalFPRoundingUnaryTerm :: ValidFP eb sb => FPRoundingUnaryOp -> Term FPRoundingMode -> Term (fp eb sb) -> Term (fp eb sb) Source #
pevalFPRoundingBinaryTerm :: ValidFP eb sb => FPRoundingBinaryOp -> Term FPRoundingMode -> Term (fp eb sb) -> Term (fp eb sb) -> Term (fp eb sb) Source #
pevalFPFMATerm :: ValidFP eb sb => Term FPRoundingMode -> Term (fp eb sb) -> Term (fp eb sb) -> Term (fp eb sb) -> Term (fp eb sb) Source #
sbvFPTraitTerm :: ValidFP eb sb => FPTrait -> SBVType (fp eb sb) -> SBVType Bool Source #
sbvFPUnaryTerm :: ValidFP eb sb => FPUnaryOp -> SBVType (fp eb sb) -> SBVType (fp eb sb) Source #
sbvFPBinaryTerm :: ValidFP eb sb => FPBinaryOp -> SBVType (fp eb sb) -> SBVType (fp eb sb) -> SBVType (fp eb sb) Source #
sbvFPRoundingUnaryTerm :: ValidFP eb sb => FPRoundingUnaryOp -> SBVType FPRoundingMode -> SBVType (fp eb sb) -> SBVType (fp eb sb) Source #
sbvFPRoundingBinaryTerm :: ValidFP eb sb => FPRoundingBinaryOp -> SBVType FPRoundingMode -> SBVType (fp eb sb) -> SBVType (fp eb sb) -> SBVType (fp eb sb) Source #
sbvFPFMATerm :: ValidFP eb sb => SBVType FPRoundingMode -> SBVType (fp eb sb) -> SBVType (fp eb sb) -> SBVType (fp eb sb) -> SBVType (fp eb sb) Source #
Instances
class PEvalFloatingTerm t where Source #
Partial evaluation and lowering for floating point terms.
Minimal complete definition
pevalFloatingUnaryTerm, pevalPowerTerm, withSbvFloatingTermConstraint
Methods
pevalFloatingUnaryTerm :: FloatingUnaryOp -> Term t -> Term t Source #
pevalPowerTerm :: Term t -> Term t -> Term t Source #
withSbvFloatingTermConstraint :: (Floating (SBVType t) => r) -> r Source #
sbvPowerTerm :: SBVType t -> SBVType t -> SBVType t Source #
sbvFloatingUnaryTerm :: FloatingUnaryOp -> SBVType t -> SBVType t Source #
Instances
class (Integral a, Num b) => PEvalFromIntegralTerm a b where Source #
Partial evaluation and lowering for integral terms.
Methods
pevalFromIntegralTerm :: Term a -> Term b Source #
sbvFromIntegralTerm :: SBVType a -> SBVType b Source #
Instances
class PEvalIEEEFPConvertibleTerm a where Source #
Partial evaluation and lowering for converting from and to IEEE floating point terms.
Methods
pevalFromFPOrTerm :: ValidFP eb sb => Term a -> Term FPRoundingMode -> Term (FP eb sb) -> Term a Source #
pevalToFPTerm :: ValidFP eb sb => Term FPRoundingMode -> Term a -> Term (FP eb sb) Source #
sbvFromFPOrTerm :: ValidFP eb sb => SBVType a -> SBVType FPRoundingMode -> SBVType (FP eb sb) -> SBVType a Source #
sbvToFPTerm :: ValidFP eb sb => SBVType FPRoundingMode -> SBVType a -> SBVType (FP eb sb) Source #
Instances
Typed symbols
data SymbolKind Source #
The kind of a symbol.
All symbols are AnyKind
, and all symbols other than general/tabular
functions are ConstantKind
.
Constructors
ConstantKind | |
AnyKind |
data TypedSymbol (knd :: SymbolKind) t where Source #
A typed symbol is a symbol that is associated with a type. Note that the same symbol bodies with different types are considered different symbols and can coexist in a term.
Simple symbols can be created with the OverloadedStrings
extension:
>>>
"a" :: TypedSymbol 'AnyKind Bool
a :: Bool
Constructors
TypedSymbol | |
Fields
|
Instances
typedConstantSymbol :: forall t. SupportedNonFuncPrim t => Symbol -> TypedSymbol 'ConstantKind t Source #
Create a typed symbol with constant kinds.
typedAnySymbol :: forall t. SupportedPrim t => Symbol -> TypedSymbol 'AnyKind t Source #
Create a typed symbol with any kinds.
type TypedConstantSymbol = TypedSymbol 'ConstantKind Source #
Constant symbol
type TypedAnySymbol = TypedSymbol 'AnyKind Source #
Any symbol
data SomeTypedSymbol knd where Source #
A non-indexed symbol. Type information are checked at runtime.
Constructors
SomeTypedSymbol :: forall knd t. TypedSymbol knd t -> SomeTypedSymbol knd |
Instances
type SomeTypedConstantSymbol = SomeTypedSymbol 'ConstantKind Source #
Non-indexed constant symbol
type SomeTypedAnySymbol = SomeTypedSymbol 'AnyKind Source #
Non-indexed any symbol
class IsSymbolKind (knd :: SymbolKind) where Source #
Decision procedure for symbol kinds.
Associated Types
type SymbolKindConstraint knd :: Type -> Constraint Source #
Methods
decideSymbolKind :: Either (knd :~~: 'ConstantKind) (knd :~~: 'AnyKind) Source #
withSymbolKindConstraint :: TypedSymbol knd t -> (SymbolKindConstraint knd t => a) -> a Source #
Instances
IsSymbolKind 'AnyKind Source # | |
Defined in Grisette.Internal.SymPrim.Prim.Internal.Term Associated Types type SymbolKindConstraint 'AnyKind :: Type -> Constraint Source # Methods decideSymbolKind :: Either ('AnyKind :~~: 'ConstantKind) ('AnyKind :~~: 'AnyKind) Source # withSymbolKindConstraint :: TypedSymbol 'AnyKind t -> (SymbolKindConstraint 'AnyKind t => a) -> a Source # | |
IsSymbolKind 'ConstantKind Source # | |
Defined in Grisette.Internal.SymPrim.Prim.Internal.Term Associated Types type SymbolKindConstraint 'ConstantKind :: Type -> Constraint Source # Methods decideSymbolKind :: Either ('ConstantKind :~~: 'ConstantKind) ('ConstantKind :~~: 'AnyKind) Source # withSymbolKindConstraint :: TypedSymbol 'ConstantKind t -> (SymbolKindConstraint 'ConstantKind t => a) -> a Source # |
showUntyped :: TypedSymbol knd t -> String Source #
Show a typed symbol without the type information.
someTypedSymbol :: forall knd t. TypedSymbol knd t -> SomeTypedSymbol knd Source #
Construct a SomeTypedSymbol
from a TypedSymbol
.
eqHeteroSymbol :: forall ta a tb b. TypedSymbol ta a -> TypedSymbol tb b -> Bool Source #
Compare two TypedSymbol
s for equality.
castSomeTypedSymbol :: IsSymbolKind knd' => SomeTypedSymbol knd -> Maybe (SomeTypedSymbol knd') Source #
Cast a typed symbol to a different kind. Check if the kind is compatible.
Terms
Traits for IEEE floating point numbers.
Constructors
FPIsNaN | |
FPIsPositive | |
FPIsNegative | |
FPIsPositiveInfinite | |
FPIsNegativeInfinite | |
FPIsInfinite | |
FPIsPositiveZero | |
FPIsNegativeZero | |
FPIsZero | |
FPIsNormal | |
FPIsSubnormal | |
FPIsPoint |
Instances
Unary floating point operations.
Instances
data FPBinaryOp Source #
Binary floating point operations.
Constructors
FPRem | |
FPMinimum | |
FPMinimumNumber | |
FPMaximum | |
FPMaximumNumber |
Instances
data FPRoundingUnaryOp Source #
Unary floating point operations with rounding modes.
Constructors
FPSqrt | |
FPRoundToIntegral |
Instances
data FPRoundingBinaryOp Source #
Binary floating point operations with rounding modes.
Instances
data FloatingUnaryOp Source #
Unary floating point operations.
Constructors
FloatingExp | |
FloatingLog | |
FloatingSqrt | |
FloatingSin | |
FloatingCos | |
FloatingTan | |
FloatingAsin | |
FloatingAcos | |
FloatingAtan | |
FloatingSinh | |
FloatingCosh | |
FloatingTanh | |
FloatingAsinh | |
FloatingAcosh | |
FloatingAtanh |
Instances
Internal representation for Grisette symbolic terms.
Constructors
Instances
defaultValueDynamic :: forall t proxy. SupportedPrim t => proxy t -> ModelValue Source #
The default value in a dynamic ModelValue
.
pattern DynTerm :: forall a b. SupportedPrim a => Term a -> Term b Source #
Pattern for term with dynamic typing.
data CachedInfo Source #
Information about a cached term.
Constructors
CachedInfo | |
Fields
|
Instances
NFData CachedInfo Source # | |
Defined in Grisette.Internal.SymPrim.Prim.Internal.Term Methods rnf :: CachedInfo -> () # |
termInfo :: Term t -> CachedInfo Source #
Get the cached information for a term.
termThreadId :: Term t -> WeakThreadId Source #
Get the thread ID for a term.
termDigest :: Term t -> Digest Source #
Get the digest for a term.
termStableIdent :: Term t -> StableIdent Source #
Get the stable identifier for a term.
pformatTerm :: forall t. Term t -> String Source #
Pretty-print a term.
data ModelValue where Source #
A value with its type information.
Constructors
ModelValue :: forall v. SupportedPrim v => v -> ModelValue |
Instances
toModelValue :: forall a. SupportedPrim a => a -> ModelValue Source #
Convert to a model value.
unsafeFromModelValue :: forall a. Typeable a => ModelValue -> a Source #
Convert from a model value. Crashes if the types does not match.
Interning
Term without identity (before internalizing).
Constructors
prettyPrintTerm :: Term t -> Doc ann Source #
Pretty-print a term, possibly eliding parts of it.
Interned constructors
ssymTerm :: SupportedPrim t => Identifier -> Term t Source #
Construct and internalizing a SymTerm
with an identifier, using simple
symbols.
isymTerm :: SupportedPrim t => Identifier -> Int -> Term t Source #
Construct and internalizing a SymTerm
with an identifier and an index,
using indexed symbols.
forallTerm :: TypedSymbol 'ConstantKind t -> Term Bool -> Term Bool Source #
Construct and internalizing a ForallTerm
.
existsTerm :: TypedSymbol 'ConstantKind t -> Term Bool -> Term Bool Source #
Construct and internalizing a ExistsTerm
.
distinctTerm :: NonEmpty (Term a) -> Term Bool Source #
Construct and internalizing a DistinctTerm
.
addNumTerm :: PEvalNumTerm a => Term a -> Term a -> Term a Source #
Construct and internalizing a AddNumTerm
.
negNumTerm :: PEvalNumTerm a => Term a -> Term a Source #
Construct and internalizing a NegNumTerm
.
mulNumTerm :: PEvalNumTerm a => Term a -> Term a -> Term a Source #
Construct and internalizing a MulNumTerm
.
absNumTerm :: PEvalNumTerm a => Term a -> Term a Source #
Construct and internalizing a AbsNumTerm
.
signumNumTerm :: PEvalNumTerm a => Term a -> Term a Source #
Construct and internalizing a SignumNumTerm
.
ltOrdTerm :: PEvalOrdTerm a => Term a -> Term a -> Term Bool Source #
Construct and internalizing a LtOrdTerm
.
leOrdTerm :: PEvalOrdTerm a => Term a -> Term a -> Term Bool Source #
Construct and internalizing a LeOrdTerm
.
andBitsTerm :: PEvalBitwiseTerm a => Term a -> Term a -> Term a Source #
Construct and internalizing a AndBitsTerm
.
orBitsTerm :: PEvalBitwiseTerm a => Term a -> Term a -> Term a Source #
Construct and internalizing a OrBitsTerm
.
xorBitsTerm :: PEvalBitwiseTerm a => Term a -> Term a -> Term a Source #
Construct and internalizing a XorBitsTerm
.
complementBitsTerm :: PEvalBitwiseTerm a => Term a -> Term a Source #
Construct and internalizing a ComplementBitsTerm
.
shiftLeftTerm :: PEvalShiftTerm a => Term a -> Term a -> Term a Source #
Construct and internalizing a ShiftLeftTerm
.
rotateLeftTerm :: PEvalRotateTerm a => Term a -> Term a -> Term a Source #
Construct and internalizing a RotateLeftTerm
.
shiftRightTerm :: PEvalShiftTerm a => Term a -> Term a -> Term a Source #
Construct and internalizing a ShiftRightTerm
.
rotateRightTerm :: PEvalRotateTerm a => Term a -> Term a -> Term a Source #
Construct and internalizing a RotateRightTerm
.
bitCastTerm :: (PEvalBitCastTerm a b, SupportedPrim b) => Term a -> Term b Source #
Construct and internalizing a BitCastTerm
.
bitCastOrTerm :: PEvalBitCastOrTerm a b => Term b -> Term a -> Term b Source #
Construct and internalizing a BitCastOrTerm
.
bvConcatTerm :: forall bv l r. (PEvalBVTerm bv, KnownNat l, KnownNat r, KnownNat (l + r), 1 <= l, 1 <= r, 1 <= (l + r), SupportedPrim (bv (l + r))) => Term (bv l) -> Term (bv r) -> Term (bv (l + r)) Source #
Construct and internalizing a BVConcatTerm
.
bvSelectTerm :: forall bv n ix w p q. (PEvalBVTerm bv, KnownNat n, KnownNat ix, KnownNat w, 1 <= n, 1 <= w, (ix + w) <= n, SupportedPrim (bv w)) => p ix -> q w -> Term (bv n) -> Term (bv w) Source #
Construct and internalizing a BVSelectTerm
.
bvExtendTerm :: forall bv l r proxy. (PEvalBVTerm bv, KnownNat l, KnownNat r, 1 <= l, 1 <= r, l <= r, SupportedPrim (bv r)) => Bool -> proxy r -> Term (bv l) -> Term (bv r) Source #
Construct and internalizing a BVExtendTerm
.
bvsignExtendTerm :: forall bv l r proxy. (PEvalBVTerm bv, KnownNat l, KnownNat r, 1 <= l, 1 <= r, l <= r, SupportedPrim (bv r)) => proxy r -> Term (bv l) -> Term (bv r) Source #
Construct and internalizing a BVExtendTerm
with sign extension.
bvzeroExtendTerm :: forall bv l r proxy. (PEvalBVTerm bv, KnownNat l, KnownNat r, 1 <= l, 1 <= r, l <= r, SupportedPrim (bv r)) => proxy r -> Term (bv l) -> Term (bv r) Source #
Construct and internalizing a BVExtendTerm
with zero extension.
applyTerm :: (PEvalApplyTerm f a b, SupportedPrim b) => Term f -> Term a -> Term b Source #
Construct and internalizing a ApplyTerm
.
divIntegralTerm :: PEvalDivModIntegralTerm a => Term a -> Term a -> Term a Source #
Construct and internalizing a DivIntegralTerm
.
modIntegralTerm :: PEvalDivModIntegralTerm a => Term a -> Term a -> Term a Source #
Construct and internalizing a ModIntegralTerm
.
quotIntegralTerm :: PEvalDivModIntegralTerm a => Term a -> Term a -> Term a Source #
Construct and internalizing a QuotIntegralTerm
.
remIntegralTerm :: PEvalDivModIntegralTerm a => Term a -> Term a -> Term a Source #
Construct and internalizing a RemIntegralTerm
.
fpTraitTerm :: (ValidFP eb sb, SupportedPrim (fp eb sb), PEvalFPTerm fp) => FPTrait -> Term (fp eb sb) -> Term Bool Source #
Construct and internalizing a FPTraitTerm
.
fdivTerm :: PEvalFractionalTerm a => Term a -> Term a -> Term a Source #
Construct and internalizing a FdivTerm
.
recipTerm :: PEvalFractionalTerm a => Term a -> Term a Source #
Construct and internalizing a RecipTerm
.
floatingUnaryTerm :: PEvalFloatingTerm a => FloatingUnaryOp -> Term a -> Term a Source #
Construct and internalizing a FloatingUnaryTerm
.
powerTerm :: PEvalFloatingTerm a => Term a -> Term a -> Term a Source #
Construct and internalizing a PowerTerm
.
fpUnaryTerm :: (ValidFP eb sb, SupportedPrim (fp eb sb), PEvalFPTerm fp) => FPUnaryOp -> Term (fp eb sb) -> Term (fp eb sb) Source #
Construct and internalizing a FPUnaryTerm
.
fpBinaryTerm :: (ValidFP eb sb, SupportedPrim (fp eb sb), PEvalFPTerm fp) => FPBinaryOp -> Term (fp eb sb) -> Term (fp eb sb) -> Term (fp eb sb) Source #
Construct and internalizing a FPBinaryTerm
.
fpRoundingUnaryTerm :: (ValidFP eb sb, SupportedPrim (fp eb sb), PEvalFPTerm fp) => FPRoundingUnaryOp -> Term FPRoundingMode -> Term (fp eb sb) -> Term (fp eb sb) Source #
Construct and internalizing a FPRoundingUnaryTerm
.
fpRoundingBinaryTerm :: (ValidFP eb sb, SupportedPrim (fp eb sb), PEvalFPTerm fp) => FPRoundingBinaryOp -> Term FPRoundingMode -> Term (fp eb sb) -> Term (fp eb sb) -> Term (fp eb sb) Source #
Construct and internalizing a FPRoundingBinaryTerm
.
fpFMATerm :: (ValidFP eb sb, SupportedPrim (fp eb sb), PEvalFPTerm fp) => Term FPRoundingMode -> Term (fp eb sb) -> Term (fp eb sb) -> Term (fp eb sb) -> Term (fp eb sb) Source #
Construct and internalizing a FPFMATerm
.
fromIntegralTerm :: (PEvalFromIntegralTerm a b, SupportedPrim b) => Term a -> Term b Source #
Construct and internalizing a FromIntegralTerm
.
fromFPOrTerm :: (PEvalIEEEFPConvertibleTerm a, ValidFP eb sb) => Term a -> Term FPRoundingMode -> Term (FP eb sb) -> Term a Source #
Construct and internalizing a FromFPOrTerm
.
toFPTerm :: forall a eb sb. (PEvalIEEEFPConvertibleTerm a, ValidFP eb sb, SupportedPrim (FP eb sb)) => Term FPRoundingMode -> Term a -> Term (FP eb sb) Source #
Construct and internalizing a ToFPTerm
.
Patterns
pattern SupportedTerm :: forall t. () => SupportedPrim t => Term t Source #
Pattern synonym to introduce the SupportedPrim constraint.
pattern SupportedTypedSymbol :: forall (k :: SymbolKind) t. () => (SupportedPrim t, SymbolKindConstraint k t, IsSymbolKind k) => TypedSymbol k t Source #
Pattern synonym to introduce constraints from a TypedSymbol
.
pattern SupportedConstantTypedSymbol :: forall k t. () => (SupportedPrim t, SymbolKindConstraint k t, IsSymbolKind k, k ~ 'ConstantKind) => TypedSymbol k t Source #
Pattern synonym to introduce constraints from a TypedSymbol
. Also checks
that the symbol kind is ConstantKind
.
pattern ConTerm :: forall t. () => SupportedPrim t => t -> Term t Source #
pattern SymTerm :: forall t. () => SupportedPrim t => TypedSymbol 'AnyKind t -> Term t Source #
pattern ForallTerm :: forall r. () => forall t. (r ~ Bool, SupportedNonFuncPrim t) => TypedSymbol 'ConstantKind t -> Term Bool -> Term r Source #
Pattern synonym for ForallTerm'
. Note that using this pattern to
construct a Term
will do term simplification.
pattern ExistsTerm :: forall r. () => forall t. (r ~ Bool, SupportedNonFuncPrim t) => TypedSymbol 'ConstantKind t -> Term Bool -> Term r Source #
Pattern synonym for ExistsTerm'
. Note that using this pattern to
construct a Term
will do term simplification.
pattern OrTermAll :: forall r. () => r ~ Bool => Term Bool -> Term Bool -> HashSet (Term Bool) -> Term r Source #
pattern AndTermAll :: forall r. () => r ~ Bool => Term Bool -> Term Bool -> HashSet (Term Bool) -> Term r Source #
pattern EqTerm :: forall r. () => forall t. (r ~ Bool, SupportedPrim t) => Term t -> Term t -> Term r Source #
pattern DistinctTerm :: forall r. () => forall t. (r ~ Bool, SupportedPrim t) => NonEmpty (Term t) -> Term r Source #
Pattern synonym for DistinctTerm'
. Note that using this pattern to
construct a Term
will do term simplification.
pattern ITETerm :: forall t. () => SupportedPrim t => Term Bool -> Term t -> Term t -> Term t Source #
pattern AddNumTerm :: forall t. () => (SupportedPrim t, PEvalNumTerm t) => Term t -> Term t -> Term t Source #
Pattern synonym for AddNumTerm'
. Note that using this pattern to
construct a Term
will do term simplification.
pattern NegNumTerm :: forall t. () => (SupportedPrim t, PEvalNumTerm t) => Term t -> Term t Source #
Pattern synonym for NegNumTerm'
. Note that using this pattern to
construct a Term
will do term simplification.
pattern MulNumTerm :: forall t. () => (SupportedPrim t, PEvalNumTerm t) => Term t -> Term t -> Term t Source #
Pattern synonym for MulNumTerm'
. Note that using this pattern to
construct a Term
will do term simplification.
pattern AbsNumTerm :: forall t. () => (SupportedPrim t, PEvalNumTerm t) => Term t -> Term t Source #
Pattern synonym for AbsNumTerm'
. Note that using this pattern to
construct a Term
will do term simplification.
pattern SignumNumTerm :: forall t. () => (SupportedPrim t, PEvalNumTerm t) => Term t -> Term t Source #
Pattern synonym for SignumNumTerm'
. Note that using this pattern to
construct a Term
will do term simplification.
pattern LtOrdTerm :: forall r. () => forall t. (r ~ Bool, SupportedPrim t, PEvalOrdTerm t) => Term t -> Term t -> Term r Source #
Pattern synonym for LtOrdTerm'
. Note that using this pattern to construct
a Term
will do term simplification.
pattern LeOrdTerm :: forall r. () => forall t. (r ~ Bool, SupportedPrim t, PEvalOrdTerm t) => Term t -> Term t -> Term r Source #
Pattern synonym for LeOrdTerm'
. Note that using this pattern to construct
a Term
will do term simplification.
pattern AndBitsTerm :: forall t. () => (SupportedPrim t, PEvalBitwiseTerm t) => Term t -> Term t -> Term t Source #
Pattern synonym for AndBitsTerm'
. Note that using this pattern to
construct a Term
will do term simplification.
pattern OrBitsTerm :: forall t. () => (SupportedPrim t, PEvalBitwiseTerm t) => Term t -> Term t -> Term t Source #
Pattern synonym for OrBitsTerm'
. Note that using this pattern to
construct a Term
will do term simplification.
pattern XorBitsTerm :: forall t. () => (SupportedPrim t, PEvalBitwiseTerm t) => Term t -> Term t -> Term t Source #
Pattern synonym for XorBitsTerm'
. Note that using this pattern to
construct a Term
will do term simplification.
pattern ComplementBitsTerm :: forall t. () => (SupportedPrim t, PEvalBitwiseTerm t) => Term t -> Term t Source #
Pattern synonym for ComplementBitsTerm'
. Note that using this pattern to
construct a Term
will do term simplification.
pattern ShiftLeftTerm :: forall t. () => (SupportedPrim t, PEvalShiftTerm t) => Term t -> Term t -> Term t Source #
Pattern synonym for ShiftLeftTerm'
. Note that using this pattern to
construct a Term
will do term simplification.
pattern RotateLeftTerm :: forall t. () => (SupportedPrim t, PEvalRotateTerm t) => Term t -> Term t -> Term t Source #
Pattern synonym for RotateLeftTerm'
. Note that using this pattern to
construct a Term
will do term simplification.
pattern ShiftRightTerm :: forall t. () => (SupportedPrim t, PEvalShiftTerm t) => Term t -> Term t -> Term t Source #
Pattern synonym for ShiftRightTerm'
. Note that using this pattern to
construct a Term
will do term simplification.
pattern RotateRightTerm :: forall t. () => (SupportedPrim t, PEvalRotateTerm t) => Term t -> Term t -> Term t Source #
Pattern synonym for RotateRightTerm'
. Note that using this pattern to
construct a Term
will do term simplification.
pattern BitCastTerm :: forall b. () => forall a. (SupportedPrim a, SupportedPrim b, PEvalBitCastTerm a b) => Term a -> Term b Source #
Pattern synonym for BitCastTerm'
. Note that using this pattern to
construct a Term
will do term simplification.
pattern BitCastOrTerm :: forall b. () => forall a. (SupportedPrim a, SupportedPrim b, PEvalBitCastOrTerm a b) => Term b -> Term a -> Term b Source #
Pattern synonym for BitCastOrTerm'
. Note that using this pattern to
construct a Term
will do term simplification.
pattern BVConcatTerm :: forall ret. () => forall bv l r. (PEvalBVTerm bv, KnownNat l, KnownNat r, KnownNat (l + r), 1 <= l, 1 <= r, 1 <= (l + r), SupportedPrim (bv l), SupportedPrim (bv r), SupportedPrim (bv (l + r)), ret ~ bv (l + r)) => Term (bv l) -> Term (bv r) -> Term ret Source #
Pattern synonym for BVConcatTerm'
. Note that using this pattern to
construct a Term
will do term simplification.
pattern BVSelectTerm :: forall ret. () => forall bv w n ix. (PEvalBVTerm bv, KnownNat n, KnownNat ix, KnownNat w, 1 <= n, 1 <= w, (ix + w) <= n, SupportedPrim (bv n), SupportedPrim (bv w), ret ~ bv w) => Proxy ix -> Proxy w -> Term (bv n) -> Term ret Source #
Pattern synonym for BVSelectTerm'
. Note that using this pattern to
construct a Term
will do term simplification.
pattern BVExtendTerm :: forall ret. () => forall bv l r. (PEvalBVTerm bv, KnownNat l, KnownNat r, 1 <= l, 1 <= r, l <= r, SupportedPrim (bv l), SupportedPrim (bv r), ret ~ bv r) => Bool -> Proxy r -> Term (bv l) -> Term ret Source #
Pattern synonym for BVExtendTerm'
. Note that using this pattern to
construct a Term
will do term simplification.
pattern ApplyTerm :: forall b. () => forall f a. (PEvalApplyTerm f a b, SupportedPrim f, SupportedPrim a, SupportedPrim b) => Term f -> Term a -> Term b Source #
Pattern synonym for ApplyTerm'
. Note that using this pattern to construct
a Term
will do term simplification.
pattern DivIntegralTerm :: forall t. () => (SupportedPrim t, PEvalDivModIntegralTerm t) => Term t -> Term t -> Term t Source #
Pattern synonym for DivIntegralTerm'
. Note that using this pattern to
construct a Term
will do term simplification.
pattern ModIntegralTerm :: forall t. () => (SupportedPrim t, PEvalDivModIntegralTerm t) => Term t -> Term t -> Term t Source #
Pattern synonym for ModIntegralTerm'
. Note that using this pattern to
construct a Term
will do term simplification.
pattern QuotIntegralTerm :: forall t. () => (SupportedPrim t, PEvalDivModIntegralTerm t) => Term t -> Term t -> Term t Source #
Pattern synonym for QuotIntegralTerm'
. Note that using this pattern to
construct a Term
will do term simplification.
pattern RemIntegralTerm :: forall t. () => (SupportedPrim t, PEvalDivModIntegralTerm t) => Term t -> Term t -> Term t Source #
Pattern synonym for RemIntegralTerm'
. Note that using this pattern to
construct a Term
will do term simplification.
pattern FPTraitTerm :: forall r. () => forall eb sb fp. (r ~ Bool, ValidFP eb sb, SupportedPrim (fp eb sb), PEvalFPTerm fp) => FPTrait -> Term (fp eb sb) -> Term r Source #
Pattern synonym for FPTraitTerm'
. Note that using this pattern to
construct a Term
will do term simplification.
pattern FdivTerm :: forall t. () => (SupportedPrim t, PEvalFractionalTerm t) => Term t -> Term t -> Term t Source #
pattern RecipTerm :: forall t. () => (SupportedPrim t, PEvalFractionalTerm t) => Term t -> Term t Source #
Pattern synonym for RecipTerm'
. Note that using this pattern to construct
a Term
will do term simplification.
pattern FloatingUnaryTerm :: forall t. () => (SupportedPrim t, PEvalFloatingTerm t) => FloatingUnaryOp -> Term t -> Term t Source #
Pattern synonym for FloatingUnaryTerm'
. Note that using this pattern to
construct a Term
will do term simplification.
pattern PowerTerm :: forall t. () => (SupportedPrim t, PEvalFloatingTerm t) => Term t -> Term t -> Term t Source #
Pattern synonym for PowerTerm'
. Note that using this pattern to construct
a Term
will do term simplification.
pattern FPUnaryTerm :: forall ret. () => forall fp eb sb. (ret ~ fp eb sb, ValidFP eb sb, SupportedPrim (fp eb sb), PEvalFPTerm fp) => FPUnaryOp -> Term (fp eb sb) -> Term ret Source #
Pattern synonym for FPUnaryTerm'
. Note that using this pattern to construct
a Term
will do term simplification.
pattern FPBinaryTerm :: forall ret. () => forall fp eb sb. (ret ~ fp eb sb, ValidFP eb sb, SupportedPrim (fp eb sb), PEvalFPTerm fp) => FPBinaryOp -> Term (fp eb sb) -> Term (fp eb sb) -> Term ret Source #
Pattern synonym for FPBinaryTerm'
. Note that using this pattern to construct
a Term
will do term simplification.
pattern FPRoundingUnaryTerm :: forall ret. () => forall fp eb sb. (ret ~ fp eb sb, ValidFP eb sb, SupportedPrim (fp eb sb), PEvalFPTerm fp) => FPRoundingUnaryOp -> Term FPRoundingMode -> Term (fp eb sb) -> Term ret Source #
Pattern synonym for FPRoundingUnaryTerm'
. Note that using this pattern to
construct a Term
will do term simplification.
pattern FPRoundingBinaryTerm :: forall ret. () => forall fp eb sb. (ret ~ fp eb sb, ValidFP eb sb, SupportedPrim (fp eb sb), PEvalFPTerm fp) => FPRoundingBinaryOp -> Term FPRoundingMode -> Term (fp eb sb) -> Term (fp eb sb) -> Term ret Source #
Pattern synonym for FPRoundingBinaryTerm'
. Note that using this pattern to
construct a Term
will do term simplification.
pattern FPFMATerm :: forall ret. () => forall fp eb sb. (ret ~ fp eb sb, ValidFP eb sb, SupportedPrim (fp eb sb), PEvalFPTerm fp) => Term FPRoundingMode -> Term (fp eb sb) -> Term (fp eb sb) -> Term (fp eb sb) -> Term ret Source #
Pattern synonym for FPFMATerm'
. Note that using this pattern to construct
a Term
will do term simplification.
pattern FromIntegralTerm :: forall b. () => forall a. (PEvalFromIntegralTerm a b, SupportedPrim a, SupportedPrim b) => Term a -> Term b Source #
Pattern synonym for FromIntegralTerm'
. Note that using this pattern to
construct a Term
will do term simplification.
pattern FromFPOrTerm :: forall a. () => forall eb sb. (PEvalIEEEFPConvertibleTerm a, ValidFP eb sb, SupportedPrim a) => Term a -> Term FPRoundingMode -> Term (FP eb sb) -> Term a Source #
Pattern synonym for FromFPOrTerm'
. Note that using this pattern to construct
a Term
will do term simplification.
pattern ToFPTerm :: forall ret. () => forall eb sb a. (PEvalIEEEFPConvertibleTerm a, ValidFP eb sb, SupportedPrim (FP eb sb), SupportedPrim a, ret ~ FP eb sb) => Term FPRoundingMode -> Term a -> Proxy eb -> Proxy sb -> Term ret Source #
Support for boolean type
pevalITEBasic :: SupportedPrim a => Term Bool -> Term a -> Term a -> Maybe (Term a) Source #
Basic partial evaluation for ITE terms.
pevalITEBasicTerm :: SupportedPrim a => Term Bool -> Term a -> Term a -> Term a Source #
Basic partial evaluation for ITE terms.
pevalDefaultEqTerm :: SupportedNonFuncPrim a => Term a -> Term a -> Term Bool Source #
Default partial evaluation for equality terms.
type NonFuncPrimConstraint a = (SymVal (NonFuncSBVBaseType a), EqSymbolic (SBVType a), Mergeable (SBVType a), SMTDefinable (SBVType a), Mergeable (SBVType a), SBVType a ~ SBV (NonFuncSBVBaseType a), PrimConstraint a) Source #
Type class for resolving the constraint for a supported non-function primitive type.
class (SupportedPrim a, Ord a, Eq a, Show a, Hashable a, Typeable a) => NonFuncSBVRep a Source #
Type class for resolving the base type for the SBV type for the primitive type.
Associated Types
type NonFuncSBVBaseType a Source #
Instances
class NonFuncSBVRep a => SupportedNonFuncPrim a where Source #
Indicates that a type is supported, can be represented as a symbolic term, is not a function type, and can be lowered to an SBV term.
Methods
conNonFuncSBVTerm :: a -> SBV (NonFuncSBVBaseType a) Source #
symNonFuncSBVTerm :: SBVFreshMonad m => String -> m (SBV (NonFuncSBVBaseType a)) Source #
withNonFuncPrim :: (NonFuncPrimConstraint a => r) -> r Source #
Instances
Type class for resolving the SBV type for the primitive type.
Instances
SBVRep AlgReal Source # | |
Defined in Grisette.Internal.SymPrim.Prim.Internal.Term | |
SBVRep FPRoundingMode Source # | |
Defined in Grisette.Internal.SymPrim.Prim.Internal.Term Associated Types type SBVType FPRoundingMode Source # | |
SBVRep Integer Source # | |
Defined in Grisette.Internal.SymPrim.Prim.Internal.Term | |
SBVRep Bool Source # | |
Defined in Grisette.Internal.SymPrim.Prim.Internal.Term | |
(KnownNat w, 1 <= w) => SBVRep (IntN w) Source # | |
Defined in Grisette.Internal.SymPrim.Prim.Internal.Term | |
(KnownNat w, 1 <= w) => SBVRep (WordN w) Source # | |
Defined in Grisette.Internal.SymPrim.Prim.Internal.Term | |
ValidFP eb sb => SBVRep (FP eb sb) Source # | |
Defined in Grisette.Internal.SymPrim.Prim.Internal.Term | |
(SupportedNonFuncPrim a, SupportedPrim b) => SBVRep (a --> b) Source # | |
Defined in Grisette.Internal.SymPrim.GeneralFun | |
(SupportedNonFuncPrim a, SupportedPrim b) => SBVRep (a =-> b) Source # | |
Defined in Grisette.Internal.SymPrim.TabularFun |
class MonadIO m => SBVFreshMonad m where Source #
Monads that supports generating sbv fresh variables.
Instances
MonadIO m => SBVFreshMonad (QueryT m) Source # | |
MonadIO m => SBVFreshMonad (SymbolicT m) Source # | |
SBVFreshMonad m => SBVFreshMonad (ReaderT r m) Source # | |
SBVFreshMonad m => SBVFreshMonad (StateT s m) Source # | |
SBVFreshMonad m => SBVFreshMonad (StateT s m) Source # | |
(SBVFreshMonad m, Monoid w) => SBVFreshMonad (WriterT w m) Source # | |
(SBVFreshMonad m, Monoid w) => SBVFreshMonad (WriterT w m) Source # | |
(SBVFreshMonad m, Monoid w) => SBVFreshMonad (RWST r w s m) Source # | |
(SBVFreshMonad m, Monoid w) => SBVFreshMonad (RWST r w s m) Source # | |
translateTypeError :: HasCallStack => Maybe String -> TypeRep a -> b Source #
Error message for unsupported types.
parseSMTModelResultError :: HasCallStack => TypeRep a -> ([([CV], CV)], CV) -> a Source #
Error message for failure to parse the SBV model result.
partitionCVArg :: forall a. SupportedNonFuncPrim a => [([CV], CV)] -> [(a, [([CV], CV)])] Source #
Partition the list of CVs for models for functions.
parseScalarSMTModelResult :: forall v r. (SatModel r, Typeable v) => (r -> v) -> ([([CV], CV)], CV) -> v Source #
Parse the scalar model result.
bvIsNonZeroFromGEq1 :: forall w r proxy. 1 <= w => proxy w -> (BVIsNonZero w => r) -> r Source #
Construct the BVIsNonZero
constraint from the proof that the width is
at least 1.
Partial evaluation
type PartialFun a b = a -> Maybe b Source #
A partial function from a to b.
type PartialRuleUnary a b = PartialFun (Term a) (Term b) Source #
A partial rule for unary operations.
type TotalRuleUnary a b = Term a -> Term b Source #
A total rule for unary operations.
type PartialRuleBinary a b c = Term a -> PartialFun (Term b) (Term c) Source #
A partial rule for binary operations.
totalize :: PartialFun a b -> (a -> b) -> a -> b Source #
Totalize a partial function with a fallback function.
totalize2 :: (a -> PartialFun b c) -> (a -> b -> c) -> a -> b -> c Source #
Totalize a binary partial function with a fallback function.
class UnaryPartialStrategy tag a b | tag a -> b where Source #
A strategy for partially evaluating unary operations.
unaryPartial :: forall tag a b. UnaryPartialStrategy tag a b => tag -> PartialRuleUnary a b Source #
Partially evaluate a unary operation.
class BinaryCommPartialStrategy tag a c | tag a -> c where Source #
A strategy for partially evaluating commutative binary operations.
class BinaryPartialStrategy tag a b c | tag a b -> c where Source #
A strategy for partially evaluating operations.
Minimal complete definition
extractora, extractorb, allConstantHandler, nonBinaryConstantHandler
Methods
extractora :: tag -> Term a -> Maybe a Source #
extractorb :: tag -> Term b -> Maybe b Source #
allConstantHandler :: tag -> a -> b -> Maybe (Term c) Source #
leftConstantHandler :: tag -> a -> Term b -> Maybe (Term c) Source #
default leftConstantHandler :: (a ~ b, BinaryCommPartialStrategy tag a c) => tag -> a -> Term b -> Maybe (Term c) Source #
rightConstantHandler :: tag -> Term a -> b -> Maybe (Term c) Source #
default rightConstantHandler :: (a ~ b, BinaryCommPartialStrategy tag a c) => tag -> Term a -> b -> Maybe (Term c) Source #
nonBinaryConstantHandler :: tag -> Term a -> Term b -> Maybe (Term c) Source #
binaryPartial :: forall tag a b c. BinaryPartialStrategy tag a b c => tag -> PartialRuleBinary a b c Source #
Partially evaluate a binary operation.
Unfold
unaryUnfoldOnce :: forall a b. SupportedPrim b => PartialRuleUnary a b -> TotalRuleUnary a b -> TotalRuleUnary a b Source #
Unfold a unary operation once.
binaryUnfoldOnce :: forall a b c. SupportedPrim c => PartialRuleBinary a b c -> TotalRuleBinary a b c -> TotalRuleBinary a b c Source #
Unfold a binary operation once.
generalUnaryUnfolded :: forall a b. (Typeable a, SupportedPrim b) => (a -> b) -> (Term a -> Term b) -> Term a -> Term b Source #
Unfold a unary operation once.
generalBinaryUnfolded :: forall a b c. (Typeable a, Typeable b, SupportedPrim c) => (a -> b -> c) -> (Term a -> Term b -> Term c) -> Term a -> Term b -> Term c Source #
Unfold a binary operation once.
bv
unsafePevalBVConcatTerm :: forall bv n1 n2 r. PEvalBVTerm bv => NatRepr n1 -> NatRepr n2 -> NatRepr r -> Term (bv n1) -> Term (bv n2) -> Term (bv r) Source #
Unsafe version of pevalBVConcatTerm
. Use NatRepr
for the bit-width
representations.
unsafePevalBVExtendTerm :: forall bv l r. PEvalBVTerm bv => NatRepr l -> NatRepr r -> Bool -> Term (bv l) -> Term (bv r) Source #
Unsafe version of pevalBVExtendTerm
. Use NatRepr
for the bit-width
representations.
unsafePevalBVSelectTerm :: forall bv n ix w. PEvalBVTerm bv => NatRepr n -> NatRepr ix -> NatRepr w -> Term (bv n) -> Term (bv w) Source #
Unsafe version of pevalBVSelectTerm
. Use NatRepr
for the bit-width
representations.
boolToBVTerm :: forall bv n. (PEvalBVTerm bv, KnownNat n, 1 <= n, forall m. (KnownNat m, 1 <= m) => SupportedPrim (bv m)) => Term Bool -> Term (bv n) Source #
Convert boolean term to a 1-bit bitvector term.
num
pevalDefaultAddNumTerm :: (PEvalNumTerm a, Eq a) => Term a -> Term a -> Term a Source #
Default partial evaluation of addition of numerical terms.
pevalDefaultNegNumTerm :: (PEvalNumTerm a, Eq a) => Term a -> Term a Source #
Default partial evaluation of negation of numerical terms.
pevalDefaultMulNumTerm :: (PEvalNumTerm a, Eq a) => Term a -> Term a -> Term a Source #
Default partial evaluation of multiplication of numerical terms.
pevalBitsAbsNumTerm :: (PEvalNumTerm a, Bits a) => Term a -> Term a Source #
Default partial evaluation of absolute value of finite-bit numerical terms.
doPevalNoOverflowAbsNumTerm :: PEvalNumTerm a => Term a -> Maybe (Term a) Source #
Partial evaluation of absolute value of numerical terms that does not overflow.
pevalGeneralSignumNumTerm :: PEvalNumTerm a => Term a -> Term a Source #
Default partial evaluation of signum of numerical terms.
doPevalNoOverflowSignumNumTerm :: PEvalNumTerm a => Term a -> Maybe (Term a) Source #
Partial evaluation of signum of numerical terms that does not overflow.
Orphan instances
NFData CachedInfo Source # | |
Methods rnf :: CachedInfo -> () # |