Programming Paradigms and Languages

Slides:



Advertisements
Similar presentations
An Introduction to Programming General Concepts. What is a program? A program is an algorithm expressed in a programming language. programming language.
Advertisements

Computational Models The exam. Models of computation. –The Turing machine. –The Von Neumann machine. –The calculus. –The predicate calculus. Turing.
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,
Language Paradigms Programming languages. Language paradigms. World view of imperative languages. World view of functional languages. World view.
Overview of Programming Paradigms
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.
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.
Chapter 8 High-Level Programming Languages (modified by Erin Chambers)
High-Level Programming Languages: C++
Programming languages1 Programming paradigms Families of programming languages.
Programming Paradigms
CS 363 Comparative Programming Languages
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.
CS112: Structure of Programming Languages A smorgasbord of topics in programming languages including programming paradigms and syntax, semantics, implementation.
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.
Control Structures CPS120: Introduction to Computer Science Lecture 5.
CS 345: Programming Language Paradigms Chris Brooks HR 510 MWF 11:00-12:05.
Jigar Gaglani.  Programming paradigm is a fundamental style of computer programming  Paradigms differ in concepts and abstractions used to represent.
TIVDM2Functional Programming Language Concepts 1 Concepts from Functional Programming Languages Peter Gorm Larsen.
CS 331, Principles of Programming Languages Chapter 1.
Chapter 8 High-Level Programming Languages. 2 Chapter Goals Describe the translation process and distinguish between assembly, compilation, interpretation,
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.
Language Paradigms CS655.
CPS120 Introduction to Computer Science High Level Language: Paradigms.
Programming Paradigms, Software Architectural Patterns, and MVC CS 378 – Mobile Computing for iOS Dr. William C. Bulko.
Functional Programming
Programming Language History and Evolution
Compilers Principles, Techniques, & Tools Taught by Jing Zhang
Programming Languages 2nd edition Tucker and Noonan
CS 3723 Programming Languages
Concepts of Programming Languages
dr Robert Kowalczyk WMiI UŁ
Introduction to programming languages, Algorithms & flowcharts
Introduction to programming languages, Algorithms & flowcharts
Programming Language Design Concepts
Comp 205: Comparative Programming Languages
An Introduction to Programming
课程名 编译原理 Compiling Techniques
Prof: Dr. Shu-Ching Chen TA: Samira Pouyanfar Hector Cen Fall 2017
Programming Language History and Evolution
Evolution of programming languages
Developing Applications
Introduction to programming languages, Algorithms & flowcharts
Computer Programming.
Chapter 10 Programming Fundamentals with JavaScript
Chapter 12: Computer Programming
Programming Languages
Programming Language Design
Programming & S/W Development
Programming Languages 2nd edition Tucker and Noonan
High Level Programming Languages
Programming Paradigms and Languages
Principles of Programming Languages
Overview of Programming Paradigms
강의 내용 및 방법 접근방법 리포트 시험 Lambda Calculus, Proof of Correctness
An Introduction to Programming
Programming Languages and Paradigms
Compilers Principles, Techniques, & Tools Taught by Jing Zhang
Some Programming Paradigms
Presentation transcript:

Programming Paradigms and Languages Introduction dr Robert Kowalczyk WMiI UŁ

What is a programming paradigm? A programming paradigm is a fundamental style of computer programming, a way of building the structure and elements of computer programs. There are two main programming paradigms: imperative programming and declarative programming. source: www.wikipedia.com dr Robert Kowalczyk WMiI UŁ

dr Robert Kowalczyk WMiI UŁ Definitions Imperative programming: telling the "machine” (computer) how to do something, and as a result what you want to happen will happen. Declarative programming: telling the "machine” (computer) what you would like to happen, and let the computer figure out how to do it. dr Robert Kowalczyk WMiI UŁ

Declarative vs. imperative programming dr Robert Kowalczyk WMiI UŁ

Imperative vs. declarative programming - example We wish to double all the numbers in an array. Imperative style of programming: var numbers = [1,2,3,4,5] var doubled = [] for(var i = 0; i < numbers.length; i++) { var newNumber = numbers[i] * 2 doubled.push(newNumber) } console.write(doubled) //=> [2,4,6,8,10] Declarative style of programming: var doubled = numbers.map(function(n) { return n * 2 }) console.log(doubled) //=> [2,4,6,8,10] dr Robert Kowalczyk WMiI UŁ

Distribution of programming paradygms Programming languages Imperative Declarative Object-oriented Structured Generic Concurrent Functional Logical SQL, XML Procedural dr Robert Kowalczyk WMiI UŁ

dr Robert Kowalczyk WMiI UŁ Four main programming paradyms Procedural/Structured programming Object-oriented programming Functional programming Logical programming dr Robert Kowalczyk WMiI UŁ

