simple-ltl-0.1.0.0: A simple LTL checker

Safe HaskellSafe
LanguageHaskell2010

LTL

Description

This formulation of LTL is in positive normal form by construction, and trivially dualizable. This choice was driven by the following Coq formalization, showing that all the laws for LTL hold under a denotation from this structure into Coq's logic, over all finite lists:

https://github.com/jwiegley/constructive-ltl/blob/master/src/LTL.v#L69

Documentation

type LTL a = Machine a (Result a) Source #

data Machine a b Source #

Constructors

Stop b 
Delay (Machine a b) 
Ask (a -> Machine a b) 
Instances
Functor (Machine a) Source # 
Instance details

Defined in LTL

Methods

fmap :: (a0 -> b) -> Machine a a0 -> Machine a b #

(<$) :: a0 -> Machine a b -> Machine a a0 #

data Reason a Source #

Instances
Show a => Show (Reason a) Source # 
Instance details

Defined in LTL

Methods

showsPrec :: Int -> Reason a -> ShowS #

show :: Reason a -> String #

showList :: [Reason a] -> ShowS #

data Result a Source #

Constructors

Failure (Reason a) 
Success 
Instances
Show a => Show (Result a) Source # 
Instance details

Defined in LTL

Methods

showsPrec :: Int -> Result a -> ShowS #

show :: Result a -> String #

showList :: [Result a] -> ShowS #

step :: Machine a b -> a -> Machine a b Source #

run :: Machine a b -> [a] -> Machine a b Source #

neg :: LTL a -> LTL a Source #

accept :: (a -> LTL a) -> LTL a Source #

reject :: (a -> LTL a) -> LTL a Source #

and :: LTL a -> LTL a -> LTL a Source #

or :: LTL a -> LTL a -> LTL a Source #

next :: LTL a -> LTL a Source #

until :: LTL a -> LTL a -> LTL a Source #

weakUntil :: LTL a -> LTL a -> LTL a Source #

release :: LTL a -> LTL a -> LTL a Source #

strongRelease :: LTL a -> LTL a -> LTL a Source #

implies :: LTL a -> LTL a -> LTL a Source #

always :: LTL a -> LTL a Source #

test :: (a -> Bool) -> LTL a Source #

eq :: Eq a => a -> LTL a Source #