Run time (program lifecycle phase)

From Wikipedia, the free encyclopedia
  (Redirected from Run-time error)
Jump to: navigation, search

In computer science, run time, run-time, runtime, or execution time is the time during which a program is running (executing), in contrast to other phases of a program's lifecycle such as compile time, link time, load time, etc.

A run-time error is detected after or during the execution of a program, whereas a compile-time error is detected by the compiler before the program is ever executed. Type checking, storage allocation, code generation, and code optimization are typically done at compile time, but may be done at run time depending on the particular language and compiler.

Contents

[edit] Implementation details

In certain cases, the execution of a program begins after a loader performed the necessary memory setup and linked the program with any dynamically linked libraries it needs. In some cases a language or implementation will have these tasks done by the language runtime instead, though this is unusual in mainstream languages on common consumer operating systems.

Some program debugging can only be performed (or is more efficient or accurate) when performed at runtime. Logic errors and array bounds checking are examples. For this reason, some programming bugs are not discovered until the program is tested in a "live" environment with real data, despite sophisticated compile-time checking and pre-release testing. In this case, the end user may encounter a runtime error message.

[edit] Application errors — exceptions

Exception handling is one language feature designed to handle runtime errors, providing a structured way to catch completely unexpected situations as well as predictable errors or unusual results without the amount of inline error checking required of languages without it. More recent advancements in runtime engines enable automated exception handling which provides 'root-cause' debug information for every exception of interest and is implemented independent of the source code, by attaching a special software product to the runtime engine.

[edit] Orthographic styling

Some users prefer an orthographic styling in which "run-time" as an adjective is hyphenated, whereas "runtime" as a noun is styled solid (closed up). Examples:

  • "Polymorphism requires run-time binding rather than compile-time binding."
  • "The runtime of the algorithm is order n2."

As elsewhere with linguistic prescription for the styling of compounds (open, hyphenated, or solid), natural language often pays no heed.

[edit] See also

[edit] References

Personal tools
Namespaces
Variants
Actions
Navigation
Interaction
Toolbox
Print/export
Languages