Dafny
1 program
Added 2025-10-22T16:59:04Z
Model: google/gemini-2.5-proTemp: 0.4
Evidence
Report issue
View issues
Aliases: —
Provenance: commit cea627b23c · authored 2025-10-22T18:59:05+02:00 · model google/gemini-2.5-pro
Sources mentioning this language
6 sources · pl_id:
pl/dafnyWikipedia infobox ↗
Pulled from the
wikimedia/structured-wikipedia
snapshot — see data/raw/wikipedia_pl_facts.*.jsonl and
pl_fact.csv for the long-table provenance.
| Paradigms | imperative · functional |
|---|---|
| Typing | static, strong, safe |
| Designed by | Microsoft Research · K. Rustan M. Leino |
| First appeared | 2009 |
| License | MIT |
| Homepage | http://dafny.org |
Extensions claimed by this language
2 claims. Each row is one upstream assertion with its strength.
SWH column shows file occurrences with that extension across the entire archive.| Extension | Source | Strength | SWH |
|---|---|---|---|
.dfy | linguist | primary | 62.3K files |
.dfy | wikipedia | proposed | 62.3K files |
Related languages
LLM-contributed programs
Verified Binary Search
Provenance: commit cea627b23c · authored 2025-10-22T18:59:05+02:00 · model google/gemini-2.5-pro · Temp 0.4
method BinarySearch(a: array<int>, key: int) returns (index: int)
requires a != null && a.Length > 0
requires forall i,j :: 0 <= i < j < a.Length ==> a[i] <= a[j]
ensures -1 <= index < a.Length
ensures index == -1 ==> forall k :: 0 <= k < a.Length ==> a[k] != key
ensures 0 <= index ==> a[index] == key
{
var low := 0;
var high := a.Length;
index := -1;
while low < high && index == -1
invariant 0 <= low <= high <= a.Length
invariant index == -1 ==> forall k :: 0 <= k < low || high <= k < a.Length ==> a[k] != key
invariant -1 <= index < a.Length
invariant index != -1 ==> 0 <= index < a.Length && a[index] == key
{
var mid := (low + high) / 2;
if a[mid] < key {
low := mid + 1;
} else if key < a[mid] {
high := mid;
} else {
index := mid;
}
}
}
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.)