CS5205Introduction1 CS5205: Foundation in Programming Languages Lecture 0 : Overview Lecturer : Chin Wei Ngan Office : COM2.

Slides:



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

Copyright © 2006 The McGraw-Hill Companies, Inc. Programming Languages 2nd edition Tucker and Noonan Chapter 1 Overview A good programming language is.
0 PROGRAMMING IN HASKELL Chapter 1 - Introduction.
Reasons to study concepts of PL
Programming Language Semantics Mooly SagivEran Yahav Schrirber 317Open space html://
Programming Languages Structure
Programming Language Theory Leif Grönqvist The national Graduate School of Language Technology (GSLT) MSI.
Semantics with Applications Mooly Sagiv Schrirber html:// Textbooks:Winskel The.
CS5205: Foundation in Programming Languages Lecture 1 : Overview
Summer 02-03Programming Language Concepts1 Programming Language Concepts (CS 360) Lecture 1: Overview, Grammars, and Little Languages Jeremy R. Johnson.
Dr. Muhammed Al-Mulhem ICS An Introduction to Functional Programming.
Object-oriented design CS 345 September 20,2002. Unavoidable Complexity Many software systems are very complex: –Many developers –Ongoing lifespan –Large.
Foundations of Programming Languages – Course Overview Xinyu Feng Acknowledgments: some slides taken or adapted from lecture notes of Stanford CS242
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.
0 PROGRAMMING IN HASKELL An Introduction Based on lecture notes by Graham Hutton The book “Learn You a Haskell for Great Good” (and a few other sources)
ITEC 380 Organization of programming languages Dr. Andrew Ray.
1 8/29/05CS360 Windows Programming Professor Shereen Khoja.
BIT 1003 – Presentation 7. Contents GENERATIONS OF LANGUAGES COMPILERS AND INTERPRETERS VIRTUAL MACHINES OBJECT-ORIENTED PROGRAMMING SCRIPTING LANGUAGES.
CS 363 Comparative Programming Languages
CS 330 Programming Languages 09 / 04 / 2008 Instructor: Michael Eckmann.
Ada-Europe’2003 Ada as a Language Ehud Lamm The Open University of Israel.
Programming Languages –14 David Watt (Glasgow) Steven Wong (Singapore) Moodle : Computing Science → Level 3 → Programming Languages 3 © 2012 David.
By Neng-Fa Zhou1 Evolution of programming languages –Machine language –Assembly language –Sub-routines and loop (Fortran) –Procedures and recursion (Algol,
September 19, 2012Introduction to Artificial Intelligence Lecture 5: Functional Programming with Haskell 1 Functional Programming Symbolic AI is based.
1 Overview CO3225 Programming Language: Theory and Practice Low Aim is a Crime, but not high ambition.
1 Programming Language History and Evolution In Text: Chapter 2.
1 COMP313A Functional Programming (1). 2 Main Differences with Imperative Languages Say more about what is computed as opposed to how Pure functional.
Copyright © 2007 Addison-Wesley. All rights reserved.1-1 Reasons for Studying Concepts of Programming Languages Increased ability to express ideas Improved.
CSC 580 – Theory of Programming Languages, Spring, 2009 Week 9: Functional Languages ML and Haskell, Dr. Dale E. Parson.
CSE-321 Programming Languages Overview POSTECH March 5, 2007 박성우.
1 CSC 427: Data Structures and Algorithm Analysis Fall 2010 See online syllabus (also available through BlueLine): Course goals:
Robert Vitolo CS474.  Branched off of ML (metalanguage)  Developed at Microsoft, available as part of the Visual Studio 2010 software package, integrated.
CS112: Structure of Programming Languages A smorgasbord of topics in programming languages including programming paradigms and syntax, semantics, implementation.
Lecture.1: Getting Started With Java Jiang (Jen) ZHENG May 9 th, 2005.
CS 345: Programming Language Paradigms Chris Brooks HR 510 MWF 11:00-12:05.
Semantics In Text: Chapter 3.
CS5205Haskell1 CS5205: Foundations in Programming Languages Overview Lecturer : Chin Wei Ngan Office : S “Language.
1-1 An Introduction to Functional Programming Sept
Allyson M. Hoss, January 14, 2008 CSC 7101 Programming Language Structures Spring 2008 Louisiana State University.
Copyright © 2006 The McGraw-Hill Companies, Inc. Programming Languages 2nd edition Tucker and Noonan Chapter 1 Overview A good programming language is.
1 Programming Languages (CS 550) Lecture 2 Summary Mini Language Interpreter Jeremy R. Johnson.
CSE 341 Section 10 Subtyping, Review, and The Future.
Erik Meijer FP101x - Functional Programming Programming in Haskell - Introduction.
Programming Languages Concepts Chapter 1: Programming Languages Concepts Lecture # 4.
서울대한양대 ( 안 산 ) 충남대 1년1년 컴퓨터기초 (C) 컴퓨터프로그래밍 (C, Java) 컴퓨터프로그래밍 (C) 2. 봄 프로그래밍 원리 (Scheme, ML) Structure & Interpretation of Computer Programs 프로그래밍 방법론.
CSCE 343 – Programming Language Concepts Welcome!.
1 PROGRAMMING IN HASKELL An Introduction Based on lecture notes by Graham Hutton The book “Learn You a Haskell for Great Good” (and a few other sources)
Language Paradigms CS655.
Programming Languages winter term 2010/11
Programming Language History and Evolution
Programming Languages 2nd edition Tucker and Noonan
Functional Programming
The language focusses on ease of use
Concepts of Programming Languages
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?
Basic 1964 PC general purpose Imperative Small Easy to use.
PROGRAMMING LANGUAGES
Programming Language Design Concepts
slides created by Marty Stepp
Programming Language History and Evolution
CS 3304 Comparative Languages Fall 2011
Welcome to Programming Languages!
Mini Language Interpreter Programming Languages (CS 550)
Foundations of Programming Languages – Course Overview
Foundations of Programming Languages – Course Overview
FP Foundations, Scheme In Text: Chapter 14.
CS 3304 Comparative Languages Fall 2011
Programming Languages 2nd edition Tucker and Noonan
Presentation transcript:

CS5205Introduction1 CS5205: Foundation in Programming Languages Lecture 0 : Overview Lecturer : Chin Wei Ngan Office : COM “Language Foundation, Extensions and Reasoning

CS5205Introduction2 Course Objectives Course Objectives - graduate-level course with foundation focus - languages as tools for programming - foundations for reasoning about programs - explore various language innovations

CS5205Introduction3 Course Outline Course Outline Lecture Topics (13 weeks) Advanced Typed Language (Haskell) Lambda Calculus (Core Language) Interpreters Untyped Scripting Language (Python) Type System for Lightweight Analysis Semantics

CS5205Introduction4 Administrative Matters Administrative Matters - mainly IVLE - Reading Materials (mostly online): Robert Harper : Foundations of Practical Programming Languages. Free PL books : - Lectures + Assignments + Paper Reading+ Exam - Assignment/Project (35%) - Paper Reading (10%) - Quiz (10%) - Exam (45%)

CS5205Introduction5 Paper Presentation Paper Presentation Focus on Language Innovation/Application Select A Paper (Week 2) Give Presentation (Week 4/5) Possible Topics Concurrent and MultiCore Programming Software Transaction Memory GUI Programming Testing with QuickCheck IDE for Haskell SELinks (OCaml) etc A List of Papers/Conferences will be given next week.

CS5205Introduction6 Assignments/Project (35%) Assignments/Project (35%) Small Exercises Mini-Project List of possible projects (Week 5) Your own project A useful tool Use advanced languages, such as Haskell, Ocaml, F#, Python, Boo, etc Evaluation (i) presentation/demo (ii) draft report/paper

CS5205Introduction7 Why Study Foundations of PL? Why Study Foundations of PL? Language used to organize programming thoughts. Language can describe and organize computation. Language features affect how ideas are expressed. Foundation needed to support the design of good language features

CS5205Introduction8 Benefits of Good PL Features Benefits of Good PL Features Readability Extensible Software. Modifiability. Reusability. Correctness.

CS5205Introduction9 Benefits of Studying Foundations of PL Design new languages for your work/research? Inside any successful software system is a PL Emacs : Elisp Word, PPT : VBScript Quake : QuakeC Facebook : FBML, FBJS Twitter : Ruby on Rails/Scala Also: Latex, XML, SQL, PS/PDF

CS5205Introduction10 Benefits of Studying Foundations of PL Different language paradigm can support different approaches to a given problem. Can choose a solution that is best (or good enough) for the given problem. PL is the primary tool of choice for programmers. If properly selected, it can amplify your programming capability. Era of domain-specific programming languages.

CS5205Introduction11 Many Dimensions of PL Syntax – verbose vs succint. prefix vs distfix. Computational model : functional, imperative, OO or constraint-based. Memory Model : explicit deallocation, garbage collection or region-based. Typing : static vs dynamic typing; strong vs weak typing. Execution Model : compiled (C/C++), interpreted (Perl), hybrid (Java). Scoping : static vs dynamic scoping.

CS5205Introduction12 Advanced Language - Haskell Advanced Language - Haskell Strongly-typed with polymorphism Higher-order functions Pure Lazy Language. Algebraic data types + records Exceptions Type classes, Monads, Arrows, etc Advantages : concise, abstract, reuse Why use Haskell ? cool & greater productivity

CS5205Introduction13 Some Applications of FP/Haskell Some Applications of FP/Haskell Hoogle – search in code library Darcs – distributed version control Programming user interface with arrows.. How to program multicore? map/reduce and Cloud computing Bioinformatics Cryptography

CS5205Introduction14 Example - Haskell Program Example - Haskell Program Apply a function to every element of a list. data List a = Nil | Cons a (List a) map f Nil = Nil map f (Cons x xs) = Cons (f x) (map f xs) a type variable type is : ( a  b)  (List a)  (List b) map sqr(Cons 1 (Cons 2 (Cons 3 Nil))) ==> (Cons 1 (Cons 4 (Cons 9 Nil)))

CS5205Introduction15 Example - Haskell Program Example - Haskell Program Built-in List Type with syntactic sugar data [a] = [] | a:[a] map :: ( a  b)  [a]  [b] map f []= [] map f (x:xs) = (f x):(map f xs) map sqr 1:(2:(3:[])) ==> 1:(4:(9:[])) map sqr [1,2,3] ==> [1,4,9]

CS5205Introduction16 Paradigm : Functional Expression Problem : sum the square of a list of numbers sumsq [1,2,3,4] = 1*1 +2*2 +3*3 + 4*4. Problem : sum the square of a list of numbers sumsq [] = 0 sumsq (x:xs) = (sqr x) + (sumsq xs)

CS5205Introduction17 Paradigm : Imperative Loop Problem : sum the square of a list of numbers sumsq [1,2,3,4] = 1*1 +2*2 +3*3 + 4*4. In F# (Ocaml dialect) sumsq :: [Int] = Int sumsq xs = let s = ref 0 in for x in xs s := !s + x ; s

CS5205Introduction18 Paradigm : Function-Level Composition Sum a list: Square a list: sum [] = 0 sum (x:xs) = x + (sum xs) square xs = map sqr xs Sum a square of list: square = sum o (map sqr) square = (map sqr) | sum square xs = xs |> (map sqr) |> sum