314450: PROGRAMMING PARADIGMS Teaching scheme: Examination Scheme: Lectures: 3 Hours/Week Theory: 100 Marks OBJECTIVE: To understand the basic building.

Slides:



Advertisements
Similar presentations
Chapter 8 High-Level Programming Languages. 8-2 Chapter Goals Describe the translation process and distinguish between assembly, compilation, interpretation,
Advertisements

Copyright © 1998 by Addison Wesley Longman, Inc. 1 Chapter One Preliminaries, including –Why study PL concepts? –Programming domains –PL evaluation criteria.
Programming Languages Marjan Sirjani 2 2. Language Design Issues Design to Run efficiently : early languages Easy to write correctly : new languages.
Chapter 1: Preliminaries
Programming Languages Language Design Issues Why study programming languages Language development Software architectures Design goals Attributes of a good.
Copyright © 2006 The McGraw-Hill Companies, Inc. Programming Languages 2nd edition Tucker and Noonan Chapter 1 Overview A good programming language is.
1 ) Definition 2) Note on structured and modular programming, and information hiding 3) Example imperative languages 4) Features of imperative languages.
High-Level Programming Languages
Reasons to study concepts of PL
ISBN Chapter 1 Preliminaries. Copyright © 2004 Pearson Addison-Wesley. All rights reserved.1-2 Chapter 1 Topics Motivation Programming Domains.
CS 354 Overview. Copyright © 2007 Addison-Wesley. All rights reserved. 1–2 Course Topics What is a programming language? What features do programming.
Programming Languages Structure
ISBN Lecture 01 Preliminaries. Copyright © 2004 Pearson Addison-Wesley. All rights reserved.1-2 Lecture 01 Topics Motivation Programming.
Summer 02-03Programming Language Concepts1 Programming Language Concepts (CS 360) Lecture 1: Overview, Grammars, and Little Languages Jeremy R. Johnson.
ISBN Chapter 1 Topics Motivation Programming Domains Language Evaluation Criteria Influences on Language Design Language Categories Language.
Copyright © 1998 by Addison Wesley Longman, Inc. 1 Concepts of Programming Languages Chapter 1.
CS 331, Principles of Programming Languages Introduction.
1 Programming Languages Marjan Sirjani 2 1- The Study of Programming Languages The purpose of language is simply that it must convey meaning. (Confucius)
Overview. Copyright © 2006 The McGraw-Hill Companies, Inc. Chapter 1 Overview A good programming language is a conceptual universe for thinking about.
PZ01A Programming Language design and Implementation -4th Edition Copyright©Prentice Hall, PZ01A -- Introduction Programming Language Design and.
(1.1) COEN 171 Programming Languages Winter 2000 Ron Danielson.
CS 363 Comparative Programming Languages
Programming Languages –14 David Watt (Glasgow) Steven Wong (Singapore) Moodle : Computing Science → Level 3 → Programming Languages 3 © 2012 David.
Chapter 1 - Introduction
1 Programming Languages Marjan Sirjani Course web site:
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.
Copyright © 2007 Addison-Wesley. All rights reserved.1-1 Reasons for Studying Concepts of Programming Languages Increased ability to express ideas Improved.
ISBN CS 354 Preliminaries. Copyright © 2006 Addison-Wesley. All rights reserved.1-2 Course Topics What is a programming language? What features.
ISBN Chapter 1 Preliminaries. Copyright © 2009 Addison-Wesley. All rights reserved.1-2 Chapter 1 Topics Reasons for Studying Concepts of.
Programming Language Concepts (CIS 635) Elsa L Gunter 4303 GITC NJIT,
Theory of Programming Languages Introduction. What is a Programming Language? John von Neumann (1940’s) –Stored program concept –CPU actions determined.
CS 331, Principles of Programming Languages Chapter 1.
Engr. Isabelo Jun D. Paat, ME-CoE Lecturer 1 Programming Languages.
Copyright © 2006 The McGraw-Hill Companies, Inc. Programming Languages 2nd edition Tucker and Noonan Chapter 1 Overview A good programming language is.
1-1 1 Introduction  Programming linguistics: concepts and paradigms syntax, semantics, and pragmatics language processors.  Historical development of.
Programming Language Concepts (CIS 635) Elsa L Gunter 4303 GITC NJIT,
Chapter 1: Preliminaries Lecture # 2. Chapter 1: Preliminaries Reasons for Studying Concepts of Programming Languages Programming Domains Language Evaluation.
CSCE 343 – Programming Language Concepts Welcome!.
a medium allowing humans and computers to communicate an abstraction of the real world a notation for expressing algorithms the set of all syntactically.
Language Paradigms CS655.
Programming Language History and Evolution
Programming Languages 2nd edition Tucker and Noonan
Concepts of Programming Languages
Introduction to programming languages, Algorithms & flowcharts
Concepts of Programming Languages
Why study programming languages?
Introduction to programming languages, Algorithms & flowcharts
PROGRAMMING LANGUAGES
Introduction of Programming Languages
Chapter 1 Reasons to study concepts of PLs Programming Domains
1.1 Reasons to study concepts of PLs
Chapter 1 Preliminaries.
Programming Language History and Evolution
Introduction to programming languages, Algorithms & flowcharts
Computer Programming.
Programming Languages 2nd edition Tucker and Noonan
CSE 341 Programming Languages Autumn 2001
CSE 341 Programming Languages Autumn 2003
CSE 341 Programming Languages Autumn 2002
Final Review In Text: Chapters 1-3, 5-12,
CSE 341 Programming Languages Spring 2003
Final Review In Text: Chapters 1-3, 5-16.
Principles of Programming Languages
CSE 341 Programming Languages Autumn 2003
강의 내용 및 방법 접근방법 리포트 시험 Lambda Calculus, Proof of Correctness
Final Review In Text: Chapters 1-3, 5-16.
Programming Languages, Preliminaries, History & Evolution
Reasons To Study Programming Languages
Presentation transcript:

