verifiable-expressions-0.4.0: An intermediate language for Hoare logic style verification.

Safe HaskellNone
LanguageHaskell2010

Language.While.Syntax

Documentation

prettys1Binop :: Pretty1 t => Int -> String -> Int -> t a -> t b -> ShowS Source #

data WhileVar l a where Source #

Constructors

WhileVar :: l -> WhileVar l AlgReal 

Instances

VerifiableVar (WhileVar String) Source # 
Pretty l => Pretty1 * (WhileVar l) Source # 

Methods

pretty1 :: t a -> String Source #

prettys1Prec :: Int -> t a -> ShowS Source #

Num (WhileExpr l AlgReal) Source # 
IsString s => IsString (WhileExpr s AlgReal) Source # 
type VarKey (WhileVar String) Source # 
type VarSym (WhileVar String) Source # 
type VarEnv (WhileVar String) Source # 
type VarEnv (WhileVar String) = ()

data Command l a Source #

Constructors

CAnn a (Command l a) 
CSeq (Command l a) (Command l a) 
CSkip 
CAssign l (WhileExpr l AlgReal) 
CIf (WhileExpr l Bool) (Command l a) (Command l a) 
CWhile (WhileExpr l Bool) (Command l a) 

Instances

(Pretty l, Pretty a) => Pretty (Command l a) Source # 

data StepResult a Source #

Constructors

Terminated 
Failed 
Progress a 

Instances

Functor StepResult Source # 

Methods

fmap :: (a -> b) -> StepResult a -> StepResult b #

(<$) :: a -> StepResult b -> StepResult a #

evalWhileExpr :: Applicative f => (forall x. WhileVar l x -> f x) -> WhileExpr l a -> f a Source #

lookupVar :: Ord l => Map l AlgReal -> WhileVar l a -> Maybe a Source #