Unit I - Formal Specification
-
Upload
apurv-agrawal -
Category
Documents
-
view
219 -
download
1
Transcript of Unit I - Formal Specification
-
8/8/2019 Unit I - Formal Specification
1/12
Formal SpecificationFormal Specification
-
8/8/2019 Unit I - Formal Specification
2/12
Formal methodsFormal methods
Formal specification is part of a more general collectionFormal specification is part of a more general collection
of techniques that are known as formal methods.of techniques that are known as formal methods.
These are all based on mathematical representation andThese are all based on mathematical representation and
analysis of software.analysis of software.
Formal methods includeFormal methods include
Formal specification;Formal specification;
Specification analysis and proof;Specification analysis and proof; Transformational development;Transformational development;
Program verification.Program verification.
-
8/8/2019 Unit I - Formal Specification
3/12
Acceptance of formal methodsAcceptance of formal methods
Formal methods have not become mainstream softwareFormal methods have not become mainstream softwaredevelopment techniques as was once predicteddevelopment techniques as was once predicted
Other software engineering techniques have been successfulOther software engineering techniques have been successful
at increasing system quality. Hence the need for formalat increasing system quality. Hence the need for formalmethods has been reduced;methods has been reduced;
Market changes have made timeMarket changes have made time--toto--market rather thanmarket rather thansoftware with a low error count the key factor. Formalsoftware with a low error count the key factor. Formalmethods do not reduce time to market;methods do not reduce time to market;
The scope of formal methods is limited. They are not wellThe scope of formal methods is limited. They are not well--suited to specifying and analysing user interfaces and usersuited to specifying and analysing user interfaces and userinteraction;interaction;
Formal methods are still hard to scale up to large systems.Formal methods are still hard to scale up to large systems.
-
8/8/2019 Unit I - Formal Specification
4/12
Use of formal methodsUse of formal methods
The principal benefits of formal methods are inThe principal benefits of formal methods are in
reducing the number of faults in systems.reducing the number of faults in systems.
Consequently, their main area of applicability isConsequently, their main area of applicability isin critical systems engineering. There have beenin critical systems engineering. There have been
several successful projects where formalseveral successful projects where formal
methods have been used in this area.methods have been used in this area.
In this area, the use of formal methods is mostIn this area, the use of formal methods is most
likely to be costlikely to be cost--effective because high systemeffective because high system
failure costs must be avoided.failure costs must be avoided.
-
8/8/2019 Unit I - Formal Specification
5/12
Specification in the softwareSpecification in the software
processprocess
Specification and design are inextricablySpecification and design are inextricably
intermingled.intermingled.
Architectural design is essential to structure aArchitectural design is essential to structure aspecification and the specification process.specification and the specification process.
Formal specifications are expressed in aFormal specifications are expressed in a
mathematical notation with precisely definedmathematical notation with precisely defined
vocabulary, syntax and semantics.vocabulary, syntax and semantics.
-
8/8/2019 Unit I - Formal Specification
6/12
Specification and designSpecification and design
-
8/8/2019 Unit I - Formal Specification
7/12
Specification in the softwareSpecification in the software
processprocess
-
8/8/2019 Unit I - Formal Specification
8/12
Use of formal specificationUse of formal specification
Formal specification involves investing moreFormal specification involves investing moreeffort in the early phases of softwareeffort in the early phases of softwaredevelopment.development.
This reduces requirements errors as it forces aThis reduces requirements errors as it forces adetailed analysis of the requirements.detailed analysis of the requirements.
Incompleteness and inconsistencies can beIncompleteness and inconsistencies can be
discovered and resolved.discovered and resolved. Hence, savings as made as the amount of reworkHence, savings as made as the amount of rework
due to requirements problems is reduceddue to requirements problems is reduced..
-
8/8/2019 Unit I - Formal Specification
9/12
Development costs with formal specificationDevelopment costs with formal specification
-
8/8/2019 Unit I - Formal Specification
10/12
Specification techniquesSpecification techniques
Algebraic specificationAlgebraic specification
The system is specified in terms of its operations andThe system is specified in terms of its operations and
their relationships.their relationships.
ModelModel--based specificationbased specification
The system is specified in terms of a state model thatThe system is specified in terms of a state model that
is constructed using mathematical constructs such asis constructed using mathematical constructs such as
sets and sequences. Operations are defined bysets and sequences. Operations are defined bymodifications to the systems state.modifications to the systems state.
-
8/8/2019 Unit I - Formal Specification
11/12
Interface specificationInterface specification
Large systems are decomposed into subsystems withLarge systems are decomposed into subsystems withwellwell--defined interfaces between these subsystems.defined interfaces between these subsystems.
Specification of subsystem interfaces allowsSpecification of subsystem interfaces allows
independent development of the different subsystems.independent development of the different subsystems. Interfaces may be defined as abstract data types orInterfaces may be defined as abstract data types or
object classes.object classes.
The algebraic approach to formal specification isThe algebraic approach to formal specification is
particularly wellparticularly well--suited to interface specification as it issuited to interface specification as it isfocused on the defined operations in an object.focused on the defined operations in an object.
-
8/8/2019 Unit I - Formal Specification
12/12
SubSub--system interfacessystem interfaces