Mark Hennessy CS351 Dept. Computer Science NUIM CS 351 Introduction.

Slides:



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

Ch:8 Design Concepts S.W Design should have following quality attribute: Functionality Usability Reliability Performance Supportability (extensibility,
Programming Paradigms Introduction. 6/15/2005 Copyright 2005, by the authors of these slides, and Ateneo de Manila University. All rights reserved. L1:
Programming Languages Marjan Sirjani 2 2. Language Design Issues Design to Run efficiently : early languages Easy to write correctly : new languages.
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.
Reasons to study concepts of PL
The Evolution of Programming Languages
Aalborg Media Lab 21-Jun-15 Software Design Lecture 1 “ Introduction to Java and OOP”
COMP205 Comparative Programming Languages Part 1: Introduction to programming languages Lecture 3: Managing and reducing complexity, program processing.
Programming Languages Structure
6/27/2015G. Levine1 PROGRAMMING LANGUAGES Text: Programming Languages, Design and Implementation Pratt and Zelkowitz 4 th ed. Prentice-Hall.
Summer 02-03Programming Language Concepts1 Programming Language Concepts (CS 360) Lecture 1: Overview, Grammars, and Little Languages Jeremy R. Johnson.
WEL COME PRAVEEN M JIGAJINNI PGT (Computer Science) MCA, MSc[IT], MTech[IT],MPhil (Comp.Sci), PGDCA, ADCA, Dc. Sc. & Engg.
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
Object-oriented design CS 345 September 20,2002. Unavoidable Complexity Many software systems are very complex: –Many developers –Ongoing lifespan –Large.
1 CS101 Introduction to Computing Lecture 19 Programming Languages.
Programming Language Concepts
CS 331, Principles of Programming Languages Introduction.
314450: PROGRAMMING PARADIGMS Teaching scheme: Examination Scheme: Lectures: 3 Hours/Week Theory: 100 Marks OBJECTIVE: To understand the basic building.
Computers Are Your Future Tenth Edition Chapter 11: Programming Languages & Program Development Copyright © 2009 Pearson Education, Inc. Publishing as.
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.
PZ01A Programming Language design and Implementation -4th Edition Copyright©Prentice Hall, PZ01A -- Introduction Programming Language Design and.
1Object-Oriented Program Development Using C++ Computer Science and Programming Languages Computers are ubiquitous Computer literacy is essential Computer.
Introduction to Object-oriented programming and software development Lecture 1.
Design Patterns OOD. Course topics Design Principles UML –Class Diagrams –Sequence Diagrams Design Patterns C#,.NET (all the course examples) Design Principles.
GENERAL CONCEPTS OF OOPS INTRODUCTION With rapidly changing world and highly competitive and versatile nature of industry, the operations are becoming.
1/19 Component Design On-demand Learning Series Software Engineering of Web Application - Principles of Good Component Design Hunan University, Software.
MT311 Java Application Development and Programming Languages Li Tak Sing( 李德成 )
Welcome to OBJECT ORIENTED PROGRAMMIN Date: 10/09/2014 Prepared By Prepared By : VINAY ALEXANDER PGT(CS) KV jhagrakhand.
(1.1) COEN 171 Programming Languages Winter 2000 Ron Danielson.
Cs784(Prasad)L1Intro1 Systematic Development of Programming Languages.
Chapter 1. Introduction.
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.
CS 363 Comparative Programming Languages
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.
Lecture 1 Introduction Figures from Lewis, “C# Software Solutions”, Addison Wesley Richard Gesick.
CS 345: Programming Language Paradigms Chris Brooks HR 510 MWF 11:00-12:05.
1 CSCD 326 Data Structures I Software Design. 2 The Software Life Cycle 1. Specification 2. Design 3. Risk Analysis 4. Verification 5. Coding 6. Testing.
Software Design Process
How Are Computers Programmed? CPS120: Introduction to Computer Science Lecture 5.
1-1 1 Introduction  Programming linguistics: concepts and paradigms syntax, semantics, and pragmatics language processors.  Historical development of.
MANAGING COMPLEXITY Lecture OO01 Introduction to Object-oriented Analysis and Design Abstract Data Types.
Structure of Programming Languages – CS43101 Fall 2004 Paul J Durand.
PROGRAMMING FUNDAMENTALS INTRODUCTION TO PROGRAMMING. Computer Programming Concepts. Flowchart. Structured Programming Design. Implementation Documentation.
Welcome to OBJECT ORIENTED PROGRAMMING Prepared By Prepared By : VINAY ALEXANDER PGT(CS) KV jhagrakhand.
Introduction to Computer Programming Concepts M. Uyguroğlu R. Uyguroğlu.
Language Paradigms CS655.
Programming Language History and Evolution
Chapter 1. Introduction.
Programming Languages 2nd edition Tucker and Noonan
Basic 1960s It was designed to emphasize ease of use. Became widespread on microcomputers It is relatively simple. Will make it easier for people with.
CSCI-235 Micro-Computer Applications
Programming Language History and Evolution
Developing Applications
Unit# 8: Introduction to Computer Programming
CSC128 FUNDAMENTALS OF COMPUTER PROBLEM SOLVING
Ada – 1983 History’s largest design effort
Programming Languages 2nd edition Tucker and Noonan
Introduction to Computer Programming
Principles of Programming Languages
Overview of Programming Paradigms
강의 내용 및 방법 접근방법 리포트 시험 Lambda Calculus, Proof of Correctness
Programming Languages and Paradigms
CS 2704 Object Oriented Software Design and Construction
Programming Languages, Preliminaries, History & Evolution
Presentation transcript:

Mark Hennessy CS351 Dept. Computer Science NUIM CS 351 Introduction

Mark Hennessy CS351 Dept. Computer Science NUIM CS 351 Cirriculum Before: Functional Programming : CaML Logic Programming : Prolog Parallel Programming: C examples GUI Programming: Java Swing

Mark Hennessy CS351 Dept. Computer Science NUIM CS 351 This year: Functional Programming via CaML Theorectical Aspects of FP Learn syntax of ML via lab practicals. Logic Programming via Prolog Threory with lab practicals. Object-Oriented Paradigm via C++ Learn about Inheritence, Polymorphism, Multiple Inheritence and the generic Paradigm via Templates and the STL. ( Possibly some GUI.) Scripting Languages Bash and Python.

Mark Hennessy CS351 Dept. Computer Science NUIM Course Objectives To provide students with : An understanding of programming paradigms, and the relationship of language type to application areas Knowledge of representative languages, and experience in using them Understanding and experience of how to approach programming for the various paradigms

Mark Hennessy CS351 Dept. Computer Science NUIM Lecture Overview A brief history of Computer Languages Introducing the Paradigms Defining the Paradigms Declarative Functional e.g Lisp/Scheme, ML, Haskell Logic LanguagesProlog Imperative Von Neuman LanguagesFortran, Pascal, Basic, C Object-Oriented Smalltalk, C++, Java# Textbook: Programming Language Pragmatics by Michael L. Scott, 2 nd. Ed.

Mark Hennessy CS351 Dept. Computer Science NUIM Evolution of Programming Languages FORTRAN ( FORmula TRANslator) Goals : Scientific Computations Efficiency of execution Compile-time storage determination Features : Symbolic Expressions Subprograms Absence of Recursion COBOL Goal: Business Application Features : Record/Structure; File Handling

Mark Hennessy CS351 Dept. Computer Science NUIM Evolution of Programming Languages ALGOL - 60 (ALGOrithmic Language) Goals : Communicating Algorithms Features : Block Structure (Top-down design) Recursion (Problem-solving strategy) BNF - Specification LISP (LISt Processing) Goals : Manipulating symbolic information Features : List Primitives Interpreters / Environment

Mark Hennessy CS351 Dept. Computer Science NUIM Evolution of Programming Languages Pascal Goal : Structured Programming, Type checking, Compiler writing. Features : Rich set of data types for efficient algorithm design E.g., Records, sets,... Variety of “readable” single-entry single-exit control structures E.g., for-loop, while-loop,... Efficient Implementation Recursive descent parsing

Mark Hennessy CS351 Dept. Computer Science NUIM Evolution of Programming Languages Object-Oriented Programs: Smalltalk and Ada in the early 1980’s. C++ started in the late 80’s but only standardised in Java is only about 10 years old. OO Programming removed the need for monolithic programs. Programs are developed in teams and code sharing and re-use is fundamental to the success of the OO paradigm. OO places a strong emphasis on correctness, robustness and reliability. E.g through Data Abstraction, Encapsulation and Strong Typing

Mark Hennessy CS351 Dept. Computer Science NUIM What is a paradigm? 500BC, articles shown side-by-side on a market-stall so they can be compared 300BC, an article used as a sample of goods 1000AD, an example of a general class of objects. 1600AD, a standard example used in teaching (humanities).

Mark Hennessy CS351 Dept. Computer Science NUIM Scientific Paradigms 1700AD. A standard example used to test a theory or a method. 1800AD. A theory or method. Computer science: A coherent set of methods characterised by a single principle, simple to formulate, that have been found to be effective in handling a given type of problem.

Mark Hennessy CS351 Dept. Computer Science NUIM Definition of a Paradigm An archetype for modeling and solving problems. Inherent are basic assumptions about the nature of problems, how they are to be approached. Paradigms are the way that we think about problems Fundamental to the study of programming languages

Relationship between components of a paradigm

Mark Hennessy CS351 Dept. Computer Science NUIM Whats the point of studying paradigms? valuable for solving problems because: knowing one's paradigm reveals assumptions being made in modeling a problem, which can clarify programming objectives; being able to state the advantages and drawbacks of various paradigms permits someone to decide between them based on the problem at hand.

Mark Hennessy CS351 Dept. Computer Science NUIM Choosing a paradigm It can be shown that anything solvable using one of these paradigms can be solved using the others However, certain types of problems lend themselves more naturally to specific paradigms. Different Programming languages implement differnet paradigms.

Assembly Language Use symbols instead of binary digits to describe fields of instructions. Every aspect of machine visible in program: One statement per machine instruction. Register allocation, call stack, etc. must be managed explicitly. No structure: everything looks the same ADDIR4R221 ADDI R4,R2,21

Mark Hennessy CS351 Dept. Computer Science NUIM Pros and Cons of Assembly Language Avoids Absolute Addressing relocatable, reusable/shareable Uses Symbolic Names readable Low-level programming wastes effort in coding a solution rather than solving a problem. Difficult to build and maintain large programs.

Mark Hennessy CS351 Dept. Computer Science NUIM High-level Language Provides notation to describe problem solving strategies rather than organize data and instructions at machine-level. Improves programmer productivity by supporting features to abstract/reuse code, and to improve reliability/robustness of programs. Requires a compiler.

Mark Hennessy CS351 Dept. Computer Science NUIM Solving Problems via high level languages Three basic techniques: 1. Decomposition: subdivide the problem 2. Abstraction: ignore irrelevant detail safely 3. Contextual checking: independent agent checks for internal consistency Structured programming: over-used term for using complexity-reducing techniques (meaningless these days).

Mark Hennessy CS351 Dept. Computer Science NUIM 1) Program Decompositon “Divide and conquer” “Solving several small problems is easier than solving one large one of the same size” Lead to: Step-wise refinement functional decomposition Modular decomposition Object-oriented design

