Home / Docs

At a glance

Release v0.4.0

Una is a verification-first language for machine-generated software. Its design follows a few visible rules:

una
module events.seating

pub kind Seats = Int in 0..5000

pub kind Availability = SoldOut | Few | Open

pub kind Event
  name: Text
  remaining: Seats

--- Availability bands for an event.
pub availability(e: Event) -> Availability
  ensures e.remaining < 1 implies result is SoldOut
=
  when e.remaining
    in 0..0 -> SoldOut
    in 1..<20 -> Few
    in 20..5000 -> Open

The compiler proves the ensures clause and that the three ranges cover every possible Seats value, before the program runs. The same package runs in the interpreter (una run) or compiles to a native executable (una build).