1 ) Definition 2) Note on structured and modular programming, and information hiding 3) Example imperative languages 4) Features of imperative languages.

Slides:



Advertisements
Similar presentations
Agenda Definitions Evolution of Programming Languages and Personal Computers The C Language.
Advertisements

Programming Languages Marjan Sirjani 2 2. Language Design Issues Design to Run efficiently : early languages Easy to write correctly : new languages.
Computers Are Your Future
Programming Languages Language Design Issues Why study programming languages Language development Software architectures Design goals Attributes of a good.
ISBN Chapter 1 Preliminaries. Copyright © 2004 Pearson Addison-Wesley. All rights reserved.1-2 Chapter 1 Topics Motivation Programming Domains.
COMP205 Comparative Programming Languages
Programming Languages Structure
ISBN Lecture 01 Preliminaries. Copyright © 2004 Pearson Addison-Wesley. All rights reserved.1-2 Lecture 01 Topics Motivation Programming.
6/27/2015G. Levine1 PROGRAMMING LANGUAGES Text: Programming Languages, Design and Implementation Pratt and Zelkowitz 4 th ed. Prentice-Hall.
Chapter 8 The Tower of Babel. Chapter Outline Procedural languages Fortran, COBOL, PASCAL, C, Ada Object-oriented programming Special-purpose languages.
Summer 02-03Programming Language Concepts1 Programming Language Concepts (CS 360) Lecture 1: Overview, Grammars, and Little Languages Jeremy R. Johnson.
1 CHAPTER 4 LANGUAGE/SOFTWARE Hardware Hardware is the machine itself and its various individual equipment. It includes all mechanical, electronic.
Programming Language Concepts
CS102 Introduction to Computer Programming
Programming Languages Lecture 12. What is Programming?  The process of telling the computer what to do  Also known as coding.
1 Chapter-01 Introduction to Computers and C++ Programming.
314450: PROGRAMMING PARADIGMS Teaching scheme: Examination Scheme: Lectures: 3 Hours/Week Theory: 100 Marks OBJECTIVE: To understand the basic building.
BIT Presentation 6. Contents GENERATIONS OF LANGUAGES COMPILERS AND INTERPRETERS VIRTUAL MACHINES OBJECT-ORIENTED PROGRAMMING SCRIPTING LANGUAGES.
Welcome In The World Of ‘C’.  TEXT BOOK: Programming in ANCI ‘C By: E Balagurusamy. TMH  Reference Books: 1) The ‘C Programming Language By: Kernighan.
Introduction to Computer Programming itc-314
1 Programming Language Concepts Ethics Why study concepts of programming languages (PLs)? PL categories Influences on PL design Problem areas & needs that.
Programming Languages CPS120: Introduction to Computer Science Lecture 5.
CSE 425: Intro to Programming Languages and their Design A Few Key Ideas No particular language is a prerequisite for this course –However you should be.
Understanding Computers Ch. 131 Chapter 13 Program Development and Programming Languages.
GENERAL CONCEPTS OF OOPS INTRODUCTION With rapidly changing world and highly competitive and versatile nature of industry, the operations are becoming.
Simple Program Design Third Edition A Step-by-Step Approach
The Evolution of the Object Model OOAD. The Evolution of the Object Model software engineering trends observed The shift in focus from programming-in-the-small.
Gary MarsdenSlide 1University of Cape Town Principles of programming language design Gary Marsden Semester 2 – 2001.
CSC3315 (Spring 2009)1 CSC 3315 Programming Languages Hamid Harroud School of Science and Engineering, Akhawayn University
CSC-115 Introduction to Computer Programming
Programming Languages –14 David Watt (Glasgow) Steven Wong (Singapore) Moodle : Computing Science → Level 3 → Programming Languages 3 © 2012 David.
1 Programming Language History and Evolution In Text: Chapter 2.
1 Introduction Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Sections
Copyright © 2006 Addison-Wesley. All rights reserved.1-1 ICS 410: Programming Languages.
Computer Concepts 2014 Chapter 12 Computer Programming.
1 COMP 3438 – Part II-Lecture 1: Overview of Compiler Design Dr. Zili Shao Department of Computing The Hong Kong Polytechnic Univ.
Visual C++ Programming: Concepts and Projects
Copyright © 2007 Addison-Wesley. All rights reserved.1-1 Reasons for Studying Concepts of Programming Languages Increased ability to express ideas Improved.
Introduction A variable can be characterized by a collection of properties, or attributes, the most important of which is type, a fundamental concept in.
Fortran Fortran – Formula Translation –Developed by John Backus (IBM) in the mid 1950s. –It was a team effort and the design goal was to produce a translation.
C Language: Introduction
CS 345: Programming Language Paradigms Chris Brooks HR 510 MWF 11:00-12:05.
Programming Domains 1.Scientific Applications Typically, scientific applications have simple data structures but require large numbers of floating-point.
The Evolution of Programming Languages Day 2 Lecturer: Xiao Jia The Evolution of PLs1.
Theory of Programming Languages Introduction. What is a Programming Language? John von Neumann (1940’s) –Stored program concept –CPU actions determined.
How Are Computers Programmed? CPS120: Introduction to Computer Science Lecture 5.
FORTRAN History. FORTRAN - Interesting Facts n FORTRAN is the oldest Language actively in use today. n FORTRAN is still used for new software development.
Chapter 12: Computer Programming 1 Computer Programming Chapter 12.
1-1 1 Introduction  Programming linguistics: concepts and paradigms syntax, semantics, and pragmatics language processors.  Historical development of.
Introduction to Computer Programming itc-314 Lecture 04.
MANAGING COMPLEXITY Lecture OO01 Introduction to Object-oriented Analysis and Design Abstract Data Types.
PROGRAMMING FUNDAMENTALS INTRODUCTION TO PROGRAMMING. Computer Programming Concepts. Flowchart. Structured Programming Design. Implementation Documentation.
Chapter 1: Preliminaries Lecture # 2. Chapter 1: Preliminaries Reasons for Studying Concepts of Programming Languages Programming Domains Language Evaluation.
Victoria Ibarra Mat:  Generally, Computer hardware is divided into four main functional areas. These are:  Input devices Input devices  Output.
a medium allowing humans and computers to communicate an abstraction of the real world a notation for expressing algorithms the set of all syntactically.
Programming Language History and Evolution
Programming paradigms
Zuse’s Plankalkül – 1945 Never implemented Problems Zuse Solved
Why study programming languages?
PROGRAMMING LANGUAGES
CSCI-235 Micro-Computer Applications
Programming Language Design Concepts
Programming Language History and Evolution
Welcome In The World Of ‘C’.  TEXT BOOK: Programming in ANSI ‘C By: E Balagurusamy. TMH  Reference Books: 1) The ‘C Programming Language By: Kernighan.
Chapter 12: Computer Programming
Chapter 1 Preliminary. Chapter 1 Preliminary 1.1 Reasons for Studying Concepts of Programming Languages Increased capacity to express ideas Improved.
Introduction to Computer Programming
Von Neumann Architecture
Principles of Programming Languages
Programming Languages, Preliminaries, History & Evolution
Presentation transcript:

