|
CSP for Java (JCSP) 1.0-rc4 |
||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
See:
Description
Class Summary | |
And | Bitwise ands two Integer streams to one stream. |
BlackHole | Black holes anything sent to it. |
Delta | This process broadcasts objects arriving on its input channel in parallel to its array of output channels. |
Delta2 | This process broadcasts objects arriving on its input channel in parallel to its two output channels. |
Demultiplex | This demultiplexes data from its input channel to its output channel array. |
Deparaplex | This demultiplexes data from its input channel to its output channel array. |
DynamicDelta | This process broadcasts objects arriving on its input channel in parallel to its output channel array -- those output channels can be changed dynamically. |
Fibonacci | This generates the Fibonacci sequence on its output channel. |
FixedDelay | This holds on to data from its input channel for a fixed delay before passing it on to its output channel. |
Generate | Generates an infinite (constant) sequence of Integers. |
Identity | This copies its input stream to its output stream, adding a one-place buffer to the stream. |
Integrate | This is a running-sum integrator of the Integers on its input stream to its output stream. |
Merge | Merges an array of strictly increasing Integer input streams into one strictly increasing output stream. |
Merge2 | Merges two strictly increasing Integer input streams into one strictly increasing output stream. |
Mult | Scales an Integer stream. |
Multiplex | Fair multiplexes its input Object stream array into one output stream (carrying source channel and data pairs). |
Nand | Bitwise nands two Integer streams to one stream. |
Nor | Bitwise nors two Integer streams to one stream. |
Numbers | Plugs together a network of low-level stateless components to generate the sequence of natural numbers. |
Or | Bitwise ors two Integer streams to one stream. |
Pairs | Generates sums of successive pairs of input Integers. |
Paraplex | Parallel multiplexes its input Object stream array on to one output stream. |
Plex | Fair multiplexes its input Object stream array into one output stream. |
Plex2 | Fair multiplexes two Object streams into one. |
Plus | Sums two Integer streams to one stream. |
Prefix | Prefixes a user-supplied object to the Object stream flowing through. |
Printer | Prints each int from its input channel to a PrintStream. |
ProcessRead | Reads one Object from its input channel. |
ProcessWrite | Writes one Object to its output channel. |
Sign | Converts each input Object to a String, prefixing it with a user-defined sign. |
Squares | Generates the Integer stream 1*1, 2*2, 3*3, ... by a somewhat unusual route. |
Substitute | Substitutes a user-configured Object for each Object in the stream flowing through. |
Successor | Adds one to each Integer in the stream flowing through. |
Tail | The output stream is the tail of its input stream. |
Times | Multiplies two Integer streams to one stream. |
Xor | Bitwise xors two Integer streams to one stream. |
This provides an assortment of plug-and-play CSP components to wire together
(with Object-carrying wires) and reuse.
Primarilly they are for education and demonstration purposes, but some
have value for general applications (e.g. Delta
,
DynamicDelta
, Plex
, Multiplex
, Demultiplex
,
ProcessRead
, ProcessWrite
, ...).
The educational purpose is to demonstrate how simple it is to build layered networks of communicating processes. Each component works to a clean channel interface. Component instances can just be wired together. A network of such components is itself another (CSP) component. Network design and analysis takes place independently at each level - we do not have to think about the whole network hierarchy to reason about each level. This enables us to construct components with arbitrarilly rich behaviour without running into combinatorial explosions of complexity.
Examples are given of networks with 20-30 processes (threads). Because of the component layering, we never need to consider more than about 5 at a time and it is easy to see what they do and that they are without deadlock, livelock, starvation or race-hazard problems.
|
CSP for Java (JCSP) 1.0-rc4 |
||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |