Implementation of Software Solutions Flashcards
What do you have to conisder when choosing the language for a program
the nature of the project
the intended environment including, hardware, operating and network use
The experience of the programmers
Event driven or sequential approach
Maintainability
What are the two types of metalanguages
EBNF and Railroad diagrams
What are the symbols for EBNF
<> for non terminal (rules to be defined elsewhere)
= (this is defined as)
[] optional
{} a repetition that is repeated zero or more times to make it one or more put a symbol infront of the loop
() for grouping
Terminal symbols are just words
| for a choice between alternatives
How to read Railroad diagrams
Read the diagram as if it was a train on a railroad track
What is meta languages
it describes the syntax of programming languages
What is Translation
It is the process of converting high-level code or source code into machine executable codes.
What are the two common methods of translation
Interpretation and Compilation
What is interpretation
It is a translation method that translates each line or statement of the source code into machine code and then immediately executes it. If errors exist then it will cause a halt to the execution once encountered.
What is a disadvatnage of interpretation
it slows down the process of execution significantly because each statement must be translated into executable code before it is executed.
Users must also have a copy of the interpreter installed on their machines for execution to take place which eequires further costs and memory overheads.
The developer has limited control over his intellectual rights because the users can easily access the code becase it is distributed to users.
What is the main advantage of Interpretation
Developers use it during the coding to allow them to execute small fragrments of code quickly and helps debug/test the system.
What is compilation
It is when the source code as its entirety is translated into executable code. They can later be executed without any need for the translater. Errors encountered during the compilation process are relayed as a series of messages to the programmer.
What is the main difference between Compiler and interpretation
A compiler does not produce any actual machine code until the entire source code is known to be correct in terms of the syntax of the source code.
What is advantages of compilers
they are used to produce executable code for the majority of commercial applications because it runs faster and more efficiently thant interpretated products.
The intellectual rights of the author are protected as the code is not available to users
it is easier to provide quality support because they know the precise workings of the application as users can’t modify the code.
What is the disadvantage of Compiler
It is harder to understand the details of the original source code, and the source code is not available to the users.
What is requried to translate source code into object code
lexical analysis
syntactical analysis
code generation
What is lexical analysis
it is the process of examining each word to ensure it is a valid part of the language. It achieves this through the use of a table of symbols or tokens. It gets the identifiers and constants to add them into a predefined table which serves as a dictionary to check if the words are correct and becomes tokenised.
What is syntactical analysis
It is the process of checking the syntax of sentences and phrases is correct in terms of the grammatical rules of the language.
what is parsing
it is the process of checking the syntax of a sentence.
What is a Dynamic Link Library (DLL)
A file containing object code subroutines that add extra functionality to a high-level language. DLLs need to be distributed with applications.
What is code generation
it is after when the processes of lexical analysis and syntactical analysis have completed without error then the machine code can be generated. It involves converting each token or series of tokens into their respective machine code instructions. Because we know that the tokens are correct and are in the correct order, no errors will be found during code generation.
What is a register
A temporary storage location within the central processing unit. The size of a register is the same as the word size of the processor.
What is machine code
it is the native language of the CPU. it is written in a string of 1s and 0s.
What is a flag in relation to a CPU
In relation to the CPU, a flag is a single bit stored within a register. Flags are used to
indicate an event has occurred within the CPU.
what is interrupt in a CPU
In relation to the CPU an interrupt is a call to an outside device. The device responds by
reading or writing to the accumulator