314450: PROGRAMMING PARADIGMS Teaching scheme: Examination Scheme: Lectures: 3 Hours/Week Theory: 100 Marks OBJECTIVE: To understand the basic building blocks of programming Languages. To Learn and understand various programming paradigms.

314450: PROGRAMMING PARADIGMS UNIT - I Introduction: Role of programming languages, Need to study programming languages, Characteristics of Programming Languages, Programming language paradigms: Imperative, Object Oriented, Functional, Logic, Event Driven and Concurrent Programming, Language design issues, Language translation issues, Data Types: properties of Types and objects, Elementary data types, structured data types, Type conversion, Binding and binding times.

314450: PROGRAMMING PARADIGMS UNIT - I Introduction: Role of programming languages, Need to study programming languages, Characteristics of Programming Languages, Programming language paradigms: Imperative, Object Oriented, Functional, Logic, Event Driven and Concurrent Programming, Language design issues, Language translation issues, Data Types: properties of Types and objects, Elementary data types, structured data types, Type conversion, Binding and binding times.

314450: PROGRAMMING PARADIGMS UNIT – II Procedures: Sequence Control: Implicit and explicit sequence control, sequencing with arithmetic expressions, sequencing with Nonarithmetic expressions,sequence control between statements. Subprogram control: subprogram sequence control, attributes of data control, shared data in subprograms, different parameter passing methods, lifetime of variables, Storage management, Exceptions and exception handling. Desirable and undesirable characteristics of procedural programming. Case study of Pascal.

314450: PROGRAMMING PARADIGMS UNIT - III Object Oriented Programming: General characteristics for object based programming, Design Principles for object oriented programming, Implementing object oriented programming, desirable characteristics of object oriented programming. Object Oriented Programming in Java : Abstraction, Inheritance, Polymorphism, I/O, access specification, interfaces, packages, exception handling, multithreading, event handling. AWT: working with windows, Graphics, Text, using AWT controls,layout manager and menus. Comparative study of C++ and JAVA.

314450: PROGRAMMING PARADIGMS UNIT – IV Declarative Programming Paradigm: Logic programming language model, logical statements, Resolution, Unification, Search structures, Applications of Logic programming. Case study of Prolog. Applicative programming Paradigm: Lambda calculus: Ambiguity, free and bound identifiers, reductions, typed lambda calculus, principles of functional programming. Case study of LISP

