Module Specifications in Software Engineering – GeeksforGeeks
The system design is modular and modules support a well-defined abstraction. Concept of abstraction is widely used in the software design. There are two types of abstraction as shown in the following figure :
Data Abstraction :
In data abstraction, the idea is to hide the information about data and how it is represented in the program. The analogous notion for compound data is called is called data abstraction. Data abstraction may be a methodology that permits us to isolate how a compound data object is employed from the small print of how it’s constructed from the more primitive data objects. By this feature, it is possible to create user defined data types and thus increase the power of the programming language.
The main idea behind data abstraction is to give a clear separation between properties of data type and the associated details. This separation is achieved so as that the properties of the abstract data types are visible to the interface and implementation details are hidden. Data abstraction is that the process of refining data to its essential form. An Abstract Data Type is defined as a knowledge type that’s defined in terms of the operations that it supports and not in terms of its structure or implementation.
Functional Abstraction :
In functional abstraction, details of the algorithms to accomplish the module are not visible to the user of the function. The users of the module need to know only the correct calling convention. The user can call a module without necessarily understanding how it is implemented.
For example :
A module to compute the log of a value can be represented by module log. The user only need to know the interface of the module.
A specification of module specifies what a module is supposed to do.
- The main goal is to provide specifications sufficiency precise and complete that other pieces of software can be written to interact with the piece specified without additional information.
- The secondary goal is to include in the specification no more information that necessary to meet the first goal.
The desirable properties that module specifications should have are following :
- Complete – The given specifications should specify the entire behavior of the module so that only correct implementations satisfy the specifications. The specifications must provide to the intended user all the information that he will need to use the program correctly. The specification must provide to the implementer, all the information about the intended use that he needs to complete the program.
- Unambiguous – The given specifications should be unambiguous. Specifications should have more than one interpretation.
- Understandable – The given specifications should be understandable. Specific language should be such that specifications can be easily written.
- Implementation-independent – It is an important property of specifications. Specifications should be given in an abstract manner independent of the implementation of the module and should not specify any particular method for implementation of the module. The specification should only give the external behavior; the interior details of the module should be decided later by the programmer.
My Personal Notes
arrow_drop_up