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: * Construction language – all forms of communication by which a human can specify an executable problem solution to a compu ...
is one that has the same
semantics Semantics (from grc, σημαντικός ''sēmantikós'', "significant") is the study of reference, meaning, or truth. The term can be used to refer to subfields of several distinct disciplines, including philosophy Philosophy (f ...
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 In systems design, a fail-fast system is one which immediately reports at its interface any condition that is likely to indicate a failure. Fail-fast systems are usually designed to stop normal operation rather than attempt to continue a possibly f ...
. For example, the "+" operator in many programming languages is not
associative In mathematics, the associative property is a property of some binary operations, which means that rearranging the parentheses in an expression will not change the result. In propositional logic, associativity is a valid rule of replacement f ...
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 specific type of failure, inherently responds in a way that will cause minimal or no harm to other equipment, to the environment or to people. Unlike inherent safe ...
*
Fault-tolerant Fault tolerance is the property that enables a system to continue operating properly in the event of the failure of one or more faults within some of its components. If its operating quality decreases at all, the decrease is proportional to the ...
*
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. When the bottom type is empty, ...
Software engineering terminology Computer security