next up previous contents
Next: Exceptions Up: Overflow User's Manual Previous: Getting Started with vflow   Contents

Subsections

Using nodes

This section presents different Overflow nodes categories. The nodes categories are divided in two by level of diffiuclty: the Basic Nodes and the Advanced Features. For every category (no matter its level of difficulty), at least one of his node is explained and given in example. For every example, you can find the corresponding program in the directorie: FreeSpeech/examples .

Basics nodes

Lets get started with the nodes that are the most popular for new users, that is, the most important to understand.

Category: General

As the name mentions, this category contains nodes that you find frequently in programs.

Constant

Among the nodes of this category, the most often used is certainly the node ``Constant''. Figure [*] shows how you can make Overflow write ``Hello World!'' in the status window. Yes, it's simply a constant string (using Constant node) with an output label attached to it.

Figure: Hello World!
Image overflow_hello.png

Note that you can try out this program by clicking on the open icon and select: FreeSpeech/examples/hello.n .

In the previous example, the node ``Constant'' took the data type ``string'', however, the node can take other data types. Here is a list of all data types that a node ``Constant''can take:

Category: IO

This category concerns mainly the use of streams for reading, loading and saving data of any kind.

Save

This example is used to save an object in a file or a network stream. Figure [*] shows that the nod Save takes two inputs: an object to save and an Overflow write stream where to save the object. The write stream is opened using the OutputStream node which takes a file name as input (allo.sdw).

Figure: I/O with Overflow
Image overflow_IO.png

Note that you can try out this program by clicking on the open icon and select: FreeSpeech/examples/save.n .

Category: Logic

This categroy contains nodes that proceed logical operations such as: AND, OR, NOT, IF etc...

IF

On of the most important control structure in a language is conditional branching. Figure [*] shows an IF statement in Overflow. The node IF pulls his input from the terminal then or else depending on whether the condition is true or false. When the condition is true, it pulls the terminal then and when the condition is false, it pulls the terminal else. In both cases, the terminal pulled is returned as the output of the IF.

Figure: If/then/else with Overflow
Image overflow_if.png

Note that you can try out this program by clicking on the open icon and select: FreeSpeech/examples/demo_if.n .

Category: Operator

This categroy contains nodes that proceed arithmetic operations such as: ADD, DIV, EQUAL, MIN, etc...

MIN

Figure [*] shows a MIN statement in Overflow. The node MIN compares its two inputs and return the minimum between the two values.

Figure: Min with Overflow
Image overflow_min.png

Note that you can try out this program by clicking on the open icon and select: FreeSpeech/examples/min.n .

Category: Probes

This categroy contains nodes that proceeds data plotting and printing. It also helps for debugging by allowing to ``trace'' programs initializations, requests, inputs and exceptions.

textProbe

Figure [*] shows an Overflow program that uses textProbe. That way, textProbe shows the program results as text in a box. In iterators, textProbe allows to show the program result for every new iteration by clicking on the icon Next.

Figure: textProbe with Overflow
Image overflow_textProbe.png

Note that you can try out this program by clicking on the open icon and select: FreeSpeech/examples/textProbe.n .

Category: Vector

This categroy contains nodes that proceed operations on vectors such as: SUM, CONCATENATE, LENGTH, DCVECTOR, etc...

DCVector and SUM

Figure [*] shows an Overflow program that creates a vector and make the summation of all its objects. For creating a DCVector you must specify the number of objects you want it to contain (the length) and the value you want all the objects to take (the value). The node SUM, add all of the objects given by the vector at his input and return the result.

Figure: Using a vector with Overflow
Image overflow_vector.png

Note that you can try out this program by clicking on the open icon and select: FreeSpeech/examples/vector.n .

Advanced features

The following categories of nodes presented are more complex than the others and not necesserely useful for every user. That's the reason why they are placed in this section.

Category: DSP

This category was created for Speech recognition and voice treatment.

Category: Flow

Feed-back Loops

In some circumstances, it is desirable to insert feed-back loops into a program. Normally, Overflow only supports acyclic graphs, but feed-back loops can be made using the special Feedback node. Figure [*] shows an Overflow program that uses a Feedback node. At the beginning, the constant ``1'' is added to ``0'' and then, at every iteration, the result of the addition is added to the same constant ``1''.

Figure: Feed-back Loop with Overflow
Image overflow_feedback.png

Note that you can try out this program by clicking on the open icon and select: FreeSpeech/examples/demo_feedback.n .

Multi-threading

It must first be noted that multi-threading in Overflow is still an experimental feature and not all structures are fully MT-safe. Overflow multi-threading is provided through three special nodes: SerialThread, ParallelThread and ThreadJoin.

SerialThread

The SerialThread node provides pipeline-type multi-threading. A thread is started and computes inputs before they are needed by the output node.

ParallelThread

The ParallelThread node provides parallelism-type multi-threading. When asked for an input, it computes both inputs at the same time and caches the other.

ThreadJoin

The ThreadJoin node acts like a mutex and prevents two Overflow threads from accessing the same (input) node at the same time.

Figure [*] shows an example of Overflow program that uses multi-threading.

Figure: Feed-back Loop with Overflow
Image overflow_thread.png

Note that you can try out this program by clicking on the open icon and select: FreeSpeech/examples/mixedthread.n .

Category: Fuzzy

Category: HMM

Category: Matrix

As the name mentions, this category is about matrix, that is, two dimensions vector. Figure [*] shows an example of Overflow program that create matrix and use it with the node MProduct.

Figure: Matrix with Overflow
Image overflow_matrix.png

Note that you can try out this program by clicking on the open icon and select: FreeSpeech/examples/matrix.n .

Category: NNet

Category: Network

Category: RobotFlow

Category: VQ


next up previous contents
Next: Exceptions Up: Overflow User's Manual Previous: Getting Started with vflow   Contents
Jean-Marc Valin 2002-06-17