Formal Methods Model: Definition & Application

Instructor: David Gloag

David has over 40 years of industry experience in software development and information technology and a bachelor of computer science

In this lesson, we'll examine the Formal Methods Model in Software Engineering - what it is, some advantages and disadvantages, steps, and an example. At the end, you will come away with a solid understanding of this Software Engineering technique.

Striving to Progress

As members of the human race, we constantly push ourselves to do more, to do it more efficiently, and to be more accurate when we do. It is who we are! If we didn't would Banting and Best have discovered insulin, Armstrong walked on the moon, or Babbage created the computer? Not likely! In fact, one could argue that we'd still be back in the stone age without these characteristics. But now-a-days, it takes more than desire, more than just drive. It takes a structured approach that is inherently very precise. One such approach is the Formal Methods Model.

What is the Formal Methods Model?

The Formal Methods Model is an approach to Software Engineering that applies mathematical methods or techniques to the process of developing complex software systems. The approach uses a formal specification language to define each characteristic of the system. The language is very particular, and employs a unique syntax whose components includes objects, relations, and rules. When used together, these components can validate the correctness of each characteristic. Think of the process like balancing a series of equations. At each step in the series, if the right-side of the equation doesn't equal the left, there is a problem that must be addressed.

What are the Steps Involved - How About an Example?

There are two steps that comprise the Formal Methods Model. Those steps are the property-based specification and the model-based specification. These two steps are detailed more fully in the following sections.

Property-Based Specification

This step describes two main elements in the system. Those elements are the operations that can be performed on the system, and the relationships between the operations. For example, consider a simple Instant Messaging application for your cell phone. Then some operations might be:

  • Start up
  • Send message
  • Receive message
  • Display message
  • Shut down

The relationships between these operations might include:

  • Startup must come before any other operation
  • Shut down must be the last operation performed
  • Display message comes during each send message and after each receive message

Model-Based Specification

This step describes the states the system can be in, and how the operations can transition the system from state to state. Consider the Instant Messaging application example mentioned above. States the system may be in might include:

  • Starting up
  • Sending message
  • Receiving message
  • Displaying message
  • Shutting down

As for transitions, they might include:

  • Clicking the application icon to enter starting up
  • Or pressing the send button to leave the sending message state

Please note that the above steps were described in familiar language rather than through the specification syntax for clarity sake. With a formal specification, a non-mathematical, natural language description is transcribed into a formal language which allows it to be rigorously checked for validity. As an example, the actual syntax to describe an instant message connection might look something like:

  • message_connection: M System_Connections
  • assigned_to: Instant_Connections: System_Connections
  • available, sending, receiving: M System_Connections

To unlock this lesson you must be a Member.
Create your account

Register to view this lesson

Are you a student or a teacher?

Unlock Your Education

See for yourself why 30 million people use

Become a member and start learning now.
Become a Member  Back
What teachers are saying about
Try it risk-free for 30 days

Earning College Credit

Did you know… We have over 200 college courses that prepare you to earn credit by exam that is accepted by over 1,500 colleges and universities. You can test out of the first two years of college and save thousands off your degree. Anyone can earn credit-by-exam regardless of age or education level.

To learn more, visit our Earning Credit Page

Transferring credit to the school of your choice

Not sure what college you want to attend yet? has thousands of articles about every imaginable degree, area of study and career path that can help you find the school that's right for you.

Create an account to start this course today
Try it risk-free for 30 days!
Create an account