0% found this document useful (0 votes)
25 views5 pages

1.2.2 Application Generation

Uploaded by

Jakub
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as ODT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views5 pages

1.2.2 Application Generation

Uploaded by

Jakub
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as ODT, PDF, TXT or read online on Scribd
You are on page 1/ 5

1.2.

2 Application Generation

Nature of applications
Software is either categorised as application or system software.
Application software: designed to be used by the end user to perform one specific task,
application software requires system software in order to run. Examples include: desktop
publishing, word processing, spreadsheets and web browsers.
Systems software: low level software that is responsible for running the computer smoothly,
by interacting with hardware and generally providing a platform to applications software to
run. The user doesn’t interact with system software, but it ensures high performance for the
user. Examples: utility programs, OS, device drivers.

Utility software
Utility software is a key piece of system software to ensure the consistent and high
performance of the operating system. Each utility program has a specific function linked to
the maintaining of the computer.
Compression: ability to compress and decompress files that are too large to be sent across
the internet and is also used for storage.
Disk defragmentation: file fragmented on the HDD can reduce read/write times as they
aren’t stored consecutively. The defragmenter rearranges the contents of the HDD so they
can be accessed faster, thus improving performance.
Anti-virus: responsible for detecting potential threats to the computer, alerting the user and
removing these threats (example – windows defender)
Automatic updating: ensures that the OS is up to date with any updates required to tackle
bugs or security flaws. Prevents potential vulnerability to hacking or malware.
Backups: data in permanent storage needs to be regularly backed up in case files are lost.
The utility software creates routine copies of specific files selected by the user. How often
backups happen are also specified by the user. So in case of a power failure, malicious attack
– files can be recovered. This is important for corporations who have to abide to the data
protection act.

Open-source vs closed-source
1.2.2 Application Generation

Source code is written by a programmer and refers to object code before it has been
compiled, describing software to be open or closed source refers to whether the source
code is accessible to the public.
Open source: can be used by anyone without a license and is distributed with the source
code. Anyone can modify the software as long as the software produced is also open source.
Advantages: Can be modified and improved by anyone, support with troubleshooting from
the online community.
Disadvantages: online support may not be sufficient or correct, lower security could lead to
malicious software distribution.
Closed source (proprietary): requires the user to hold a license to use the software. Users
cannot access the source code as the company owns the copyright license.
Advantages: thorough, regular and well tested updates, expert support with problems, high
levels of security.
Disadvantages: license restricts how many people can use the software at once, users cant
modify the software themselves for improvement.

Translators
1.2.2 Application Generation

A program that converts high-level source code into low-level object code, which is then
ready to be executed by the computer. There are 3 types of translators which convert
different types of code.
Compiler: Translates high-level code into machine code all at once, after carrying out a
number of checks and reporting back any errors. This is a much longer process in
comparison to a interpreter. If changes need to be made the whole program must be
recompiled. The object code produced is hardware specific. Once compiled the code can be
run without a translator being present.

Interpreter: Translates and executes code line by line. If an error is found the procedure is
stopped, it may appear faster than compilers as code is instantly executed. However, they
are slower than compiled code because code must be translated each time it is executed
with an interpreter.

This makes interpreters useful for testing sections of code and pinpointing errors, as time is
not wasted compiling the entire program.
Interpreted code requires an interpreter in order to run on different devices. However, it can
be executed on a range of platforms as long as the right interpreter is available. Making
interpreted code more portable.
Assemblers: translates assembly code, which is a low-level language as its ‘next level up’
from machine code. It is platform specific, as instructions are dependent on the instruction
set of the processor. Code is translated on a one to one basis.
Bytecode : A combination of compiled and interpreted code. From source code you go
through a compiler creating byte code. A middle ground. It is then interpreted to get to the
object code. Java is compiled into bytecode which is an intermediate step between source
code and machine code. The byte code is interpreted by a bytecode interpreted. In this case
the Java Virtual Machine.

Stages of completion
When you compile a program, it goes through these stages of completion:
1.2.2 Application Generation

 Lexical analysis
 Symbol table
 Syntax analysis
 Sematic analysis
 Code generation

Lexical analysis
All whitespace and all comments are removed. The remaining code is analysed for keywords
and names of variables and constants. These are replaced with tokens which are specific
strings of characters. It breaks things down into bits of code. No analysis.
The lexer will build up a symbol table for every keyword and identifier in the program, helps
keep track of the run-time memory address for each identifier.

Syntax analysis
The stream of tokens from the lexing stage is split up into phrases. Each phrase is parsed,
which is a process used to check each line against the rules of the language. If the phrase is
not valid, a syntax error will be recorded and added to the list of errors.
An abstract syntax tree is produced, which is a representation of the source code in the form
of a tree. More detail about identifiers is also added to the symbol table.
Semantic analysis is also carried out at the syntax analysis stage, where logic mistakes are
detected. Catering for small and simple checks.

Code generation
Once the program has been checked, the compiler generates the machine code. Optimising
code to: remove redundant instructions and replace inefficient code with code that achieves
the same result but in a more efficient way. Excessive optimisation may alter the way in
which the program behaves.

Linkers, Loaders and Use of Libraries


Libraries
Most languages have sets of pre-written functions called libraries, they have precompiled
programs which can be incorporated within other programs using either static or dynamic
linking. They are ready to use and error free, so they save time in developing and testing
1.2.2 Application Generation

modules. Another advantage of libraries is that they can be reused within multiple
programs.
Libraries are often used to provide a range of functions which would usually require a lot of
time and effort to develop. Popular libraries provide mathematical and graphical functions.
Linkers
This is a piece of software that is responsible for linking external modules and libraries
included within the code. The linker needs to put the appropriate memory addresses in
place so that the program can call and return from a library function. There are two types of
linkers:
Static: modules and libraries are added directly into the main file, increasing the file size. Any
updates to modules and libraries externally will not affect the program. This means a specific
version of a library can be used.
Dynamic: addresses of modules and libraries are included in the file where they are
references. When the program is run, the loader retrieves the program at the specified
address so it can be executed. The advantage here is that the file remains small and external
updates feed through to the main file. There is no need to rewrite code.
Loaders
Programs provided by the OS. When a file is executed the loader retrieves the library or
subroutine from the given memory location.

You might also like