keleusma 0.2.2

Total Functional Stream Processor with definitive WCET and WCMU verification, targeting no_std + alloc embedded scripting
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Primitives and operators.
//
// Run: keleusma run examples/scripts/01_arithmetic.kel
// Expected output: 24

fn square(x: Word) -> Word {
    x * x
}

fn main() -> Word {
    let a: Word = 3;
    let b: Word = 4;
    let sum_of_squares = square(a) + square(b);
    let scaled = sum_of_squares - 1;
    scaled
}