Dataflow Software Stack
032db78
Master Thesis of Mathijs Saey at the VUB
|
DVM Native Operations. More...
Functions | |
def | dvm_Void |
Return the DVM void type. More... | |
def | dvm_Bool |
Create a DVM Boolean. More... | |
def | dvm_Int |
Create a DVM Integer. More... | |
def | dvm_Float |
Create a DVM Float. More... | |
def | dvm_String |
create a DVM String More... | |
def | dvm_Array |
Create a DVM Array. More... | |
def | dvm_tuple |
Create a DVM Tuple. More... | |
def | dvm_noOp |
Do nothing. More... | |
def | dvm_isVoid |
See if the element is void. More... | |
def | dvm_equals |
Check if 2 elements are equal. More... | |
def | dvm_notEqual |
Check if 2 elements are not equal. More... | |
def | dvm_and |
Logical and. More... | |
def | dvm_or |
Logical Or. More... | |
def | dvm_xor |
Logical xor. More... | |
def | dvm_not |
Negation. More... | |
def | dvm_neg |
Negation. More... | |
def | dvm_abs |
Absolute value. More... | |
def | dvm_add |
Addition. More... | |
def | dvm_sub |
Subtraction. More... | |
def | dvm_mul |
Multiplication. More... | |
def | dvm_div |
Subtraction. More... | |
def | dvm_mod |
Modulo. More... | |
def | dvm_exp |
Exponent. More... | |
def | dvm_floor |
Round down. More... | |
def | dvm_ceil |
Round up. More... | |
def | dvm_min |
Maximum. More... | |
def | dvm_max |
Minimum. More... | |
def | dvm_less |
Smaller than. More... | |
def | dvm_more |
Greater than. More... | |
def | dvm_less_eq |
Smaller or equal than. More... | |
def | dvm_more_eq |
Greatar or equal than. More... | |
def | dvm_str_contains |
See if a string contains a value. More... | |
def | dvm_str_find |
Return the idx of x in str. More... | |
def | dvm_str_upper |
Conver a string to upper case. More... | |
def | dvm_str_lower |
Conver a string to lower case. More... | |
def | dvm_str_sub |
Get a substring. More... | |
def | dvm_str_reverse |
Reverse a string. More... | |
def | dvm_str_append |
Append 2 strings. More... | |
def | dvm_arr_isEmpty |
See if an array is empty. More... | |
def | dvm_arr_length |
Get the length of an array. More... | |
def | dvm_arr_bound |
Get the upper bound of an array. More... | |
def | dvm_arr_empty |
Create an empty array. More... | |
def | dvm_arr_create |
Create an array filled with an element. More... | |
def | dvm_arr_get |
Get an element from the array. More... | |
def | dvm_arr_set |
Create a new array with a different element at idx. More... | |
def | dvm_arr_insert |
Insert elements into an array. More... | |
def | dvm_arr_replace |
Replace elements in an array. More... | |
def | dvm_arr_catenate |
Array concatenation. More... | |
def | dvm_arr_add_front |
Add an element to the start of an array. More... | |
def | dvm_arr_add_back |
Add an element to the back of an array. More... | |
def | dvm_arr_sub |
Get a subset of an array. More... | |
def | dvm_arr_prune |
Create an array with the value of the first array if the value of the second array is true. More... | |
def | dvm_tup_get |
Access an element of a tuple. More... | |
def | dvm_range |
Generate a range. More... | |
Variables | |
dictionary | operations |
Contains references to all the operations. More... | |
DVM Native Operations.
This module defines all of the native DVM operations.
def natives.dvm_Void | ( | ) |
Return the DVM void type.
def natives.dvm_Bool | ( | x | ) |
Create a DVM Boolean.
def natives.dvm_Int | ( | x | ) |
Create a DVM Integer.
def natives.dvm_Float | ( | x | ) |
Create a DVM Float.
def natives.dvm_String | ( | x | ) |
create a DVM String
def natives.dvm_Array | ( | x | ) |
Create a DVM Array.
DVM arrays are indexed starting from 0.
def natives.dvm_tuple | ( | x | ) |
Create a DVM Tuple.
DVM Tuples are indexed start from 0
def natives.dvm_noOp | ( | x | ) |
Do nothing.
x | Any number of inputs |
def natives.dvm_isVoid | ( | x | ) |
See if the element is void.
x | A parameter of any type. |
def natives.dvm_equals | ( | l, | |
r | |||
) |
Check if 2 elements are equal.
l,r | parameters of any type. |
def natives.dvm_notEqual | ( | l, | |
r | |||
) |
Check if 2 elements are not equal.
l,r | parameters of any type. |
def natives.dvm_and | ( | l, | |
r | |||
) |
Logical and.
l,r | booleans |
def natives.dvm_or | ( | l, | |
r | |||
) |
Logical Or.
l,r | booleans |
def natives.dvm_xor | ( | l, | |
r | |||
) |
Logical xor.
l,r | booleans |
def natives.dvm_not | ( | x | ) |
Negation.
x | a boolean |
def natives.dvm_neg | ( | x | ) |
Negation.
x | a number |
def natives.dvm_abs | ( | x | ) |
Absolute value.
x | a number |
def natives.dvm_add | ( | l, | |
r | |||
) |
Addition.
l,r | numeric parameters |
def natives.dvm_sub | ( | l, | |
r | |||
) |
Subtraction.
l,r | numeric parameters |
def natives.dvm_mul | ( | l, | |
r | |||
) |
Multiplication.
l,r | numeric parameters |
def natives.dvm_div | ( | l, | |
r | |||
) |
Subtraction.
l,r | numeric parameters |
def natives.dvm_mod | ( | l, | |
r | |||
) |
Modulo.
l,r | numbers |
def natives.dvm_exp | ( | l, | |
r | |||
) |
Exponent.
l,r | numbers |
def natives.dvm_floor | ( | x | ) |
Round down.
x | A number |
def natives.dvm_ceil | ( | x | ) |
Round up.
x | A number |
def natives.dvm_min | ( | l, | |
r | |||
) |
Maximum.
l,r | numeric parameters |
def natives.dvm_max | ( | l, | |
r | |||
) |
Minimum.
l,r | numeric parameters |
def natives.dvm_less | ( | l, | |
r | |||
) |
Smaller than.
l,r | numbers |
def natives.dvm_more | ( | l, | |
r | |||
) |
Greater than.
l,r | numbers |
def natives.dvm_less_eq | ( | l, | |
r | |||
) |
Smaller or equal than.
l,r | numbers |
def natives.dvm_more_eq | ( | l, | |
r | |||
) |
Greatar or equal than.
l,r | numbers |
def natives.dvm_str_contains | ( | str, | |
x | |||
) |
See if a string contains a value.
str,x | strings |
def natives.dvm_str_find | ( | str, | |
x | |||
) |
Return the idx of x in str.
str,x | strings |
def natives.dvm_str_upper | ( | str | ) |
Conver a string to upper case.
str | a string |
def natives.dvm_str_lower | ( | str | ) |
Conver a string to lower case.
str | a string |
def natives.dvm_str_sub | ( | str, | |
start, | |||
stop | |||
) |
Get a substring.
str | a string |
start | the index to start at. |
stop | the index to stop at. |
def natives.dvm_str_reverse | ( | str | ) |
Reverse a string.
str | a string |
def natives.dvm_str_append | ( | l, | |
r | |||
) |
Append 2 strings.
l,r | strings |
def natives.dvm_arr_isEmpty | ( | arr | ) |
See if an array is empty.
arr | the array |
def natives.dvm_arr_length | ( | arr | ) |
Get the length of an array.
arr | An array |
def natives.dvm_arr_bound | ( | arr | ) |
Get the upper bound of an array.
arr | An array |
def natives.dvm_arr_empty | ( | ) |
Create an empty array.
def natives.dvm_arr_create | ( | length, | |
fill | |||
) |
Create an array filled with an element.
length | the length of the array |
fill | the element to fill the array with |
def natives.dvm_arr_get | ( | arr, | |
idx | |||
) |
Get an element from the array.
arr | the array to taken an element from |
idx | the indes to access |
def natives.dvm_arr_set | ( | arr, | |
idx, | |||
el | |||
) |
Create a new array with a different element at idx.
arr | the array |
idx | the index to modify |
el | the element to insert |
def natives.dvm_arr_insert | ( | arr, | |
idx, | |||
el | |||
) |
Insert elements into an array.
e.g:
test = [1,2,3] >>> natives.dvm_arr_insert(test, 1, 'a', 'b') [1, 'a', 'b', 2, 3]
arr | the array |
idx | the start index |
el | the elements to include. |
def natives.dvm_arr_replace | ( | arr, | |
idx, | |||
el | |||
) |
Replace elements in an array.
Similar to dvm_arr_insert, but replaces the elements starting at idx.
e.g:
test = [1,2,3] >>> natives.dvm_arr_replace(test, 1, 'a', 'b') [1, 'a', 'b']
arr | the array |
idx | the start index |
el | the elements to include. |
def natives.dvm_arr_catenate | ( | l, | |
r, | |||
rest | |||
) |
Array concatenation.
l,r | arrays. |
rest | (optional) other arrays to concatenate. |
def natives.dvm_arr_add_front | ( | arr, | |
el | |||
) |
Add an element to the start of an array.
arr | An array |
el | The element to add. |
def natives.dvm_arr_add_back | ( | arr, | |
el | |||
) |
Add an element to the back of an array.
arr | An array |
el | The element to add. |
def natives.dvm_arr_sub | ( | arr, | |
start, | |||
stop | |||
) |
Get a subset of an array.
arr | An array |
start | The idx to start at. |
stop | The idx to stop at. |
def natives.dvm_arr_prune | ( | arr, | |
bools | |||
) |
Create an array with the value of the first array if the value of the second array is true.
arr | The array to gather elements from. |
bools | An array of booleans. |
def natives.dvm_tup_get | ( | tup, | |
idx | |||
) |
Access an element of a tuple.
tup | A tuple |
idx | An integer |
def natives.dvm_range | ( | start, | |
stop | |||
) |
Generate a range.
start,stop | The lower and upper bounds of the range |
dictionary natives.operations |
Contains references to all the operations.