Glossary

This book has introduced many concepts revolving around the concept of event streams. In particular, the BeepBeep library provides a little "zoo" of dozens of Processor and Function objects. In this appendix, you will find a list of the various objects and notions that have been discussed. For entries referring to Java objects (such as processors and functions), a note next to the entry indicates whether these objects are part of BeepBeep's core, or can be found in one of its auxiliary palettes.

For more technical information about each of these objects, the reader is referred to the online API documentation, which provides in-depth and up-to-date information.

AbsoluteValue

Core An UnaryFunction provided by the Numbers utility class. It computes the absolute value of a number. It is represented as:

AbsoluteValue

Addition

Core A BinaryFunction provided by the Numbers utility class. It adds two numbers. It is represented as:

Addition

And

Core A BinaryFunction provided by the Booleans utility class. It computes the logical conjunction of its two Boolean arguments, and is represented graphically as:

And

AnyElement

Core A 1:1 Function provided by the Bags utility class. This function takes as input a Java Collection c, and returns as its output an arbitrary element of c. It is represented graphically as:

AnyElement

ApplyFunction

Core A Processor that applies a specific function f to every event front it receives, and returns the output of that function. The input and output arity of this processor are equal to the input and output arity of the underlying function. It is represented graphically as:

ApplyFunction

ApplyFunctionPartial

Core A variant of ApplyFunction that attempts to evaluate a function on incomplete input event fronts. It is represented graphically as:

ApplyFunctionPartial

ApplyToAll

Core A 1:1 Function provided by the Bags utility class. This function takes as input a Java Collection c and returns as its output the collection that is the result of applying a predefined 1:1 Function f to each element of c. It is represented graphically as:

ApplyToAll

Arity

For a Processor object, refers to the number of pipes it has. The input arity is the number of input streams accepted by the processor, and the output arity is the number of output streams it produces.

For a Function object, refers to the number of arguments it accepts or the number of values it produces.

ArrayPutInto

Core A Processor provided by the Maps utility class. Updates a map by putting key-value pairs into it. The processor takes a single input stream, whose events are arrays of size 2, and repeatedly outputs a reference to the same internal Map object. The first element of the array contains the key, and the second contains the value that will be put into the array. Upon each input array, the processor outputs the map, updated accordingly. The processor is represented graphically as:

ArrayPutInto

See also PutInto.

Bags

Core A container class for functions and processors applying to generic collections, i.e. "bags" of objects. Among the processors and functions provided by Bags are: AnyElement, ApplyToAll, Contains, Explode, FilterElements, GetSize, Product, RunOn, ToArray, ToCollection, ToList, and ToSet.

BinaryFunction

Core A Function object having exactly two input arguments, and producing exactly one output value.

BlackHole

Core A special type of Sink that discards everything it receives. It is represented graphically as follows:

BlackHole

Booleans

Core A container class for Function objects related to Boolean values. For example, the static reference Boolean.and refers to the Function computing the logical conjunction of two Booleans. Among the functions provided by Booleans are: And, Implies, Not and Or.

Call

Core A Processor object calling an external command upon receiving an event, and returning the output of that command as its output stream.

Call

CallbackSink

Core A Sink that calls a method when a new front of events is pushed to it. Users can override that method to do some processing on these events.

Closed (chain)

A property of a chain of processors, when either all its downstream processors are Sinks, or all its upstream processors are Sources. A chain of processors that is not closed will generally throw Java exceptions when events pass through it.

Concat

Core A BinaryFunction provided by the Strings utility class. It receives two strings as arguments, and returns the concatenation of both strings as its output value. It is represented as:

Concat

Connector

Core A utility class that provides a number of convenient methods for connecting the outputs of processors to the inputs of other processors. Methods provided by the Connector class are called connect() and have various signatures. When called with exactly two Processor arguments, connect assigns each output pipe of the first processor to the input pipe at the same position on the second processor.

Constant

Core A Function object that takes no input argument, and returns a single output value. Constants are used in FunctionTrees to refer to fixed values. A Constant instance can be created out of any Java object, and returns this object as its value. When depicted in a FunctionTree, they are generally represented as values inside a rounded rectangle, as follows:

