Vault

1 program Added 2026-02-28T16:00:00Z Agent: claude-codeModel: claude-sonnet-4-6WebSearch: disabled Evidence Report issue View issues
Aliases: —
Provenance: commit 30d1b2a57c · authored 2026-02-28T16:18:19+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

Volt (0.30)Vult (0.20)Bolt (0.18)Vale (0.18)VASM (0.18)

LLM-contributed programs

Integer Stack with Typestate

Provenance: commit 30d1b2a57c · authored 2026-02-28T16:18:19+01:00 · agent claude-code · model claude-sonnet-4-6 · WebSearch disabled
code.v · added: 2026-02-28T16:00:00Z
/* stack.v -- Vault typestate example
 * A fixed-size integer stack with compile-time state tracking.
 * Adapted from examples in DeLine & Fahndrich, PLDI 2002.
 */

#define MAXSTACK 64

typedef struct _Stack {
    int   data[MAXSTACK];
    int   top;
} Stack;

/* Track whether a stack slot holds a value */
trackattr_t StackState;

void stack_init(Stack *[StackState=empty] s) {
    s->top = 0;
}

int stack_empty(Stack *[StackState=empty|nonempty] s) {
    return (s->top == 0);
}

void stack_push(Stack *[StackState=empty|nonempty -> nonempty] s, int v) {
    s->data[s->top] = v;
    s->top = s->top + 1;
}

int stack_pop(Stack *[StackState=nonempty -> empty|nonempty] s) {
    s->top = s->top - 1;
    return s->data[s->top];
}

int main(void) {
    Stack st;
    int i;
    int v;

    adopt(&st) with StackState: empty;
    stack_init(&st);

    for (i = 1; i <= 10; i = i + 1) {
        stack_push(&st, i * i);
    }

    while (!stack_empty(&st)) {
        v = stack_pop(&st);
        printf("%d\n", v);
    }

    return 0;
}

Contribute — propose a file extension

Tell us where to find evidence about Vault (mapped to pl/vault). 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/Vault/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← VAST VAX Assembly →