forsyde-shallow-3.4.0.0: ForSyDe's Haskell-embedded Domain Specific Language.

Copyright(c) Ricardo Bonna KTH/ICT/ES ForSyDe-Group
LicenseBSD-style (see the file LICENSE)
Maintainerricardobonna@gmail.com
Stabilityexperimental
Portabilityportable
Safe HaskellSafe
LanguageHaskell98

ForSyDe.Shallow.MoC.SADF

Contents

Description

Experimental lib. Further test needed

Synopsis

Sequential Process Constructors

Sequential process constructors are used for processes that have a state. One of the input parameters is the initial state.

delaySADF :: [a] -> Signal a -> Signal a Source #

The process constructor delaynSADF delays the signal n event cycles by introducing n initial values at the beginning of the output signal.

Kernels

Based on the process constructors in the SADF-MoC, the SADF-library provides SADF-kernels with single or multiple inputs

kernel11SADF Source #

Arguments

:: Signal (Int, Int, [a] -> [b])

Control signal

-> Signal a

Input

-> Signal b

Output

The process constructor kernel11SADF constructs an SADF kernel with one data input and one data output signals. The scenario (token rates and function) is determined by the control signal.

kernel12SADF :: Signal (Int, (Int, Int), [a] -> ([b], [c])) -> Signal a -> (Signal b, Signal c) Source #

The process constructor kernel12SADF constructs an SADF kernel with one data input and two data output signals. The scenario (token rates and function) is determined by the control signal.

kernel13SADF :: Signal (Int, (Int, Int, Int), [a] -> ([b], [c], [d])) -> Signal a -> (Signal b, Signal c, Signal d) Source #

The process constructor kernel13SADF constructs an SADF kernel with one data input and three data output signals. The scenario (token rates and function) is determined by the control signal.

kernel14SADF :: Signal (Int, (Int, Int, Int, Int), [a] -> ([b], [c], [d], [e])) -> Signal a -> (Signal b, Signal c, Signal d, Signal e) Source #

The process constructor kernel14SADF constructs an SADF kernel with one data input and four data output signals. The scenario (token rates and function) is determined by the control signal.