Constant

Contains (Bags)

Core A 2:1 Function provided by the Bags utility class. This function takes as input a Java Collection c and an object o, and returns the Boolean value true as its output if and only if o is an element of c. It is represented graphically as:

Contains

Contains (Strings)

Core A BinaryFunction provided by the Strings utility class. It receives two strings as input, and returns the Boolean value true if the first contains the second. It is represented as:

StringContains

Context

Core An associative (key-value) map used by Processor objects to store persistent data. Each processor has its own Context object. When a processor is cloned, the context of the original is copied into the clone. In addition, all operations on a Context object are synchronized.

ContextAssignment

Core An object that defines the value associated to a key in a Processor's Context object. It is represented graphically as:

ContextAssignment

ContextVariable

Core A Function object that acts as a placeholder for the value associated to a key in a the Context of a Processor. When a ContextVariable occurs inside the FunctionTree assigned to an ApplyFunction processor, it queries that processor's Context object to get the current value associated to the key. It is represented graphically as:

ContextVariable

By convention, context variables are prefixed with a dollar sign in diagrams, to differentiate them from constants.

CountDecimate

Core A Processor that returns every n-th input event (starting with the first). The value n is called the decimation interval. However, a mode can be specified in order to output the n-th input event if it is the last event of the trace and it has not been output already. It is represented graphically as:

CountDecimate

Cumulate

Core A Processor that creates a cumulative processor out of a cumulative function. This is simply an instance of ApplyFunction whose function is of a specific type (a CumulativeFunction). It is represented graphically as:

Cumulate

CumulativeFunction

Core A special type of Function with memory.

Deserialize

Serialization A Processor that takes structured character strings as its inputs, and turns each of them into Java objects with the corresponding content. It is represented graphically as follows:

Deserialize

Deserialization can be used to restore the state of objects previously saved on a persistent medium, or to receive non-primitive data types over a communication medium such as a network. The opposite operation is called serialization.

Division

Core A BinaryFunction provided by the Numbers utility class. It computes the quotient of two numbers. It is represented as:

Division

EndsWith

Core A BinaryFunction provided by the Strings utility class. It receives two strings as arguments, and returns true if the former ends with the latter.

EndsWith

Equals

Core A Function that checks for the equality between two objects. It is represented graphically as follows:

Equals

Eventually

LTL A Processor that implements the "eventually" or F operator of Linear Temporal Logic. If p is an LTL expression, F p stipulates that p should evaluate to true on at least one suffix of the current trace. It is represented graphically as:

Eventually

Exists

FOL A Function that acts as an existential quantifier in first-order logic. It is represented as:

Exists

There is also a variant that uses an auxiliary function to compute the set of values to quantify over. It is represented as:

ExistsFunction

ExpandAsColumns

Tuples A Function that transforms a tuple by replacing two key-value pairs by a single new key-value pair. The new pair is created by taking the value of a column as the key, and the value of another column as the value. It is represented as:

ExpandAsColumns

Explode

Core A 1:m Function provided by the Bags utility class. Given a collection of size m, it returns as its m outputs the elements of the collection. It can be seen as the opposite of ToArray, ToList and ToSet. The ordering of the arguments is ensured when the input collection is itself ordered. The pictogram used to represent the function depends on the type of collection used for the input, in order to match the pictograph of the inverse function.

Explode

Filter

Core A Processor that discards events from an input trace based on a selection criterion. The processor takes as input two events simultaneously; it outputs the first if the second is true. Graphically, this processor is represented as:

Filter

FilterElements

Core A 1:1 Function provided by the Bags utility class. This function is parameterized by a 1:1 Function f that must return a Boolean. The FilterElements function takes as input a Java Collection c and returns as its output the collection consisting of only the elements of c for which f(c) returns true. It is represented graphically as:

FilterElements

FindPattern

A Processor that extracts chunks of an input stream based on a regular expression. It is represented graphically as:

FindPattern

FindRegex

