1.2.2 - Applications Generation Flashcards
(23 cards)
Describe and give examples of applications software
Performs generic tasks for the user
Examples:
- Database (DBMS)
- Word processor
- Spreadsheet
- Graphics editor
- Desktop Publisher (DTP)
- Presentation Software
- Computer Aided Design (CAD)
Which category of software would be used to perform each of the following tasks?
Describe and give examples of utility software
A piece of system software, with one specific purpose, that is used for the maintenance of the system
Examples:
- Disk Defragmenter
- Compression Utility
- Anti-Virus/Malware
- Device driver
- Firewall
Describe open-source software
Source code is freely available for others to amend / recompile
- Can be built on to tailor the program to specific needs without starting from scratch
- Code open for bugs to be spotted and fixed.
- Has the benefit of a community potentially improving the system
Describe closed-source software (proprietary)
The source code is not made available
- Distributed in binary form
- There is no permission to amend the program code, so cannot be ‘tweaked’
- Users are sold a license to use it (with conditions).
Describe and give examples of software libraries
Pre-written blocks of code that contain useful routines that can be imported into a program.
- Examples: encryption and graphic routines
What are the benefits of software libraries?
- Relatively error-free as has already been tested by the author
- Already written so are ready to use which saves time/money
- Used multiple times for common tasks which reduces repeated code
- The programmer can use code beyond their expertise
- Written by an expert so should be efficient
- Different source languages can be used to increase features
What are the negatives of using software libraries?
- May significantly increase the size of the compiled file as the library contains many routines that aren’t being used.
- Not written by the programmer so need to spend time familiarising themselves with it.
Describe machine code
- The output of a translator
- Uses binary notation (0101010101000011)
- Dependent on architecture
- Harder to program
Describe high-level languages
- Not architecture specific
- Can be recompiled for different architectures.
- Close to English
Describe assembly language
- Uses mnemonics to represent machine code instructions/opcodes
- Consists of simple instructions
- Specific to the instruction set of the given processor
What is a translator?
Software that converts code from high-level, or assembly, to machine code
What are the 3 types of translators?
- Interpreter
- Compiler
- Assembler
Describe an interpreter and give an example of a language that would use one.
- Translates source code every time the program is run
- The user needs access to the source code to run the program
- Will run on any machine
- The slowest option for translators
- Translates code line by line
Example: JavaScript
Describe a compiler and give an example of a language that would use one.
- Machine dependent - different compilers are needed for each type of machine
- Creates an executable program (.exe)
- Users do not see the source code
- Will run quicker than the other options.
- Translates all the high-level code at once
Example: C#
Describe an assembler and give an example of a language that would use one.
- Used to convert assembly language into machine code
- Replaces mnemonic opcodes with machine codes
- Replaces symbolic addresses with numeric addresses
- Creates one line of object code for each line of source code.
Example Assembly Language
State the stages of compilation
- Lexical Analysis
- Syntax Analysis
- Code Generation
- Optimisation
Describe the lexical analysis stage
- Comments and whitespace are removed
- The symbol table is started
- Variable names like ‘count’ are added to a symbol table.
- Reserved words like ‘WHILE’ are tokenized.
- The series of tokens and symbol table is passed onto the next stage, syntax analysis
Describe the syntax analysis stage
- Receives output from the lexical analysis
- Code is checked to ensure it follows the rules of the language
- Uses abstract syntax trees to check syntax rules are followed.
- The symbol table is completed
- An error list is generated at the end of this stage
Describe the code generation stage
- Receives the abstract syntax trees from syntax analysis
- The object code is created (machine code)
- Turns the code into a format that the processor can understand
Describe code optimisation
- Ensures the code runs quicker and uses less memory.
- The code from the prior stages may have been inefficient (instructions used that can be replaced by simpler ones.)
Describe the purpose and types of linker
- At the end of compilation, a linker is used to combine the object code with the library code to make the single executable file
- Links the main program to libraries
STATIC - Include full library in the final executable code
DYNAMIC - Points to the external libraries (adds a shortcut to it)
Describe the purpose of a loader
- A program in an operating system (OS) used to load the executable file (exe) into memory from secondary storage.
- Loads the required software libraries