liquid-fixpoint-0.9.0.2.1: Predicate Abstraction-based Horn-Clause/Implication Constraint Solver
Safe HaskellSafe-Inferred
LanguageHaskell98

Language.Fixpoint.Solver.Rewrite

Synopsis

Documentation

getRewrite :: OCAlgebra oc Expr IO -> RewriteArgs -> oc -> SubExpr -> AutoRewrite -> MaybeT IO ((Expr, Expr), Expr, oc) Source #

Yields the result of rewriting an expression with an autorewrite equation.

Yields nothing if:

  • The result of the rewrite is identical to the original expression
  • Any of the arguments of the autorewrite has a refinement type which is not satisfied in the current context.

unify :: [Symbol] -> Expr -> Expr -> Maybe Subst Source #

unify vs template e = Just su yields a substitution su such that subst su template == e

Moreover, su is constraint to only substitute variables in vs.

Yields Nothing if no substitution exists.

ordConstraints :: RESTOrdering -> (Handle, Handle) -> OCAlgebra OCType RuntimeTerm IO Source #

convert :: Expr -> RuntimeTerm Source #

passesTerminationCheck :: OCAlgebra oc a IO -> RewriteArgs -> oc -> IO Bool Source #

type SubExpr = (Expr, Expr -> Expr) Source #

(e, f) asserts that e is a subexpression of f e

data TermOrigin Source #

Constructors

PLE 
RW 

data OCType Source #

Instances

Instances details
Generic OCType Source # 
Instance details

Defined in Language.Fixpoint.Solver.Rewrite

Associated Types

type Rep OCType :: Type -> Type #

Methods

from :: OCType -> Rep OCType x #

to :: Rep OCType x -> OCType #

Show OCType Source # 
Instance details

Defined in Language.Fixpoint.Solver.Rewrite

Eq OCType Source # 
Instance details

Defined in Language.Fixpoint.Solver.Rewrite

Methods

(==) :: OCType -> OCType -> Bool #

(/=) :: OCType -> OCType -> Bool #

Hashable OCType Source # 
Instance details

Defined in Language.Fixpoint.Solver.Rewrite

Methods

hashWithSalt :: Int -> OCType -> Int #

hash :: OCType -> Int #

type Rep OCType Source # 
Instance details

Defined in Language.Fixpoint.Solver.Rewrite

type Rep OCType = D1 ('MetaData "OCType" "Language.Fixpoint.Solver.Rewrite" "liquid-fixpoint-0.9.0.2.1-GsxNcg91pufGtKM5ikXQaF" 'False) ((C1 ('MetaCons "RPO" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ConstraintsADT Op))) :+: C1 ('MetaCons "LPO" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ConstraintsADT Op)))) :+: (C1 ('MetaCons "KBO" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (SMTExpr Bool))) :+: C1 ('MetaCons "Fuel" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int))))

data RESTOrdering Source #

Instances

Instances details
Data RESTOrdering Source # 
Instance details

Defined in Language.Fixpoint.Types.Config

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> RESTOrdering -> c RESTOrdering #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c RESTOrdering #

toConstr :: RESTOrdering -> Constr #

dataTypeOf :: RESTOrdering -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c RESTOrdering) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c RESTOrdering) #

gmapT :: (forall b. Data b => b -> b) -> RESTOrdering -> RESTOrdering #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> RESTOrdering -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> RESTOrdering -> r #

gmapQ :: (forall d. Data d => d -> u) -> RESTOrdering -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> RESTOrdering -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> RESTOrdering -> m RESTOrdering #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> RESTOrdering -> m RESTOrdering #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> RESTOrdering -> m RESTOrdering #

Generic RESTOrdering Source # 
Instance details

Defined in Language.Fixpoint.Types.Config

Associated Types

type Rep RESTOrdering :: Type -> Type #

Read RESTOrdering Source # 
Instance details

Defined in Language.Fixpoint.Types.Config

Show RESTOrdering Source # 
Instance details

Defined in Language.Fixpoint.Types.Config

Default RESTOrdering Source # 
Instance details

Defined in Language.Fixpoint.Types.Config

Methods

def :: RESTOrdering #

Eq RESTOrdering Source # 
Instance details

Defined in Language.Fixpoint.Types.Config

type Rep RESTOrdering Source # 
Instance details

Defined in Language.Fixpoint.Types.Config

type Rep RESTOrdering = D1 ('MetaData "RESTOrdering" "Language.Fixpoint.Types.Config" "liquid-fixpoint-0.9.0.2.1-GsxNcg91pufGtKM5ikXQaF" 'False) ((C1 ('MetaCons "RESTKBO" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "RESTLPO" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "RESTRPO" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "RESTFuel" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int))))