hi i'm mache i'm a software engineer i will share with you some of my thoughts on when and where is the right place to introduce formal methods formal methods is a wide term that describes the use of mathematics in the engineering process in other engineering domains this is so natural that it doesn't even deserve a separate name for example nobody would build a bridge without gaining confidence that the design is correct by doing calculations lots of calculations and this is considered normal but software engineering evolved a bit differently at some point the domain was growing
so rapidly that it has left the rigor behind and now we have development programming coding framework and everything and formal methods as a separate discipline this has also led to the lack of standardization and now the ecosystem of formal methods is very fragmented still there are people who would like to see the rigor back in mainstream where it naturally belongs and maybe you are such a person and you ask yourself when and where is the right place to introduce formal methods in your project in your team or in your engineering process so let's find out
what are the options software engineering activities can be divided into three areas requirements design and implementation requirements is where we learn from the customer about what they want the design is where we think about the solution and implementation is where we translate the solution into something that actually works whether it's software or hardware depending on your industry this terminology can be different and people disagree not only on names but also whether these three aspects should happen strictly one after another or maybe whether they can overlap or whether they can be iterated while the project evolves
or even whether the same people can be involved but all these differences do not change much with regard what are the options to introduce formal methods so let's start with requirements this is where we learn from the customer about what they want this level is really mostly about communication customers are not really happy when we engineers force them to use some technical tool of our choice some some tool or notation especially when it smells mathematics really and even if we can control the recruitment process on our site and the training process we have nothing to
say about what happens on the customer side and people change jobs they get promoted or whatever and really the next person on the customer side who will be dealing with us and our project might not be impressed with our particular choices of the notation which is used to communicate the requirements i think there are very few projects which decided to use formal methods at the requirements level and that were actually consistently successful during the lifetime of the project so let's see the other end the implementation this is where we are working with the target platform
the target development environment and the target programming language there are formal methods which were invented to work at this level and this is actually very attractive because it looks like we can take all the existing source code that we have already written run the tool on it and it will be fine but it doesn't work like this normal programming languages do not have the rigor that is necessary to express formal concepts in the program and even the vendors of those tools admit that the most efficient way to use them is to apply them from the
very beginning of the project from the very first line of code but even then the formal method will be constrained by the limitation of the programming language and of the source code and existing solutions which involve writing formal notation in source comments or in some pragmas they are counterproductive because if we are supposed to hide from the compiler we might as well move out of the source code entirely which brings us to the middle layer to the design but it will still not be like let's take all the diagrams that we have prepared over the
years we will run the tool on them and it will be fine because formal methods have to drive the engineering process they cannot be added as an after after thought but the design is a very safe place to introduce formal methods it's far enough from the customer so that our tool and notation choices will not irritate anybody on the customer side and it's also sufficiently far away from the constraints of the target development environment in other words the design level is this sweet spot where formal metals can be introduced with minimal risk of conflict with
external constraints an important outcome of this is that once the design is precise enough and being precise is the reason to introduce formal methods is that the translation to the implementation to the source code can be automated to a large extent or even entirely in short try to introduce formal methods as high as possible in your engineering process with the perspective to automate it downstream but still without forcing the customer to get involved unless of course they ask for it if you have some thoughts on this let me know i'm mache i'm a software engineer
thank you very much for watching and see you next time