kernel15SADF :: Signal (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 kernel15SADF constructs an SADF kernel with one data input and five data output signals. The scenario (token rates and function) is determined by the control signal.

kernel21SADF :: Signal ((Int, Int), Int, [a] -> [b] -> [c]) -> Signal a -> Signal b -> Signal c Source #

The process constructor kernel21SADF constructs an SADF kernel with two data input and one data output signals. The scenario (token rates and function) is determined by the control signal.

kernel22SADF :: Signal ((Int, Int), (Int, Int), [a] -> [b] -> ([c], [d])) -> Signal a -> Signal b -> (Signal c, Signal d) Source #

The process constructor kernel22SADF constructs an SADF kernel with two data input and two data output signals. The scenario (token rates and function) is determined by the control signal.

>>> let scen1 = ((1,1), (1,1), \[a] [b] -> ([2*a], [2*b]))
>>> let scen2 = ((2,2), (1,1), \[a,b] [c,d] -> ([a+b], [c+d]))
>>> let scen3 = ((1,2), (2,1), \[a] [b,c] -> ([b,c], [a]))
>>> let sc = signal [scen1, scen2, scen3]
>>> kernel22SADF sc (signal [1..20]) (signal [21 .. 40])
({2,5,24,25},{42,45,4}) 

kernel23SADF :: Signal ((Int, Int), (Int, Int, Int), [a] -> [b] -> ([c], [d], [e])) -> Signal a -> Signal b -> (Signal c, Signal d, Signal e) Source #

The process constructor kernel23SADF constructs an SADF kernel with two data input and three data output signals. The scenario (token rates and function) is determined by the control signal.

kernel24SADF :: Signal ((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 kernel24SADF constructs an SADF kernel with two data input and four data output signals. The scenario (token rates and function) is determined by the control signal.

kernel25SADF :: Signal ((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 kernel25SADF constructs an SADF kernel with two data input and five data output signals. The scenario (token rates and function) is determined by the control signal.

kernel31SADF :: Signal ((Int, Int, Int), Int, [a] -> [b] -> [c] -> [d]) -> Signal a -> Signal b -> Signal c -> Signal d Source #

The process constructor kernel31SADF constructs an SADF kernel with three data input and one data output signals. The scenario (token rates and function) is determined by the control signal.

kernel32SADF :: Signal ((Int, Int, Int), (Int, Int), [a] -> [b] -> [c] -> ([d], [e])) -> Signal a -> Signal b -> Signal c -> (Signal d, Signal e) Source #

The process constructor kernel32SADF constructs an SADF kernel with three data input and two data output signals. The scenario (token rates and function) is determined by the control signal.

kernel33SADF :: Signal ((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 kernel33SADF constructs an SADF kernel with three data input and three data output signals. The scenario (token rates and function) is determined by the control signal.

kernel34SADF :: Signal ((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 kernel34SADF constructs an SADF kernel with three data input and four data output signals. The scenario (token rates and function) is determined by the control signal.

kernel35SADF :: Signal ((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 kernel35SADF constructs an SADF kernel with three data input and five data output signals. The scenario (token rates and function) is determined by the control signal.

kernel41SADF :: Signal ((Int, Int, Int, Int), Int, [a] -> [b] -> [c] -> [d] -> [e]) -> Signal a -> Signal b -> Signal c -> Signal d -> Signal e Source #

The process constructor kernel41SADF constructs an SADF kernel with four data input and one data output signals. The scenario (token rates and function) is determined by the control signal.

kernel42SADF :: Signal ((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 kernel42SADF constructs an SADF kernel with four data input and two data output signals. The scenario (token rates and function) is determined by the control signal.

kernel43SADF :: Signal ((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 kernel43SADF constructs an SADF kernel with four data input and three data output signals. The scenario (token rates and function) is determined by the control signal.

kernel44SADF :: Signal ((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 kernel44SADF constructs an SADF kernel with four data input and four data output signals. The scenario (token rates and function) is determined by the control signal.

kernel45SADF :: Signal ((Int, Int, Int, Int), (Int, Int, Int, Int, Int), [a] -> [b] -> [c] -> [d] -> ([e], [f], [g], [h], [i])) -> Signal a -> Signal b -> Signal c -> Signal d -> (Signal e, Signal f, Signal g, Signal h, Signal i) Source #

The process constructor kernel45SADF constructs an SADF kernel with four data input and five data output signals. The scenario (token rates and function) is determined by the control signal.

kernel51SADF :: Signal ((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 kernel51SADF constructs an SADF kernel with five data input and one data output signals. The scenario (token rates and function) is determined by the control signal.

kernel52SADF :: Signal ((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 kernel52SADF constructs an SADF kernel with five data input and two data output signals. The scenario (token rates and function) is determined by the control signal.

kernel53SADF :: Signal ((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 kernel53SADF constructs an SADF kernel with five data input and three data output signals. The scenario (token rates and function) is determined by the control signal.

kernel54SADF :: Signal ((Int, Int, Int, Int, Int), (Int, Int, Int, Int), [a] -> [b] -> [c] -> [d] -> [e] -> ([f], [g], [h], [i])) -> Signal a -> Signal b -> Signal c -> Signal d -> Signal e -> (Signal f, Signal g, Signal h, Signal i) Source #

The process constructor kernel54SADF constructs an SADF kernel with five data input and four data output signals. The scenario (token rates and function) is determined by the control signal.

kernel55SADF :: Signal ((Int, Int, Int, Int, Int), (Int, Int, Int, Int, Int), [a] -> [b] -> [c] -> [d] -> [e] -> ([f], [g], [h], [i], [j])) -> Signal a -> Signal b -> Signal c -> Signal d -> Signal e -> (Signal f, Signal g, Signal h, Signal i, Signal j) Source #

The process constructor kernel55SADF constructs an SADF kernel with five data input and five data output signals. The scenario (token rates and function) is determined by the control signal.

Detectors

Based on the process constructors in the SADF-MoC, the SADF-library provides SADF-detectors with single or multiple inputs

detector11SADF Source #

Arguments

:: Int

consumption rates (c)

-> (s -> [a] -> s)

next state function (f)

-> (s -> (Int, [y]))

scenario selection (g)

-> s

initial state (s0)

-> Signal a

Input

-> Signal y

Output

The process constructor detector11SADF takes the consumption token rate (c), the state transition function (f), the scenario selection (g) and the initial state (s0), and constructs an SADF detector with a single data input and a single control output signals.

detector12SADF :: Int -> (s -> [a] -> s) -> (s -> ((Int, Int), ([y1], [y2]))) -> s -> Signal a -> (Signal y1, Signal y2) Source #

The process constructor detector12SADF takes the consumption token rate (c), the state transition function (f), the scenario selection (g) and the initial state (s0), and constructs an SADF detector with a single data input and two control output signals.

detector13SADF :: Int -> (s -> [a] -> s) -> (s -> ((Int, Int, Int), ([y1], [y2], [y3]))) -> s -> Signal a -> (Signal y1, Signal y2, Signal y3) Source #

The process constructor detector13SADF takes the consumption token rate (c), the state transition function (f), the scenario selection (g) and the initial state (s0), and constructs an SADF detector with a single data input and three control output signals.

detector14SADF :: Int -> (s -> [a] -> s) -> (s -> ((Int, Int, Int, Int), ([y1], [y2], [y3], [y4]))) -> s -> Signal a -> (Signal y1, Signal y2, Signal y3, Signal y4) Source #

The process constructor detector14SADF takes the consumption token rate (c), the state transition function (f), the scenario selection (g) and the initial state (s0), and constructs an SADF detector with a single data input and four control output signals.

detector15SADF :: Int -> (s -> [a] -> s) -> (s -> ((Int, Int, Int, Int, Int), ([y1], [y2], [y3], [y4], [y5]))) -> s -> Signal a -> (Signal y1, Signal y2, Signal y3, Signal y4, Signal y5) Source #

The process constructor detector15SADF takes the consumption token rate (c), the state transition function (f), the scenario selection (g) and the initial state (s0), and constructs an SADF detector with a single data input and five control output signals.

detector21SADF :: (Int, Int) -> (s -> [a] -> [b] -> s) -> (s -> (Int, [y])) -> s -> Signal a -> Signal b -> Signal y Source #

The process constructor detector21SADF takes the consumption token rate (c), the state transition function (f), the scenario selection (g) and the initial state (s0), and constructs an SADF detector with two data input and a single control output signals.

detector22SADF :: (Int, Int) -> (s -> [a] -> [b] -> s) -> (s -> ((Int, Int), ([y1], [y2]))) -> s -> Signal a -> Signal b -> (Signal y1, Signal y2) Source #

The process constructor detector22SADF takes the consumption token rate (c), the state transition function (f), the scenario selection (g) and the initial state (s0), and constructs an SADF detector with two data input and two control output signals.

detector23SADF :: (Int, Int) -> (s -> [a] -> [b] -> s) -> (s -> ((Int, Int, Int), ([y1], [y2], [y3]))) -> s -> Signal a -> Signal b -> (Signal y1, Signal y2, Signal y3) Source #

The process constructor detector23SADF takes the consumption token rate (c), the state transition function (f), the scenario selection (g) and the initial state (s0), and constructs an SADF detector with two data input and three control output signals.

detector24SADF :: (Int, Int) -> (s -> [a] -> [b] -> s) -> (s -> ((Int, Int, Int, Int), ([y1], [y2], [y3], [y4]))) -> s -> Signal a -> Signal b -> (Signal y1, Signal y2, Signal y3, Signal y4) Source #

The process constructor detector24SADF takes the consumption token rate (c), the state transition function (f), the scenario selection (g) and the initial state (s0), and constructs an SADF detector with two data input and four control output signals.

detector25SADF :: (Int, Int) -> (s -> [a] -> [b] -> s) -> (s -> ((Int, Int, Int, Int, Int), ([y1], [y2], [y3], [y4], [y5]))) -> s -> Signal a -> Signal b -> (Signal y1, Signal y2, Signal y3, Signal y4, Signal y5) Source #

The process constructor detector25SADF takes the consumption token rate (c), the state transition function (f), the scenario selection (g) and the initial state (s0), and constructs an SADF detector with two data input and five control output signals.

detector31SADF :: (Int, Int, Int) -> (s -> [a] -> [b] -> [c] -> s) -> (s -> (Int, [y])) -> s -> Signal a -> Signal b -> Signal c -> Signal y Source #

The process constructor detector31SADF takes the consumption token rate (c), the state transition function (f), the scenario selection (g) and the initial state (s0), and constructs an SADF detector with three data input and a single control output signals.

detector32SADF :: (Int, Int, Int) -> (s -> [a] -> [b] -> [c] -> s) -> (s -> ((Int, Int), ([y1], [y2]))) -> s -> Signal a -> Signal b -> Signal c -> (Signal y1, Signal y2) Source #

The process constructor detector32SADF takes the consumption token rate (c), the state transition function (f), the scenario selection (g) and the initial state (s0), and constructs an SADF detector with three data input and two control output signals.

detector33SADF :: (Int, Int, Int) -> (s -> [a] -> [b] -> [c] -> s) -> (s -> ((Int, Int, Int), ([y1], [y2], [y3]))) -> s -> Signal a -> Signal b -> Signal c -> (Signal y1, Signal y2, Signal y3) Source #

The process constructor detector33SADF takes the consumption token rate (c), the state transition function (f), the scenario selection (g) and the initial state (s0), and constructs an SADF detector with three data input and three control output signals.

detector34SADF :: (Int, Int, Int) -> (s -> [a] -> [b] -> [c] -> s) -> (s -> ((Int, Int, Int, Int), ([y1], [y2], [y3], [y4]))) -> s -> Signal a -> Signal b -> Signal c -> (Signal y1, Signal y2, Signal y3, Signal y4) Source #

The process constructor detector34SADF takes the consumption token rate (c), the state transition function (f), the scenario selection (g) and the initial state (s0), and constructs an SADF detector with three data input and four control output signals.

detector35SADF :: (Int, Int, Int) -> (s -> [a] -> [b] -> [c] -> s) -> (s -> ((Int, Int, Int, Int, Int), ([y1], [y2], [y3], [y4], [y5]))) -> s -> Signal a -> Signal b -> Signal c -> (Signal y1, Signal y2, Signal y3, Signal y4, Signal y5) Source #

The process constructor detector35SADF takes the consumption token rate (c), the state transition function (f), the scenario selection (g) and the initial state (s0), and constructs an SADF detector with three data input and five control output signals.

detector41SADF :: (Int, Int, Int, Int) -> (s -> [a] -> [b] -> [c] -> [d] -> s) -> (s -> (Int, [y])) -> s -> Signal a -> Signal b -> Signal c -> Signal d -> Signal y Source #

The process constructor detector41SADF takes the consumption token rate (c), the state transition function (f), the scenario selection (g) and the initial state (s0), and constructs an SADF detector with four data input and a single control output signals.

detector42SADF :: (Int, Int, Int, Int) -> (s -> [a] -> [b] -> [c] -> [d] -> s) -> (s -> ((Int, Int), ([y1], [y2]))) -> s -> Signal a -> Signal b -> Signal c -> Signal d -> (Signal y1, Signal y2) Source #

The process constructor detector42SADF takes the consumption token rate (c), the state transition function (f), the scenario selection (g) and the initial state (s0), and constructs an SADF detector with four data input and two control output signals.

detector43SADF :: (Int, Int, Int, Int) -> (s -> [a] -> [b] -> [c] -> [d] -> s) -> (s -> ((Int, Int, Int), ([y1], [y2], [y3]))) -> s -> Signal a -> Signal b -> Signal c -> Signal d -> (Signal y1, Signal y2, Signal y3) Source #

The process constructor detector43SADF takes the consumption token rate (c), the state transition function (f), the scenario selection (g) and the initial state (s0), and constructs an SADF detector with four data input and three control output signals.

detector44SADF :: (Int, Int, Int, Int) -> (s -> [a] -> [b] -> [c] -> [d] -> s) -> (s -> ((Int, Int, Int, Int), ([y1], [y2], [y3], [y4]))) -> s -> Signal a -> Signal b -> Signal c -> Signal d -> (Signal y1, Signal y2, Signal y3, Signal y4) Source #

The process constructor detector44SADF takes the consumption token rate (c), the state transition function (f), the scenario selection (g) and the initial state (s0), and constructs an SADF detector with four data input and four control output signals.

detector45SADF :: (Int, Int, Int, Int) -> (s -> [a] -> [b] -> [c] -> [d] -> s) -> (s -> ((Int, Int, Int, Int, Int), ([y1], [y2], [y3], [y4], [y5]))) -> s -> Signal a -> Signal b -> Signal c -> Signal d -> (Signal y1, Signal y2, Signal y3, Signal y4, Signal y5) Source #

The process constructor detector45SADF takes the consumption token rate (c), the state transition function (f), the scenario selection (g) and the initial state (s0), and constructs an SADF detector with four data input and five control output signals.

detector51SADF :: (Int, Int, Int, Int, Int) -> (s -> [a] -> [b] -> [c] -> [d] -> [e] -> s) -> (s -> (Int, [y])) -> s -> Signal a -> Signal b -> Signal c -> Signal d -> Signal e -> Signal y Source #

The process constructor detector51SADF takes the consumption token rate (c), the state transition function (f), the scenario selection (g) and the initial state (s0), and constructs an SADF detector with five data input and a single control output signals.

detector52SADF :: (Int, Int, Int, Int, Int) -> (s -> [a] -> [b] -> [c] -> [d] -> [e] -> s) -> (s -> ((Int, Int), ([y1], [y2]))) -> s -> Signal a -> Signal b -> Signal c -> Signal d -> Signal e -> (Signal y1, Signal y2) Source #

The process constructor detector52SADF takes the consumption token rate (c), the state transition function (f), the scenario selection (g) and the initial state (s0), and constructs an SADF detector with five data input and two control output signals.

detector53SADF :: (Int, Int, Int, Int, Int) -> (s -> [a] -> [b] -> [c] -> [d] -> [e] -> s) -> (s -> ((Int, Int, Int), ([y1], [y2], [y3]))) -> s -> Signal a -> Signal b -> Signal c -> Signal d -> Signal e -> (Signal y1, Signal y2, Signal y3) Source #

The process constructor detector53SADF takes the consumption token rate (c), the state transition function (f), the scenario selection (g) and the initial state (s0), and constructs an SADF detector with five data input and three control output signals.

detector54SADF :: (Int, Int, Int, Int, Int) -> (s -> [a] -> [b] -> [c] -> [d] -> [e] -> s) -> (s -> ((Int, Int, Int, Int), ([y1], [y2], [y3], [y4]))) -> s -> Signal a -> Signal b -> Signal c -> Signal d -> Signal e -> (Signal y1, Signal y2, Signal y3, Signal y4) Source #

The process constructor detector54SADF takes the consumption token rate (c), the state transition function (f), the scenario selection (g) and the initial state (s0), and constructs an SADF detector with five data input and four control output signals.

detector55SADF :: (Int, Int, Int, Int, Int) -> (s -> [a] -> [b] -> [c] -> [d] -> [e] -> s) -> (s -> ((Int, Int, Int, Int, Int), ([y1], [y2], [y3], [y4], [y5]))) -> s -> Signal a -> Signal b -> Signal c -> Signal d -> Signal e -> (Signal y1, Signal y2, Signal y3, Signal y4, Signal y5) Source #

The process constructor detector55SADF takes the consumption token rate (c), the state transition function (f), the scenario selection (g) and the initial state (s0), and constructs an SADF detector with five data input and five control output signals.