Formal Methods Europe Logo Formal Methods Europe
   
   
 
 Choosing
  Methods
  Tools
  Applications
  FAQs
  Literature
  Journals
  Education
  Projects
  Universities
  Industry
  Groups
  Links
 

1. Scope
2. General Approach
3. General reasons for choosing formality
4. Characteristics of the application
5. Criteria for success of application
6. Needs and constraints of the organisation
  6.1 Level of general software engineering capability and maturity
  6.2 Level of existing expertise in formal methods and relevant mathematical foundations
  6.3 Available training budget and time-scales
7. Characteristics of a formal method
  7.1 Enables formal proof
  7.2 Level of abstraction
  7.3 Computational model
  7.4 Supported by tools
  7.5 Available training and consultancy
  7.6 Existing experience
References

1. Scope

top

This document is aimed at those who have decided that it would be a good idea for their project or organisation to use a formal method, but are not sure what steps to take next: which formal method or which kind of formal method will be best for their purposes.

2. General Approach

top

In order to result in a successful outcome, choosing a formal method requires the same approach as any other technical decision. First, one needs to be clear about one's objectives and to know what are the technical, organisational and management constraints. Then one may focus on the characteristics of a formal method which will meet those objectives and constraints. Finally a method can be selected which most closely conforms to, and whose tools, experience and support most closely conforms to those characteristics.

This guide is a framework which, we hope, will help you to construct for yourself a decision process tailored to your own application and organisation. The sections which follow consist of possible aims, criteria, characteristics and needs. Considering whether each of these applies should help to focus on and define the objectives, constraints and other criteria particular to an application and organisation which form the context of a choice of formal method, i.e. your application and that part of your organisation which will be using a proposed formal method. The bulleted points, which can be treated as a set of questions for you to ask yourselves, are a guide only; they can be extended or modified according to each individual organisational and technical environment. What is important is to establish and define that environment as clearly as possible before proceeding to make a selection. The purpose of the questions is to help the user organisation to determine appropriate criteria. Accordingly, the questions are grouped into some principal categories in the following sections:

  • General reasons for choosing formality
  • Characteristics of the application
  • Criteria for success ofapplication
  • Needs and constraints of the organisation

    The answers to these questions form a context in which you can then focus on what are the characteristics of the formal method which is most suitable for your needs. To help you to do that, the "possible characteristics" of a formal method are presented in the last main section:

  • Characteristics of a formal method

    Having gone through this process you can then match your list of requirements against what is on offer by looking at the FM databases, talking to tool suppliers etc.

3. General reasons for choosing formality

top

Software and system quality, consistency and integrity can be improved by formalising different products and processes in the development cycle. Are the reasons you want to apply formal techniques:

  • to improve quality and rigour of whole development process?

    This would be the case if your organisation wished to adopt a formal approach to software or system development as part of a general improvement of its development process. An improvement of development technology, like adopting formal methods, is a valid aspect of process improvement just as are improvements in documentation, configuration management, measurement etc.

  • to improve integrity, reliability or other characteristics of the system?

    In some circumstances formal methods may be applied to system development as well as software development. The analysis and design of the system architecture usually precedes the specification of software components. Do you propose to apply formal methods to the development of the larger system as well as the software?

  • to reduce specification errors?

    Expressing the specification, particularly the functional specification, of software and system components helps greatly to reduce errors in specifications. Is this your principal motivation?

  • to improve requirements definition?

    Requirements, especially system requirements, are usually expressed in non-formal language. The process of deriving formal expressions of specifications from them nearly always has the effect of improving those requirements definitions. Experience indicates that omissions and inconsistencies in the requirements statements are found more reliably than with other techniques. Is requirements analysis and definition the phase of the life-cycle which you particularly wish to address?

  • to improve documentation and understanding of designs?

    There is at present a great quantity of legacy software which is undocumented or with very inadequate documentation. Maintaining the software is as a result extremely difficult and confidence in its reliability is low. Good documentation reduces these problems and formal descriptions of the life-cycle products dramatically reduces them. Is this your motivation for using formal methods?

  • to provide a firmer foundation for maintenance and enhancement?

    See above.

  • to explore the properties of a design architecture?

    In some applications it is not possible to characterise the behaviour of the context of the software; in some telecommunications environments, for example, patterns of traffic may be to an extent unpredictable. A formal model of the design of the software can provide an understanding of its properties and limitations. Do you wish to improve your knowledge of your software's properties by more accurately modelling the design?

  • to provide a more rational basis for choosing test data?

    Relatively recently, techniques have been developed for deriving test data from functional specifications of software components. Such test sets may be more closely related to the specifications which the software is designed to fulfil, and the process of test set derivation is more systematic if formal methods are used for functional specification.

  • to be as certain as possible that the design and implementation are error-free?

    In safety-critical and other critical contexts it can be of utmost importance to ensure that the software is functionally free from errors. Applying formal descriptions to specifications and designs enables proofs of correctness between those successive stages of the development cycle.

  • to meet particular customer or standards requirements?

    Some contracts mandate the use of formal methods during certain stages of the development cycle, or mandate adherence to standards which do so.

4. Characteristics of the application

top