Core An UnaryFunction provided by the Strings utility class. It receives a string s as its argument, and returns an array of strings, corresponding to all the matches of a given regular expression exp on s. It is represented as:

FindRegex

ForAll

FOL A Function that acts as a universal quantifier in first-order logic. It is represented as:

ForAll

There is a variant of ForAll that uses an auxiliary function to compute the set of values to quantify over. It is represented as:

ForAllFunction

Fork

Core A Processor that duplicates a single input stream into two or more output streams. A Fork is used when the contents of the same stream must be processed by multiple processors in parallel. It is represented graphically as:

Fork

Freeze

Core A Processor that repeatedly outputs the first event it has received. It is represented graphically as:

Freeze

Front

Given n streams, the front at position k is the tuple made of the event at the k-th position in every stream. BeepBeep Processors that have an input arity greater than 1 handle events one front at a time; this is called synchronous processing.

Function

Core A computation unit that receives one or more arguments, and produces one or more output values. Along with Processor, this is one of BeepBeep's fundamental classes. Contrary to processors, functions are stateless (or history-independent): the same inputs must always produce the same outputs.

Functions are represented graphically as rounded rectangles, with a pictogram describing the computation they perform, such as this:

Function

A function with an input arity of m and an output arity of n is often referred to as an m:n function.

FunctionTransition

FSM A Transition of a MooreMachine whose firing conditions is determined by evaluating a function f on the incoming event front. It is represented as:

FunctionTransition

FunctionTree

Core A Function object representing the composition of multiple functions together to form a "compound" function. A function tree has a root, which consists of an m:n function. This function is connected to n children, which can be functions or function trees themselves. The diagram below depicts a function tree that composes multiplication and addition to form a more complex function of two arguments.

FunctionTree

Get

Core A UnaryFunction provided by the Maps utility class; it is parameterized by a key k. Given a Map m as its input, it retrieves the value associated to k in m. It is represented graphically as:

Get

GetSize

Core A 1:1 Function provided by the Bags utility class. This function takes as input a Java Collection c and returns as its output the number of elements in that collection. It is represented graphically as:

GetSize

GetWidgetValue

Widgets A Function that takes a Swing component as input, and returns the current "value" of this component. It is represented graphically as:

GetWidgetValue

Globally

LTL A Processor that implements the "globally" or G operator of Linear Temporal Logic. If p is an LTL expression, G p stipulates that p should evaluate to true on every suffix of the current trace. It is represented graphically as:

Globally

GroupProcessor

Core A Processor that encapsulates a chain of processors as if it were a single object. It is represented as follows:

GroupProcessor

To create a GroupProcessor, one must first instantiate and connect the processors to be encapsulated. Each processor must then be added to the group through a method called add. Finally, the endpoints of the chain must be associated to the inputs and outputs of the group. From then on, the processor can be moved around, connected and duplicated as if it were a single processor.

In a graphical representation of a GroupProcessor, the processor chain inside the group can also be drawn.

HttpGet

Core A Source that reads chunks of data from an URL, using an HTTP request. These chunks are returned as events in the form of strings. It is represented as:

HttpGet

IdentityFunction

Core A Function that returns its input for its output. It is represented as follows:

IdentityFunction

The actual colour of the oval depends on the type of events that the function relays.

IfThenElse

Core A 3:1 Function that acts as an if-then-else. If its first input is true, it returns its second input; otherwise it returns its third input. It is represented as follows:

IfThenElse

Implies

Core A BinaryFunction provided by the Booleans utility class. It computes the logical implication of its two Boolean arguments, and is represented graphically as:

Implies

Insert

Core A Processor that inserts an event a certain number of times before letting the input events through. This processor can be used to shift events of an input trace forward, by padding the beginning of the trace with some dummy element. It is represented graphically as:

Insert

IsEven

Core An UnaryFunction provided by the Numbers utility class. It returns the Boolean value true if and only if its argument is an even number. It is represented as:

IsEven

IsGreaterOrEqual, IsGreaterThan

Core Two BinaryFunctions provided by the Numbers utility class. They return the Boolean value true if their first argument is greater than (or equal to) the second argument. They are represented as:

