Language Paradigms 990126 CS655.

Slides:



Advertisements
Similar presentations
1 Scheme and Functional Programming Aaron Bloomfield CS 415 Fall 2005.
Advertisements

Programming Languages and Paradigms
Adapted from Scott, Chapter 6:: Control Flow Programming Language Pragmatics Michael L. Scott.
CSCI 330: Programming Language Concepts Instructor: Pranava K. Jha Control Flow-II: Execution Order.
Programming Paradigms Introduction. 6/15/2005 Copyright 2005, by the authors of these slides, and Ateneo de Manila University. All rights reserved. L1:
Chapter 8 High-Level Programming Languages. 8-2 Chapter Goals Describe the translation process and distinguish between assembly, compilation, interpretation,
Programming Languages Marjan Sirjani 2 2. Language Design Issues Design to Run efficiently : early languages Easy to write correctly : new languages.
CS ExCo Advanced in Topics Object-Oriented Programming.
Copyright © 2006 The McGraw-Hill Companies, Inc. Programming Languages 2nd edition Tucker and Noonan Chapter 1 Overview A good programming language is.
Programming Language Paradigms: summary. Object-oriented programming Objects are the fundamental building blocks of a program. Interaction is structured.
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
CS 101 Course Summary December 5, Big Ideas Abstraction Problem solving Fundamentals of programming.
Programming Languages Structure
Chapter 8 High-Level Programming Languages Nell Dale John Lewis.
Presented by Neng-Fa Zhou1 Evolution of programming languages –Machine language –Assembly language –Sub-routines and loop (Fortran) –Procedures and recursion.
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.
Overview. Copyright © 2006 The McGraw-Hill Companies, Inc. Chapter 1 Overview A good programming language is a conceptual universe for thinking about.
Comparison of OO Programming Languages © Jason Voegele, 2003.
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.
Programming languages1 Programming paradigms Families of programming languages.
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.
CSC3315 (Spring 2009)1 CSC 3315 Programming Languages Hamid Harroud School of Science and Engineering, Akhawayn University
Programming Languages –14 David Watt (Glasgow) Steven Wong (Singapore) Moodle : Computing Science → Level 3 → Programming Languages 3 © 2012 David.
Chapter 1 - Introduction
By Neng-Fa Zhou1 Evolution of programming languages –Machine language –Assembly language –Sub-routines and loop (Fortran) –Procedures and recursion (Algol,
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
Guided Notes Ch. 9 ADT and Modules Ch. 10 Object-Oriented Programming PHP support for OOP and Assignment 4 Term project proposal C++ and Java Designer.
CS112: Structure of Programming Languages A smorgasbord of topics in programming languages including programming paradigms and syntax, semantics, implementation.
Programming Languages Meeting 14 December 9/10, 2014.
Chapter 12 Support for Object oriented Programming.
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.
CS 331, Principles of Programming Languages Chapter 1.
Copyright © 2006 The McGraw-Hill Companies, Inc. Programming Languages 2nd edition Tucker and Noonan Chapter 1 Overview A good programming language is.
int k = Integer.MAX_VALUE; k++; int k = Integer.MAX_VALUE; k++; What happens when the following code executes? byte b = someFile.readByte(); b = (byte)(b.
R R R A Brief Introduction to Aspect-Oriented Programming.
1-1 1 Introduction  Programming linguistics: concepts and paradigms syntax, semantics, and pragmatics language processors.  Historical development of.
ISBN Chapter 12 Support for Object-Oriented Programming.
서울대한양대 ( 안 산 ) 충남대 1년1년 컴퓨터기초 (C) 컴퓨터프로그래밍 (C, Java) 컴퓨터프로그래밍 (C) 2. 봄 프로그래밍 원리 (Scheme, ML) Structure & Interpretation of Computer Programs 프로그래밍 방법론.
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.
History. Development Driven by Function Functions of a Programming Language –To describe computation for use by computers –To describe computation and.
CPS120 Introduction to Computer Science High Level Language: Paradigms.
Abstract data types Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Section
Programming Language History and Evolution
Programming Languages 2nd edition Tucker and Noonan
Functional Programming
Programming paradigms
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.
Why study programming languages?
Types of Programming Languages
Programming Language History and Evolution
Evolution of programming languages
Final Review In Text: Chapters 1-3, 5-11,
Programming Languages
Programming Languages 2nd edition Tucker and Noonan
Final Review In Text: Chapters 1-3, 5-12,
Final Review In Text: Chapters 1-3, 5-16.
Overview of Programming Paradigms
강의 내용 및 방법 접근방법 리포트 시험 Lambda Calculus, Proof of Correctness
Programming Languages and Paradigms
Final Review In Text: Chapters 1-3, 5-16.
Functional Programming and Haskell
Abstract data types Programming Language Design and Implementation
Chapter 15 Functional Programming 6/1/2019.
Functional Programming and Haskell
Presentation transcript:

Language Paradigms 990126 CS655

Paradigms Procedural (FORTRAN, ALGOL60, ALGOL68, Pascal, C) Object-based (CLU, Alphard, Euclid, Ada83) Object-oriented (Smalltalk, C++, Eiffel, Sather, Python, Ada95, Java, OCAML) Functional (LISP, Scheme, Common LISP, ML, Haskell) Logic based (Prolog, GHC) Parallel (CSP, Ada83, Ada95, Mentat/Legion) Non-deterministic (CSP, Unity) Aspect-oriented 990126 CS655

990126 CS655

Procedural: The Paradigm (sometimes called "imperative languages") Collection of procedures eliminates code duplication; uses parameters Control abstraction reached fairly advanced state Functions/procedures Separate compilation (often no type checking between compilation units) But data abstraction primitive Block structure (in most of the languages) Globals/locals Passive local variables w/o state User-defined types but with no code association 990126 CS655

990126 CS655

990126 CS655

Object-Based: The Paradigm Key feature is abstract data types Supports Parnas’s modularity principles Provide encapsulation mechanism for ADT’s for grouping data and functions/procedures associated with that data limit outside access to objects inside ADT Examples: Ada packages, CLU clusters, Modula2 modules Encapsulating mechanisms themselves tend to be typeless Export control mechanisms for types, variables, func/procs in ADT’s Sometimes import control as well (Euclid) Encapsulated ADT’s tend to be separately compilable Tends to support programming in the large 990126 CS655

990126 CS655

990126 CS655

Object-Oriented: The Paradigm Software re-use factoring out common elements User-defined classes User ability to define typed instances of a class object Derived classes requires inheritance User ability to use objects as first-class entities assign values use in expressions pass as arguments 990126 CS655

990126 CS655

990126 CS655

OOD Example 990126 CS655

990126 CS655

Functional: The Paradigm Based on Church’s Lambda Calculus McCarthy’s reaction to FLPL: FORTRAN List Processing Language Emphasis on conditional and recursion (lacking in FLPL) Assignment and iteration added only under duress Primary data types are atoms and lists Shifted from dynamic scoping (LISP) to static scoping (ML, Scheme, Haskell) Importance of polymorphism realized in newer languages (ML, Haskell) Functions have taken on first class status only in newer languages passed as parameters returned as values of other functions supports higher order functions 990126 CS655

990126 CS655

GHC 990126 CS655

Logic-Based: The Paradigm Based on Resolution Theorem Proving Horn Clauses Deductive Logic Key concepts facts queries unification (and two-way matching) Inefficient runtime generally done using depth-first search Potential for non-termination significant Problems with closed world assumption 990126 CS655

990126 CS655

990126 CS655

Parallel: The Paradigm Key Concepts: Program consists of collection of processes (tasks) Processes communicate through shared memory using messages Dijkstra’s Guarded Commands had profound influence on parallel language design Guarded communications More recent trend is combining of OO and parallel some confusion over messages different semantics in the two paradigms 990126 CS655

990126 CS655

990126 CS655

Non-Deterministic: The Paradigm Non-deterministic model of computation Program is collection of statements Statements selected and executed at random Interesting conditions, e.g. termination, are fixed points Fixed point detection is left for "later" Unity programs generally very compact Associated proof system for program verification Mapping to more detailed solutions left for later. Goal was to define a paradigm for scientists 990126 CS655

Non-Deterministic: Example Shortest path- dxy: distance from node x to node y sdA(y): shortest distance from node A to node y Problem: express solution to finding distance from node A to all other nodes, y, in graph sdA(y) = Min (sdA(y), sdA(x) + d(x,y)) all x,y 990126 CS655