AERN-Net-0.2.1.1: Compositional lazy dataflow networks for exact real number computation

Portabilityportable
Stabilityexperimental
Maintainermik@konecny.aow.cz

Control.ERNet.Blocks.Control.Basic

Description

A collection of processes whose main purpose is to synchronise other processes and have little semantical value.

Synopsis

Documentation

joinStepValProcessSource

Arguments

:: (QAProtocol q a, Show q, Show a, Channel sIn sOut sInAnyProt sOutAnyProt) 
=> ERProcessName

process identifier (string)

-> ChannelType

value input channel type

-> a

example answer on value channel to help compiler work out the protocol

-> ERProcess sInAnyProt sOutAnyProt 

This process joins information from two channels (step, val) in such a way that it acts as a splitter of responsibilities for its multi-threaded failure-enabled result channel as follows:

  • The step channel provides the timing and effort information for responses.
  • The val channel provides values without significant blocking.

While the process is waiting for a response from the step channel, any queries are put on hold until the response comes.

  • If the step channel responds with indication of failure, then all pending queries are answered as failed.
  • If the step channel responds with ok, then all the pending queries are forwarded to the value channel and answered asap. No new queries are accepted during such forwarding stage.

splitSyncProcessSource

Arguments

:: (QAProtocol q a, Channel sIn sOut sInAnyProt sOutAnyProt) 
=> ERProcessName

process identifier (string)

-> ChannelType

type of all channels

-> Int

number of channels to serve

-> a

example answer on value channel to help compiler work out the protocol

-> ERProcess sInAnyProt sOutAnyProt 

This process provides multiple copies of one single-threaded channel.

merges splits a channel into two channels - primary channel and secondary channel. The primary channel is a clean forward of the original channel. The secondary channel can use a slightly different protocol than the primary channel.

Any query on the secondary channel will be blocked until a matching query is received and processed on the primary channel. (The user must supply a function that decides whether or not the queries are matching.)

Whenever a query is being answered on the primary channel, all queries pending on the secondary channel that are matching this one will be replied at the same time using the an answer derived from the answer on the primary channel.

biasedSplitSyncProcessSource

Arguments

:: (QAProtocol q1 a1, QAProtocol q2 a2, Channel sIn sOut sInAnyProt sOutAnyProt) 
=> ERProcessName

process identifier (string)

-> ChannelType

primary and input channel type

-> ChannelType

secondary channel type

-> (q2 -> q1 -> Bool)

decision whether a secondary query matches a primary query

-> (q2 -> a1 -> a2)

translation of primary answer to a secondary answer

-> ERProcess sInAnyProt sOutAnyProt 

This process provides two channels (primary, secondary) split off from one source channel. The primary channel is a clean forward of the source channel. The secondary channel can use a slightly different protocol than the primary channel.

Any query on the secondary channel will be blocked until a matching query is received and processed on the primary channel. (The user must supply a function that decides whether or not the queries are matching.)

Whenever a query is being answered on the primary channel, all queries pending on the secondary channel that are matching this one will be replied at the same time using the an answer derived from the answer on the primary channel.

switchMultiProcessSource

Arguments

:: Channel sIn sOut sInAnyProt sOutAnyProt 
=> Bool

should use channel cache?

-> ERProcessName

process identifier (string)

-> [ChannelType]

switched output channel types

-> ERProcess sInAnyProt sOutAnyProt 

This process acts as a switch for a group of channels, forwarding information from one of two groups of source channels. The special switch channel indicates whether to use one or the other.

improverIxSimpleProcessSource

Arguments

:: (QAProtocol q a, Channel sIn sOut sInAnyProt sOutAnyProt) 
=> ERProcessName

process identifier (string)

-> ChannelType

type shared by all channels

-> a

sample answer to help the type checker

-> ERProcess sInAnyProt sOutAnyProt 

This process acts as a simple pass-through + it decreases the effort index of each query except for a query with effort index zero it asks a special value provider. It can cope with several queries in parallel.

improverNoIxSimpleProcessSource

Arguments

:: (QAProtocol q a, Channel sIn sOut sInAnyProt sOutAnyProt) 
=> ERProcessName

process identifier (string)

-> ChannelType

type shared by all channels

-> a

sample answer to help the type checker

-> ERProcess sInAnyProt sOutAnyProt 

This process acts as a simple pass-through + it remembers its last answer and provides it on another channel. It initialises its memory from a special value provider.