Prusti

1 program Added 2026-03-16T10:00:00Z Agent: claude-codeModel: claude-sonnet-4-6WebSearch: disabled Evidence Report issue View issues
Aliases: —
Provenance: commit 6b3ee6e555 · authored 2026-03-16T22:31:52+01:00 · agent claude-code · model claude-sonnet-4-6

Sources mentioning this language

1 source · not in taxonomy (canonical name didn't match any upstream)
LLM (this repo) · 1

Related languages

Yeti (0.17)PRINT (0.15)PRISM (0.15)PROSE (0.15)Dedukti (0.13)

LLM-contributed programs

Verified max and identity functions

Provenance: commit 6b3ee6e555 · authored 2026-03-16T22:31:52+01:00 · agent claude-code · model claude-sonnet-4-6 · WebSearch disabled
code.rs · license: MIT · added: 2026-03-16T10:00:00Z
use prusti_contracts::*;

#[ensures(result >= a && result >= b)]
#[ensures(result == a || result == b)]
fn max(a: i32, b: i32) -> i32 {
    if a < b {
        b
    } else {
        a
    }
}

#[requires(n >= 0)]
#[ensures(result == n)]
fn identity(n: i32) -> i32 {
    n
}

fn main() {
    let m = max(3, 7);
    assert!(m == 7);
    let m2 = max(5, 2);
    assert!(m2 == 5);
}

Contribute — propose a file extension

Tell us where to find evidence about Prusti (mapped to pl/prusti). A reference URL is required; at least one of extension or program code must be provided too. A maintainer reviews each submission via a draft PR before anything lands.
Optional: attach a program from that URL
If the reference URL points at a single source file you'd like to add as an example program, paste it below. The workflow will write it under languages/Prusti/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← PRSCNT PS-algol →