|Computational class||Turing complete?|
KEA-stream is a language based on data streams.
The language was inspired by the EV3-g where cables are used to connect action blocks.
In its original version, the KEA-stream is first compiled in KEA, an instruction language
This program prints out the words Hello World!
"Hello World!" > print
In this example 3 passes into the pow2 function, then is stored in the variable
3 > pow2 > $result > print
Which can be coded in python with
result = pow2(3) print(result)
This simple program uses multi stream with the and function which takes 2 inputs.
1, 0 >> and > $exit
Example of recreation of the XOR gate.
0, 1 >> $a, $b >> not, not >> $not_a, $not_b $a, $not_b, $b, $not_a >>>> and, and >> or > print
function that calculates the factorial of a number (see keyword below)
FUNC factorial $to 1 > $exit $to > $i > LOOP $exit * $i > $exit $i - 1 > $i END $exit > RETURN
All keywords are capitalized.
$turns > LOOP "hi" > print END
$bool > IF "true" > print END
- functions can return a single value. RETURN acts like END
FUNC name $ar1$arg2 $arg1 + $arg2 > RETURN
The code is parsed word by word without applying priority for example
1 + 2 != 1 + 2 > print
it will display 3 because:
1 + 2 → 3
3 != 1 → 1
1 + 2 → 3