dr Robert Kowalczyk WMiI UŁ Procedural/structured programming Procedural programming is a computer programming language that organises our code into small „programs" that use and change our datas. Structured programming is a programming paradigm recommending hierarchical division into blocks of code with one entry point and one or more exit points. In structured programming we use three main structures : - sequences (instruction _1; instruction _2;…; instruction _n), - choices (if, if...else, switch, case), - iterations (while, repeat, for). Key words: variables, types, procedures and abstract datas. Using: network systems, operating systems, etc. Procedural/structured languages: Fortran Cobol Pascal C C++ others. dr Robert Kowalczyk WMiI UŁ

Procedural/structural programming - example dr Robert Kowalczyk, Katedra Analizy Nieliniowej, WMiI UŁ

Object-oriented programming Object-oriented programming is a programming paradigm in which programs are defined using objects - the state of the connecting elements (or fields) and behavior (or method). Object-oriented computer program is expressed as a set of such objects, which communicate with each other in order to perform tasks. Key words: classes and objects, inheritance, encapsulation, polymorphism. Using: www and stand-alone applications. Object-oriented languages Simula, Smalltalk, C++, C#, Java, others. dr Robert Kowalczyk WMiI UŁ

Obcject-oriented programming - example dr Robert Kowalczyk WMiI UŁ

dr Robert Kowalczyk WMiI UŁ Functional programming Functional programming is a programming paradigm in which the functions are the core values ​​and the emphasis is on valuation (often recursive) function, and not to execute commands. Theoretical basis for functional programming was developed in the 19330s of theTwentieth century by Alonzo Church's lambda calculus, called lambda calculus with types. Key words: functions, lambda calculus, parametric polymorphism. Using: theoretical, in telecommunications, in financial calculations. Functional languages: Lisp, ML, Haskell, H#, Erlang others. dr Robert Kowalczyk WMiI UŁ

dr Robert Kowalczyk WMiI UŁ Functional programming - example dr Robert Kowalczyk WMiI UŁ

dr Robert Kowalczyk, Katedra Analizy Nieliniowej, WMiI UŁ Functional programming - example dr Robert Kowalczyk, Katedra Analizy Nieliniowej, WMiI UŁ

dr Robert Kowalczyk WMiI UŁ Logical programming The paradigm of logic programming is a programming method in which the program is given as a set of relations, and the relationship between these dependencies. Key words: facts, reports, queries. Using: theoretical, artificial intelligence. Logical languages: Gödel, Fril, Prolog, others. dr Robert Kowalczyk WMiI UŁ

dr Robert Kowalczyk, Katedra Analizy Nieliniowej, WMiI UŁ Logical programming - example dr Robert Kowalczyk, Katedra Analizy Nieliniowej, WMiI UŁ

dr Robert Kowalczyk, Katedra Analizy Nieliniowej, WMiI UŁ Logical programming - example dr Robert Kowalczyk, Katedra Analizy Nieliniowej, WMiI UŁ

dr Robert Kowalczyk, Katedra Analizy Nieliniowej, WMiI UŁ TIOBE – index popularity of programming languages źródło: www.tiobe.com dr Robert Kowalczyk, Katedra Analizy Nieliniowej, WMiI UŁ

Programming Paradigms Introduction the course (26-02-2019) dr Robert Kowalczyk WMiI UŁ

dr Robert Kowalczyk WMiI UŁ Haskell (schedule) Introducing to Haskell (me) Types and Typeclasses + Syntax in Functions (Adam - Andrii) Recursion (Manuel - Nageshwar) Higher order functions and modules (Sofiane - Joanna) Input/Output (Ayaz-Smith) Revision Haskell language (student) We refer these chapters from the book Learn You a Haskell for Great Good! By Miron Lipovaca dr Robert Kowalczyk WMiI UŁ

dr Robert Kowalczyk WMiI UŁ Prolog (schedule) Introducing to Prolog (me) Tutorial Introduction and A Closer Look (Nageshwar singh ) Using Data Structures (Jovan Kanevche) Backtracking and the ”Cut” (Manoj Jayakumar) Input and Output and Built-in Predicates (Ines San Luis ) Revision Prolog language (Ruben Mourino, Gurcan Kaynak) We refer the chapters of the book Programming in Prolog by William Clocksin, Christopher S. Mellish dr Robert Kowalczyk WMiI UŁ

dr Robert Kowalczyk WMiI UŁ Exam Exam – term 0 dr Robert Kowalczyk WMiI UŁ

How to get course credit To pass the class: 2 tests (Haskell+Prolog) To pass the lecture: Exam = 15 close questions and 4 open questions + lecture dr Robert Kowalczyk WMiI UŁ

dr Robert Kowalczyk WMiI UŁ Literature Learn You a Haskell for Great Good! by Miron Lipovaca Programming in Prolog by William Clocksin, Christopher S. Mellish Any www sites and books dedicated to Haskell and Prolog languages dr Robert Kowalczyk WMiI UŁ

dr Robert Kowalczyk WMiI UŁ Any Questions?  dr Robert Kowalczyk WMiI UŁ