Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell98 |
This module has the types for representing terms in the refinement logic.
Synopsis
- newtype SymConst = SL Text
- data Constant
- data Bop
- data Brel
- data Expr
- = ESym !SymConst
- | ECon !Constant
- | EVar !Symbol
- | EApp !Expr !Expr
- | ENeg !Expr
- | EBin !Bop !Expr !Expr
- | EIte !Expr !Expr !Expr
- | ECst !Expr !Sort
- | ELam !(Symbol, Sort) !Expr
- | ETApp !Expr !Sort
- | ETAbs !Expr !Symbol
- | PAnd ![Expr]
- | POr ![Expr]
- | PNot !Expr
- | PImp !Expr !Expr
- | PIff !Expr !Expr
- | PAtom !Brel !Expr !Expr
- | PKVar !KVar !Subst
- | PAll ![(Symbol, Sort)] !Expr
- | PExist ![(Symbol, Sort)] !Expr
- | PGrad !KVar !Subst !GradInfo !Expr
- | ECoerc !Sort !Sort !Expr
- type Pred = Expr
- data GradInfo = GradInfo {}
- pattern PTrue :: Expr
- pattern PTop :: Expr
- pattern PFalse :: Expr
- pattern EBot :: Expr
- pattern ETimes :: Expr -> Expr -> Expr
- pattern ERTimes :: Expr -> Expr -> Expr
- pattern EDiv :: Expr -> Expr -> Expr
- pattern ERDiv :: Expr -> Expr -> Expr
- pattern EEq :: Expr -> Expr -> Expr
- newtype KVar = KV {}
- newtype Subst = Su (HashMap Symbol Expr)
- data KVSub = KVS {}
- newtype Reft = Reft (Symbol, Expr)
- data SortedReft = RR {}
- eVar :: Symbolic a => a -> Expr
- elit :: Located Symbol -> Sort -> Expr
- eProp :: Symbolic a => a -> Expr
- conj :: [Pred] -> Pred
- pAnd :: ListNE Pred -> Pred
- pOr :: ListNE Pred -> Pred
- pIte :: Pred -> Expr -> Expr -> Expr
- pAndNoDedup :: ListNE Pred -> Pred
- (&.&) :: Pred -> Pred -> Pred
- (|.|) :: Pred -> Pred -> Pred
- pExist :: [(Symbol, Sort)] -> Pred -> Pred
- mkEApp :: LocSymbol -> [Expr] -> Expr
- mkProp :: Expr -> Pred
- intKvar :: Integer -> KVar
- vv_ :: Symbol
- class Expression a where
- class Predicate a where
- class Subable a where
- class (Monoid r, Subable r) => Reftable r where
- reft :: Symbol -> Expr -> Reft
- trueSortedReft :: Sort -> SortedReft
- trueReft :: Reft
- falseReft :: Reft
- exprReft :: Expression a => a -> Reft
- notExprReft :: Expression a => a -> Reft
- uexprReft :: Expression a => a -> Reft
- symbolReft :: Symbolic a => a -> Reft
- usymbolReft :: Symbolic a => a -> Reft
- propReft :: Predicate a => a -> Reft
- predReft :: Predicate a => a -> Reft
- reftPred :: Reft -> Expr
- reftBind :: Reft -> Symbol
- isFunctionSortedReft :: SortedReft -> Bool
- functionSort :: Sort -> Maybe ([Int], [Sort], Sort)
- isNonTrivial :: Reftable r => r -> Bool
- isContraPred :: Expr -> Bool
- isTautoPred :: Expr -> Bool
- isSingletonExpr :: Symbol -> Expr -> Maybe Expr
- isSingletonReft :: Reft -> Maybe Expr
- isFalse :: Falseable a => a -> Bool
- flattenRefas :: [Expr] -> [Expr]
- conjuncts :: Expr -> [Expr]
- concConjuncts :: Expr -> [Expr]
- dropECst :: Expr -> Expr
- eApps :: Expr -> [Expr] -> Expr
- eAppC :: Sort -> Expr -> Expr -> Expr
- eCst :: Expr -> Sort -> Expr
- exprKVars :: Expr -> HashMap KVar [Subst]
- exprSymbolsSet :: Expr -> HashSet Symbol
- splitEApp :: Expr -> (Expr, [Expr])
- splitEAppThroughECst :: Expr -> (Expr, [Expr])
- splitPAnd :: Expr -> [Expr]
- reftConjuncts :: Reft -> [Reft]
- sortedReftSymbols :: SortedReft -> HashSet Symbol
- substSortInExpr :: (Symbol -> Sort) -> Expr -> Expr
- mapPredReft :: (Expr -> Expr) -> Reft -> Reft
- onEverySubexpr :: (Expr -> Expr) -> Expr -> Expr
- pprintReft :: Tidy -> Reft -> Doc
- debruijnIndex :: Expr -> Int
- pGAnds :: [Expr] -> Expr
- pGAnd :: Expr -> Expr -> Expr
- class HasGradual a where
- srcGradInfo :: SourcePos -> GradInfo
Representing Terms
Expressions ---------------------------------------------------------------
Uninterpreted constants that are embedded as "constant symbol : Str"
Instances
Data SymConst Source # | |
Defined in Language.Fixpoint.Types.Refinements gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SymConst -> c SymConst # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SymConst # toConstr :: SymConst -> Constr # dataTypeOf :: SymConst -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c SymConst) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SymConst) # gmapT :: (forall b. Data b => b -> b) -> SymConst -> SymConst # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SymConst -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SymConst -> r # gmapQ :: (forall d. Data d => d -> u) -> SymConst -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> SymConst -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> SymConst -> m SymConst # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SymConst -> m SymConst # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SymConst -> m SymConst # | |
Generic SymConst Source # | |
Show SymConst Source # | |
Binary SymConst Source # | |
NFData SymConst Source # | |
Defined in Language.Fixpoint.Types.Refinements | |
Eq SymConst Source # | |
Ord SymConst Source # | |
Defined in Language.Fixpoint.Types.Refinements | |
Hashable SymConst Source # | |
Defined in Language.Fixpoint.Types.Refinements | |
SMTLIB2 SymConst Source # | |
Symbolic SymConst Source # | String Constants ---------------------------------------------------------- Replace all symbol-representations-of-string-literals with string-literal Used to transform parsed output from fixpoint back into fq. |
Fixpoint SymConst Source # | |
PPrint SymConst Source # | |
Defined in Language.Fixpoint.Types.Refinements | |
Store SymConst Source # | |
type Rep SymConst Source # | |
Defined in Language.Fixpoint.Types.Refinements |
Instances
Instances
Data Bop Source # | |
Defined in Language.Fixpoint.Types.Refinements gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Bop -> c Bop # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Bop # dataTypeOf :: Bop -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Bop) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Bop) # gmapT :: (forall b. Data b => b -> b) -> Bop -> Bop # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Bop -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Bop -> r # gmapQ :: (forall d. Data d => d -> u) -> Bop -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Bop -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Bop -> m Bop # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Bop -> m Bop # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Bop -> m Bop # | |
Generic Bop Source # | |
Show Bop Source # | |
Binary Bop Source # | |
NFData Bop Source # | |
Defined in Language.Fixpoint.Types.Refinements | |
Eq Bop Source # | |
Ord Bop Source # | |
Hashable Bop Source # | |
Defined in Language.Fixpoint.Types.Refinements | |
SMTLIB2 Bop Source # | |
Fixpoint Bop Source # | |
PPrint Bop Source # | |
Defined in Language.Fixpoint.Types.Refinements | |
Store Bop Source # | |
type Rep Bop Source # | |
Defined in Language.Fixpoint.Types.Refinements type Rep Bop = D1 ('MetaData "Bop" "Language.Fixpoint.Types.Refinements" "liquid-fixpoint-0.9.2.5-8VOJ4a5jXPy7nyhLFTxkOW" 'False) ((C1 ('MetaCons "Plus" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Minus" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Times" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "Div" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Mod" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "RTimes" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "RDiv" 'PrefixI 'False) (U1 :: Type -> Type)))) |
Instances
Data Brel Source # | |
Defined in Language.Fixpoint.Types.Refinements gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Brel -> c Brel # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Brel # dataTypeOf :: Brel -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Brel) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Brel) # gmapT :: (forall b. Data b => b -> b) -> Brel -> Brel # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Brel -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Brel -> r # gmapQ :: (forall d. Data d => d -> u) -> Brel -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Brel -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Brel -> m Brel # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Brel -> m Brel # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Brel -> m Brel # | |
Generic Brel Source # | |
Show Brel Source # | |
Binary Brel Source # | |
NFData Brel Source # | |
Defined in Language.Fixpoint.Types.Refinements | |
Eq Brel Source # | |
Ord Brel Source # | |
Hashable Brel Source # | |
Defined in Language.Fixpoint.Types.Refinements | |
SMTLIB2 Brel Source # | |
Fixpoint Brel Source # | |
PPrint Brel Source # | |
Defined in Language.Fixpoint.Types.Refinements | |
Store Brel Source # | |
type Rep Brel Source # | |
Defined in Language.Fixpoint.Types.Refinements type Rep Brel = D1 ('MetaData "Brel" "Language.Fixpoint.Types.Refinements" "liquid-fixpoint-0.9.2.5-8VOJ4a5jXPy7nyhLFTxkOW" 'False) (((C1 ('MetaCons "Eq" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Ne" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Gt" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Ge" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "Lt" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Le" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Ueq" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Une" 'PrefixI 'False) (U1 :: Type -> Type)))) |
ESym !SymConst | |
ECon !Constant | |
EVar !Symbol | |
EApp !Expr !Expr | |
ENeg !Expr | |
EBin !Bop !Expr !Expr | |
EIte !Expr !Expr !Expr | |
ECst !Expr !Sort | |
ELam !(Symbol, Sort) !Expr | |
ETApp !Expr !Sort | |
ETAbs !Expr !Symbol | |
PAnd ![Expr] | |
POr ![Expr] | |
PNot !Expr | |
PImp !Expr !Expr | |
PIff !Expr !Expr | |
PAtom !Brel !Expr !Expr | |
PKVar !KVar !Subst | |
PAll ![(Symbol, Sort)] !Expr | |
PExist ![(Symbol, Sort)] !Expr | |
PGrad !KVar !Subst !GradInfo !Expr | |
ECoerc !Sort !Sort !Expr |
Instances
Instances
Data GradInfo Source # | |
Defined in Language.Fixpoint.Types.Refinements gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> GradInfo -> c GradInfo # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c GradInfo # toConstr :: GradInfo -> Constr # dataTypeOf :: GradInfo -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c GradInfo) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c GradInfo) # gmapT :: (forall b. Data b => b -> b) -> GradInfo -> GradInfo # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> GradInfo -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> GradInfo -> r # gmapQ :: (forall d. Data d => d -> u) -> GradInfo -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> GradInfo -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> GradInfo -> m GradInfo # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> GradInfo -> m GradInfo # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> GradInfo -> m GradInfo # | |
Generic GradInfo Source # | |
Show GradInfo Source # | |
Binary GradInfo Source # | |
NFData GradInfo Source # | |
Defined in Language.Fixpoint.Types.Refinements | |
Eq GradInfo Source # | |
Ord GradInfo Source # | |
Defined in Language.Fixpoint.Types.Refinements | |
Hashable GradInfo Source # | |
Defined in Language.Fixpoint.Types.Refinements | |
Store GradInfo Source # | |
type Rep GradInfo Source # | |
Defined in Language.Fixpoint.Types.Refinements type Rep GradInfo = D1 ('MetaData "GradInfo" "Language.Fixpoint.Types.Refinements" "liquid-fixpoint-0.9.2.5-8VOJ4a5jXPy7nyhLFTxkOW" 'False) (C1 ('MetaCons "GradInfo" 'PrefixI 'True) (S1 ('MetaSel ('Just "gsrc") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SrcSpan) :*: S1 ('MetaSel ('Just "gused") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe SrcSpan)))) |
Kvars ---------------------------------------------------------------------
Instances
Data KVar Source # | |
Defined in Language.Fixpoint.Types.Refinements gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> KVar -> c KVar # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c KVar # dataTypeOf :: KVar -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c KVar) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c KVar) # gmapT :: (forall b. Data b => b -> b) -> KVar -> KVar # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> KVar -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> KVar -> r # gmapQ :: (forall d. Data d => d -> u) -> KVar -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> KVar -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> KVar -> m KVar # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> KVar -> m KVar # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> KVar -> m KVar # | |
IsString KVar Source # | |
Defined in Language.Fixpoint.Types.Refinements fromString :: String -> KVar # | |
Generic KVar Source # | |
Show KVar Source # | |
Binary KVar Source # | |
NFData KVar Source # | |
Defined in Language.Fixpoint.Types.Refinements | |
Eq KVar Source # | |
Ord KVar Source # | |
Hashable KVar Source # | |
Defined in Language.Fixpoint.Types.Refinements | |
Fixpoint KVar Source # | |
PPrint KVar Source # | |
Defined in Language.Fixpoint.Types.Refinements | |
Store KVar Source # | |
Inputable (FixResult Integer, FixSolution) Source # | |
type Rep KVar Source # | |
Defined in Language.Fixpoint.Types.Refinements |
Substitutions -------------------------------------------------------------
Instances
Data Subst Source # | |
Defined in Language.Fixpoint.Types.Refinements gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Subst -> c Subst # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Subst # dataTypeOf :: Subst -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Subst) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Subst) # gmapT :: (forall b. Data b => b -> b) -> Subst -> Subst # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Subst -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Subst -> r # gmapQ :: (forall d. Data d => d -> u) -> Subst -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Subst -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Subst -> m Subst # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Subst -> m Subst # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Subst -> m Subst # | |
Monoid Subst Source # | |
Semigroup Subst Source # | |
Generic Subst Source # | |
Show Subst Source # | |
Binary Subst Source # | |
NFData Subst Source # | |
Defined in Language.Fixpoint.Types.Refinements | |
Eq Subst Source # | |
Ord Subst Source # | |
Hashable Subst Source # | |
Defined in Language.Fixpoint.Types.Refinements | |
Fixpoint Subst Source # | |
PPrint Subst Source # | |
Defined in Language.Fixpoint.Types.Refinements | |
Store Subst Source # | |
type Rep Subst Source # | |
Defined in Language.Fixpoint.Types.Refinements |
Instances
Data KVSub Source # | |
Defined in Language.Fixpoint.Types.Refinements gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> KVSub -> c KVSub # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c KVSub # dataTypeOf :: KVSub -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c KVSub) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c KVSub) # gmapT :: (forall b. Data b => b -> b) -> KVSub -> KVSub # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> KVSub -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> KVSub -> r # gmapQ :: (forall d. Data d => d -> u) -> KVSub -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> KVSub -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> KVSub -> m KVSub # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> KVSub -> m KVSub # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> KVSub -> m KVSub # | |
Generic KVSub Source # | |
Show KVSub Source # | |
Eq KVSub Source # | |
PPrint KVSub Source # | |
Defined in Language.Fixpoint.Types.Refinements | |
type Rep KVSub Source # | |
Defined in Language.Fixpoint.Types.Refinements type Rep KVSub = D1 ('MetaData "KVSub" "Language.Fixpoint.Types.Refinements" "liquid-fixpoint-0.9.2.5-8VOJ4a5jXPy7nyhLFTxkOW" 'False) (C1 ('MetaCons "KVS" 'PrefixI 'True) ((S1 ('MetaSel ('Just "ksuVV") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Symbol) :*: S1 ('MetaSel ('Just "ksuSort") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Sort)) :*: (S1 ('MetaSel ('Just "ksuKVar") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 KVar) :*: S1 ('MetaSel ('Just "ksuSubst") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Subst)))) |
Parsed refinement of Symbol
as Expr
e.g. in '{v: _ | e }' v is the Symbol
and e the Expr
Instances
data SortedReft Source #
Instances
Constructing Terms
Generalizing Embedding with Typeclasses
class Expression a where Source #
Generalizing Symbol, Expression, Predicate into Classes -----------
Values that can be viewed as Constants
Values that can be viewed as Expressions
Instances
Expression Symbol Source # | The symbol may be an encoding of a SymConst. |
Expression Expr Source # | |
Expression Reft Source # | |
Expression SortedReft Source # | |
Defined in Language.Fixpoint.Types.Refinements expr :: SortedReft -> Expr Source # | |
Expression Text Source # | |
Expression Integer Source # | |
Expression Int Source # | |
Expression a => Expression (Located a) Source # | |
Expression (Symbol, SortedReft) Source # | |
Defined in Language.Fixpoint.Types.Substitutions |
class Predicate a where Source #
Values that can be viewed as Predicates
class Subable a where Source #
Class Predicates for Valid Refinements -----------------------------
:: a | |
-> [Symbol] | free symbols of a |
substa :: (Symbol -> Symbol) -> a -> a Source #
substf :: (Symbol -> Expr) -> a -> a Source #
Instances
Subable Pred Source # | |
Subable Equation Source # | |
Defined in Language.Fixpoint.Types.Constraints | |
Subable Qualifier Source # | |
Defined in Language.Fixpoint.Types.Constraints | |
Subable Symbol Source # | |
Subable Expr Source # | |
Subable Reft Source # | |
Subable SortedReft Source # | |
Defined in Language.Fixpoint.Types.Substitutions syms :: SortedReft -> [Symbol] Source # substa :: (Symbol -> Symbol) -> SortedReft -> SortedReft Source # substf :: (Symbol -> Expr) -> SortedReft -> SortedReft Source # subst :: Subst -> SortedReft -> SortedReft Source # subst1 :: SortedReft -> (Symbol, Expr) -> SortedReft Source # | |
Subable () Source # | |
Subable (Bind a) Source # | |
Subable a => Subable (Located a) Source # | |
Defined in Language.Fixpoint.Types.Refinements | |
Subable a => Subable (Maybe a) Source # | |
Defined in Language.Fixpoint.Types.Substitutions | |
Subable a => Subable [a] Source # | |
Subable a => Subable (HashMap k a) Source # | |
Defined in Language.Fixpoint.Types.Substitutions | |
(Subable a, Subable b) => Subable (a, b) Source # | |
class (Monoid r, Subable r) => Reftable r where Source #
Instances
Reftable Reft Source # | |
Defined in Language.Fixpoint.Types.Substitutions | |
Reftable SortedReft Source # | |
Defined in Language.Fixpoint.Types.Substitutions isTauto :: SortedReft -> Bool Source # ppTy :: SortedReft -> Doc -> Doc Source # top :: SortedReft -> SortedReft Source # bot :: SortedReft -> SortedReft Source # meet :: SortedReft -> SortedReft -> SortedReft Source # toReft :: SortedReft -> Reft Source # ofReft :: Reft -> SortedReft Source # params :: SortedReft -> [Symbol] Source # | |
Reftable () Source # | |
Constructors
trueSortedReft :: Sort -> SortedReft Source #
exprReft :: Expression a => a -> Reft Source #
notExprReft :: Expression a => a -> Reft Source #
uexprReft :: Expression a => a -> Reft Source #
symbolReft :: Symbolic a => a -> Reft Source #
Generally Useful Refinements --------------------------
usymbolReft :: Symbolic a => a -> Reft Source #
Predicates
isFunctionSortedReft :: SortedReft -> Bool Source #
Refinements ----------------------------------------------
isNonTrivial :: Reftable r => r -> Bool Source #
isContraPred :: Expr -> Bool Source #
isTautoPred :: Expr -> Bool Source #
isSingletonReft :: Reft -> Maybe Expr Source #
Predicates ----------------------------------------------------------------
Destructing
flattenRefas :: [Expr] -> [Expr] Source #
concConjuncts :: Expr -> [Expr] Source #
reftConjuncts :: Reft -> [Reft] Source #
Transforming
debruijnIndex :: Expr -> Int Source #
Gradual Type Manipulation
class HasGradual a where Source #
Instances
HasGradual Expr Source # | |
HasGradual Reft Source # | |
HasGradual SortedReft Source # | |
Defined in Language.Fixpoint.Types.Refinements isGradual :: SortedReft -> Bool Source # gVars :: SortedReft -> [KVar] Source # ungrad :: SortedReft -> SortedReft Source # | |
HasGradual (WfC a) Source # | |
HasGradual (GInfo c a) Source # | |
srcGradInfo :: SourcePos -> GradInfo Source #