Lect 02
Lect 02
Formal Specifications
Instructor: Saima Zareen
Assistant Professor
Department of Software Engineering
[email protected]
RECAP
My name is ………………………….
I remember …………………………..
Outline
Defining Formal Specification.
Formal Specifications and Problem domain
Components of Formal Specification
Attributes of Good Formal Specification
Why Formal Specifications are required?
Who can use Formal Specifications?
When Formal Specifications can be defined?
Scope and Pitfalls
Formal Specifications Paradigms.
Applications
Limitations
Improvements
Summary
Formal Specification
What are Formal Specifications?
Formal specifications may refer to fairly
different things in the software lifecycle;
the wording is thus heavily overloaded.
An additional source of confusion stems from
the fact that a single word is used for a product
and the corresponding process.
Formal Specification contd..
Generally speaking, a formal specification is
the expression in:
some formal language and
at some level of abstraction,
A collection of properties some system should
satisfy.
Formal Specification contd..
This definition covers different notions, that
are dependent on
What the word system covers?
What kind of properties are of interest?
Formal Specification : System
The “system” being specified
may be a model of the domain of interest.
a model of the software and its environment.
a model of the software alone.
a model for the user interface
Formal Specification: Properties
The “properties” under consideration may
refer to high-level goals.
functional requirements
non-functional requirements about:
timing, performance, accuracy, security, etc.;
environmental assumptions;.
services provided by architectural components;
protocols of interaction among such
components and so on.
Formal Specification: Problem Domain
There is a common idea of specifications
pertaining to the problem domain.
one must first state that problem correctly.
a solution to a problem be given as a set of sub
problems to be specified and solved in turn.
Components of Formal Specification
A specification is formal if it is expressed in a language
made of three components:
i. Syntax
rules for determining the grammatical well-formedness of
sentences
ii. Semantics
rules for interpreting sentences in a precise, meaningful
way within the domain considered.
iii. Proof theory
rules for inferring useful information from the
specification .
This component provides the basis for automated analysis
of the specification.
What are Good Specification?