Introduction to Software

Slides:



Advertisements
Similar presentations
GCSE Computing Lesson 5.
Advertisements

Agenda Definitions Evolution of Programming Languages and Personal Computers The C Language.
Programming Types of Testing.
2 We need programming languages to communicate with a computer. The two broad classifications of programming languages are: Low-level and High- level.
Chapter3: Language Translation issues
1 Lecture 1  Getting ready to program  Hardware Model  Software Model  Programming Languages  The C Language  Software Engineering  Programming.
Computers: Tools for an Information Age
Chapter 16 Programming and Languages: Telling the Computer What to Do.
CMP 131 Introduction to Computer Programming Violetta Cavalli-Sforza Week 1, Lab.
SOFTWARE SYSTEMS SOFTWARE APPLICATIONS SOFTWARE PROGRAMMING LANGUAGES.
1.3 Executing Programs. How is Computer Code Transformed into an Executable? Interpreters Compilers Hybrid systems.
Compiled by Benjamin Muganzi 3.2 Functions and Purposes of Translators Computing 9691 Paper 3 1.
Your Interactive Guide to the Digital World Discovering Computers 2012.
Activity 1 - WBs 5 mins Go online and spend a moment trying to find out the difference between: HIGH LEVEL programming languages and LOW LEVEL programming.
Principles of Programming Chapter 1: Introduction  In this chapter you will learn about:  Overview of Computer Component  Overview of Programming 
Introduction to High-Level Language Programming
Programming Languages: Telling the Computers What to Do Chapter 16.
Chapter 1: Introduction to Visual Basic.NET: Background and Perspective Visual Basic.NET Programming: From Problem Analysis to Program Design.
High level & Low level language High level programming languages are more structured, are closer to spoken language and are more intuitive than low level.
Chapter 1 Introduction Dr. Frank Lee. 1.1 Why Study Compiler? To write more efficient code in a high-level language To provide solid foundation in parsing.
Chapter 10: Compilers and Language Translation Invitation to Computer Science, Java Version, Third Edition.
TMF1013 : Introduction To Computing Lecture 1 : Fundamental of Computer ComputerFoudamentals.
Unit-1 Introduction Prepared by: Prof. Harish I Rathod
INTRODUCTION TO COMPUTING CHAPTER NO. 04. Programming Languages Program Algorithms and Pseudo Code Properties and Advantages of Algorithms Flowchart (Symbols.
Introduction to Computer Application (IC) MH Room 517 Time : 7:00-9:30pm.
CHAPTER 1 INTRODUCTION 1 st Semester H King Saud University College Of Applied Studies and Community Services CSC 1101 Computer Programming-1.
The Software Development Process
Chapter One An Introduction to Programming and Visual Basic.
FOUNDATION IN INFORMATION TECHNOLOGY (CS-T-101) TOPIC : INFORMATION SYSTEM – SOFTWARE.
Chapter 1 Introduction. Chapter 1 -- Introduction2  Def: Compiler --  a program that translates a program written in a language like Pascal, C, PL/I,
Principles of Programming Chapter 1: Introduction  In this chapter you will learn about:  Overview of Computer Component  Overview of Programming 
1 The Software Development Process ► Systems analysis ► Systems design ► Implementation ► Testing ► Documentation ► Evaluation ► Maintenance.
Chapter 1: Introduction to Visual Basic.NET: Background and Perspective Visual Basic.NET Programming: From Problem Analysis to Program Design.
Chapter 11  Getting ready to program  Hardware Model  Software Model  Programming Languages  Facts about C++  Program Development Process  The Hello-world.
1 Asstt. Prof Navjot Kaur Computer Dept PRESENTED BY.
PROGRAMMING FUNDAMENTALS INTRODUCTION TO PROGRAMMING. Computer Programming Concepts. Flowchart. Structured Programming Design. Implementation Documentation.
OCR A Level F453: The function and purpose of translators Translators a. describe the need for, and use of, translators to convert source code.
Introduction to Computer Programming Concepts M. Uyguroğlu R. Uyguroğlu.
Some of the utilities associated with the development of programs. These program development tools allow users to write and construct programs that the.
Programming Languages
Introduction to computer software. Programming the computer Program, is a sequence of instructions, written to perform a specified task on a computer.
Chapter Goals Describe the application development process and the role of methodologies, models, and tools Compare and contrast programming language generations.
Computer Language
Chapter 10 Application Development
Evolution and History of Programming Languages
Computer Basics.
DDC 2223 SYSTEM SOFTWARE DDC2223 SYSTEM SOFTWARE.
Advanced Computer Systems
Component 1.6.
Chapter 1 Introduction.
Introduction to programming
Operating System Interface between a user and the computer hardware
CSCI-235 Micro-Computer Applications
Microprocessor and Assembly Language
Chapter 1 Introduction.
课程名 编译原理 Compiling Techniques
A451 Theory – 7 Programming 7A, B - Algorithms.
Programming Languages and Translators
Unit# 8: Introduction to Computer Programming
TRANSLATORS AND IDEs Key Revision Points.
Compiler Construction
Computers: Hardware and Software
CS105 Introduction to Computer Concepts Intro to programming
CMP 131 Introduction to Computer Programming
Chapter One: An Introduction to Programming and Visual Basic
Introduction to Computer Programming
PROGRAMMING FUNDAMENTALS Lecture # 03. Programming Language A Programming language used to write computer programs. Its mean of communication between.
Chapter 1 Introduction.
Chapter 10: Compilers and Language Translation
CS105 Introduction to Computer Concepts Intro to programming
Presentation transcript:

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

© 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 2013. All rights reserved.

© 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 2013. All rights reserved.

© 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 2013. All rights reserved.

© 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 2013. All rights reserved.

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 2013. All rights reserved.

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 2013. All rights reserved.

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 2013. All rights reserved.

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 2013. All rights reserved.

© 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 2013. All rights reserved.

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 2013. All rights reserved.

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 2013. All rights reserved.

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 2013. All rights reserved.

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 2013. All rights reserved.

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 2013. All rights reserved.

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

© 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 2013. All rights reserved.

© 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 2013. All rights reserved.

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 2013. All rights reserved.

© 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 2013. All rights reserved.

© 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 2013. All rights reserved.

© 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 2013. All rights reserved.

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 2013. All rights reserved.

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 2013. All rights reserved.

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 2013. All rights reserved.