Verifex is an experimental programming language and compiler that treats correctness as a first‑class feature. It combines a simple, familiar syntax with powerful concepts that let you catch entire classes of bugs at compile time, eliminate nasty surprises, and encode business logic directly in your types.
If that sounds interesting, you can read a quick tutorial and try Verifex for yourself over at VerifexPad.
VerifexProject/
├── Verifex/ # Compiler implementation (parsing, analysis, codegen)
├── Verifex.Tests/ # xUnit test suite (tokenizer, parser, verification passes)
├── VerifexPad/ # Playground app (backend + React UI) and language reference
├── CODEBASE.md # In‑depth codebase guide for contributors
└── README.md # You are here
- Just a .NET 9 SDK or later (compiler targets
net9.0).
Clone the repo, then:
dotnet restore Verifex.sln
dotnet build Verifex.slnCompile a Verifex source file into a .NET executable:
dotnet run --project Verifex -- path/to/program.vfxThe compiler emits program.exe plus a .runtimeconfig.json next to your source file.
type NonZeroReal = Real where value != 0;
fn divide(a: Real, b: NonZeroReal) -> Real {
return a / b;
}
fn try_divide(num: Real, denom: Real) -> Real or String {
if (denom != 0)
return divide(num, denom);
else
return "denominator was zero";
}The verifier tracks the if (denom != 0) guard, proves denom is a NonZeroReal inside the true branch, and warns if any path may still divide by zero.
Run all tests:
dotnet test Verifex.slnThe suite currently covers tokenization, parsing (including recovery), control‑flow/verification passes, and the Z3 mapper.