Shared Flashcard Set

Details

Data Streams - Test II
Study material for Data Streams class
6
Other
Undergraduate 4
11/06/2013

Additional Other Flashcards

 


 

Cards

Term
Tuple
Definition

A tuple is a sequence of attributes. Each attribute in the sequence is named.For example, the type declaration:


       type Data  = uint32 payloadLength, float64 diffSeconds, uint32 newSourceIP;


defines Data to be a tuple, and the 3 attributes are named payloadLength, diffSeconds and newSourceIP.


An attribute in a tuple is referenced by name. For example, the following statement assigns the attribute payloadLength to have the value stored in the variable x:

 

       data.payloadLength = x;

Term
Lists
Definition

A list on the other hand, is a zero-index sequence, which means that the elements in the list are referenced using an index. For example,

       mutable list <int32> SourceIPCount = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];

 

intitializes SourceIPCount to be a list with 15 elements, all of which are 0. The first element is set to 12 using the statement SourceIPCount[0]=12. Note that 0 is the index of the first element (hence, the term zero-indexed).

Term
Data Stream
Definition

 

A data stream is an infinite sequence of tuples. It is often useful to use a past value; for example, suppose that Predictor is a tuple and the attribute names are mu0, mu1, mu2,. . .,mu8. The past value of Predictor.mu2 received or computed 200 tuples previously is referenced from the invocation: Predictor[200].mu2.

Term
SPL
Definition

 

SPL is strongly typed, which means that a variable’s type must be declared and cannot be changed by assigning a value of a different type, For example, the declaration mutable <float64> flt; declares flt to be 64-bit floating point number, hence, the statement flt = 2; will create a compilation error (since 2 is, by default an (signed) integer). We may convert flt to a 32-bit integer however, using the statement anInteger = (int32)flt. The general form is is x = (type)y;, where type is one of int32, decimal64, float32, etc.

Term
If-then, if-then-else
Definition

 

if-then and if-then-else: The purpose of these constructs is to instruct your program to execute a section of code only if a particular test evaluates to true. The structure insures that a statement is executed only if the test statement is true. If an else clause statement is present, then one of two statements will executed based on the test statement.

Supporting users have an ad free experience!