Frama-C

1 program Added 2026-02-11T12:01:37Z Agent: claude-codeModel: sonnetWebSearch: disabled Evidence Report issue View issues
Aliases: ACSL, Frama C
Provenance: commit 77452e1eca · authored 2026-02-11T13:02:37+01:00 · agent claude-code · model sonnet

Sources mentioning this language

2 sources · pl_id: pl/acsl
LLM (this repo) · 1Pldb

Related languages

F-Logic (0.16)Frank (0.14)Frenetic (0.12)FRACTRAN (0.12)FreeBASIC (0.12)

LLM-contributed programs

Max functions with ACSL specifications

Provenance: commit 77452e1eca · authored 2026-02-11T13:02:37+01:00 · agent claude-code · model sonnet · WebSearch disabled
code.c · added: 2026-02-11T12:01:37Z
/*@ requires \valid(a) && \valid(b);
  @ ensures \result == *a || \result == *b;
  @ ensures \result >= *a && \result >= *b;
  @*/
int max(int *a, int *b) {
  if (*a > *b)
    return *a;
  else
    return *b;
}

/*@ requires n >= 0;
  @ requires \valid(arr + (0..n-1));
  @ ensures \result >= 0 && \result < n;
  @ ensures \forall integer k; 0 <= k < n ==> arr[\result] >= arr[k];
  @*/
int max_array(int *arr, int n) {
  int max_idx = 0;
  /*@ loop invariant 0 <= i <= n;
    @ loop invariant 0 <= max_idx < n;
    @ loop invariant \forall integer k; 0 <= k < i ==> arr[max_idx] >= arr[k];
    @ loop variant n - i;
    @*/
  for (int i = 1; i < n; i++) {
    if (arr[i] > arr[max_idx])
      max_idx = i;
  }
  return max_idx;
}

Real programs from Software Heritage

No SWH evidence indexed yet for this language. (Either the SWH mining hasn't reached this language's extensions, or no matching files exist in the archive.)

Contribute — propose a file extension

Tell us where to find evidence about Frama-C (mapped to pl/acsl). 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/Frama-C/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← FRAK frame →