314450: PROGRAMMING PARADIGMS UNIT – V Parallel Programming Paradigm : Classification of computer architectures, principles of parallel programming, precedence graph, data parallelism, control parallelism, message passing, shared address space, synchronization mechanisms, mapping, granularity, compilers, operating systems.

314450: PROGRAMMING PARADIGMS UNIT – VI Additional Programming Paradigms: Data flow programming design principles, Database programming design principles, Network programming design principles, Socket programming in JAVA, Internet programming design principles, windows programming.

314450: PROGRAMMING PARADIGMS Text Books: 1. Roosta Seyed, “Foundations of Programming Languages Design & Implementation”, 3rd Edition, Cenage learning. ISBN- 13: Pratt T.W., Zelkowitz “Programming Languages : Design and Implementation ”PHI, 2002, 3rd Edition.ISBN Reference Books: 1. Sebesta R. W., “Concepts of programming languages”, Pearson Education 2001,4 th edition.ISBN Sethi Ravi, “Programming Languages: Concepts and Constructs” Pearson Education, ISBN: Herbert Schildt “ The Complete Reference Java2”, 5th edition, Tata McGraw Hill, ISBN-13:

INTRODUCTION : PROGRAMMING PARADIGMS

Goals / Objectives To gain an understanding of the basic structure of programming languages: – Data types, control structures, naming conventions,... To learn the principles underlying all programming languages: – So that it is easier to learn new languages To study different language paradigms: – Functional (Scheme), Imperative (C), Object-Oriented (C++, Java), Logic (Prolog). – So that you can select an appropriate language for a task

What is a Programming Language? “A language intended for use by a person to express a process by which a computer can solve a problem” -Hope and Jipping “A set of conventions for communicating an algorithm” -E.Horowitz “ The art of programming is the art of organizing complexity” -Dijkstra, 1972

Design Criteria for PL Readable – comments, names, (…) syntax Simple to learn – Feature multiplicity E.g.:-Count=count+1, count+=1,count++. – Orthogonal - small number of concepts combine regularly and systematically (without exceptions). Portable – language standardization – Ease with which programs can be moved from one implementation to another Writability – How easily a language can be used to create programs for a chosen problem domain. Abstraction – control and data structures that hide detail Efficient

Why learn more than one PL? So you can choose the right language for a given problem – If all you have is a hammer, every problem looks like a nail. So you can learn a new language more easily later – As your job changes, you may need to used different languages – As our understanding of programming improves, new languages are created To learn new ways of thinking about problems – Different languages encourage you to think about problems in different ways – “Paradigms”

What is a Paradigm? A way of looking at a problem and seeing a program – What kind of parts do you look for? Problem: Print a “large X” of size n. E.g., size 5 is X X X X X

Paradigms of Programming? There are several ways to think about computation: – a set of instructions to be executed – a set of expressions to be evaluated – a set of rules to be applied – a set of objects to be arranged – a set of messages to be sent and received

Some Programming Paradigms Procedural – examples: C, Pascal, Basic, Fortran Functional – examples: Lisp, ML Object-oriented – examples: C++, Java, Smalltalk Rule-based (or Logic) – example: Prolog

Why so many? Most important: the choice of paradigm (and therefore language) depends on how humans best think about the problem Other considerations: – efficiency – compatibility with existing code – availability of translators

Models of Computation RAM machine – procedural directed acyclic graphs – Smalltalk model of O-O partial recursive functions – Lisp and ML Markov algorithms – Prolog is loosely based on these

Lots of Languages There are many programming languages out there Lots of other PL-like objects – document languages, e.g. LaTeX, Postscript – command languages, e.g. bash, MATLAB – markup languages, e.g. HTML and XML – specification languages, e.g. UML

Issues for all Languages Can it be understood by people and processed by machines? – although translation may be required Sufficient expressive power? – can we say what needs to be said, at an appropriate level of abstraction?

Translation Compilation – Translate into instructions suitable for some other (lower level) machine – During execution, that machine maintains program state information Interpretation – May involve some translation – Interpreter maintains program state

Trade-offs Compilation – lower level machine may be faster, so programs run faster – compilation can be expensive – examples: C (and Java?) Interpretation – more ability to perform diagnostics (or changes) at run-time – examples: Basic, UNIX shells, Lisp