Semantics of Programming Languages
Prof. Tobias Nipkow, Wintersemester 2013/14
The course will be based on this new book.
 Module: IN2055
 Lectures: Tuesday 8:30  10:00 in MI 00.07.014, Friday 10:15  11:45 in MI 00.07.014
 Exercises: Tuesday 10:15  11:45 in MI 01.11.018 (Zuse)
Exception: 22.10., 26.11., 7.1., 28.1. in MI 01.09.014 (Church)  Start: 15.10.2013.
 Tutors: Johannes Hölzl Peter Lammich
On this page: News Lecture and Exercises Homework Aims Important notice Literature
News
 The written exam
 You will be allowed to use 2 handwritten or printed A4 sheets of paper, but nothing else.
 A few questions will be Isabellespecific, but most of them will deal with semantics.
 Proofs must be detailed and readable but need not conform exactly to the Isabelle syntax. Major proof steps, especially inductions, need to be stated explicitly. Minor proof steps (corresponding to by simp, by blast etc) need not be justified if you think they are obvious, but you should say which facts they follow from.
 The questions will all be formal (you need not write an essay) but will not all be proofs but also definitions, calculations etc.
 In the tutorial on February the 4th, we will do some questions from old exams
 Homework 7 is due on December 10th, 2013
 Due to SVV, there was no tutorial on November 12th. Exercise sheet 5 is discussed on November 19th, homework 5 is due on November 26th.
 We have published some remarks about homework 2.
 Here is the address of the course mailing list. This list is primarily intended as a hotline for Isabelle questions, typically in the context of some homework. The course staff will try to answer asap, but any list member is welcome to help. Please keep your postings abstract enough so that solutions to homework are not easily constructable from them!
 Please bring your laptop, ideally with Isabelle installed, to the exercises.
Please install Isabelle from here: http://isabelle.in.tum.de/websiteIsabelle20131RC2/. This is a release candidate for Isabelle20131. Do not install Isabelle2013, which is half a year old!  See home page of WS 10/11 for some student feedback and a presentation about the course.
hg clone https://www21.in.tum.de/~lammich/hg/semantics_website
[ view changelog ]
Homework
Homework is the heart and soul of this course.

Solved homework should be submitted via email to one of the tutors:
lammichin.tum.de
Submission Guidelines
The subject line of the email should contain the string "[Semantics]". Please send a mail with only a single .thy file attached (no archives please). You can always solve all parts of the homework in one theory file! The filename should have the form FirstnameLastname.thy, or FirstnameMiddlenameLastname.thy, or Firstname{Von,Zu,Whatsoever}Lastname.thy (Notice capitalization). This submission format saves us from unpacking and renaming dozens of files manually.The latest submission date is given on each exercise sheet. Late submissions will not be graded! If you have a good excuse (such as being very sick), you should contact the tutors before the deadline.
 Each homework will get 0 to 10 points, depending on the correctness and quality of the solution.

Discussing ideas and problems with others is encouraged. When working on homework problems, however, you need to solve and write up the actual solutions alone. If you misuse the opportunity for collaboration, we will consider this as cheating.
Plagirizing somebody else's homework results in failing the course immediately. This applies for both parties, that is, the one who plagiarized and the one who provided his/her solution.  Important: all homework is graded and contributes 40% towards the final grade.
Aims
The aim of this course will be to introduce the structural, operational approach to programming language semantics. It will show how this formalism is used to specify the meaning of some simple programming language constructs and to reason formally about semantic properties of programs and of tools like program analyzers and compilers. For the reasoning part the theorem prover Isabelle will be used.
At the end of the course students should be familiar with rulebased presentations of the operational semantics of some simple imperative program constructs,
 be able to prove properties of an operational semantics using various forms of induction and
 be able to write precise formal proofs with the theorem prover Isabelle.
Important notice
 You must be familiar with the basics of some functional programming language like Haskell, Objective Caml, Standard ML or F# (as taught, for example, in Introduction to Informatics 2). For motivated students who do not have the necessary background yet: There are many introductions to functional programming available online, for example the first 6 chapters of Introduction to Objective Caml.
 You must haven taken some basic course in discrete mathematics where you learned about sets, relations and proof principles like induction (as taught, for example, in Discrete Structures).
 You need not be familiar with formal logic but you must be motivated to learn how to write precise and detailed mathematical proofs that are checked for correctness by a machine, the theorem prover Isabelle.
 At the end of the course there will be a written or oral examination, depending on the number of students. Throughout the course there will be homework assignments. They will involve the use of Isabelle and will be graded. The final grade will combine the grades from the examination (60%) and the homework (40%).
 All lectures are in English.
Literature
 The primary reference:
Tobias Nipkow, Gerwin Klein: Concrete Semantics. A Proof Assistant Approach  Two traditional alternatives not based on proof assistants:
Hanne Riis Nielson, Flemming Nielson: Semantics with Applications: A Formal Introduction.
Glynn Winskel: The Formal Semantics of Programming Languages. MIT Press.  An older introduction to Isabelle:
Tobias Nipkow, Lawrence Paulson, Markus Wenzel: Isabelle/HOL. A Proof Assistant for HigherOrder Logic.