1.2.2 Application generation

0.0(0)
studied byStudied by 3 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/31

flashcard set

Earn XP

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

32 Terms

1
New cards

Source Code

Program code written by the programmer in high level code e.g C++

2
New cards

Assembly code

Low level code, each instruction maps to a single machine code instruction. Each machine will have its own assembly code instruction set.

3
New cards

Translation

Converting high level language to machine code

4
New cards

Why use high level languages?

It is easier to learn, understand, and debug.

5
New cards

Complier

translates whole program into machine code into machine code in one operation, reporting errors at the end of the process.

6
New cards

Interpreter

translates and executes program into machine code line by line, stops if an error is encountered and waits for program to be debugged before running again.

7
New cards

What is the compilation process?

Set of stages that turns source code into executable object code

8
New cards

What happens in lexical analysis stage?

Remove comments and white space. Allocate tokens (which are categorised strings that represent the smallest meaningful part of code). Produce a symbol table to keep track of variables and subroutines.

9
New cards

tokenised

happens in lexical analysis stage when the purpose of each element is identified such as variable name, arithmetic operation, value.

10
New cards

Use of symbol table

Used by the complier to keep track of all the elements identified in the program.

11
New cards

Syntax analysis

Compiler checks that the tokens are in correct order and follow rules of the programming language being used. list of errors. abstract syntax tree.

12
New cards

AST

Abstract syntax tree maps the structure of the program.

13
New cards

Semantic Analysis

Used to highlight logic errors, determines whether the code that has been written has meaning within the language. i.e Undeclared variables, type mismatch.

14
New cards

Types of semantic error

Data type declaration mismatch , wrong parameters called in a subroutine, using primitive variables ( reserved words as variable names.

15
New cards

Code generation

Code from the abstract syntax tree is converted into object code.

16
New cards

Distinguishes between compliers and interpreters

Code generation. Interpreters do not produce executable file.

17
New cards

Code optimisation.

Happens at each stage of the compilation process, optimisers identify redundant or repeated code and remove or rearrange the code if necessary.

18
New cards

Libraries

store of pre-written subroutines that gives access to many specialist functions for example maths linpbrary in Java.

19
New cards

Linkers

resolves issue if several object code files when dealing with compilations of higher level languages by creating a singular executable file

20
New cards

Loaders

Copies the executable code into the RAM,

21
New cards

advantages of compliers

executable code cannot be reverse engineered, source code is protected, benefits commercial developers.

faster running time, executable file doesn't need to be translated, good for performance intensive games.

program doesn’t need translation, translator doesn’t need to be installed on computer

well optimisatied

22
New cards

disadvantages of compliers

errors are reported at the end of a compilation process which means that debugging process is slower for large programs as errors can be interlinked.

recompiling to make changes

can’t be run across different processors

23
New cards

LSSCO

lexical, syntax, semantic, code generation, optimisation

24
New cards

advantages of interpreters

line-by-line allows for interpreters allows for the developers to identify and debug errors as they occur. very useful to use in the development stage of software development.

error reports are shown in the console, debugging is quicker and easier

can be used across platforms.

25
New cards

disadvantages of interpreters

source code runs more slowly that compiled code as translation process repeats itself.

program requires an interpreter.

interpreter takes up memory space.

26
New cards

use of byte code

intermediate stage used by interpreter languages to speed up the translation process.

27
New cards

assemblers

translate assembly code to executable code

28
New cards

assembling vs translation

simpler process as it uses a one-to-one relationship between assembly code and machine code.

29
New cards

closed source programs

software is compiled and provided to the user without revealing the source code

30
New cards

benefits of close source

prevents users altering the source code.

best for commercial use as users need to purchase a license to use the software.

Users have dedicated help services from the company ensuring reliability and maintenance.

Protects intellectual property.

31
New cards

open source

source code is available to users and can be modified amended or studied. promotes collaboration and community development.

32
New cards

utility

small program with a single purpose, usually involving system maintenance