Students enrolled in this class are expected to check this web page regularly. Lecture notes and important other material will be posted here.
To be used rarely, only when not available (traveling or sick). Or for office hours:
https://illinois.zoom.us/j/2172447431?pwd=dEtxWmdJR0FYOElUa1ZLL2RJRzdZUT09
CS522 is an advanced course on semantics of programming languages. Various semantic approaches and related aspects will be defined and investigated. Executable semantics of various programming languages and paradigms will be discussed, together with major theoretical models.
The links below provide you with useful material for this class, including complete lecture notes. These materials will be added by need and more topics will be added.
Conventional Semantic Approaches
Rewriting Logic and Maude
The following exercises are from the book material above. Do them only in Maude (that is, not on paper) by modifying the provided Maude code for HW1: Exercise 56 (page 137); Exercise 70 (page 155).
In case you are not familiar with Maude, you are encouraged to do the following exercises to warm-up (but please do not include them as part of your HW1 submission): Exercise 30; Exercise 32; Exercise 33; Exercise 35; Exercise 36. All at pages 80/81.
The following exercises related to denotational semantics are from the book material above: Exercises 80, 81, 82 (page 168; write these up on paper, or in a PDF); Exercise 83 (page 169; do it only in Maude, that is, not on paper, by modifying the provided Maude code for HW2).
Book material on IMP++: Challenging Big-Step SOS, Small-Step SOS, and Denotational Semantics
Combine all the individual extensions of IMP in the provided Maude code for HW3 (similar to that provided for HW2) into the IMP++ language. Read the book material above for all the technical details. You should create a subfolder of imp called 6-imp++, and that should have four subfolders, one for each semantic style. Provide also three IMP++ programs. Note: Big-step and Denotational will be the most tedious, because they are the least modular. Pick only one of them, and do the other for fun and extra-credit (if you want it).
Book material on Modular SOS, Evaluation Contexts, and the CHAM
Same as HW3 but for the three additional semantic approaches discussed in the lecture notes above: MSOS, RSEC, and CHAM. Use this provided Maude code for HW4. Handle also a short essay discussing the advantages and limitations of each of the semantic approaches discussed so far in class, assigning a (justified) score between 1 and 10 to each of them.
Category theory: definition, diagrams, cones and limits, exponentials
Lambda Calculus and Combinatory Logic
This is a theoretical HW, requiring you to do two proofs using category theory. You are strongly encouraged to do *all* the exercises in the slides, especially if you did not have prior experience with category theory. If you do the two exercises perfectly, then anything else you do will count for extra-credit.
Complete this LAMBDA code snippet. This covers knowledge about untyped lambda-calculus, fixed-points, combinatory logic, and de Bruijn nameless representations.
This can be regarded as “Final exam”, but it only counts as HW (and not project) extra-credit and has the same weight as any of the previous HWs. If you got a good score so far for the 6 HWs above, then you do not need to do this extra-credit. Choose one, and only one, of the following and do it well (you will get either 10 or 0 for this extra-credit problem!):
Proposition 8 from the slides on simply-typed lambda calculus. Exercises 5 and 6 from the slides on CCCs.
Consider the PCF language with call-by-value (note that the slides above define the call-by-name variant). Give it a small-step, a big-step, and a denotational semantics in Maude, using the representations of these semantic approaches discussed in the first part of the class. Provide also 5 (five) PCF programs that can be used to test all three of your semantics. You can use the builtins provided as part of the previous HWs (you should only need the generic substitution from there).
This has two problems. The first is to define a type checker for the parametric polymorphic lambda-calculus (or System F). The second is to define a type checker for the subtype polymorphic lambda-calculus. In both cases, make sure that you also include the conditional and a few examples showing that your definition works. Feel free to pick whatever syntax you want for the various constructs (both for terms and for types).