Formal Methods-Software Engineering-Lecture 06 Slides-Computer Science, Slides of Software Engineering

The course is intended to develop an understanding of the problems associated with the development of significant computing systems (that is, systems that are too large to be designed and developed by a single person, and are designed to be used by many users) and to appreciate the techniques and tools necessary to develop such systems efficiently, in a cost-effective manner. Formal Methods, Ambiguity, Testing, Formal Specification, Property Based Specification, Model Based Specification, Z Spec

Typology: Slides

2011/2012

Uploaded on 02/03/2012

gustavott
gustavott 🇬🇧

3.9

(14)

253 documents

1 / 25

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
LECTURE 6: INTRODUCTION TO
FORMAL METHODS
Software Engineering
Mike Wooldridge
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19

Partial preview of the text

Download Formal Methods-Software Engineering-Lecture 06 Slides-Computer Science and more Slides Software Engineering in PDF only on Docsity!

LECTURE 6: INTRODUCTION TO

FORMAL METHODS

Software Engineering

1 What are Formal Methods?

  • Formal methods is that area of computer science that is concerned with the application of mathematical techniques to the design and implementation of computer hardware and (more usually) software.

“That part of computer science concerned with the application of mathematical methods to the production of computer software”. (Jones, 1986)

  • Why bother with formal methods?
    1. The correctnesss problem: - producing software that is “correct” is famously difficult; - by using rigorous mathematical techniques, it may be possible to make provably correct software.
    2. Programs are mathematical objects; - they are expressed in a formal language;
  • Diller (1988) suggests there are two main parts to formal methods: 1. Formal specification. Using mathematics to specify the desired properties of a computer system. 2. Formal verification. Using mathematics to prove that a computer system satisfies its specification.
  • To which many would add:
    1. Automated programming. Automating the process of program generation.
  • Formal methods can eliminate ambiguity.

A key problem with informal specifications is the inherent ambiguity of textual descriptions; using mathematics can eliminate such ambiguity.

  • Mathematics is concise.

Complex properties can be expressed succinctly.

  • Mathematics offers power.

There is little that cannot in some way be described and reasoned about using maths.

  • Maths facilitates proof.

The ability to prove properties of a system is potentially very valuable.

  • Formal specifications, etc., can be manipulated by computer. - CASE tools; - automated specification checkers (e.g., CADIZ); - automated programming.
  • Formal methods lead to a deep understanding of systems. The precision and detail required brings a deep understanding of what’s going on.

OBJECTIONS/MISCONCEPTIONS

  • Formal methods eliminate the need for testing.

People can get get sums wrong!

  • Formal methods eliminate the need for natural language. Ultimately, maths is just symbols: English is needed to relate these symbols to reality.
  • You need a PhD to use formal methods.

All maths looks hard until you get used to it...

APPROACHES TO FORMAL

SPECIFICATION

  • There are two schools of thought on formal specification: 1. Property based; 2. Model based.

• EXAMPLES OF PROPERTY ORIENTED

SPECIFICATION TECHNIQUES.

- algebraic specification of abstract data types (Hoare, 1969). - the OBJ language (Futatsugi et al., 1985).

Model Based Specification

  • In model based specification, you use the tools of set theory, function theory and logic to build an abstact model of a system.
  • You can then specify the operations that may be performed on your model, either explicitly, or implicitly (in terms of pre- and post-conditions).
  • The model we construct is: - high-level; - idealized; - free of implementation bias (hopefully!)

THE Z SPECIFICATION LANGUAGE