dunai-test-0.9.2: Testing library for Dunai
Safe HaskellSafe-Inferred
LanguageHaskell2010

FRP.Dunai.LTLPast

Description

Past-time LTL using MSFs.

This module provides ways of defining past-, discrete-time temporal predicates with MSFs.

There are two ways of doing so: piping the results of Boolean-carrying MSFs into other MSFs (Past-time LTL using MSFs), or wrapping MSFs into other MSFs (Past-time LTL as MSF combinators).

Synopsis

Past-time linear temporal logic using MSFs.

Propositional MSFs

andSF :: Monad m => MSF m (Bool, Bool) Bool Source #

Output True when both inputs are True.

orSF :: Monad m => MSF m (Bool, Bool) Bool Source #

Output True when at least one input is True.

notSF :: Monad m => MSF m Bool Bool Source #

Output True when the input is False.

impliesSF :: Monad m => MSF m (Bool, Bool) Bool Source #

Output True when the second input is True or the first one is False.

Temporal MSFs

sofarSF :: Monad m => MSF m Bool Bool Source #

Output True when every input up until the current time has been True.

This corresponds to Historically, or the past-time version of Globally or Always.

everSF :: Monad m => MSF m Bool Bool Source #

Output True when at least one input up until the current time has been True.

This corresponds to Ever, or the past-time version of Eventually.

untilSF :: (Functor m, Monad m) => MSF m (Bool, Bool) Bool Source #

Output True if the first element has always been True, or the second has been True ever since the first one became False.

lastSF :: Monad m => MSF m Bool Bool Source #

Output True if the input was True at the last time.

False at time zero.

Past-time linear temporal logic as MSF combinators.

type SPred m a = MSF m a Bool Source #

A signal predicate is an MSF whose output is a Boolean value.

Propositional MSFs

notSF' :: Monad m => SPred m a -> SPred m a Source #

Output True at times when the input is False.

andSF' :: Monad m => SPred m a -> SPred m a -> SPred m a Source #

Output True at times when both inputs are True.

orSF' :: Monad m => SPred m a -> SPred m a -> SPred m a Source #

Output True at times when at least one of the inputs is True.

implySF' :: Monad m => SPred m a -> SPred m a -> SPred m a Source #

Output True at times when the first input stream is False or the second one is True.

Temporal MSFs

history' :: Monad m => SPred m a -> SPred m a Source #

Output True at a time if the input has always been True up until that time.

This corresponds to Historically, or the past-time version of Globally or Always.

ever' :: Monad m => SPred m a -> SPred m a Source #

Output True at a time if the input has ever been True up until that time.

This corresponds to Ever, or the past-time version of Eventually.

prev' :: Monad m => SPred m a -> SPred m a Source #

Output True at a time if the input at the last time was True.

prev :: Monad m => b -> MSF m a b -> MSF m a b Source #

Deprecated: This function is deprecated in dunai-test 0.9 and will be removed.

Delay output of an MSF by one sample, using the provided argument for the first sample.