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;
}
}