Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to Software

Similar presentations


Presentation on theme: "Introduction to Software"— Presentation transcript:

1 Introduction to Software
CHAPTER 4 © Oxford University Press All rights reserved.

2 © Oxford University Press 2013. All rights reserved.
Overview Identify system programs and application programs Discuss basic concepts of high- and low-level languages Briefly discuss compiler, interpreter, linker, and loader functions Explain the software development steps © Oxford University Press All rights reserved.

3 © Oxford University Press 2013. All rights reserved.
Introduction DIFFERENT CATEGORIES OF SOFTWARE. System software controls the activities of computer resources (such as input/output devices, memory, processor). Application software is designed and developed for a specific or generic type of use which is sold in the market or for a user or an organization. © Oxford University Press All rights reserved.

4 © Oxford University Press 2013. All rights reserved.
Key Words Loader : A system program that accepts object programs and prepares these programs for execution by the computer and initialize the execution. Linker : It takes one or more object files or libraries as input and combines them to produce a single (usually executable) file. Compiler : It is a system software that translates the entire source program into machine language. Interpreter: An interpreter is a system software that translates the source program into machine language line by line. © Oxford University Press All rights reserved.

5 © Oxford University Press 2013. All rights reserved.
Key Words Syntax: It refers to the rules governing the computer operating system, the language, and the application. Assembler: It is a program that translates an assembly language program into machine code. Bug: It is a programming error. Debugging: It is the process of eliminating errors from a program. Semantic: It is the meaning of those expressions, statements, and program units. © Oxford University Press All rights reserved.

6 Programming Languages
A programming language can be defined formally as an artificial formalism in which algorithms can be expressed. It is composed of a set of instructions in a language understandable to the programmer and recognizable by a computer. Computer languages have been continuing to grow and evolve since the 1940’s. Assembly language was the normal choice for writing system software like operating systems, etc. But, C has been used to develop system software since its emergence. COBOL is more suitable for business applications whereas FORTRAN is more suitable for scientific applications. © Oxford University Press All rights reserved.

7 Generations of Programming Languages
Just as hardware is classified into generations based on technology, computer languages also have a generation classification based on the level of interaction with the machine. Generation of Programming Languages : First generation language (1GL)—machine language Second generation language (2GL)—assembly language Third generation language (3GL)—high-level language Fourth generation languages (4GL) Fifth generation language (5GL) © Oxford University Press All rights reserved.

8 First Generation Language (1GL) – Machine Language
The instructions in machine language are written in the form of binary codes that can immediately be executed by the processor. The first part is the operation code that conveys to the computer what function has to be performed by the instruction. All computers have operation codes for functions such as adding, subtracting and moving. The second part “Mode” specifies the type of addressing used by the instruction to obtain the operand referred by the instruction. The third part of the instruction either specifies that the operand contains data on which the operation has to be performed. A machine language instruction generally has three parts as shown in Fig. © Oxford University Press All rights reserved.

9 Difficult to Use & Error Prone
It is difficult to understand and develop a program using machine language. Because it is hard to understand and remember the various combinations of 1’s and 0’s representing data and instructions. The programmer has to remember machine characteristics while preparing a program. Checking machine instructions to locate errors are about as tedious as writing the instructions. Nevertheless, computer hardware recognizes only this type of instruction code. © Oxford University Press All rights reserved.

10 © Oxford University Press 2013. All rights reserved.
Machine Independent As the internal design of the computer is different across types, which in turn is determined by the actual design or construction of the ALU, CU, and size of the word of the memory unit, the machine language also varies from one type of computer to another. © Oxford University Press All rights reserved.

11 Second Generation Language (2GL) – Assembly Language
Assembly language is considered to be a second generation language (2GL). In this language, an instruction is expressed using mnemonic codes instead of binary codes. Labels are used to identify and reference instructions in the program. The operation code is a symbolic notation that specifies the particular operation to be performed, such as MOV, ADD, SUB, or CMP etc. The operand represents the register or the location in main memory where the data to be processed is located. An assembler is a translator that produces machine language code from an assembly language code. The most eminent disadvantage of assembly language is that it is machine dependent. © Oxford University Press All rights reserved.

12 Third Generation Language (3GL) – High Level Language
High-level languages are called third generation languages (3GLs). High-level programming languages were developed to make programming easier and less error-prone. Languages like C, C++, COBOL, FORTRAN, BASIC, PASCAL etc., have instructions that are similar to English language that makes it easy for a programmer to write programs and identify and correct errors in them. © Oxford University Press All rights reserved.

13 Advantages of High Level Programming Languages
Readability : Programs written in these languages are more readable than those written in assembly and machine languages. Portability : High-level programming languages can be run on different machines with little or no change. It is, therefore, possible to exchange software, leading to creation of program libraries. Easy debugging : Errors can be easily detected and removed. Ease in the development of software : Since the instructions or statements of these programming languages are closer to the English language, software can be developed with ease. The time and cost of creating machine and assembly language programs were quite high. This motivated the development of high-level languages. © Oxford University Press All rights reserved.

14 4th Generation Languages (4GL)
The Fourth Generation Language (4GL) is a non- procedural language that allows the user to simply specify what is wanted without describing the steps that the computer has to follow to produce the result. This class of languages requires significantly fewer instructions to accomplish a particular task than does a third generation language. A query language is used as a database user interface and hides the specific details of the database from the user. Like third generation languages, fourth generation languages are mostly machine independent. They are primarily used mainly for developing business applications. Most of the fourth generation languages can be easily learnt and employed by end-users. © Oxford University Press All rights reserved.

