|
|
|
|
|
by threethirtytwo
3 days ago
|
|
It’s like how type checking proves your program to be correct in terms of types. Similar to that concept but applied to more than just types. In fact specifications can be written in the form of types. So for example: Func(int, int) -> int
Is saying this function takes two integers and the output has to be an integer. That is part of a specification.You can also write: Func(int + N, int + M) -> int + M + N
And that’s the sort of thing formal verification is. But it also sort of changes the way you program because you have to build your program from smaller pieces that are axiomatic.For my explanation you can understand the specification part but writing a program that can be proved to fit the specifications automatically (via the axioms) is harder to illustrate. It’s all very mathy. |
|