| Safe Haskell | None |
|---|---|
| Language | Haskell98 |
Language.Fixpoint.Types.Solutions
Contents
Description
This module contains the top-level SOLUTION data types, including various indices used for solving.
Synopsis
- type Solution = Sol QBind
- data Sol a = Sol {}
- type CMap a = HashMap SubcId a
- type Hyp = ListNE Cube
- data Cube = Cube {}
- newtype QBind = QB [EQual]
- data EQual = EQL {}
- eQual :: Qualifier -> [Symbol] -> EQual
- trueEqual :: EQual
- qbExprs :: QBind -> [Expr]
- type Cand a = [(Expr, a)]
- update :: Sol QBind -> [(KVar, QBind)] -> (Bool, Sol QBind)
- lookupQBind :: Sol QBind -> KVar -> QBind
- lookup :: Sol QBind -> KVar -> Either Hyp QBind
- qb :: [EQual] -> QBind
- qbPreds :: Subst -> QBind -> [(Pred, EQual)]
- qbFilter :: (EQual -> Bool) -> QBind -> QBind
- qbFilterM :: Monad m => (EQual -> m Bool) -> QBind -> m QBind
- result :: Sol QBind -> HashMap KVar Expr
- data Index = FastIdx {}
- data KIndex = KIndex {}
- data BindPred = BP {}
- data BIndex
Solution tables
type Solution = Sol QBind Source #
The Solution data type --------------------------------------------------
A Sol contains the various indices needed to compute a solution,
in particular, to compute lhsPred for any given constraint.
Constructors
| Sol | |
Instances
Solution elements
type Hyp = ListNE Cube Source #
A Cube is a single constraint defining a KVar ---------------------------
Constructors
| Cube | |
Instances
| Generic Cube Source # | |||||
Defined in Language.Fixpoint.Types.Solutions Associated Types
| |||||
| Show Cube Source # | |||||
| NFData Cube Source # | |||||
Defined in Language.Fixpoint.Types.Solutions | |||||
| PPrint Cube Source # | |||||
Defined in Language.Fixpoint.Types.Solutions | |||||
| type Rep Cube Source # | |||||
Defined in Language.Fixpoint.Types.Solutions type Rep Cube = D1 ('MetaData "Cube" "Language.Fixpoint.Types.Solutions" "liquid-fixpoint-0.9.6.3.4-CmH5CYTDh7gFBJNG3w2uNw" 'False) (C1 ('MetaCons "Cube" 'PrefixI 'True) ((S1 ('MetaSel ('Just "cuBinds") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 IBindEnv) :*: S1 ('MetaSel ('Just "cuSubst") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Subst)) :*: (S1 ('MetaSel ('Just "cuId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SubcId) :*: S1 ('MetaSel ('Just "cuTag") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Tag)))) | |||||
Instances
| Data QBind Source # | |||||
Defined in Language.Fixpoint.Types.Solutions Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> QBind -> c QBind # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c QBind # dataTypeOf :: QBind -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c QBind) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c QBind) # gmapT :: (forall b. Data b => b -> b) -> QBind -> QBind # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> QBind -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> QBind -> r # gmapQ :: (forall d. Data d => d -> u) -> QBind -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> QBind -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> QBind -> m QBind # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> QBind -> m QBind # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> QBind -> m QBind # | |||||
| Generic QBind Source # | |||||
Defined in Language.Fixpoint.Types.Solutions Associated Types
| |||||
| Show QBind Source # | |||||
| NFData QBind Source # | |||||
Defined in Language.Fixpoint.Types.Solutions | |||||
| Eq QBind Source # | |||||
| PPrint QBind Source # | |||||
Defined in Language.Fixpoint.Types.Solutions | |||||
| type Rep QBind Source # | |||||
Defined in Language.Fixpoint.Types.Solutions | |||||
Instantiated Qualifiers ---------------------------------------------------
Constructors
| EQL | |
Instances
| Data EQual Source # | |||||
Defined in Language.Fixpoint.Types.Solutions Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> EQual -> c EQual # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c EQual # dataTypeOf :: EQual -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c EQual) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c EQual) # gmapT :: (forall b. Data b => b -> b) -> EQual -> EQual # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> EQual -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> EQual -> r # gmapQ :: (forall d. Data d => d -> u) -> EQual -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> EQual -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> EQual -> m EQual # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> EQual -> m EQual # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> EQual -> m EQual # | |||||
| Generic EQual Source # | |||||
Defined in Language.Fixpoint.Types.Solutions Associated Types
| |||||
| Show EQual Source # | |||||
| NFData EQual Source # | |||||
Defined in Language.Fixpoint.Types.Solutions | |||||
| Eq EQual Source # | |||||
| PPrint EQual Source # | |||||
Defined in Language.Fixpoint.Types.Solutions | |||||
| Loc EQual Source # | |||||
| type Rep EQual Source # | |||||
Defined in Language.Fixpoint.Types.Solutions type Rep EQual = D1 ('MetaData "EQual" "Language.Fixpoint.Types.Solutions" "liquid-fixpoint-0.9.6.3.4-CmH5CYTDh7gFBJNG3w2uNw" 'False) (C1 ('MetaCons "EQL" 'PrefixI 'True) (S1 ('MetaSel ('Just "eqQual") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Qualifier) :*: (S1 ('MetaSel ('Just "eqPred") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Expr) :*: S1 ('MetaSel ('Just "_eqArgs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [Expr])))) | |||||
Equal elements
Solution Candidates (move to SolverMonad?)
Update
update :: Sol QBind -> [(KVar, QBind)] -> (Bool, Sol QBind) Source #
Update Solution
update s kqs sets in s each KVar in kqs to the corresponding QBind.
Yields a pair (b, s') where b is true if the mapping of any KVar was
changed.
Precondition: kqs contains no duplicate KVars.
Lookup
lookupQBind :: Sol QBind -> KVar -> QBind Source #
Read / Write Solution at KVar ---------------------------------------------
Manipulating QBind
Conversion for client
Fast Solver (DEPRECATED as unsound)
A Index is a suitably indexed version of the cosntraints that lets us 1. CREATE a monolithic "background formula" representing all constraints, 2. ASSERT each lhs via bits for the subc-id and formulas for dependent cut KVars
Constructors
| FastIdx | |
Fields
| |
A KIndex uniquely identifies each *use* of a KVar in an (LHS) binder
Instances
| Generic KIndex Source # | |||||
Defined in Language.Fixpoint.Types.Solutions Associated Types
| |||||
| Show KIndex Source # | |||||
| Eq KIndex Source # | |||||
| Ord KIndex Source # | |||||
| Hashable KIndex Source # | |||||
Defined in Language.Fixpoint.Types.Solutions | |||||
| PPrint KIndex Source # | |||||
Defined in Language.Fixpoint.Types.Solutions | |||||
| type Rep KIndex Source # | |||||
Defined in Language.Fixpoint.Types.Solutions type Rep KIndex = D1 ('MetaData "KIndex" "Language.Fixpoint.Types.Solutions" "liquid-fixpoint-0.9.6.3.4-CmH5CYTDh7gFBJNG3w2uNw" 'False) (C1 ('MetaCons "KIndex" 'PrefixI 'True) (S1 ('MetaSel ('Just "kiBIndex") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 BindId) :*: (S1 ('MetaSel ('Just "kiPos") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Just "kiKVar") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 KVar)))) | |||||
A BIndex is created for each LHS Bind or RHS constraint
Instances
| Generic BIndex Source # | |||||
Defined in Language.Fixpoint.Types.Solutions Associated Types
| |||||
| Show BIndex Source # | |||||
| Eq BIndex Source # | |||||
| Ord BIndex Source # | |||||
| Hashable BIndex Source # | |||||
Defined in Language.Fixpoint.Types.Solutions | |||||
| PPrint BIndex Source # | |||||
Defined in Language.Fixpoint.Types.Solutions | |||||
| type Rep BIndex Source # | |||||
Defined in Language.Fixpoint.Types.Solutions type Rep BIndex = D1 ('MetaData "BIndex" "Language.Fixpoint.Types.Solutions" "liquid-fixpoint-0.9.6.3.4-CmH5CYTDh7gFBJNG3w2uNw" 'False) (C1 ('MetaCons "Root" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Bind" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 BindId)) :+: C1 ('MetaCons "Cstr" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SubcId)))) | |||||