Paradigms of computer programming

Similar documents
Programming Language Concepts, cs2104 Lecture 01 ( )

General Overview of Mozart/Oz

Programming language design and analysis

What Is Computer Science? The Scientific Study of Computation. Expressing or Describing

AP COMPUTER SCIENCE A: SYLLABUS

Concepts, Techniques, and Models of Computer Programming

Curriculum Map Grade(s): Subject: AP Computer Science

A Concepts-Based Approach for Teaching Programming

Functional Programming in Embedded System Design

Programming Languages 2nd edition Tucker and Noonan"

Future Directions. Edward A. Lee. Berkeley, CA May 12, A New Computational Platform: Ubiquitous Networked Embedded Systems. actuate.

Programming Languages FILS Andrei Vasilateanu

Chapter 3 (part 3) Describing Syntax and Semantics

School of Computer Science

REVIEW AND OUTLOOKS OF THE MEANS FOR VISUALIZATION OF SYNTAX SEMANTICS AND SOURCE CODE. PROCEDURAL AND OBJECT ORIENTED PARADIGM DIFFERENCES

Concurrency: what, why, how

INFORMATION TECHNOLOGY COURSE OBJECTIVE AND OUTCOME

Software Design and Analysis for Engineers

CPSC 427a: Object-Oriented Programming

Concepts of Programming Languages

CIS 1.5 Course Objectives. a. Understand the concept of a program (i.e., a computer following a series of instructions)

EECS 144/244: Fundamental Algorithms for System Modeling, Analysis, and Optimization

This course supports the assessment for Scripting and Programming Applications. The course covers 4 competencies and represents 4 competency units.

COMP3151/9151 Foundations of Concurrency Lecture 8

Organization of Programming Languages (CSE452) Why are there so many programming languages? What makes a language successful?

Object-Oriented Programming for Managers

Preface A Brief History Pilot Test Results

Com S 541. Programming Languages I

CompuScholar, Inc. Alignment to Nevada "Computer Science" Course Standards

CSE341: Programming Languages Lecture 26 Course Victory Lap. Dan Grossman Spring 2016

Course Syllabus. Programming Language Paradigms. Spring - DIS Copenhagen. Semester & Location: Elective Course - 3 credits.

Concurrency: what, why, how

CPSC 427: Object-Oriented Programming

CSc 372. Comparative Programming Languages. 2 : Functional Programming. Department of Computer Science University of Arizona

CSC 210 COMPUTER SCIENCE II

Compulsory course in Computer Science

THE OBJECT-ORIENTED DESIGN PROCESS AND DESIGN AXIOMS (CH -9)

CS 565: Programming Languages. Spring 2008 Tu, Th: 16:30-17:45 Room LWSN 1106

