3 ms·
I work in government contracting with very expensive and heavy pieces of metal that kill people if something goes wrong, and even I can't convince people they n
by subjectsigma 4y ago
I work in government contracting with very expensive and heavy pieces of metal that kill people if something goes wrong, and even I can't convince people they need to use formal methods to help write their code. So the easy answer is 'no'.
That being said, FM is an enormous spectrum; if you squint a little, writing really good user stories could be considered a 'formal specification'. There's a really good paper from Amazon about model checking (Newcombe 2014 IIRC) where they make the bold statement that "Doing the math didn't help us find that many mistakes, nor did using the model checker; the thing that was most helpful was sitting down and forcing ourselves to come up with really good definitions. Like what does X really mean?" So it doesn't have to be as complicated as you think.
So if you want to start as simple as possible, I would recommend something like this: https://www.hillelwayne.com/post/decision-table-patterns/ https://www.hillelwayne.com/post/decision-table-patterns/
- aeneasmackenzie 4y agoLeslie Lamport had an essay about this. Without a spec, even if it's just "Serves the user's homepage", your program is not even wrong.
- xupybd 4y agoThanks! I'll have a read. Your comment helps clarify the situation.
- rramadass 4y agoYou may find https://markusvoelter.medium.com/the-evolution-of-decision-tables-80ce77bf984c https://markusvoelter.medium.com/the-evolution-of-decision-t... helpful. He also has a lot on DSLs which is worth reading. There is also a more powerful version of Decision Tables called Tabular Expressions (from D.L.Parnas) which you can use. A nice succinct reference to Formal Methods is Concise Guide to Formal Methods by Gerard O'Regan. I think simplified versions of Formal Methods can be used profitably for your use-cases. Start with Assertions, Design-by-Contract and Decision Tables.