1 ) Definition 2) Note on structured and modular programming, and information hiding 3) Example imperative languages 4) Features of imperative languages COMP205 IMPERATIVE LANGUAGES INTRODUCTION

(Q) WHAT IS AN IMPERATIVE LANGUAGE? We can define such languages according to the characteristics that they display: 1) By default statements (commands) are executed in a step-wise, sequential, manner. 2) As a result order of execution is crucial. 3) Destructive assignment. 4) Control is the responsibility of the programmer - programmers must explicitly concern themselves with issues such as memory allocation and declaration of variables.

Q) OUT OF THE FIVE PRINCIPAL PROGRAMMING LANGUAGE PARADIGMS THE IMPERATIVE IS THE MOST POPULAR, WHY? Imperative programs tend to run much faster than other types of program. The imperative paradigm is much more in tune with the computer community's way of thinking. Programmers are prepared to sacrifice some of the advanced features of higher level languages in exchange for speed of execution. There is a tendency for programmers to get "bogged down" with control issues.

COMPILED OR INTERPRETED? Most imperative languages are designed explicitly for compilation. Some very high-level imperative languages are interpreted (e.g. ICON).

STRUCTURED PROGRAMMING The concept of structured programming devised in late 1960s (Dijkstra and others). Emphasizes programming using sequences, conditions and repetition (no jumps and “goto” statements). Constructs which have a predictable logic, i.e. they are entered at the top and exited at the bottom. Structured programming enhances readability and hence maintainability.

