Exercises for Week 02

Exercise 00

  1. The index of concepts for this week is in a separate chapter. Peruse it and make sure that its entries make sense to you (otherwise, click on them to check them out).
  2. In the light of your homework from Week 01, read again the motto of Yale-NUS College (i.e., its vision and its mission).
  3. In reference to the section about Using a grammar to generate grammatically correct sentences, do check out Strachey’s generator of love letters (as well as Leonard Tng’s modernized rendition) and the generator of mathematical proofs. Make sure to reload these web pages a few times.

Mandatory exercises

  • Exercise 00: perusing the index, reflecting on the vision and the mission of Yale-NUS College, and checking out the two generators of love letters and the generator of mathematical proofs
  • Exercise 01: reflecting on programs and data
  • Exercise 02: specializing an interpreter with respect to a program
  • Exercise 03: the four causes of a partial evaluator
  • Exercise 06: specializing the specializer with respect to an interpreter
  • Exercise 08: playing with grammars and languages
  • Exercise 11: constructing a few abstract-syntax trees
  • Exercise 12: writing a few regular expressions
  • Exercise 13: constructing a few proof trees
  • Exercise 14: finding the root of proof trees
  • Exercise 16: the four causes of compilation in Computer Science

Practicalities

  • Like last week, feel free to draw your solutions with a pencil, take low-resolution snapshots of them, and include these snapshots in your report.
  • Keep submitting your homework on Canvas as a group, not as an individual, so that all the members of the group get a recorded grade on Canvas, not only the individual who submitted.

Exercise 15

Write down as many as you like of the four causes of interpretation in Computer Science, in the order of your choosing:

  • material cause
  • efficient cause
  • formal cause
  • final cause

How does your solution compare with the four causes of an interpreter, in Exercise 09 of Week 01?

Exercise 16

Write down as many as you like of the four causes of compilation in Computer Science, in the order of your choosing:

  • material cause
  • efficient cause
  • formal cause
  • final cause

How does your solution compare with the four causes of a compiler, in Exercise 10 of Week 01?

Version

Fixed a typo [27 Jan 2023]

Created [10 Jan 2023]