Flashcards
2) What is computer software?
Cards in this deck (15)
- 1Explain the difference between an algorithm and a programWhen an algorithm is transformed into a form suitable for execution by a computer through programming language, it becomes a program
- 2Give 4 different programming paradigms and explain the underlying principle of eachImperative=explicitly change a program's state
Data orientated=work data through manipulating and searching relations (tables)
Assembly=provides the interface between machine code and high level programming language
Concurrent=provides facilities for concurrency within programs - 3Give 4 drivers of the evolution of programming languages and briefly explain each of the motivationsProductivity=Programming languages are complex with lots of lines of code, making them expensive in development and maintenance. This leads to the requirement of new programming languages that speed up the software development process, reduce response times and costs and support fast user interface development.
Security=The Internet has raised the question of whether we can trust our programming languages, leading programming languages to evolve to become safer.
Execution speed=Imperative programming languages are closely tied to our abstraction of computer hardware as a bunch of memory locations the values of which are explicitly manipulated by the CPU. Such imperative programming languages will not really be usable on a parallel computer and consequently we will not achieve the increases in execution speed promised by parallel computing.
Curiosity=When an algorithm is described in a different way, programming language designers build a new programming language. - 4Give 3 general properties any programming language should have-Be easy to use
-Support 'abstraction' so adding new features and concepts is possible
-Be inexpensive to use, in terms of execution time, memory usage and maintenance costs - 5What are the syntax and semantics of a programming language?Syntax=the rules that govern what makes a program 'legitimately written'
Semantics=the rules that govern what a program 'means' - 6Why do we strive for formal semantics?-We can be sure programs execute identically on different devices
-We can be sure the program does what the programmer thinks it does - 7Explain the difference between compilation and interpretationA compiler transforms the high level program to machine code for execution by the CPU.
An interpreter translates one instruction/small number of the high level program at a time, as it is needed, with the translations interspersed with the activity of the program. - 8How are Java programs executed?Java has its programs compiled into bytecode which is then translated by a Java Virtual Machine for the target processor
- 9Give an advantage of compilation over interpretation and vice versaCompiled programs tend to run faster as the execution of the program is not interspersed with compilation activity. However, interpreted programs tend to use memory better
- 10Outline the phases of compilation-A lexical analyser reads a high-level program as a string of symbols and converts into basic syntactic components
-A syntax analyser recognises the syntactic structure of the token stream, resulting in a parse tree
-A translation phase flattens the parse tree into a linear sequence of intermediate code
A code generation phase converts the intermediate code into assembly and then onto machine code - 11In moving from a program as a string of symbols to a token stream, which algebraic construction is usually used to define tokens?Token are defined by regular expressions
- 12What is the relationship between regular expressions and finite state machines?A set of strings is represented by a finite state machine, if and only if, it is accepted by a finite state machine
- 13Which algebraic notation is normally used to specify the syntax of a programming language?Backus Naur Form (BNF)
- 14Explain very briefly how a Prolog program computesThey come in 2 parts:
-the program (or database essentially, withe the facts you know and rules you can apply to deduce new facts)
-the query (the question you want answering) - 15What is the fundamental principle of the research area known as ubiquitous computing?The integration of computers and software into everyday objects and activities so we can control (or have controlled for us) various aspects of our everyday lives
Information
- Description
- Degree Engineering Flashcards on 2) What is computer software?, created by jeevanaujla97 on 30/05/2016.
- Created by
- jeevanaujla97
- Views
- 0
- Rating