Safe · Proved · Fast

Code proved correct,
compiled to native speed.

Verada is a compiler and program prover in the spirit of Ada, the language NVIDIA chose for its security-critical firmware. Write it with braces like C or Rust, as typed Python, or in Ada's own syntax. Verada proves there is no overflow, no out-of-bounds index and no broken contract, then compiles your program to native code.

Safe

Types that mean something

Strong static types, with ranges you declare: a percentage is 0 to 100 and the compiler holds you to it. No undefined behaviour, no null dereferences, no garbage collector.

Proved

Checked before it runs

Every contract and every run-time check is proved when you build, with no separate tool to remember. When a proof fails, you get the input that breaks it.

Fast

Native, with nothing left to check

Verada compiles through LLVM to native code. A check that is proved is removed from the binary, so the safety costs nothing at run time.

A first program

Pick the syntax
that reads like home.

The same small package, with a contract on each function, in each of Verada's three syntaxes. All three prove every check, run the same way and print the same output.

package Counters {
    pub fn clamp(value, low, high: Integer) -> Integer
        requires low <= high
        ensures result in low..=high
    {
        if value < low {
            return low;
        } else if value > high {
            return high;
        }
        return value;
    }

    pub fn increment(count: inout Natural)
        requires count < Natural::Last
        ensures count == old(count) + 1
    {
        count += 1;
    }
}
from verada import Natural, ensures, requires, result


def clamp(value: int, low: int, high: int) -> int:
    requires(low <= high)
    ensures(low <= result <= high)
    if value < low:
        return low
    elif value > high:
        return high
    return value


def increment(count: Natural) -> Natural:
    requires(count < Natural.last)
    ensures(result == count + 1)
    return count + 1
package Counters is

   function Clamp (Value, Low, High : Integer) return Integer
     with Pre  => Low <= High,
          Post => Clamp'Result in Low .. High;

   procedure Increment (Count : in out Natural)
     with Pre  => Count < Natural'Last,
          Post => Count = Count'Old + 1;

end Counters;
package body Counters is

   function Clamp (Value, Low, High : Integer) return Integer is
   begin
      if Value < Low then
         return Low;
      elsif Value > High then
         return High;
      else
         return Value;
      end if;
   end Clamp;

   procedure Increment (Count : in out Natural) is
   begin
      Count := Count + 1;
   end Increment;

end Counters;
terminal
$ veradic prove
proved 14 of 14 checks in 3 subprograms (5 statically, 9 by the solver)

$ veradic run
hits: 2
clamped: 10

requires and ensures are the contract: what a caller must promise, and what the function promises back. veradic prove checks the contracts, then veradic run reuses those proofs and runs the program. veradic build proves and links a native executable.

Bring what you know

Your instincts,
Ada's guarantees.

You don't have to learn Ada's syntax to get Ada's safety. Verada is one language with three spellings, and a project can mix all three: they share one prover, one compiler and one set of guarantees.

From C, C++, Rust or Go · .va

Varc

Braces, fn, let and var, pub, and method chains like xs.filter(x => x > 0).sum(). A call marks what it may change, increment(&hits), and forgetting the & is an error with a fix-it.

From Python · .vb

Vibe

Typed Python, with lists, range, classes and generators. Contracts are ordinary calls, requires(...) and ensures(...), so a Vibe program is still a Python program: CPython prints what the native build prints.

From Ada · .vads · .vadb

Vada

Ada's syntax and meaning, with contracts built in. A proved Vada program is normally Ada that GNAT also compiles, and Verada's test suite holds it to GNAT and GNATprove. Verada and standard Ada lists the differences.

veradic translate

Move between them at any time.

veradic translate --to vada translates Varc or Vibe source files to Ada. Choose --to varc or --to vibe for the other spellings. Start in the syntax your team knows, and hand the proved Ada to anyone who needs it.

New: APL inside

A whole algorithm
on one line.

APL is the language that writes a mean as ⌊ (+/ X) ÷ ≢ X. Verada reads it inside Varc, Vibe or Ada, over your own typed arrays, and proves it like any other code: shapes match, sums cannot overflow, preconditions hold at every element. Then it compiles to the loops you would have written by hand.

