Chapter 25 - Formal Methods

Overview

This chapter discusses the role of formal methods in software engineering. Formal methods allow software engineers to create specifications using mathematical notation that is more complete, more consistent, and unambiguous. The mathematics used in formal software engineering methods relies heavily on set theory and logic. In many safety critical or mission critical systems, failures can have a high cost. Many safety critical systems can not be completely tested without endangering the lives of the people they are designed to protect. Use of formal methods reduces the number of specification errors dramatically, which means that the customer will encounter fewer errors when the product is deployed.

 

Using Formal Methods

 

Formal Specification Properties

 

Weaknesses of Less Formal Approaches

 

Necessary Mathematics

 

Writing Formal Specifications

 

Formal Specification Language Components

 

Ten Commandments of Formal Methods

  1. Choose the appropriate notation
  2. Do not over-formalize
  3. Estimate costs
  4. Have a formal methods guru on call
  5. Do not abandon traditional development methods
  6. Document sufficiently
  7. Do not compromise quality standards
  8. Do not be dogmatic in assuming formal specifications are flawless
  9. Use of formal methods does not eliminate the need to test products
  10. Reuse is still important