Introduction-Formal Specification Methods in Software Development-Lecture Slides, Slides of Software Development Methodologies

This lecture was delivered by Sharman Munjha Jadeja at Birla Institute of Technology and Science for Formal Specification Methods in Software Development course. It includes: Introduction, Formal, Methods, Processes, Data, Bases, Z, Notations, Mathematical, Notion

Typology: Slides

2011/2012

Uploaded on 07/09/2012

chand
chand 🇮🇳

4.4

(7)

31 documents

1 / 37

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
docsity.com
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25

Partial preview of the text

Download Introduction-Formal Specification Methods in Software Development-Lecture Slides and more Slides Software Development Methodologies in PDF only on Docsity!

Course Title

Formal Specification Methods

in Software Development

Introduction to Formal Approaches

  • One way to improve the quality of software

is changing the software design

  • Existing methods offer large amounts of

text, pictures, and diagrams, but these are often imprecise and ambiguous.

  • Important information is hidden amongst

irrelevant detail, and design flaws are discovered too late, making them expensive or impossible to correct.

Introduction to Formal Approaches

  • An alternative is using Formal Approaches at all stages of software development.
  • Formal methods, elementary mathematics, can be used to produce precise, unambiguous specification at design level
  • Information is structured and presented at an appropriate level of abstraction.
  • Same approaches can be used to subsequent processes i.e., testing, and maintenance.

Introduction to Formal Approaches

  • Formal methods can be applied in any area of computer science and engineering
  • Example are:
    • software engineering, information security,
    • Data bases e.g. use of the relational calculus in database theory
  • It is intended for the description of state and state-based properties
  • It includes a theory of refinement that allows mathematics to be used at every stage of program development

Introduction to Formal Approaches

  • Approaches based on mathematical tools

for specifying properties of software systems

  • These techniques usually drawn from areas

of discrete mathematics, such as

  • Logic,
  • Set theory,
  • Graph theory etc.
  • Formal Methods have rigorous tool support
  • Formal methods increase quality of software

Software Development using Formal Methods

  • Validation: Are we building the right system?
  • Verification: Are we building the system right?

Requirements

Specification 1

Specification n

Specification 2

Formalization

Refinement

Further Refinement

Validation

Verification

Verification

An Introduction to Z Notations

  • Based on set theory, Propositional and

first order logic

  • Abstract data types and sequential

programs

  • Describes state space of a system and

operations over states

  • Operation are relations over pair of state

spaces

  • Advancing to object oriented-ness

An Introduction to Z Notations

  • Another aspect is the way in which the mathematics can be structured.
  • Mathematical objects and their properties can be collected together in schemas which are patterns of declaration and constraint.
  • The schema language can be used to describe the state of a system, and the ways in which that state may change.
  • It is also used to describe system properties, and to reason about possible refinements

An Introduction to Z Notations

  • A characteristic feature of Z is: types
  • Every object in the mathematical language has a unique type, represented as a maximal set in the current specification.
  • This provides a useful link to programming
  • Notion of types means, in an algorithm, type of object can be checked in specification
  • Several type-checking tools exist to support the practical use of Z e.g. Z/eves

An Introduction to Z Notations

  • A fourth aspect is refinement.
  • We may develop a system by constructing a model of a design, using simple mathematical data types to identify the desired behavior.
  • We may then refine this description by constructing another model which respects the design decisions made, and yet is closer to implementation.
  • This process of refinement can be continued until executable code is produced.

An Introduction to Z Notations

  • The Z notation, then, is a mathematical

language with a powerful structuring mechanism.

  • In combination with natural languages, it can

be used to produce formal specifications.

  • We may reason about the specifications using

proof techniques of mathematical logic.

  • We may also refine a specification, yielding

another description closer to executable code.

An Example : Designing A Birthday Book

NAME, DATE 

BirthdayBook known :  NAME birthday : NAME  DATE

known = dom birthday

AddBirthday known :  NAME birthday : NAME  DATE Known’ :  NAME Birthday ’ : NAME  DATE name? : NAME date? : DATE

known = dom birthday Known’ = dom birthday’ name?  known birthday’ = birthday U {name?  date?}

Recording Birthday of a New Comer