Download: 1.2.2 Applications Generation
Application Software: (a program or a group of programs designed for end users, which are people who actually uses a particular product)
General Purpose Software: This is software that can be used for many purpose. For example: Word.
Special Purpose Software: This performs a single specific task or set of tasks. This includes hotel booking systems to fingerprint scanning systems.
“Off-The-Shelf” Software: This is software that is ready to use. It is standardized software applications that are mass-produced and available to the general public, and fit for immediate use.
Bespoke Software: This is custom-built software that is made to address a specific requirement of a business.
Utility Software: – Software that is designed to perform a specific task to extend or aid the operating system.
Open source software: is software released where the source code can be accessed and can be modified to a user’s will.
Proprietary Software (Closed Software): is software where only the compiled code is released and the source code is closed. This type of software restricts the modification of the software. It is sold in the form of a license, which is required to use the software.
High-Level Language: The source code is easy for humans to write, but computers need to translate it into machine code before they can read and run it
Low-Level Language: Hard for humans to understand to read and write but easier for a computer to run
Stages of Compilation:
- Lexical Analysis: This is the first phase of a compiler. It takes the modified source code from language preprocessors that are written in the form of sentences. It then breaks these syntaxes (e.g. variable names) into a series of tokens, by removing any white space or comments in the source code. It will also perform simple error-checking. For example: it will detect an attempt to assign an illegal value to a constant, such as a value of the wrong type or one that causes overflow or underflow.
- The Symbol Table: Contains an entry for every keyword and identifier in the program. The exact format of the entries in the table will vary from compiler to compiler. It will typically include:
- The identifier or keyword
- The kind of item (variable, array, procedure, keyword)
- The type of item (integer, string, float)
- The run-time address of the item, or its value if it is a constant.
- A pointer to accessing information. For example, a pointer to each of the parameters given in a procedure or function.
The Lexical analyser spends a great proportion of its time looking up the symbol table. This means it has an important effect on the overall speed of the compiler. The symbol table must be organized in such a way that it can be accessed quickly as possible.
- Hash Table: This is an example of a Symbol Table, where the keyword or identifier is ‘hashed’ to produce an array subscript. However, collisions (synonyms) can occur. The best way to handle them is to store the synonym in the next available free space in the table.
- Syntax Analysis: This receives and accepts the output from the Lexical Analysis. It is the process of determining whether the sequence of input characters, symbols, items or tokens form a valid sentence against the grammar and rules of the structure of the programming language.
- Parsing: This is the task of systemically applying the set of rules to each statement to determine whether it is valid.
- Semantics Checking: Semantics define the meaning rather than the grammar of the programming language. It is possible to write a series of syntactically correct statements which do not obey the rules for writing a correct & functional program. For example: Assigning a real (float) value to an integer variable or using a real number instead of an integer as the counter in a FOR loop.
- Code Generation: This is the last stage of compilation that occurs after syntax analysis. This when machine code is generated. It will produce executable code, which is equivalent to the source program. Variables & Constants are given location addresses.
- Optimisation: This occurs during code generation. These Code Optimisation Techniques attempt to reduce the execution time of the object program, which increases processing speed when the program is executed. The machine code is checked and made as efficient as possible. It will try and reduce the number of unneeded instructions. However, it will increase compilation time. It may also produce unexpected results.
Linkers and Loaders: Once a program has been compiled, any separately compiled subroutines must be linked into the object (machine) code.
- Linkers: This combines the complied program code with the compiled library routine code all into one executable program. It puts appropriate machine addresses in all the external ‘call’ and ‘return’ instructions, so that the modules are linked together correctly.
- Loaders: This is part of the operating system that loads the executable program and associated libraries into memory and handles addresses before the program is run.
Libraries: These are ready-compiled programs, which are grouped in software libraries. These can be loaded and executed when required.
- They can be standard pieces of software which often perform common tasks, such as sorting and searching.
- Routines are compiled and are made to fit into the modularization of algorithms.
- They are pre-tested (tried & tested) so they are relatively error free.
- They are pre-written. Thus means that they are ready and available to be used by a programmer. This can save time when writing a program.
- They can be used multiple times to reduce repeated code.
- They may allow the programmer to use code, which has been written in a different source language.
- They are most likely written by expert programmers so other programmers can use their expertise.
355 total views, 1 views today