Introduction to Functional Programming Course Summary and Future

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

Concurrency The need for speed. Why concurrency? Moore’s law: 1. The number of components on a chip doubles about every 18 months 2. The speed of computation.
23 November 2007RCEAS 2007, Budapest1 Embedded Functional Programming Gergely Patai Budapest University of Technology and Economics Department.
Software Engineering and Design Principles Chapter 1.
1 CS 312 – Lecture 28 Continuations –Probably the most confusing thing you’ve seen all semester… Course summary –Life after CS 312.
Programming Languages Structure
Programming Language Theory Leif Grönqvist The national Graduate School of Language Technology (GSLT) MSI.
CMP 131 Introduction to Computer Programming Violetta Cavalli-Sforza Week 1, Lab.
Dr. Muhammed Al-Mulhem ICS An Introduction to Functional Programming.
COMP 321: Introduction to Computer Systems Scott Rixner Alan L. Cox
Introduction to Programming Lecture Number:. What is Programming Programming is to instruct the computer on what it has to do in a language that the computer.
Introduction CSE 1310 – Introduction to Computers and Programming Vassilis Athitsos University of Texas at Arlington 1.
Levels of Architecture & Language CHAPTER 1 © copyright Bobby Hoggard / material may not be redistributed without permission.
INTRODUCTION TO COMPUTING CHAPTER NO. 04. Programming Languages Program Algorithms and Pseudo Code Properties and Advantages of Algorithms Flowchart (Symbols.
McGraw-Hill/Irwin Copyright © 2013 by The McGraw-Hill Companies, Inc. All rights reserved. Chapter 4 Computer Software.
QuickCheck: A Lightweight Tool for Random Testing of Haskell Programs By Koen Claessen, Juhn Hughes ME: Mike Izbicki.
CS 345: Programming Language Paradigms Chris Brooks HR 510 MWF 11:00-12:05.
1 Alex Proctor and Brian Lee for CSCI 431 at UNCA, Fall 2002 ML (Meta Language) a brief introduction Alex Proctor and Brian Lee For CSCI 431 at the University.
1-1 An Introduction to Functional Programming Sept
Introduction to OOP CPS235: Introduction.
서울대한양대 ( 안 산 ) 충남대 1년1년 컴퓨터기초 (C) 컴퓨터프로그래밍 (C, Java) 컴퓨터프로그래밍 (C) 2. 봄 프로그래밍 원리 (Scheme, ML) Structure & Interpretation of Computer Programs 프로그래밍 방법론.
Introduction to Programming in Haskell Chalmers & GU Koen Lindström Claessen.
Introduction to Functional Programming
Programming Languages winter term 2010/11
Chapter 1. Introduction.
OPERATING SYSTEM CONCEPTS AND PRACTISE
CSC235 Computer Organization & Assembly Language
JavaScript/ App Lab Programming:
The language focusses on ease of use
Advanced Computer Systems
Top 8 Best Programming Languages To Learn
Programming paradigms
Visit for more Learning Resources
INTRODUCTION TO OBJECT-ORIENTED PROGRAMMING
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.
Done By: Ashlee Lizarraga Ricky Usher Jacinto Roches Eli Gomez
CSCI-235 Micro-Computer Applications
Welcome to CSE1002.
Methodologies By Akinola Soyinka.
CS101 Introduction to Computing Lecture 19 Programming Languages
Introduction to Computers and Java
The University of Adelaide, School of Computer Science
课程名 编译原理 Compiling Techniques
Hierarchical Architecture
Introduction CSE 1310 – Introduction to Computers and Programming
©2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.
Chapter 4 Computer Software.
SVTRAININGS. SVTRAININGS Python Overview  Python is a high-level, interpreted, interactive and object-oriented scripting language. Python is designed.
Developing Applications
Unit# 8: Introduction to Computer Programming
CSE 341: Programming Langs
Chapter 6 Methods: A Deeper Look
(Course Introduction)
Parallelism Can we make it faster? 29-Nov-18.
Software Engineering INTRODUCTION
Chapter 1 Introduction(1.1)
1.1 The Characteristics of Contemporary Processors, Input, Output and Storage Devices Types of Processors.
CMP 131 Introduction to Computer Programming
CSE341: Programming Languages Lecture 26 Course Victory Lap
CSE341: Programming Languages Lecture 26 Course Victory Lap
Java History, Editions, Version Features
강의 내용 및 방법 접근방법 리포트 시험 Lambda Calculus, Proof of Correctness
Tonga Institute of Higher Education IT 141: Information Systems
An Introduction to Programming with C++ Fifth Edition
Vocabulary Algorithm - A precise sequence of instructions for processes that can be executed by a computer Low level programming language: A programming.
Tonga Institute of Higher Education IT 141: Information Systems
Parallelism Can we make it faster? 27-Apr-19.
Parallelism Can we make it faster? 8-May-19.
Dept. of Computer & Information Sciences (Course Introduction)
Week 1 - Friday COMP 1600.
Presentation transcript:

Introduction to Functional Programming Course Summary and Future Koen Lindström Claessen

The End of the Course Next week: Exam Example exams + answers on the web No computers In English: Bring an English dictionary answers may be in swedish A list of standard Haskell functions

What If ... You are not done with the labs in time? Next year: This course goes again Teacher: Me (probably) Reuse labs Possibly other/changed labs

What If ... You do not pass the exam? January: Re-exam August: Re-exam Next year: This course goes again

What Have We Learned? Programming For some of you: first time Make the computer do some useful tasks Programming Language Haskell Different from what most of you had seen before Programming Principles ...

Programming Principles (I) Modelling Create a new type that models what you are dealing with Design and define typed functions around your types Sometimes your type has an extra invariant Invariants should be documented (for example as a property)

Programming Principles (II) Properties When you define functions around your types... Think about and define properties of these functions Properties can be tested automatically to find mistakes Mistakes can be in your functions (program) or in your properties (understanding)

Programming Principles (III) Recursion When you need to solve a large, complicated problem... Break the problem up into a smaller piece, or a number of smaller pieces These can be solved recursively Solve the whole problem by combining all recursive solutions

Programming Principles (IV) Abstraction and Generalization When you find yourself repeating a programming task Take a step back and see if you can generalize You can often define a abstraction (higher-order function) performing the old task and the new one Avoid copy-and-paste programming

Programming Principles (V) Pure functions Use pure functions as much as possible These are easier to understand, specify and test Concentrate IO instructions in a small part of your program Concentrate GUI instructions in a small part of your program

Programming Principles (VI) Separation Divide up your program into small units (functions) These should be grouped together into larger units (modules) Minimize dependencies between these parts So that it is easy to make internal changes, without affecting your whole program

Programming Principles Important! Independent of programming language

Why Haskell? What is easy in Haskell: Defining types Properties and testing Recursion Abstraction, higher-order functions Pure functions Separation (laziness)

Why Haskell (II)? What is harder in Haskell: Ignoring types Static strong typing Expressive type system Most advanced type system in a real language Impure functions All functions are pure The only general existing programming language Instructions are created and composed explicitly Makes it clear where the ”impure stuff” happens

Functional Programming ”Drives” development of new programming languages Type systems Garbage collection Higher-order functions / Lambdas List comprehensions ... Haskell is the most advanced functional programming language today

Functional Programming Hot topic in PL community and industry Compilers/compiler-like Domain-specific languages (Haskell) build your own programming language with little effort Telecom industry (Erlang) Dealing with complex protocols/data-flow Need to get right Financial industry (Haskell) Dealing with complex calculations

“Functional Programming” style Writing programs = defining (pure) functions and composing functions Running programs = evaluating expressions Functions are “first-class”, they can be created (lambda expressions) and passed around as arguments (higher-order functions) Functional programming language = a language in which this style is easy and encouraged

“Imperative Programming” style Writing programs = writing instructions and composing instructions that do things and change things Running programs = executing instructions

A Good Functional Programmer is a Good Programmer A Wise Man .. A Good Functional Programmer is a Good Programmer

Programming Languages Schem e C Lis p BASIC C+ + Haskell Java C# ML Pytho n JavaScri pt csh Curry Perl O’CaM L bash Erlang Rub y Prolog Lustre Mercu ry PostScrip t VHDL Esterel PDF SQL Verilog

Programming Language Features dynamica lly typed pure function s higher-order functions statically typed type inferen ce real-time immutable datastructur es polymorphis m overloading concurrency high performan ce distribution parameteriz ed types laz y virtual machine Java reflecti on type classes object oriente d compiler interpreter meta- programmi ng Haskell unificatio n C backtrackin g

Learning a Programming Language Learn the new features, principles, associated with the language Reuse things you know from other languages Learn different languages what is popular now might not be popular in 5 years from now Use the right language for the right job Systems consist of several languages

Strive To Be Someone who can quickly master a new language because you know a few very different languages Instead of: Someone who just knows one language (possibly very well) and risks becoming a ”laggard” in 10 years time

Multi-core Revolution Traditional ways of programming do not work – a challenge for the programming language community Right now, industry is looking for alternatives Intel Microsoft IBM ...

Alternatives? Expression-level parallelism Haskell restriction: no side effects Expression-level parallelism Haskell Other functional languages Software Transactional Memory Message passing between processes Erlang restriction: control of side effects restriction: no shared memory

This Course Introduction to programming Introduction to Haskell There is lots, lots more...

Coming Programming Courses D-line GU Two programming courses Both in Java Datastructures Java Haskell Dig & Dat Some C Machine-oriented programming Assembly C Object-oriented programming Java Datastructures Haskell

Future Programming Courses Concurrent Programming Compiler Construction Advanced Functional Programming Hardware Description and Verification Software Engineering using Formal Methods Language Technology Programming Languages Erlang (IT University) ... All use Functional Programming in some way