CSci 658: Software Language Engineering

Fall 2013
Assignment #3
Thursday, 5 December


  1. Select one of the following programming projects. Develop an appropriate Lua program in the groups assigned by Dr. Cunningham. Each group needs to choose a different project. The goal is to produce an example that can be used in a future version of a Lua-based class on programming languages or software engineering or to test possible interpreter modification exercises.
    1. (Adding operators and expressions) Modify the Core interpreter to implement the features discussed in exercises 8, 9, and 12 of Kamin chapter 1.
    2. (Adding type checking) Modify the Core interpreter to implement the features discussed in exercises 13, 14, and 15 of Kamin chapter 1.
    3. (Adding declarations and multiple files) Modify the Core interpreter to do the following:
      • implement the load feature discussed in exercise 11 of Kamin chapter 1, but support nested loads. It is better to add this as a top-level feature (load filename) of the program (along with defines and expressions) instead of as a REPL command.
      • implement a new top-level variable declaration/initialization statement (val variable expression) that creates the variable and gives it the value of the expression. There are at least three different approaches to handling references to undeclared variables -- consider this an error, automatically create a new global variable with value 0, automatically create a new "local" variable with value 0. Choose one of these approaches.
    4. (Adding a macro system) Modify either the Lisp or the Scheme interpreter to implement macros. For the Core interpreter, this is exercise 12 of Kamin chapter 2; for Scheme, this is part of exercise 15 of Kamin chapter 4.
    5. (Adding a read function and implementing a meta-circular interpreter) Modify either the Lisp or the Scheme interpreter to implement a read operation and use it to implement an interactive version of the meta-circular interpreter (section 2.4). This is exercise10 of Kamin chapter 2 or exercise 17 of Kamin chapter 4. Section 4.1 of the SICP also discusses a meta-circular interpreter.
    6. (Implementing local binding forms) Modify the Scheme interpreter to implement the features discussed in exercises 12, 13, and 14 of Kamin chapter 4.
    7. (Adding matrix values) Modify the Core interpreter to implement an APL interpreter as in Kamin chapter 3.
    8. (Implementing lazy evaluation) Modify the Scheme interpreter to implement a SASL interpreter as in Kamin chapter 5. Section 4.2 of the SICP also discusses lazy evaluation.
    9. (Adding streams) Modify the Scheme interpreter to add a stream (i.e., lazy list) data type to the eagerly evaluated base language as described in exercise 8 in Kamin chapter 5. Sections 3.5 and 4.2 of the SICP also discusses streams and lazy evaluation.
    10. (Adding data abstraction) Modify the Core interpreter to implement a Clu interpreter as in Kamin chapter 6.
    11. (Nondeterministic computing) Modify the Scheme interpreter to implement a nondeterministic variant similar to section 4.3 of the book SICP.
    12. (Concurrent computing) Modify the Scheme interpreter to implement a concurrent variant of Scheme similar to section 3.4 of the book SICP. You may want to build this on top of the coroutine feature of Lua.
    13. ("Roll your own" project) Suggest something similar to Dr. Cunningham for his approval.

  2. Design appropriate tests for your modified interpreter and test it thoroughly thoroughly.
  3. Document your program appropriately for use as a case study in a future offering of a programming languages class.
  4. Submit the source code and documentation for your program and test driver, any needed instructions on how to run the program, and appropriate test output to Blackboard. Be sure to identify yourself in the materials turned in.
  5. Be prepared to make a 20-minute presentation of your project on the due date.


UP to CSci 658 assignments document?


Copyright © 2013, H. Conrad Cunningham
Last modified: Fri Nov 8 07:54:37 CST 2013