Mark Hennessy CS351 Dept. Computer Science NUIM 1(a) Stepwise Refinement In each step, one or several instructions of the program are decomposed into more detailed instructions Terminates when all instructions are expressible in programming language Data may be refined, decomposed or structured in parallel. Each step implies a design decision. Alternative solutions at each step

Mark Hennessy CS351 Dept. Computer Science NUIM 1(b) Modular Design Uses abstraction and information hiding Functional independence, measured by: Internal cohesion (does/deals with one thing) External coupling (interface complexity) Makes modification easier Reduces error propagation Reusability

Mark Hennessy CS351 Dept. Computer Science NUIM 1(c) Object Oriented Design Builds upon 3 software design concepts Abstraction Information Hiding Modularity Provides a mechanism to achieve these without complexity or compromise System maps to real world rather than vice-versa

Mark Hennessy CS351 Dept. Computer Science NUIM 2) Abstraction Abstraction = “ignore irrelevant detail in a safe way” Irrelevant = no concern to user in solving the problem e.g. representation of a date as: a triplet record an integer (days since 1/1/1900) Implies the existence of a user/object interface

Mark Hennessy CS351 Dept. Computer Science NUIM 2(a) Object Interfaces Includes operations on the data type Independent of how data is implemented User can abstract from internal details Implementer can change nternal details Interface can be in mind of user Restricts themselves to ‘published’ facilities Requires disciplined programming

Mark Hennessy CS351 Dept. Computer Science NUIM 2(b) Abstraction ‘in a safe way’ User is forced to abstract from detail Required facilities built-in to language Package or Module Encapsulated implementation of a set of services Achieved through name manipulation Names of secret objects unknown on user’s side of interface

Mark Hennessy CS351 Dept. Computer Science NUIM 3) Contextual Checking Only simple checks possible undeclared ids, # parameters in procedure Some checks recursively insoluble e.g. termination, overflow Run-time errors Strong type checking Heuristic checks - necessary but not sufficient e.g. escape from recursion