Spidle Homepage



Spidle: Stream processing interface definition language

Spidle is a domain-specific language (DSL) for specifying streaming application, that offers high-level and declarative constructs which improve robustness. Spidle is a flow-based language to describe the paths through which stream items are propagated and processed by stream tasks; It include a stream-specific declarations to perform dedicated verifications and optimizations, an interface language for re-use of existing stream filter libraries; and it's a module-based language to enable the decomposition of streaming application into manageable components.

An Overview of Spidle

A Spidle program essentially defines a network of stream tasks. Flow declarations specify how stream items flow within stream tasks (nodes) and across stream tasks (edges). Presents two abstractions to address the flow aspects of streaming application:

1.Streams: Declared by stream task using the construct stream and define what type of items flow in stream and how they flow by in , out , inout , in! (stream in with a side effect)key words.

Example:
stream inout int16[40] e;

This declaration specifies that the values of int16[40], flow both in and out of corresponding stream task.

2.Mappings: A mapping defines how stream items flow across stream tasks, it can be:
a- one-one;
b- one-many;
c- many-one;
A single mapping declaration is always written as follows:
source stream -> destination stream ;

example:
map {

{0,0,0,0,0} # si # {0,0,0,0,0 } -> so;
}

A stream task can either be a connector or a filter:

1. connector: Connectors represent common patterns of values propagation, There are tow kinds of connectors: merger and splitters. A merger fuses idependent streams into a unique output stream. A splitter performs the opposite operation. below an example of merger from GSM specification:

merger Frame_Merger {
interface {
stream in bit[7] nc;
stream in bit[2] bc;
stream in bit[2] Mc;
stream in bit[13][3] xMc;
stream in bit[6] xmaxc;
stream out bit[56] bits;
}
map {
nc # bc # Mc # xmaxc # xMc -> bits;
}
}

2.filter: Filters correspond to transducers; they can either be primitive, when it refers to an operation implemented in some foreign programming language, compound, when it consists of a stream tasks.

a- compound filter: A compound filter contains 4 clauses:
* - interface: In which are grouped streams declarations.
* - import: which refers to the Spidle files containing the needed stream tasks.
* - instantiate: defines tasks instance used in this filter.
* - map: defines mappings declarations.

example: RPE_Encoding compound filter from GSM encoder specification

filter RPE_Encoding {
interface {
stream inout bit[40][16] e;
stream out bit[13][3] xMc;
stream out bit[1][6] xmaxc;
stream out bit[1][2] Mc;
}
instantiate {
merger Padding pad;
filter Weighting w;
filter RPE_Grid_Selection gs;
filter APCM_Quantization q;
filter APCM_Inverse_Quantization iq;
filter RPE_Grid_Positioning gp;
}
map {
e -> pad.si;
pad.so -> w.e;
w.x -> gs.x;
gs.xM -> q.xM;
gs.Mc -> gp.Mc;
gs.Mc -> Mc;
q.man -> iq.mant;
q.exp -> iq.exp;
q.xMc -> iq.xMc;
q.xMc -> xMc;
q.xmaxc -> xmaxc;
iq.xMp -> gp.xMp;
gp.ep -> e;
}

}

b- primitive filter: it contains 3 clauses:

* - interface: In which are grouped streams declarations.
* - import: which refers to files written in some other programming language.
* - run : in which foreign function is invoked.

example: Weighting Filter from GSM encoder

filter Weighting {
interface {
stream in   bit[50][16] e ;
stream out   bit[40][16] x ;
}
import {
func Weighting_filter from "rpe.c";
}
run {
Weighting_filter (e, x);
}
}


Reference manual:

    Below a short technical report of the langage Spidle en PDF format:
    spidle  manual

Related Papers:



Examples of streaming applications specifications

                  Preprocessing
                  LPC Analysis
                 Short term analysis
                 LAR output
                 Long Term predictor
                 RPE encoding
                 gsm encoder
                 frame process                    GSM 06.10