AERN-Net-0.2.1: Compositional lazy dataflow networks for exact real number computationSource codeContentsIndex
Control.ERNet.Foundations.Process
Portabilityportable
Stabilityexperimental
Maintainermik@konecny.aow.cz
Description
Kahn process networks with channels adapted for arbitrary precision real higher-order data communication. Executed using a number of parallel threads. Each process started in a dedicated thread and each process typically starts further internal threads. Each channel is a transactional variable (TVar) known to both end processes and allows them to communicate according to its instance of the QAProtocol class.
Synopsis
data ERProcess sInAnyProt sOutAnyProt = ERProcess {
erprocName :: ERProcessName
erprocDeploy :: ERProcessDeploy sInAnyProt sOutAnyProt
erprocInputTypes :: [ChannelType]
erprocOutputTypes :: [ChannelType]
}
type ERProcessName = String
type ERProcessDeploy sInAnyProt sOutAnyProt = ERProcessName -> [sInAnyProt] -> [sOutAnyProt] -> ERProcessExpandCallback sInAnyProt sOutAnyProt -> IO ()
type ERProcessExpandCallback sInAnyProt sOutAnyProt = String -> [(ChannelType, Int)] -> [(ChannelType, Int)] -> [(ERProcess sInAnyProt sOutAnyProt, ([Int], [Int]))] -> IO ()
data ERProcessAction s q a
= ERProcessActionRetryWhen (s -> Bool)
| ERProcessActionQuery q
| ERProcessActionAnswer Bool a
subnetProcess :: ERProcessName -> [(ChannelType, Int)] -> [(ChannelType, Int)] -> [(ERProcess sInAnyProt sOutAnyProt, ([Int], [Int]))] -> ERProcess sInAnyProt sOutAnyProt
Documentation
data ERProcess sInAnyProt sOutAnyProt Source
All data that define a process, including its behaviour. Each executing process is instantiated from one of these descriptions.
Constructors
ERProcess
erprocName :: ERProcessNameundeployed process name
erprocDeploy :: ERProcessDeploy sInAnyProt sOutAnyProt

On deployment, a process either expands itself using the provided callback function and does not use the sockets at all

OR it uses the sockets and never calls the expansion callback.

erprocInputTypes :: [ChannelType]
erprocOutputTypes :: [ChannelType]
type ERProcessName = StringSource
type ERProcessDeploy sInAnyProt sOutAnyProt = ERProcessName -> [sInAnyProt] -> [sOutAnyProt] -> ERProcessExpandCallback sInAnyProt sOutAnyProt -> IO ()Source
type ERProcessExpandCallback sInAnyProt sOutAnyProt = String -> [(ChannelType, Int)] -> [(ChannelType, Int)] -> [(ERProcess sInAnyProt sOutAnyProt, ([Int], [Int]))] -> IO ()Source
data ERProcessAction s q a Source

Explicit representation of a process' action, able to distinguish between answering and making a query or pausing one internal thread until the internal state (TV) has met some condition.

This is useful for producing highly customisable templates for processes as Haskell functions whose parameters are functions that determine what the process should do as a response to some external or internal events. See for example Control.ERNet.Blocks.Basic.passThroughStatefulProcess.

Constructors
ERProcessActionRetryWhen (s -> Bool)
ERProcessActionQuery q
ERProcessActionAnswer Bool a
subnetProcessSource
::
=> ERProcessName
-> [(ChannelType, Int)]input socket channel types and numbers
-> [(ChannelType, Int)]output socket channel types and numbers
-> [(ERProcess sInAnyProt sOutAnyProt, ([Int], [Int]))]internal processes and their in/out channel numbers
-> ERProcess sInAnyProt sOutAnyProt
Produced by Haddock version 2.4.2