"매 mathematical 의 의 의 software 의 correctness 의 prove". 매 model checking (TLA+), 매 theorem proving (Coq, Lean), 매 SMT (Z3), 매 refinement type (F*). 매 modern: 매 AWS TLA+ usage, 매 Lean 4 in math, 매 LLM-aided proof.
매 핵심
매 spectrum
Lightweight: 매 design-by-contract, type system.
Model checking: TLA+, SPIN, Alloy.
Theorem proving: Coq, Lean, Isabelle.
SMT solvers: Z3, CVC5.
Verified compiler: CompCert, CakeML.
매 modern usage
AWS S3, DynamoDB use TLA+ for distributed protocols.
CompCert: 매 verified C compiler.
seL4: 매 verified microkernel.
CakeML: 매 verified ML.
Cardano: 매 Plutus formal.
Lean 4: 매 mathlib, Anthropic / OpenAI 의 LLM usage.
defpredict_tactic(state,llm):prompt=f"""You are a Lean 4 expert. Given this proof state:
{state}Suggest the next tactic. Output Lean syntax only."""returnllm.generate(prompt)
Verified C compiler (CompCert use)
ccomp -O hello.c -o hello
# 매 produces same semantic 의 unverified gcc -O0
Spec → impl (Dafny)
method Max(a: int, b: int) returns (m: int)
ensures m >= a && m >= b
ensures m == a || m == b
{
if a >= b { m := a; } else { m := b; }
}
TLC model checker
tlc -workers auto -fp 64 Spec.tla
# 매 invariant violation 의 trace 의 print
Hoare logic (manual)
{P} S {Q}
{x = 0} x := x + 1 {x = 1}
LLM proof verifier (sketch)
defllm_proof_then_verify(claim,llm):proof_attempt=llm.generate(f'Prove in Lean 4: {claim}')# 매 Lean checkresult=run_lean(proof_attempt)ifresult.error:returnllm.refine_proof(proof_attempt,result.error)returnproof_attempt
Proof assistant frontend (VSCode)
# 매 lean-tacticextensions:- leanprover.lean4- jroesch.leanshortcuts:- "Ctrl+Shift+Enter": run tactic
매 결정 기준
상황
Tool
Distributed protocol
TLA+
Crypto algorithm
Coq / EasyCrypt
Compiler
CompCert / CakeML
Math research
Lean 4 / Isabelle
Quick property check
QuickCheck / Hypothesis
Specific bug
Z3 / model check
Smart contract
Plutus / Vyper formal
Critical embedded
Frama-C / SPARK
기본값: 매 distributed = TLA+ + 매 lightweight = property-based + 매 critical = full formal proof + 매 LLM-aided 의 modern.