15 5th Generation Language (5GL)
Natural languages represent the next step in the development of programming languages belonging to Fifth Generation Language (5GL). Natural language is similar to query language, with one difference: it eliminates the need for the user or programmer to learn a specific vocabulary, grammar, or syntax. Actually, 5GL is a programming language based around solving problems using constraints given to the program, rather than using an algorithm written by a programmer. Fifth generation languages are used mainly in artificial intelligence research. OPSS and Mercury are examples of fifth generation languages. © Oxford University Press All rights reserved.

16 Classification of Programming Languages
© Oxford University Press All rights reserved.

17 © Oxford University Press 2013. All rights reserved.
Compilation Process Conceptually, the compilation process can be divided into a number of phases In the first phase of compilation, termed as lexical analysis, each statement of a program is analyzed and broken into individual lexical units termed tokens and constructs a symbol table for each identifier. The second stage of translation is called syntax analysis; tokens are combined into syntactic units according to the syntax or grammar of the source language. In the third stage of compilation, the parsed statements are analysed further to make sure that the operators and operands do not violate source language specifications. © Oxford University Press All rights reserved.

18 © Oxford University Press 2013. All rights reserved.
Compilation Process Next, an intermediate representation of the final machine language code is produced. Optionally, the intermediate code is optimized to produce an optimized code. The last phase of translation is code generation whereby the optimized intermediate code is converted into target code. © Oxford University Press All rights reserved.

19 Translator, Loader & Linker
Translators There are three types of translators, namely Assembler, Compiler and Interpreter. Assembler converts one assembly language statement into a single machine language instruction. Depending on its implementation, a high-level language employs a compiler or an interpreter or both for translation. One statement in a high-level programming language will be translated into several machine language instructions. Both compiler and interpreter translate a program written in high-level language into machine language but in different fashion. Compiler translates the entire source program into object program at once and then the object files are linked to produce a single executable file. A high-level source program must be translated first into a form the machine can execute. This is done by the system software called the translator. © Oxford University Press All rights reserved.

20 © Oxford University Press 2013. All rights reserved.
Linker The machine language program produced by the translator must normally be combined with other machine language programs residing within the library to form a useful execution unit. Linking resolves the symbolic references between object programs. It makes object programs known to each other. The system software responsible for this function is known as linker. This process of program combination is called linking and the software that performs this operation is variously known as a linker. The features of a programming language influence the linking requirements of a program. In languages like FORTRAN, COBOL, C, all program units are translated separately. Hence, all subprogram calls and common variable references require linking. © Oxford University Press All rights reserved.

21 © Oxford University Press 2013. All rights reserved.
Loader Loading is the process of bringing a program from secondary memory into main memory so it can run. The system software responsible for it is known as loader. The simplest type of loader is absolute loader which places the program into memory at the location prescribed by the assembler. Bootstrap loader is an absolute loader which is executed when computer is switched on or restarted to load the operating system. In most of the cases, when a compiler translates a source code program into object code, it has no idea where the code will be placed in main memory at the time of its execution. © Oxford University Press All rights reserved.

22 © Oxford University Press 2013. All rights reserved.
Developing a Program We first discuss the step-by-step listing of the procedure involved in creating a computer program. Here we explain the seven important steps towards creating effective programs: Definition, Design, Coding, Testing, Documentation, Implementation, and Maintenance. © Oxford University Press All rights reserved.

23 Steps in Software Development
The entire process of software development and implementation involves a series of steps . Each successive step is dependent on the outcome of the previous step. Software development steps are described below. Feasibility study : The feasibility of developing the software in terms of resources and cost is ascertained. In order to determine the feasibility of software developments, the existing system of the user is analysed properly. The analysis done in this step is documented in a standard document called feasibility report. Activities involved in this step include the following. Determining development alternatives. Analysing economic feasibility Accessing technical feasibility Analysing operational feasibility © Oxford University Press All rights reserved.

24 Steps in Software Development
Requirement analysis : In this step, the requirements related to the software, which is to be developed, are understood. Analysing the requirements analysis is an important step in the process of developing software. If the requirements of the user are not properly understood, then the software is bound to fall short of end user’s expectations. Design : After the feasibility analysis stage, the next step is creating the architecture and design of the new software. It involves developing a logical model or basic structure of the new software. Design of the software is divided into two stages – system design and detailed software design. Implementation : In this step, the code for the different modules of the new software is developed. The code for the different modules is developed according to the design specifications of each module. The programmers in the software development team use development tools for this purpose. © Oxford University Press All rights reserved.

25 Steps in Software Development
Testing : It is basically performed to detect the prevalence of any errors in the new software and rectify those errors. One of the reasons for the occurrence of errors or defects in the new software is that the requirements of the client were not properly understood. Another reason for the occurrence of errors is the common mistakes committed by a programmer while developing the code. The two important activities that are performed during testing are verification and validation. Deployment : The newly developed and fully tested software is installed in its target environment. Software documentation is handed over to the users and some initial data are entered in the software to make it operational. Maintenance : In this phase, developed software is made operational. Users will have lots of questions and software problems which lead to the next phase of software development. Once the software has been deployed successfully, a continuous support is provided to it for ensuring its full time availability. © Oxford University Press All rights reserved.


Download ppt "Introduction to Software"

Similar presentations


Ads by Google