Programs using guard blocks
5 verified Soma programs that use guard blocks. Start from one of these when you write a program that needs it.
| Program | Lines | Uses |
|---|---|---|
| Order lifecycle as a verified state machine: an order flows from new to filled or rejected, and a fill settles | 63 | a state machine, guard blocks |
| Robot cell gate — full-speed automation only behind a closed gate | 84 | a state machine, a memory invariant, try / catch, guard blocks |
| Refund agent — an LLM decides, the language decides what it may do | 162 | a state machine, a memory invariant, an agent cell, a sum type, LLM calls (think), match, try / catch, guard blocks, require / fail, a cost bound, tools |
| Warehouse reservations — two cells: a stock ledger with hard bounds and a reservation lifecycle with a supervisor guard, behind one HTTP router | 187 | a state machine, a memory invariant, HTTP routes, match, try / catch, guard blocks, require / fail, several cells, a whole verified service |
| Wildcard failure — `* -> failed` with an `eventually` property | 68 | a state machine, a memory invariant, guard blocks, require / fail |