been enlarged to cover many different activities. Some typical questions we can ask
about such methods are thefollowing: Why use formal methods? What are they used
for? When do we need to use such methods? Is UML a formal method? Are they needed
in object-oriented programming? How can we define formal methods?We will look at these questions gradually. Formal methods have to be used by people
who have recognized that the (internal) program development process they use
1.4 Formal methods 11
is inadequate.There may be several reasons for such inadequacies, e.g. failure, cost,
The choice of a formal method is not an easy one. Partly because there are many
formal method vendors. More precisely,the adjective “formal” does not mean anything.
Here are some questions you may ask a formal method vendor. Is there any theory
behind your formal method? What kind of language is your formal methodusing? Does
there exist any kind of refinement mechanism associated with your formal method?
What is your way of reasoning with your formal method? Do you prove anything when
using your formalmethod?
People might claim that using formal methods is impossible because there are some
intrinsic difficulties in doing so. Here are a few of these claimed difficulties: You have to
be amathematician. The proposed formalism is hard to master. It is not visual enough
(boxes, arrows are missing). People will not be able to perform proofs.
I mostly disagree with the above points of view, but Irecognize that there are some
real difficulties, which, in my mind, are the following:
(i) When using formal methods, you have to think a lot before coding, which is not,
as we know, the currentpractice.
(ii) The use of formal methods has to be incorporated within a certain development
process, and this incorporation is not easy. In industry, people develop their products