Applications generation - paper 1 Flashcards
What are the two types of software?
Applications software
Systems software
What is open source code?
Open source code can be used by anyone without a license and is distributed with the source code.
What is closed source code?
Closed source code requires the user to hold a license to use it. Users cannot access the source code as the company owns the copyright license.
Advantages of open source code?
Can be modified and improved by anyone
Technical support from online community
Can be modified and sold on
Advantages of closed source code?
Thorough, regular and well tested updates
Company owning software provides expert support and user manuals
High levels of security as developed professionally.
Disadvantages of open source code?
Support available online may be insufficient or incorrect. No user manuals
Lower security as may not be developed in a controlled enviroment
Disadvantages of closed source code?
License restricts how many people can use the software at once
Users cannot modify and improve software themselves.
What are different types of translators?
Compiler, interpreter, assembler
What is a compiler?
Compilers translate high level code into machine code all at once. The initial compilation process is longer than using an interpreter or an assembler, if changes are made the whole code must be re compiled.
What is an interpreter?
An interpreter translates and executes code line by line.
Initially appear faster however slowed than running compiled code
Useful for testing sections of code and pinpointing errors
What is an assembler?
An assembler translates assembly code into machine code
Assembly code is platform specific as instructions are processor specific
What are the four different stages of compilation?
Lexical
Syntax
Code generation
Optimisation
What happens in lexical analysis?
White spaces and comments are removed from the code
Keywords and names of variables are replaced with tokens that are stored in a symbol table
What happens in syntax analysis?
Tokes are analysed against rules are programming language
Any tokes that break the rules are flagged for a syntax error
Syntax tree is produced that represents the code as a tree
What happens in the code generation stage of compilation?
The syntax tree produced is used to produce machine code.