Main Page About Template

Applications Generation

Utility software

Utility software is software used for the maintenance of an operating system. It is used to ensure consistent and high performance of an OS.

Open source vs closed source software

Open source and closed source software refers to whether software is publicly available or not.

Translators

A translator is a program that converts high-level source code into low-level object code (code a computer can execute e.g. machine code)

Stages of compilation

Compilation is a complicated process involving four main stages of processing.

1. Lexical analysis

First, whitespace and comments are removed. Then, the code is split into words and special characters which are represented as tokens.

2. Syntax analysis

Tokens are then checked against the syntax of the language ensuring they are in a valid order. Any tokens that violate the grammar of the language are added to a list and outputted at the end of this stage. An abstract syntax tree is produced which represents the source code as a tree. Moreover, a symbol table is added to identify the names of defined objects. Semantic analysis is where logical mistakes are found, e.g. an undeclared variable.

3. Code generation

The abstract syntax tree is used to generate object/machine code.

4. Code optimisation

Optimisation involves searching the machine code for ways to improve the efficiency of the program. For example, redundant code is removed, or repeated code is grouped and replaced with more efficient code.

Linkers, loaders and libraries

Libraries are pre-compiled programs containing code which can be incorporated into other programs using a linker. Libraries are useful because the code is efficient, error free and can save time in developing modules. There are two types of linkers: static and dynamic. Static linkers copy the library into the main file, meaning update to the library won't affect the program. However, this does increase the file size. Dynamic linkers include the address of a library in the main file reducing the file size. The library is retrieved during runtime.