AI EncyclopediaAIMore concepts 1
Formal verification
정식 검증(형식 검증)
A way of checking, using mathematical logic, that a program does what it promises to do.
Overview
Formal verification shows that a program or circuit behaves as its specification says, using mathematical proof instead of tests. A test can only confirm the cases you tried, but a proof tries to guarantee by logic that the claim holds for every possible input. That is why it has mainly been used in fields where mistakes are costly.
Formal verification has been studied for a long time, but a person had to write the proof step by step, so it was very expensive. It was used only in a limited way, on some highly important code such as security protocols. Recently, AI has started to write proof code, which opens the possibility of using it more widely.
How it works
Formal verification first writes the properties a program must keep as a mathematical specification. For example, it turns the condition "past conversations must stay unreadable even if a key is exposed later" into a logical formula. Then a proof tool checks, step by step, that every execution path of the code meets this specification.
The proof is usually written in a proof assistant language such as Lean, and a machine checks that each step follows the rules of logic. A proof file that has been checked once gives the same result when run again, so trust can build up.
Where it is used
It suits code whose design is complex and whose failure does great harm, such as a messaging app's encryption protocol. However, turning a security goal into a mathematical specification still has to be done by human experts, and if that definition is wrong, the proof means nothing.
It is also applied in part to fields where errors are costly, such as flight control, semiconductor circuit design and financial trading engines. The conditions are that the specification can be written clearly and that the range to be verified can be narrowed.
Limits and misconceptions
Even code that has been formally verified cannot guard against risks missing from the specification. A proof only guarantees that the promised property holds, and whether the promise itself is enough must be judged separately. People easily miss this and mistake it for perfect safety.
The cost of proof is still high, and it is hard to apply to a whole large system. Even when AI generates the proof, the result can be wrong if the proof tool or the specification is wrong, so independent review is still needed.
An everyday example
If trying a few exam questions and calling it a pass is testing, then proving with a formula that the answer is always right in every case is formal verification. It is like proving that a calculator obeys the rules of addition whatever numbers you enter.
Why it matters
Knowing formal verification lets you tell apart a security announcement that only says "it is safe" from one confirmed by mathematics. It helps you judge what everyday technologies, such as messaging or financial authentication, actually guarantee.