Copyright | (c) Ingo Sander KTH/ICT/ES ForSyDe-Group |
---|---|
License | BSD-style (see the file LICENSE) |
Maintainer | forsyde-dev@ict.kth.se |
Stability | experimental |
Portability | portable |
Safe Haskell | Safe |
Language | Haskell98 |
ForSyDe.Shallow.MoC.SDF
Description
SDFLib.hs, yet to be completed.
Synopsis
- delaySDF :: a -> Signal a -> Signal a
- delaynSDF :: [a] -> Signal a -> Signal a
- actor11SDF :: Int -> Int -> ([a] -> [b]) -> Signal a -> Signal b
- actor12SDF :: Int -> (Int, Int) -> ([a] -> ([b], [c])) -> Signal a -> (Signal b, Signal c)
- actor13SDF :: Int -> (Int, Int, Int) -> ([a] -> ([b], [c], [d])) -> Signal a -> (Signal b, Signal c, Signal d)
- actor14SDF :: Int -> (Int, Int, Int, Int) -> ([a] -> ([b], [c], [d], [e])) -> Signal a -> (Signal b, Signal c, Signal d, Signal e)
- actor21SDF :: (Int, Int) -> Int -> ([a] -> [b] -> [c]) -> Signal a -> Signal b -> Signal c
- actor22SDF :: (Int, Int) -> (Int, Int) -> ([a] -> [b] -> ([c], [d])) -> Signal a -> Signal b -> (Signal c, Signal d)
- actor23SDF :: (Int, Int) -> (Int, Int, Int) -> ([a] -> [b] -> ([c], [d], [e])) -> Signal a -> Signal b -> (Signal c, Signal d, Signal e)
- actor24SDF :: (Int, Int) -> (Int, Int, Int, Int) -> ([a] -> [b] -> ([c], [d], [e], [f])) -> Signal a -> Signal b -> (Signal c, Signal d, Signal e, Signal f)
- actor31SDF :: (Int, Int, Int) -> Int -> ([a] -> [b] -> [c] -> [d]) -> Signal a -> Signal b -> Signal c -> Signal d
- actor32SDF :: (Int, Int, Int) -> (Int, Int) -> ([a] -> [b] -> [c] -> ([d], [e])) -> Signal a -> Signal b -> Signal c -> (Signal d, Signal e)
- actor33SDF :: (Int, Int, Int) -> (Int, Int, Int) -> ([a] -> [b] -> [c] -> ([d], [e], [f])) -> Signal a -> Signal b -> Signal c -> (Signal d, Signal e, Signal f)
- actor34SDF :: (Int, Int, Int) -> (Int, Int, Int, Int) -> ([a] -> [b] -> [c] -> ([d], [e], [f], [g])) -> Signal a -> Signal b -> Signal c -> (Signal d, Signal e, Signal f, Signal g)
- actor41SDF :: (Int, Int, Int, Int) -> Int -> ([a] -> [b] -> [c] -> [d] -> [e]) -> Signal a -> Signal b -> Signal c -> Signal d -> Signal e
- actor42SDF :: (Int, Int, Int, Int) -> (Int, Int) -> ([a] -> [b] -> [c] -> [d] -> ([e], [f])) -> Signal a -> Signal b -> Signal c -> Signal d -> (Signal e, Signal f)
- actor43SDF :: (Int, Int, Int, Int) -> (Int, Int, Int) -> ([a] -> [b] -> [c] -> [d] -> ([e], [f], [g])) -> Signal a -> Signal b -> Signal c -> Signal d -> (Signal e, Signal f, Signal g)
- actor44SDF :: (Int, Int, Int, Int) -> (Int, Int, Int, Int) -> ([a] -> [b] -> [c] -> [d] -> ([e], [f], [g], [h])) -> Signal a -> Signal b -> Signal c -> Signal d -> (Signal e, Signal f, Signal g, Signal h)
Sequential Process Constructors
Sequential process constructors are used for processes that have a state. One of the input parameters is the initial state.
delaySDF :: a -> Signal a -> Signal a Source #
The process constructor delaySDF
delays the signal one event
cycle by introducing an initial value at the beginning of the
output signal. Note, that this implies that there is one event
(the first) at the output signal that has no corresponding event at
the input signal. One could argue that input and output signals
are not fully synchronized, even though all input events are
synchronous with a corresponding output event. However, this is
necessary to initialize feed-back loops.
delaynSDF :: [a] -> Signal a -> Signal a Source #
The process constructor delaynSDF
delays the signal n event
cycles by introducing n initial values at the beginning of the
output signal.
Actors
Based on the process constructors in the SDF-MoC, the SDF-library provides SDF-actors with single or multiple inputs
actor11SDF :: Int -> Int -> ([a] -> [b]) -> Signal a -> Signal b Source #
The process constructor actor11SDF
constructs an SDF actor with
one input and one output signals. For each input or output signal,
the process constructor takes the number of consumed and produced
tokens and the function of the actor as arguments.
actor12SDF :: Int -> (Int, Int) -> ([a] -> ([b], [c])) -> Signal a -> (Signal b, Signal c) Source #
The process constructor actor12SDF
constructs an SDF actor with
one input and two output signals. For each input or output signal,
the process constructor takes the number of consumed and produced
tokens and the function of the actor as arguments.
actor13SDF :: Int -> (Int, Int, Int) -> ([a] -> ([b], [c], [d])) -> Signal a -> (Signal b, Signal c, Signal d) Source #
The process constructor actor13SDF
constructs an SDF actor with
one input and three output signals. For each input or output signal,
the process constructor takes the number of consumed and produced
tokens and the function of the actor as arguments.
actor14SDF :: Int -> (Int, Int, Int, Int) -> ([a] -> ([b], [c], [d], [e])) -> Signal a -> (Signal b, Signal c, Signal d, Signal e) Source #
The process constructor actor14SDF
constructs an SDF actor with
one input and four output signals. For each input or output signal,
the process constructor takes the number of consumed and produced
tokens and the function of the actor as arguments.
actor21SDF :: (Int, Int) -> Int -> ([a] -> [b] -> [c]) -> Signal a -> Signal b -> Signal c Source #
The process constructor actor21SDF
constructs an SDF actor with
two input and one output signals. For each input or output signal,
the process constructor takes the number of consumed and produced
tokens and the function of the actor as arguments.
actor22SDF :: (Int, Int) -> (Int, Int) -> ([a] -> [b] -> ([c], [d])) -> Signal a -> Signal b -> (Signal c, Signal d) Source #
The process constructor actor22SDF
constructs an SDF actor with
two input and two output signals. For each input or output signal,
the process constructor takes the number of consumed and produced
tokens and the function of the actor as arguments.
actor23SDF :: (Int, Int) -> (Int, Int, Int) -> ([a] -> [b] -> ([c], [d], [e])) -> Signal a -> Signal b -> (Signal c, Signal d, Signal e) Source #
The process constructor actor23SDF
constructs an SDF actor with
two input and three output signals. For each input or output signal,
the process constructor takes the number of consumed and produced
tokens and the function of the actor as arguments.
actor24SDF :: (Int, Int) -> (Int, Int, Int, Int) -> ([a] -> [b] -> ([c], [d], [e], [f])) -> Signal a -> Signal b -> (Signal c, Signal d, Signal e, Signal f) Source #
The process constructor actor24SDF
constructs an SDF actor with
two input and four output signals. For each input or output signal,
the process constructor takes the number of consumed and produced
tokens and the function of the actor as arguments.
actor31SDF :: (Int, Int, Int) -> Int -> ([a] -> [b] -> [c] -> [d]) -> Signal a -> Signal b -> Signal c -> Signal d Source #
The process constructor actor31SDF
constructs an SDF actor with
three input and one output signals. For each input or output signal,
the process constructor takes the number of consumed and produced
tokens and the function of the actor as arguments.
actor32SDF :: (Int, Int, Int) -> (Int, Int) -> ([a] -> [b] -> [c] -> ([d], [e])) -> Signal a -> Signal b -> Signal c -> (Signal d, Signal e) Source #
The process constructor actor32SDF
constructs an SDF actor with
three input and two output signals. For each input or output signal,
the process constructor takes the number of consumed and produced
tokens and the function of the actor as arguments.
actor33SDF :: (Int, Int, Int) -> (Int, Int, Int) -> ([a] -> [b] -> [c] -> ([d], [e], [f])) -> Signal a -> Signal b -> Signal c -> (Signal d, Signal e, Signal f) Source #
The process constructor actor33SDF
constructs an SDF actor with
three input and three output signals. For each input or output signal,
the process constructor takes the number of consumed and produced
tokens and the function of the actor as arguments.
actor34SDF :: (Int, Int, Int) -> (Int, Int, Int, Int) -> ([a] -> [b] -> [c] -> ([d], [e], [f], [g])) -> Signal a -> Signal b -> Signal c -> (Signal d, Signal e, Signal f, Signal g) Source #
The process constructor actor34SDF
constructs an SDF actor with
three input and four output signals. For each input or output signal,
the process constructor takes the number of consumed and produced
tokens and the function of the actor as arguments.
actor41SDF :: (Int, Int, Int, Int) -> Int -> ([a] -> [b] -> [c] -> [d] -> [e]) -> Signal a -> Signal b -> Signal c -> Signal d -> Signal e Source #
The process constructor actor41SDF
constructs an SDF actor with
four input and one output signals. For each input or output signal,
the process constructor takes the number of consumed and produced
tokens and the function of the actor as arguments.
actor42SDF :: (Int, Int, Int, Int) -> (Int, Int) -> ([a] -> [b] -> [c] -> [d] -> ([e], [f])) -> Signal a -> Signal b -> Signal c -> Signal d -> (Signal e, Signal f) Source #
The process constructor actor42SDF
constructs an SDF actor with
four input and two output signals. For each input or output signal,
the process constructor takes the number of consumed and produced
tokens and the function of the actor as arguments.
actor43SDF :: (Int, Int, Int, Int) -> (Int, Int, Int) -> ([a] -> [b] -> [c] -> [d] -> ([e], [f], [g])) -> Signal a -> Signal b -> Signal c -> Signal d -> (Signal e, Signal f, Signal g) Source #
The process constructor actor43SDF
constructs an SDF actor with
four input and three output signals. For each input or output signal,
the process constructor takes the number of consumed and produced
tokens and the function of the actor as arguments.
actor44SDF :: (Int, Int, Int, Int) -> (Int, Int, Int, Int) -> ([a] -> [b] -> [c] -> [d] -> ([e], [f], [g], [h])) -> Signal a -> Signal b -> Signal c -> Signal d -> (Signal e, Signal f, Signal g, Signal h) Source #
The process constructor actor14SDF
constructs an SDF actor with
four input and four output signals. For each input or output signal,
the process constructor takes the number of consumed and produced
tokens and the function of the actor as arguments.