IsGreaterThan

IsLessOrEqual, IsLessThan

Core Two BinaryFunctions provided by the Numbers utility class. They return the Boolean value true if their first argument is less than (or equal to) the second argument. They are represented as:

IsLessThan

IsSubsetOrEqual

Core A BinaryFunction that receives two sets as arguments, and returns true if the first is a subset of the second. It is represented as:

IsSubsetOrEqual

JdbcSource

JDBC A Source object that executes an SQL query on a JDBC connection, and returns the result as a sequence of tuples. It is represented graphically as:

JdbcSource

JPathFunction

JSON A 1:1 Function that receives a JsonElement as input, and returns a portion of this element as its output. The portion to extract is called a path expression, and corresponds to a specific traversal in the input object. The function is represented graphically as:

JPathFunction

JsonElement

JSON An object representing a part of a JSON document. Specific types of JSON elements are JsonBoolean, JsonList, JsonMap, JsonNull, JsonNumber, and JsonString.

KeepLast

Core A Processor that returns only the very last event of its input stream, and discards all the previous ones. It is represented graphically as:

KeepLast

Limit

Signal A 1:1 Processor that receives a stream of numerical values; if the processor receives a non-zero value, it outputs this value, but will turn the k following ones into 0, whether they are null or not. Graphically, this processor is represented as:

Limit

ListenerSource

Widgets A Source processor that wraps around a Swing component, and pushes ActionEvents or ChangeEvents when user actions are performed on the component. It is represented as a box illustrating the widget that is being wrapped, such as follows:

ListenerSource

Lists

Core A container class for functions and processors applying to ordered collections (Lists) and arrays. Among the processors and functions provided by Lists are: Explode, Pack, TimePack, and Unpack.

Maps

Core A container class for functions and processors applying to Java Maps, i.e. associative key-value arrays. Among the processors and functions provided by Maps are: ArrayPutInto, Get, PutInto, and Values.

Matches

Core A BinaryFunction provided by the Strings utility class. It receives two strings as its arguments, and returns the Boolean value true if the first matches the regular expression defined in the second. It is represented as:

Matches

Maximum

Core A BinaryFunction provided by the Numbers utility class. It returns the maximum of its two arguments. It is represented as:

Maximum

Minimum

Core A BinaryFunction provided by the Numbers utility class. It returns the minimum of its two arguments. It is represented as:

Minimum

MooreMachine

FSM A Processor that receives an event stream and which, upon each input event, updates its internal state according to a deterministic finite state machine. Each state can be associated with an event to output, corresponding to the formal definition of a Moore machine in theoretical computer science. The MooreMachine is depicted by the graph of the FSM it implements; if the graph is too cumbersome, a generic box can be used instead:

MooreMachine

Multiplex

Core A Processor that merges the contents of multiple streams into a single stream. It is an m:1 processor that outputs an event as soon as one is available on one of its input pipes. It is represented graphically as:

Multiplex

Multiplication

Core A BinaryFunction provided by the Numbers utility class. It computes the product of two numbers. It is represented as:

Multiplication

Multiset

Core A Set that preserves the multiplicity of its elements.

Next

LTL A Processor that implements the "next" or X operator of Linear Temporal Logic. If p is an LTL expression, X p stipulates that p should evaluate to true on the suffix of the current trace starting at the next event. It is represented graphically as:

Next

Not

Core An UnaryFunction provided by the Booleans utility class. It computes the logical negation of its Boolean argument, and is represented graphically as:

Not

NumberCast

Core An UnaryFunction provided by the Numbers utility class. It attempts to convert an arbitrary Java Object into a number. It is represented as:

NumberCast

Numbers

Core A container class for functions applying to Java Numbers. Among the functions provided by Numbers are: AbsoluteValue, Addition, Division, IsEven, IsGreaterOrEqual, IsGreaterThan, IsLessOrEqual, IsLessThan, Maximum, Minimum, Multiplication, NumberCast, Power, Signum, SquareRoot, and Subtraction.