Dijkstra (“Go-to statement considered harmful”)

MODULAR PROGRAMMING The concept of modular programming was first taken seriously in the early 1970s. Modular programming is concerned with sub- division of programs into manageable “chunks”. The concept also encompasses ideas about levels of abstraction – modules are usually arranged in a hierarchy of abstraction. Modularity also espouses the concept of information hiding.

INFORMATION HIDING Information hiding is concerned with the idea that the attention of programmers should not be distracted by details not central to their current programming task, i.e. programmers should not be required to be concerned with unnecessary details. In the imperative paradigm this is achieved through the use of modules or packages. Modules (packages) should be designed so that information contained within those modules is “hidden” from other modules (packages).

FORTRAN `The IBM Mathematical FORmula TRANslating system'. Designed circa 1955 (by, amongst others, Backus). First successful attempt to improve on "assembly languages". Still widely used for numerical applications. Has been revised to take account of ideas on structured programming etc., however is decreasing in popularity

ALGOL 60 `ALGOrithmic Language 1960'. Developed in 1950s through a joint European- American committee. First block-structured language. First language whose syntax was defined using BNF. Direct ancestor of most modern imperative languages.

COBOL `COmmon Business Oriented Language' Developed in 1950s through a committee consisting mainly of US computer manufacturers. Designed to process large data files and is therefore the most extensively used language for data processing. Has been revised several times, but revisions have been unable to take into account programming concepts such as structured programming and modularity.

IMPERATIVE LANGUAGES “FAMILY TREE”

BASIC - Beginner's All-purpose Symbolic Instruction Code. Teaching language made popular by the advent of the microcomputer in the mid 70s. PL/1 - Intended to be an all purpose programming language to support both scientific and data processing applications. Did not live up to its aspirations. Algol'68 - Successor to ALGOL'60. Proved less popular than its predecessor. Pascal - A popular block structured teaching language devised by Niklaus Wirth. Simula'67 - Simulation language, significance of which is that it introduced the "class" concept.

Niklaus Wirth (Pascal, Oberon)

IMPERATIVE LANGUAGES “FAMILY TREE”

Modula-2 - Pascal extended with modules. Ada - Pascal based language sponsored by the US Department of Defence. BCPL - Systems programming languages, significance of which is that it is a precursor to C. C - Systems programming language used in the development of the UNIX system. Is at a lower level than most imperative languages. Standardised in 1988 to ANSI C. C++ - Object-oriented extension to C. Java

FEATURES OF IMPERATIVE LANGUAGES They are usually "typed". Broadly we can identify two categories of imperative data type: 1) Basic data types. 2) Higher level data types. Components comprise: 1) Data declarations. 2) Expressions which yield values. 3) Statements which carry out some operation, e.g. assignment statements, conditional statements, program constructs.

FEATURES OF IMPERATIVE LANGUAGES Continued An I/O mechanism An error-handling mechanism A method of grouping all of the above into a complete program - (program composition).

COMPOSITION OF THE IMPERATIVE PART OF THE COURSE 12 Lectures: [1] Introduction (this lecture) [2] Data [3] Basic Data Types I [4] Basic Data Types II [5] Higher Level Data Types I (arrays) [6] Higher Level Data Types II (more on arrays)

[7] Higher Level Data Types III (structures/records) [8] Higher Level Data Types IV (linked lists, unions) [9] Expressions and statements [10] Program Constructs I [11] Program Constructs II and Error Handling [12] Program Composition I (scope rules) [13] Program Composition II (parameter passing) [14] Program Composition III (modules, packages, ADTs).

SUMMARY 1 ) Definition 2) Note on structured and modular programming, and information hiding 3) Example imperative languages 4) Features of imperative languages