1.5 Application Generation Flashcards
Application Software
- Software designed to be used by the end-user to perform one specific task
- Requires utility software to run
- E.g Word processing, spreadsheets, web browser
Systems Software
- Low-level software responsible for running the computer smoothly, interacting with hardware & providing a platform for applications to run
- Ensures high performance for the user
- E.g: File Management, Anti Virus, OS, device drivers
Utilities
- Each utility program has a specific function linked to the maintenance of the operating system
-
Compression: Enable files to compressed/decompressed. Used when
sending large files over Internet -
Disk defragmentation: Rearranges the contents of the hard drive so they
can be accessed faster, improving performance. - Antivirus: Detects potential threats to the computer, alerting user & removing threats.
- Automatic updating: Ensures the OS is kept up to date, updates automatically installed when the computer is restarted. Ensures the system is less vulnerable to malware/hacking threats.
- Backup: Automatically creates routine copies of specific files selected by the user. Files can be recovered in the event of a power failure, malicious attack etc.
Open Source Software
- Used by anyone without a license & is distributed with the source code
- Adv: Can be modified/improved, wide support, can be sold on
- Disadv: Support may be poor, lower security
Closed Source Software
- Requires user to hold appropriate
license to use it. Cannot access the source code due to copyright license - Adv: Regular & tested updates, expert support, high security
- Disadv: License limits use, cannot modify
Translators
- Program that converts high-level source code into low-level object code, then ready to be executed by a computer
- 3 types of translator (Compiler, Interpreter, Assembler)
Compiler
- Translates high-level code into machine code all at once, after carrying out checks & reporting back any errors
- This initial compilation process is longer than using an interpreter or an assembler. If changes need to be made, the whole program must be recompiled
- The machine code produced can only be executed on certain devices - compiled code is specific to a particular processor type & OS
- Code can be run without a translator being present
Interpreter
- Translate & execute code line-by-line
- Stop and produce error if line contains an error
- Slower than running compiled code as code must be translated each time it is executed with an interpreter.
- Useful for testing sections of code & pinpointing errors
-
Requires an interpreter in order to run on different devices. However, code
can be executed on a range of platforms as long as the right interpreter is available, making interpreted code more portable.
Assembler
- Assembly Code: Low-level language, next level up from machine code
- Platform specific, as the instructions used are dependent on the instruction set of the processor
-
Assemblers translate assembly code into machine code, code is
translated on almost a one-to-one basis
Stages of Compliation
Lexical Analysis: Whitespace & comments are removed from code
- Remaining code analysed for keywords & names of variables & constants. Replaced w/ tokens & information about the token associated with each keyword/identifier is stored in symbol table
Syntax Analysis: Tokens are analysed against the grammar/rules of language
- Any tokens that break the rules are flagged as syntax errors & added to a list
- E.g undeclared variable, incomplete set of brackets
- Abstract syntax tree is produced, represents source code in the form of a tree. Further detail about identifiers is also added to the symbol table
- Semantic analysis also carried out, where logic mistakes are detected.
- E.g multiple declaration, undeclared identifiers
Code Generation: Abstract syntax tree used to produce machine code
Optimisation: Detect & remove insignificant, redundant parts of the code.
- Replace repeated sections with more efficient code without altering behavior.
- Optimise for runtime performance, even if it increases compilation time.
- Excessive optimization might change program behavior
Linkers
- Responsible for linking external modules & libraries in the code. 2 types of linker:
Static: Modules and libraries added directly into machine code - Increases the size of the file
- Any updates to modules/libraries will not affect the program. So a specific version of a library can be used
Dynamic: Compiled versions of required libraries are stored on host computer - When the program is run, OS links required code from library
- Files remain small, external updates, no need to rewrite code
- May change & call wrong routine
Loaders
- Programs provided by the operating system
- When a file is executed, the
loader retrieves the library/subroutine from the given memory location
Use of Libraries
- Libraries are pre-compiled programs used via static or dynamic linking.
- Ready-to-use, error-free libraries save time in module development and testing.
- Can be reused across multiple programs.
- Offer specialized functions, saving time & effort in development
- Utilize others’ expertise, avoiding redundancy in programming tasks.
- Popular libraries offer mathematical and graphical functions.