NthElement

Core An UnaryFunction that returns the n-th element of an ordered collection (array or list). It is represented graphically as:

NthElement

Or

Core A BinaryFunction provided by the Booleans utility class. It computes the logical disjunction of its two Boolean arguments, and is represented graphically as:

Or

Pack

Core A Processor provided by the Lists utility class. It accumulates events from a first input pipe, and sends them in a burst into a list based on the Boolean value received on its second input pipe. A value of true triggers the output of a list, while a value of false accumulates the event into the existing list. This processor is represented graphically as follows:

Pack

The opposite of Pack in Unpack. See also TimePack.

ParseJson

JSON A Function that turns a character string into a structured object called a JsonElement. The function is represented graphically as:

ParseJson

ParseXml

XML A Function that turns a character string into a structured object called an XmlElement. The function is represented graphically as:

ParseXml

Passthrough

Core A Processor object that lets every input event through as its output. This processor can be used as a placeholder when a piece of code needs to be passed a Processor object, but that in some cases, no processing on the events is necessary. Graphically, this processor is represented as:

Passthrough

PeakFinder

Signal A 1:1 Processor object receives as input a stream of numerical values, and identifies the "peaks" (sudden increases) in that signal. It outputs the value 0 if no peak is detected at the current input position, and otherwise, the height of the detected peak. Graphically, this processor is represented as:

PeakFinder

The Signal palette implements two variants of PeakFinder called PeakFinderLocalMaximum and PeakFinderTravelRise.

Persist

Signal A 1:1 Processor that receives a stream of numerical values; when a processor receives a non-zero value, it outputs it for the next k events, unless a subsequent input value is greater (in which case this new value is output for the next k events). Graphically, this processor is represented as:

Persist

PlateauFinder

Signal A 1:1 Processor object receives as input a stream of numerical values, and identifies the "plateaus" (successive events with similar values) in that signal. It outputs the value 0 if no plateau is detected at the current input position, and otherwise, the height of the detected plateau. Graphically, this processor is represented as:

PlateauFinder

Power

Core A BinaryFunction provided by the Numbers utility class. It computes the first argument, elevated to the power of the second. It is represented as:

Power

Prefix

Core A Processor that returns the first n input events and discards the following ones. It is represented graphically as:

Prefix

Print

