| ▲ | Veserv 2 days ago | ||||||||||||||||||||||||||||||||||||||||||||||||||||
That is not the hard part at all of formalizing a program spec on a file system. You just conditionalize your proof based on sane/desired usage of the file system. The problem is even formalizing a file system at all. It is nearly impossible to even effectively prove something as simple as: 1. Program A creates a file, F, that only program A writes and writes some data. 2. Program B writes file G which correctly modifies untold amounts of arbitrary file system data structures. 3. Program A reads file F and sees the contents are unchanged. If you could easily prove that for arbitrary programs that follow those very basic rules, then you would be able to formalize like 90% of file system usage. The weaknesses and difficultys of formal methods are at a far, far lower level than people think. | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| ▲ | kodoman 2 days ago | parent [-] | ||||||||||||||||||||||||||||||||||||||||||||||||||||
My point was that file systems don't lend themselves to being able to easily reason about in such a way. I used to try and illustrate how many considerations have to be made when interacting with these sort of operating system services and when deploying the program you need to make sure the assumptions hold. The sort of model you suggested does not map every possible state of the file system to a model state structure so one could have various problems with results of the proof. I guess the difficulty of formal methods depends on how much and what you want to prove, there is no real formal definition as to when something becomes formal methods is a spectrum and includes algo/c type type systems to CoC proofs and extracted programs. | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||