Skip to main content Accessibility help
×
Hostname: page-component-7bb8b95d7b-qxsvm Total loading time: 0 Render date: 2024-10-02T10:26:23.406Z Has data issue: false hasContentIssue false

1 - Formal methods

Published online by Cambridge University Press:  06 July 2010

Jonathan Jacky
Affiliation:
University of Washington
Get access

Summary

Formal methods apply logic and simple mathematics to programming. They work best where traditional programming methods don't work very well: problems that are too difficult to solve by intuition or too novel to solve by modifying some existing program or design. They can help you create new programs, or analyze and document programs that are already written. Using formal methods requires creativity and judgment, but once you have created or analyzed a program formally, you can document your work as a sequence of steps that you or anyone else can check. You must be able to do this if you need to convince yourself or others that a program meets requirements for safety, accuracy, security, or any other critical property. It is also worth doing if you simply want to understand how the program works.

What are formal methods?

Formal methods are methods that use formulas.

A formula is a text or diagram constructed from predefined symbols combined according to explicit rules. A good working definition of formula is anything whose appearance or syntax can be checked by a computer. According to this definition, every computer program is a formula.

It's a little odd for programmers to speak of formal methods as if they were something special – as if formality were an option. If you want to program a computer, you really don't have any choice. Computation is formula evaluation.

Type
Chapter
Information
The Way of Z
Practical Programming with Formal Methods
, pp. 3 - 13
Publisher: Cambridge University Press
Print publication year: 1996

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

Save book to Kindle

To save this book to your Kindle, first ensure coreplatform@cambridge.org is added to your Approved Personal Document E-mail List under your Personal Document Settings on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part of your Kindle email address below. Find out more about saving to your Kindle.

Note you can select to save to either the @free.kindle.com or @kindle.com variations. ‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi. ‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.

Find out more about the Kindle Personal Document Service.

  • Formal methods
  • Jonathan Jacky, University of Washington
  • Book: The Way of Z
  • Online publication: 06 July 2010
  • Chapter DOI: https://doi.org/10.1017/CBO9780511574924.002
Available formats
×

Save book to Dropbox

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Dropbox.

  • Formal methods
  • Jonathan Jacky, University of Washington
  • Book: The Way of Z
  • Online publication: 06 July 2010
  • Chapter DOI: https://doi.org/10.1017/CBO9780511574924.002
Available formats
×

Save book to Google Drive

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Google Drive.

  • Formal methods
  • Jonathan Jacky, University of Washington
  • Book: The Way of Z
  • Online publication: 06 July 2010
  • Chapter DOI: https://doi.org/10.1017/CBO9780511574924.002
Available formats
×