Fail-stop
   HOME

TheInfoList



OR:

{{Unreferenced, date=June 2019, bot=noref (GreenC bot) A fail-stop subset of a
computer language A computer language is a formal language used to communicate with a computer. Types of computer languages include: * Software construction#Construction languages, Construction language – all forms of communication by which a human can Comput ...
is one that has the same
semantics Semantics is the study of linguistic Meaning (philosophy), meaning. It examines what meaning is, how words get their meaning, and how the meaning of a complex expression depends on its parts. Part of this process involves the distinction betwee ...
as the original, except in the case where an exceptional condition arises. The fail-stop subset must report an exceptional condition whenever the superset language reports one, but may additionally report an exceptional condition in other cases. Fail-stop languages are often used in computer systems where correctness is very important, since it is easier to make such systems fail-fast. For example, the "+" operator in many programming languages is not
associative In mathematics, the associative property is a property of some binary operations that rearranging the parentheses in an expression will not change the result. In propositional logic, associativity is a valid rule of replacement for express ...
because of the possibility of floating-point overflow. Repairing these languages to fail fast when commonly assumed properties do not hold makes it much easier to write and verify correct code.


Examples

In many widely used programming languages the code below might reduce the bank account value if the deposited amount or old account value is very large, by causing an overflowed value to be assigned to new_bank_account_value. new_bank_account_value = old_bank_account_value + amount_deposited // example calculation with 32-bit signed integers to demonstrate, which overflow above 2,147,483,647 // -2,147,483,646 = 2,147,483,640 + 10 But in a fail-stop language that treats overflow as an exceptional condition, it is either correct, or will terminate with an exceptional condition.


See also

*
Exception handling In computing and computer programming, exception handling is the process of responding to the occurrence of ''exceptions'' – anomalous or exceptional conditions requiring special processing – during the execution of a program. In general, an ...
*
Fail-safe In engineering, a fail-safe is a design feature or practice that, in the event of a failure causes, failure of the design feature, inherently responds in a way that will cause minimal or no harm to other equipment, to the environment or to people. ...
* Fault-tolerant *
Bottom type In type theory, a theory within mathematical logic, the bottom type of a type system is the type that is a subtype of all other types. Where such a type exists, it is often represented with the up tack (⊥) symbol. Relation with the empty type ...
Software engineering terminology Computer security