| ▲ | bluGill 2 hours ago | |||||||
> In other words, if I have the full formal spec of f(), isn't that the same thing as having f()? In some cases, however quite often, the spec is much simpler. For instance, it's easy to say that after running sort on some list, that the result is sorted. However, it is very hard to come up with the algorithm to do that from the specification. Sometimes that is even a point. Bubble sort, quick sort, tim sort, we can go on and on. There's a huge number of different sorts that computer science have discovered over the years. They all should have the same result and so you should be able to prove they do the same thing. However, in the real world there are often reasons you would prefer one to another despite all meeting the same spec. | ||||||||
| ▲ | brap 2 hours ago | parent | next [-] | |||||||
This makes a lot of sense, thank you! | ||||||||
| ▲ | pydry 2 hours ago | parent | prev [-] | |||||||
I did some of this stuff in college and what bugged me was that the spec actually ended up more complex than the code and it had bugs. That was a long time ago and they said that formal methods were the future back then, too. | ||||||||
| ||||||||