COMP105 Assignment: Intro

Deadline Extended: Due Monday, January 31 at 11:59PM.

Getting Started

Part A: Programming in Impcore (Individual work, 25 percent)

These are ``finger exercises'' to get you into the swing of the LISP syntax and style of programming. You can start these exercises immediately after the first lecture. If you find it entertaining, you may write very efficient solutions—but do not feel compelled to do so. Do not share your solutions with any programming partners. We encourage you to discuss ideas, but noone else may see your code.

Part B: Adding Local Variables to the Interpreter (Work with a partner, 25 percent)

This exercise will help you understand how language changes can be realized in C code. You will do exercise 24 from page 55 of Ramsey and Kamin. Before starting this problem, you should wait for the second lecture and possibly the third lecture. You should solve this problem with a partner, but this solution must be kept separate from your other solutions. Your programming partner, if any, must not see your other work.

Part C: Language structure and operational semantics (Individual work, 50 percent)

These are exercises intended to help you think about syntactic structure and to become fluent with operational semantics. The third and fourth lecture, on operational semantics and proofs, will help with some of these exercises, especially Exercise 18. Do not share your solutions with any programming partners. We encourage you to discuss ideas, but noone else may see your code.

For these exercises you will turn in three files: 1.pdf (or 1.txt), theory.pdf, and 13.imp. For file theory.pdf, you will probably find it easiest to write your answers on paper and scan it. Please see the note about how to organize your answers.

Organizing the answers to Part C

To help us read your answers to Part~C, we need for you to organize them carefully:
  • The answer to each question must start on a new page.
  • The answers must appear in order: problems 9, 10, 12, and finally 18.
  • Submitting

    Before submitting your code, test it thoroughly. We do not provide any tests; you must write your own.