CS 15-312: Foundations of Programming Languages
(Spring 2015)

Course Information  [  Logistics  |  Course Links  |  Calendar of Classes  |  Coursework Calendar  ]



(Your comments will be sent anonymously to the instructors)

Logistics

Lectures:Su,Tu,Th 15:00 - 16:20(room 2147)
Class Webpage: http://qatar.cmu.edu/cs/15312

Instructors:
Office hours:
Office:
Email:
  Iliano Cervesato
by appointment
CMU-Q 1008
         Jorge Luis Sacchini
by appointment
CMU-Q 1014

Course Links

Calendar of Classes

Click on a class day to go to that particular lecture or recitation. Due dates for homeworks are set in bold. The due date of the next homework blinks.

Coursework Calendar

About this course  [  Description  |  Prerequisites  |  Feedback  |  Readings  |  Software  |  Grading  |  Assessment  ]

Description

This course has the purpose of exposing students who have mastered advanced programming techniques and concepts to some of the foundational principles that underly the very programming languages they have been using. These same principles pervade many disciplines in and beyond Computer Science and can be found any time one needs to give and work with a representation of some domain. More specifically, See also Why Study Programming Languages?

This course will be coordinated with the edition currently offered on the main campus, taught by Professor Karl Crary. The material presented and the homeworks will be roughly the same.

This course is a gateway to the fascinating and multifaceted world of computational logic. If you find it enjoyable, you may also like 15-317 Constructive Logic (an investigation of logics that express algorithms or computations), 15-414 Bug Catching: Automated Program Verification and Testing (the use of a logical technique known as model-checking to verify complex systems), 15-417 HOT Compilation (implementation of compilers for higher-order typed languages) and 80-311 Computability and Incompleteness (a study of the logical foundations of Computer Science).

Prerequisites

You must have completed CS 15-150 (Principles of Functional Programming) or CS 15-212 (Principles of Programming).

Feedback

It is my goal to make this course successful, stimulating and enjoyable. If at any time you feel that the course is not meeting your expectations or you want to provide feedback on how the course is progressing for you, please contact me. If you would like to provide anonymous comments, please use the feedback form on the course home page or slide a note under my door. Comments of general interest will be answered on the course discussion board.

Readings

Further References

Software

The course has a programming component. Students are allowed to use any programming language they want to develop their assignment solutions. The only requirements are that the solution work as per the text of the assignment, be understandable to the instructors, and that the student be able to explain it. Said this, some programming languages will make the task simpler than others. In particular, using Standard ML (SML) and similar languages, or Twelf and similar languages, is likely to get you a working solution in a much shorter time than, say, Java, Python or C.

SML

A reference build of Standard ML of New Jersey (SML/NJ), version 110.67, and Concurrent ML (CML) have been made available on the Unix clusters. To run it, you need to login into your Unix account. In Windows, you do this by firing PuTTy and specifying unix.qatar.cmu.edu as the machine name. When the PuTTy window comes up, type sml, do your work, and then hit CTRL-D when you are done.

You can edit your files directly under Unix (the easiest way is to run the X-Win32 utility from Windows and then run the Emacs editor from the PuTTy window by typing emacs — see also this tutorial). If you want to do all this from your own laptop, you first need to install X-Win32 from here. PuTTy is pre-installed in Windows.

If you want, you can install a personal copy of SML/NJ on your laptop. To do this, download this file and follow these instructions. Personal copies are for your convenience: all SML programs will be evaluated on the reference environment on unix.qatar.cmu.edu. You need to make sure that your homework assignments work there before submitting them. To do so, you need to transfer your files onto unix.qatar.cmu.edu and test them there. You can do so by using the PSFTP utility which comes with PuTTy (or any of the many more user-friendly FTP front-ends).

Documentation

Useful documentation can be found on the SML/NJ web site. The following files will be particularly useful:

Twelf

A reference build of the Twelf specification environment has also been made available on the Unix clusters and is accessed similarly to SML/NJ. The easiest way to use it is within the Emacs editor. Alternatively, you can install a personal copy on your laptop. Downloads, documentation and examples can be found on the Twelf wiki (it supercedes the Twelf web page).

Trying out Twelf or any other language is likely to get you bonus points

Latex

We strongly encourage you to typeset the written part of your homeworks in LaTeX (we will take this into account as part of your participation grade). It takes some getting used to it, especially if MS Word is all you've been exposed to, but it enormously simplifies producing pleasant mathematics. Here are some useful references:

Grading

This is a 12 unit course.

Tasks and Percentages

Evaluation Criteria

Your assignments and exams are evaluated on the basis of: Because this course is coordinated with the edition offered in Pittsburgh, the grades of individual homeworks and exams, as well as the final grade, will be uniformed to the performance of that class.

Late Policy

