Logistics
You will take this exam on BrightSpace. It will be multiple choice with a 120 minute time limit. You MAY use books, notes, and web searches to look things up. You will not be spied on: there is no browser lock down and hence no need to hide a mobile device in a bag of potato chips. However, you MAY NOT solicit answers in any way. There is to be no asking for help, no posting on forums, no communication with other humans or intelligent bots in any way; you can only “look things up.” You also MAY NOT post answers or help any other test taker either. You are bound by an honor code to follow these rules.
The exam will be made available on Wednesday, June 19, 2024 at 9:30pm America/Los Angeles time and must be started no later than Friday, June 21, at 10:00pm, America/Los Angeles time. Choose any 2-hour period in this range to take the exam. You must submit the exam in 2 hours.
It is highly likely that you will not finish. So try to curate the problems early, and work on the softballs first. Save the hard ones until the end. Each problem is worth 5 points, so you gain nothing by working on hard problems first.
How to Study
You should:
- Review the course learning objectives from the syllabus
- Review the course notes on the topics we have covered so far
- Do all of the recall practice problems on the course notes
- Do relevant practice problems on the course practice page
Course Notes Review
Review the course notes up to and including the page on Denotational Semantics as well as the notes on TypeScript, Functional Programming, and Concurrency. Do all of the recall practice problems. Quiz yourself periodically on these.
Course Outline
Here is what we studied, organized a little bit:
- Preview
- The Study of Programming Languages
- Syntax vs Semantics vs Pragmatics
- Part 1: Theory
- Why Theory Maters
- The Four Major Theories of Computation
- Language Theory
- Logic Background
- Mathematical Background
- Individuals, Tuples, Sets, Functions
- Set Theory
- Type Theory
- Relations
- Numbers
- Part 2: Syntax
- Grammars
- Ambiguity, Precedence, Associativity
- Concrete vs. Abstract Syntax
- Context
- Ohm
- Case studies: Astro, Bella
- Part 3: Semantics
- How semantics differs from syntax
- Phase distinction between the static and the dynamic
- The role of types
- Two main flavors: operational, denotational
- Operational Semantics
- Classical approach: translate it to a low-level machine
- Modern approach: write inference rules (IF-THEN)
- SOS (small-step)
- Natural Semantics (big-step)
- Denotational Semantics
- Background: Lambda Calculus
- Functions, not inference rules
- Meaning of each construct is a mathematical object
- Independent of operational execution behavior
- Requires intense mathematical justification (domain theory)
- Part 4: Applications
- Interpreters
- Transpilers
- Some languages, including Forth, TypeScript, and Clojure
- Some concepts, including Type systems, Functional Programming, Clojure, and Concurrency
- Execution Platforms and Virtual Machines (well, stack code basically)
- Proof Assistants
Context of Each Problem
Here is what each of the 20 problems will target. These are not in order.
- Up-arrow notation
- Something from the Math notes
- English to Logic
- Logic, but deals with the semantics of a logic system
- Something about Lambda Calculus free variables
- Which is a correct Lambda reduction
- A grammar for some language - explain what the language is
- Given a description of a language, which of the given grammars generates it?
- A simple natural semantics question - which rules capture this idea
- Natural semantics - what do these rules say?
- Denotational semantics - which rules capture the idea
- Denotational semantics - what do these rules say?
- SOS - which rules capture the idea
- SOS - what do these rules say?
- Which is the correct AST for this C code
- Something about Functional Programming
- Difference between two tree grammars
- let notation
- Something about a grammar (precedence or associativity)
- Concrete operational semantics
Words of Advice
You have to put in the time for effortful self-study. Although the exam is open resources, you will not have time to look everything up. Those who come in with a strong comfort level with the material will finish on time. I am assessing your fluency and your proficiency with the material, not your Google-Fu.