Sierra is an intermediate representation between high level Cairo and compilation targets, such as CASM. Sierra code is guaranteed to be "safe"* by construction. Sierra has a primitive, yet rich typing system to express all high level code while guaranteeing safety and allowing for efficient compilation down to the target.
Safety - this means a few things:
- There are no "panics" / "runtime errors". Every function is guaranteed to return.
- There are no infinite loops. Moreover, every program "counts" its own steps, and returns when the limit is reached.
- Builtin library functions are always used correctly.