Introduction to UML What is UML? Motivations for UML Types of UML diagrams UML syntax Descriptions of the various diagram types Rational Rose (IBM.. M

Welcome to CS 115 (Winter 2019)

7. Introduction to Denotational Semantics. Oscar Nierstrasz

It Is What It Does: The Pragmatics of Ontology for Knowledge Sharing

DEPARTMENT OF COMPUTER SCIENCE

Al al-bayt University Prince Hussein Bin Abdullah College for Information Technology Computer Science Department

Object-Oriented Programming Using C++ (Introduction To Programming) PDF

Overview. Distributed Computing with Oz/Mozart (VRH 11) Mozart research at a glance. Basic principles. Language design.

Multi-paradigm Declarative Languages

hijac UTP Semantics for Safety-Critical Java University of York hijac Workshop 15 November 2011

CIS 500 Software Foundations Fall December 6

Administrivia. Existential Types. CIS 500 Software Foundations Fall December 6. Administrivia. Motivation. Motivation

TIETS14 Introduction to Formal Specification

CS457/557 Functional Languages

CPSC 427: Object-Oriented Programming

G COURSE PLAN ASSISTANT PROFESSOR Regulation: R13 FACULTY DETAILS: Department::

1: Introduction to Object (1)

Lecture 1: Introduction. 23. August, 2010

Object-oriented Paradigm as Evolution of Structured approach in Programming

The Problem with Threads

MSc(IT) Program. MSc(IT) Program Educational Objectives (PEO):

USC Viterbi School of Engineering

Object Oriented Programming

Chapter 3. Describing Syntax and Semantics

IE521 Convex Optimization Introduction

Formal Specification of Software Systems

PROGRAM OUTLINE. Information Technology with Co-op, System Programming. PROGRAM DESCRIPTION Concentration 1: DELIVERY METHODS PROGRAM DURATION

ECOM 2314 COMPUTER PROGRAMMING II

Welcome to CS 135 (Winter 2018)

Reasoning About Programs Panagiotis Manolios

Discussion Summaries and Recommendations

CorrectOz Recognizing common mistakes in the programming exercises of a computer science MOOC

CS383 PROGRAMMING LANGUAGES. Kenny Q. Zhu Dept. of Computer Science Shanghai Jiao Tong University

COMPUTER SCIENCE INTERNET SCIENCE AND TECHOLOGY HUMAN MEDIA INTERACTION BUSINESS INFORMATION TECHNOLOGY

Java And Object Oriented Programming Paradigm Debasis Jana

Algorithms, merits and demerits, Exponentiation, How to compute fast exponentiation Linear Search, Binary Search "Big Oh" notation, Worst case

ava with Object-Oriented Generic Programming+ Java Java with Object-Oriented + Generic Programming by Paul S. Wang sofpower.com

Outline EXPERIENCE WITH TWO OOP LANGUAGES IN ONE COURSE. HISTORY Methodology and learning design of the course Experience from classes

Topic I. Introduction and motivation References: Chapter 1 of Concepts in programming languages by J. C. Mitchell. CUP, 2003.

2. COURSE DESIGNATION: 3. COURSE DESCRIPTIONS:

A Brief History of Distributed Programming: RPC. YOW Brisbane 2016

Reasoning About Programs Panagiotis Manolios

Welcome to CS 115 (Winter 2018)

ADMINISTRATIVE MANAGEMENT COLLEGE

CSCI312 Principles of Programming Languages!

Last Time. Introduction to Design Languages. Syntax, Semantics, and Model. This Time. Syntax. Computational Model. Introduction to the class

Introduction to Computers and Programming Languages. CS 180 Sunil Prabhakar Department of Computer Science Purdue University

What is programming? Elements of Programming Languages. From machine code to programming languages. What is a programming language?

computer science (CSCI)

PROGRAMMING LANGUAGE PARADIGMS & THE MAIN PRINCIPLES OF OBJECT-ORIENTED PROGRAMMING

CSE 12 Abstract Syntax Trees

SOFTWARE ENGINEERING

This syllabus applies to students admitted to the BBA(IS)/BEng(CompSc) programme in the academic year

Welcome to CS 135 (Fall 2018) Themes of the course. Lectures. cs135/

Java 8 Programming for OO Experienced Developers

SEVEN ADVANCED ACADEMY

COMP 181. Agenda. Midterm topics. Today: type checking. Purpose of types. Type errors. Type checking

Programming Paradigms

Course Description. Learn To: : Intro to JAVA SE7 and Programming using JAVA SE7. Course Outline ::

Curriculum Mapping for National Curriculum Statement Grades R-12 and Oracle Academy.

Programming Languages Third Edition. Chapter 9 Control I Expressions and Statements

AP Computer Science A (Java) Scope and Sequence

Transcription:

Paradigms of computer programming Louv1.1x and Louv1.2x form a two-course sequence Together they teach programming as a unified discipline that covers all programming languages Second-year university level: requires some programming experience and mathematics (sets, lists, functions) The two courses cover four important themes: Functional programming (and basic data structures) Formal semantics (and computational complexity) Data abstraction (and object-oriented programming) Concurrency (and deterministic dataflow) Let s see how this works in practice Louv1.1x Louv1.2x

Hundreds of programming languages are in use...

So many, how can we understand them all? Key insight: languages are based on paradigms, and there are many fewer paradigms than languages We can understand many languages by learning few paradigms!

What is a paradigm? A programming paradigm is an approach to programming a computer based on a coherent set of principles or a mathematical theory A program is written to solve problems Any realistic program needs to solve different kinds of problems Each kind of problem needs its own paradigm So we need multiple paradigms and we need to combine them in the same program

How can we study multiple paradigms? How can we study multiple paradigms without studying multiple languages (since most languages only support one, or sometimes two paradigms)? Each language has its own syntax, its own semantics, its own system, and its own quirks We could pick three languages, like Java, Erlang, and Haskell, and structure our course around them This would make the course complicated for no good reason Our pragmatic solution: we use one language, Oz, a research language designed for many paradigms This lets us focus on the real issues Our textbook, Concepts, Techniques, and Models of Computer Programming, uses Oz to cover many paradigms

How can we combine paradigms in a program? Each paradigm is a different way of thinking How can we combine different ways of thinking in one program? We can do it using the concept of a kernel language Each paradigm has a simple core language, its kernel language, that contains its essential concepts Every practical language, even if it s complicated, can be translated easily into its kernel language Even very different paradigms have kernel languages that have much in common; often there is only one concept difference We start with a simple kernel language that underlies our first paradigm, functional programming We then add concepts one by one to give the other paradigms Scientific method: understand a system in terms of its parts

Summary of the approach Hundreds of languages are used in practice: we cannot study them all in one course or in one lifetime Solution: focus on paradigms, since each language is based on a paradigm and there there are many fewer paradigms than languages One language per paradigm is too much to study in a course, since each language is already complicated by itself Solution: use one research language, Oz, that can express many paradigms Realistic programs need to combine paradigms, but how can we do it since each paradigm is a different way of thinking? Solution: define paradigms using kernel languages, since different paradigms have kernel languages with much in common Kernel languages allow us to define many paradigms by focusing on their differences, which is much more economical in time and effort

Let s get started Probably you already know an object-oriented language Object-oriented programming, with its coherent principles, is clearly an important paradigm But what about the other paradigms? Isn t object-oriented programming by far the most important and useful paradigm? Actually, no, it s not! Many other paradigms are extremely useful, often more so than OOP! For example, to make robust and efficient distributed programs on the Internet, OOP just does not solve the right problems. Multi-agent dataflow programming is much better. The two courses cover five paradigms that solve many problems

Five paradigms The two courses cover five paradigms: Functional programming Object-oriented programming Deterministic dataflow programming Multi-agent dataflow programming (bonus lesson in Louv1.2x) Active objects These are probably the most important programming paradigms for general use But there are many other paradigms, made for other problems: these two courses give you a good foundation for studying them later if you wish

Many important ideas Louv1.1x Louv1.2x Identifiers and environments Explicit state Functional programming Data abstraction Recursion Abstract data types and objects Invariant programming Polymorphism Lists, trees, and records Inheritance Symbolic programming Multiple inheritance Instantiation Object-oriented programming Genericity Exception handling Higher-order programming Concurrency Complexity and Big-O notation Nondeterminism Moore s Law Scheduling and fairness NP and NP-complete problems Dataflow synchronization Kernel languages Deterministic dataflow Abstract machines Agents and streams Mathematical semantics Multi-agent programming

Next steps Practical organization of Louv1.1x 6 lessons + 1 final exam 1 lesson per week Weekly exercises (highly recommended) Programming exercises INGInious grader: gives feedback on errors Mozart Programming System Our first paradigm: functional programming Interactive examples and fundamental concepts