//  APL one-liners as functions, with the contracts that let them prove.
package Stats {
    import Ada.Text_IO;
    pub subtype Small = Integer range -100..=100;
    pub type Vector = [Positive..]Small;
    pub type Values = [Positive..]Integer;
    pub type Table = [Positive.., Positive..]Small;

    //  the mean, rounded down: sum, count, divide, floor
    pub fn Mean(X: Vector) -> Integer
        requires X::Length in 1..=1000
    = apl"⌊ (+/ X) ÷ ≢ X";

    pub fn Dot(X, Y: Vector) -> Integer
        requires (X::Length == Y::Length) & (X::Length <= 1000)
    = apl"+/ X × Y";

    //  a local dfn: the sum of squares less the count
    pub fn Spread(X: Vector) -> Integer
        requires X::Length <= 100
    = apl"sq ← {⍵ × ⍵} ⋄ (+/ sq X) - ≢ X";

    //  the values above a limit, in order
    pub fn Above(X: Vector, Limit: Small) -> Values
        requires X::Length <= 1000
    = apl"(X > Limit) / X";

    pub fn Sorted(X: Vector) -> Values = apl"X[⍋ X]";

    //  a multiplication table, N by N
    pub fn Times(N: Natural) -> Table
        requires N <= 10
        ensures (result::Length(1) == N) & (result::Length(2) == N)
    = apl"(1 + ⍳ N) ∘.× 1 + ⍳ N";

    //  each row's total
    pub fn Totals(T: Table) -> Values
        requires T::Length(2) <= 1000
    = apl"+/ T";

    pub fn Show(Label: String, V: Values) {
        Ada.Text_IO.Put(Label);
        Ada.Text_IO.Put(":");
        for E in V {
            Ada.Text_IO.Put(Integer::Image(E));
        }
        Ada.Text_IO.New_Line();
    }
}
terminal
$ veradic run
mean: 3
dot: 107
spread: 127
above 3: 4 5 9
sorted: 1 1 3 4 5 9
table totals: 10 20 30 40

Why Ada

The safe language
that was here first.

Ada was designed for software that must not fail, and SPARK adds proof on top. Both are having a moment, for good reasons.

Chosen by NVIDIA for security-critical firmware

NVIDIA moved security-critical firmware for its GPUs from C to SPARK, the provable form of Ada that Verada is built around. Its engineers reported generated code as fast as their C, and with every property proved, no run-time checks to pay for.

Sources: AdaCore case study , DevClass

Rust-grade safety, without fighting a borrow checker

Ada's parameter modes, in, out and in out, let the compiler decide how to pass a value, so most code never touches a pointer and there are no lifetimes to annotate. Where you do use pointers, ownership rules like Rust's apply, and only there.

Proof, not just memory safety

Memory safety rules out one class of bug. SPARK goes further: it proves your program has no overflow, no out-of-range value and no division by zero, and that it does what its contracts say.

Mature, standard and battle-tested

Ada is an ISO standard, now Ada 2022, with decades of use in avionics, rail and space. Verada's Vada syntax is Ada's, and a proved Vada program is normally Ada that GNAT also compiles, so what you write is not locked in.

When a proof fails

The input that breaks it.

Take the requires line out of Varc's increment and the proof fails. Verada doesn't just say "might overflow": it finds the values that break the program, replays them to show the failure is real, and proposes the precondition that excludes exactly those values, already proved to be enough.

Every diagnostic is numbered, and veradic explain B4101 prints what it means and what to do. Diagnostics come as text or as JSON for editors and agents.

terminal
$ veradic prove
error[B4101]: overflow check fails
  --> src/counters.va:17:15
   |
17 |         count += 1;
   |               ^^^^ might overflow `Integer` (-9223372036854775808 .. 9223372036854775807)
   |
   = note: replaying these values on the program reaches this check and it fails
   = counterexample: fails when count = Integer::Last
   = failing inputs: exactly count = Integer::Last
   = help: a precondition `count <= 9223372036854775806` on `Counters.increment` excludes exactly the values that fail, and is proved to make this check pass

1 error emitted
proved 11 of 12 checks in 3 subprograms (4 statically, 7 by the solver)

Beyond SPARK

The same contracts.
A prover that does more.

