CSP for Java
(JCSP) 1.1-rc4

Package org.jcsp.plugNplay

This provides an assortment of plug-and-play CSP components to wire together (with Object-carrying wires) and reuse.

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 process copies input to output, imposing a fixed time delay between these events.
FramedButton A free-standing button process in its own frame, with configure and event channels.
FramedButtonArray A free-standing array of button processes in their own frame, with configure and event channels.
FramedButtonGrid A free-standing grid of button processes in their own frame, with configure and event channels.
FramedScrollbar A free-standing scrollbar process in its own frame, with configure and event channels.
Generate Generates an infinite (constant) sequence of Integers.
Identity This copies its input stream to its output stream unchanged.
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 Object from its input channel to a PrintStream.
ProcessRead Reads one Object from its input channel.
ProcessWrite Writes one Object to its output channel.
Regular This process generates a constant stream of Integers at a regular rate.
Regulate This process controls the rate of flow of traffic from its input to output channels.
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, etc 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.
 

Package org.jcsp.plugNplay Description

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.1-rc4

Submit a bug or feature to jcsp-team@kent.ac.uk
Version 1.1-rc4 of the JCSP API Specification (Copyright 1997-2008 P.D.Austin and P.H.Welch - All Rights Reserved)
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.