An application, dissociated from the organisation which is to supply a software system for it, has three kinds of intrinsic characteristics. The first is the "phenomenological model" of the application. This is the mathematics used by the scientific theory of the application to explain its phenomena. For example, the phenomenological model of ballistics and civil engineering is classical mechanics, and that of telephony is traffic and switching theory. The second characteristic is dependent on the first and is the computational model of the application. This relates to the high-level structure of the computations which can reflect and model a specific system within the application domain which obeys the principles defined by the scientific model. The third characteristic of the application relates to the physical and societal environment in which the built system will reside: whether it is embedded, safety-related, cost-critical etc.

  • What is the phenomenological model of your application?

    What kind of mathematics does the scientific theory of the application use?

  • What is the computational model of your application:

    • sequential?

      A single computational process with input and output.

    • distributed?

      Several processes which communicate.

    • distributed and concurrent?

      Distributed processes communicating interdependently, with potential deadlock, starvation, etc.

    • dependent on real time events?

      One or more processes which interact in real time with components outside the software system.

  • What are the environmental characteristics?

    The physical and societal environment of the system in use:

    • Safety related?
    • Embedded?
    • Cost-critical?
    • High volume cost critical?
    • With a large element of human interaction?
5. Criteria for success of application

top

Different applications will be acceptable to their customers and users for differing reasons. You may find it insightful to give a weighting to the following features, which are very general and can be extended:

  • Correct functioning
  • High performance
  • Ease of use

If it is very important that the system should function correctly, the motivation for using formal methods will be strongest, because correctness is the most immediate effect of a formal development. But using formal methods frequently results in software which is better structured and designed, which can in turn produce better performance and less arbitrariness in the user interface.

6. Needs and constraints of the organisation

top

Different formal methods are supported to different degrees by literature, courses, documented experience and tools. The accessibility of these affect the ease with which a newcomer can use a method. Furthermore different methods can be based on different mathematical paradigms and these may be more or less familiar to an organisation's existing staff. For example, driving a mathematical proof engine is generally regarded as needing more mathematical skill than simply formulating a formal description. So it is useful to list the needs and skill levels of the developers in the organisation who are going to work on the project in question and match those with the user oriented support of any considered method and tool.

6.1 Level of general software engineering capability and maturity

top

To adopt a formal method successfully, an organisation needs to have already a reasonably well-developed software engineering discipline. Not to do so would be like a restaurant trying to deliver advanced recipes from a disorganised, unhygienic kitchen: a delicious meal might sometimes result, but one could not rely on it (and the customers might occasionally fall ill!). If the team or organisation does not yet have a reasonable level of engineering discipline and in-house working standards, it is best to address those issues before more technical ones such as the use of formal methods.

6.2 Level of existing expertise in formal methods and relevant mathematical foundations

top

It is going to be much easier to adopt a formal method if the staff have some existing knowledge and understanding of the underlying principles, or have used a formal method already. If this is not the case, a training programme should be designed.

6.3 Available training budget and time-scales

top

If a formal method is being adopted for the first time, a budget and schedule need to be made for training activity. The use of experienced consultants to guide the first-time use of the method is also advisable.

7. Characteristics of a formal method

top


7.1 Enables formal proof

top

If a very high degree of confidence is required in the correctness of your software end-product, it may be desirable to choose a method whose support tools enable proofs of correctness.

7.2 Level of abstraction

top

All methods involve a language with which to express a formal description. Different languages are biased to varying degrees as to the level of abstraction at which they can support discourse. One may categorise these levels of abstraction as follows:

  • Requirements

    Does the language support expression of the high-level requirements of the software or system, without any suggestion of computational approach? (Temporal logic may be considered an example of this).

  • Functional specification

    Does the language support expression of the functionality of the software at an abstract level?

  • Design

    Does the language support expression of the abstract algorithms of the software?

  • Executable

    Is it possible to execute a formal description expressed in the language?

One should choose a method and language whose capability best supports the part of the development process where formalisation is going to be most beneficial.

7.3 Computational model

top

The languages within different methods will generally, if expressing functionality of the software at either specification or design level, allow the expression of different kinds of computation. These largely need to match the computational model of the application. One classification of these models is the following:

  • Sequential

    Specifying a single computational process.

  • Parallel

    Specifying more than one, possibly communicating process.

  • With dynamic or mobile processes

    Specifying parallel processes which can come into being, expire, and possibly whose communication channels can change.

  • Real-time

    Specifying one or more processes interacting with external real-time events.

  • Indifferent

    Some formal specification languages are independent of the computational model of the software, possibly through being at a very high level of abstraction (temporal logics are an example).

7.4 Supported by tools

top

Most formal methods are now supported by tools, but the tools vary in their capabilities, maturity, degree of commercial support, ease of use, etc. Browsing through the FMEInfRes tools database should provide a good indication of the availability of tools. Tools vary in their maturity; it will be fairly clear from the database entry whether the tool is used industrially and on what scale. As well as the "Availability" and "Usage and Applicability" sections, the "Number of Installations" will give an indication of this. However, visitors to the database should be aware that different tool suppliers operate in different customer situations and have different ways of estimating the number of installations. A widely used free tool supplier may count the number of downloads from their FTP site. This may be a substantially greater number than the number of tools in serious use. Another may count the number of paid-for user or site licences. Also, not all suppliers have yet provided us with their number of installations.

The entry for the tool gives an indication of how the number of installations is assessed, but for full and up-to-date information on any tool one should visit the tool's own site and consult the contact point.

7.5 Available training and consultancy

top

Some tool suppliers, developers of existing applications and other systems and software houses provide training and consultancy on the use of formal methods.

7.6 Existing experience

top

To find accounts of existing experience, visit the Applications Database at this site. Also, there are comprehensive accounts of experience in [1].

References

top

[1]
Michael G. Hinchey, Jonathan P. Bowen (Eds.): Applications of Formal Methods. Prentice Hall International (UK), 1995. ISBN 0-13-366949-1