Level 9 Level 11
Level 10

A2 1.2.2 - Applications Generation

42 words 0 ignored

Ready to learn       Ready to review

Ignore words

Check the boxes below to ignore/unignore words, then click save at the bottom. Ignored words will never appear in any learning session.

All None

lexical analysis
Compilation Stage 1 - identifying components of code and assigning them tokens
In lexical analysis, the source code will be stripped of redundant whitespace and ...
In lexical analysis, the code is divided into ... (smallest pieces of code possible) and each of these are assigned a token
Tokens include ... e.g variables, procedures and classes
Tokens include ... e.g if, for, while, return
Tokens include ... e.g =, +, ==, *
Tokens include ... e.g fixed numbers and strings (like 115 or "Hi")
Tokens include ... e.g ;, (, ), {, }, [, ]
An error is raised in lexical analysis if a lexeme cannot be assigned a ...
symbol table
contains an entry for every keyword and identifier in the program, along with its address in the table, which its token will point to (created during lexical analysis)
Example of a Lexical Error: having a variable name of ...
syntax analysis
Compilation Stage 2 - determining whether the sequence of tokens forms a valid statement
syntax diagrams
used to express a programming language as a set of rules
task of systematically applying the set of rules to each statement to check if it is valid
Data structures used to help in syntax analysis include stacks and ...
int float x = 5;
Example of Syntax Error: (in java)
semantic analysis
Compilation Stage 3 - checking the meaning of the statements to find logical errors
type mismatch
Semantic Error: such as trying to assign a string literal to an integer
Semantic Error: referencing a variable that is out of scope or ...
multiple declaration
Semantic Error: the ... of a variable in the same scope
run time errors
These will not be prevented or caught in semantic analysis
code generation
Compilation Stage 4 - when the stream of tokens is converted into intermediate or machine code
machine independent
For some languages, the code will only be generated into intermediate code (and not machine code), which allows for it to be ...
processor architecture
Machine code generation must be repeated for each different ...
target operating system
Machine code generation may also be needed for each different ...
code optimisation
Compilation Stage 5 - the use of techniques to make the program more efficient (this is done after being converted to intermediate code AND after being converted to machine code)
execution time
Advantage of Code Optimisation: reduces the ... of the object program
computer resources
Advantage of Code Optimisation: reduces the amount of ... required by the program
compilation time
Disadvantage of Code Optimisation: the ... will be increased, sometimes by quite a lot
unexpected results
Disadvantage of Code Optimisation: it could potentially cause ...
static linker
links the external modules used, with the rest of the code, by copying the routines into the executable file
dynamic linker
links the external modules used, with the rest of the code, by linking the address of the library into the executable file
ready-compiled program which can be included in the code for a program
Advantage of using Static Libraries: they are good for ...
specific version
Advantage of using Static Libraries: they can make sure a ... of a library is used
Advantage of using Static Libraries: libraries can't accidentally be deleted which would cause ... when the program is run
smaller file size
Advantage of using Dynamic Libraries: the program will have a ...
multiple programs
Advantage of using Dynamic Libraries: can reuse code as the code for the libraries is shared between ...
recompile it
Advantage of using Dynamic Libraries: allows updates to the libraries to automatically be part of the program without having to update and ...
when needed
Dynamic libraries will be imported into memory by the loader ...
takes the executable file from secondary storage and passes it into RAM or will pass it to the dynamic linker first if it uses dynamic libraries
Advantage of using Libraries: they are error-free as they have already been ...