Software Engineering - Old Questions

6. What is formal specification? Discuss interface specification in detail.

6 marks | Asked in 2076

A formal software specification is a statement expressed in a language whose vocabulary, syntax, and semantics are formally defined. It is a technique for unambiguous specification of software to be build. The specification languages cannot be based on natural language; it must be based on mathematics because natural language specification are informal and usually contain ambiguities.

Fig: Formal specification in software process

Interface Specification

Large systems are decomposed into subsystems with well-defined interfaces between these subsystems. Specification of subsystem interfaces allows independent development of the different subsystem. Subsystem make use of other subsystem, so an essential part of specification is to define subsystem. Once the interface are agreed and defined, the subsystem can then be designed and implemented independently. Subsystem interface are often defined as a set of object or component.

Three types of interface may have to be defined:

1. Procedural interface: Used for calling the existing programs by the new programs.

2. Data Structure: Provide data passing from one sub-system to another.

3. Data representation: Ordering of bits to match with the existing system.

Formal notations are an effective technique for interface specification.