Earlier quoted context omitted.
That's a problem with specs, the most concise and complete way to write them is by writing your program. If it wasn't, people would just compile the specs, and program using those. Now, go tell this to people that want to offshore development based on a spec... But that's a digression. You don't prove correctness of an entire program against the entire spec. That's only possible with toy problems, even entirely prove…
> That's a problem with specs, the most concise and complete way to write them is by writing your program. I've never dealt with formal specs/design, certainly nothing like those described here. Your comment (however in/accurate) strikes me as interesting and leads me to wonder... What if we took the code and processed it to generate a "spec"? (I quote "spec" here b/c I wouldn't consider it a spec, but don't know wha…
Why Don't People Use Formal Methods?
201–210 of 232 posts
Re: Why Don't People Use Formal Methods?
#202Earlier quoted context omitted.
Absolutely, but why would that preclude formal methods?! In fact, this is exactly what I was thinking about when writing the last paragraph of my comment.
You can prove the ANN works, but how do you check it conforms to any specification, other than by testing and accepting high probability of real world failure? Eventually, you have a high level fuzzy requirement which is hard to even specify right. Just look at, say, latest YouTube guidelines about content they try to ML around to make tractable... And that's a classifier, now try to do the same with a machine transl…
Re: Why Don't People Use Formal Methods?
#203The cost / quality trade off isn’t worth it for most applications. In fields where it is (aerospace, smart contracts, etc.) then formal methods are used.
Re: Why Don't People Use Formal Methods?
#204For me, working on contracts on Ethereum, I have found formal methods to be invaluable (we use a tool by Certora [0] based on CVC4 solver). The trade-off shifts once you enter the world of immutable code, and the time we've spent designing, reviewing and now formally testing has been invaluable to shipping our product with confidence. We tend to think of our formal specifications like the ultimate unit test (instead…
This makes sense, but I still think it’s really hard to formally verify immutable code against a mutable VM. Your code can be correct today but the VM can change tomorrow.
Of course if you change the program semantics then the program changes. This is a limitation of literally all techniques, including testing.
Re: Why Don't People Use Formal Methods?
#205Earlier quoted context omitted.
That's a problem with specs, the most concise and complete way to write them is by writing your program. If it wasn't, people would just compile the specs, and program using those. Now, go tell this to people that want to offshore development based on a spec... But that's a digression. You don't prove correctness of an entire program against the entire spec. That's only possible with toy problems, even entirely prove…
> That's a problem with specs, the most concise and complete way to write them is by writing your program. I've never dealt with formal specs/design, certainly nothing like those described here. Your comment (however in/accurate) strikes me as interesting and leads me to wonder... What if we took the code and processed it to generate a "spec"? (I quote "spec" here b/c I wouldn't consider it a spec, but don't know wha…
Re: Why Don't People Use Formal Methods?
#206As a person who does and who's founded a company partially on the basis of the value of them, my opinion is that, in-part, it's because the ecosystem is extremely fractured, the tools are often an esoteric projection of the inside walls of one mad scientist's head turned into software, and they often don't scale very well (mostly due to the two previously mentioned conditions). Additionally, the tools are often desig…
What's your company? I'm interested in the commercial success of these tools and bringing down the cost of using them to industry-acceptable levels so they can be used in more projects.
Currently we work primarily with AV companies, automotive OEMs, and partners in their respective supply-chains. Our ambition is to create for Software & AI Engineers the kinds of sophisticated, accessible CAE tools & capabilities that have been enjoyed by Mechanical & Electrical Engineers for years. Software Engineers have done a phenomenal job enabling other disciplines, but we've done a less compelling job enabling ourselves in similar ways.
Re: Why Don't People Use Formal Methods?
#207Re: Why Don't People Use Formal Methods?
#208What's the difference between the specification and code at that point? If it's that detail oriented, then isn't the chance of bugs in the specification at least as likely as being in code?
Re: Why Don't People Use Formal Methods?
#209The really simple answer to this question is: because at a high level of abstraction, it isn't useful. Most applications are being specified by people who don't understand in any detail what they want the application to do. They can't even imagine the problem well enough to discuss it let alone specify it. A very large proportion of failed projects I've seen is due to this break down. The people who have the time and…
I think you're mistaking the use of formal methods for some particular process (like confusing tests with TDD). Formal methods do not require that you have a specification in advance. They can help you come up with the specification, through interaction, before or during coding (e.g., this is a lightweight formal specification tool for designing UIs and interaction: https://sketch.systems/ ). As code is itself a spec…
Formal methods still lack a bit of maturity and streamlining to get adopted. It's a bit like functional programming in the late 90s and early 2000s. Nothing was terribly different from now, yet it was not widely used. Whereas now, we are starting to see adoption by mainstream players. E.g. lots of features in Swift.
With regards to formal methods, the situation is entirely analogous. The theory is there. Already developed. And it sits at the absolute core of CS. It's all about formally describing semantics. There are several approaches: type systems, model checking, program analysis and abstract interpretation. And these offer a tremendous amount of flexibility. You can go all the way from adding some lightweight formal specifications a posteriori with e.g. a fancy type system, to developing all your code formally by starting with some axioms.
Re: Why Don't People Use Formal Methods?
#210Key takeaway for me as far as code verification goes.
Design verification reminded me of a few subjects I studied in college.