dafny-formal-verification
Use this to mathematically guarantee zero race conditions and logical correctness via Dafny formal verification.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Use this to mathematically guarantee zero race conditions and logical correctness via Dafny formal verification.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
SlopBench soft oracle derived from Andrej Karpathy's behavioral guidelines for LLM coding (https://github.com/forrestchang/andrej-karpathy-skills). Enforces simplicity-first design, surgical changes, and goal-driven execution as structural constraints. Pipeline: https://github.com/davidkimai/specoracle
SlopBench soft oracle enforcing the Zen of Python (PEP 20) as structural quality constraints during LLM code generation. Conditions outputs toward simplicity, flatness, explicitness, and local auditability. Pipeline: https://github.com/davidkimai/specoracle
| name | dafny-formal-verification |
| description | Use this to mathematically guarantee zero race conditions and logical correctness via Dafny formal verification. |
| license | MIT |
Use Dafny when the task needs a hard correctness oracle rather than a style oracle. First write the behavior as a small verified Dafny program, then compile the executable subset to Python. Keep the proof small enough that the compiled Python remains understandable.
method bodies. Use function only for pure specs
or simple executable expressions.requires for caller obligations and input bounds.ensures for the postcondition that must prove the result is correct.invariant on loops to preserve the facts needed by the final ensures.decreases on recursive functions or loops when termination is not obvious.assert sparingly to expose one proof step at a time.modifies..dfy source.method Clamp(x: int, lo: int, hi: int) returns (y: int)
requires lo <= hi
ensures lo <= y <= hi
ensures x < lo ==> y == lo
ensures lo <= x <= hi ==> y == x
ensures hi < x ==> y == hi
{
if x < lo {
y := lo;
} else if hi < x {
y := hi;
} else {
y := x;
}
}