There are no late days. Assignments submitted past the deadline will get a grade of 0.

Academic Integrity

You are expected to comply with the University Policy on Academic Integrity and Plagiarism. Unless explicitly instructed otherwise, all homework and exam work is to be solely your own, and may not be shared with or borrowed from any other person in the course. You are not permitted to draw upon assignments or solutions from previous instances of the course, nor to use course materials (such as assignments or programs) obtained from any web site or other external source in preparing your work. Note that the policy now requires that students acknowledge any help received from the Academic Resource Center (ARC).

Collaboration is regulated by the whiteboard policy: you can bounce ideas about a homework with other students, but when it comes to typing it down for submission, you are on your own — no notes, files, snapshots, blind memorization, etc. Morever, you must wait at least 4 hours before writing down the solution. We take your ability to recreate the solution independently as proof that you understand the work that you submit.

This policy is our attempt to balance the tension between the benefits of group work and the benefits of individual work. We ask that you obey the spirit of the policy, as well as the letter: ensure that all work you submit is your own and that you fully understand the solution. This is in your best interest: the exams constitute a significant part of your final grade, they will be timed, and they will draw heavily on the terminology, concepts, and techniques that are exercised in in the homework. It is unlikely that you will be able to do well on the exams if you do not take full advantage of the learning opportunity afforded by the homework assignments.

Assessment

Course Objectives

This course seeks to develop students who:
  1. demonstrate a high level of proficiency in the fundamentals of programming languages, namely
    1. are able to critically understand and analyze programming languages and their constructs
    2. are able to learn and apply programming languages quickly
    3. are able to analyze, compare, and choose the appropriate paradigm for a wide variety of computational tasks
  2. are able to approach or think about problems mathematically, are familiar with the mathematics that relate directly to the field of programming languages, and are able to master new mathematical concepts that arise in the context of their work
  3. master fundamental, advanced, and recent concepts in the field of programming languages
  4. think clearly about tangible problems and create innovative solutions relying on proven techniques such as abstraction, decomposition, iteration and recursion, inductive and deductive thinking, and know the limits of computation
  5. communicate orally and in writing in effective and appropriate ways within the discipline of programming languages, namely
    1. are able to understand and articulate technical ideas
    2. are able to follow and form cogent arguments

Learning Outcomes

Upon successful completion of this course, students will:
  1. know the basics of the theoretical foundations of programming languages and be able to evaluate languages, easily learn additional languages, and even design new languages. Namely, students will
    1. be able to extrapolate the concrete syntax of a particular language and assess constructs abstractly independently of the syntax they are written in
    2. be able to discuss the semantics of a construct and describe it semi-formally and formally
    3. appreciate the distinction between static and dynamic semantics
    4. be familiar with the standard assessment tools for programming languages, in particular type safety theorems, and be able to carry out a proof
  2. understand the main concepts in programming languages, namely:
    1. the difference between an interpreted and a compiled language
    2. the degree of abstraction at which a language sits
    3. the standard control flow mechanisms, including sequential execution, branching, loops, recursion and function invocation
    4. types as an organizing principle and an abstraction mechanism for data
    5. the most common mechanisms for code reuse including functions, modules and libraries
  3. have a clear understanding of the mechanisms underlying both imperative and non-imperative languages. Specifically, they will
    1. understand the standard and emerging constructs found in imperative programming languages such as conditionals, loops, functions, polymorphism, and exceptions
    2. understand the various principles underlying the object-oriented paradigm, including encapsulated objects, classes, and inheritance
    3. have familiarity with a functional language and functional programming concepts, in particular recursion, higher-order functions, continuations, and functional modules
    4. have had exposure to some of the paradigms for distributed and concurrent programming, with emphasis on the concepts of threads of computation, state change, synchronous and asynchronous communication
  4. understand basic logic and proof techniques necessary to create and understand a formal proof. Specifically, they will be able to
    1. apply formal methods of symbolic propositional and predicate logic
    2. describe the basic structure of and give examples of the following proof techniques: direct proof, proof by contrapositive, proof by contradiction, mathematical induction
    3. discuss which type of proof is best for a given problem
    4. relate the ideas of mathematical induction to recursion and recursively defined structures
    5. identify the differences between mathematical induction and structural induction and give examples of the appropriate use of each
    6. identify and correct flawed logic used in language design
  5. be able to communicate clearly and effectively ideas, concepts and intentions within the field of programming languages, namely
    1. be able to describe technical constructs (concepts) clearly, so as to be readily understood by their peers
    2. be able to give an individual presentation on a technical subject to audience of peers within the discipline of programming languages
    3. form a cogent, logical argument asserting and reiterating all technical concepts that lie within the bounds of the taught curriculum or their research within that curriculum

Schedule of Classes

At a glance ...



2015 Iliano Cervesato