Runtime (program lifecycle phase)

Short description: Period during which a computer program is running (executing)

Program execution

General concepts

* Code
* Translation
* Compiler
* Compile-time
* Optimizing compiler
* Intermediate representation (IR)
* Execution
* Runtime system
* Runtime
* Executable
* Interpreter
* Virtual machine

Types of code

* Source code
* Object code
* Bytecode
* Machine code
* Microcode

Compilation strategies

* Just-in-time (JIT)
* Tracing just-in-time
* Ahead-of-time (AOT)
* Transcompilation
* Recompilation

Notable runtimes

* Android Runtime (ART)
* Common Language Runtime (CLR) & Mono
* crt0
* HHVM
* Java virtual machine (JVM)
* Objective-C
* V8
* Node.js
* PyPy
* Zend Engine

Notable compilers & toolchains

* GNU Compiler Collection (GCC)
* LLVM
* Clang

* v
* t
* e

In computer science, runtime, run time, or execution time is the final phase of a computer program's life cycle, in which the code is being executed on the computer's central processing unit (CPU) as machine code. In other words, "runtime" is the running phase of a program.

A runtime error is detected after or during the execution (running state) of a program, whereas a compile-time error is detected by the compiler before the program is ever executed. Type checking, register allocation, code generation, and code optimization are typically done at compile time, but may be done at runtime depending on the particular language and compiler. Many other runtime errors exist and are handled differently by different programming languages, such as division by zero errors, domain errors, array subscript out of bounds errors, arithmetic underflow errors, several types of underflow and overflow errors, and many other runtime errors generally considered as software bugs which may or may not be caught and handled by any particular computer language.

## Contents

* 1 Implementation details
* 2 Application errors (exceptions)
* 3 See also
* 4 References

## Implementation details

When a program is to be executed, a loader first performs the necessary memory setup and links the program with any dynamically linked libraries it needs, and then the execution begins starting from the program's entry point. 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 production 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.

## 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.

## See also

* Compile time and compiling
* Interpreter (computing)
* Runtime type information
* Runtime system
* Runtime library

## References

0.00

(0 votes)

Original source: https://en.wikipedia.org/wiki/Runtime (program lifecycle phase). Read more

|

Retrieved from "https://handwiki.org/wiki/index.php?title=Runtime_(program_lifecycle_phase)&oldid=2642383"
*[v]: View this template
*[t]: Discuss this template
*[e]: Edit this template