Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags

What are faults in software engineering?

Sheza Munir

A fault is an incorrect or unintended behavior by a computer program. This fault may cause an error or warning in the program. If left untreated, it can cause failures in the actual working of a deployed program.

If multiple components of the program rely on each other, a fault in one may cause problems in the other components as well.

Difference from error and failure

A fault is a mistake that does not let the software perform its intended function. An error is a difference between correct and incorrect output. Failure is the state of not being able to meet an intended objective.

Types of faults

There are many types of faults, some of which are highlighted below:

  • Algorithm fault:
    An algorithm fault arises when the logic of the component does not work as intended or takes the wrong steps, impacting the following components.
  • Computational fault:
    A computational fault arises when the program is not capable of computing the correct result. This commonly arises when we use values of different data types in the same expression.
  • Syntax fault:
    A syntax fault arises when the wrong syntax is used in the program. Each programming language has its own syntax rules that we must follow.
  • Documentation fault:
    This fault occurs when the documentation and the actual implementation of the program are different.
  • Overload fault:
    Overload faults occur when the intended space for the data structure is filled and the data overflows.
  • Hardware fault:
    This fault arises when the written software is not compatible with the hardware it runs on, or the hardware malfunctions.
  • Software fault: A software fault occurs when the software does not work properly or is not supported by the operating system it is running on.
Different types of issues in code execution.

Avoiding faults

We can avoid such faults and many others by using the proper measures for software preparation. We can align these techniques and procedures according to the intended hardware and software specifications, algorithms, programming languages, etc.

Fault tolerance

Faults may arise that you were not aware of. It is a hallmark of good software to deal with such faults. A common method is to use exceptions and error handling, so the program can tolerate any faults that may arise.

RELATED TAGS

CONTRIBUTOR

Sheza Munir
Copyright ©2022 Educative, Inc. All rights reserved
RELATED COURSES

View all Courses

Keep Exploring