Core A Processor that sends its input events to a Java PrintStream (such as the standard output). This processor takes whatever event it receives (i.e. any Java Object), calls its {@link Object#toString() toString()} method, and pushes the resulting output to a print stream. Graphically, it is represented as:

Print

Processor

Core A processing unit that receives zero or more input streams, and produces zero or more output streams. The Processor is the fundamental class where all stream computation occurs. All of BeepBeep's processors are descendants of this class. A processor is depicted graphically as a "box", with "pipes" representing its input and output streams.

Processor

This class itself is abstract; nevertheless, it provides important methods for handling input/output event queues, connecting processors together, etc. However, if you write your own processor, you will most likely want to inherit from its child, SynchronousProcessor, which does some additional work. The Processor class does not assume anything about the type of events being input or output. All its input and output queues are therefore declared as containing instances of Object, Java's most generic type.

Product

Core A 2:1 Function provided by the Bags utility class. This function takes as input two Java Collection, c1 and c2, and returns as its output a set of arrays of size 2, corresponding to the Cartesian product of c1 and c2. It is represented graphically as:

Product

Pullable

Core An object that queries events on one of a processor's outputs. For a processor with an output arity n, there exists n distinct pullables, namely one for each output trace. Every pullable works roughly like a classical Iterator: it is possible to check whether new output events are available, and get one new output event. However, contrarily to iterators, Pullables have two versions of each method: a soft and a hard version. The opposite of Pullables are Pushables --objects that allow users to feed input events to processors. Graphically, a Pullable is represented by a pipe connected to a processor, with an outward pointing triangle:

Pullable

Pull mode

One of the two operating modes of a chain of processors. In pull mode, a user or an application obtains references to the Pullable objects of the downstream processors of the chain, and calls their pull() method to ask for new output events. When using a chain of processors in pull mode, the chain must be closed at its inputs. The opposite mode is called push mode.

Pump

Core A Processor that repeatedly pulls its input, and pushes the resulting events to its output. The Pump is a way to bridge an upstream part of a processor chain that works in pull mode, to a downstream part that operates in push mode.

Graphically, this processor is represented as:

Pump

The repeated pulling of events from its input is started by calling this processor's #start() method. In the background, this will instantiate a new thread, which will endlessly call pull() on whatever input is connected to the pump, and then call push() on whatever input is connected to it.

The opposite of the Pump is the Tank.

Pushable

Core An object that gives events to some of a processor's input. Interface Pushable is the opposite of Pullable: rather than querying events form a processor's output (i.e. "pulling"), it gives events to a processor's input. This has for effect of triggering the processor's computation and "pushing" results (if any) to the processor's output. If a processor is of input arity n, there exist n distinct Pullables: one for each input pipe. Graphically, a Pushable is represented by a pipe connected to a processor, with an inward pointing triangle:

Pushable

Push mode

One of the two operating modes of a chain of processors. In push mode, a user or an application obtains references to the Pushable objects of the upstream processors of the chain, and calls their push() method to feed new input events. When using a chain of processors in push mode, the chain must be closed at its outputs. The opposite mode is called pull mode.

PutInto (Maps)

Core A Processor provided by the Maps utility class. It updates a map by putting key-value pairs into it. The processor takes two input streams; the first contains the key, and the second contains the value that will be put into the array. Upon each input front, it repeatedly outputs a reference to the same internal Map object, updated accordingly. The processor is represented graphically as:

PutInto

See also ArrayPutInto.

PutInto (Sets)

Core A Processor provided by the Sets utility class. Updates a set by putting the elements it receives into it. Upon each input event, it repeatedly outputs a reference to the same internal Set object, updated accordingly. The processor is represented graphically as:

SetPutInto

See also PutIntoNew.

PutIntoNew (Sets)

Core A Processor provided by the Sets utility class. Updates a set by putting the elements it receives into it. Upon each input event, it creates a new instance of Set and adds to it all the events received so far; it then outputs a reference to this new set. The processor is represented graphically as:

SetPutIntoNew

See also PutInto (Sets).

QueueSink

Core A Sink that accumulates events into queues, one for each input pipe. It is represented graphically as:

QueueSink

QueueSource

Core A Source whose input is a queue of objects. One gives the QueueSource a list of events, and that source sends these events as its input one by one. When reaching the end of the list, the source returns to the beginning and keeps feeding events from the list endlessly. The QueueSource is represented graphically as:

QueueSource

RaiseArity

Core A Function that raises the arity of another function. Given an m:n function f, an instance of RaiseArity r makes f behave like an m':n function, with m' > m. The extra arguments given to r are simply ignored. It is represented as:

RaiseArity

Randomize

Core A n:n Processor that turns an arbitrary input event front into an output front made of randomly selected numerical values. The interval in which values are selected can be specified. It is represented graphically as:

Randomize

ReadInputStream

Core A Source that reads chunks of bytes from a Java InputStream. It is represented graphically as follows:

StreamReader

ReadLines

Core A Source that reads entire text lines from a Java InputStream. It is represented graphically as:

ReadLines

ReadStringStream

Core A variant of ReadInputStream that converts the byte chunks into character strings.

RunOn

Core A Processor provided by the Bags utility class. This processor is parameterized by another processor P. It receives as input a stream of collections. On each individual collection c, it resets P, feeds each element of c on P, and retrieves the last event output by P on that stream; this is the event is the event output by RunOn on c. It is represented graphically as:

RunOn

If the collection c is unordered and P is sensitive to event ordering, the output of RunOn on this collection may not always be the same.

Serialize

Serialization A Processor that takes arbitrary objects as its inputs, and turns each of them into a structured character string depicting their content. It is represented graphically as follows:

Serialize

Serialization can be used to store the state of objects on a persistent medium, or to transmit non-primitive data types over a communication medium such as a network. The opposite operation is called deserialization.

Sets

Core A container class for functions and processors applying to Java Sets and their descendents. Among the processors and functions provided by Sets are: IsSubsetOrEqual, PutInto, PutIntoNew, and SetUpdateProcessor.

Signum

Core An UnaryFunction provided by the Numbers utility class. It returns -1 if the argument is negative, +1 if it is positive, and 0 if the argument is the number 0. It is represented as:

Signum

SynchronousProcessor

Core A Processor that performs a computation on input events to produce output events. This is the direct descendant of Processor, and probably the one you'll want to inherit from when creating your own processors. While Processor takes care of input and output queues, SynchronousProcessor also implements Pullables and Pushables. These take care of collecting input events, waiting until one new event is received from all input traces before triggering the computation, pulling and buffering events from all outputs when either of the Pullables is being called, etc. The only thing that is left undefined is what to do when new input events have been received from all input traces. This is the task of abstract method compute(), which descendants of this class must implement.

Sink

Core A Processor with an output arity of zero. It is used to close processor chains in push mode.

SinkLast

Core A variant of QueueSink with a queue of size 1. A SinkLast remembers only the last event sent to it.

Slice

Core A Processor that separates the events from an input stream into multiple "sub-streams". A function f, called the slicing function, dispatches to a copy of P an input event e according to the value of f(e) (there is one copy of P for each possible output value of f). The Slice processor returns a Java Map containing as keys the value of f(e), and as value, the last event returned by the processor P associated to f(e). It is illustrated as:

Slice

Smooth

Signal A Processor that smoothes a stream of numbers by replacing a value by an average over a window of events. It is illustrated as:

Smooth

Source

Core A Processor with an input arity of zero. It is used to close processor chains in pull mode.

Splice

Core A Source that joins multiple sources as a single one. The splice processor is given multiple sources. It pulls events from the first one until it does not yield any new event. It then starts pulling events from the second one, and so on. It is illustrated as:

Splice

SplitString

Core An UnaryFunction provided by the Strings utility class. It receives as string as its input, and returns an array of strings, split according to a given character separator. It is represented as:

SplitString

The comma in the figure is to be replaced by the actual character used to separate the input string.

SquareRoot

Core An UnaryFunction provided by the Numbers utility class. It computes the square root of its argument. It is represented as:

SquareRoot

StartsWith

Core A BinaryFunction provided by the Strings utility class. It receives two strings as its arguments, and returns the Boolean value true if the first string starts with the second. It is represented as:

StartsWith

StreamVariable

Core A Function standing for the i-th stream given as input to a processor. A StreamVariable can be given as an argument to a FunctionTree. It is represented as follows:

StreamVariable

The number inside the diamond represents the stream number. By convention, stream numbers start at 1 in diagrams.

Strings

Core A container class for functions and processors applying to Java Strings. Among the processors and functions provided by Sets are: Concat, Contains, EndsWith, FindRegex, Matches, SplitString, StartsWith and ToString.

Stutter

Core A Processor that repeats each input event in its output a fixed number of times (k; see also VariableStutter). It is represented graphically as:

Stutter

Subtraction

Core A BinaryFunction provided by the Numbers utility class. It computes the difference of two numbers. It is represented as:

Subtraction

Tank

Core A Processor that accumulates pushed events into a queue until they are pulled. The Tank is a way to bridge an upstream part of a processor chain that works in push mode, to a downstream part that operates in pull mode.

Graphically, this processor is represented as:

Tank

The opposite of the tank is the Pump.

TankLast

Core A variant of Tank which, when pulled, creates an output event based on the last event received.

Threshold

Signal A 1:1 Processor that receives a stream of numerical values; the processor outputs an event if its value is above some threshold value k; otherwise it replaces it by 0. Graphically, this processor is represented as:

Threshold

TimeDecimate

Core A Processor which, after returning an input event, discards all others for the next n seconds. This processor therefore acts as a rate limiter. It is represented as:

TimeDecimate

Note that this processor uses System.currentTimeMillis() as its clock. Moreover, a mode can be specified in order to output the last input event of the trace if it has not been output already.

TimePack

Core A Processor provided by the Lists utility class. It accumulates events from a first input pipe, and sends them in a burst into a list at predefined time intervals. This processor is represented graphically as follows:

TimePack

The opposite of TimePack in Unpack. See also Pack.

ToArray, ToList, ToSet

Core Three m:1 Functions provided by the Bags utility class. Their input arity is defined by parameter m. They turn their m arguments into a Java array, list or set of size m. In the case of arrays and lists, the ordering of the arguments is preserved: the i-th argument of the function is placed at the i-th position in the output collection. The following picture shows the graphical representation of each of these functions:

ToArray, ToList, ToSet

ToImageIcon

Widgets An UnaryFunction that converts an array of bytes containing an image, into a Swing ImageIcon. It is represented as:

ToImageIcon

ToString

Core An UnaryFunction provided by the Strings utility class. It attempts to convert an arbitrary Java Object into a String; this is done by calling the object's toString method. It is represented as:

ToString

Transition

FSM An object used by the MooreMachine processor that indicates how the machine can move between its states. It is represented as:

Transition

TransitionOtherwise

FSM A Transition object used by the MooreMachine processor that fires only if none of the other outgoing transitions from the same source state fires first.

TransitionOtherwise

Trim

Core A Processor that discards the first n events of its input stream, and outputs the remaining ones as is. It is represented as:

Trim

Tuple

Tuples A special type of event defined by BeepBeep's Tuple palette, which consists of an associative map between keys and values. Contrary to tuples in relational databases, where values must be scalar (i.e. strings or numbers), the tuples in BeepBeep can have arbitrary Java objects as values (including other tuples).

TupleFeeder

Tuples A Processor that converts lines of text into Tuples. It is represented as:

TupleFeeder

TurnInto

Core A Processor that turns any input event into a predefined object. It is represented graphically as:

TurnInto

UnaryFunction

Core A Function object that has an input and output arity of exactly 1.

Uniform (processor)

A Processor that produces the same number of output fronts for every input front it receives. Occasionally, the number of output fronts produced is explicitly mentioned: a k-uniform processor produces exactly k output fronts for every input front.

Unpack

Core A Processor provided by the Lists utility class. It unpacks a list of objects by outputting its contents as separate events. This processor is represented graphically as follows:

Unpack

The opposite of Unpack is Pack.

Until

LTL A Processor that implements the "until" or U operator of Linear Temporal Logic. If p and q are two streams of Boolean value, p U q stipulates that q should evaluate to true on some future input front, and that until then, p should evaluates to true on every input front. It is represented graphically as:

Until

Values

Core A UnaryFunction provided by the Maps utility class. Given a Map m as its input, it returns a Set made of all the values present in m. It is represented graphically as:

Values

VariableStutter

Core A 2:1 Processor that repeats each input event coming in its first input pipe a number of times defined by the input event coming into its second input pipe. It is represented graphically as:

VariableStutter

Variant

A special class that can be returned by a call to a processor's getInputTypesFor or getOutputType methods. The occurrence of such a type in an input or output pipe disables the type checking step that the Connector class normally performs before connecting two processors together.

Window

Core A Processor that applies another processor on a "sliding window" of events. It takes as arguments another processor P and a window width n. It returns the result of P after processing events 0 to n-1... - Then the result of (a new instance of P) that processes events 1 to n, and so on. It is represented graphically as:

Window

WindowFunction

Core A Processor that applies a function on a "sliding window" of events. It takes a sliding window of n successive input events, passes them to the n-ary function f and outputs the result. It is represented graphically as:

WindowFunction

WriteOutputStream

Core A Sink that writes chunks of bytes to a Java OutputStream. It is represented graphically as follows:

WriteOutputStream

XmlElement

XML An object representing an element of an XML document.

XPathFunction

XML A 1:1 Function that receives an XmlElement as input, and returns a portion of this element as its output. The portion to extract is called a path expression, and corresponds to a specific traversal in the input object. The function is represented graphically as:

XPathFunction

Last updated