SPARK made proved Ada an industrial reality. Verada keeps Ada's contracts, and builds the prover into the compiler.

Verada beta SPARK with GNATprove
When proof runs Default build A separate analysis
Proved checks Removed from the code Kept, or all switched off
Counterexamples Replayed, minimised, with proved fixes Checked by execution, with hints
Shared pointer structures Proved in enclaves Trusted library
Generics Proved once for every instance Each instance analysed

What is proved

Proof is a phase
of compilation.

A default build succeeds only when flow analysis passes and every verification condition is discharged. There is no separate tool to remember to run, and no gap between the program that was proved and the program that ships.

Run-time checks

Every check Ada makes — overflow, range, index, division by zero, null, discriminants, tags, lengths — is proved never to fail. Proved checks are left out of the code, and LLVM is told the arithmetic they guard cannot wrap.

Contracts

Pre and Post, Contract_Cases, Exceptional_Cases, loop invariants and variants, type invariants, predicates and assertions. Ghost code and mathematical models exist for proof only and are erased.

Flow

Every variable is initialised before it is read, Global and Depends tell the truth, and ownership rules hold for access values, so there is no aliasing the prover cannot see.

Concurrency

Ada 2022's Jorvik profile: tasks and protected objects. Verada proves there are no data races, no blocking inside protected actions, and that priority ceilings are respected.

Exceptions

A procedure may propagate only the exceptions its Exceptional_Cases list, with their consequences proved. Any other raise must be proved unreachable, and checks never raise at all.

Devices

Volatile objects with SPARK's external properties, objects at fixed addresses, and overlays the prover can trust: the groundwork for drivers and embedded code.

See them at work in the examples: pipelines with generated loop invariants, Python lists with proved bounds, and tasks proved free of data races.

The Verada IDE

Your workspace.
One command.

Run veradic ide to bring your project into a browser: source tabs, compiler diagnostics, Check, Prove, Build and Run. Explore a REPL and read the Guide beside your code. Files and the compiler stay on your computer.

An optional AI Assistant can explain your code and propose edits for review, backed by the same compiler checks and full proof.

The Verada browser IDE with a project explorer, source editor and project tools
Open an existing folder, or create a project and its directory with veradic ide new. Vada, Varc and Vibe share the same workspace tools. Select the image to view it full size.

One command

Everything in
veradic.

The IDE, project builder, compiler, prover, JIT, REPL, formatter, translator and language server are one program. In the command-line REPL, proof is advisory and run-time checks stay on, so a failed check is reported and you're back at the prompt.

veradic repl --syntax varc
$ veradic repl --syntax varc
verada> import Counters; use Counters;
verada> var hits = Natural::Last;
verada> clamp(42, 0, 10)
 10
verada> increment(&hits);
<input 4>:1:12: run-time check failed [B5101]: the precondition of `increment` might not hold
warning[B5101]: precondition might fail at a call
  --> <input 4>:1:12
   |
 1 | increment(&hits);
   |            ^^^^ the precondition of `increment` might not hold
   |
  ::: src/counters.va:15:18
   |
15 |         requires count < Natural::Last
   |                  --------------------- precondition
   |
   = note: advisory mode: this is checked when the program runs

1 warning emitted

The IDE's AI Assistant

Help with the next edit.

Ask the optional AI Assistant to explain your code or propose a change. Before you can apply an edit, it must pass Check and full proof against the project's contracts and supported run-time safety checks. You review the changes, then choose when to save or run them. Configure an installed runtime and model provider to enable the Assistant.

Set up the Assistant
The Verada IDE with an Assistant-generated Pythagorean triple printer in Vibe (typed Python)
The AI Assistant proposes a Vibe program to print Pythagorean triples up to n = 30, including scaled triples. Changes pass Check and full proof before Apply; Run remains an explicit action. Select the image to view it full size.
The Verada owl, perched on a leafy branch

The documentation

Learn it. Look it up. Keep a copy.

A Programmer Guide to get started, with references for the language, verification and tools. Read online or download the PDF manuals.

Status

The beta is here.

Verada's beta package for macOS on Apple silicon includes the compiler, Z3, the VS Code extension and examples. Get in touch for access, then follow the Beta Quick Start. Verada is still under active development; feedback from real projects helps shape it.