======Programming Languages, Fall 2012====== Programming languages are notations for specifying, organizing, and reasoning about computations. Different programming languages arise from different programming paradigms. The goal of this course is to acquaint the students with the constructs and their underlying concepts of major languages in the various programming paradigms. Some fundamental elements of program verification will also be covered. =====Announcements===== * 01/24: Grade Report available. * 01/02: slides for Concurrent Programming available. * 12/26: {{courses:pl2012:hw10.pdf|HW#10}} due 2013/01/02. * 12/26: notes/slides for Object-Oriented Programming available. * 12/19: {{courses:pl2012:hw9.pdf|HW#9}} due 12/26. * 12/19: notes/slides/examples for Program Verification: Hoare Logic available. * 12/12: notes/slides for Imperative Programming: Procedures available. * 12/05: notes/slides for Imperative Programming: Data Types available. * 12/05: suggested solutions to midterm problems {{courses:pl2012:pl2012midI_s.pdf|Part I}} and {{courses:pl2012:pl2012midII_s.pdf|Part II}} available. * 11/21: {{courses:pl2012:hw8.pdf|HW#8}} due 12/12. * 11/14: notes/slides for Imperative Programming: Structured Programs available. * 11/05: slides from TA sessions: {{courses:pl2012:hw1s.pptx|HW#1}}, {{courses:pl2012:hw2s.pptx|HW#2}}, {{courses:pl2012:hw3s.pptx|HW#3}}, {{courses:pl2012:hw4s.pptx|HW#4}}, {{courses:pl2012:hw5s.pptx|HW#5}}, {{courses:pl2012:hw7s.pptx|HW#7}}. * 11/03: OCaml and Common Lisp code for Map, Reduce, Differentiation, etc. available. * 10/31: bring your notebook computer with OCaml and CLISP installed to the midterm exam on 11/07. * 10/30: {{courses:pl2012:hw7.pdf|HW#7}} due 11/21. * 10/30: notes/slides for Functional Programming: Lisp available. * 10/24: {{courses:pl2012:hw5.pdf|HW#5}} due 10/31 and {{courses:pl2012:hw6.pdf|HW#6}} due 11/14. * 10/17: there will be a TA session from 1:30PM 10/24. * 10/17: {{courses:pl2012:hw4.pdf|HW#4}} due 10/24 (Note: Problem 5 asks you to extend the grammar of Little Quilt so that functions like "copy" can be defined; "copy" should satisfy equalities like those stated in the problem.) * 10/17: completed notes/slides for Functional Programming: ML available. * 10/04: {{courses:pl2012:hw3.pdf|HW#3}} due 10/17. * 10/03: notes/slides for Functional Programming: ML (part) available. * 09/26: {{courses:pl2012:hw2.pdf|HW#2}} due 10/03. * 09/26: notes/slides for Functional Programming: Expressions available. * 09/24: three more things (aside from installing OCaml + Emacs) to do to get your laptop ready for the next three weeks: (1) install the [[http://dejavu-fonts.org/wiki/Main_Page|DejaVu]] fonts (2) define an environment variable "LANG" with the value "zh_TW.UTF-8", and (3) download this one-line {{courses:pl2012:unicode_symbols_for_quilts.ml|OCaml code}}. * 09/19: typos/errors in slides for Syntax and in HW#1 corrected. * 09/19: {{courses:pl2012:hw1.pdf|HW#1}} due 09/26. * 09/12: notes/slides for Introduction and for Language Description: Syntax available. * 09/10: this website is the sole source of all up to date course information and syllabus; there is no separate PDF version. =====Instructors===== [[http://www.iis.sinica.edu.tw/~trc/public/|Tyng-Ruey Chuang (莊庭瑞)]], Institute of Information Science, Academia Sinica and NTU IM Dept., ''Xtrc@iis.sinica.edu.twX'' (between the enclosing pair of X's).\\ [[http://im.ntu.edu.tw/~tsay/|Yih-Kuen Tsay (蔡益坤)]], NTU IM Dept., 3366-1189, ''Xtsay@im.ntu.edu.twX'' (between the enclosing pair of X's). =====Lectures===== Wednesday 2:20~5:20PM, Room 304, College of Management, Building 2. =====Office Hours===== Wednesday 1:20~2:10PM, Room 1108, College of Management, Building 2, or by appointment. =====TA===== Jui-Shun Lai (賴瑞舜), 3366-1205, ''Xnarration.lai@gmail.comX'' (between the enclosing pair of X's). =====Textbooks===== * //Programming Languages: Concepts and Constructs, 2nd Ed.//, R. Sethi, Addison-Wesley, 1996. (A copy of this book has been put on reserve at NTU Library in the 教師指定參考書區 under the name “BM-6程式語言”.) * Class notes and selected readings. =====Syllabus/Schedule (with links to slides/notes)===== Note: there are four TA sessions on 10/24, 10/31, 12/5, and 2013/1/2, making up the missed class meeting on 11/28. *Introduction (.5 week: 09/12a) [{{courses:pl2012:introduction_notes.pdf|notes}},{{courses:pl2012:introduction_slides.pdf|slides}}] *Language Description: Syntax (1.5 weeks: 09/12b, 09/19) [{{courses:pl2012:syntax_notes.pdf|notes}}, {{courses:pl2012:syntax_slides.pdf|slides}}] *Functional Programming: Expressions (based on ML) (2 weeks: 09/26, 10/03) [{{courses:pl2012:expressions_notes.pdf|notes}}, {{courses:pl2012:expressions_slides.pdf|slides}}, {{courses:pl2012:little_quilt_part1.ml|Little Quilt (Part 1)}}, {{courses:pl2012:91-function.ml|91-function}}] *Functional Programming: ML (2 weeks: 10/17, 10/24) [{{courses:pl2012:ocaml_notes.pdf|notes}}, {{courses:pl2012:ocaml_slides.pdf|slides}}, {{courses:pl2012:map_reduce.ml|Map and Reduce}}, {{courses:pl2012:diff.ml|Differentiation}}, {{courses:pl2012:little_quilt.ml|Little Quilt in ML}}] *Functional Programming: Lisp (1 week: 10/31) [{{courses:pl2012:lisp_notes.pdf|notes}}, {{courses:pl2012:lisp_slides.pdf|slides}}, {{courses:pl2012:map_reduce.lisp|Map and Reduce}}, {{courses:pl2012:diff_simpl.lisp|Differentiation and Simplification}}] * **Midterm** (**2012/11/07**) *Imperative Programming: Structured Programs (1 week: 11/14) [{{courses:pl2012:structuredprograms_notes.pdf|notes}}, {{courses:pl2012:structuredprograms_slides.pdf|slides}}] *Imperative Programming: Data Types (.5 week: 11/21a) [{{courses:pl2012:datatypes_notes.pdf|notes}}, {{courses:pl2012:datatypes_slides.pdf|slides}}] *Imperative Programming: Procedures (.5 week: 11/21b) [{{courses:pl2012:procedures_notes.pdf|notes}}, {{courses:pl2012:procedures_slides.pdf|slides}}] *Program Verification: Hoare Logic (1 week: 12/05) [{{courses:pl2012:hoare_logic_notes.pdf|notes}}, {{courses:pl2012:hoare_logic_slides.pdf|slides}}, {{courses:pl2012:hoare_logic_proofs.pdf|example proofs}}] *Program Verification: Predicate Transformers (1 week: 12/12) [{{courses:pl2012:predicate_transformers_notes.pdf|notes}}, {{courses:pl2012:predicate_transformers_slides.pdf|slides}}] *Program Verification: Hoare-Style Verifiers (1 week: 12/19) [{{courses:pl2012:verifiers_notes.pdf|notes}}, {{courses:pl2012:verifiers_slides.pdf|slides}}] *Object-Oriented Programming (1 week: 12/26) [{{courses:pl2012:oop_notes.pdf|notes}}, {{courses:pl2012:oop_slides.pdf|slides}}] *Concurrent Programming (.5 week: 01/02) [{{courses:pl2012:concurrent_slides.pdf|slides}}] *Logic Programming (.5 week: 01/02) [{{courses:pl2012:lp_notes.pdf|notes}}, {{courses:pl2012:lp_slides.pdf|slides}}] * **Final** (**2013/01/09**) =====Grading===== Homework 20%, Midterm 30%, Final 40%, Attendance/Participation 10%. =====References===== - //History of Programming Languages//, T.J. Bergin and R.G. Gibson, Addison-Wesley, 1996. - //Pascal User Manual and Report, 4th Ed.: ISO Pascal Standard//, K. Jensen, N. Wirth, A.B. Michel, and J.F. Miner, Springer, 1991. - //Elements of ML Programming, ML97 Edition (2nd Ed.)//, J.D. Ullman, Prentice Hall, 1998. - [[http://caml.inria.fr/ocaml/|OCaml]]. - [[http://www.csc.villanova.edu/~dmatusze/resources/ocaml/ocaml.html|A Concise Introduction to OCaml]], David Matuszek. - [[http://www.seas.upenn.edu/~cis500/cis500-f06/resources/programming_style.html|O'Caml Style Guide]]. - [[http://adam.chlipala.net/mlcomp/|Comparing Objective Caml and Standard ML]], Adam Chlipala. - [[http://www.mpi-sws.org/~rossberg/sml-vs-ocaml.html|Standard ML and Objective Caml, Side by Side]]. - //Common LISP: The Language, 2nd Ed.//, G.L. Steele, Digital Press, 1990. [ [[http://www.cs.cmu.edu/Groups/AI/html/cltl/cltl2.html|online version at CMU]] ] - [[http://www.franz.com/products/allegrocl/|Allegro Common Lisp]]. - [[http://www.clisp.org/|CLISP]]. - //The C Programming Language, 2nd Ed.//, B.W. Kernighan and D.M. Ritchie, Prentice Hall, 1988. - //Verification of Sequential and Concurrent Programs, 3rd Edition//, K.R. Apt, F.S. de Boer, and E.-R. Olderog, Springer, 2009. - [[http://frama-c.com/|Frama-C]]. - [[http://people.cs.kuleuven.be/~bart.jacobs/verifast/|VeriFast]]. - //The C++ Programming Language, 3rd Edition//, B. Stroustrup, Addison-Wesley, 1997. - //The Annotated C++ Reference Manual//, M.A. Ellis and B. Stroustrup, Addison-Wesley, 1990. - //The Java Language Specification, 3rd Ed.//, J. Gosling, B. Joy, G. Steele, and G. Bracha, Addison-Wesley, 2005. - //The Java Tutorial: Object-Oriented Programming for the Internet//, M. Campione and K. Walrath, Addison-Wesley, 1996. - //Distributed Systems: Concepts and Constructs, 4th Edition//, G. Coulouris, J. Dollimore, and T. Kindberg, Addison-Wesley, 2005. - //Principles of Concurrent and Distributed Programming, 2nd Edition//, M. Ben-Ari, Addison-Wesley, 2005. - //Programming in Prolog: Using the ISO Standard, 5th Edition//, W.F. Clocksin and C.S. Mellish, Springer, 2003. - [[http://en.wikipedia.org/wiki/Datalog#Systems_implementing_Datalog|The Datalog Wikipedia Page]]. - [[https://sites.google.com/site/pydatalog/Online-datalog-tutorial|Online Datalog Tutorial]].