RealtimeSanitizer for Rust
steck.tech
steck.tech
When you think about it, it's a lot like a type system.
I haven't worked with realtime systems, but I have other constraints. E.g. I want the memory usage of a function to stay within x kilobytes, or I want an api call to return within a second, or I want to ensure there is no PII being sent to the logs.
I sincerely hope that in the future we'll have languages that cater to these kind of constraints. Think function coloring on steroids. This way the compiler can help figure out problems and we need way less tests.
But the problem then is that the existence of recursion in every language means that even if you know the size of every function's stack, you can still have an arbitrary amount of stack usage due to recursive function calls, so you need to forbid recursion as well.
And that only gives you guarantees WRT to the stack, so you'll probably also want to forbid general heap allocations (possibly replacing them with some fixed-size static buffers).
It would be great if we can mark some functions as non-Turing-complete, and avoid recursion. Would make it easier to reason about them.
Super crude but useful sometimes.
0: https://github.com/google/wuffs/blob/main/doc/wuffs-the-lang...